31 int st = hadronStatus_.size();
32 int etamax = hadronEtaMax_.size();
33 int etamin = hadronEtaMin_.size();
34 int pmin = hadronPMin_.size();
35 int ptmax = hadronPtMax_.size();
36 int ptmin = hadronPtMin_.size();
38 if (
id != st ||
id != etamax ||
id != etamin ||
id != ptmax ||
id != ptmin ||
id != pmin) {
40 <<
"Hadron selection parameters: " <<
id << st << etamax << etamin << pmin << ptmax << ptmin << endl;
43 id = partonId_.size();
44 st = partonStatus_.size();
45 etamax = partonEtaMax_.size();
46 ptmin = partonPtMin_.size();
48 if (
id != st ||
id != etamax ||
id != ptmin) {
50 <<
"Parton selection parameters: " <<
id << st << etamax << ptmin << endl;
58 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
59 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
61 bool foundHadron =
false;
62 bool foundDecay =
false;
63 bool foundParton =
false;
65 HepMC::GenEvent::particle_const_iterator it =
begin;
66 while (!foundParton && it != end) {
75 HepMC::GenEvent::particle_const_iterator it2 =
begin;
78 while ((!foundHadron || !foundDecay) && it2 !=
end) {
101 return (foundHadron && foundDecay && foundParton);
std::vector< double > partonEtaMax_
T getParameter(std::string const &) const
std::vector< double > hadronPtMax_
std::vector< int > partonStatus_
std::vector< double > hadronEtaMax_
PartonHadronDecayGenEvtSelector(const edm::ParameterSet &pset)
std::vector< int > partonId_
std::vector< double > hadronEtaMin_
std::vector< int > hadronId_
std::vector< double > hadronPtMin_
bool filter(HepMC::GenEvent *) override
std::vector< double > hadronPMin_
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)
std::vector< double > partonPtMin_
std::vector< int > hadronStatus_