Project

General

Profile

N02to » History » Version 1

Version 1/4 - Next » - Current version
Krzysztof Genser, 05/13/2015 10:52 AM


N02to

running the N02to example:

./exampleN02 run1.mac

numerical values set in the example (excerpts from the files):

N02to/run1.mac:
...
# e+ in 256 MeV the direction (1.,0.,0.)  (default kinematic)
# 1 event with detailled printing
#
/tracking/verbose 1
/N02/det/trackMaxSteps 200000
/N02/det/trackMaxLen   10 km
/run/beamOn 1
# 
# electron 25 MeV in the direction (1.,0.,0.)
# 1 event
#
/N02/det/trackMaxSteps 20000
/N02/det/trackMaxLen   1 km
/gun/particle e-
/gun/energy 25 MeV
/tracking/verbose 1
/run/beamOn 1

in the code:

N02to/src/ExN02PrimaryGeneratorAction.cc:
...
// default particle

  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
  G4ParticleDefinition* particle = particleTable->FindParticle("e+");

  particleGun->SetParticleDefinition(particle);
  particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
  particleGun->SetParticleEnergy(256.0*MeV);

  G4double position = 0.0*cm;
  particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));

N02to/src/ExN02DetectorConstruction.cc:

  fpMagField = new ExN02MagneticField(G4ThreeVector(0.,0.,1.0*tesla));

N02to/src/ExN02DetectorMessenger.cc
show examples of setting some of the values