16 #include <TClonesArray.h>
18 #include <TGeoManager.h>
19 #include <TGeoMatrix.h>
20 #include <TGeoVolume.h>
21 #include <TMCProcess.h>
22 #include <TVirtualMC.h>
23 #include <TVirtualMCStack.h>
34 , fPointsArray(new TClonesArray(
"FairTutorialDet1Point"))
46 , fPointsArray(new TClonesArray(
"FairTutorialDet1Point"))
58 , fPointsArray(new TClonesArray(
"FairTutorialDet1Point"))
64 fPointsArray->Delete();
73 TVirtualMC::GetMC()->TrackPosition(fPos);
74 TVirtualMC::GetMC()->TrackMomentum(fMom);
77 fTrackID = TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber();
79 if (TVirtualMC::GetMC()->TrackPid() == 211) {
81 fTrackID, 11, -12.5, -12.5, 20. + 5. + 0.1, fPos.T(), 0.1, 0.1, 1.0, 1.0, 0., 0., 0., kPHadronic, 1, 0);
83 fTrackID, 11, -12.5, -12.5, 20. + 5. + 0.1, fPos.T(), -0.1, -0.1, 1.0, 1.0, 0., 0., 0., kPHadronic, 1, 0);
86 12.5, 12.5, 20. + 5. + 0.1, TVirtualMC::GetMC()->TrackTime(), fMom.X(), fMom.Y(), fMom.Z(), 0.99 * fMom.E());
88 if (TVirtualMC::GetMC()->TrackPid() == 211) {
90 fTrackID, 11, -12.5, -12.5, 20. + 5. + 0.1, fPos.T(), -0.1, 0.1, 1.0, 1.0, 0., 0., 0., kPHadronic, 1, 0);
92 fTrackID, 11, -12.5, -12.5, 20. + 5. + 0.1, fPos.T(), 0.1, -0.1, 1.0, 1.0, 0., 0., 0., kPHadronic, 1, 0);
102 fTime = TVirtualMC::GetMC()->TrackTime() * 1.0e09;
103 fLength = TVirtualMC::GetMC()->TrackLength();
108 TVector3(fPos.X(), fPos.Y(), fPos.Z()),
109 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()),
145 TGeoVolume* cave = gGeoManager->GetTopVolume();
150 TGeoBBox* bbox =
new TGeoBBox(
"bbox", dx, dy, dz);
151 TGeoVolume* vol =
new TGeoVolume(
"fast_sim_vol", bbox,
fFastSimMedium);
156 TGeoRotation* rot =
new TGeoRotation();
157 TGeoCombiTrans* matr =
new TGeoCombiTrans(x, y, z, rot);
159 cave->AddNode(vol, 1, matr);
172 TClonesArray& clref = *fPointsArray;
173 Int_t size = clref.GetEntriesFast();
void AddSensitiveVolume(TGeoVolume *v)
virtual void FastSimProcessParticle()
virtual void FastSimPushSecondary(Int_t parentID, Int_t pdgCode, Double_t xx, Double_t yy, Double_t zz, Double_t tt, Double_t px, Double_t py, Double_t pz, Double_t en, Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Double_t weight, Int_t is)
static FairRootManager * Instance()
virtual void EndOfEvent()
ClassImp(FairEventBuilder)
TGeoMedium * fFastSimMedium
virtual void Initialize()
virtual ~FairFastSimExample()
virtual Bool_t IsSensitive(const std::string &name)
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void ConstructGeometry()
FairTutorialDet1Point * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
void Register(const char *name, const char *Foldername, TNamed *obj, Bool_t toFile)
void AddPoint(DetectorId iDet)
virtual FairModule * CloneModule() const
virtual void FastSimMoveParticleTo(Double_t xx, Double_t yy, Double_t zz, Double_t tt, Double_t px, Double_t py, Double_t pz, Double_t en)
virtual void Initialize()