24 genLeadTrackPt_ = iConfig.
getParameter<
double>(
"GenLeadTrackPt");
40 iEvent.
getByLabel(hepMCProduct_label_, genEvent);
43 float genLeadTrackPt=-100;
44 for (HepMC::GenEvent::particle_const_iterator iter=(*(genEvent->
GetEvent())).particles_begin();
45 iter!=(*(genEvent->
GetEvent())).particles_end();
49 double pt=
pow(
pow(theParticle->momentum().px(),2)+
pow(theParticle->momentum().py(),2), 0.5);
50 double charge=pdt->particle(theParticle->pdg_id())->
charge();
51 if (theParticle->status()==1 &&
53 fabs(theParticle->momentum().eta())<genEta_ &&
59 if (genLeadTrackPt>genLeadTrackPt_) allow=
true;
else allow=
false;
63 std::cout<<
"genEvent in not valid!"<<std::endl;
T getParameter(std::string const &) const
GenLeadTrackFilter(const edm::ParameterSet &)
bool getData(T &iHolder) const
~GenLeadTrackFilter() override
#define DEFINE_FWK_MODULE(type)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool filter(edm::Event &, const edm::EventSetup &) override
const HepMC::GenEvent * GetEvent() const
Power< A, B >::type pow(const A &a, const B &b)