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10.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 ]

Diff markup

Differences between /examples/advanced/composite_calorimeter/README (Version 11.3.0) and /examples/advanced/composite_calorimeter/README (Version 5.1.p1)


  1 ----------------------------------------------    
  2 ----------------------------------------------    
  3                                                   
  4      =========================================    
  5                       Geant4 - Composite calor    
  6      =========================================    
  7                                                   
  8                              README               
  9                       ---------------------       
 10                                                   
 11  CompositeCalorimeter is an example of a test-    
 12  by the CMS Collaboration to validate Geant4 a    
 13  (in 1996) in a CMS Hadron calorimeter test-be    
 14  The name "Composite" for this example emphasi    
 15  test-beam had the goal of studying the hadron    
 16  part of the data was taken with the presence     
 17  crystal calorimeter in front of the hadronic     
 18  reproduce the situation as in the real CMS ex    
 19  The geometry of the simulation has been setup    
 20  very easily, at run time (therefore without n    
 21  see below for the details) the inclusion or e    
 22  electromagnetic calorimeter part.                
 23  Although some important aspects, for a detail    
 24  test-beam data and simulation, like beam prof    
 25  have been omitted here (to avoid too many tec    
 26  nevertheless, this example is able to reprodu    
 27  most of the relevant observables as measured     
 28  The output of this example consists of a set     
 29  and one ntuple which are stored on a ROOT fil    
 30  In our opinion, the most original "lesson" wh    
 31  advanced example for the Geant4 user is to sh    
 32  the Sensitive/Hit part of the simulation is t    
 33  Although the details of how this is done vary    
 34  experiment (it is worth, for instance, to com    
 35  advanced example lAr_calorimeter), the main d    
 36  are quite general: to have consistency, but a    
 37  and couplings as much as possibile, between S    
 38  and Visualization. Notice that the solution o    
 39  by CMS could appear "overdone" for the sake o    
 40  relatively simple test-beam setup; but it sho    
 41  that the same approach is used also for the f    
 42  simulation, as well as for any subdetector.      
 43                                                   
 44                                                   
 45 1. Setting up the environment variables           
 46 ---------------------------------------           
 47                                                   
 48  The user should first setup, as "usual", the     
 49  variables (e.g. the script produced by cmake)    
 50  Then the specific setup for this example shou    
 51                                                   
 52      >  source envExample.csh      in the case    
 53  or                                               
 54      >  . envExample.sh            in the case    
 55                                                   
 56  The analysis part is based on the native g4an    
 57  the output is a ROOT file. This can be change    
 58                                                   
 59                                                   
 60 2. Sample run                                     
 61 -------------                                     
 62                                                   
 63  Once the environmental variables are setup, y    
 64     CompositeCalorimeter                          
 65  by configuring with cmake and then running th    
 66  Then, you can execute it using the Geant4 mac    
 67  as follows:                                      
 68                                                   
 69     >  ./CompositeCalorimeter test.g4mac          
 70                                                   
 71  which simulate a few events, each being a 100    
 72  electromagnetic crystal calorimeter followed     
 73  without magnetic field.                          
 74  The output is the ROOT file "ccal.root" .        
 75  See part "8. Analysis / Histogramming" below     
 76  content of that file.                            
 77  If you run instead:                              
 78                                                   
 79     >  ./CompositeCalorimeter                     
 80                                                   
 81  after having setup the Geant4 visualization v    
 82  you can visualize the geometry of the apparat    
 83  events. Similarly, you can get a very simple     
 84  that allows to select the particle type, its     
 85  of events (between a limited number of possib    
 86  For more details, see part "9. Visualization     
 87                                                   
 88                                                   
 89 3. Detector description                           
 90 -----------------------                           
 91                                                   
 92  Let's start with a brief description of the t    
 93                                                   
 94  There are two possible configurations:           
 95    i)  HCAL only, that is only the hadronic ca    
 96   ii)  ECAL+HCAL, that is the electromagnetic     
 97                   is placed in front of the ha    
 98  ECAL is made of 23 cm long PbWO4 crystals (co    
 99  25.8 radiation lengths, and 1.1 interaction l    
100  test beam a  7 x 7 = 49  matrix of crystals i    
101  HCAL is a sampling calorimeter, with plastic     
102  part and copper as absorber. 28 scintillator     
103  absorber of varying thickness in between, and    
104  and type of scintillator. More precisely:        
105    --- layer 1: 2 cm of Copper                    
106    --- layer 2 to 7: 4 cm of Copper               
107    --- layer 8 to 21: 6 cm of Copper              
108    --- layer 22 to 27: 8 cm of Copper             
109  For the scintillators: 2 mm passive Plastic;     
110  1 mm passive Plastic.                            
111  The total length of HCAL consists of 152 cm o    
112  The dimension orthogonal to the beam directio    
113  The ECAL and HCAL considered here are prototy    
114  Endcap calorimeters of the CMS detector (whic    
115  region |eta| < 3.0 ; CMS has also a Forward c    
116  the region 3.0 < |eta| < 5.0, but this part w    
117  this test-beam setup). Notice, however, that     
118  (28 instead of 19 in the Barrel or 18 in the     
119  test-beam setup than in the real CMS detector    
120  energy containment. Therefore, the ECAL+HCAL     
121  to more than 11 radiation lengths as for the     
122  19 layers of the Barrel have each 6 cm of abs    
123  18 layers of the Endcap have each 6.6 cm of a    
124  number of interaction lengths are rougly the     
125  Five values of the magnetic field (parallel t    
126  have been considered in the test-beam: 0.0 ,     
127                                                   
128  In order to set the magnetic field, you have     
129        dataglobal/fmap.tb96                       
130  and change the first number (which appears in    
131  that file, on the first column; the unit bein    
132    #. Field map                                   
133    *DO FLDM                                       
134      0.0   9               652.0                  
135  for example, if you want a magnetic field of     
136  line must be set as follows (the magnetic fie    
137      30.0   9               652.0                 
138                                                   
139  In order to deactivate either the ECAL or the    
140  to comment out the corresponding line in the     
141  using "#" as the comment character. For insta    
142  without ECAL:                                    
143  "HcalTB96"                      "tbhcal96"       
144  #"CrystalMatrixModule"           "tbhcal96xta    
145                                                   
146                                                   
147  In this test-beam setup, at the back of ECAL,    
148  material for support and readout, which has b    
149  simulation. For the HCAL, only the fibres are    
150  and because they have the same composition as    
151  they are adequately represented in the simula    
152  of the readout, including the photomultiplier    
153  far away from the HCAL, and hence are not pre    
154                                                   
155  Let's summarizes now the geometry description    
156  As said in the introduction, this part is the    
157  important of this example, but it is quite co    
158  appreciated only in the context of the CMS so    
159  particular in the relation between Simulation    
160  Visualization. Therefore we limit ourself to     
161  pointing to the internal CMS documentation fo    
162                                                   
163  --- In order to share the same geometrical an    
164      about CMS between Simulation, Reconstruct    
165      avoiding inconsistencies, duplications, a    
166      all these information is store, once for     
167      (typically in XML format), instead of put    
168      as usually done in simpler detector descr    
169      the Geant4 examples, novice or advanced,     
170      is kept inside the concrete class which i    
171      G4VUserDetectorConstruction). For simplic    
172      these "databases" are nothing more than A    
173                                                   
174         datageom/ : tbhcal96.geom, tbhcal96hca    
175                     store the information abou    
176                     the HCAL, and the ECAL, re    
177                                                   
178         dataconf/ : g4testbeamhcal96.conf, tes    
179                     store the information abou    
180                     (HCAL only, or ECAL+HACL)     
181                     Simulation and Reconstruct    
182                                                   
183         dataglobal/ : fmap.tb96, material.cms,    
184                     The first one is the magne    
185                     intensity of the magnetic     
186                     orthogonal to the beam dir    
187                     the beam axis). The second    
188                     keeps the full collection     
189                     the CMS detector (not only    
190                     although we are simulating    
191                     The third one, rotation.cm    
192                     rotation parameters (angle    
193                                                   
194         datavis/ : tbhcal96.vis, tbhcal96hcal.    
195              visualization information for, re    
196                    experimental Hall, HCAL, an    
197                                                   
198  --- In order to allow an high degree of flexi    
199      level the user can choose which subsystem    
200      should be simulated and can activate or d    
201      parts, subsystem by subsystem. This can b    
202      by modifying one of the above database in    
203      of putting the hands on the code, recompi    
204                                                   
205  --- There are two "parallel geometry factorie    
206      classes, which are independent from the S    
207      can be used, for instance, by the Reconst    
208      is specific of the Simulation. In the lat    
209      the geometry model), all the geometry fac    
210      base class CCalG4Albe. Furthermore, using    
211      of them derives also from the counterpart    
212      The design of the CCalG4Able class helps     
213      interchanging at the level of subdetector    
214      transition from the simulation of the ent    
215      just a part of it, or to a test-beam geom    
216      Of course this modular, flexible, and gen    
217      for free: the price to pay here is its co    
218      otherwise unjustified if we limited ourse    
219      of a relatively simple test-beam setup.      
220                                                   
221  --- See "10. Classes Overview" below for a sc    
222      various classes involved in the Geometry     
223                                                   
224                                                   
225 4. Physics processes                              
226 --------------------                              
227                                                   
228  The factory physics list is used, therefore t    
229  is steered by the environmental variable PHYS    
230  (Note: if this environmental variable is not     
231   which is used is FTFP_BERT).                    
232                                                   
233                                                   
234 5. Particle Generator                             
235 ---------------------                             
236                                                   
237  The 1996 test-beam has been taken with the fo    
238     --- 225 GeV muons (for calibration)           
239     --- 10 to 300 GeV pions                       
240     --- 10 to 300 GeV electrons                   
241  therefore the standard Geant4 Particle Gun ha    
242  generator. Notice that, for the sake of keepi    
243  complicated, the proper simulation of the bea    
244  beam contamination have been neglected.          
245                                                   
246                                                   
247 6. Hits                                           
248 -------                                           
249                                                   
250  In CMS there are two groups of hits: Tracker-    
251  Only the latter one appears in this example.     
252  For the same reasons, as seen for the Geometr    
253  duplication of information and unnecessary co    
254  Reconstruction, and Visualization, the simula    
255  CCalG4Hit, doubly inherits from the common Ge    
256  all hits, G4VHit, and from the "core" (i.e. s    
257  CMS calorimeter hit class, CCalHit.              
258  A new Hit object is created                      
259    - for each new particle entering the calori    
260    - for each detector unit (i.e cristal or fi    
261    - for each nanosecond of the shower develop    
262  The information stored in each CCalHit object    
263    - Entry  : local coordinates of the entranc    
264               in the unit where the shower sta    
265    - the TrackID  : Identification number of t    
266    - the IncidentEnergy  : kinetic energy of t    
267    - the UnitID : the identification number of    
268                   (crystal, or fiber, or scint    
269    - the TimeSlice : the time interval, in nan    
270                      hit has been created;        
271    - the EnergyDeposit : the energy deposit in    
272  Notice that all hit objects created for a giv    
273  values for the first three pieces of informat    
274                                                   
275                                                   
276 No Noise and Digitization                         
277 --------------------------                        
278                                                   
279  In order to keep the complexity of this examp    
280  level, both noise and digitization effects ha    
281                                                   
282                                                   
283 7. User Actions                                   
284 ----------------                                  
285                                                   
286  In this example. there have been used the fol    
287                                                   
288  --- G4UserRunAction (the derived, concrete cl    
289      it is used to invoke the Analysis object     
290      the Run, to instantiate it and passing it    
291      at the end of the Run, to inform it that     
292      and therefore the histograms, ntuples, et    
293                                                   
294  --- G4UserEventAction (the derived, concrete     
295      it is used to examine, at the end of the     
296      (calorimeter) hits, extract the various o    
297      interesting (to the goal of understanding    
298      of magnetic field on scintiallator; choic    
299      thickness by optimizing resolution versus    
300      the absorber depth in the energy caontain    
301      calorimeter contribution in the electron     
302      and finally call the analysis object to s    
303      information on histograms and/or in the n    
304      The name of the class "CCalEndOfEventActi    
305      fact that at the beginning of the Event n    
306                                                   
307  --- G4UserSteppingAction (the derived, concre    
308      it is used to extract some "unphysical" i    
309      experimentally measurable, although inter    
310      understanding of the shower development),    
311      and the deposit as a function of the time    
312      for more details"), which is available on    
313      at the end of Event, the analysis object     
314      information on histograms.                   
315      Please notice that the stepping action is    
316                                                   
317  --- G4UserStackingAction (the derived, concre    
318      it is used to ensure that the same track     
319      originating a shower appears in all hits     
320      of class CCalHit) of the shower, in any c    
321                                                   
322                                                   
323 8. Analysis / Histogramming                       
324 ----------------------------                      
325                                                   
326  The analysis part of CompositeCalorimeter is     
327  and is based on the g4tool interfaces.           
328  Both the histograms and the ntuple are saved     
329  ROOT file "ccal.root" (default: this can be c    
330  formats supported by the g4analysis tools).      
331  Please note that in a multiple run session, t    
332  the output file.                                 
333  What the histograms and the variables of the     
334  explained below:                                 
335                                                   
336   Histograms  h100 - h127 : energy deposit (in    
337                           (plastic scintillato    
338                           calorimeter module (    
339                           from 0 to 27, and th    
340                           ID = 100 + number of    
341   Ntuple variables  hcal0 - hcal27 : provide t    
342                                                   
343   Histograms  h200 - h248 : energy deposit (in    
344                           electromagnetic towe    
345                           7 x 7 = 49 towers, n    
346                           the corresponding hi    
347                           ID = 200 + number of    
348   Ntuple variables  ecal0 - ecal48 : provide t    
349                                                   
350   Histograms  h300 - h339 : total energy depos    
351                           electromagnetic crys    
352                           (either in a sensiti    
353                           in one of the 40 nan    
354                           words, histogram  30    
355                           contains the total d    
356                           I and I+1 nanosecond    
357                           (Notice that the tim    
358                            40 nanoseconds, is     
359                            bunch-crossing of 2    
360                                                   
361   Histograms  h400 - h469 : energy profile (in    
362                           sensitive (plastic s    
363                           (copper absorber), a    
364                           distance (in centime    
365                           ( ID histo = 400 + r    
366                                                   
367   Histogram  h4000 : total energy deposit (in     
368                     of either the electromagne    
369   Ntuple variable  edep provides the same info    
370                                                   
371   Other ntuple variables are the following:       
372        ---  elab : energy (in GeV) of the inci    
373        ---  xpos, ypos, zpos : position (in mm    
374                                has been shot.     
375        ---  edec, edhc : total energy deposit     
376                          parts of, respectivel    
377                          and hadronic calorime    
378                          sum  edec+edhc  coinc    
379                                                   
380   Notice that lateral profile (400-469) and ti    
381   histograms show purely Monte Carlo quantitie    
382   experimentally measured.                        
383   Please be careful that the range of the hist    
384   in such a way to contain most of the entries    
385   fill a large fraction of that range, whereas    
386   fill only the first few bins (corresponding     
387   therefore, when plotted they look almost emp    
388   and the results are sensible. We suggest to     
389   rather than the histograms, when the same in    
390   from the ntuple.                                
391                                                   
392                                                   
393 9. Visualization / GUI                            
394 -----------------------                           
395                                                   
396  If you setup one of the following Geant4 envi    
397     G4VIS_USE_DAWN                                
398     G4VIS_USE_VRML                                
399     G4VIS_USE_OPENGLX                             
400  which correspond to the use of DAWN, VRML, an    
401  as visualization engine of Geant4, and set pr    
402   PATH  as well, it is then possible to visual    
403  some events.                                     
404  To do so, you have to run                        
405      >  ./CompositeCalorimeter                    
406  without input file: you then see the detector    
407  you can select the particle gun and its energ    
408  case you want something different from the th    
409  (which is a 100 GeV pi-), for example:           
410      Idle> /gun/particle e-                       
411      Idle> /gun/energy 200 GeV                    
412  and then run some events, for example:           
413      Idle> /run/beamOn 3                          
414                                                   
415  The tracks that are shown include both charge    
416  of any momentum: if you want instead only cha    
417  then you have simply to edit  src/CCalEndOfEv    
418  at the end of the method  EndOfEventAction  a    
419  where the condition on the charge is made (it    
420  straighforward to eventual add some other con    
421  if you want to see only those particles that     
422  kinematic conditions).                           
423                                                   
424  Rather than to specify "by hand" the type of     
425  its energy, and the number of events, it is p    
426  a very simple GUI (graphical user interface)     
427  such choices, between a limited set of possib    
428  Such GUI is based on Motif XmCommand widget,     
429  straightforward, eventually, to make the nece    
430  in order to use a different one.                 
431  The only thing you need to do to get the GUI     
432  the following Geant4 environmental variables:    
433    G4UI_BUILD_XM_SESSION=1                        
434    G4UI_USE_XM=1                                  
435  Then, if you run the executable without speci    
436  (like test.g4mac):                               
437      >  $G4WORKDIR/bin/$G4SYSTEM/CompositeCalo    
438  a window automatically pops out, with the men    
439  can make your selection of particle type, ene    
440  of events to be run.                             
441                                                   
442                                                   
443 10. Classes Overview                              
444 ---------------------                             
445                                                   
446  This is a schematic overview of the classes d    
447                                                   
448   CCalPrimaryGeneratorAction                      
449   CCalPrimaryGeneratorMessenger                   
450   User action for primaries generator.            
451                                                   
452   CCalDetectorConstruction                        
453   CCalAMaterial                                   
454   CCalDataSet                                     
455   CCalDetector                                    
456   CCalEcal                                        
457   CCalEcalOrganization                            
458   CCalG4Able                                      
459   CCalG4Ecal                                      
460   CCalG4Hall                                      
461   CCalG4Hcal                                      
462   CCalGeometryConfiguration                       
463   CCalHall                                        
464   CCalHcal                                        
465   CCalHcalOrganization                            
466   CCalMagneticField                               
467   CCalMaterial                                    
468   CCalMaterialFactory                             
469   CCalRotationMatrixFactory                       
470   CCalVOrganization                               
471   CCalVisManager                                  
472   CCalVisualisable                                
473   CCaloOrganization                               
474   CCalutils                                       
475   Geometry and material definitions for the de    
476         Notice in particular that:                
477           CCalHall, CCalEcal, CCalHcal derive     
478           CCalG4Hall, CCalG4Ecal, CCalG4Hcal d    
479              corresponding classes and from CC    
480           CCalEcalOrganization, CCalHcalOrgani    
481              CCalVOrganization : each sensitiv    
482              number for detector organization     
483              ID not an hardware/electronic one    
484                                                   
485   CCalHit                                         
486   CCalG4Hit                                       
487   CCalG4HitCollection                             
488   CCalSDList                                      
489   CCalSensAssign                                  
490   CCalSensitiveConfiguration                      
491   CCalSensitiveDetectors                          
492   CCaloSD                                         
493         Hit and Sensitive Detectors.              
494         Notice in particular that:                
495           CCalG4Hit derives from G4VHit and CC    
496           CCaloSD derives from G4VSensitiveDet    
497                                                   
498   CCalActionInitializer                           
499         User-action initialization.               
500                                                   
501   CCalAnalysis                                    
502   Analysis manager class.                         
503                                                   
504   CCalRunAction                                   
505   User run action class.                          
506                                                   
507   CCalEndOfEventAction                            
508   User event action class.                        
509                                                   
510   CCalStackingAction                              
511         User Stacking action class.               
512                                                   
513   CCalSteppingAction                              
514         User Stepping action class.               
515