35 #include "TrackingAction.hh"
37 #include "DetectorConstruction.hh"
39 #include "HistoManager.hh"
69 if (charge == 0.0)
return;
70 if (position.
z() <
fZend)
return;
71 if (direction.
z() <= 0.)
return;
78 G4double ux = direction.
x(), uy = direction.
y(), uz = direction.
z();
81 analysisManager->FillH1(ih, thetax);
82 analysisManager->FillH1(ih, thetay);
89 dr = analysisManager->GetH1Width(ih);
90 rmin = ((
int)(r/dr))*dr;
91 ds =
twopi*(rmin + 0.5*dr)*dr;
92 analysisManager->FillH1(ih, r, 1/ds);
97 dr = analysisManager->GetH1Width(ih);
98 rmin = ((
int)(r/dr))*dr;
99 ds =
twopi*(rmin + 0.5*dr)*dr;
100 analysisManager->FillH1(ih, r, 1/(uz*ds));
104 Run* run =
static_cast<Run*
>(
114 G4double dtheta = analysisManager->GetH1Width(ih);
115 G4double unit = analysisManager->GetH1Unit(ih);
118 analysisManager->FillH1(ih, theta, weight);
126 G4double thetam = std::atan(r/dist);
128 G4double dtheta = analysisManager->GetH1Width(ih);
129 G4double unit = analysisManager->GetH1Unit(ih);
132 analysisManager->FillH1(ih, thetam, weight);
static G4RunManager * GetRunManager()
void SumFluence(G4double, G4double)
G4double GetPDGCharge() const
G4ParticleDefinition * GetDefinition() const
G4double GetThicknessWorld()
void PostUserTrackingAction(const G4Track *)
static constexpr double twopi
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
const G4ThreeVector & GetPosition() const
G4CsvAnalysisManager G4AnalysisManager
G4Run * GetNonConstCurrentRun() const
G4double GetZdist_foil_detector()
DetectorConstruction * fDetector
const G4ThreeVector & GetMomentumDirection() const
void PreUserTrackingAction(const G4Track *)
Simple detector construction with a box volume placed in a world.