Geant4  10.01
G4EmProcessOptions.cc
Go to the documentation of this file.
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: G4EmProcessOptions.cc 84398 2014-10-15 07:20:18Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class file
31 //
32 //
33 // File name: G4EmProcessOptions
34 //
35 // Author: Vladimir Ivanchenko
36 //
37 // Creation date: 27.02.2004
38 //
39 // Modifications:
40 // 30-06-04 G4EmProcess is pure discrete (V.Ivanchenko)
41 // 24-03-05 Add ApplyCuts and RandomStep (V.Ivanchenko)
42 // 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
43 // 10-05-06 Add command MscStepLimit to G4LossTableManager (V.Ivantchenko)
44 // 22-05-06 Add SetBremsstrahlungTh (V.Ivanchenko)
45 // 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
46 // 30-05-12 Add biasing for G4VEmProcess (D. Sawkey)
47 //
48 // Class Description:
49 //
50 // -------------------------------------------------------------------
51 //
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
54 
55 #include "G4EmProcessOptions.hh"
56 #include "G4EmParameters.hh"
57 #include "G4SystemOfUnits.hh"
58 #include "G4LossTableManager.hh"
59 #include "G4VEmProcess.hh"
60 #include "G4VEnergyLossProcess.hh"
61 #include "G4VMultipleScattering.hh"
62 #include "G4Region.hh"
63 #include "G4RegionStore.hh"
64 #include "G4VAtomDeexcitation.hh"
65 #include "G4Threading.hh"
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
68 
70 {
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
76 
78 {}
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
81 
83 {
85 }
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
88 
90 {
92 }
93 
94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
95 
97 {
98  theParameters->SetLPM(val);
99 }
100 
101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
102 
104 {
105  theParameters->SetSpline(val);
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
109 
111 {
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
116 
118 {
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
123 
125 {
126  theParameters->SetFluo(val);
127 }
128 
129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
130 
132 {
133  theParameters->SetAuger(val);
134 }
135 
136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
137 
139 {
140  theParameters->SetPixe(val);
141 }
142 
143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
144 
146 {
148 }
149 
150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
151 
153 {
155 }
156 
157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
158 
160 {
162 }
163 
164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
165 
167 {
169 }
170 
171 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
172 
174 {
176 }
177 
178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
179 
181 {
183 }
184 
185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
186 
188 {
190 }
191 
192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
193 
195 {
197 }
198 
199 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
200 
202 {
204 }
205 
206 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
207 
209 {
211 }
212 
213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
214 
216 {
218 }
219 
220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
221 
223 {
225 }
226 
227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
228 
230 {
232 }
233 
234 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
235 
237 {
239 }
240 
241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
242 
244 {
246 }
247 
248 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
249 
251 {
253 }
254 
255 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
256 
258 {
260 }
261 
262 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
263 
265 {
267 }
268 
269 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
270 
272 {}
273 
274 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
275 
277 {
279 }
280 
281 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
282 
284 {
286 }
287 
288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
289 
291 {
293 }
294 
295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
296 
298 {
300 }
301 
302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
303 
305 {
306  theManager->SetSubCutoff(val, r);
307 }
308 
309 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
310 
312 {
313  theManager->SetIntegral(val);
314 }
315 
316 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
317 
319 {
320  theManager->SetStepFunction(v1, v2);
321 }
322 
323 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
324 
325 void
327  G4bool valDeexcitation,
328  G4bool valAuger,
329  G4bool valPIXE)
330 {
331  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
332  if(ad) {
333  ad->SetDeexcitationActiveRegion(rname, valDeexcitation,
334  valAuger,valPIXE);
335  }
336 }
337 
338 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
339 
341 {
343  if(ad) { ad->SetPIXECrossSectionModel(mname); }
344 }
345 
346 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
347 
348 void
350 {
351  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
352  if(ad) { ad->SetPIXEElectronCrossSectionModel(mname); }
353 }
354 
355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
356 
357 void
359  G4bool flag)
360 {
361  const std::vector<G4VEnergyLossProcess*>& v =
363  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
364  for(itr = v.begin(); itr != v.end(); ++itr) {
365  G4VEnergyLossProcess* p = *itr;
366  if(p) {
367  if (p->GetProcessName() == name) {
368  p->SetCrossSectionBiasingFactor(val, flag);
369  }
370  }
371  }
372  const std::vector<G4VEmProcess*>& w =
374  std::vector<G4VEmProcess*>::const_iterator itp;
375  for(itp = w.begin(); itp != w.end(); itp++) {
376  G4VEmProcess* q = *itp;
377  if(q) {
378  if (q->GetProcessName() == name) {
379  q->SetCrossSectionBiasingFactor(val, flag);
380  }
381  }
382  }
383 }
384 
385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
386 
387 void
389  G4double length,
390  const G4String& region,
391  G4bool flag)
392 {
393  const std::vector<G4VEnergyLossProcess*>& v =
395  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
396  for(itr = v.begin(); itr != v.end(); ++itr) {
397  G4VEnergyLossProcess* p = *itr;
398  if(p) {
399  if (p->GetProcessName() == name) {
400  p->ActivateForcedInteraction(length,region,flag);
401  }
402  }
403  }
404  const std::vector<G4VEmProcess*>& w =
406  std::vector<G4VEmProcess*>::const_iterator itp;
407  for(itp = w.begin(); itp != w.end(); itp++) {
408  G4VEmProcess* q = *itp;
409  if(q) {
410  if (q->GetProcessName() == name) {
411  q->ActivateForcedInteraction(length,region,flag);
412  }
413  }
414  }
415 }
416 
417 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
418 
419 void
421  const G4String& region,
423  G4double energyLimit)
424 {
425  if(0.0 > factor) { return; }
426  const std::vector<G4VEnergyLossProcess*>& v =
428  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
429  for(itr = v.begin(); itr != v.end(); ++itr) {
430  G4VEnergyLossProcess* p = *itr;
431  if(p) {
432  if (p->GetProcessName() == name) {
433  p->ActivateSecondaryBiasing(region, factor, energyLimit);
434  }
435  }
436  }
437 }
438 
439 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
440 
441 void
443  const G4String& region,
445  G4double energyLimit)
446 {
447  if(0.0 > factor) { return; }
448  const std::vector<G4VEmProcess*>& v =
450  std::vector<G4VEmProcess*>::const_iterator itr;
451  for(itr = v.begin(); itr != v.end(); ++itr) {
452  G4VEmProcess* p = *itr;
453  if(p) {
454  if (p->GetProcessName() == name) {
455  p->ActivateSecondaryBiasing(region, factor, energyLimit);
456  }
457  }
458  }
459 }
460 
461 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
462 
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="", G4bool flag=true)
void SetLossFluctuations(G4bool val)
void SetSkin(G4double val)
void SetMaxEnergyForMuons(G4double val)
void SetApplyCuts(G4bool val)
void SetLambdaFactor(G4double val)
void SetPIXEElectronCrossSectionModel(const G4String &)
void SetVerbose(G4int val)
static G4LossTableManager * Instance()
void SetPIXE(G4bool val)
void SetDeexcitationIgnoreCut(G4bool val)
void SetLatDisplacementBeyondSafety(G4bool val)
void SetUseCutAsFinalRange(G4bool val)
void SetMscStepLimitType(G4MscStepLimitType val)
void SetSplineFlag(G4bool val)
void SetLinearLossLimit(G4double val)
G4String name
Definition: TRTMaterials.hh:40
void SetAuger(G4bool val)
void ActivateForcedInteraction(G4double length=0.0, const G4String &region="", G4bool flag=true)
void SetMinEnergy(G4double val)
void SetDeexcitationActiveRegion(const G4String &rname, G4bool valDeexcitation, G4bool valAuger, G4bool valPIXE)
void SetNumberOfBins(G4int val)
void SetPIXECrossSectionModel(const G4String &)
void SetMscGeomFactor(G4double val)
void SetStepFunction(G4double v1, G4double v2)
void SetMinSubRange(G4double val)
void SetMaxEnergyForCSDARange(G4double val)
void SetDeexcitationIgnoreCuts(G4bool val)
void ActivateSecondaryBiasingForGamma(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
void SetDEDXBinningForCSDARange(G4int val)
const std::vector< G4VEmProcess * > & GetEmProcessVector()
void SetMscLateralDisplacement(G4bool val)
int G4int
Definition: G4Types.hh:78
void SetMaxEnergy(G4double val)
void SetBremsstrahlungTh(G4double val)
void SetMaxEnergyForCSDARange(G4double val)
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
void SetFluo(G4bool val)
void SetMinSubRange(G4double val)
void SetAuger(G4bool val)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void SetDEDXBinning(G4int val)
void SetLateralDisplacement(G4bool val)
void SetWorkerVerbose(G4int val)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void SetLambdaBinning(G4int val)
void SetBremsstrahlungTh(G4double val)
bool G4bool
Definition: G4Types.hh:79
void SetMscRangeFactor(G4double val)
void SetLossFluctuations(G4bool val)
void SetMscGeomFactor(G4double val)
void SetVerbose(G4int val)
void SetLinearLossLimit(G4double val)
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
const std::vector< G4VEnergyLossProcess * > & GetEnergyLossProcessVector()
void SetSubCutoff(G4bool val, const G4Region *r=0)
void SetMaxEnergy(G4double val)
void SetBuildCSDARange(G4bool val)
void SetStepFunction(G4double v1, G4double v2)
void SetDeexcitationActiveRegion(const G4String &rname="", G4bool valDeexcitation=true, G4bool valAuger=true, G4bool valPIXE=true)
static const G4double factor
void SetPixe(G4bool val)
void SetSpline(G4bool val)
void SetMuHadLateralDisplacement(G4bool val)
void SetFactorForAngleLimit(G4double val)
void SetMinEnergy(G4double val)
void SetLPM(G4bool val)
G4LossTableManager * theManager
G4MscStepLimitType
void ActivateSecondaryBiasing(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
void ActivateForcedInteraction(const G4String &name, G4double length=0.0, const G4String &region="", G4bool flag=true)
static G4EmParameters * Instance()
void SetPIXECrossSectionModel(const G4String &val)
void SetBuildCSDARange(G4bool val)
void SetIntegral(G4bool val)
void SetUseCutAsFinalRange(G4bool val)
void SetIntegral(G4bool val)
void SetMscMuHadLateralDisplacement(G4bool val)
void SetMscStepLimitation(G4MscStepLimitType val)
G4VAtomDeexcitation * AtomDeexcitation()
void SetMscThetaLimit(G4double val)
void SetLambdaFactor(G4double val)
void SetFactorForAngleLimit(G4double val)
double G4double
Definition: G4Types.hh:76
void SetMscRangeFactor(G4double val)
void SetSubCutoff(G4bool val, const G4Region *r=0)
void SetWorkerVerbose(G4int val)
void SetLPMFlag(G4bool val)
void SetProcessBiasingFactor(const G4String &name, G4double val, G4bool flag=true)
void SetPIXEElectronCrossSectionModel(const G4String &val)
G4EmParameters * theParameters
void SetFluo(G4bool val)
void SetApplyCuts(G4bool val)
void SetDisplacementBeyondSafety(G4bool val)
void SetMscSkin(G4double val)
void SetPolarAngleLimit(G4double val)