18 #include <TClonesArray.h>
20 #include <TVirtualMC.h>
21 #include <TVirtualMCStack.h>
36 : fPointCollection(new TClonesArray(
"FairRadLenPoint"))
39 , fPosIn(TLorentzVector(0, 0, 0, 0))
40 , fPosOut(TLorentzVector(0, 0, 0, 0))
41 , fMomIn(TLorentzVector(0, 0, 0, 0))
42 , fMomOut(TLorentzVector(0, 0, 0, 0))
53 if (
nullptr == fgInstance) {
63 fPointCollection->Delete();
64 delete fPointCollection;
76 fPointCollection->Delete();
82 if (TVirtualMC::GetMC()->IsTrackEntering()) {
85 fVolumeID = TVirtualMC::GetMC()->CurrentVolID(copyNo);
86 fTime = TVirtualMC::GetMC()->TrackTime() * 1.0e09;
87 fLength = TVirtualMC::GetMC()->TrackLength();
88 TVirtualMC::GetMC()->TrackPosition(fPosIn);
89 TVirtualMC::GetMC()->TrackMomentum(fMomIn);
91 TVirtualMC::GetMC()->CurrentMaterial(fA, fZmat, fDensity, fRadl, fAbsl);
94 fELoss += TVirtualMC::GetMC()->Edep();
96 if (TVirtualMC::GetMC()->IsTrackExiting() || TVirtualMC::GetMC()->IsTrackStop()
97 || TVirtualMC::GetMC()->IsTrackDisappeared()) {
99 fTrackID = TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber();
100 TVirtualMC::GetMC()->TrackPosition(fPosOut);
101 TVirtualMC::GetMC()->TrackMomentum(fMomOut);
102 TClonesArray& clref = *fPointCollection;
103 Int_t tsize = clref.GetEntriesFast();
107 TVector3(fPosIn.X(), fPosIn.Y(), fPosIn.Z()),
108 TVector3(fMomIn.X(), fMomIn.Y(), fMomIn.Z()),
112 TVector3(fPosOut.X(), fPosOut.Y(), fPosOut.Z()),
113 TVector3(fMomOut.X(), fMomOut.Y(), fMomOut.Z()),
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
void AddPoint(Int_t &ModuleId)
void Register(const char *name, const char *Foldername, TNamed *obj, Bool_t toFile)
virtual ~FairRadLenManager()
static FairRadLenManager * Instance()