62 SetDefaultPrimaryParticle();
72 void IORTPrimaryGeneratorAction::SetDefaultPrimaryParticle()
81 particleGun -> SetParticleDefinition(particle);
86 G4double defaultMeanKineticEnergy = 10.0 *CLHEP::MeV;
87 meanKineticEnergy = defaultMeanKineticEnergy;
89 G4double defaultsigmaEnergy = 100.0 *CLHEP::keV;
90 sigmaEnergy = defaultsigmaEnergy;
92 #ifdef G4ANALYSIS_USE_ROOT
101 G4double defaultX0 = -862.817 *CLHEP::mm;
104 G4double defaultY0 = 0.0 *CLHEP::mm;
107 G4double defaultZ0 = 0.0 *CLHEP::mm;
110 G4double defaultsigmaY = 1. *CLHEP::mm;
111 sigmaY = defaultsigmaY;
113 G4double defaultsigmaZ = 1. *CLHEP::mm;
114 sigmaZ = defaultsigmaZ;
127 G4double defaultTheta = 6.0 *CLHEP::deg;
128 Theta = defaultTheta;
134 #ifdef G4ANALYSIS_USE_ROOT
152 y += G4RandGauss::shoot( Y0, sigmaY );
157 z += G4RandGauss::shoot( Z0, sigmaZ );
160 particleGun -> SetParticlePosition(
G4ThreeVector( x , y , z ) );
166 G4double kineticEnergy = G4RandGauss::shoot( meanKineticEnergy, sigmaEnergy );
167 particleGun -> SetParticleEnergy ( kineticEnergy );
206 condizione = std::sqrt(Mx*Mx + My*My + Mz*Mz);
209 if (condizione < 1) {
215 if (Mx > std::cos(Theta)) {
222 particleGun -> SetParticleMomentumDirection(
G4ThreeVector(Mx,My,Mz) );
226 particleGun -> GeneratePrimaryVertex( anEvent );
231 meanKineticEnergy = val;
232 #ifdef G4ANALYSIS_USE_ROOT
242 #ifdef G4ANALYSIS_USE_ROOT
276 {
return meanKineticEnergy;}