35 #include "TrackingAction.hh"
36 #include "PrimaryGeneratorAction.hh"
40 #include "RunAction.hh"
41 #include "HistoManager.hh"
63 if(selectedGeneratorAction==2)
71 else if(selectedGeneratorAction==0)
78 analysis->FillH1(
id, cosalpha);
84 if (psi < 0.) psi +=
twopi;
85 analysis->FillH1(
id, psi);
87 else if(selectedGeneratorAction==3)
94 analysis->FillH1(
id, cosalpha);
103 G4double psi = std::atan2(u2*um, u1*um);
104 if (psi < 0.) psi +=
twopi;
105 analysis->FillH1(
id, psi);
108 else if(selectedGeneratorAction==4)
112 if (r <= 0.0)
return;
119 G4double dr = analysis->GetH1Width(
id);
121 if (dv > 0.) analysis->FillH1(
id, r, 1./dv);
127 analysis->FillH1(
id, costheta);
133 if (phi < 0.) phi +=
twopi;
134 analysis->FillH1(
id, phi);
141 analysis->FillH1(
id, cosalpha);
150 G4double psi = std::atan2(u2*um, u1*um);
151 if (psi < 0.) psi +=
twopi;
152 analysis->FillH1(
id, psi);
const G4ThreeVector & GetVertexPosition() const
G4double GetKineticEnergy() const
Definition of the PrimaryGeneratorAction4 class.
static constexpr double um
G4int GetSelectedAction()
void PostUserTrackingAction(const G4Track *)
PrimaryGeneratorAction * fPrimary
static constexpr double twopi
The primary generator action class with particle gun.
G4CsvAnalysisManager G4AnalysisManager
Definition of the PrimaryGeneratorAction2 class.
Definition of the PrimaryGeneratorAction3 class.
const G4ThreeVector & GetMomentumDirection() const
PrimaryGeneratorAction3 * GetAction3()
void PreUserTrackingAction(const G4Track *)