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
removal of statics from FastSimulation/Event/interface/FBaseSimEvent.icc #1462
Conversation
I removed the definition of static FSimTrack, FSimVertex and FSimVertexType. These statics used to be returned by functions track(int i), vertex(int i), vertexType(int i) in case the index i was out of range. Now instead an error is thrown. To avoid indices out of range, a number of changes were made * interface/FSimTrack.icc The function FSimTrack::noEndVertex() now first of all checks if FSimTrack has an end vertex (index of end vertex >= 0) associated and returns false if this is not the case. FSimtrack::nDaughters() returns 0 if the thrack has no daughter To ease future debugging, errors are thrown when - FSimTrack::mother() is called for tracks w/o mother - FSimTrack::endVertex() is called for tracks w/o mother - FSimTrack::daugther(int i) is called with i out of range - FSimTrack::daughters() is called for track w/o end vertex * src/FSimEvent.cc The function FSimEvent::load(edm::SimTrackContainer & c, edm::SimTrackContainer & m) now verifies wether a track has a mother (index mother >= 0) before evaluating the properties of the mother. * FastSimulation/TrajectoryManager/src/TrajectoryManager.cc avoided the call of FSimTrack::mother() for tracks w/o mother ** Tests: runTheMatrix.py -l 5.1,401.0
A new Pull Request was created by @lveldere for CMSSW_7_0_X. removal of statics from FastSimulation/Event/interface/FBaseSimEvent.icc It involves the following packages: FastSimulation/TrajectoryManager @cmsbuild, @nclopezo, @giamman, @lveldere can you please review it and eventually sign? Thanks. |
+1 |
This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it? |
} | ||
|
||
inline const std::vector<int>& FSimTrack::daughters() const { | ||
return abs(type()) != 11 ? endVertex().daughters() : daugh_; |
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.
Andrea,
would there be a particular reason why the special treatment is only for electrons and not for muons?
at all other places in this file, muons and electrons are treated equal
This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it? |
@lveldere Unfortunately I don't know (*) ... That class is very old, it must have been written by Patrick Janot himself. Why not asking him? (*) my guess is that it may have to do with bremsstrahlung. |
Multithreading fixes -- Removal of statics from FastSimulation/Event/interface/FBaseSimEvent.icc
this pull request replaces #1368
I removed the definition of static FSimTrack, FSimVertex and FSimVertexType.
These statics used to be returned by functions track(int i), vertex(int i), vertexType(int i) in case the index i was out of range.
Now instead an error is thrown.
To avoid indices out of range, a number of changes were made
The function FSimTrack::noEndVertex() now first of all checks if FSimTrack has an end vertex
(index of end vertex >= 0)
associated and returns false if this is not the case.
FSimtrack::nDaughters() returns 0 if the thrack has no daughter
To ease future debugging, errors are thrown when
The function FSimEvent::load(edm::SimTrackContainer & c, edm::SimTrackContainer & m)
now verifies wether a track has a mother (index mother >= 0)
before evaluating the properties of the mother.
avoided the call of FSimTrack::mother() for tracks w/o mother
** Tests:
runTheMatrix.py -l 5.1,401.0