4 #include "HepMC/GenParticle.h"
5 #include "HepMC/GenVertex.h"
22 for(
size_t i = 0;
i < genParticles->size(); ++
i) {
30 for(
unsigned int i=0;
i<nMo;++
i){
38 int parentID = -10000;
40 for(
unsigned int i=0;
i<nMo;++
i){
41 int thisParentID = dynamic_cast
45 int hundredsIndex =
abs(thisParentID)/100;
46 int thousandsIndex =
abs(thisParentID)/1000;
47 if ( ((
abs(thisParentID) >= 23) &&
48 (
abs(thisParentID) <= 25)) ||
49 (
abs(thisParentID) == 6) ||
50 (hundredsIndex == 5) ||
51 (hundredsIndex == 4) ||
52 (thousandsIndex == 5) ||
55 parentID = thisParentID;
57 if ((parentID == -10000) && (nMo > 0))
58 parentID = dynamic_cast
62 if ((parentID != p.
pdgId()) &&
74 generator_.id.push_back(p.
pdgId());
75 generator_.status.push_back(p.
status());
76 generator_.px.push_back(p.
px());
77 generator_.py.push_back(p.
py());
78 generator_.pz.push_back(p.
pz());
79 generator_.e.push_back(p.
energy());
80 generator_.parent_id.push_back(parentID);
virtual double energy() const final
energy
virtual int status() const final
status word
virtual size_t numberOfMothers() const
number of mothers
Abs< T >::type abs(const T &t)
virtual double py() const final
y coordinate of momentum vector
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual double pz() const final
z coordinate of momentum vector
virtual int pdgId() const final
PDG identifier.
virtual double px() const final
x coordinate of momentum vector
virtual const Candidate * mother(size_type=0) const
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...
void Set(const edm::Event &e)