File indexing completed on 2024-04-06 12:23:23
0001 #ifndef PhysicsTools_HepMCCandAlgos_GenParticlesHelper_h
0002 #define PhysicsTools_HepMCCandAlgos_GenParticlesHelper_h
0003
0004 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0005
0006 #include <iostream>
0007
0008 namespace GenParticlesHelper {
0009
0010 typedef reco::GenParticleCollection::const_iterator IG;
0011 typedef reco::GenParticleRefVector::const_iterator IGR;
0012
0013
0014 void findParticles(const reco::GenParticleCollection& sourceParticles,
0015 reco::GenParticleRefVector& particleRefs,
0016 int pdgId,
0017 int status);
0018
0019
0020 void findDescendents(const reco::GenParticleRef& base,
0021 reco::GenParticleRefVector& descendents,
0022 int status,
0023 int pdgId = 0);
0024
0025
0026 void findSisters(const reco::GenParticleRef& baseSister, reco::GenParticleRefVector& sisterRefs);
0027
0028
0029 bool hasAncestor(const reco::GenParticle* particle, int pdgId, int status);
0030
0031
0032 bool isDirect(const reco::GenParticleRef& particle);
0033 }
0034
0035 namespace edm {
0036 std::ostream& operator<<(std::ostream& out, const reco::GenParticleRef& genRef);
0037 }
0038 #endif