81 label_(iConfig.getUntrackedParameter(
"moduleLabel",std::string(
"generator"))),
82 minPt(iConfig.getUntrackedParameter(
"MinPt", 0.)),
83 maxY(iConfig.getUntrackedParameter(
"MaxY", 10.)),
84 maxPt(iConfig.getUntrackedParameter(
"MaxPt", 1000.)),
85 minY(iConfig.getUntrackedParameter(
"MinY", 0.)),
86 status(iConfig.getUntrackedParameter(
"Status", 0)),
87 particleID(iConfig.getUntrackedParameter(
"ParticleID", 0))
114 bool accepted =
false;
117 double energy, pz, momentumY;
120 const HepMC::GenEvent * myGenEvent = evt->GetEvent();
123 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end(); ++
p ) {
124 if ( (*p)->status()!=
status )
continue;
126 energy=(*p)->momentum().e();
127 pz=(*p)->momentum().pz();
129 if ((*p)->momentum().perp() >
minPt && fabs(momentumY) <
maxY &&
130 (*p)->momentum().perp() <
maxPt && fabs(momentumY) >
minY) {
virtual bool endRun(edm::Run &, edm::EventSetup const &)
DJpsiFilter(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
virtual bool beginRun(edm::Run &, edm::EventSetup const &)
void addDefault(ParameterSetDescription const &psetDescription)
virtual bool endLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual bool beginLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
virtual bool filter(edm::Event &, const edm::EventSetup &)