4 #include <G4IonTable.hh>
6 #include <G4RunManager.hh>
8 #include <G4TrajectoryContainer.hh>
9 #include <G4UserEventAction.hh>
10 #include <G4UserRunAction.hh>
11 #include <G4UserTrackingAction.hh>
12 #include <RAT/DS/ChannelStatus.hh>
13 #include <RAT/DS/NestedTubeInfo.hh>
14 #include <RAT/DS/PMTInfo.hh>
15 #include <RAT/DS/Root.hh>
16 #include <RAT/DS/Run.hh>
17 #include <RAT/EventInfo.hh>
18 #include <RAT/GLG4VEventAction.hh>
19 #include <RAT/GeoFiberSensitiveDetectorHit.hh>
20 #include <RAT/Producer.hh>
33 int get_pdgcode(
const G4PrimaryParticle *p);
37 class Gsim :
public Producer, G4UserRunAction, G4UserEventAction, G4UserTrackingAction {
44 virtual void BeginOfRunAction(
const G4Run *aRun);
45 virtual void EndOfRunAction(
const G4Run *aRun);
48 virtual void BeginOfEventAction(
const G4Event *anEvent);
49 virtual void EndOfEventAction(
const G4Event *anEvent);
52 virtual void PreUserTrackingAction(
const G4Track *aTrack);
53 virtual void PostUserTrackingAction(
const G4Track *aTrack);
56 void MakeRun(
int runID);
61 static bool GetFillPointCont() {
return FillPointCont; }
62 static void SetFillPointCont(
bool on =
false) { FillPointCont = on; }
66 static void SetStoreParticleTraj(
const G4String &particleName,
const bool &gDoStore);
67 bool GetStoreParticleTraj(
const G4String &particleName);
68 static G4String GetStoreParticleTrajString(
const bool &gDoStore);
70 static bool GetStoreOpticalTrackID() {
return StoreOpticalTrackID; }
71 static void SetStoreOpticalTrackID(
bool on =
false) { StoreOpticalTrackID = on; }
73 static void SetMaxWallTime(
double time) { MaxWallTime = time; }
78 std::string process =
"unknown");
82 void PhotonRecurse(std::vector<int> &PhotonIDs,
int trackID,
int &parentID,
int &firstCreatedID);
83 void SetOpticalPhotonIDs(std::string particle_type,
int trackID,
int parentID);
84 std::vector<int> OpticalPhotonIDs;
86 G4RunManager *theRunManager;
89 std::vector<RAT::PMTTime *> fPMTTime;
90 std::vector<RAT::PMTCharge *> fPMTCharge;
102 double pretriggertime;
104 std::vector<double> specharge;
105 std::vector<double> transitTime;
106 std::vector<double> fTubeRate;
109 double channelEfficiency;
111 std::map<int, std::vector<double>> trackEndMap;
113 bool fInitialStoreTrajectoryState;
115 static bool FillPointCont;
116 static bool StoreOpticalTrackID;
117 static double MaxWallTime;
118 static std::set<G4String> fStoreParticleTraj;
119 static std::set<G4String> fDiscardParticleTraj;
121 G4VisExecutive *theVisExecutive;
Load detector geometry and materials.
Definition: GLG4DebugMessenger.hh:14
Definition: GLG4HitPhoton.hh:30
Definition: MCNestedTube.hh:20
Definition: NestedTubeInfo.hh:19
Definition: PMTInfo.hh:19
Definition: EventInfo.hh:13
Definition: GeoFiberSensitiveDetectorHit.hh:14
int npmts
Definition: Gsim.hh:101
void MakeEvent(const G4Event *g4ev, DS::Root *ds)
Definition: Gsim.cc:443
Definition: ProcBlock.hh:33
Definition: Producer.hh:54
Definition: CCCrossSecMessenger.hh:29
Definition: FitPathProc.hh:18