Warning, /geant4/examples/extended/runAndEvent/RE06/README is written in an unsupported language. File is not indexed.
0001 -------------------------------------------------------------------
0002
0003 =========================================================
0004 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005 =========================================================
0006
0007 ExampleRE06
0008 ----------
0009
0010
0011 This example simulates three simplified sandwitch calorimeters.
0012 The main features demonstrated in this example are :
0013
0014 1. Utilizing a concrete run class derived from G4Run base class for
0015 accumulating physics quantities for a run
0016 2. Changing calorimeter geometries without re-building a world volume
0017 3. Defining geometrical regions and setting production thresholds
0018 for each region
0019 4. Demonstrating the use of primitive scorer and filter classes without
0020 implementing sensitive detector class
0021 5. Demonstrating the use of parallel scoring geometry and associating
0022 parallel world scoring process
0023 6. Measuring the timing spent for each region, both for all particle
0024 types and for e+/e-
0025
0026 It was moved in extended examples from novice/N07 with removal of
0027 novice examples.
0028
0029 **********************************************************************
0030 Note: Since this example utilizes its own RE06SteppingVerbose for the
0031 timing measurement, the user cannot get the ordinary verbosity with
0032 /tracking/verbose.
0033 **********************************************************************
0034
0035 1- Utilizing a concrete run class derived from G4Run base class for
0036 accumulating physics quantities for a run
0037
0038 G4Run is a class the user can inherit and create his/her own concrete
0039 class for accumulating information useful to him/her. It has a virtual
0040 method RecordEvent(const G4Event*), which will be invoked by G4RunManager
0041 at the end of processing each event. By implemeting this method in the
0042 user'r concrete run class, he/she can store information associating with
0043 G4Event class itself and hits collections attached with G4Event. In this
0044 example, RE06Run is the class derived from G4Run. In the method
0045 RE06Run::RecordEvent(const G4Event*), in addition to counting the
0046 number of events, all hits collections are accessed to accumulate
0047 energy depositions, step lengths and number of steps.
0048
0049 In case the user create his/her own run class, an object of this class
0050 must be instantiated in the method GenerateRun() of his/her concrete
0051 class derived from G4UserRunAction base class. The pointer to this run
0052 object must be returned by this method. In this example, RE06RunAction
0053 is the class which instantiating RE06Run class object. In
0054 RE06RunAction::EndOfRunAction(const G4Run*) method, RE06Run object
0055 is analized to output the run summary.
0056
0057 It should be noted that some information about generated secondaries
0058 are collected in RE06StackinAction instead of sensitive detector class.
0059 RE06StackingAction::ClassifyNewTrack(const G4Track*) method is used
0060 not for classifying tracks sent to the stack, but for accessing to all
0061 secondaries generated in an event.
0062
0063 2- Changing calorimeter geometries without re-building a world volume
0064
0065 In RE06DetectorConstruction, all solids, logical and physical volumes
0066 are constructed only once at the first invocation of Constuct() method.
0067 Positions and number of slices are changed not by re-constructing another
0068 objects but by modifying data members of already existing objects as
0069 it is implemented in RE06DetectorConstruction::SetNumberOfLayers(G4int)
0070 for changing the number of parameterized volumes, and also
0071 RE06DetectorConstruction::SetSerialGeometry(G4bool) for changing the
0072 position of placed volumes.
0073
0074 3- Defining geometrical regions and setting production thresholds
0075 for each region
0076
0077 Setting production thresholds (so-called production cuts) to individual
0078 region of a detector geometry is the new feature provided by Geant4 5.1
0079 release. This feature is also called as "Cuts per region".
0080
0081 Please note that this new feature is supporsed to be used only by the
0082 users,
0083 a) who is simulating most complex geometry such as an LHC detector,
0084 b) and who has enough experience of simulating EM showers in matter.
0085 We strongly recommend to compare the simulated results of this new
0086 feature with the results of the same geometry but having uniform
0087 production thresholds. Setting completely different cut values for
0088 individual region may break the coherent and comprehensive accuracy
0089 of the simulation. Thus such cut values should be carefully optimized
0090 by the user with comparison with results of uniform cuts.
0091
0092 In RE06DetectorConstruction::Construct(), Three objects of G4Region
0093 class are instantiated and set to the logical volumes of each of three
0094 calorimeter modules. Also, these individual logical volumes are
0095 registered as "root logical volume" so that all daghter volumes in
0096 these logical volumes are also affected by the corresponding regions.
0097
0098 In RE06PhysicsList::SetCuts(), in addition to set the default threshold
0099 values for the world volume, three threshold values are set to three
0100 calorimeter regions respectively. By setting production thresholds to
0101 a region, gamma, electron or positron will not be generated as a
0102 secondary if its range is shorter than the production threshold of that
0103 particular region. Please note that some EM processes still generate
0104 such secondary below threshold.
0105
0106 4- Demonstrating the use of primitive scorer and filter classes without
0107 implementing sensitive detector class
0108
0109 In RE06DetectorConstruction::SetupDetector() method, concrete classes
0110 G4PSEnergyDeposit, G4PSNofSecondary, G4PSTrackLength, G4PSNofStep and
0111 G4PSMinKinEAtGeneration, all of thich are derivalable of G4VPrimitiveScorer,
0112 are used to define the sensitivity of the calorimeter. All of them are
0113 registered to G4MultiFunctionalDetector and this detector object is set
0114 to the logical volume. G4SDParticleFilter is used to define the particle
0115 type(s) to be scored.
0116
0117 In RE06Run::RecordEvent() method, the way of retreiving G4THitsMap
0118 from each primitive scorer via G4HCofThisEvent is demonstrated.
0119 In RE06RunAction::EndOfRunAction(), Run is summarized with data kept
0120 in RE06Run class object.
0121
0122 5- Demonstrating the use of parallel scoring geometry and associating
0123 parallel world scoring process
0124
0125 In RE06PhysicsList::ConstructGeneral(), G4ParallelWorldScoringProcess is
0126 assigned to all the particle types. This process invokes sensitive detectors
0127 (and scorers) defined in the parallel world "ParallelScoringWorld", the
0128 name of the parallel world which is defined in main() (exampleRE06.cc) as
0129 an argument of RE06ParallelWorld constructor.
0130
0131 As implemented in RE06ParallelWorld::SetupGeometry(), the world volume of
0132 the parallel world is obtained by GetWorld() method as a clone copy of the
0133 world volume of the mass geometry. The user should not create the world volume.
0134
0135 RE06ParallelWorld defines three cylindrical volumes, each of them is
0136 located at the same position as three sandwitch calorimeters defined
0137 in the mass geometry (RE06DetectorConstruction). Each cylinder is replicated
0138 in Rho to define 20 layers, and scores the same quantities as the mass geometry.
0139 These three cylinders are relocated accordingly when the mass geometry is
0140 modified by RE06DetectorConstruction::SetSerialGeometry().
0141
0142 6- Measuring the timing spent for each region, both for all particle
0143 types and for e+/e-
0144
0145 RE06SteppingVerbose class has two G4SliceTimer class objects for each
0146 detector region. One G4SliceTimer is measuring the time spent by a step
0147 in a region for all types of particles, and another is measuring for
0148 e+/e- only.
0149
0150 RE06SteppingVerbose::InitializeTimers() is invoked by RE06RunAction::
0151 BeginOfRunAction(), and checks the number of regions appear in the
0152 geometry and instantiates the necessary number of timers. Thus, this
0153 RE06SteppingVerbose class can be used for any kind of geometry the user
0154 defines without any modification. Given G4VSteppingVerbose is not invoked
0155 if the verbosity of G4SteppingManager is 0, this verbosity is set to 1.
0156
0157 NewStep() and StepInfo() are the methods defined in G4VSteppingVerbose
0158 base class, and they are invoked at the beginning and the end of every
0159 step, respectively, from G4SteppingManager. Thus, these methods are
0160 utilized in RE06SteppingVerbose to start/resume and pause the timer.
0161
0162 RE06SteppingVerbose::Report() method is used by RE06RunAction::
0163 EndOfRunAction() to get the timing measured.
0164
0165 7- Macro files
0166
0167 exampleRE06.in
0168 To be used for batch mode. The reference output file is made by this
0169 macro file.
0170
0171 sample.mac
0172 To be used for interactive mode. Issue "/control/execute sample.mac"
0173 when "Idle>" prompt appears.
0174
0175 vis.mac
0176 Setting visualization parameters. This macro file will be called
0177 automatically when interactive execution starts.
0178
0179 8- UI commands defined in this example
0180
0181 Command /RE06/setAbsMat
0182 Guidance :
0183 Select Material of the Absorber.
0184
0185 Parameter : choice
0186 Parameter type : s
0187 Omittable : False
0188 Candidates : Aluminium liquidArgon Lead Water Scintillator Air Galactic
0189
0190
0191
0192 Command /RE06/setGapMat
0193 Guidance :
0194 Select Material of the Gap.
0195
0196 Parameter : choice
0197 Parameter type : s
0198 Omittable : False
0199 Candidates : Aluminium liquidArgon Lead Water Scintillator Air Galactic
0200
0201
0202
0203 Command /RE06/numberOfLayers
0204 Guidance :
0205 Set number of layers.
0206 Range of parameters : nl>0
0207
0208 Parameter : nl
0209 Parameter type : i
0210 Omittable : False
0211
0212
0213
0214 Command /RE06/serialGeometry
0215 Guidance :
0216 Select calorimeters to be placed in serial or parallel.
0217
0218 Parameter : serialize
0219 Parameter type : b
0220 Omittable : False
0221
0222