58 :rndmFlag(
"off"),beam(
"off"),spectrum(
"off"),isoVert(
"off"),phaseSpaceGunFlag(false),
59 rayleighFlag(true), detectorPosition(0)
62 XrayFluoDetector = XrayFluoDC;
80 G4cout <<
"XrayFluoPrimaryGeneratorAction created" <<
G4endl;
89 phaseSpaceGunFlag =
true;
97 detectorPosition.
setR(detectorPosition.
r()-(5.*
cm));
105 rayleighFlag =
value;
140 if (rndmFlag ==
"on")
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);
239 if (phaseSpaceGunFlag){
246 const std::pair<G4double,G4String> kine =
XrayFluoPrimaryGeneratorAction(const XrayFluoDetectorConstruction *)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static constexpr double mm
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetDetectorPosition() const
G4double GetSampleSizeXY() const
const std::pair< G4double, G4String > GetEmittedParticleEnergyAndType()
static constexpr double rad
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual void GeneratePrimaryVertex(G4Event *evt)
const G4String & GetParticleName() const
void LoadGunData(G4String, G4bool)
const XML_Char const XML_Char * data
void analysePrimaryGenerator(G4double energy)
void SetParticlePosition(G4ThreeVector aPosition)
G4DataVector * GetEnergies() const
G4GLOB_DLL std::ostream G4cout
static constexpr double m
const XML_Char int const XML_Char * value
static XrayFluoAnalysisManager * getInstance()
static G4MTRunManager * GetMasterRunManager()
static constexpr double cm
const XrayFluoDataSet * GetGammaSet() const
void SetRayleighFlag(G4bool)
G4DataVector * GetData() const
void GeneratePrimaries(G4Event *)
void SetParticleEnergy(G4double aKineticEnergy)
~XrayFluoPrimaryGeneratorAction()
static G4RunManager * GetRunManager()
static G4ParticleTable * GetParticleTable()
G4double energy(const ThreeVector &p, const G4double m)
G4double FindValue(G4double e, G4int) const
G4ParticleDefinition * GetParticleDefinition() const
G4double GetDataSum() const
static constexpr double pi
const G4UserRunAction * GetUserRunAction() const
void ActivatePhaseSpace(G4String)
G4double GetWorldSizeZ() const
static constexpr double keV
G4double GetDia3SizeXY() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const
static G4Gamma * Definition()