Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
+58 -38
View File
@@ -13,12 +13,23 @@ $Id$
1- GEOMETRY DEFINITION
The setup consists of a target followed by six chambers of increasing
transverse size. These chambers are located in a region called the Tracker
region. Their shape are boxes, constructed as simple boxes
transverse size at defined instances from the target. These chambers are
located in a region called the Tracker region.
Their shape are cylinders, constructed as simple cylinders
(in B2aDetectorConstruction) and as parametrised volumes
(in B2bDetectorConstruction), see also B2bChamberParameterisation class.
The default geometry is constructed in the detector construction class.
In addition, a global, uniform, and transverse magnetic field can be
applied (see B2MagneticField and B2aDetectorMessenger,
B2bDetectorMessenger classes) and set via interactive commands.
For example:
/B2/det/setField 0.2 tesla
An instance of the B2TrackerSD class is created and associated with each
logical chamber volume (in B2a) and with the one G4LogicalVolume associated
with G4PVParameterised (in B2b).
One can change the materials of the target and the chambers
interactively via the commands defined in B2aDetectorMessenger
(or B2bDetectorMessenger). For example:
@@ -26,29 +37,28 @@ $Id$
/B2/det/setTargetMaterial G4_WATER
/B2/det/setChamberMaterial G4_Ar
In addition, a transverse uniform magnetic field can be applied (see
B2MagneticField and B2aDetectorMessenger, B2bDetectorMessenger classes)
and set interactively. For example:
/B2/det/setField 0.2 tesla
2- PHYSICS LIST
The particle's type and the physic processes which will be available
in this example are set in the FTFP_BERT physics list. This physics
list requires data files for low energy electromagnetic processes which
path is defined via the G4LEDATA envirnoment variable.
in this example are set in the FTFP_BERT physics list. This physics list
requires data files for electromagnetic and hadronic processes.
See more on installation of the datasets in Geant4 Installation Guide,
Chapter 3.3: Note On Geant4 Datasets:
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch03s03.html
The following datasets: G4LEDATA, G4LEVELGAMMADATA and G4SAIDXSDATA are
mandatory for this example.
In addition, the build-in interactive command:
/process/(in)activate processName
allows the user to activate/inactivate the processes one by one.
3- PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
target perpendicular to the entrance face. The type of the particle
and its energy are set in the B2PrimaryGeneratorAction class, and can
be changed via the G4 build-in commands of the G4ParticleGun class.
The primary generator action class employs the G4ParticleGun.
The primary kinematics consists of a single particle which hits the target
perpendicular to the entrance face. The type of the particle
and its energy can be changed via the G4 built-in commands of
the G4ParticleGun class.
4- RUNS and EVENTS
@@ -59,6 +69,17 @@ $Id$
- at Begin and End of each event (class B2EventAction)
- at Begin and End of each track (class TrackingAction, not used here)
- at End of each step (class SteppingAction, not used here)
The event number is written to the log file every requested number
of events in B2EventAction::BeginOfEventAction() and
B2EventAction::EndOfEventAction().
Moreover, for the first 100 events and every 100 events thereafter
information about the number of stored trajectories in the event
is printed as well as the number of hits stored in the G4VHitsCollection.
The run number is printed at B2RunAction::BeginOfRunAction(), where the
G4RunManager is also informed how to SetRandomNumberStore for storing
initial random number seeds per run or per event.
5- USER LIMITS
@@ -108,18 +129,25 @@ $Id$
in the macro vis.mac. This macro is automatically read from
the main function when the example is used in interactive running mode.
By default, vis.mac opens an OpenGL viewer.
The user can switch to other graphics systems by commenting out this line
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
The user can change the initial viewer by commenting out this line
and instead uncommenting one of the other /vis/open statements, such as
HepRepFile or DAWNFILE (which produce files that can be viewed with the
HepRApp and DAWN viewers, respectively).
HepRApp and DAWN viewers, respectively). Note that one can always
open new viewers at any time from the command line. For example, if
you already have a view in, say, an OpenGL window with a name
"viewer-0", then
/vis/open DAWNFILE
then to get the same view
/vis/viewer/copyView viewer-0
or to get the same view *plus* scene-modifications
/vis/viewer/set/all viewer-0
then to see the result
/vis/viewer/flush
The DAWNFILE, HepRepFile drivers are always available
(since they require no external libraries), but the OGL driver requires:
1- the visualisation & interfaces categories have been compiled
with the environment variable G4VIS_BUILD_OPENGLX_DRIVER.
2- exampleB2a.cc has been compiled with G4VIS_USE_OPENGLX.
(This is best done through Configure or CMake.)
(since they require no external libraries), but the OGL driver requires
that the Geant4 libraries have been built with the OpenGL option.
For more information on visualization, including information on how to
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
@@ -133,22 +161,14 @@ $Id$
B- USER INTERFACES
The user command interface is set via the G4UIExecutive class
in the the main() function in exampleB2a.cc
in the main() function in exampleB2a.cc
The selection of the user command interface is then done automatically
according to the Geant4 configuration. The default command interface,
called G4UIterminal, is done via a standard G4cin/G4cout.
On Linux and Sun-cc one can use a smarter command interface G4UItcsh.
It is enough to set the environment variable G4UI_USE_TCSH before compiling
exampleB2a.cc (or exampleB2b.cc).
according to the Geant4 configuration or it can be done explicitly via
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
C- HOW TO RUN
- compile and link to generate an executable
% cd B2/B2a
% make
- execute exampleB2a in the 'interactive mode' with visualization
- Execute exampleB2a in the 'interactive mode' with visualization
% exampleB2a
and type in the commands from run1.mac line by line:
Idle> /tracking/verbose 1
@@ -160,7 +180,7 @@ $Id$
....
Idle> exit
- execute exampleB2a in the 'batch' mode from macro files
- Execute exampleB2a in the 'batch' mode from macro files
(without visualization)
% exampleB2a run2.mac
% exampleB2a exampleB2.in > exampleB2.out