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
bug fix for Me0 segments #14306
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure about using pt? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi Jason,
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lastrecostate.isValid works well. I changed to that. |
||
|
||
float zSign = thisTrack->pz() > 0 ? 1.0f : -1.0f; | ||
|
||
|
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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