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

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 2418 bytes       2024-12-05 15:16:16
File GNUmakefile 425 bytes       2024-12-05 15:16:16
File History 4685 bytes       2024-12-05 15:16:16
File README 9981 bytes       2024-12-05 15:16:16
File exampleRE06.MIC.in 102 bytes       2024-12-05 15:16:16
C++ file exampleRE06.cc 4114 bytes       2024-12-05 15:16:16
File exampleRE06.fileIO.in 1287 bytes       2024-12-05 15:16:16
File exampleRE06.in 840 bytes       2024-12-05 15:16:16
File exampleRE06.large_N.in 536 bytes       2024-12-05 15:16:16
File exampleRE06.out 109652 bytes       2024-12-05 15:16:16
File retrieve.mac 922 bytes       2024-12-05 15:16:16
File retrieve_org.mac 452 bytes       2024-12-05 15:16:16
File sample.mac 487 bytes       2024-12-05 15:16:16
File store.mac 390 bytes       2024-12-05 15:16:16
File vis.mac 2058 bytes       2024-12-05 15:16:16

  1 -------------------------------------------------------------------
  2 
  3      =========================================================
  4      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  5      =========================================================
  6 
  7                             ExampleRE06
  8                             ----------
  9 
 10 
 11      This example simulates three simplified sandwitch calorimeters.
 12      The main features demonstrated in this example are :
 13 
 14      1. Utilizing a concrete run class derived from G4Run base class for
 15        accumulating physics quantities for a run
 16      2. Changing calorimeter geometries without re-building a world volume
 17      3. Defining geometrical regions and setting production thresholds
 18        for each region
 19      4. Demonstrating the use of primitive scorer and filter classes without
 20        implementing sensitive detector class
 21      5. Demonstrating the use of parallel scoring geometry and associating
 22        parallel world scoring process
 23      6. Measuring the timing spent for each region, both for all particle
 24        types and for e+/e-
 25 
 26     It was moved in extended examples from novice/N07 with removal of
 27     novice examples. 
 28 
 29      **********************************************************************
 30      Note: Since this example utilizes its own RE06SteppingVerbose for the
 31        timing measurement, the user cannot get the ordinary verbosity with
 32        /tracking/verbose.
 33      **********************************************************************
 34 
 35  1- Utilizing a concrete run class derived from G4Run base class for
 36     accumulating physics quantities for a run
 37  
 38     G4Run is a class the user can inherit and create his/her own concrete
 39     class for accumulating information useful to him/her. It has a virtual
 40     method RecordEvent(const G4Event*), which will be invoked by G4RunManager
 41     at the end of processing each event. By implemeting this method in the
 42     user'r concrete run class, he/she can store information associating with
 43     G4Event class itself and hits collections attached with G4Event. In this
 44     example, RE06Run is the class derived from G4Run. In the method
 45     RE06Run::RecordEvent(const G4Event*), in addition to counting the
 46     number of events, all hits collections are accessed to accumulate
 47     energy depositions, step lengths and number of steps.
 48 
 49     In case the user create his/her own run class, an object of this class
 50     must be instantiated in the method GenerateRun() of his/her concrete
 51     class derived from G4UserRunAction base class. The pointer to this run
 52     object must be returned by this method. In this example, RE06RunAction
 53     is the class which instantiating RE06Run class object.  In
 54     RE06RunAction::EndOfRunAction(const G4Run*) method, RE06Run object
 55     is analized to output the run summary.
 56 
 57     It should be noted that some information about generated secondaries
 58     are collected in RE06StackinAction instead of sensitive detector class.
 59     RE06StackingAction::ClassifyNewTrack(const G4Track*) method is used
 60     not for classifying tracks sent to the stack, but for accessing to all
 61     secondaries generated in an event. 
 62          
 63  2- Changing calorimeter geometries without re-building a world volume
 64 
 65     In RE06DetectorConstruction, all solids, logical and physical volumes
 66     are constructed only once at the first invocation of Constuct() method.
 67     Positions and number of slices are changed not by re-constructing another
 68     objects but by modifying data members of already existing objects as
 69     it is implemented in RE06DetectorConstruction::SetNumberOfLayers(G4int)
 70     for changing the number of parameterized volumes, and also
 71     RE06DetectorConstruction::SetSerialGeometry(G4bool) for changing the
 72     position of placed volumes.
 73  
 74  3- Defining geometrical regions and setting production thresholds
 75     for each region
 76 
 77     Setting production thresholds (so-called production cuts) to individual
 78     region of a detector geometry is the new feature provided by Geant4 5.1
 79     release. This feature is also called as "Cuts per region".
 80 
 81     Please note that this new feature is supporsed to be used only by the
 82     users,
 83      a) who is simulating most complex geometry such as an LHC detector,
 84      b) and who has enough experience of simulating EM showers in matter.
 85     We strongly recommend to compare the simulated results of this new
 86     feature with the results of the same geometry but having uniform 
 87     production thresholds. Setting completely different cut values for
 88     individual region may break the coherent and comprehensive accuracy
 89     of the simulation. Thus such cut values should be carefully optimized
 90     by the user with comparison with results of uniform cuts.
 91 
 92     In RE06DetectorConstruction::Construct(), Three objects of G4Region
 93     class are instantiated and set to the logical volumes of each of three
 94     calorimeter modules. Also, these individual logical volumes are
 95     registered as "root logical volume" so that all daghter volumes in
 96     these logical volumes are also affected by the corresponding regions.
 97 
 98     In RE06PhysicsList::SetCuts(), in addition to set the default threshold
 99     values for the world volume, three threshold values are set to three
