Geant4 Cross Reference |
>> 1 $Id: README,v 1.8 2007/03/19 13:08:41 maire Exp $ 1 ---------------------------------------------- 2 ------------------------------------------------------------------- 2 3 3 ========================================= 4 ========================================================= 4 Geant4 - an Object-Oriented Toolkit for S 5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP 5 ========================================= 6 ========================================================= 6 7 7 fanoCavity 8 fanoCavity 8 ---------- 9 ---------- 9 10 10 This program computes the dose deposited i 11 This program computes the dose deposited in an ionization chamber by a 11 monoenergetic photon beam. 12 monoenergetic photon beam. 12 The geometry of the chamber satisfies the 13 The geometry of the chamber satisfies the conditions of charged particle 13 equilibrium. Hence, under idealized condit 14 equilibrium. Hence, under idealized conditions, the ratio of the dose 14 deposited over the beam energy fluence mus 15 deposited over the beam energy fluence must be equal to the 15 mass_energy_transfer coefficient of the wa 16 mass_energy_transfer coefficient of the wall material. 16 17 17 E.Poon and al, Phys. Med. Biol. 50 (2005) 18 E.Poon and al, Phys. Med. Biol. 50 (2005) 681 18 I.Kawrakow, Med. Phys. 27-3 (2000) 499 19 I.Kawrakow, Med. Phys. 27-3 (2000) 499 19 << 20 20 1- GEOMETRY 21 1- GEOMETRY 21 22 22 The chamber is modelized as a cylinder wit 23 The chamber is modelized as a cylinder with a cavity in it. 23 << 24 24 6 parameters define the geometry : 25 6 parameters define the geometry : 25 - the material of the wall of the chambe 26 - the material of the wall of the chamber 26 - the radius of the chamber and the thic 27 - the radius of the chamber and the thickness of the wall 27 - the material of the cavity 28 - the material of the cavity 28 - the radius and the thickness of the ca 29 - the radius and the thickness of the cavity 29 30 30 Wall and cavity must be made of the same m 31 Wall and cavity must be made of the same material, but with different 31 density << 32 density 32 << 33 33 All above parameters can be redifined via 34 All above parameters can be redifined via the UI commands built in 34 DetectorMessenger class 35 DetectorMessenger class 35 36 36 ----------------- << 37 ----------------- 37 | | << 38 | | 38 | wall | << 39 | wall | 39 | ----- | << 40 | ----- | 40 | | | | << 41 | | | | 41 | | <-+-----+--- cavit << 42 | | <-+-----+--- cavity 42 ------> | | | | << 43 ------> | | | | 43 ------> | | | | << 44 ------> | | | | 44 beam -------------------------------- c << 45 beam -------------------------------- cylinder axis 45 ------> | | | | << 46 ------> | | | | 46 ------> | | | | << 47 ------> | | | | 47 | | | | << 48 | | | | 48 | | | | << 49 | | | | 49 | ----- | << 50 | ----- | 50 | | << 51 | | 51 | | << 52 | | 52 ----------------- << 53 ----------------- 53 << 54 54 2- BEAM 55 2- BEAM 55 56 56 Monoenergetic incident photon beam is unif 57 Monoenergetic incident photon beam is uniformly distribued, perpendicular 57 to the flat end of the chamber. The beam r 58 to the flat end of the chamber. The beam radius can be controled with an 58 UI command built in PrimaryGeneratorMessen 59 UI command built in PrimaryGeneratorMessenger; the default is full wall 59 chamber radius. 60 chamber radius. 60 61 61 Beam regeneration : after each Compton int 62 Beam regeneration : after each Compton interaction, the scattered photon is 62 reset to its initial state, energy and dir 63 reset to its initial state, energy and direction. Consequently, interaction 63 sites are uniformly distribued within the 64 sites are uniformly distribued within the wall material. 64 65 65 This modification must be done in the Part 66 This modification must be done in the ParticleChange of the final state 66 of the Compton scattering interaction. The 67 of the Compton scattering interaction. Therefore, a specific model 67 (MyKleinNishinaCompton) is assigned to the 68 (MyKleinNishinaCompton) is assigned to the ComptonScattering process in 68 PhysicsList. MyKleinNishinaCompton inherit 69 PhysicsList. MyKleinNishinaCompton inherites from G4KleinNishinaCompton; 69 only the function SampleSecondaries() is o 70 only the function SampleSecondaries() is overwritten. 70 71 71 3- PURPOSE OF THE PROGRAM 72 3- PURPOSE OF THE PROGRAM 72 73 73 The program computes the dose deposited in 74 The program computes the dose deposited in the cavity and the ratio 74 Dose/Beam_energy_fluence. This ratio is co 75 Dose/Beam_energy_fluence. This ratio is compared to the mass_energy_transfer 75 coefficient of the wall material. 76 coefficient of the wall material. 76 77 77 The mass_energy_transfer coefficient needs 78 The mass_energy_transfer coefficient needs : 78 - the photon total cross section, whic << 79 - the photon total cross section, which is read from the PhysicsTables 79 by G4EmCalculator (see EndOfRunActio << 80 by G4EmCalculator (see EndOfRunAction). 80 - the average kinetic energy of charge << 81 - the average kinetic energy of charged secondaries generated in the 81 wall during the run. << 82 wall during the run. 82 83 83 The program needs high statistic to reach 84 The program needs high statistic to reach precision on the computed dose. 84 The UI command /run/printProgress allows t << 85 The UI command /testem/event/printModulo allows to survey the convergence of 85 the kineticEnergy and dose calculations. 86 the kineticEnergy and dose calculations. 86 87 87 In addition, to increase the program effic 88 In addition, to increase the program efficiency, the secondary particles 88 which have no chance to reach the cavity a 89 which have no chance to reach the cavity are immediately killed (see 89 StackinAction). This feature can be switch 90 StackinAction). This feature can be switched off by an UI command (see 90 StackingMessenger). 91 StackingMessenger). 91 92 92 The simplest way to study the effect of e- 93 The simplest way to study the effect of e- tracking parameters on dose 93 deposition is to use the command /testem/s 94 deposition is to use the command /testem/stepMax. 94 << 95 95 4- PHYSICS 96 4- PHYSICS 96 97 97 The physics lists contains the standard el << 98 The physics list contains the standard electromagnetic processes, with few 98 modifications listed here. 99 modifications listed here. 99 100 100 - Compton scattering : as explained above, 101 - Compton scattering : as explained above, the final state is modified in 101 MyKleinNishinaCompton class. 102 MyKleinNishinaCompton class. 102 103 >> 104 The Compton cross section is set to zero in cavity, to force the charged >> 105 particle fluence conservation. >> 106 103 In order to make the program more efficien 107 In order to make the program more efficient, one can increase the Compton 104 cross section via the function SetCSFactor << 108 cross section in wall via the function SetCSFactor(factor) and its 105 associated UI command. Default is factor=1 109 associated UI command. Default is factor=1000. 106 110 107 - Bremsstrahlung : Fano conditions imply n 111 - Bremsstrahlung : Fano conditions imply no energy transfer via 108 bremsstrahlung radiation. Therefore this p 112 bremsstrahlung radiation. Therefore this process is not registered in the 109 physics list. However, it is always possib << 113 physics list. However, it is always possible to include it via an UI 110 See PhysListEmStandard class. << 114 command. See PhysicsListMessenger class. 111 115 112 - Ionisation : In order to have same stopp 116 - Ionisation : In order to have same stopping power in wall and cavity, one 113 must cancel the density correction term in 117 must cancel the density correction term in the dedx formula. This is done in 114 a specific MollerBhabha model (MyMollerBha 118 a specific MollerBhabha model (MyMollerBhabhaModel) which inherites from 115 G4MollerBhabhaModel. 119 G4MollerBhabhaModel. 116 120 117 To prevent explicit generation of delta-ra 121 To prevent explicit generation of delta-rays, the default production 118 threshold (i.e. cut) is set to 10 km (CSDA 122 threshold (i.e. cut) is set to 10 km (CSDA condition). 119 123 120 The finalRange of the step function is set 124 The finalRange of the step function is set to 10 um, which more on less 121 correspond to a tracking cut in water of a 125 correspond to a tracking cut in water of about 20 keV. See emOptions. 122 Once again, the above parameters can be co << 126 Once again, the above parameters can be controled via UI commands. 123 << 127 124 - Multiple scattering : is switched in sin << 125 boundaries. This is selected via EM option << 126 controled with UI commands. << 127 << 128 - All PhysicsTables are built with 100 bin << 129 << 130 5- HISTOGRAMS 128 5- HISTOGRAMS 131 129 132 fanoCavity has several predefined 1D histog 130 fanoCavity has several predefined 1D histograms : 133 131 134 1 : emission point of e+- 132 1 : emission point of e+- 135 2 : energy spectrum of e+- 133 2 : energy spectrum of e+- 136 3 : theta distribution of e+- 134 3 : theta distribution of e+- 137 4 : emission point of e+- hitting cavity 135 4 : emission point of e+- hitting cavity 138 5 : energy spectrum of e+- when entering 136 5 : energy spectrum of e+- when entering in cavity 139 6 : theta distribution of e+- before ent 137 6 : theta distribution of e+- before enter in cavity 140 7 : theta distribution of e+- at first s 138 7 : theta distribution of e+- at first step in cavity 141 8 : track segment of e+- in cavity 139 8 : track segment of e+- in cavity 142 9 : step size of e+- in wall 140 9 : step size of e+- in wall 143 10 : step size of e+- in cavity 141 10 : step size of e+- in cavity 144 11 : energy deposit in cavity per track << 145 142 146 The histograms are managed by G4AnalysisMan << 143 The histograms are managed by the HistoManager class and its Messenger. 147 The histos can be individually activated wi 144 The histos can be individually activated with the command : 148 /analysis/h1/set id nbBins valMin valMax u << 145 /testem/histo/setHisto id nbBins valMin valMax unit 149 where unit is the desired unit for the hist 146 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..) 150 147 151 One can control the name of the histograms 148 One can control the name of the histograms file with the command: 152 /analysis/setFileName name (default fanoC << 149 /testem/histo/setFileName name (default fanoCavity) 153 << 154 It is possible to choose the format of the << 155 hdf5, xml, csv, by changing the default fil << 156 150 157 It is also possible to print selected histo << 151 It is possible to choose the format of the histogram file (hbook, root, XML) 158 /analysis/h1/setAscii id << 152 with the command /testem/histo/setFileType (hbook by default) 159 All selected histos will be written on a fi << 153 160 << 154 Note that, by default, histograms are disabled. To activate them, uncomment >> 155 the flag G4ANALYSIS_USE in GNUmakefile. >> 156 161 6- HOW TO START ? 157 6- HOW TO START ? 162 158 163 - execute fanoCavity in 'batch' mode from << 159 - compile and link to generate an executable 164 % fanoCavity run01.mac << 160 % cd geant4/examples/extended/medical/fanoCavity 165 << 161 % gmake 166 - execute fanoCavity in 'interactive mode' << 162 167 % fanoCavity << 163 - execute fanoCavity in 'batch' mode from macro files 168 .... << 164 % fanoCavity run01.mac 169 Idle> type your commands << 165 170 .... << 166 - execute fanoCavity in 'interactive mode' with visualization 171 Idle> exit << 167 % fanoCavity >> 168 .... >> 169 Idle> type your commands >> 170 .... >> 171 Idle> exit >> 172 >> 173 7- USING HISTOGRAMS >> 174 >> 175 To use histograms, at least one of the AIDA implementations should be >> 176 available (see http://aida.freehep.org). >> 177 >> 178 8a - PI >> 179 >> 180 A package including AIDA and extended interfaces also using Python is PI, >> 181 available from: http://cern.ch/pi 172 182 173 Alternative macro file: << 183 Once installed PI or PI-Lite in a specified local area $MYPY, it is required 174 basic.mac - disabled multiple scattering a << 184 to add the installation path to $PATH, i.e. for example, for release 1.2.1 of >> 185 PI: >> 186 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin >> 187 >> 188 CERN users can use the PATH to the LCG area on AFS. >> 189 Before running the example the command should be issued: >> 190 eval `aida-config --runtime csh` >> 191 >> 192 8b - OpenScientist >> 193 >> 194 OpenScientist is available at http://OpenScientist.lal.in2p3.fr. >> 195 >> 196 You have to "setup" the OpenScientist AIDA implementation before compiling >> 197 (then with G4ANALYSIS_USE set) and running your Geant4 application. >> 198 >> 199 On UNIX you setup, with a csh flavoured shell : >> 200 csh> source <<OpenScientist install path>/aida-setup.csh >> 201 or with a sh flavoured shell : >> 202 sh> . <<OpenScientist install path>/aida-setup.sh >> 203 On Windows : >> 204 DOS> call <<OpenScientist install path>/aida-setup.bat >> 205 >> 206 You can use various file formats for writing (AIDA-XML, hbook, root). >> 207 These formats are readable by the Lab onx interactive program >> 208 or the OpenPAW application. See the web pages. >> 209 >> 210 >> 211 With OpenPAW, on a run.hbook file, one can view the histograms >> 212 with something like : >> 213 OS> opaw >> 214 opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root) >> 215 opaw> zone 2 2 >> 216 opaw> h/plot 1 >> 217 opaw> h/plot 2