Warning, /geant4/examples/extended/hadronic/Hadr05/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleHadr05 Example Hadr05
0002
0003 How to collect energy deposition in a sampling calorimeter.
0004 How to survey energy flow.
0005 Hadr05 is the hadronic equivalent of TestEm3.
0006
0007
0008 ## GEOMETRY DEFINITION
0009
0010 The calorimeter is a box made of a given number of layers.
0011 A layer consists of a sequence of various absorbers (maximum MaxAbsor=9).
0012 The layer is replicated.
0013
0014 Parameters defining the calorimeter :
0015 - the number of layers,
0016 - the number of absorbers within a layer,
0017 - the material of the absorbers,
0018 - the thickness of the absorbers,
0019 - the transverse size of the calorimeter (the input face is a square).
0020
0021 In addition a transverse uniform magnetic field can be applied.
0022
0023 The default geometry is constructed in DetectorConstruction class, but all
0024 of the above parameters can be modified interactively via the commands
0025 defined in the DetectorMessenger class.
0026
0027 ```
0028 |<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
0029 | | | | |
0030 ==========================================================================
0031 || | || | || | ||
0032 || | || | || | ||
0033 || abs 1 | abs 2 || abs 1 | abs 2 || abs 1 | abs 2 ||
0034 || | || | || | ||
0035 || | || | || | ||
0036 beam || | || | || | ||
0037 ======> || | || | || | ||
0038 || | || | || | ||
0039 || | || | || | ||
0040 || | || | || | ||
0041 || | || | || | ||
0042 || cell 1 | cell 2 || cell 3 | cell 4 || cell 5 | cell 6 ||
0043 ==========================================================================
0044 ^ ^ ^ ^ ^ ^ ^
0045 pln1 pln2 pln3 pln4 pln5 pln6 pln7
0046 ```
0047
0048 NB. The number of absorbers and the number of layers can be set to 1.
0049 In this case we have a unique homogeneous block of matter, which looks like
0050 a bubble chamber rather than a calorimeter ...
0051 (see the macro emtutor.mac)
0052
0053 A function, and its associated UI command, allows to build a material
0054 directly from a single isotope.
0055
0056 To be identified by the ThermalScattering module, the elements composing a
0057 material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
0058 Examples of such materials are build in Hadr06/src/DetectorConstruction.cc
0059
0060 ## PHYSICS LISTS
0061
0062 "Full" set of physics processes are registered, but via PhysicsConstructor
0063 objects rather than complete pre-defined G4 physics lists. This alternative
0064 way gives more freedom to register physics.
0065
0066 Physics constructors are either constructors provided in Geant4 (with G4 prefix)
0067 or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic,
0068 GammaNuclear, RadioactiveDecay and Electomagnetic.
0069 (see geant4/source/physics_lists/constructors)
0070
0071 HadronElasticPhysicsHP include a model for thermalized neutrons,
0072 under the control of the command /testhadr/phys/thermalScattering
0073
0074 GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
0075
0076 ElectromagneticPhysics is a readable version of G4EmStandardPhysics_opt3.
0077
0078 Several hadronic physics options are controlled by environment variables.
0079 To select them, see Hadr07.cc
0080
0081 ## AN EVENT : THE PRIMARY GENERATOR
0082
0083 The primary kinematic consists of a single particle which hits the calorimeter
0084 perpendicular to the input face. The type of the particle and its energy are
0085 set in the PrimaryGeneratorAction class, and can be changed via the
0086 G4 build-in commands of G4ParticleGun class (see the macros provided with this
0087 example).
0088
0089 In addition one can choose randomly the impact point of the incident particle.
0090 The corresponding interactive command is built in PrimaryGeneratorAction.
0091
0092 A RUN is a set of events.
0093
0094 Hadr05 computes the energy deposited per absorber and the energy flow through
0095 the calorimeter.
0096
0097 ## VISUALIZATION
0098
0099 The Visualization Manager is set in the main() (see Hadr05.cc).
0100 The initialisation of the drawing is done via the commands :
0101 /vis/... in the macro vis.mac. In interactive session:
0102 ```
0103 PreInit or Idle > /control/execute vis.mac
0104 ```
0105
0106 The default view is a longitudinal view of the calorimeter.
0107
0108 ## PHYSICS DEMO
0109
0110 The particle's type and the physics processes which will be available
0111 in this example are set in PhysicsList class.
0112
0113 In addition a built-in interactive command (/process/inactivate processName)
0114 allows to activate/inactivate the processes one by one.
0115 Then one can well visualize the processes one by one, especially
0116 in the bubble chamber setup with a transverse magnetic field.
0117
0118 ## HOW TO START ?
0119
0120 - Execute Hadr05 in 'batch' mode from macro files
0121 ```
0122 % ./Hadr05 Cu-lAr.mac
0123 ```
0124
0125 - Execute Hadr05 in 'interactive mode' with visualization
0126 ```
0127 % ./Hadr05
0128 ....
0129 Idle> type your commands. For instance:
0130 Idle> /control/execute vis.mac
0131 ....
0132 Idle> exit
0133 ```
0134
0135 Macros provided in this example:
0136 - hadr05.in: macro used in Geant4 testing
0137 - Fe-Sci.mac, Cu-lAr.mac, Pb-lAr.mac, W-lAr.mac : names are self explanatory
0138 - Pb-lAr-em.mac : electromagnetic calorimeter
0139 - emtest.mac, emtutor.mac : to be run interactively
0140 - vis.mac: to activate visualization
0141
0142 ## HISTOGRAMS
0143
0144 Hadr05 can produce histograms :
0145
0146 ```
0147 histo 1 : energy deposit in absorber 1
0148 histo 2 : energy deposit in absorber 2
0149 ...etc...........
0150
0151 histo 11 : longitudinal profile of energy deposit in absorber 1 (MeV/event)
0152 histo 12 : longitudinal profile of energy deposit in absorber 2 (MeV/event)
0153 ...etc...........
0154
0155 histo 21 : energy flow (MeV/event)
0156
0157 histo 22 : total energy deposited
0158 histo 23 : total energy leakage
0159 histo 24 : total energy released : Edep + Eleak
0160
0161 NB. Numbering scheme for histograms:
0162 layer : from 1 to NbOfLayers (included)
0163 absorbers : from 1 to NbOfAbsor (included)
0164 planes : from 1 to NbOfLayers*NbOfAbsor + 1 (included)
0165 ```
0166
0167 One can control the binning of the histo with the command:
0168 ```
0169 /analysis/h1/set idAbsor nbin Emin Emax unit
0170 ```
0171 etc.,
0172 where unit is the desired energy unit for that histo (see Hadr05.in).
0173
0174 One can control the name of the histograms file with the command:
0175 ```
0176 /analysis/setFileName name (default hadr05)
0177 ```
0178
0179 It is possible to choose the format of the histogram file : root (default),
0180 xml, csv, by using namespace in HistoManager.hh
0181
0182 It is also possible to print selected histograms on an ascii file:
0183 ```
0184 /analysis/h1/setAscii id
0185 ```
0186 All selected histos will be written on a file name.ascii (default hadr05)
0187
0188