11 #include "FairLogger.h"
12 #include "TClonesArray.h"
13 #include "TMCProcess.h"
14 #include "TParticle.h"
24 : fStoreAllPrimaries(kTRUE)
25 , fStoreAllMothers(kTRUE)
26 , fStoreAllDecays(kFALSE)
51 assert(particles.GetEntriesFast() >= 0);
52 UInt_t nParticles = particles.GetEntriesFast();
57 for (UInt_t index = 0; index < nParticles; index++) {
60 TParticle* particle =
dynamic_cast<TParticle*
>(particles.At(index));
65 if (particle->GetUniqueID() == kPPrimary) {
77 auto it =
points.find(make_pair(index, system));
78 UInt_t nPoints = (it ==
points.end() ? 0 : it->second);
97 TParticle* particle =
nullptr;
99 for (UInt_t index = 0; index < nParticles; index++) {
100 if (
fStore[index])
continue;
101 particle =
dynamic_cast<TParticle*
>(particles.At(index));
105 Bool_t store = kTRUE;
106 UInt_t process = particle->GetUniqueID();
107 while (process != kPPrimary) {
108 if (process != kPDecay) {
112 Int_t iMother = particle->GetMother(0);
113 particle =
dynamic_cast<TParticle*
>(particles.At(iMother));
115 process = particle->GetUniqueID();
126 for (UInt_t index = 0; index < nParticles; index++) {
127 if (!
fStore[index])
continue;
129 dynamic_cast<TParticle*
>(particles.At(index))->GetMother(0);
130 while (iMother >= 0) {
132 iMother =
dynamic_cast<TParticle*
>(particles.At(iMother))->GetMother(0);