26 #include "TLorentzVector.h" 73 iEvent.
getByLabel( fLabel_,
"unsmeared", EvtHandle ) ;
76 vector<TLorentzVector>
Lepton; Lepton.clear();
77 for (HepMC::GenEvent::particle_const_iterator
p = evt->particles_begin();
78 p != evt->particles_end(); ++
p) {
79 if((*p)->status()==3){
80 if (
abs((*p)->pdg_id()) == 11 ||
abs((*p)->pdg_id()) == 13 ||
abs((*p)->pdg_id()) == 15 ){
81 if(fabs((*p)->momentum().eta()) < maxEtaLepton_){
82 TLorentzVector LeptP((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
83 Lepton.push_back(LeptP);
88 if(Lepton.size() == 2){
89 if((Lepton[0]+Lepton[1]).M() > minInvariantMass_ )accept =
true;
Zto2lFilter(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Abs< T >::type abs(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const HepMC::GenEvent * GetEvent() const
bool filter(edm::Event &, const edm::EventSetup &) override