18 #include <TClonesArray.h>
19 #include <TVirtualMC.h>
20 #include <TVirtualMCStack.h>
33 , fFairRutherfordPointCollection(new TClonesArray(
"FairRutherfordPoint"))
45 , fFairRutherfordPointCollection(new TClonesArray(
"FairRutherfordPoint"))
57 , fFairRutherfordPointCollection(new TClonesArray(
"FairRutherfordPoint"))
62 if (fFairRutherfordPointCollection) {
63 fFairRutherfordPointCollection->Delete();
64 delete fFairRutherfordPointCollection;
82 if (TVirtualMC::GetMC()->IsTrackEntering()) {
84 fTime = TVirtualMC::GetMC()->TrackTime() * 1.0e09;
85 fLength = TVirtualMC::GetMC()->TrackLength();
86 TVirtualMC::GetMC()->TrackPosition(fPos);
87 TVirtualMC::GetMC()->TrackMomentum(fMom);
91 fELoss += TVirtualMC::GetMC()->Edep();
94 if (TVirtualMC::GetMC()->IsTrackExiting() || TVirtualMC::GetMC()->IsTrackStop()
95 || TVirtualMC::GetMC()->IsTrackDisappeared()) {
96 fTrackID = TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber();
103 TVector3(fPos.X(), fPos.Y(), fPos.Z()),
104 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()),
128 "FairRutherfordPoint",
"FairRutherford", fFairRutherfordPointCollection, kTRUE);
134 return fFairRutherfordPointCollection;
148 ConstructASCIIGeometry<FairRutherfordGeo, FairRutherfordGeoPar>(fgGeo,
"FairRutherfordGeoPar");
159 TClonesArray& clref = *fFairRutherfordPointCollection;
160 Int_t size = clref.GetEntriesFast();
161 return new (clref[size])
162 FairRutherfordPoint(trackID, detID, pos, mom, time, length, eLoss, pos.Mag(), pos.Phi(), pos.Theta());
virtual void EndOfEvent()
FairRutherfordPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void Initialize()
virtual Bool_t ProcessHits(FairVolume *v=0)
void Register(const char *name, const char *Foldername, TNamed *obj, Bool_t toFile)
void AddPoint(DetectorId iDet)
virtual FairModule * CloneModule() const
virtual void Initialize()
virtual ~FairRutherford()