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.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Name Size       Last modified (GMT) Description
Back Parent directory       2024-12-05 15:16:16
Folder include/       2024-12-05 15:16:16
Folder src/       2024-12-05 15:16:16
File CMakeLists.txt 2350 bytes       2024-12-05 15:16:16
File GNUmakefile 348 bytes       2024-12-05 15:16:16
File History 2535 bytes       2024-12-05 15:16:16
File Par02FullDetector.gdml 16763 bytes       2024-12-05 15:16:16
File README 12101 bytes       2024-12-05 15:16:16
C++ file examplePar02.cc 4112 bytes       2024-12-05 15:16:16
File examplePar02.in 295 bytes       2024-12-05 15:16:16
File examplePar02.out 46998 bytes       2024-12-05 15:16:16
File vis.mac 2003 bytes       2024-12-05 15:16:16

  1 -------------------------------------------------------------------
  2 
  3      =========================================================
  4      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  5      =========================================================
  6 
  7                             Example Par02
  8                             -------------
  9 
 10  This example is a simplified version of a Geant4-based fast simulation
 11  program written by Anna Zaborowska for Future Circular Collider (FCC)
 12  studies.
 13 
 14  This example shows how to do "track and energy smearing" in Geant4,
 15  in order to have a very fast simulation based on assumed detector
 16  resolutions.
 17 
 18  The geometry which is considered is a simplified collider detector set-up,
 19  inspired by ALEPH/ATLAS/CMS detectors. Although it is much simpler than
 20  a realistic detector, it is anyhow fairly complex and therefore build up
 21  from a GDML file, Par02FullDetector.gdml .
 22 
 23  In this example:
 24  -  Particles with transverse momentum less than 1 MeV or pseudorapidity
 25     larger (in module) than 5.5 are neglected (i.e. the corresponding
 26     Geant4 track is killed as soon as it is created).
 27  -  Any primary charged particle is smeared in the tracker as follows:
 28     its momentum is smeared according to a gaussian, with mean equal to 1.0
 29     and sigma taken from the momentum resolution of the CMS tracker 
 30     (with ALEPH or ATLAS tracker as a possible alternative), and then placed
 31     at the end of the tracker, at the position that it would reach if
 32     normally transported (i.e. without smearing).
 33  -  Any primary electron, or positron, or gamma is smeared in the 
 34     electromagnetic calorimeter as follows: it is killed at the entrance
 35     of the electromagnetic calorimeter, with a deposited energy equal to
 36     the gaussian smearing (with mean equal to 1.0 and sigma taken from the
 37     energy resolution of the CMS electromagnetic calorimeter - with ALEPH or
 38     ATLAS electromagnetic calorimeter as a possible alternative) of its
 39     kinetic energy (at the entrance of the electromagnetic calorimeter).
 40  -  Any primary hadron is smeared in the hadronic calorimeter as follows:
 41     it is killed at the entrance of the hadronic calorimeter, with a
 42     deposited energy equal to the gaussian smearing (with mean equal to 1.0
 43     and sigma taken from the energy resolution of the CMS hadronic 
 44     calorimeter - with ALEPH or ATLAS hadronic calorimeter as a possible
 45     alternative) of its kinetic energy (at the entrance of the hadronic
 46     calorimeter).
 47  -  The only competing physical processes with respect to the above physics
 48     parametrisations are the decays.
 49     Note: no electromagnetic processes;
 50           no momentum smearing in the tracker for secondary particles; 
 51           secondary electrons, positrons, gammas in the electromagnetic 
 52           calorimeter are killed (at the entrance) but without any
 53           energy deposition; 
 54           secondary hadrons in the hadronic calorimeter are killed (at the
 55           entrance) but without any energy deposition.
 56 
 57 
 58  Below some details.
 59 
 60 
 61  1. Detector description
 62  -----------------------
 63 
 64  The geometry is read in from a GDML file, Par02FullDetector.gdml .
 65 
 66  The geometry is a simplified collider detector set-up used for the
 67  first FCC studies, inspired by ALEPH/ATLAS/CMS detectors.
 68  It is made of 4 main parts: 
 69  - Tracker
 70  - Electromagnetic calorimeter
 71  - Hadronic calorimeter
 72  - Muon subdetector
 73 
 74  In this example, fast simulation parametrisation models exist for the
 75  first three subdetectors, but not for the Muon subdetector.
 76  The three parametrisation models:
 77  - Par02FastSimModelTracker : in the tracker
 78  - Par02FastSimModelEMCal   : in the electromagnetic calorimeter
 79  - Par02FastSimModelHCal    : in the hadronic calorimeter
 80  are build and bound to the respective subdetector (i.e. Geant4 regions)
 81  in the method: Par02DetectorConstruction::Construct() .
 82 
 83  Three configurations are possible for those parametrisation models:
 84  CMS-like, ALEPH-like, ATLAS-like. 
 85  By default, the CMS configuration is used.
 86 
 87 
 88  2. Primary generation
 89  ---------------------
 90  
 91  In this example we use a very simple primary generation action,
 92  Par02PrimaryGeneratorAction, that uses the G4ParticleGun.
 93  One single particle type, with a well defined energy, and in one fixed
 94  direction is used for each run: the corresponding values can be set via
 95  macro commands. See examplePar02.in as an example.
 96 
 97  For the FCC studies, Pythia8 events in HepMC format were used for the
 98  generation of the primary particles.
 99 
