16 #include <TDatabasePDG.h>
17 #include <TParticle.h>
18 #include <TParticlePDG.h>
59 , fPdgCode(track.fPdgCode)
60 , fMotherId(track.fMotherId)
64 , fStartX(track.fStartX)
65 , fStartY(track.fStartY)
66 , fStartZ(track.fStartZ)
67 , fStartT(track.fStartT)
68 , fNPoints(track.fNPoints)
73 , fPdgCode(part->GetPdgCode())
74 , fMotherId(part->GetMother(0))
81 , fStartT(part->T() * 1e09)
89 LOG(debug) <<
"Track " << trackId <<
", mother : " << fMotherId <<
", Type " << fPdgCode <<
", momentum (" << fPx
90 <<
", " << fPy <<
", " << fPz <<
") GeV";
97 if (TDatabasePDG::Instance()) {
98 TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(fPdgCode);
100 return particle->Mass();
111 Double_t y = 0.5 * TMath::Log((e + fPz) / (e - fPz));
119 return (fNPoints & 1);
121 return ((fNPoints & (7 << 1)) >> 1);
123 return ((fNPoints & (31 << 4)) >> 4);
125 LOG(error) <<
"Unknown detector ID " << detId;
135 }
else if (nPoints > 1) {
138 fNPoints = (fNPoints & (~1)) | nPoints;
144 }
else if (nPoints > 7) {
147 fNPoints = (fNPoints & (~(7 << 1))) | (nPoints << 1);
153 }
else if (nPoints > 31) {
156 fNPoints = (fNPoints & (~(31 << 4))) | (nPoints << 4);
160 LOG(error) <<
"Unknown detector ID " << iDet;
Int_t GetNPoints(DetectorId detId) const
void SetNPoints(Int_t iDet, Int_t np)
ClassImp(FairEventBuilder)
Double_t GetRapidity() const
virtual void Print(Int_t iTrack) const
Double_t GetEnergy() const