19 #include <TClonesArray.h>
20 #include <TVirtualMC.h>
21 #include <TVirtualMCStack.h>
34 , fFairTutorialDet1PointCollection(new TClonesArray(
"FairTutorialDet1Point"))
46 , fFairTutorialDet1PointCollection(new TClonesArray(
"FairTutorialDet1Point"))
58 , fFairTutorialDet1PointCollection(new TClonesArray(
"FairTutorialDet1Point"))
63 if (fFairTutorialDet1PointCollection) {
64 fFairTutorialDet1PointCollection->Delete();
65 delete fFairTutorialDet1PointCollection;
82 LOG(debug) <<
"In FairTutorialDet1::ProcessHits";
84 if (TVirtualMC::GetMC()->IsTrackEntering()) {
86 fTime = TVirtualMC::GetMC()->TrackTime() * 1.0e09;
87 fLength = TVirtualMC::GetMC()->TrackLength();
88 TVirtualMC::GetMC()->TrackPosition(fPos);
89 TVirtualMC::GetMC()->TrackMomentum(fMom);
93 fELoss += TVirtualMC::GetMC()->Edep();
96 if (TVirtualMC::GetMC()->IsTrackExiting() || TVirtualMC::GetMC()->IsTrackStop()
97 || TVirtualMC::GetMC()->IsTrackDisappeared()) {
98 fTrackID = TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber();
105 TVector3(fPos.X(), fPos.Y(), fPos.Z()),
106 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()),
135 return fFairTutorialDet1PointCollection;
145 if (name.find(
"tutdet") != std::string::npos) {
157 ConstructASCIIGeometry<FairTutorialDet1Geo, FairTutorialDet1GeoPar>(fgGeo,
"FairTutorialDet1GeoPar");
168 TClonesArray& clref = *fFairTutorialDet1PointCollection;
169 Int_t size = clref.GetEntriesFast();
virtual void see Tutorial4 for examples LOG(warn)<< "This function is deprecated. Use FairAlignmentHandler instead
virtual void Initialize()
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual FairModule * CloneModule() const
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
virtual void Initialize()
virtual Bool_t ProcessHits(FairVolume *v=0)
void Register(const char *name, const char *Foldername, TNamed *obj, Bool_t toFile)
FairTutorialDet1Point * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
virtual void EndOfEvent()
void AddPoint(DetectorId iDet)
virtual Bool_t IsSensitive(const std::string &name)
virtual ~FairTutorialDet1()