4 #include "TLorentzVector.h"
10 label_(iConfig.getUntrackedParameter(
"moduleLabel",std::string(
"generator"))),
11 minDileptonMass(iConfig.getUntrackedParameter(
"MinDileptonMass", 0.)),
12 minZgMass(iConfig.getUntrackedParameter(
"MinZgMass", 0.))
24 bool accepted =
false;
27 const HepMC::GenEvent * myGenEvent = evt->GetEvent();
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) {
ZgMassFilter(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual bool filter(edm::Event &, const edm::EventSetup &)