56 :globalFlag(false),spectrum(
"off")
59 XrayFluoDetector = XrayFluoDC;
82 G4cout <<
"XrayFluoMercuryPrimaryGeneratorAction created" <<
G4endl;
95 G4cout <<
"XrayFluoMercuryPrimaryGeneratorAction deleted" <<
G4endl;
130 G4double sunPosX = x0 + rho * std::sin(theta) * std::cos(phi);
131 G4double sunPosY = y0 + rho * std::sin(theta) * std::sin(phi);
132 G4double sunPosZ = z0 + rho * std::cos(theta);
151 G4double mercuryPosX = rho * std::sin(theta) * std::cos(phi);
152 G4double mercuryPosY = rho * std::sin(theta) * std::sin(phi);
153 G4double mercuryPosZ = rho * std::cos(theta);
156 G4ThreeVector(mercuryPosX-sunPosX ,mercuryPosY-sunPosY,mercuryPosZ-sunPosZ));
198 if(particle ==
"proton"|| particle ==
"alpha")
207 while (partSum<random)
209 partSum += (*data)[j];
216 else if (particle ==
"gamma")
225 G4double energyRange = maxEnergy - minEnergy;
233 particleEnergy = (random*energyRange) + minEnergy;
235 if ((dataSet->
FindValue(particleEnergy,
id)) > randomNum)
246 #ifdef G4ANALYSIS_USE
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
G4double GetMercuryDia() const
XrayFluoMercuryPrimaryGeneratorAction(const XrayFluoMercuryDetectorConstruction *)
static constexpr double rad
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual void GeneratePrimaryVertex(G4Event *evt)
const G4String & GetParticleName() const
const XML_Char const XML_Char * data
G4double GetSunDia() const
void analysePrimaryGenerator(G4double energy)
void SetParticlePosition(G4ThreeVector aPosition)
G4double GetOpticAperture() const
G4DataVector * GetEnergies() const
~XrayFluoMercuryPrimaryGeneratorAction()
G4GLOB_DLL std::ostream G4cout
static constexpr double m
static XrayFluoAnalysisManager * getInstance()
static constexpr double cm
G4double GetOrbitInclination() const
const XrayFluoDataSet * GetGammaSet() const
void GeneratePrimaries(G4Event *)
G4DataVector * GetData() const
void SetParticleEnergy(G4double aKineticEnergy)
static G4ParticleTable * GetParticleTable()
G4double FindValue(G4double e, G4int) const
G4ParticleDefinition * GetParticleDefinition() const
G4double GetWorldSizeZ() const
G4double GetDataSum() const
static constexpr double pi
static constexpr double deg
static const G4double alpha
static constexpr double keV
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const