19 #include <TParticle.h>
20 #include <TVirtualMC.h>
26 Double_t FairRadGridManager::fLtmp = 0.0;
35 : fPointCollection(nullptr)
38 , fPosIn(TLorentzVector(0, 0, 0, 0))
39 , fPosOut(TLorentzVector(0, 0, 0, 0))
40 , fMomIn(TLorentzVector(0, 0, 0, 0))
41 , fMomOut(TLorentzVector(0, 0, 0, 0))
52 , fOutputFileName(
"radGridManager.root")
55 if (
nullptr == fgInstance) {
82 TParticle* part = TVirtualMC::GetMC()->GetStack()->GetCurrentTrack();
83 fTrackID = TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber();
84 TVirtualMC::GetMC()->TrackPosition(fPosIn);
85 TVirtualMC::GetMC()->TrackMomentum(fMomIn);
90 for (Int_t i = 0; i < fMeshList->GetEntriesFast(); i++) {
93 Double_t fDiag = aMesh->
GetDiag();
97 fELoss = TVirtualMC::GetMC()->Edep();
100 TVirtualMC::GetMC()->TrackPosition(fPosOut);
101 TVirtualMC::GetMC()->TrackMomentum(fMomOut);
107 fELoss = fELoss / fBinVolume;
109 fLength = TVirtualMC::GetMC()->TrackStep();
112 aMesh->
fillTID(fPosOut.X(), fPosOut.Y(), fELoss);
114 if (fLength < 5 * fDiag) {
116 fLength = fLength / fBinVolume;
117 aMesh->
fillFluence(fPosOut.X(), fPosOut.Y(), fLength);
120 if (part->P() > 0.02) {
121 aMesh->
fillSEU(fPosOut.X(), fPosOut.Y(), fLength);
150 && (pos.Y() <= aMesh->
GetYmax()) && (pos.Z() >= aMesh->
GetZmin()) && (pos.Z() <= aMesh->
GetZmax())) {
static FairRadGridManager * Instance()
Bool_t IsTrackInside(TLorentzVector &vec, FairMesh *aMesh)
void fillTID(Double_t x, Double_t y, Double_t we)
ClassImp(FairEventBuilder)
void fillSEU(Double_t x, Double_t y, Double_t we)
void fillFluence(Double_t x, Double_t y, Double_t we)
virtual ~FairRadGridManager()
Bool_t IsTrackEntering(TLorentzVector &vec1, TLorentzVector &vec2)