100 
101  3. Physics List
102  ---------------
103 
104  A special, ad-hoc physics list is used in this example, in order to have
105  an ultra-fast parametrised simulation: for all particles, the only two
106  physics processes that are assigned are the decay process and the fast
107  simulation process. 
108  The following three fast simulation models are defined:
109 
110  - Par02FastSimModelTracker : 
111    - bound to the tracker
112      (see the method Par02DetectorConstruction::Construct )
113    - applicable to all charged particles
114      (see the method Par02FastSimModelTracker::IsApplicable )
115    - triggered in all cases (i.e. no kinematic constraints)
116      (see the method Par02FastSimModelTracker::ModelTrigger )
117    - does the following: place the particle at the tracking detector exit 
118      (at the place the particle would reach without smearing), and, only
119      if the particle is a primary, it smears the momentum of the particle
120      according to a gaussian, with mean equal to 1.0 and sigma taken from
121      the momentum resolution of the CMS tracker (with ALEPH or ATLAS tracker
122      as a possible alternative)
123      (see the method Par02FastSimModelTracker::DoIt )
124 
125  - Par02FastSimModelEMCal : 
126    - bound to the electromagnetic calorimeter
127      (see the method Par02DetectorConstruction::Construct )
128    - applicable to electrons, positrons, gammas
129      (see the method Par02FastSimModelEMCal::IsApplicable )
130    - triggered in all cases (i.e. no kinematic constraints)
131      (see the method Par02FastSimModelEMCal::ModelTrigger )
132    - does the following: kill the particle at the entrance of the
133      electromagnetic calorimeter, and, only if the particle is a primary,
134      it deposits in the electromagnetic calorimeter an energy obtained
135      by a gaussian smearing (with mean equal to 1.0 and sigma taken from the
136      energy resolution of the CMS electromagnetic calorimeter - with ALEPH
137      or ATLAS electromagnetic calorimeter as a possible alternative) of the
138      particle kinetic energy (at the entrance of the electromagnetic
139      calorimeter)
140      (see the method Par02FastSimModelEMCal::DoIt )
141 
142  - Par02FastSimModelHCal : 
143    - bound to the hadronic calorimeter
144      (see the method Par02DetectorConstruction::Construct )
145    - applicable to all hadrons (i.e. particles made of quarks)
146      (see the method Par02FastSimModelHCal::IsApplicable )
147    - triggered in all cases (i.e. no kinematic constraints)
148      (see the method Par02FastSimModelHCal::ModelTrigger )
149    - does the following: kill the particle at the entrance of the
150      hadronic calorimeter, and, only if the particle is a primary,
151      it deposits in the hadronic calorimeter an energy obtained by a
152      gaussian smearing (with mean equal to 1.0 and sigma taken from the
153      energy resolution of the CMS hadronic calorimeter - with ALEPH
154      or ATLAS hadronic calorimeter as a possible alternative) of the
155      particle kinetic energy (at the entrance of the hadronic
156      calorimeter)
157      (see the method Par02FastSimModelHCal::DoIt )
158 
159 
160  4. User actions, user information and user utility classes 
161  ----------------------------------------------------------
162 
163  - Par02RunAction : run action used for initialization and termination
164                     of the run.
165 
166  - Par02EventAction : event action used for initialization and termination
167                       of the event.
168 
169  - Par02TrackingAction : tracking action used for killing particles with
170                          transverse momentum less than 1 MeV or 
171                          pseudorapidity larger (in module) than 5.5
172                          (see method Par02TrackingAction::PreUserTrackingAction )
173                          and to store the information about the track at
174                          the end of the simulation of such a track
175                          (see method Par02TrackingAction::PostUserTrackingAction ).
176 
177  - Par02ActionInitialization : initialization of the primary generator class
178                                and all user-defined actions (i.e. the three
179                                classes above).
180 
181  - Par02PrimaryParticleInformation : utility class to store information 
182                                      associated with a primary particle.
183 
184  - Par02EventInformation : utility class to store information associated
185                            with a Geant4 event.
186 
187  - Par02DetectorParametrisation : a simple class used to provide the detector
188                                   resolution and efficiency, according to the
189                                   type of detector: tracker, electromagnetic
190                                   calorimeter, hadronic calorimeter.
191                                   There are 3 choices: CMS-like (default),
192                                   ALEPH-like and ATLAS-like.
193                                   The efficiency is currently set to 1.0 in 
194                                   all cases and not used.
195 
196  - Par02Smearer : a simple class that does the gaussian smearing, either
197                   of the momentum (in the tracker detector) or in energy
198                   (in the electromagnetic or hadronic calorimeter).
199 
200 
201  5. Output
202  ---------
203 
204  The execution of the program (examplePar02) produces in output, at the end
205  of a run, a Root file, by default named DefaultOutput.root, which contains
206  3 histograms and one ntuple.
207 
208  The macro file  examplePar02.in  specifies one run made of 1000 events
209  each consisting of one 50 GeV electron.
210  By editing the file, one could select alternatively a run made of 1000
211  events each consisting of one 100 GeV muon, or a run made of 1000 events
212  each consisting of one 20 GeV pion- .
213 
214  See the class Par02Output for the definition of the 3 histograms and the
215  ntuples. Here is a quick summary:
216  - histogram of the ratio of the momentum smeared and the original momentum
217    in the tracker (for primary charged particles);
218  - histogram of the ratio of the smeared energy deposited and the original
219    energy at the entrance in the electromagnetic calorimeter (for primary
220    electrons, positrons and gammas);
221  - histogram of the ratio of the smeared energy deposited and the original
222    energy at the entrance in the hadronic calorimeter (for primary hadrons);
223  - ntuple containing the "Monte-Carlo true" information regarding the
224    primary, and the resolution, efficiency, smeared momentum (tracker),
225    smeared energy (calorimeter) and impact position (calorimeter) of each
226    subdetector (tracker, electromagnetic calorimeter, hadronic calorimeter)
227    where the primary is parametrised (tracker and electromagnetic calorimeter
228    in the case of primary electrons, positrons and gammas; tracker and
229    hadronic calorimeter in the case of primary hadrons; tracker only for
230    all other primary charged particles, e.g. muons).
231 
232  Note:
233  - you do not need to have the Root package available to run this example,
234    but you need it if you want to look at the histograms and the ntuple
235    contained in the Root output file;
236  - sensitive detectors and hits are not used in this example.
237 
238 
239  6. How to build and run the example
240  -----------------------------------
241 
242 - You need to have built the Geant4 persistency/gdml module by having set
243   the  -DGEANT4_USE_GDML=ON  flag during the CMAKE configuration step, 
244   as well as the  -DXERCESC_ROOT_DIR=<path_to_xercesc>  flag pointing to 
245   the path where the XercesC XML parser package is installed in your system.
246  
247 - Compile and link to generate the executable (in your CMAKE build directory):
248   %  make
249 
250 - Execute the application:
251   %  examplePar02  examplePar02.in
252 
253   which produces one Root file: DefaultOutput.root .
254