1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // Code developed by: |
---|
28 | // S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli |
---|
29 | // |
---|
30 | // Code review: MGP, 5 November 2006 (still to be completed) |
---|
31 | // |
---|
32 | // ********************************** |
---|
33 | // * * |
---|
34 | // * BrachyPhysicsList.cc * |
---|
35 | // * * |
---|
36 | // ********************************** |
---|
37 | // |
---|
38 | // $Id: BrachyPhysicsList.cc,v 1.13 2006/11/15 10:02:17 guatelli Exp $ |
---|
39 | // GEANT4 tag $Name: $ |
---|
40 | // |
---|
41 | #include "BrachyPhysicsList.hh" |
---|
42 | |
---|
43 | #include "G4ParticleDefinition.hh" |
---|
44 | #include "G4ProductionCutsTable.hh" |
---|
45 | #include "G4ProcessManager.hh" |
---|
46 | #include "G4ParticleTypes.hh" |
---|
47 | #include "G4UnitsTable.hh" |
---|
48 | #include "G4ios.hh" |
---|
49 | |
---|
50 | #include "G4MultipleScattering.hh" |
---|
51 | // gamma |
---|
52 | #include "G4LowEnergyRayleigh.hh" |
---|
53 | #include "G4LowEnergyPhotoElectric.hh" |
---|
54 | #include "G4LowEnergyCompton.hh" |
---|
55 | #include "G4LowEnergyGammaConversion.hh" |
---|
56 | // e- |
---|
57 | #include "G4LowEnergyIonisation.hh" |
---|
58 | #include "G4LowEnergyBremsstrahlung.hh" |
---|
59 | // e+ |
---|
60 | #include "G4eIonisation.hh" |
---|
61 | #include "G4eBremsstrahlung.hh" |
---|
62 | #include "G4eplusAnnihilation.hh" |
---|
63 | |
---|
64 | BrachyPhysicsList::BrachyPhysicsList(): G4VUserPhysicsList() |
---|
65 | { |
---|
66 | SetVerboseLevel(1); |
---|
67 | } |
---|
68 | |
---|
69 | BrachyPhysicsList::~BrachyPhysicsList() |
---|
70 | { |
---|
71 | } |
---|
72 | |
---|
73 | void BrachyPhysicsList::ConstructParticle() |
---|
74 | { |
---|
75 | // In this method, static member functions should be called |
---|
76 | // for all particles which you want to use. |
---|
77 | // This ensures that objects of these particle types will be |
---|
78 | // created in the program. |
---|
79 | |
---|
80 | ConstructBosons(); |
---|
81 | ConstructLeptons(); |
---|
82 | } |
---|
83 | |
---|
84 | void BrachyPhysicsList::ConstructBosons() |
---|
85 | { |
---|
86 | // photons |
---|
87 | G4Gamma::GammaDefinition(); |
---|
88 | } |
---|
89 | |
---|
90 | void BrachyPhysicsList::ConstructLeptons() |
---|
91 | { |
---|
92 | // leptons |
---|
93 | G4Electron::ElectronDefinition(); |
---|
94 | G4Positron::PositronDefinition(); |
---|
95 | } |
---|
96 | |
---|
97 | void BrachyPhysicsList::ConstructProcess() |
---|
98 | { |
---|
99 | AddTransportation(); |
---|
100 | ConstructEM(); |
---|
101 | } |
---|
102 | |
---|
103 | void BrachyPhysicsList::ConstructEM() |
---|
104 | { |
---|
105 | theParticleIterator->reset(); |
---|
106 | |
---|
107 | while( (*theParticleIterator)() ){ |
---|
108 | |
---|
109 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
110 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
111 | G4String particleName = particle->GetParticleName(); |
---|
112 | |
---|
113 | // Processes |
---|
114 | |
---|
115 | if (particleName == "gamma") { |
---|
116 | // Photon |
---|
117 | pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh); |
---|
118 | pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric); |
---|
119 | pmanager->AddDiscreteProcess(new G4LowEnergyCompton); |
---|
120 | pmanager->AddDiscreteProcess(new G4LowEnergyGammaConversion); |
---|
121 | |
---|
122 | } else if (particleName == "e-") { |
---|
123 | // Electron |
---|
124 | G4LowEnergyIonisation* loweIon = new G4LowEnergyIonisation("LowEnergyIoni"); |
---|
125 | |
---|
126 | G4LowEnergyBremsstrahlung* loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem"); |
---|
127 | // Select the Bremsstrahlung angular distribution model (Tsai/2BN/2BS) |
---|
128 | loweBrem->SetAngularGenerator("tsai"); |
---|
129 | |
---|
130 | pmanager->AddProcess(new G4MultipleScattering, -1, 1,1); |
---|
131 | pmanager->AddProcess(loweIon, -1, 2,2); |
---|
132 | pmanager->AddProcess(loweBrem, -1,-1,3); |
---|
133 | |
---|
134 | } else if (particleName == "e+") { |
---|
135 | // Positron |
---|
136 | pmanager->AddProcess(new G4MultipleScattering, -1, 1,1); |
---|
137 | pmanager->AddProcess(new G4eIonisation, -1, 2,2); |
---|
138 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3); |
---|
139 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4); |
---|
140 | |
---|
141 | } |
---|
142 | } |
---|
143 | } |
---|
144 | |
---|
145 | void BrachyPhysicsList::SetCuts() |
---|
146 | { |
---|
147 | // The production threshold is fixed to 0.1 mm for all the particles |
---|
148 | // Secondary particles with a range bigger than 0.1 mm |
---|
149 | // are generated; otherwise their energy is considered deposited locally |
---|
150 | |
---|
151 | defaultCutValue = 0.1 * mm; |
---|
152 | |
---|
153 | const G4double cutForGamma = defaultCutValue; |
---|
154 | const G4double cutForElectron = defaultCutValue; |
---|
155 | const G4double cutForPositron = defaultCutValue; |
---|
156 | |
---|
157 | SetCutValue(cutForGamma, "gamma"); |
---|
158 | SetCutValue(cutForElectron, "e-"); |
---|
159 | SetCutValue(cutForPositron, "e+"); |
---|
160 | |
---|
161 | // Set the secondary production cut lower than 990. eV |
---|
162 | // Very important for high precision of lowenergy processes at low energies |
---|
163 | |
---|
164 | G4double lowLimit = 250. * eV; |
---|
165 | G4double highLimit = 100. * GeV; |
---|
166 | G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowLimit, highLimit); |
---|
167 | |
---|
168 | if (verboseLevel>0) DumpCutValuesTable(); |
---|
169 | } |
---|