CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
13 
15  void findParticles(const reco::GenParticleCollection& sourceParticles,
16  reco::GenParticleRefVector& particleRefs,
17  int pdgId, int status );
18 
21  reco::GenParticleRefVector& descendents,
22  int status, int pdgId=0 );
23 
25  void findSisters(const reco::GenParticleRef& baseSister,
26  reco::GenParticleRefVector& sisterRefs);
27 
29  bool hasAncestor( const reco::GenParticle* particle,
30  int pdgId, int status );
31 
33  bool isDirect(const reco::GenParticleRef& particle);
34 
35  std::ostream& operator<<( std::ostream& out,
36  const reco::GenParticleRef& genRef );
37 
38 }
39 
40 #endif
tuple base
Main Program
Definition: newFWLiteAna.py:92
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
reco::GenParticleRefVector::const_iterator IGR
void findParticles(const reco::GenParticleCollection &sourceParticles, reco::GenParticleRefVector &particleRefs, int pdgId, int status)
find all particles of a given pdgId and status
bool isDirect(const reco::GenParticleRef &particle)
check if particle is direct (has status 3 or is a daughter of particle with status 3) ...
std::ostream & operator<<(std::ostream &out, const reco::GenParticleRef &genRef)
reco::GenParticleCollection::const_iterator IG
tuple out
Definition: dbtoconf.py:99
bool hasAncestor(const reco::GenParticle *particle, int pdgId, int status)
does the particle have an ancestor with this pdgId and this status?
void findSisters(const reco::GenParticleRef &baseSister, reco::GenParticleRefVector &sisterRefs)
find the particles having the same daughter as baseSister
tuple status
Definition: ntuplemaker.py:245
void findDescendents(const reco::GenParticleRef &base, reco::GenParticleRefVector &descendents, int status, int pdgId=0)
find all descendents of a given status and pdgId (recursive)