24 if (genParticle->
mother() !=
nullptr){
35 if ( genParticle->status() <=
abs(
depth_) && (genParticle->pdg_id() < 88 || genParticle->pdg_id() > 99) )
56 if ( genVertex->particles_in_size() )
68 if ( !trackingParticle->genParticles().empty() )
70 LogDebug(
"TrackHistory") <<
"Particle " << trackingParticle->pdgId() <<
" has a GenParicle image." 78 LogDebug(
"TrackHistory") <<
"No GenParticle image for " << trackingParticle->pdgId() << std::endl;
93 if ( !trackingVertex->sourceTracks().empty() )
95 LogDebug(
"TrackHistory") <<
"Moving on to the parent particle." << std::endl;
101 for (its = trackingVertex->sourceTracks_begin(); its != trackingVertex->sourceTracks_end(); its++)
103 for (itd = trackingVertex->daughterTracks_begin(); itd != trackingVertex->daughterTracks_end(); itd++)
125 LogDebug(
"TrackHistory") <<
"WARNING: Looping track found." << std::endl;
133 else if ( !trackingVertex->genVertices().empty() )
136 LogDebug(
"TrackHistory") <<
"Vertex has " << trackingVertex->genVertices().size() <<
"GenVertex image." << std::endl;
139 ivertex != trackingVertex->genVertices_end();
147 LogDebug(
"TrackHistory") <<
"WARNING: Source track for tracking vertex cannot be found." << std::endl;
152 LogDebug(
"TrackHistory") <<
" WARNING: Vertex cannot be found.";
int pdgId() const final
PDG identifier.
bool isNonnull() const
Checks for non-null.
RecoGenParticleTrail recoGenParticleTrail_
SimVertexTrail simVertexTrail_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
GenVertexTrail genVertexTrail_
void traceGenHistory(HepMC::GenParticle const *)
Trace all the simulated information for a given pointer to a HepMC::GenParticle.
GenVertexTrailHelper genVertexTrailHelper_
Abs< T >::type abs(const T &t)
void traceRecoGenHistory(reco::GenParticle const *)
Trace all the simulated information for a given pointer to a reco::GenParticle.
SimParticleTrail simParticleTrail_
void depth(int d)
Set the depth of the history.
int status() const final
status word
bool traceSimHistory(TrackingParticleRef const &, int)
Trace all the simulated information for a given reference to a TrackingParticle.
RecoGenParticleTrailHelper recoGenParticleTrailHelper_
GenParticleTrail genParticleTrail_
const HepMC::GenParticle * genParticle() const
Returns a pointer to most primitive status 1 or 2 particle in the genParticleTrail_.
const Candidate * mother(size_type=0) const override
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...