22#include <TLorentzVector.h>
23#include <TMCRootManager.h>
25#include <TVirtualMC.h>
39 fTrackerCollection(0),
40 fSensitiveVolumeID(-1),
49 :
TNamed(origin.GetName(), origin.GetTitle()),
50 fTrackerCollection(0),
51 fSensitiveVolumeID(-1),
60 :
TNamed(), fTrackerCollection(0), fSensitiveVolumeID(-1), fVerboseLevel(1)
82 Int_t size = ref.GetEntriesFast();
97 static __thread Bool_t registered =
false;
105 if (TMCRootManager::Instance())
Register();
118 Int_t
id = gMC->CurrentVolID(copyNo);
122 Double_t edep = gMC->Edep();
124 if (edep == 0.)
return false;
129 newHit->
SetTrackID(gMC->GetStack()->GetCurrentTrackNumber());
139 gMC->TrackPosition(pos);
140 newHit->
SetPos(TVector3(pos.X(), pos.Y(), pos.Z()));
165 TMCRootManager::Instance()->Register(
176 cout <<
"\n-------->Hits Collection: in this event they are " << nofHits
177 <<
" hits in the tracker chambers: " << endl;
Definition of the Ex02TrackerHit class.
Definition of the Ex02TrackerSD class.
void SetChamberNb(Int_t chamb)
void SetTrackID(Int_t track)
void SetPos(TVector3 xyz)
void SetEdep(Double_t de)
The tracker sensitive detector.
Int_t fVerboseLevel
Verbosity level.
Ex02TrackerHit * AddHit()
virtual void Print(const Option_t *option=0) const
Int_t fSensitiveVolumeID
Sensitive volume Id.
TClonesArray * fTrackerCollection
Hits collection.