Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/analysis/AnaEx02/README is written in an unsupported language. File is not indexed.

0001 --------------------------------------------------
0002 
0003      =========================================================
0004      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005      =========================================================
0006 
0007                             AnaEx02
0008                             -------
0009  Examples AnaEx01 and AnaEx02 show the usage of histogram and tuple
0010  manipulations using G4Analysis and ROOT compliant systems on the same
0011  scenario. All analysis manipulations (histo booking, filling, saving histos
0012  in a file, etc...) are located in one class : HistoManager, implementation of
0013  which is different in each example. All the other classes are same in all
0014  three examples.
0015 
0016  This example shows the usage of histogram and tuple manipulations using
0017  ROOT system. Please install ROOT before building this example:
0018  http://root.cern.ch
0019 
0020  The example is an adaptation of examples/novice/N03. It describes a simple
0021  sampling calorimeter setup.
0022 
0023  1- Detector description
0024  -----------------------
0025 
0026  The calorimeter is a box made of a given number of layers. A layer
0027  consists of an absorber plate and of a detection gap. The layer is
0028  replicated.
0029 
0030  Six parameters define the calorimeter :
0031     - the material of the absorber,
0032     - the thickness of an absorber plate,
0033     - the material of the detection gap,
0034     - the thickness of a  gap,
0035     - the number of layers,
0036     - the transverse size of the calorimeter (the input face is a square).
0037 
0038  The default geometry is constructed in DetectorConstruction class,
0039  but all of the above parameters can be modified interactively via
0040  the commands defined in the DetectorMessenger class.
0041 
0042         |<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
0043         |                       |                       |                       |
0044         ==========================================================================
0045         ||              |       ||              |       ||              |       ||
0046         ||              |       ||              |       ||              |       ||
0047  beam   ||   absorber   |  gap  ||   absorber   |  gap  ||   absorber   |  gap  ||
0048 ======> ||              |       ||              |       ||              |       ||
0049         ||              |       ||              |       ||              |       ||
0050         ==========================================================================
0051 
0052  2- Physics list
0053  ---------------
0054 
0055    The particle's type and the physic processes which will be available
0056    in this example are set in the FTFP_BERT physics list.
0057 
0058  3- Action Initialization
0059  ------------------------
0060 
0061    A newly introduced class, ActionInitialization,
0062    instantiates and registers to Geant4 kernel all user action classes
0063    which are defined thread-local and a run action class
0064    which is defined both thread-local and global.
0065 
0066    The thread-local action classes are defined in
0067      ActionInitialization::Build()
0068    and  the global run action class is defined in
0069      ActionInitialization::BuildForMaster().
0070    Note that ActionInitialization::Build() is also used to
0071    instatiate user action clasess in sequential mode.
0072 
0073  4- An event : PrimaryGeneratorAction
0074  ------------------------------------
0075 
0076  The primary kinematic consists of a single particle which hits the
0077  calorimeter perpendicular to the input face. The type of the particle
0078  and its energy are set in the PrimaryGeneratorAction class, and can
0079  be changed via the G4 build-in commands of ParticleGun class.
0080 
0081 
0082  5- Histograms
0083  -------------
0084  To produce histograms, ROOT system must be installed
0085 
0086  AnaEx02 can produce 4 histograms :
0087 
0088   EAbs : total energy deposit in absorber per event
0089   EGap : total energy deposit in gap per event
0090   LAbs : total track length of charged particles in absorber per event
0091   LGap : total track length of charged particles in gap per event
0092 
0093  And 2 Ntuples :
0094  - Ntuple1:
0095    - one row per event : EnergyAbs EnergyGap
0096  - Ntuple2:
0097    - one row per event : TrackLAbs TrackLGap
0098 
0099  These histos and ntuples are booked in HistoManager and filled from
0100  EventAction.
0101 
0102  One can control the name of the histograms file :
0103  default name     : AnaEx02
0104  format : root
0105 
0106  See HistoManager constructor
0107 
0108  6- How to build
0109  ---------------
0110 
0111  An additional step is needed when building the example with GNUmake
0112  due to using the extra shared directory:
0113   % cd path_to_AnaEx02/AnaEx02
0114   % gmake setup
0115   % gmake
0116 
0117  This will copy the files from shared in the example include and src;
0118  to remove these files:
0119   % gmake clean_setup
0120 
0121  7- How to run
0122  --------------
0123 
0124   - Execute AnaEx02 in the 'interactive mode' with visualization:
0125       % ./AnaEx02
0126     and type in the commands from run.mac line by line:
0127       Idle> /control/verbose 2
0128       Idle> /tracking/verbose 1
0129       Idle> /run/beamOn 10
0130       Idle> ...
0131       Idle> exit
0132     or
0133       Idle> /control/execute run.mac
0134       ....
0135       Idle> exit
0136 
0137   - Execute AnaEx02  in the 'batch' mode from macro files
0138     (without visualization)
0139       % ./AnaEx02 run.mac
0140       % ./AnaEx02 run.mac > run.out
0141 
0142   The AnaEx02.in macro is used in Geant4 testing.
0143 
0144 
0145