10#include "FairLogger.h"
11#include "TDatabasePDG.h"
13#include "TParticlePDG.h"
37 Double_t py, Double_t pz, Double_t M, Double_t x,
38 Double_t y, Double_t z, Double_t t, Int_t nPoints,
39 Int_t eventID, Int_t trackID, Double_t w)
61 fPdgCode(track.fPdgCode),
62 fMotherId(track.fMotherId),
67 fStartX(track.fStartX),
68 fStartY(track.fStartY),
69 fStartZ(track.fStartZ),
70 fStartT(track.fStartT),
71 fW(track.GetWeight()),
72 fProcID(track.GetProcID()),
73 fNPoints(track.fNPoints),
74 fEventID(track.fEventID),
75 fTrackID(track.fTrackID) {}
81 fPdgCode(part->GetPdgCode()),
82 fMotherId(part->GetMother(0)),
86 fM([](const TParticle* p) {
87 Double_t m2 = p->Energy() * p->Energy() - p->P() * p->P();
88 if (m2 >= 0.)
return TMath::Sqrt(m2);
90 Double_t e2 = p->Energy() * p->Energy();
91 if (-m2 < 1e-10 * e2)
return 0.;
94 return -TMath::Sqrt(-m2);
99 fStartT(part->T() * 1e09),
100 fW(part->GetWeight()),
101 fProcID(part->GetUniqueID()),
113 LOG(
debug) <<
"Track " << trackId <<
", mother : " <<
fMotherId <<
", Type "
137 if (TDatabasePDG::Instance()) {
138 TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(
fPdgCode);
140 return particle->Mass();
157 Double_t y = 0.5 * TMath::Log((e +
fPz) / (e -
fPz));
Double_t GetWeight() const
void Print(Int_t iTrack=0) const
Double_t GetRapidity() const
void SetTrackID(const Int_t &trackID)
void SetEventID(const Int_t &eventID)
Double_t GetEnergy() const
Int_t GetNPoints(DetectorId detId) const
void SetNPoints(Int_t iDet, Int_t np)