12 token_(consumes<edm::
HepMCProduct>(edm::
InputTag(iConfig.getUntrackedParameter(
"moduleLabel",std::
string(
"generator")),
"unsmeared")))
18 vector<double> defpmin ;
19 defpmin.push_back(0.);
22 vector<double> defptmin ;
23 defptmin.push_back(0.);
26 vector<double> defetamin ;
27 defetamin.push_back(-10.);
29 vector<double> defetamax ;
30 defetamax.push_back(10.);
36 vector<double> defDecayRadiusmin;
37 defDecayRadiusmin.push_back(-1.);
40 vector<double> defDecayRadiusmax;
41 defDecayRadiusmax.push_back(1.e5);
44 vector<double> defDecayZmin;
45 defDecayZmin.push_back(-1.e5);
48 vector<double> defDecayZmax;
49 defDecayZmax.push_back(1.e5);
62 cout <<
"WARNING: MCPROCESSFILTER : size of MinPthat and/or MaxPthat not matching with ProcessID size!!" << endl;
67 vector<double> defpmin2 ;
68 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defpmin2.push_back(0.);}
73 vector<double> defptmin2 ;
74 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defptmin2.push_back(0.);}
79 vector<double> defetamin2 ;
80 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defetamin2.push_back(-10.);}
85 vector<double> defetamax2 ;
86 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defetamax2.push_back(10.);}
91 vector<int> defstat2 ;
92 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defstat2.push_back(0);}
98 vector<double> decayRadiusmin2 ;
99 for (
unsigned int i = 0;
i <
particleID.size();
i++){ decayRadiusmin2.push_back(-10.);}
104 vector<double> decayRadiusmax2 ;
105 for (
unsigned int i = 0;
i <
particleID.size();
i++){ decayRadiusmax2.push_back(1.e5);}
111 vector<double> decayZmin2 ;
112 for (
unsigned int i = 0;
i <
particleID.size();
i++){ decayZmin2.push_back(-1.e5);}
117 vector<double> decayZmax2 ;
118 for (
unsigned int i = 0;
i <
particleID.size();
i++){ decayZmax2.push_back(1.e5);}
139 bool accepted =
false;
143 const HepMC::GenEvent * myGenEvent = evt->GetEvent();
146 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
147 p != myGenEvent->particles_end(); ++
p ) {
153 if ( (*p)->momentum().rho() >
pMin[
i] && (*p)->momentum().perp() >
ptMin[
i]
154 && (*p)->momentum().eta() >
etaMin[
i] && (*p)->momentum().eta() <
etaMax[
i]
157 if (!((*p)->production_vertex()))
continue;
159 double decx = (*p)->production_vertex()->position().x();
160 double decy = (*p)->production_vertex()->position().y();
161 double decrad =
sqrt(decx*decx+decy*decy);
165 double decz = (*p)->production_vertex()->position().z();
178 if (accepted){
return true; }
else {
return false;}
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > status
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< double > decayZMax
virtual bool filter(edm::Event &, const edm::EventSetup &)
std::vector< double > pMin
MCSmartSingleParticleFilter(const edm::ParameterSet &)
std::vector< double > etaMin
std::vector< double > decayZMin
std::vector< int > particleID
edm::EDGetTokenT< edm::HepMCProduct > token_
std::vector< double > etaMax
std::vector< double > ptMin
std::vector< double > decayRadiusMin
~MCSmartSingleParticleFilter()
std::vector< double > decayRadiusMax