[807] | 1 | $Id: README,v 1.3 2002/07/02 18:35:01 asaim Exp $ |
---|
| 2 | ------------------------------------------------------------------- |
---|
| 3 | |
---|
| 4 | ========================================================= |
---|
| 5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
| 6 | ========================================================= |
---|
| 7 | |
---|
| 8 | ExampleN01 |
---|
| 9 | ---------- |
---|
| 10 | |
---|
| 11 | ExampleN01 is the simplest example in this novice level examples. It has |
---|
| 12 | a tracker tube and a sandwitch calorimeter made of boxes. It shoots a |
---|
| 13 | geantino (pseudo-particle which has no "real" physics interaction) per |
---|
| 14 | one event. This example demonstrates how the basic GEANT4 framework works. |
---|
| 15 | |
---|
| 16 | 1. Detector description |
---|
| 17 | |
---|
| 18 | The detector is defined in ExN01DetectorConstruction.cc. Argon gas, |
---|
| 19 | aluminum and lead are defined first, where all of them are single element |
---|
| 20 | materials. Though materials are assigned for each volume, they will not |
---|
| 21 | affect the trajectory of a geantino. |
---|
| 22 | |
---|
| 23 | The experimental hall, which is the world volume, is made of argon gas |
---|
| 24 | and it is a box. The tracker tube made of argon gas is placed at |
---|
| 25 | (-1m,0m,0m) respect to the origin of the world volume. The calorimeter |
---|
| 26 | block made of lead and it has 19 layers of aluminum plates inside. |
---|
| 27 | |
---|
| 28 | 2. Physics processes |
---|
| 29 | |
---|
| 30 | ExN01PhysicsList.cc defines only a geantino and a transportation |
---|
| 31 | process. Though cutoff will not be applied onto geantino, a dummy |
---|
| 32 | value must be set. |
---|
| 33 | |
---|
| 34 | 3. Event generation |
---|
| 35 | |
---|
| 36 | G4ParticleGun is instanciated in the constructor of |
---|
| 37 | ExN01PrimaryGeneratorAction class. At the every event, the public |
---|
| 38 | method GeneratePrimaries(G4Event*) is invoked. In this method, |
---|
| 39 | G4ParticleGun is accessed to generate a primary particle (geantino). |
---|
| 40 | Please note that the direction of the primary particle is set |
---|
| 41 | just before shooting, i.e. GeneratePrimaryVertex() method invokation. |
---|
| 42 | G4ParticleGun class itself does not have any capability of randomizing |
---|
| 43 | the energy nor the momentum of the primary particle. Therefore the user |
---|
| 44 | should implement randomizing code in the GeneratePrimaries() method. |
---|
| 45 | |
---|
| 46 | 4. main() |
---|
| 47 | |
---|
| 48 | exampleN01.cc has the main() method. In the main() method, three |
---|
| 49 | mandatory user classes described above are constructed and set to |
---|
| 50 | the G4RunManager object. Then, the "Initialize()" method of G4RunManager |
---|
| 51 | is invoked. |
---|
| 52 | Some UI commands for setting verbosity are applied via hardly coded |
---|
| 53 | "ApplyCommand()" method of G4UImanager class. |
---|
| 54 | The "BeamOn()" method triggers the event loop. The argument of this |
---|
| 55 | method is the number of event in the run. |
---|
| 56 | |
---|
| 57 | |
---|