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);