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
249 XrayFluoAnalysisManager* analysis = XrayFluoAnalysisManager::getInstance();
250 analysis->analysePrimaryGenerator(partEnergy/
keV);
G4double GetOrbitInclination()
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4double GetOpticAperture()
CLHEP::Hep3Vector G4ThreeVector
const XrayFluoDataSet * GetGammaSet()
XrayFluoMercuryPrimaryGeneratorAction(XrayFluoMercuryDetectorConstruction *)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
virtual void GeneratePrimaryVertex(G4Event *evt)
const G4String & GetParticleName() const
void SetParticlePosition(G4ThreeVector aPosition)
~XrayFluoMercuryPrimaryGeneratorAction()
G4GLOB_DLL std::ostream G4cout
void GeneratePrimaries(G4Event *)
void SetParticleEnergy(G4double aKineticEnergy)
static G4ParticleTable * GetParticleTable()
G4double FindValue(G4double e, G4int) const
G4ParticleDefinition * GetParticleDefinition() const
G4DataVector * GetEnergies()
const XML_Char const XML_Char * data
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const