58 lines
2.4 KiB
Plaintext
58 lines
2.4 KiB
Plaintext
$Id: README,v 1.3 2002/07/02 18:35:01 asaim Exp $
|
|
-------------------------------------------------------------------
|
|
|
|
=========================================================
|
|
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|
=========================================================
|
|
|
|
ExampleN01
|
|
----------
|
|
|
|
ExampleN01 is the simplest example in this novice level examples. It has
|
|
a tracker tube and a sandwitch calorimeter made of boxes. It shoots a
|
|
geantino (pseudo-particle which has no "real" physics interaction) per
|
|
one event. This example demonstrates how the basic GEANT4 framework works.
|
|
|
|
1. Detector description
|
|
|
|
The detector is defined in ExN01DetectorConstruction.cc. Argon gas,
|
|
aluminum and lead are defined first, where all of them are single element
|
|
materials. Though materials are assigned for each volume, they will not
|
|
affect the trajectory of a geantino.
|
|
|
|
The experimental hall, which is the world volume, is made of argon gas
|
|
and it is a box. The tracker tube made of argon gas is placed at
|
|
(-1m,0m,0m) respect to the origin of the world volume. The calorimeter
|
|
block made of lead and it has 19 layers of aluminum plates inside.
|
|
|
|
2. Physics processes
|
|
|
|
ExN01PhysicsList.cc defines only a geantino and a transportation
|
|
process. Though cutoff will not be applied onto geantino, a dummy
|
|
value must be set.
|
|
|
|
3. Event generation
|
|
|
|
G4ParticleGun is instanciated in the constructor of
|
|
ExN01PrimaryGeneratorAction class. At the every event, the public
|
|
method GeneratePrimaries(G4Event*) is invoked. In this method,
|
|
G4ParticleGun is accessed to generate a primary particle (geantino).
|
|
Please note that the direction of the primary particle is set
|
|
just before shooting, i.e. GeneratePrimaryVertex() method invokation.
|
|
G4ParticleGun class itself does not have any capability of randomizing
|
|
the energy nor the momentum of the primary particle. Therefore the user
|
|
should implement randomizing code in the GeneratePrimaries() method.
|
|
|
|
4. main()
|
|
|
|
exampleN01.cc has the main() method. In the main() method, three
|
|
mandatory user classes described above are constructed and set to
|
|
the G4RunManager object. Then, the "Initialize()" method of G4RunManager
|
|
is invoked.
|
|
Some UI commands for setting verbosity are applied via hardly coded
|
|
"ApplyCommand()" method of G4UImanager class.
|
|
The "BeamOn()" method triggers the event loop. The argument of this
|
|
method is the number of event in the run.
|
|
|
|
|