Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix for Me0 segments #14306

Merged
merged 3 commits into from May 10, 2016
Merged

bug fix for Me0 segments #14306

merged 3 commits into from May 10, 2016

Conversation

jshlee
Copy link
Contributor

@jshlee jshlee commented Apr 29, 2016

MuonME0DetLayerGeometryBuilder - added layers for ME0DetId

ME0SegmentMatcher - low pt tracks were not reaching ME0 resulting in a seg fault

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @jshlee (Jason Lee) for CMSSW_8_1_X.

It involves the following packages:

RecoMuon/DetLayers
RecoMuon/MuonIdentification

@cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@battibass, @abbiendi, @jhgoh, @bellan, @HuguesBrun, @trocino, @bachtis, @rociovilar this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@@ -164,6 +164,8 @@ void ME0SegmentMatcher::produce(edm::Event& ev, const edm::EventSetup& setup) {

//Remove later
if (std::abs(thisTrack->eta()) < 1.8) continue;
// low pt tracks cannot be propagated to me0
if (thisTrack->pt() < 1.0) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about using pt?
The p at eta~2.8 and pt=1 is about 8 GeV;
for the eta ~4 option, if it resurfaces, there is even larger ratio.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Slava,

I didnt really check what the min was and assumed a lower pt wouldnt be used.
I think using pt would be the easiest and fastest way.
Do you have a better idea?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jason,

|pz|>2.5 || p > 3 may be a more inclusive selection to expect the propagation to succeed.
You should anyways add a check lastrecostate.isValid after the propagation before using lastrecostate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastrecostate.isValid works well. I changed to that.

@slava77
Copy link
Contributor

slava77 commented Apr 29, 2016

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 29, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/12728/console

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #14306 was updated. @cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please check and sign again.

@cmsbuild
Copy link
Contributor

@slava77
Copy link
Contributor

slava77 commented May 2, 2016

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/12758/console

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2016

@cmsbuild
Copy link
Contributor

cmsbuild commented May 2, 2016


LogTrace(metname) << "About to make a MuRingForwardLayer";
if(frontRings.size()!=0) result = new MuRingForwardLayer(frontRings);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this MuRingForwardLayer object deleted? I couldn't find the deletion anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvuosalo - I only added the me0 layers.
I think it isnt deleted since this object is only created at the start.
This is also the case for all the other MuonDetLayerGeometryBuilders.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears the design of the MuonDetLayerGeometryBuilders incorporates a memory leak. If so, the design should be fixed now before any more code is written based upon it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvuosalo - should I delete all these pointers at the destructor for all MuonDetLayerGeometryBuilders in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jshlee: Yes, it would be good to fix this issue. Changing to pointers to std::shared_ptr or std::unique_ptr (as appropriate) would mean the deletion would happen automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvuosalo - looking at this further, these are already assigned as std::shared_ptr upstream in https://github.com/cms-sw/cmssw/blob/CMSSW_8_1_X/RecoMuon/DetLayers/plugins/MuonDetLayerGeometryESProducer.cc#L98

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jshlee: In answer to my original question, we found where the memory is deleted, so there is no problem:
https://github.com/cms-sw/cmssw/blob/CMSSW_8_1_0_pre4/RecoMuon/DetLayers/src/MuonDetLayerGeometry.cc#L33

@calabria
Copy link
Contributor

calabria commented May 9, 2016

@cvuosalo @slava77 @davidlange6 can we please go ahead with this PR? it is needed because otherwise the muon reconstruction crushes in the phase2 scenario

@cvuosalo
Copy link
Contributor

cvuosalo commented May 9, 2016

+1

For #14306 f677425

Bug fix to prevent segmentation fault that occurred with an invalid ME0 trajectory state. There should be no change in standard workflows.

The code changes are satisfactory, and Jenkins tests against baseline CMSSW_8_1_X_2016-04-29-2300 show no significant differences, as expected.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 9, 2016

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 276b469 into cms-sw:CMSSW_8_1_X May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants