17 #include <TCollection.h>
18 #include <TDatabasePDG.h>
19 #include <TDirectory.h>
20 #include <TParticlePDG.h>
40 , particles(
"erhic::ParticleMC", 100) {
52 while ((
object = next())) {
53 tracks.push_back(static_cast<ParticleMC*>(
object));
67 std::list<const VirtualParticle*> plist(final_.begin(),
80 while ((p = static_cast<ParticleMC*>(next()))) {
92 mom += (*i)->Get4Vector();
103 mom += (*i)->Get4Vector();
113 TDatabasePDG*
pdg = TDatabasePDG::Instance();
115 TParticlePDG*
part = pdg->GetParticle((*i)->Id());
117 charge += part->Charge() / 3.;
119 std::cout <<
"Unknown particle: " << (*i)->Id() << std::endl;
165 std::cout <<
"I \t KS \t id \t orig\t daughter \t ldaughter \t "
166 <<
" px \t py \t pz \t E \t m \t xv \t yv \t zv"
182 if (gDirectory) gDirectory->GetObject(treeName.c_str(),
mTree);