Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
B3PrimaryGeneratorAction::B3PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
fParticleGun(nullptr)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
@@ -55,7 +55,7 @@ B3PrimaryGeneratorAction::B3PrimaryGeneratorAction()
|
||||
= particleTable->FindParticle("chargedgeantino");
|
||||
fParticleGun->SetParticleDefinition(particle);
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,0.));
|
||||
fParticleGun->SetParticleEnergy(1*eV);
|
||||
fParticleGun->SetParticleEnergy(1*eV);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
|
||||
}
|
||||
|
||||
@@ -72,11 +72,11 @@ void B3PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
G4ParticleDefinition* particle = fParticleGun->GetParticleDefinition();
|
||||
if (particle == G4ChargedGeantino::ChargedGeantino()) {
|
||||
//fluorine
|
||||
//fluorine
|
||||
G4int Z = 9, A = 18;
|
||||
G4double ionCharge = 0.*eplus;
|
||||
G4double excitEnergy = 0.*keV;
|
||||
|
||||
|
||||
G4ParticleDefinition* ion
|
||||
= G4IonTable::GetIonTable()->GetIon(Z,A,excitEnergy);
|
||||
fParticleGun->SetParticleDefinition(ion);
|
||||
@@ -86,14 +86,14 @@ void B3PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// randomized position
|
||||
//
|
||||
///G4double x0 = 0*cm, y0 = 0*cm, z0 = 0*cm;
|
||||
///G4double dx0 = 0*cm, dy0 = 0*cm, dz0 = 0*cm;
|
||||
///G4double dx0 = 0*cm, dy0 = 0*cm, dz0 = 0*cm;
|
||||
G4double x0 = 4*cm, y0 = 4*cm, z0 = 4*cm;
|
||||
G4double dx0 = 1*cm, dy0 = 1*cm, dz0 = 1*cm;
|
||||
G4double dx0 = 1*cm, dy0 = 1*cm, dz0 = 1*cm;
|
||||
x0 += dx0*(G4UniformRand()-0.5);
|
||||
y0 += dy0*(G4UniformRand()-0.5);
|
||||
z0 += dz0*(G4UniformRand()-0.5);
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
|
||||
|
||||
|
||||
//create vertex
|
||||
//
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
Reference in New Issue
Block a user