CMS 3D CMS Logo

GenParticlesHelper.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_HepMCCandAlgos_GenParticlesHelper_h
2 #define PhysicsTools_HepMCCandAlgos_GenParticlesHelper_h
3 
5 
6 #include <iostream>
7 
8 namespace GenParticlesHelper {
9 
10  typedef reco::GenParticleCollection::const_iterator IG;
12 
14  void findParticles(const reco::GenParticleCollection& sourceParticles,
15  reco::GenParticleRefVector& particleRefs,
16  int pdgId,
17  int status);
18 
21  reco::GenParticleRefVector& descendents,
22  int status,
23  int pdgId = 0);
24 
26  void findSisters(const reco::GenParticleRef& baseSister, reco::GenParticleRefVector& sisterRefs);
27 
29  bool hasAncestor(const reco::GenParticle* particle, int pdgId, int status);
30 
32  bool isDirect(const reco::GenParticleRef& particle);
33 
34  std::ostream& operator<<(std::ostream& out, const reco::GenParticleRef& genRef);
35 
36 } // namespace GenParticlesHelper
37 
38 #endif
GenParticlesHelper::findSisters
void findSisters(const reco::GenParticleRef &baseSister, reco::GenParticleRefVector &sisterRefs)
find the particles having the same daughter as baseSister
Definition: GenParticlesHelper.cc:43
GenParticlesHelper::findParticles
void findParticles(const reco::GenParticleCollection &sourceParticles, reco::GenParticleRefVector &particleRefs, int pdgId, int status)
find all particles of a given pdgId and status
Definition: GenParticlesHelper.cc:8
GenParticlesHelper::operator<<
std::ostream & operator<<(std::ostream &out, const reco::GenParticleRef &genRef)
Definition: GenParticlesHelper.cc:92
reco::GenParticle
Definition: GenParticle.h:21
mps_update.status
status
Definition: mps_update.py:68
GenParticlesHelper::isDirect
bool isDirect(const reco::GenParticleRef &particle)
check if particle is direct (has status 3 or is a daughter of particle with status 3)
Definition: GenParticlesHelper.cc:61
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
GenParticlesHelper
Definition: GenParticlesHelper.h:8
edm::RefVector
Definition: EDProductfwd.h:27
GenParticlesHelper::IG
reco::GenParticleCollection::const_iterator IG
Definition: GenParticlesHelper.h:10
edm::Ref< GenParticleCollection >
GenParticleFwd.h
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:117
GenParticlesHelper::hasAncestor
bool hasAncestor(const reco::GenParticle *particle, int pdgId, int status)
does the particle have an ancestor with this pdgId and this status?
Definition: GenParticlesHelper.cc:77
edm::RefVectorIterator
Definition: EDProductfwd.h:33
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
newFWLiteAna.base
base
Definition: newFWLiteAna.py:92
GenParticlesHelper::findDescendents
void findDescendents(const reco::GenParticleRef &base, reco::GenParticleRefVector &descendents, int status, int pdgId=0)
find all descendents of a given status and pdgId (recursive)
Definition: GenParticlesHelper.cc:28
GenParticlesHelper::IGR
reco::GenParticleRefVector::const_iterator IGR
Definition: GenParticlesHelper.h:11