4 #include "HepMC/GenVertex.h"
20 int st = partonStatus_.size();
21 int pt = partonPt_.size();
27 id = particleId_.size();
28 st = particleStatus_.size();
29 pt = particlePt_.size();
31 if(particleId_.size() != particleStatus_.size() || particleId_.size() != particlePt_.size()){
40 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
41 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
43 bool foundParticle =
false;
44 bool foundParton =
false;
46 HepMC::GenEvent::particle_const_iterator it =
begin;
47 while((!foundParton || !foundParticle) && it != end){
49 bool isThisPhoton =
false;
62 if ( !((*it)->production_vertex()) ) {
66 const HepMC::GenVertex* productionVertex = (*it)->production_vertex();
68 size_t numberOfMothers = productionVertex->particles_in_size();
69 if ( numberOfMothers <= 0 ) {
75 HepMC::GenVertex::particles_in_const_iterator motherIt = productionVertex->particles_in_const_begin();
76 for( ; motherIt != productionVertex->particles_in_const_end(); motherIt++) {
77 if ( fabs( (*motherIt)->pdg_id() ) <= 22 ) {
84 if ( (isFrag ==
true) && ( isThisPhoton ==
true) ) {
97 return (foundParton && foundParticle);
T getParameter(std::string const &) const
EcalGenEvtSelectorFrag(const edm::ParameterSet &pset)
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)
std::vector< int > partonStatus_
std::vector< double > particlePt_
std::vector< int > partonId_
std::vector< int > particleId_
std::vector< double > partonPt_
bool filter(HepMC::GenEvent *)
std::vector< int > particleStatus_