Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/field/field04/README

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/field/field04/README (Version 11.3.0) and /examples/extended/field/field04/README (Version 9.5.p2)


  1                                                     1 
  2      =========================================      2      =========================================================
  3      Geant4 - an Object-Oriented Toolkit for S      3      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  4      =========================================      4      =========================================================
  5                                                     5 
  6                                                     6 
  7                                                     7 
  8                             field04 Example         8                             field04 Example
  9                             ---------------         9                             ---------------
 10                                                    10 
 11      This example shows how to define/use OVER <<  11      This example shows how to define/use OVERLAPPING field elements 
 12      in Geant4. Fields might be either magneti     12      in Geant4. Fields might be either magnetic, electric or both.
 13                                                    13 
 14      Credit goes to Tom Roberts and Muons Inc.     14      Credit goes to Tom Roberts and Muons Inc. since much of the code
 15      and ideas were taken at liberty from the  <<  15      and ideas were taken at liberty from the (GNU GPL) source of 
 16      G4BEAMLINE release 1.12.                      16      G4BEAMLINE release 1.12.
 17                                                    17 
 18      http://g4beamline.muonsinc.com                18      http://g4beamline.muonsinc.com
 19                                                    19 
 20 **************                                     20 **************
 21 *Classes Used*                                     21 *Classes Used*
 22 **************                                     22 **************
 23                                                    23 
 24  1 - main()                                        24  1 - main()
 25                                                    25 
 26  See field04.cc.                               <<  26         Note:
 27                                                    27 
 28         The example can be run with the follow <<  28         //  runManager->Initialize();
 29                                                    29 
 30         % field04 [-m macro ] [-p physicsList] <<  30         is commented out and must be executed with: /run/initialize
                                                   >>  31         either in a macro or on the command line. Note: One can change
                                                   >>  32         the geometry (see below) only BEFORE the initialization!
 31                                                    33 
 32         If a macro is provided with the option <<  34         Is is possible to assign the PhysicsList via an argument to
 33         otherwise the program open the interac <<  35         program submission:
 34         default initialization macro init_vis. << 
 35         to start the program without initializ << 
 36                                                    36 
 37         For example:                           <<  37         field04 -p QGSP_BERT
 38         to assign the F04PhysicsList:          << 
 39         % field04 -p QGSP_BERT                 << 
 40                                                    38 
 41         an initial random number seed with:    <<  39         and an initial random number seed with:
 42         % field04 field04.in -r 12345          << 
 43                                                    40 
 44         to start with a macro file and an init <<  41         field04 field04.in 12345
 45         % field04 -m field04.in -r 12345       <<  42 
                                                   >>  43         It is also possible to specify more than one macro file which are
                                                   >>  44         then executed in succession:
                                                   >>  45 
                                                   >>  46         field04 field04.in field04.in 12345
                                                   >>  47 
                                                   >>  48         (Note, in this case the initial random # must also be provided)
                                                   >>  49 
                                                   >>  50         (1) argc holds the number of arguments on the command line. Since
                                                   >>  51             this MUST include at least the program name, argc value is >= 1!
                                                   >>  52         (2) argv[0] is always the name of the program
                                                   >>  53             argv[1] points to the first argument, and so on ...
                                                   >>  54         (3) argv[argc-1] is assumed to be the intial random # seed
                                                   >>  55         (4) the loop over macro files goes from optind = 1 to (argc-1)
 46                                                    56 
 47                                                    57 
 48  2- GEOMETRY DEFINITION                            58  2- GEOMETRY DEFINITION
 49                                                    59 
 50         The geometry consists of two solenoida     60         The geometry consists of two solenoidal magnets: a "CaptureMgnt"
 51         followed by a (blue-colored "TransferM <<  61         followed by a (bloe-colored "TransferMgnt". By definition, the
 52         axis and center of the "CaptureMgnt" c     62         axis and center of the "CaptureMgnt" coincide with the "World". The
 53         position of the "TransferMgnt" relativ     63         position of the "TransferMgnt" relative to the downstream end of the
 54         "CaptureMgnt", as well as its axis ang     64         "CaptureMgnt", as well as its axis angle, both may vary. A cylindrical
 55         "Target" is positioned inside the "Cap     65         "Target" is positioned inside the "CaptureMgnt". Its axis can vary
 56         from 0 to 180 deg, and hence also the      66         from 0 to 180 deg, and hence also the direction of the incoming
 57         proton beam wrt the "CaptureMgnt"'s ax     67         proton beam wrt the "CaptureMgnt"'s axis. A "Degrader" is located
 58         inside the "TransferMgnt", its default     68         inside the "TransferMgnt", its default position being at the
 59         upstream end of the "TransferMgnt". Fi     69         upstream end of the "TransferMgnt". Finally, also a "TestPlane" is
 60         located inside the "TransferMgnt", by      70         located inside the "TransferMgnt", by default at its downstream end.
 61                                                    71 
 62                                                    72 
 63         The "World" consists of a solid cylind     73         The "World" consists of a solid cylinder made of a given material.
 64           (It is the responsibility of the use     74           (It is the responsibility of the user to make the world
 65            large enough to contain the rest of     75            large enough to contain the rest of the geometry!)
 66                                                    76 
 67         Three parameters define the world :        77         Three parameters define the world :
 68         - the material of the world,               78         - the material of the world,
 69         - the world radius,                        79         - the world radius,
 70         - the world length.                        80         - the world length.
 71                                                    81 
 72         Example (default values):                  82         Example (default values):
 73         /field04/SetWorldMat G4_AIR                83         /field04/SetWorldMat G4_AIR
 74         /field04/SetWorldR  5.0 m                  84         /field04/SetWorldR  5.0 m
 75         /field04/SetWorldZ 50.0 m                  85         /field04/SetWorldZ 50.0 m
 76                                                    86 
 77                                                    87 
 78         The "Target" is a solid cylinder made      88         The "Target" is a solid cylinder made of a given material.
 79                                                    89 
 80         Five parameters define the target:         90         Five parameters define the target:
 81         - the material of the target,              91         - the material of the target,
 82         - the target radius,                       92         - the target radius,
 83         - the target thickness,                    93         - the target thickness,
 84         - the target position inside the "Capt     94         - the target position inside the "CaptureMgnt",
 85         - the target axis angle relative to th     95         - the target axis angle relative to that of the "CaptureMgnt".
 86                                                    96 
 87         Example (default values):                  97         Example (default values):
 88         /field04/SetTgtMat G4_W                    98         /field04/SetTgtMat G4_W
 89         /field04/SetTgtRad    0.4 cm               99         /field04/SetTgtRad    0.4 cm
 90         /field04/SetTgtThick 16.0 cm              100         /field04/SetTgtThick 16.0 cm
 91         /field04/SetTgtPos 0.0 cm                 101         /field04/SetTgtPos 0.0 cm
 92         /field04/SetTgtAng 170                    102         /field04/SetTgtAng 170
 93                                                   103 
 94                                                   104 
 95         The "Degrader" is a solid cylinder  ma    105         The "Degrader" is a solid cylinder  made of a given material.
 96                                                   106 
 97         Four parameters define the degrader:      107         Four parameters define the degrader:
 98         - the material of the degrader,           108         - the material of the degrader,
 99         - the degrader radius,                    109         - the degrader radius,
100         - the degrader thickness,                 110         - the degrader thickness,
101         - the degrader position relative to th    111         - the degrader position relative to the "TransferMgnt" center.
102                                                   112 
103         Example (default values):                 113         Example (default values):
104         /field04/SetDgrMat G4_Pb                  114         /field04/SetDgrMat G4_Pb
105         /field04/SetDgrRad  30.0 cm               115         /field04/SetDgrRad  30.0 cm
106         /field04/SetDgrThick 0.1 cm               116         /field04/SetDgrThick 0.1 cm
107         #/field04/SetDgrPos -7.4 m                117         #/field04/SetDgrPos -7.4 m
108                                                   118 
109                                                   119 
110         The "CaptureMgnt" is a solenoid (vacuu    120         The "CaptureMgnt" is a solenoid (vacuum cylinder). It is either
111         a two-sided or a one-sided magnetic bo    121         a two-sided or a one-sided magnetic bottle with the B field
112         varying linearly from the center value    122         varying linearly from the center value B1 to the edge value B2.
113         The one-sided F04FocusSolenoid has the << 123         The one-sided 'FocusSolenoid' has the open end at +z and focuses
114         on the z < 0 side.                        124         on the z < 0 side.
115                                                   125 
116         Four parameters define the "CaptureMgn    126         Four parameters define the "CaptureMgnt":
117         - the magnet radius,                      127         - the magnet radius,
118         - the magnet length,                      128         - the magnet length,
119         - the weaker magnetic field at the cen    129         - the weaker magnetic field at the center B1
120         - the stronger magnetic field at the e    130         - the stronger magnetic field at the edge B2
121                                                   131 
122         Example (default values):                 132         Example (default values):
123         /field04/SetCaptureR 0.6 m             << 133         /field04/SetCaptureR 0.6 m 
124         /field04/SetCaptureZ 4.0 m                134         /field04/SetCaptureZ 4.0 m
125         /field/SetCaptureB1 2.5 tesla          << 135         /field04/SetCaptureB1 2.5 tesla 
126         /field/SetCaptureB2 5.0 tesla          << 136         /field04/SetCaptureB2 5.0 tesla
127                                                   137 
128                                                   138 
129         The "TransferMgnt" is a solenoid (vacu << 139         The "TransferMgnt" is a solenoid (vacuum cylinder) with a 
130         constant B-field. When the "TransferMg    140         constant B-field. When the "TransferMgnt" follows immediately
131         the "CaptureMgnt", its relative positi    141         the "CaptureMgnt", its relative position is at 0 cm.
132                                                   142 
133         Four parameters define the "TransferMg    143         Four parameters define the "TransferMgnt":
134         - the magnet radius,                      144         - the magnet radius,
135         - the magnet length,                      145         - the magnet length,
136         - the magnet field,                       146         - the magnet field,
137         - the magnet relative position            147         - the magnet relative position
138           (its upstream face wrt the downstrea    148           (its upstream face wrt the downstream face of the "CaptureMgnt".)
139                                                   149 
140         Example (default values):                 150         Example (default values):
141         /field04/SetTransferR  0.3 m              151         /field04/SetTransferR  0.3 m
142         /field04/SetTransferZ 15.0 m              152         /field04/SetTransferZ 15.0 m
143         /field/SetTransferB 5.0 tesla          << 153         /field04/SetTransferB 5.0 tesla
144         /field04/SetTransferP 0.0 m               154         /field04/SetTransferP 0.0 m
145                                                   155 
146         The default geometry is constructed in << 156         The default geometry is constructed in DetectorConstruction class,
147         but all the parameters can be changed  << 157         but all the parameters can be changed via the commands defined in 
148         the F04DetectorMessenger class.        << 158         the DetectorMessenger class.
149                                                   159 
150                                                   160 
151  3- MATERIAL DEFINITION                           161  3- MATERIAL DEFINITION
152                                                   162 
153         Material definitions are done through  << 163         Material definitions are done through the singleton class Materials
154         which keeps a pointer to the G4NistMan    164         which keeps a pointer to the G4NistManager. It has a method
155         GetMaterial by name (G4String) which i    165         GetMaterial by name (G4String) which in turn invokes the
156         G4NistManager::FindOrBuildMaterial, an    166         G4NistManager::FindOrBuildMaterial, and/or G4Material::GetMaterial
157         methods. It has also a method CreateMa    167         methods. It has also a method CreateMaterials which, for materials
158         absent from the NIST data base, shows     168         absent from the NIST data base, shows how to create them using the
159         G4NistManager::ConstructNewMaterial me    169         G4NistManager::ConstructNewMaterial method.
160                                                   170 
161                                                   171 
162  4- AN EVENT: THE PRIMARY GENERATOR               172  4- AN EVENT: THE PRIMARY GENERATOR
163                                                   173 
164         The primary kinematic consists of a si    174         The primary kinematic consists of a single particle which hits the
165         target perpendicular to its upstream f    175         target perpendicular to its upstream face. The type of the particle
166         and its energy are set in the F04Prima << 176         and its energy are set in the PrimaryGeneratorAction class, and can
167         be changed via the G4 build-in command << 177         be changed via the G4 build-in commands of the ParticleGun class.
168         In addition, there is a fRndmFlag, whi << 178         In addition, there is a rndmFlag, which once set allows the beam to
169         explore randomly the whole cross secti    179         explore randomly the whole cross section of the target. The default
170         beam consists of 500 MeV protons, star    180         beam consists of 500 MeV protons, starting at the upstream face of
171         the target, directed along dx = dy = 0    181         the target, directed along dx = dy = 0, dz = 1 wrt the target frame.
172         The default direction should NOT be ch    182         The default direction should NOT be changed! The arguments of the
173         x/y/zvertex commands are relative to t    183         x/y/zvertex commands are relative to the target center.
174                                                   184 
175         Example:                                  185         Example:
176         /gun/random on                            186         /gun/random on
177         #/gun/xvertex 0 mm                        187         #/gun/xvertex 0 mm
178         #/gun/yvertex 0 mm                        188         #/gun/yvertex 0 mm
179         #/gun/zvertex -100 mm                     189         #/gun/zvertex -100 mm
180                                                   190 
181                                                   191 
182  5- DETECTOR RESPONSE                             192  5- DETECTOR RESPONSE
183                                                   193 
184         Information is extracted from the prog << 194         Information is extracted from the program via SteppingAction
185         at the TestPlane.                         195         at the TestPlane.
186                                                   196 
187                                                   197 
188  6- PHYSICS                                    << 198  6- PHYSICS 
                                                   >> 199 
                                                   >> 200         The PhysicsList is adopted from examples/extended/hadronic/Hadr01.
                                                   >> 201         It uses components which are distributed with Geant4 in
                                                   >> 202         /geant4/physics_lists subdirectory. So, before compiling field04
                                                   >> 203         it is necessary to compile physics_lists.
                                                   >> 204 
                                                   >> 205         There are two std::vector<G4VPhysicsConstructor*> PhysicsListVectors;
                                                   >> 206         one for EM- and one for HadronPHysics and a user defined process
                                                   >> 207         "StepMax".
                                                   >> 208 
                                                   >> 209         The choice of the physics is provided by the UI command:
                                                   >> 210 
                                                   >> 211         /exp/phys/addPhysics emstandard_opt1
                                                   >> 212         /exp/phys/addPhysics QGSP_BERT
                                                   >> 213 
                                                   >> 214         To see the list of available configurations one can use:
                                                   >> 215 
                                                   >> 216         /exp/phys/list
                                                   >> 217 
                                                   >> 218         The command:
                                                   >> 219 
                                                   >> 220         /exp/phys/addPhysics PHYSLIST
                                                   >> 221 
                                                   >> 222         allows to download a physics configuration defined by an
                                                   >> 223         environment variable PHYSLIST.
                                                   >> 224 
                                                   >> 225         The cuts for electromagnetic phsyics can be established via:
                                                   >> 226 
                                                   >> 227         /exp/phys/allCuts       1 mm
                                                   >> 228         /exp/phys/gammaCut    0.1 mm
                                                   >> 229         /exp/phys/electronCut 0.2 mm
                                                   >> 230         /exp/phys/positronCut 0.3 mm
                                                   >> 231 
                                                   >> 232         The cut for the StepMax process via:
                                                   >> 233 
                                                   >> 234         /exp/phys/stepMax
189                                                   235 
190         The F04PhysicsList extends a selected  << 236         The two PhysicsListVectors can be cleared via:
191         The base physics list name is provided << 
192         constructor.                           << 
193                                                << 
194         In addition to processes defined in th << 
195         there is added the F04StepMax process  << 
196         via dedicated commands in F04PhysicsLi << 
197                                                   237 
198         The command to define maximum step:    << 238         /exp/phys/clearEMPhysics
199         /exp/phys/stepMax value unit           << 239         /exp/phys/clearHadronPhysics
                                                   >> 240 
                                                   >> 241         and individual processes can be removed from the vectors via,
                                                   >> 242         for example:
                                                   >> 243 
                                                   >> 244         /exp/phys/removeEMPhysics msc
                                                   >> 245         /exp/phys/removeHadronPhysics gamma_nuc
                                                   >> 246 
                                                   >> 247         Furthermore, the following commands are also available, but
                                                   >> 248         may only be used AFTER /run/initialize
                                                   >> 249 
                                                   >> 250         /process/inactivate msc
                                                   >> 251         /process/activate msc
200                                                   252 
201         The decay of pions can be assigned via    253         The decay of pions can be assigned via (pi -> e nu, pi -> mu nu):
202                                                   254 
203         /decay/pienu                              255         /decay/pienu
204         /decay/pimunu                             256         /decay/pimunu
205                                                   257 
206         The pienu assignment includes a small     258         The pienu assignment includes a small fraction of radiative decay:
207         e nu gamma (G4PionRadiativeDecayChanne    259         e nu gamma (G4PionRadiativeDecayChannel).
208                                                   260 
209         The standard/default muon decay chain     261         The standard/default muon decay chain is modified to be 98.6%
210         G4MuonDecayChannelWithSpin and 1.4% G4    262         G4MuonDecayChannelWithSpin and 1.4% G4MuonRadiativeDecayChannelWithSpin
211         in ConstructParticle().                   263         in ConstructParticle().
212                                                   264 
213         The pion decay process G4PolDecay inhe    265         The pion decay process G4PolDecay inherits from G4Decay and implements
214         the virtual method - empty in the base    266         the virtual method - empty in the base class - DaughterPolarization
215                                                   267 
216         The muon decay process is G4DecayWithS    268         The muon decay process is G4DecayWithSpin
217                                                   269 
218         Furthermore, the following commands ar << 
219         may only be used AFTER /run/initialize << 
220                                                << 
221         /process/inactivate msc                << 
222         /process/activate msc                  << 
223                                                   270 
224  7- Overlapping Fields                            271  7- Overlapping Fields
225                                                   272 
226         The F04GlobalField (a singleton) is in << 273         The GlobalField (a singleton) is instantiated in DetectorConstruction()
227         F04DetectorConstruction() and assigned << 274         and assigned to the global field manager in updateField():
228         in UpdateField():                      << 
229                                                   275 
230         fFieldManager = GetGlobalFieldManager(    276         fFieldManager = GetGlobalFieldManager();
231         fFieldManager->SetDetectorField(this);    277         fFieldManager->SetDetectorField(this);
232                                                   278 
233         The F04GlobalField has a std::vector<E << 279         The GlobalField has a std::vector<ElementField*> FieldList
234                                                   280 
235         The field from each individual beamlin    281         The field from each individual beamline element is given by a
236         F04ElementField object. Any number of  << 282         ElementField object. Any number of overlapping ElementField
237         objects can be added to the F04GlobalF << 283         objects can be added to the global field. Any element that
238         represents an element with an EM field    284         represents an element with an EM field must add the appropriate
239         F04ElementField to the global F04Globa << 285         ElementField to the global GlobalField object.
240                                                   286 
241         Of course, the F04GlobalField has the  << 287         Of course, the GlobalField has the method GetFieldValue implemented.
242                                                   288 
243         Before /run/initialize in the macro fi    289         Before /run/initialize in the macro file or command, the update
244         field command must have been issued if    290         field command must have been issued if any of the other following
245         field commands was employed:              291         field commands was employed:
246                                                   292 
247         /field/update                             293         /field/update
248                                                   294 
249         Other options are:                        295         Other options are:
250                                                   296 
251         /field/setStepperType 4                   297         /field/setStepperType 4
252         /field/setMinStep 10 mm                   298         /field/setMinStep 10 mm
253         /field/setDeltaChord 3.0 mm               299         /field/setDeltaChord 3.0 mm
254         /field/setDeltaOneStep 0.01 mm            300         /field/setDeltaOneStep 0.01 mm
255         /field/setDeltaIntersection 0.1 mm        301         /field/setDeltaIntersection 0.1 mm
256         /field/setEpsMin 2.5e-7 mm                302         /field/setEpsMin 2.5e-7 mm
257         /field/setEpsMax 0.05 mm                  303         /field/setEpsMax 0.05 mm
258                                                << 304         
259         Each field element has a rectilinear b    305         Each field element has a rectilinear bounding box in global
260         coordinate space which is checked befo    306         coordinate space which is checked before a point is verified to
261         actually be inside the F04ElementField << 307         actually be inside the ElementField (isWithin and isOutside).
262         SetGlobalPoint is called 8 times for t << 308         setGlobalPoint is called 8 times for the corners of the local
263         bounding box, after a local->global co    309         bounding box, after a local->global coordinate transform.
264                                                   310 
265         The F04ElementField is the interface c << 311         The ElementField is the interface class used by GlobalField to 
266         compute the field value at a given poi    312         compute the field value at a given point[].
267                                                   313 
268         A beamline element, for example the F0 << 314         A beamline element, for example the SimpleSolenoid, will derive
269         from F04ElementField and implement the << 315         from ElementField and implement the computation for the element.
270                                                   316 
271         simpleSolenoid                         << 317         simpleSolenoid = new SimpleSolenoid(B, l,
272           = new F04SimpleSolenoid(B, l, logicT << 318                                       logicTransferMgnt,TransferMgntCenter);
273                                                   319 
274         Besides the magnetic field and the len    320         Besides the magnetic field and the length of the simple solenoid,
275         the constructor needs the knowledge of    321         the constructor needs the knowledge of the G4LogicalVolume for
276         the beamline element and where its cen    322         the beamline element and where its center is located in the
277         'World'.                                  323         'World'.
278                                                   324 
279         The F04ElementField has a G4AffineTran << 325         The ElementField has a G4AffineTransform "global2local" which
280         allows the quick computation of coordi    326         allows the quick computation of coordinate transformations. It can
281         only be determined by knowing the elem    327         only be determined by knowing the element's coordinate origin in
282         the global frame and after all of the     328         the global frame and after all of the geometry has been defined.
283         For this reason, the object is prepare    329         For this reason, the object is prepared in two stages, through the
284         constructor providing it with the coor    330         constructor providing it with the coordinate center and a pointer
285         to the G4LogicalVolume. Later the Cons << 331         to the G4LogicalVolume. Later the construct() method is called to
286         calculate the fGlobal2local and the bo << 332         calculate the global2local and the bounding box. This can be done
287         from the F04RunAction::BeginOfRunActio << 333         from the RunAction::BeginOfRunAction method, for only then are we
288         certain that the geometry has been com    334         certain that the geometry has been completely built:
289                                                   335 
290         FieldList* fields = F04GlobalField::Ge << 336         FieldList* fields = GlobalField::getObject()->getFields();
291                                                   337 
292         if (fields) {                             338         if (fields) {
293            if (fields->size()>0) {                339            if (fields->size()>0) {
294               FieldList::iterator i;              340               FieldList::iterator i;
295               for (i=fields->begin(); i!=field << 341               for (i=fields->begin(); i!=fields->end(); ++i)(*i)->construct();
296            }                                      342            }
297         }                                         343         }
298                                                   344 
299         The F04ElementField constructor will a << 345         The ElementField constructor will also add the derived object into
300         F04GlobalField. Finally, its AddFieldV << 346         GlobalField. Finally, its addFieldValue() will add the field value
301         for this element to field[].           << 347         for this element to field[]. 
302                                                   348 
303                                                   349 
304  8- User Action Classes                           350  8- User Action Classes
305                                                   351 
306         F04RunActionMessenger:                 << 352         RunActionMessenger:
307                                                   353 
308                      /rndm/save freq - to save    354                      /rndm/save freq - to save rndm status in external files
309                                  0 not saved      355                                  0 not saved
310                                 >0 saved on: b    356                                 >0 saved on: beginOfRun.rndm
311                                  1 saved on:      357                                  1 saved on:   endOfRun.rndm
312                                  2 saved on: e    358                                  2 saved on: endOfEvent.rndm
313                      /rndm/read random/run0evt    359                      /rndm/read random/run0evt8268.rndm
314                                                   360 
315         F04RunAction:                          << 361         RunAction:  
316                      BeginOfRunAction: Deal wi    362                      BeginOfRunAction: Deal with random number storage,
317                      initialization etc. Call  << 363                      initialization etc. Call the construct() method of
318                      F04ElementFields in the F << 364                      ElementFields in the FieldList of GlobalField object.
319                      EndOfRunAction: random nu    365                      EndOfRunAction: random number storage/status printing.
320                                                   366 
321         F04EventActionMessenger:               << 367         EventActionMessenger:
322                      /event/setverbose            368                      /event/setverbose
                                                   >> 369                      /event/drawTracks none/charged/all
                                                   >> 370                      /event/printModulo
323                                                   371 
324         F04EventAction(RunAction* RA):         << 372         EventAction(RunAction* RA):
325                      Customized BeginOfEvent p << 373                      Customized BeginOfEvent printing (frequency: printModulo)
326                      EndofEvent:               << 374                      EndofEvent: condition depending drawing of trajectories,
327                      saveEngingStatus and show    375                      saveEngingStatus and showEngineStatus according to flag
328                      in F04RunAction           << 376                      in RunAction
329                                                   377 
330         F04TrackingAction:                     << 378         TrackingAction:
331                      PreUserTrackingAction: In << 379                      PreUserTrackingAction: Instantiate UserTrackInformation
332                      and set the application T    380                      and set the application TrackStatus.
333                      PostUserTrackingAction: R << 381                      PostUserTrackingAction: Retreive UserTrackInformation
334                      and decide to save random    382                      and decide to save random number status accordingly.
335                                                   383 
336         F04SteppingActionMessenger:            << 384         SteppingActionMessenger:
337                                                   385 
338         F04SteppingAction:                     << 386         SteppingAction:
339                      UserSteppingAction: Kill     387                      UserSteppingAction: Kill primary if/when outside Target
340                      volume. Diagnostic/histog    388                      volume. Diagnostic/histogram filling for particles at a
341                      TestPlane. Find decay pos    389                      TestPlane. Find decay position and when particle
342                      FIRST reverses z-momentum    390                      FIRST reverses z-momentum component via using a
343                      F04UserTrackInformation o << 391                      UserTrackInformation object.
344                                                   392 
345         F04StackingAction:                     << 393         StackingAction:
346                      Track only primaries, pi+    394                      Track only primaries, pi+ or mu+
347                                                   395 
348         F04UserTrackInformation:               << 396         UserTrackInformation:
349                      Keep an application F04Tr << 397                      Keep a application TrackStatus for the track:
350                           undefined, left, rig    398                           undefined, left, right, reverse
351                                                   399 
352         F04SteppingVerbose:                    << 400         SteppingVerbose:
353                     Only print track header an    401                     Only print track header and step information for
354                     pi+ and mu+.               << 402                     pi+ and mu+
355                     Note: the information for  << 
356                                                   403 
357         F04Trajectory, TrajectoryPoint:        << 404         Trajectory, TrajectoryPoint:
358                     Example of application spe    405                     Example of application specific implementations
359                                                   406 
360  9- HOW TO START ?                                407  9- HOW TO START ?
361                                                   408 
362         - Execute field04 in 'batch' mode from << 409         - compile and link to generate an executable
363                 % field04 -m field04.in        << 410                 % cd $G4INSTALL/example/extended/field/field04
                                                   >> 411                 % gmake
364                                                   412 
365         - Execute field04 in 'interactive' mod << 413         - execute field04 in 'batch' mode from macro files e.g.
366                 % field04                      << 414                 % $(G4INSTALL)/bin/$(G4SYSTEM)/field04 field04.in
367                 ....                           << 
368                 Idle> type your commands       << 
369                 ....                           << 
370                                                   415 
371         - Execute field04 in 'interactive' mod << 416         - execute field04 in 'interactive' mode with visualization e.g.
372                 % field04 -s preinit           << 417                 % $(G4INSTALL)/bin/$(G4SYSTEM)/field04
373                 ....                              418                 ....
374                 Idle> type your commands, then << 419                 Idle> type your commands, for example:
375                 Idle> /run/initialize          << 420                 Idle> control/execute field04.in
376                 Idle> /control/execute vis.mac << 
377                 ....                              421                 ....