1 #ifndef Validation_EventGenerator_HepMCValidationHelper 2 #define Validation_EventGenerator_HepMCValidationHelper 4 #include <HepMC/GenEvent.h> 6 #include "TLorentzVector.h" 9 template <
class T>
inline bool GreaterByE (
const T& a1,
const T& a2) {
return a1.E() > a2.E();}
19 const HepMC::FourVector& amom = a->momentum();
20 const HepMC::FourVector& bmom = b->momentum();
21 double rapa = 0.5 *
std::log( (amom.e() + amom.z()) / (amom.e() - amom.z()) );
22 double rapb = 0.5 *
std::log( (bmom.e() + bmom.z()) / (bmom.e() - bmom.z()) );
43 const std::vector<const HepMC::GenParticle*>& all,
45 std::vector<const HepMC::GenParticle*>&
photons);
50 void findFSRPhotons(
const std::vector<const HepMC::GenParticle*>& leptons,
53 std::vector<const HepMC::GenParticle*>& photons);
bool isTau(const HepMC::GenParticle *part)
void allStatus3(const HepMC::GenEvent *all, std::vector< const HepMC::GenParticle * > &status3)
void findFSRPhotons(const std::vector< const HepMC::GenParticle * > &leptons, const std::vector< const HepMC::GenParticle * > &all, double deltaR, std::vector< const HepMC::GenParticle * > &photons)
bool sortByPt(const HepMC::GenParticle *a, const HepMC::GenParticle *b)
bool isChargedLepton(const HepMC::GenParticle *part)
void allStatus1(const HepMC::GenEvent *all, std::vector< const HepMC::GenParticle * > &status1)
bool sortByPseudoRapidity(const HepMC::GenParticle *a, const HepMC::GenParticle *b)
void removeIsolatedLeptons(const HepMC::GenEvent *all, double deltaR, double sumPt, std::vector< const HepMC::GenParticle * > &pruned)
void allStatus2(const HepMC::GenEvent *all, std::vector< const HepMC::GenParticle * > &status2)
bool sortByRapidity(const HepMC::GenParticle *a, const HepMC::GenParticle *b)
void allVisibleParticles(const HepMC::GenEvent *all, std::vector< const HepMC::GenParticle * > &visible)
void findDescendents(const HepMC::GenParticle *a, std::vector< const HepMC::GenParticle * > &descendents)
double deltaR(double eta1, double eta2, double phi1, double phi2)
TLorentzVector genMet(const HepMC::GenEvent *all, double etamin=-9999., double etamax=9999.)
bool isNeutrino(const HepMC::GenParticle *part)
bool sortByE(const HepMC::GenParticle *a, const HepMC::GenParticle *b)
bool GreaterByE(const T &a1, const T &a2)