Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
+115 -31
View File
@@ -1,4 +1,4 @@
//$Id$
//$Id: .README 78001 2013-12-02 08:24:53Z gcosmo $
///\file "B4/.README"
///\brief Example B4 README page
@@ -12,6 +12,10 @@
\section B4_s1 GEOMETRY DEFINITION
The geometry is constructed in B4DetectorConstruction class
(see also
\link B4cDetectorConstruction B4c \endlink,
\link B4dDetectorConstruction B4d \endlink variants).
The calorimeter is a box made of a given number of layers. A layer
consists of an absorber plate and of a detection gap. The layer is
replicated.
@@ -22,14 +26,18 @@
- the number of layers, and
- the transverse size of the calorimeter (the entrance face is a square).
In addition a transverse uniform magnetic field can be applied and set
via the interactive command defined using the G4GenericMessenger class.
In addition, a global, uniform, and transverse magnetic field can be
applied using G4GlobalMagFieldMessenger, instantiated in
B4DetectorConstruction::ConstructSDandField()
(see also
\link B4cDetectorConstruction::ConstructSDandField() B4c \endlink,
\link B4dDetectorConstruction::ConstructSDandField() B4d \endlink variants)
with a non zero field value, or via interactive commands.
For example:
\verbatim
/B4/det/setMagField 0.2 tesla
/globalField/setValue 0.2 0 0 tesla
\endverbatim
<pre>
|<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
@@ -66,7 +74,34 @@
\endverbatim
allows to activate/inactivate the processes one by one.
\section B4_s3 PRIMARY GENERATOR
\section B4_s3 ACTION INITALIZATION
A newly introduced class, B4aActionInitialization, (see also
\link B4bActionInitialization B4b \endlink,
\link B4cActionInitialization B4c \endlink,
\link B4dActionInitialization B4d \endlink variants),
instantiates and registers to Geant4 kernel all user action classes;
While in sequential mode the action classes are instatiated just once,
via invoking the method:
B4aActionInitialization::Build()
(see also
\link B4bActionInitialization::Build() B4b \endlink,
\link B4cActionInitialization::Build() B4c \endlink,
\link B4dActionInitialization::Build() B4d \endlink variants),
in multi-threading mode the same method is invoked for each thread worker
and so all user action classes are defined thread-local.
A run action class is instantiated both thread-local
and global that's why its instance is created also in the method
B4aActionInitialization::BuildForMaster()
(see also
\link B4bActionInitialization::BuildForMaster() B4b \endlink,
\link B4cActionInitialization::BuildForMaster() B4c \endlink,
\link B4dActionInitialization::BuildForMaster() B4d \endlink variants),
which is invoked only in multi-threading mode.
\section B4_s4 PRIMARY GENERATOR
The primary beam consists of a single particle which hits the
calorimeter perpendicular to the input face. The type of the particle
@@ -74,19 +109,17 @@
be changed via the G4 built-in commands of the G4ParticleGun class (see
the macros provided with this example).
\section B4_s4 RUNS and EVENTS
\section B4_s5 RUNS and EVENTS
A run is a set of events.
The user can choose the frequency of printing from B4aEventAction (or event
action classes in other options) via the interactive command defined
using the G4GenericMessenger class, for example:
The user can choose the frequency of printing via the Geant4 interactive
command, for example:
\verbatim
/B4/event/setPrintModulo 100
/run/printProgress 100
\endverbatim
\section B4_s5- DETECTOR RESPONSE
\section B4_s6- DETECTOR RESPONSE
The energy deposit and track lengths of the charged particles are recorded on
an event by event basis in the Absober and Gap layers.
@@ -94,7 +127,7 @@
In order to demonstrate several possible ways of data scoring,
the example is provided in four variants:
\subsection s5a Variant a: User Actions
\subsection s6a Variant a: User Actions
These 4 quantities are data members of the B4aEventAction class.
They are collected step by step in
@@ -105,24 +138,24 @@
filled in H1D histograms and ntuple to accumulate statistic and compute
dispersion.
\subsection s5b Variant b: User data object
\subsection s6b Variant b: User data object
In order to avoid dependencies between action classes, a user object
B4bRunData is defined with data members needed to the accounted
information.
B4bRunData, derived from G4Run, is defined with data members needed
for the accounted information.
In order to reduce the number of data members a 2-dimensions array
is introduced for each quantity.
Then the quantities are collected step by step in user action classes:
B4bSteppingAction::UserSteppingAction() and
B4bEventAction::EndOfEventAction() in a similar way as in variant a.
\subsection s5c Variant c: Hits and Sensitive detectors
\subsection s6c Variant c: Hits and Sensitive detectors
In this option, the physics quantities are accounted using the hits
and sensitive detectors framework defined in the Geant4 kernel.
The physics quantities are stored in B4cCalorHit via two B4cCalorimeterSD
objects, one associated with the Absorber volume and another one with Gap
in B4cDetectorConstruction.
in B4cDetectorConstruction::ConstructSDandField().
In contrary to the B2 example (Tracker) where a new hit is created
with each track passing the sensitive volume (in the calorimeter), only one
@@ -131,7 +164,7 @@
the quantities per each layer are also available in addition to the total
quantities.
\subsection s5d Variant d: Scorer
\subsection s6d Variant d: Scorer
In this option, the Geant4 scorers which are defined on the top of hits
and sensitive detectors Geant4 framework are used.
@@ -139,30 +172,34 @@
detector classes but rather uses the classes already defined
in Geant4. In this example, the G4MultiFunctionalDetector with
G4PSEnergyDeposit and G4PSTrackLength primitive scores are used (see
B4dDetectorConstruction class).
B4dDetectorConstruction::ConstructSDandField()).
Also with this approach, the quantities per each layer are available
in addition to the total quantities.
\section B4_s6 HISTOGRAMS
\section B4_s7 HISTOGRAMS
The analysis tools are used to accumulate statistics and compute the dispersion
of the energy deposit and track lengths of the charged particles.
H1D histograms are created in B4RunAction::BeginOfRunAction() for the
H1D histograms are created in B4RunAction::B4RunAction() (see also
\link B4bRunAction::B4bRunAction() B4b \endlink variant) for the
following quantities:
- Energy deposit in absorber
- Energy deposit in gap
- Track length in absorber
- Track length in gap
The same values are also saved in an ntuple.
The histograms and ntuple are saved in the output file in a format
according to a technology selected in B4Analysis.hh.
The same values are also saved in an ntuple. The histograms and ntuple are saved
in the output file in a format according to a technology selected in B4Analysis.hh.
The accumulated statistic and computed dispersion is printed at the end of
run, in B4RunAction::EndOfRunAction().
run, in B4RunAction::EndOfRunAction() ((see also
\link B4bRunAction::EndOfRunAction() B4b \endlink variant).
When running in multi-threading mode, the histograms accumulated on threads are
automatically merged in a single output file, while the ntuple is written
in files per thread.
\section B4_s7 VISUALIZATION TUTORIAL
\section B4_s8 VISUALIZATION TUTORIAL
Additional visualization tutorial macros are available in the visTutor
subdirectory. They can be tried as:
@@ -175,7 +212,49 @@ Idle > /control/execute visTutor/exN03VisX.mac
For details, see comment lines described in the macro files.
These macros are designed to help your understanding of the User's Guide.
<hr>
\section B4_s9 HOW TO RUN
This example handles the program arguments in a new way.
It can be run with the following optional arguments:
\verbatim
% exampleB4a [-m macro ] [-u UIsession] [-t nThreads]
\endverbatim
The -t option is available only in multi-threading mode
and it allows the user to override the Geant4 default number of
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
environment variable which has the top priority.
- Execute exampleB4a in the 'interactive mode' with visualization
\verbatim
% exampleB4a
and type in the commands from run1.mac line by line:
Idle> /tracking/verbose 1
Idle> /run/beamOn 1
Idle> ...
Idle> exit
\endverbatim
or
\verbatim
Idle> /control/execute run1.mac
....
Idle> exit
\endverbatim
- Execute exampleB4a in the 'batch' mode from macro files
(without visualization)
\verbatim
% exampleB4a -m run2.mac
% exampleB4a -m exampleB4.in > exampleB4.out
\endverbatim
- Execute exampleB4a in the 'interactive mode' with a selected UI session,
e.g. tcsh
\verbatim
% exampleB4a -u tcsh
\endverbatim
]<hr>
The following paragraphs are common to all basic examples
@@ -241,8 +320,13 @@ The following paragraphs are common to all basic examples
This example handles the program arguments in a new way.
It can be run with the following optional arguments:
\verbatim
% exampleB4a [-m macro ] [-u UIsession]
% exampleB4a [-m macro ] [-u UIsession] [-t nThreads]
\endverbatim
The -t option is available only in multi-threading mode
and it allows the user to override the Geant4 default number of
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
environment variable which has the top priority.
- Execute exampleB4a in the 'interactive mode' with visualization
\verbatim