Project

General

Profile

N02to » History » Version 4

Krzysztof Genser, 05/14/2015 02:44 PM

1 1 Krzysztof Genser
h1. N02to
2 1 Krzysztof Genser
3 1 Krzysztof Genser
running the N02to example:
4 1 Krzysztof Genser
5 1 Krzysztof Genser
./exampleN02 run1.mac
6 1 Krzysztof Genser
7 2 Krzysztof Genser
Numerical values set in the example (excerpts from the files):
8 1 Krzysztof Genser
9 1 Krzysztof Genser
<pre>
10 1 Krzysztof Genser
N02to/run1.mac:
11 1 Krzysztof Genser
...
12 1 Krzysztof Genser
# e+ in 256 MeV the direction (1.,0.,0.)  (default kinematic)
13 1 Krzysztof Genser
# 1 event with detailled printing
14 1 Krzysztof Genser
#
15 1 Krzysztof Genser
/tracking/verbose 1
16 1 Krzysztof Genser
/N02/det/trackMaxSteps 200000
17 1 Krzysztof Genser
/N02/det/trackMaxLen   10 km
18 1 Krzysztof Genser
/run/beamOn 1
19 1 Krzysztof Genser
# 
20 1 Krzysztof Genser
# electron 25 MeV in the direction (1.,0.,0.)
21 1 Krzysztof Genser
# 1 event
22 1 Krzysztof Genser
#
23 1 Krzysztof Genser
/N02/det/trackMaxSteps 20000
24 1 Krzysztof Genser
/N02/det/trackMaxLen   1 km
25 1 Krzysztof Genser
/gun/particle e-
26 1 Krzysztof Genser
/gun/energy 25 MeV
27 1 Krzysztof Genser
/tracking/verbose 1
28 1 Krzysztof Genser
/run/beamOn 1
29 1 Krzysztof Genser
30 1 Krzysztof Genser
in the code:
31 1 Krzysztof Genser
32 1 Krzysztof Genser
N02to/src/ExN02PrimaryGeneratorAction.cc:
33 1 Krzysztof Genser
...
34 1 Krzysztof Genser
// default particle
35 1 Krzysztof Genser
36 1 Krzysztof Genser
  G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
37 1 Krzysztof Genser
  G4ParticleDefinition* particle = particleTable->FindParticle("e+");
38 1 Krzysztof Genser
  
39 1 Krzysztof Genser
  particleGun->SetParticleDefinition(particle);
40 1 Krzysztof Genser
  particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
41 1 Krzysztof Genser
  particleGun->SetParticleEnergy(256.0*MeV);
42 1 Krzysztof Genser
43 1 Krzysztof Genser
  G4double position = 0.0*cm;
44 1 Krzysztof Genser
  particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
45 1 Krzysztof Genser
46 1 Krzysztof Genser
47 1 Krzysztof Genser
N02to/src/ExN02DetectorConstruction.cc:
48 1 Krzysztof Genser
49 1 Krzysztof Genser
  fpMagField = new ExN02MagneticField(G4ThreeVector(0.,0.,1.0*tesla));
50 1 Krzysztof Genser
51 4 Krzysztof Genser
</pre>
52 1 Krzysztof Genser
53 1 Krzysztof Genser
N02to/src/ExN02DetectorMessenger.cc
54 4 Krzysztof Genser
show examples of setting some of the values mentioned above.
55 1 Krzysztof Genser
56 4 Krzysztof Genser
N02to/src/ExN02MagneticField.cc
57 4 Krzysztof Genser
defines stepper related data and provides examples on how to set some tolerances
58 4 Krzysztof Genser
59 2 Krzysztof Genser
60 2 Krzysztof Genser
Other numerical values are set/defined e.g. in:
61 2 Krzysztof Genser
62 2 Krzysztof Genser
<pre>
63 2 Krzysztof Genser
geant4/source/particles/leptons
64 2 Krzysztof Genser
65 2 Krzysztof Genser
include/G4Positron.hh
66 2 Krzysztof Genser
src/G4Positron.cc
67 2 Krzysztof Genser
include/G4Electron.hh
68 2 Krzysztof Genser
src/G4Electron.cc
69 2 Krzysztof Genser
70 2 Krzysztof Genser
#include <CLHEP/Units/PhysicalConstants.h>
71 2 Krzysztof Genser
72 2 Krzysztof Genser
CLHEP/Units/
73 2 Krzysztof Genser
74 2 Krzysztof Genser
GlobalPhysicalConstants.h
75 2 Krzysztof Genser
GlobalSystemOfUnits.h
76 2 Krzysztof Genser
PhysicalConstants.h
77 2 Krzysztof Genser
SystemOfUnits.h
78 1 Krzysztof Genser
79 1 Krzysztof Genser
</pre>
80 3 Krzysztof Genser
The above files are often used via files in:
81 3 Krzysztof Genser
<pre>
82 3 Krzysztof Genser
geant4/source/global/management/include/
83 3 Krzysztof Genser
</pre>