58 edm::
InputTag(iConfig.getUntrackedParameter(
"moduleLabel",
std::
string(
"generator")),
"unsmeared"))),
59 fVerbose(iConfig.getUntrackedParameter(
"verbose", 0)),
60 fchekantiparticle(iConfig.getUntrackedParameter(
"CheckAntiparticle",
true)) {
64 vector<double> defptmin;
65 defptmin.push_back(0.);
67 vector<double> defrapmin;
68 defrapmin.push_back(-10.);
70 vector<double> defrapmax;
71 defrapmax.push_back(10.);
83 <<
"WARNING: MCSingleParticleYPt : size of vector cuts do not match!!" << endl;
88 vector<double> defptmin2;
90 defptmin2.push_back(0.);
96 vector<double> defrapmin2;
98 defrapmin2.push_back(-10.);
104 vector<double> defrapmax2;
106 defrapmax2.push_back(10.);
112 vector<int> defstat2;
114 defstat2.push_back(0);
120 edm::LogInfo(
"MCSingleParticleYPt") <<
"----------------------------------------------------------------------"
122 edm::LogInfo(
"MCSingleParticleYPt") <<
"----- MCSingleParticleYPt" << std::endl;
125 <<
" < y < " <<
rapMax[
i] <<
", status = " <<
status[
i] << std::endl;
128 edm::LogInfo(
"MCSingleParticleYPt") <<
" anti-particles will be tested as well." << std::endl;
129 edm::LogInfo(
"MCSingleParticleYPt") <<
"----------------------------------------------------------------------"
140 for (HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end();
144 <<
"Looking at particle : " << (*p)->pdg_id() <<
" status : " << (*p)->status() << std::endl;
150 double rapidity = ((*p)->momentum().e() - (*p)->momentum().pz()) > 0.
151 ? 0.5 *
log(((*p)->momentum().e() + (*p)->momentum().pz()) /
152 ((*p)->momentum().e() - (*p)->momentum().pz()))
156 <<
"Testing particle : " << (*p)->pdg_id() <<
" pT: " << (*p)->momentum().perp() <<
" y: " << rapidity
157 <<
" status : " << (*p)->status() << endl;
163 <<
"Accepted particle : " << (*p)->pdg_id() <<
" pT: " << (*p)->momentum().perp() <<
" y: " << rapidity
164 <<
" status : " << (*p)->status() << endl;