10 #include "G4Electron.hh"
11 #include "G4EventManager.hh"
12 #include "G4FastSimulationManager.hh"
13 #include "G4LogicalVolume.hh"
14 #include "G4Positron.hh"
15 #include "G4TouchableHandle.hh"
16 #include "G4TransportationManager.hh"
17 #include "G4VPhysicalVolume.hh"
18 #include "G4VProcess.hh"
19 #include "G4VSensitiveDetector.hh"
21 using namespace CLHEP;
26 : G4VFastSimulationModel(
modelName, envelope), theParSet(parSet) {
28 theRegion = const_cast<const G4Region *>(envelope);
49 if (fastTrack.GetPrimaryTrack()->GetKineticEnergy() <
GeV) {
58 G4VPhysicalVolume *pCurrentVolume = (fastTrack.GetPrimaryTrack()->GetTouchable())->
GetVolume();
59 if (pCurrentVolume ==
nullptr) {
63 G4LogicalVolume *lv = pCurrentVolume->GetLogicalVolume();
73 fastStep.KillPrimaryTrack();
74 fastStep.ProposePrimaryTrackPathLength(0.0);
78 G4double
energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy() /
GeV;
79 G4double globalTime = fastTrack.GetPrimaryTrack()->GetStep()->GetPostStepPoint()->GetGlobalTime();
80 G4double
charge = fastTrack.GetPrimaryTrack()->GetStep()->GetPreStepPoint()->GetCharge();
81 G4ThreeVector
position = fastTrack.GetPrimaryTrack()->GetPosition() / cm;
82 G4ThreeVector momentum = fastTrack.GetPrimaryTrack()->GetMomentum() /
GeV;
96 theGflashStep->SetTrack(const_cast<G4Track *>(fastTrack.GetPrimaryTrack()));
99 const_cast<G4VProcess *>(fastTrack.GetPrimaryTrack()->GetStep()->GetPostStepPoint()->GetProcessDefinedStep()));
101 G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume());
103 std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
104 std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
106 for (; spotIter != spotIterEnd; spotIter++) {
116 G4VPhysicalVolume *aCurrentVolume =
theGflashStep->GetPreStepPoint()->GetPhysicalVolume();
117 if (aCurrentVolume ==
nullptr)
120 G4LogicalVolume *lv = aCurrentVolume->GetLogicalVolume();
124 theGflashStep->GetPreStepPoint()->SetSensitiveDetector(aCurrentVolume->GetLogicalVolume()->GetSensitiveDetector());
125 G4VSensitiveDetector *aSensitive =
theGflashStep->GetPreStepPoint()->GetSensitiveDetector();
127 if (aSensitive ==
nullptr)
136 theGflashStep->GetPostStepPoint()->SetGlobalTime(timeGlobal);
138 theGflashStep->GetPostStepPoint()->SetPosition(spotPosition);
144 G4bool isExcluded =
false;
148 G4double
eta = fastTrack.GetPrimaryTrack()->GetPosition().pseudoRapidity();
149 if (std::fabs(
eta) > 1.392 && std::fabs(
eta) < 1.566) {