58 :rndmFlag(
"off"),beam(
"off"),spectrum(
"off"),isoVert(
"off"),phaseSpaceGunFlag(false),
59 rayleighFlag(true), detectorPosition(0)
80 G4cout <<
"XrayFluoPrimaryGeneratorAction created" <<
G4endl;
165 if(particle ==
"proton"|| particle ==
"alpha")
174 while (partSum<random)
176 partSum += (*data)[j];
183 else if (particle ==
"gamma")
192 G4double energyRange = maxEnergy - minEnergy;
200 particleEnergy = (random*energyRange) + minEnergy;
202 if ((dataSet->
FindValue(particleEnergy,
id)) > randomNum)
221 G4double x = rho*std::sin(theta)*std::sin(phi);
222 G4double y = rho*std::sin(theta)*std::cos(phi);
246 const std::pair<G4double,G4String> kine =
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4double GetSampleSizeXY() const
static G4MTRunManager * GetMasterRunManager()
static G4RunManager * GetRunManager()
static G4Gamma * Definition()
const G4UserRunAction * GetUserRunAction() const
CLHEP::Hep3Vector G4ThreeVector
static XrayFluoAnalysisManager * getInstance()
static G4ParticleTable * GetParticleTable()
static constexpr double keV
static constexpr double mm
void LoadGunData(G4String, G4bool)
const G4String & GetParticleName() const
const XrayFluoDataSet * GetGammaSet() const
G4double GetDataSum() const
XrayFluoPrimaryGeneratorAction(const XrayFluoDetectorConstruction *)
~XrayFluoPrimaryGeneratorAction()
void SetParticlePosition(G4ThreeVector aPosition)
const XML_Char const XML_Char * data
static constexpr double m
G4double GetWorldSizeZ() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
const XML_Char int const XML_Char * value
G4ParticleGun * particleGun
static constexpr double rad
G4ThreeVector detectorPosition
void ActivatePhaseSpace(G4String)
void GeneratePrimaries(G4Event *)
G4ThreeVector GetDetectorPosition() const
G4double FindValue(G4double e, G4int) const
G4double GetParticleEnergy() const
const XrayFluoRunAction * runAction
void analysePrimaryGenerator(G4double energy)
virtual void GeneratePrimaryVertex(G4Event *evt)
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
XrayFluoPrimaryGeneratorMessenger * gunMessenger
void SetParticleEnergy(G4double aKineticEnergy)
static constexpr double pi
G4DataVector * GetData() const
G4DataVector * GetEnergies() const
G4ParticleDefinition * GetParticleDefinition() const
void SetRayleighFlag(G4bool)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
G4double GetDia3SizeXY() const
const XrayFluoDetectorConstruction * XrayFluoDetector
const std::pair< G4double, G4String > GetEmittedParticleEnergyAndType()