4 #include "TLorentzVector.h" 11 minDileptonMass(iConfig.getUntrackedParameter(
"MinDileptonMass", 0.)),
12 minZgMass(iConfig.getUntrackedParameter(
"MinZgMass", 0.))
29 vector<TLorentzVector>
Lepton; Lepton.clear();
30 vector<TLorentzVector>
Photon; Photon.clear();
32 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
33 p != myGenEvent->particles_end(); ++
p ) {
34 if ((*p)->status() == 1 && (
abs((*p)->pdg_id()) == 11 ||
abs((*p)->pdg_id()) == 13 ||
abs((*p)->pdg_id()) == 15)) {
35 TLorentzVector LeptP((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
36 Lepton.push_back(LeptP);
38 if (
abs((*p)->pdg_id()) == 22 && (*p)->status() == 1) {
39 TLorentzVector PhotP((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
40 Photon.push_back(PhotP);
44 if (Lepton.size() > 1 && (Lepton[0]+Lepton[1]).M() >
minDileptonMass ) {
45 if ((Lepton[0]+Lepton[1]+Photon[0]).M() >
minZgMass) {
bool getByToken(EDGetToken token, Handle< PROD > &result) const
ZgMassFilter(const edm::ParameterSet &)
edm::EDGetTokenT< edm::HepMCProduct > token_
bool filter(edm::Event &, const edm::EventSetup &) override
Abs< T >::type abs(const T &t)
const HepMC::GenEvent * GetEvent() const
bool accepted(std::vector< std::string_view > const &, std::string_view)