ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayFluoPhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file XrayFluoPhysicsList.cc
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 // History
28 // 14/01/11 Alf re-adapt this file from Physiclist of testEm18
29 //
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "XrayFluoPhysicsList.hh"
36 
37 #include "G4SystemOfUnits.hh"
38 #include "G4LossTableManager.hh"
39 #include "G4EmProcessOptions.hh"
40 #include "G4ProcessManager.hh"
41 
42 //#include "PhysListEmStandard.hh"
43 
44 #include "G4EmStandardPhysics.hh"
48 //#include "XrayFluoPhysListEmStandardFLUO.hh"
49 #include "G4EmLivermorePhysics.hh"
50 #include "G4EmPenelopePhysics.hh"
51 //#include "G4UAtomicDeexcitation.hh"
52 
53 #include "G4Decay.hh"
54 #include "XrayFluoStepMax.hh"
55 
56 #include "G4UnitsTable.hh"
57 
58 #include "G4ParticleDefinition.hh"
59 #include "G4ProcessManager.hh"
60 
61 // Bosons
62 #include "G4ChargedGeantino.hh"
63 #include "G4Geantino.hh"
64 #include "G4Gamma.hh"
65 #include "G4OpticalPhoton.hh"
66 
67 // leptons
68 #include "G4MuonPlus.hh"
69 #include "G4MuonMinus.hh"
70 #include "G4NeutrinoMu.hh"
71 #include "G4AntiNeutrinoMu.hh"
72 
73 #include "G4Electron.hh"
74 #include "G4Positron.hh"
75 #include "G4NeutrinoE.hh"
76 #include "G4AntiNeutrinoE.hh"
77 
78 // Hadrons
79 #include "G4Proton.hh"
80 #include "G4MesonConstructor.hh"
81 #include "G4BaryonConstructor.hh"
82 #include "G4IonConstructor.hh"
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85 
87 {
89 
90  // EM physics
92 
93  defaultCutValue = 1.*mm;
94 
99 
100  SetVerboseLevel(1);
101 
102  // EM physics
103  emName = G4String("emlivermore");
105 
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
111 {
112  delete emPhysicsList;
113  delete pMessenger;
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117 
119 {
120  // pseudo-particles
123 
124  // gamma
126 
127  // leptons
132 
137 
138  // mesons
139  G4MesonConstructor mConstructor;
140  mConstructor.ConstructParticle();
141 
142  // barions
143  G4BaryonConstructor bConstructor;
144  bConstructor.ConstructParticle();
145 
146  // ions
147  G4IonConstructor iConstructor;
148  iConstructor.ConstructParticle();
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152 
154 {
157  AddDecay();
158  AddStepMax();
159 
160  // Em options
161  //
162  G4EmProcessOptions emOptions;
163  emOptions.SetBuildCSDARange(true);
164  emOptions.SetDEDXBinningForCSDARange(10*10);
165  //emOptions.SetDeexcitationActiveRegion(true); //TBC
166  emOptions.SetFluo(true);
167  emOptions.SetAuger(true);
168  emOptions.SetPIXE(true);
169 
170 }
171 
172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
173 
175 {
176  // Add Decay Process
177 
178  G4Decay* fDecayProcess = new G4Decay();
179 
181  particleIterator->reset();
182  while( (*particleIterator)() ){
184  G4ProcessManager* pmanager = particle->GetProcessManager();
185 
186  if (fDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) {
187 
188  pmanager ->AddProcess(fDecayProcess);
189 
190  // set ordering for PostStepDoIt and AtRestDoIt
191  pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
192  pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
193 
194  }
195  }
196 }
197 
198 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
199 
201 {
202  // Step limitation seen as a process
203  XrayFluoStepMax* stepMaxProcess = new XrayFluoStepMax();
204 
206  particleIterator->reset();
207  while ((*particleIterator)()){
209  G4ProcessManager* pmanager = particle->GetProcessManager();
210 
211  if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
212  {
213  pmanager ->AddDiscreteProcess(stepMaxProcess);
214  }
215  }
216 }
217 
218 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
219 
221 {
222  if (verboseLevel>-1) {
223  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
224  }
225 
226  if (name == emName) return;
227 
228  if (name == "emlivermore") {
229 
230  emName = name;
231  delete emPhysicsList;
233 
234  } else if (name == "emstandard") {
235  emName = name;
236  delete emPhysicsList;
238 
239  } else if (name == "emstandard_opt1") {
240 
241  emName = name;
242  delete emPhysicsList;
244 
245  } else if (name == "emstandard_opt2") {
246 
247  emName = name;
248  delete emPhysicsList;
250 
251  } else if (name == "emstandard_opt3") {
252 
253  emName = name;
254  delete emPhysicsList;
256 
257  } else if (name == "empenelope"){
258  emName = name;
259  delete emPhysicsList;
261 
262  } else {
263 
264  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
265  << " is not defined"
266  << G4endl;
267  }
268 }
269 
270 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
271 
273 {
274  if (verboseLevel >0){
275  G4cout << "PhysicsList::SetCuts:";
276  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
277  }
278 
279  // set cut values for gamma at first and for e- second and next for e+,
280  // because some processes for e+/e- need cut values for gamma
281  SetCutValue(cutForGamma, "gamma");
284 
286 }
287 
288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
289 
291 {
292  cutForGamma = cut;
294 }
295 
296 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
297 
299 {
300  cutForElectron = cut;
302 }
303 
304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
305 
307 {
308  cutForPositron = cut;
310 }
311 
312 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
313 
315 {
316  cutForProton = cut;
318 }
319 
320 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
321 
322 //void XrayFluoPhysicsList::SetFluorescence(G4bool value)
323 //{
324 // G4VAtomDeexcitation* de = G4LossTableManager::Instance()->AtomDeexcitation();
325 // if(de) { de->SetFluo(value); }
326 //}
327 
328 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
329 
330 //void XrayFluoPhysicsList::SetPIXE(G4bool value)
331 //{
332 // G4VAtomDeexcitation* de = G4LossTableManager::Instance()->AtomDeexcitation();
333 // if(de) { de->SetPIXE(value); }
334 //}
335 
336 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......