Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/runAndEvent/RE06/README.md is written in an unsupported language. File is not indexed.

0001 \page ExampleRE06 Example RE06
0002 
0003  This example simulates three simplified sandwitch calorimeters.
0004  The main features demonstrated in this example are :
0005 
0006 -# Utilizing a concrete run class derived from G4Run base class for
0007    accumulating physics quantities for a run
0008 -# Changing calorimeter geometries without re-building a world volume
0009 -# Defining geometrical regions and setting production thresholds
0010    for each region
0011 -# Demonstrating the use of primitive scorer and filter classes without
0012    implementing sensitive detector class
0013 -# Demonstrating the use of parallel scoring geometry and associating
0014    parallel world scoring process
0015 -# Measuring the timing spent for each region, both for all particle
0016    types and for e+/e-
0017 
0018  It was moved in extended examples from novice/N07 with removal of
0019  novice examples. 
0020 
0021  <i> Note: Since this example utilizes its own RE06SteppingVerbose for the
0022  timing measurement, the user cannot get the ordinary verbosity with
0023  /tracking/verbose. </i>
0024 
0025 ## Utilizing a concrete run class derived from G4Run base class for accumulating physics quantities for a run
0026 
0027  G4Run is a class the user can inherit and create his/her own concrete
0028  class for accumulating information useful to him/her. It has a virtual
0029  method RecordEvent(const G4Event*), which will be invoked by G4RunManager
0030  at the end of processing each event. By implemeting this method in the
0031  user'r concrete run class, he/she can store information associating with
0032  G4Event class itself and hits collections attached with G4Event. In this
0033  example, RE06Run is the class derived from G4Run. In the method
0034  RE06Run::RecordEvent(const G4Event*), in addition to counting the
0035  number of events, all hits collections are accessed to accumulate
0036  energy depositions, step lengths and number of steps.
0037 
0038  In case the user create his/her own run class, an object of this class
0039  must be instantiated in the method GenerateRun() of his/her concrete
0040  class derived from G4UserRunAction base class. The pointer to this run
0041  object must be returned by this method. In this example, RE06RunAction
0042  is the class which instantiating RE06Run class object.  In
0043  RE06RunAction::EndOfRunAction(const G4Run*) method, RE06Run object
0044  is analized to output the run summary.
0045          
0046 ## Changing calorimeter geometries without re-building a world volume
0047 
0048  In RE06DetectorConstruction, all solids, logical and physical volumes
0049  are constructed only once at the first invocation of RE06DetectorConstruction::Constuct() method.
0050  Positions and number of slices are changed not by re-constructing another
0051  objects but by modifying data members of already existing objects as
0052  it is implemented in RE06DetectorConstruction::SetNumberOfLayers(G4int)
0053  for changing the number of parameterized volumes, and also
0054  RE06DetectorConstruction::SetSerialGeometry(G4bool) for changing the
0055  position of placed volumes.
0056  
0057 ## Defining geometrical regions and setting production thresholds for each region
0058 
0059   Setting production thresholds (so-called production cuts) to individual
0060   region of a detector geometry is the new feature provided by Geant4 5.1
0061   release. This feature is also called as "Cuts per region".
0062 
0063   Please note that this new feature is supporsed to be used only by the
0064   users,
0065    a) who is simulating most complex geometry such as an LHC detector,
0066    b) and who has enough experience of simulating EM showers in matter.
0067   We strongly recommend to compare the simulated results of this new
0068   feature with the results of the same geometry but having uniform 
0069   production thresholds. Setting completely different cut values for
0070   individual region may break the coherent and comprehensive accuracy
0071   of the simulation. Thus such cut values should be carefully optimized
0072   by the user with comparison with results of uniform cuts.
0073 
0074   In RE06DetectorConstruction::Construct(), Three objects of G4Region
0075   class are instantiated and set to the logical volumes of each of three
0076   calorimeter modules. Also, these individual logical volumes are
0077   registered as "root logical volume" so that all daghter volumes in
0078   these logical volumes are also affected by the corresponding regions.
0079 
0080 ## Demonstrating the use of primitive scorer and filter classes without implementing sensitive detector class
0081 
0082  In RE06DetectorConstruction::SetupDetectors() method, concrete classes
0083  G4PSEnergyDeposit, G4PSNofSecondary, G4PSTrackLength, G4PSNofStep and
0084  G4PSMinKinEAtGeneration, all of thich are derivalable of G4VPrimitiveScorer,
0085  are used to define the sensitivity of the calorimeter. All of them are
0086  registered to G4MultiFunctionalDetector and this detector object is set
0087  to the logical volume. G4SDParticleFilter is used to define the particle
0088  type(s) to be scored.
0089 
0090  In RE06Run::RecordEvent() method, the way of retreiving G4THitsMap
0091  from each primitive scorer via G4HCofThisEvent is demonstrated.
0092  In RE06RunAction::EndOfRunAction(), Run is summarized with data kept
0093  in RE06Run class object.
0094 
0095 ## Demonstrating the use of parallel scoring geometry and associating parallel world scoring process
0096 
0097  G4ParallelWorldScoringProcess is
0098  assigned to all the particle types. This process invokes sensitive detectors
0099  (and scorers) defined in the parallel world "ParallelScoringWorld", the
0100  name of the parallel world which is defined in main() as
0101  an argument of RE06ParallelWorld constructor.
0102  
0103  As implemented in RE06ParallelWorld::SetupGeometry(), the world volume of
0104  the parallel world is obtained by GetWorld() method as a clone copy of the
0105  world volume of the mass geometry. The user should not create the world volume.
0106 
0107  RE06ParallelWorld defines three cylindrical volumes, each of them is
0108  located at the same position as three sandwitch calorimeters defined
0109  in the mass geometry (RE06DetectorConstruction). Each cylinder is replicated
0110  in Rho to define 20 layers, and scores the same quantities as the mass geometry.
0111  These three cylinders are relocated accordingly when the mass geometry is
0112  modified by RE06DetectorConstruction::SetSerialGeometry().
0113 
0114 ## Measuring the timing spent for each region, both for all particle types and for e+/e-
0115 
0116  RE06SteppingVerbose class has two G4SliceTimer class objects for each
0117  detector region. One G4SliceTimer is measuring the time spent by a step
0118  in a region for all types of particles, and another is measuring for
0119  e+/e- only. 
0120 
0121  RE06SteppingVerbose::InitializeTimers() is invoked by RE06RunAction::
0122  BeginOfRunAction(), and checks the number of regions appear in the
0123  geometry and instantiates the necessary number of timers. Thus, this
0124  RE06SteppingVerbose class can be used for any kind of geometry the user
0125  defines without any modification. Given G4VSteppingVerbose is not invoked
0126  if the verbosity of G4SteppingManager is 0, this verbosity is set to 1.
0127 
0128  NewStep() and StepInfo() are the methods defined in G4VSteppingVerbose
0129  base class, and they are invoked at the beginning and the end of every
0130  step, respectively, from G4SteppingManager. Thus, these methods are
0131  utilized in RE06SteppingVerbose to start/resume and pause the timer.
0132 
0133  RE06SteppingVerbose::Report() method is used by RE06RunAction::
0134  EndOfRunAction() to get the timing measured.
0135 
0136 ## Macro files
0137 
0138  - exampleRE06.in \n
0139     To be used for batch mode. The reference output file is made by this
0140     macro file.
0141 
0142  - sample.mac \n
0143     To be used for interactive mode. Issue "/control/execute sample.mac"
0144     when "Idle>" prompt appears.
0145 
0146  - vis.mac \n
0147     Setting visualization parameters. This macro file will be called 
0148     automatically when interactive execution starts.
0149 
0150 ## UI commands defined in this example
0151  
0152 - Select Material of the Absorber, Gap, add materials:
0153 ```
0154 /RE06/setAbsMat matName
0155 /RE06/setGapMat matName
0156 /RE06/AddMaterial
0157 ```
0158 - Set number of layers:
0159 ```
0160 /RE06/numberOfLayers nofLayers
0161 ```
0162 - Select calorimeters to be placed in serial or parallel:
0163 ```
0164 /RE06/serialGeometry True|False
0165 ```
0166 
0167 See the complete guidance with `/control/manual RE06`.