12 edm::
InputTag(iConfig.getUntrackedParameter(
"moduleLabel",
std::
string(
"generator")),
"unsmeared"))) {
19 vector<double> defptmin;
20 defptmin.push_back(0.);
22 vector<double> defrapmin;
23 defrapmin.push_back(-10.);
25 vector<double> defrapmax;
26 defrapmax.push_back(10.);
38 <<
"WARNING: MCSingleParticleYPt : size of vector cuts do not match!!" << endl;
43 vector<double> defptmin2;
45 defptmin2.push_back(0.);
51 vector<double> defrapmin2;
53 defrapmin2.push_back(-10.);
59 vector<double> defrapmax2;
61 defrapmax2.push_back(10.);
69 defstat2.push_back(0);
75 edm::LogInfo(
"MCSingleParticleYPt") <<
"----------------------------------------------------------------------" 77 edm::LogInfo(
"MCSingleParticleYPt") <<
"----- MCSingleParticleYPt" << std::endl;
80 <<
" < y < " <<
rapMax[
i] <<
", status = " <<
status[
i] << std::endl;
83 edm::LogInfo(
"MCSingleParticleYPt") <<
" anti-particles will be tested as well." << std::endl;
84 edm::LogInfo(
"MCSingleParticleYPt") <<
"----------------------------------------------------------------------" 102 for (HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end();
106 <<
"Looking at particle : " << (*p)->pdg_id() <<
" status : " << (*p)->status() << std::endl;
110 particleID[
i] == 0) {
112 rapidity = ((*p)->momentum().e() - (*p)->momentum().pz()) > 0.
113 ? 0.5 *
log(((*p)->momentum().e() + (*p)->momentum().pz()) /
114 ((*p)->momentum().e() - (*p)->momentum().pz()))
118 <<
"Testing particle : " << (*p)->pdg_id() <<
" pT: " << (*p)->momentum().perp() <<
" y: " <<
rapidity 119 <<
" status : " << (*p)->status() << endl;
125 <<
"Accepted particle : " << (*p)->pdg_id() <<
" pT: " << (*p)->momentum().perp() <<
" y: " <<
rapidity 126 <<
" status : " << (*p)->status() << endl;
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > particleID
std::vector< int > status
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< double > rapMax
bool filter(edm::Event &, const edm::EventSetup &) override
std::vector< double > ptMin
~MCSingleParticleYPt() override
const HepMC::GenEvent * GetEvent() const
bool accepted(std::vector< std::string_view > const &, std::string_view)
MCSingleParticleYPt(const edm::ParameterSet &)
edm::EDGetTokenT< edm::HepMCProduct > token_
std::vector< double > rapMin