Geant4  10.02.p02
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 92766 2015-09-15 15:21:42Z 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 }
344 
345 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
346 
347 void
349 {
351 }
352 
353 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
354 
355 void
357  G4bool flag)
358 {
359  const std::vector<G4VEnergyLossProcess*>& v =
361  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
362  for(itr = v.begin(); itr != v.end(); ++itr) {
363  G4VEnergyLossProcess* p = *itr;
364  if(p) {
365  if (p->GetProcessName() == name) {
366  p->SetCrossSectionBiasingFactor(val, flag);
367  }
368  }
369  }
370  const std::vector<G4VEmProcess*>& w =
372  std::vector<G4VEmProcess*>::const_iterator itp;
373  for(itp = w.begin(); itp != w.end(); itp++) {
374  G4VEmProcess* q = *itp;
375  if(q) {
376  if (q->GetProcessName() == name) {
377  q->SetCrossSectionBiasingFactor(val, flag);
378  }
379  }
380  }
381 }
382 
383 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
384 
385 void
387  G4double length,
388  const G4String& region,
389  G4bool flag)
390 {
391  const std::vector<G4VEnergyLossProcess*>& v =
393  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
394  for(itr = v.begin(); itr != v.end(); ++itr) {
395  G4VEnergyLossProcess* p = *itr;
396  if(p) {
397  if (p->GetProcessName() == name) {
398  p->ActivateForcedInteraction(length,region,flag);
399  }
400  }
401  }
402  const std::vector<G4VEmProcess*>& w =
404  std::vector<G4VEmProcess*>::const_iterator itp;
405  for(itp = w.begin(); itp != w.end(); itp++) {
406  G4VEmProcess* q = *itp;
407  if(q) {
408  if (q->GetProcessName() == name) {
409  q->ActivateForcedInteraction(length,region,flag);
410  }
411  }
412  }
413 }
414 
415 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
416 
417 void
419  const G4String& region,
421  G4double energyLimit)
422 {
423  if(0.0 > factor) { return; }
424  const std::vector<G4VEnergyLossProcess*>& v =
426  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
427  for(itr = v.begin(); itr != v.end(); ++itr) {
428  G4VEnergyLossProcess* p = *itr;
429  if(p) {
430  if (p->GetProcessName() == name) {
431  p->ActivateSecondaryBiasing(region, factor, energyLimit);
432  }
433  }
434  }
435 }
436 
437 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
438 
439 void
441  const G4String& region,
443  G4double energyLimit)
444 {
445  if(0.0 > factor) { return; }
446  const std::vector<G4VEmProcess*>& v =
448  std::vector<G4VEmProcess*>::const_iterator itr;
449  for(itr = v.begin(); itr != v.end(); ++itr) {
450  G4VEmProcess* p = *itr;
451  if(p) {
452  if (p->GetProcessName() == name) {
453  p->ActivateSecondaryBiasing(region, factor, energyLimit);
454  }
455  }
456  }
457 }
458 
459 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
460 
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 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)
const G4double w[NPOINTSGL]
void SetDeexcitationActiveRegion(const G4String &rname, G4bool valDeexcitation, G4bool valAuger, G4bool valPIXE)
void SetNumberOfBins(G4int val)
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)
void SetPIXEElectronCrossSectionModel(const G4String &)
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 SetPIXECrossSectionModel(const G4String &)
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)
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)