1 #ifndef Validation_EventGenerator_HepMCValidationHelper
2 #define Validation_EventGenerator_HepMCValidationHelper
4 #include <HepMC/GenEvent.h>
6 #include "TLorentzVector.h"
8 namespace HepMCValidationHelper {
11 return a1.E() > a2.E();
16 return a->momentum().perp() > b->momentum().perp();
21 return a->momentum().e() > b->momentum().e();
26 const HepMC::FourVector& amom = a->momentum();
27 const HepMC::FourVector& bmom = b->momentum();
28 double rapa = 0.5 *
std::log((amom.e() + amom.z()) / (amom.e() - amom.z()));
29 double rapb = 0.5 *
std::log((bmom.e() + bmom.z()) / (bmom.e() - bmom.z()));
35 return a->momentum().eta() > b->momentum().eta();
52 const std::vector<const HepMC::GenParticle*>&
all,
54 std::vector<const HepMC::GenParticle*>&
photons);
61 std::vector<const HepMC::GenParticle*>&
photons);
78 std::vector<const HepMC::GenParticle*>& pruned);
bool isTau(const HepMC::GenParticle *part)
static std::vector< std::string > checklist log
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)
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)