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 | // $Id: G4EmStandardPhysics_option1.cc,v 1.16 2010/06/02 17:21:29 vnivanch Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ |
---|
28 | // |
---|
29 | //--------------------------------------------------------------------------- |
---|
30 | // |
---|
31 | // ClassName: G4EmStandardPhysics_option1 |
---|
32 | // |
---|
33 | // Author: V.Ivanchenko 09.11.2005 |
---|
34 | // |
---|
35 | // Modified: |
---|
36 | // 19.12.2005 V.Ivanchenko StepFunction for electrons (1.0, 1.0*mm) |
---|
37 | // 21.06.2006 V.Ivanchenko use recent msc with step limitation off |
---|
38 | // 23.06.2006 V.Ivanchenko set dRoverRange = 0.8 for e- and e+ |
---|
39 | // 13.11.2006 V.Ivanchenko use G4hMultipleScattering |
---|
40 | // 23.11.2006 V.Ivanchenko remove mscStepLimit option and improve cout |
---|
41 | // 13.02.2007 V.Ivanchenko set skin=0.0 |
---|
42 | // 15.05.2007 V.Ivanchenko rename to _option1 |
---|
43 | // 21.04.2008 V.Ivanchenko add long-lived D and B mesons |
---|
44 | // |
---|
45 | //---------------------------------------------------------------------------- |
---|
46 | // |
---|
47 | |
---|
48 | #include "G4EmStandardPhysics_option1.hh" |
---|
49 | #include "G4ParticleDefinition.hh" |
---|
50 | #include "G4ProcessManager.hh" |
---|
51 | #include "G4LossTableManager.hh" |
---|
52 | #include "G4EmProcessOptions.hh" |
---|
53 | |
---|
54 | #include "G4ComptonScattering.hh" |
---|
55 | #include "G4GammaConversion.hh" |
---|
56 | #include "G4PhotoElectricEffect.hh" |
---|
57 | |
---|
58 | #include "G4eMultipleScattering.hh" |
---|
59 | #include "G4MuMultipleScattering.hh" |
---|
60 | #include "G4hMultipleScattering.hh" |
---|
61 | #include "G4MscStepLimitType.hh" |
---|
62 | |
---|
63 | #include "G4eIonisation.hh" |
---|
64 | #include "G4eBremsstrahlung.hh" |
---|
65 | #include "G4eplusAnnihilation.hh" |
---|
66 | |
---|
67 | #include "G4MuIonisation.hh" |
---|
68 | #include "G4MuBremsstrahlung.hh" |
---|
69 | #include "G4MuPairProduction.hh" |
---|
70 | #include "G4hBremsstrahlung.hh" |
---|
71 | #include "G4hPairProduction.hh" |
---|
72 | |
---|
73 | #include "G4hIonisation.hh" |
---|
74 | #include "G4ionIonisation.hh" |
---|
75 | |
---|
76 | #include "G4Gamma.hh" |
---|
77 | #include "G4Electron.hh" |
---|
78 | #include "G4Positron.hh" |
---|
79 | #include "G4MuonPlus.hh" |
---|
80 | #include "G4MuonMinus.hh" |
---|
81 | #include "G4PionPlus.hh" |
---|
82 | #include "G4PionMinus.hh" |
---|
83 | #include "G4KaonPlus.hh" |
---|
84 | #include "G4KaonMinus.hh" |
---|
85 | #include "G4Proton.hh" |
---|
86 | #include "G4AntiProton.hh" |
---|
87 | #include "G4Deuteron.hh" |
---|
88 | #include "G4Triton.hh" |
---|
89 | #include "G4He3.hh" |
---|
90 | #include "G4Alpha.hh" |
---|
91 | #include "G4GenericIon.hh" |
---|
92 | |
---|
93 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
94 | |
---|
95 | G4EmStandardPhysics_option1::G4EmStandardPhysics_option1(G4int ver) |
---|
96 | : G4VPhysicsConstructor("G4EmStandard_opt1"), verbose(ver) |
---|
97 | { |
---|
98 | G4LossTableManager::Instance(); |
---|
99 | } |
---|
100 | |
---|
101 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
102 | |
---|
103 | G4EmStandardPhysics_option1::G4EmStandardPhysics_option1(G4int ver, const G4String&) |
---|
104 | : G4VPhysicsConstructor("G4EmStandard_opt1"), verbose(ver) |
---|
105 | { |
---|
106 | G4LossTableManager::Instance(); |
---|
107 | } |
---|
108 | |
---|
109 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
110 | |
---|
111 | G4EmStandardPhysics_option1::~G4EmStandardPhysics_option1() |
---|
112 | {} |
---|
113 | |
---|
114 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
115 | |
---|
116 | void G4EmStandardPhysics_option1::ConstructParticle() |
---|
117 | { |
---|
118 | // gamma |
---|
119 | G4Gamma::Gamma(); |
---|
120 | |
---|
121 | // leptons |
---|
122 | G4Electron::Electron(); |
---|
123 | G4Positron::Positron(); |
---|
124 | G4MuonPlus::MuonPlus(); |
---|
125 | G4MuonMinus::MuonMinus(); |
---|
126 | |
---|
127 | // mesons |
---|
128 | G4PionPlus::PionPlusDefinition(); |
---|
129 | G4PionMinus::PionMinusDefinition(); |
---|
130 | G4KaonPlus::KaonPlusDefinition(); |
---|
131 | G4KaonMinus::KaonMinusDefinition(); |
---|
132 | |
---|
133 | // barions |
---|
134 | G4Proton::Proton(); |
---|
135 | G4AntiProton::AntiProton(); |
---|
136 | |
---|
137 | // ions |
---|
138 | G4Deuteron::Deuteron(); |
---|
139 | G4Triton::Triton(); |
---|
140 | G4He3::He3(); |
---|
141 | G4Alpha::Alpha(); |
---|
142 | G4GenericIon::GenericIonDefinition(); |
---|
143 | } |
---|
144 | |
---|
145 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
146 | |
---|
147 | void G4EmStandardPhysics_option1::ConstructProcess() |
---|
148 | { |
---|
149 | // Add standard EM Processes |
---|
150 | |
---|
151 | theParticleIterator->reset(); |
---|
152 | while( (*theParticleIterator)() ){ |
---|
153 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
154 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
155 | G4String particleName = particle->GetParticleName(); |
---|
156 | if(verbose > 1) |
---|
157 | G4cout << "### " << GetPhysicsName() << " instantiates for " |
---|
158 | << particleName << G4endl; |
---|
159 | |
---|
160 | if (particleName == "gamma") { |
---|
161 | |
---|
162 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
163 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
164 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
165 | |
---|
166 | } else if (particleName == "e-") { |
---|
167 | |
---|
168 | G4eIonisation* eioni = new G4eIonisation(); |
---|
169 | eioni->SetStepFunction(0.8, 1.0*mm); |
---|
170 | G4eMultipleScattering* msc = new G4eMultipleScattering; |
---|
171 | msc->SetStepLimitType(fMinimal); |
---|
172 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
173 | pmanager->AddProcess(eioni, -1, 2, 2); |
---|
174 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); |
---|
175 | |
---|
176 | } else if (particleName == "e+") { |
---|
177 | |
---|
178 | G4eIonisation* eioni = new G4eIonisation(); |
---|
179 | eioni->SetStepFunction(0.8, 1.0*mm); |
---|
180 | G4eMultipleScattering* msc = new G4eMultipleScattering; |
---|
181 | msc->SetStepLimitType(fMinimal); |
---|
182 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
183 | pmanager->AddProcess(eioni, -1, 2, 2); |
---|
184 | pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); |
---|
185 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
186 | |
---|
187 | } else if (particleName == "mu+" || |
---|
188 | particleName == "mu-" ) { |
---|
189 | |
---|
190 | pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); |
---|
191 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
192 | pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3); |
---|
193 | pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4); |
---|
194 | |
---|
195 | } else if (particleName == "alpha" || |
---|
196 | particleName == "He3") { |
---|
197 | |
---|
198 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
199 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
200 | |
---|
201 | } else if (particleName == "GenericIon") { |
---|
202 | |
---|
203 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
204 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
205 | |
---|
206 | } else if (particleName == "pi+" || |
---|
207 | particleName == "pi-" || |
---|
208 | particleName == "kaon+" || |
---|
209 | particleName == "kaon-" || |
---|
210 | particleName == "proton" ) { |
---|
211 | |
---|
212 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
213 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
214 | pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); |
---|
215 | pmanager->AddProcess(new G4hPairProduction, -1,-4, 4); |
---|
216 | |
---|
217 | } else if (particleName == "B+" || |
---|
218 | particleName == "B-" || |
---|
219 | particleName == "D+" || |
---|
220 | particleName == "D-" || |
---|
221 | particleName == "Ds+" || |
---|
222 | particleName == "Ds-" || |
---|
223 | particleName == "anti_lambda_c+" || |
---|
224 | particleName == "anti_omega-" || |
---|
225 | particleName == "anti_proton" || |
---|
226 | particleName == "anti_sigma_c+" || |
---|
227 | particleName == "anti_sigma_c++" || |
---|
228 | particleName == "anti_sigma+" || |
---|
229 | particleName == "anti_sigma-" || |
---|
230 | particleName == "anti_xi_c+" || |
---|
231 | particleName == "anti_xi-" || |
---|
232 | particleName == "deuteron" || |
---|
233 | particleName == "lambda_c+" || |
---|
234 | particleName == "omega-" || |
---|
235 | particleName == "sigma_c+" || |
---|
236 | particleName == "sigma_c++" || |
---|
237 | particleName == "sigma+" || |
---|
238 | particleName == "sigma-" || |
---|
239 | particleName == "tau+" || |
---|
240 | particleName == "tau-" || |
---|
241 | particleName == "triton" || |
---|
242 | particleName == "xi_c+" || |
---|
243 | particleName == "xi-" ) { |
---|
244 | |
---|
245 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
246 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
247 | } |
---|
248 | } |
---|
249 | G4EmProcessOptions opt; |
---|
250 | opt.SetVerbose(verbose); |
---|
251 | opt.SetApplyCuts(true); |
---|
252 | } |
---|
253 | |
---|
254 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|