35 #include "TrackingAction.hh"
37 #include "DetectorConstruction.hh"
39 #include "EventAction.hh"
40 #include "HistoManager.hh"
75 Run* run =
static_cast<Run*
>(
89 G4bool notabsor = (transmit || reflect);
102 G4bool charged = (charge != 0.);
103 G4bool neutral = !charged;
109 if (transmit && charged)
id = 10;
110 else if (transmit && neutral)
id = 20;
111 else if (reflect && charged)
id = 30;
112 else if (reflect && neutral)
id = 40;
114 if (
id>0) { analysisManager->FillH1(
id, energy); }
120 G4int index = 0;
if (trackID > 1) index = 1;
131 if (transmit && charged)
id = 12;
132 else if (transmit && neutral)
id = 22;
133 else if (reflect && charged)
id = 32;
134 else if (reflect && neutral)
id = 42;
137 G4double theta = std::acos(direction.
x());
139 G4double dteta = analysisManager->GetH1Width(
id);
140 G4double unit = analysisManager->GetH1Unit(
id);
149 analysisManager->FillH1(
id,theta,weight);
156 if (transmit && charged)
id = 11;
157 else if (reflect && charged)
id = 31;
158 else if (transmit && neutral)
id = 21;
159 else if (reflect && neutral)
id = 41;
162 G4double theta = std::acos(direction.
x());
164 G4double dteta = analysisManager->GetH1Width(
id);
165 G4double unit = analysisManager->GetH1Unit(
id);
168 analysisManager->FillH1(
id,theta,weight);
175 if (transmit && charged)
id = 13;
176 else if (transmit && neutral)
id = 23;
177 else if (reflect && charged)
id = 33;
178 else if (reflect && neutral)
id = 43;
181 if (direction.
x() != 0.0) {
182 G4double tet = std::atan(direction.
y()/std::fabs(direction.
x()));
183 analysisManager->FillH1(
id,tet);
186 tet = std::atan(direction.
z()/std::fabs(direction.
x()));
187 analysisManager->FillH1(
id,tet);
194 if (transmit && energy > 0.0) {
197 analysisManager->FillH1(14, y);
198 analysisManager->FillH1(14,
z);
199 analysisManager->FillH1(15, r);
204 if ((aTrack->
GetParentID() == 1) && charged && energy > 0.0) {
206 analysisManager->FillH1(6, xVertex);
207 if (notabsor) analysisManager->FillH1(7, xVertex);
const G4ThreeVector & GetVertexPosition() const
static G4RunManager * GetRunManager()
G4double GetKineticEnergy() const
static constexpr double MeV
void AddEnergyLeak(G4double eleak, G4int index)
G4double GetxendAbs() const
G4double GetxstartAbs() const
G4double GetPDGCharge() const
G4ParticleDefinition * GetDefinition() const
void PostUserTrackingAction(const G4Track *)
EventAction * fEventAction
static constexpr double electron_mass_c2
static constexpr double twopi
const G4ThreeVector & GetPosition() const
static G4Positron * Positron()
G4CsvAnalysisManager G4AnalysisManager
void SetTransmitFlag(G4int flag)
G4Run * GetNonConstCurrentRun() const
DetectorConstruction * fDetector
void SetReflectFlag(G4int flag)
const G4ThreeVector & GetMomentumDirection() const
void AddMscProjTheta(G4double theta)
void PreUserTrackingAction(const G4Track *)
Simple detector construction with a box volume placed in a world.
G4int GetParentID() const