18 #include <TIterator.h> 27 using namespace genie;
31 int pdg_code,
const TClonesArray *
const particle_list)
36 TObjArrayIter particle_iter(particle_list);
39 if(p->
Pdg() == pdg_code) {
40 if(p->
Status()<10) nparticles++;
47 int pdg_code,
GHepStatus_t status,
const TClonesArray *
const particle_list)
52 TObjArrayIter particle_iter(particle_list);
55 if(p->
Pdg() == pdg_code && p->
Status() == status) nparticles++;
64 TIter piter(part_list);
79 TIter piter(part_list);
92 TIter piter(part_list);
97 double sum_px = 0, sum_py = 0, sum_pz = 0, sum_E = 0;
102 sum_E += (particle->
Energy());
103 sum_px += (particle->
Px());
104 sum_py += (particle->
Py());
105 sum_pz += (particle->
Pz());
108 <<
"-> " << i++ <<
" " << particle->
Name()
109 <<
" PDG = " << particle->
Pdg()
110 <<
" status = " << particle->
Status()
115 <<
"}(E = " << particle->
Energy()
116 <<
",Px = " << particle->
Px()
117 <<
",Py = " << particle->
Py()
118 <<
",Pz = " << particle->
Pz() <<
")";
122 <<
"SUMS: E = " << sum_E
123 <<
", px = " << sum_px <<
", py = " << sum_py <<
", pz = " << sum_pz;
THE MAIN GENIE PROJECT NAMESPACE
int FirstDaughter(void) const
enum genie::EGHepStatus GHepStatus_t
double Pz(void) const
Get Pz.
GHepStatus_t Status(void) const
double Energy(void) const
Get energy.
double Px(void) const
Get Px.
int LastMother(void) const
int FirstMother(void) const
string Name(void) const
Name that corresponds to the PDG code.
int LastDaughter(void) const
int NNegatives(const TClonesArray *const particle_list)
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc)
void Print(const TClonesArray *const part_list)
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
STDHEP-like event record entry that can fit a particle or a nucleus.
int NPositives(const TClonesArray *const particle_list)
int NParticles(int pdg_code, const TClonesArray *const particle_list)
double Py(void) const
Get Py.