Skip to content

Commit

Permalink
Merge pull request #1683 from lveldere/fsimtrack-fix-daughters
Browse files Browse the repository at this point in the history
FSimTrack::daughters() returns empty vector if no endvertex is present
  • Loading branch information
nclopezo committed Dec 6, 2013
2 parents 5e9f728 + 90ac0ff commit b41c2d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions FastSimulation/Event/interface/FSimTrack.icc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ inline int FSimTrack::nDaughters() const {
}

inline const std::vector<int>& FSimTrack::daughters() const {
if(abs(type()) == 11)
if(abs(type()) == 11 || noEndVertex() )
return daugh_;
else{
if(noEndVertex())
throw cms::Exception("FastSim") << "FSimTrack::daughter(int index) called for FSimTrack w/o end vertex, please contact FastSim developers" << std::endl;
//if(noEndVertex()){
//throw cms::Exception("FastSim") << "FSimTrack::daughters() called for FSimTrack w/o end vertex, please contact FastSim developers" << std::endl;
//}
return endVertex().daughters();
}
}
}

inline bool FSimTrack::noEndVertex() const {
Expand Down

0 comments on commit b41c2d8

Please sign in to comment.