56 :globalFlag(false),spectrum(
"off")
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)
XrayFluoRunAction * runManager
XrayFluoMercuryPrimaryGeneratorMessenger * gunMessenger
CLHEP::Hep3Vector G4ThreeVector
G4double GetMercuryDia() const
std::vector< ExP01TrackerHit * > a
static XrayFluoAnalysisManager * getInstance()
static G4ParticleTable * GetParticleTable()
static constexpr double keV
const G4String & GetParticleName() const
const XrayFluoDataSet * GetGammaSet() const
G4double GetDataSum() const
void SetParticlePosition(G4ThreeVector aPosition)
XrayFluoMercuryPrimaryGeneratorAction(const XrayFluoMercuryDetectorConstruction *)
G4ParticleGun * particleGun
const XML_Char const XML_Char * data
static constexpr double m
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetOrbitInclination() const
static constexpr double deg
static const G4double alpha
G4double GetWorldSizeZ() const
static constexpr double rad
G4double GetOpticAperture() const
~XrayFluoMercuryPrimaryGeneratorAction()
G4double FindValue(G4double e, G4int) const
G4double GetParticleEnergy() const
G4double GetSunDia() const
void analysePrimaryGenerator(G4double energy)
virtual void GeneratePrimaryVertex(G4Event *evt)
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
void GeneratePrimaries(G4Event *)
void SetParticleEnergy(G4double aKineticEnergy)
static constexpr double pi
G4DataVector * GetData() const
G4DataVector * GetEnergies() const
G4ParticleDefinition * GetParticleDefinition() const
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
const XrayFluoMercuryDetectorConstruction * XrayFluoDetector