100     calorimeter regions respectively. By setting production thresholds to
101     a region, gamma, electron or positron will not be generated as a
102     secondary if its range is shorter than the production threshold of that
103     particular region. Please note that some EM processes still generate
104     such secondary below threshold.
105 
106  4- Demonstrating the use of primitive scorer and filter classes without
107     implementing sensitive detector class
108 
109     In RE06DetectorConstruction::SetupDetector() method, concrete classes
110     G4PSEnergyDeposit, G4PSNofSecondary, G4PSTrackLength, G4PSNofStep and
111     G4PSMinKinEAtGeneration, all of thich are derivalable of G4VPrimitiveScorer,
112     are used to define the sensitivity of the calorimeter. All of them are
113     registered to G4MultiFunctionalDetector and this detector object is set
114     to the logical volume. G4SDParticleFilter is used to define the particle
115     type(s) to be scored.
116 
117     In RE06Run::RecordEvent() method, the way of retreiving G4THitsMap
118     from each primitive scorer via G4HCofThisEvent is demonstrated.
119     In RE06RunAction::EndOfRunAction(), Run is summarized with data kept
120     in RE06Run class object.
121 
122  5- Demonstrating the use of parallel scoring geometry and associating
123     parallel world scoring process
124 
125     In RE06PhysicsList::ConstructGeneral(), G4ParallelWorldScoringProcess is
126     assigned to all the particle types. This process invokes sensitive detectors
127     (and scorers) defined in the parallel world "ParallelScoringWorld", the
128     name of the parallel world which is defined in main() (exampleRE06.cc) as
129     an argument of RE06ParallelWorld constructor.
130     
131     As implemented in RE06ParallelWorld::SetupGeometry(), the world volume of
132     the parallel world is obtained by GetWorld() method as a clone copy of the
133     world volume of the mass geometry. The user should not create the world volume.
134 
135     RE06ParallelWorld defines three cylindrical volumes, each of them is
136     located at the same position as three sandwitch calorimeters defined
137     in the mass geometry (RE06DetectorConstruction). Each cylinder is replicated
138     in Rho to define 20 layers, and scores the same quantities as the mass geometry.
139     These three cylinders are relocated accordingly when the mass geometry is
140     modified by RE06DetectorConstruction::SetSerialGeometry().
141 
142  6- Measuring the timing spent for each region, both for all particle
143     types and for e+/e-
144  
145     RE06SteppingVerbose class has two G4SliceTimer class objects for each
146     detector region. One G4SliceTimer is measuring the time spent by a step
147     in a region for all types of particles, and another is measuring for
148     e+/e- only. 
149 
150     RE06SteppingVerbose::InitializeTimers() is invoked by RE06RunAction::
151     BeginOfRunAction(), and checks the number of regions appear in the
152     geometry and instantiates the necessary number of timers. Thus, this
153     RE06SteppingVerbose class can be used for any kind of geometry the user
154     defines without any modification. Given G4VSteppingVerbose is not invoked
155     if the verbosity of G4SteppingManager is 0, this verbosity is set to 1.
156 
157     NewStep() and StepInfo() are the methods defined in G4VSteppingVerbose
158     base class, and they are invoked at the beginning and the end of every
159     step, respectively, from G4SteppingManager. Thus, these methods are
160     utilized in RE06SteppingVerbose to start/resume and pause the timer.
161 
162     RE06SteppingVerbose::Report() method is used by RE06RunAction::
163     EndOfRunAction() to get the timing measured.
164 
165  7- Macro files
166 
167   exampleRE06.in
168     To be used for batch mode. The reference output file is made by this
169     macro file.
170 
171   sample.mac
172     To be used for interactive mode. Issue "/control/execute sample.mac"
173     when "Idle>" prompt appears.
174 
175   vis.mac
176     Setting visualization parameters. This macro file will be called 
177     automatically when interactive execution starts.
178 
179  8- UI commands defined in this example
180  
181 Command /RE06/setAbsMat
182 Guidance :
183 Select Material of the Absorber.
184 
185 Parameter : choice
186  Parameter type  : s
187  Omittable       : False
188  Candidates      : Aluminium liquidArgon Lead Water Scintillator Air Galactic 
189 
190 
191 
192 Command /RE06/setGapMat
193 Guidance :
194 Select Material of the Gap.
195 
196 Parameter : choice
197  Parameter type  : s
198  Omittable       : False
199  Candidates      : Aluminium liquidArgon Lead Water Scintillator Air Galactic 
200 
201 
202 
203 Command /RE06/numberOfLayers
204 Guidance :
205 Set number of layers.
206  Range of parameters : nl>0
207 
208 Parameter : nl
209  Parameter type  : i
210  Omittable       : False
211 
212 
213 
214 Command /RE06/serialGeometry
215 Guidance :
216 Select calorimeters to be placed in serial or parallel.
217 
218 Parameter : serialize
219  Parameter type  : b
220  Omittable       : False
221 
222