Geant4  10.00.p03
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 79268 2014-02-20 16:46:31Z 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 "G4SystemOfUnits.hh"
57 #include "G4LossTableManager.hh"
58 #include "G4VEmProcess.hh"
59 #include "G4VEnergyLossProcess.hh"
60 #include "G4VMultipleScattering.hh"
61 #include "G4Region.hh"
62 #include "G4RegionStore.hh"
63 #include "G4VAtomDeexcitation.hh"
64 #include "G4Threading.hh"
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
67 
69 {
71 }
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
74 
76 {
77 }
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
80 
82 {
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
87 
89 {
90  theManager->SetSubCutoff(val, r);
91 }
92 
93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
94 
96 {
97  theManager->SetIntegral(val);
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
101 
103 {
105 }
106 
107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
108 
110 {
111  theManager->SetMinEnergy(val);
112 }
113 
114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
115 
117 {
118  theManager->SetMaxEnergy(val);
119 }
120 
121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
122 
124 {
126 }
127 
128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
129 
131 {
133 }
134 
135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
136 
138 {
140 }
141 
142 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
143 
145 {
147 }
148 
149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
150 
152 {
154 }
155 
156 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
157 
159 {
160  theManager->SetStepFunction(v1, v2);
161 }
162 
163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
164 
166 {
168 }
169 
170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
171 
173 {
174  const std::vector<G4VEmProcess*>& w =
176  std::vector<G4VEmProcess*>::const_iterator itp;
177  for(itp = w.begin(); itp != w.end(); itp++) {
178  G4VEmProcess* q = *itp;
179  if(q) { q->SetApplyCuts(val); }
180  }
181 }
182 
183 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
184 
186 {
188 }
189 
190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
191 
193  G4bool worker)
194 {
195  G4bool all = false;
196  if("all" == name) { all = true; }
197 
198  if(worker && !G4Threading::IsWorkerThread()) { return; }
199  else if(!worker && G4Threading::IsWorkerThread()) { return; }
200 
201  if(all) {
202  theManager->SetVerbose(val);
203  return;
204  }
205 
206  const std::vector<G4VEnergyLossProcess*>& v =
208  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
209  for(itr = v.begin(); itr != v.end(); ++itr) {
210  G4VEnergyLossProcess* p = *itr;
211  if(p) {
212  if (p->GetProcessName() == name) { p->SetVerboseLevel(val); }
213  }
214  }
215  const std::vector<G4VEmProcess*>& w =
217  std::vector<G4VEmProcess*>::const_iterator itp;
218  for(itp = w.begin(); itp != w.end(); itp++) {
219  G4VEmProcess* q = *itp;
220  if(q) {
221  if (q->GetProcessName() == name) { q->SetVerboseLevel(val); }
222  }
223  }
224  const std::vector<G4VMultipleScattering*>& u =
226  std::vector<G4VMultipleScattering*>::const_iterator itm;
227  for(itm = u.begin(); itm != u.end(); itm++) {
228  G4VMultipleScattering* msc = *itm;
229  if(s) {
230  if (msc->GetProcessName() == name) { msc->SetVerboseLevel(val); }
231  }
232  }
233 }
234 
235 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
236 
238 {
239  const std::vector<G4VEnergyLossProcess*>& v =
241  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
242  for(itr = v.begin(); itr != v.end(); itr++) {
243  G4VEnergyLossProcess* p = *itr;
244  if(p) { p->SetLambdaFactor(val); }
245  }
246 }
247 
248 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
249 
250 void
252  G4bool valDeexcitation,
253  G4bool valAuger,
254  G4bool valPIXE)
255 {
256  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
257  if(ad) {
258  ad->SetDeexcitationActiveRegion(rname, valDeexcitation,
259  valAuger,valPIXE);
260  }
261 }
262 
263 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
264 
266 {
267  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
268  if(ad) { ad->SetFluo(val); }
269 }
270 
271 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
272 
274 {
275  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
276  if(ad) { ad->SetAuger(val); }
277 }
278 
279 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
280 
282 {
283  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
284  if(ad) { ad->SetPIXE(val); }
285 }
286 
287 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
288 
290 {
291  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
292  if(ad) { ad->SetPIXECrossSectionModel(mname); }
293 }
294 
295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
296 
297 void
299 {
300  G4VAtomDeexcitation* ad = theManager-> AtomDeexcitation();
301  if(ad) { ad->SetPIXEElectronCrossSectionModel(mname); }
302 }
303 
304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
305 
307 {
308  const std::vector<G4VMultipleScattering*>& u =
310  std::vector<G4VMultipleScattering*>::const_iterator itm;
311  for(itm = u.begin(); itm != u.end(); itm++) {
312  if(*itm) (*itm)->SetStepLimitType(val);
313  }
314 }
315 
316 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
317 
319 {
320  const std::vector<G4VMultipleScattering*>& u =
322  std::vector<G4VMultipleScattering*>::const_iterator itm;
323  for(itm = u.begin(); itm != u.end(); itm++) {
324  if(*itm) { (*itm)->SetLateralDisplasmentFlag(val); }
325  }
326 }
327 
328 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
329 
331 {
332  if(val < 0.0) return;
333  const std::vector<G4VMultipleScattering*>& u =
335  std::vector<G4VMultipleScattering*>::const_iterator itm;
336  for(itm = u.begin(); itm != u.end(); itm++) {
337  if(*itm) { (*itm)->SetSkin(val); }
338  }
339 }
340 
341 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
342 
344 {
345  if(val < 0.0) return;
346  const std::vector<G4VMultipleScattering*>& u =
348  std::vector<G4VMultipleScattering*>::const_iterator itm;
349  for(itm = u.begin(); itm != u.end(); itm++) {
350  if(*itm) { (*itm)->SetRangeFactor(val); }
351  }
352 }
353 
354 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
355 
357 {
358  if(val < 0.0) { return; }
359  const std::vector<G4VMultipleScattering*>& u =
361  std::vector<G4VMultipleScattering*>::const_iterator itm;
362  for(itm = u.begin(); itm != u.end(); itm++) {
363  if(*itm) { (*itm)->SetGeomFactor(val); }
364  }
365 }
366 
367 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
368 
370 {
371  const std::vector<G4VMultipleScattering*>& u =
373  std::vector<G4VMultipleScattering*>::const_iterator itm;
374  for(itm = u.begin(); itm != u.end(); itm++) {
375  if(*itm) { (*itm)->SetPolarAngleLimit(val); }
376  }
377  const std::vector<G4VEmProcess*>& w =
379  std::vector<G4VEmProcess*>::const_iterator itp;
380  for(itp = w.begin(); itp != w.end(); itp++) {
381  G4VEmProcess* q = *itp;
382  if(q) { q->SetPolarAngleLimit(val); }
383  }
384 }
385 
386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
387 
389 {
391 }
392 
393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
394 
396 {
397  theManager->SetLPMFlag(val);
398 }
399 
400 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
401 
403 {
405 }
406 
407 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
408 
410 {
412 }
413 
414 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
415 
417 {
419 }
420 
421 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
422 
423 void
425  G4bool flag)
426 {
427  const std::vector<G4VEnergyLossProcess*>& v =
429  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
430  for(itr = v.begin(); itr != v.end(); ++itr) {
431  G4VEnergyLossProcess* p = *itr;
432  if(p) {
433  if (p->GetProcessName() == name) {
434  p->SetCrossSectionBiasingFactor(val, flag);
435  }
436  }
437  }
438  const std::vector<G4VEmProcess*>& w =
440  std::vector<G4VEmProcess*>::const_iterator itp;
441  for(itp = w.begin(); itp != w.end(); itp++) {
442  G4VEmProcess* q = *itp;
443  if(q) {
444  if (q->GetProcessName() == name) {
445  q->SetCrossSectionBiasingFactor(val, flag);
446  }
447  }
448  }
449 }
450 
451 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
452 
453 void
455  G4double length,
456  const G4String& region,
457  G4bool flag)
458 {
459  const std::vector<G4VEnergyLossProcess*>& v =
461  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
462  for(itr = v.begin(); itr != v.end(); ++itr) {
463  G4VEnergyLossProcess* p = *itr;
464  if(p) {
465  if (p->GetProcessName() == name) {
466  p->ActivateForcedInteraction(length,region,flag);
467  }
468  }
469  }
470  const std::vector<G4VEmProcess*>& w =
472  std::vector<G4VEmProcess*>::const_iterator itp;
473  for(itp = w.begin(); itp != w.end(); itp++) {
474  G4VEmProcess* q = *itp;
475  if(q) {
476  if (q->GetProcessName() == name) {
477  q->ActivateForcedInteraction(length,region,flag);
478  }
479  }
480  }
481 }
482 
483 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
484 
485 void
487  const G4String& region,
488  G4double factor,
489  G4double energyLimit)
490 {
491  if(0.0 > factor) { return; }
492  const std::vector<G4VEnergyLossProcess*>& v =
494  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
495  for(itr = v.begin(); itr != v.end(); ++itr) {
496  G4VEnergyLossProcess* p = *itr;
497  if(p) {
498  if (p->GetProcessName() == name) {
499  p->ActivateSecondaryBiasing(region, factor, energyLimit);
500  }
501  }
502  }
503 }
504 
505 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
506 
507 void
509  const G4String& region,
510  G4double factor,
511  G4double energyLimit)
512 {
513  if(0.0 > factor) { return; }
514  const std::vector<G4VEmProcess*>& v =
516  std::vector<G4VEmProcess*>::const_iterator itr;
517  for(itr = v.begin(); itr != v.end(); ++itr) {
518  G4VEmProcess* p = *itr;
519  if(p) {
520  if (p->GetProcessName() == name) {
521  p->ActivateSecondaryBiasing(region, factor, energyLimit);
522  }
523  }
524  }
525 }
526 
527 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
528 
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="", G4bool flag=true)
void SetRandomStep(G4bool val)
void SetSkin(G4double val)
void SetMaxEnergyForMuons(G4double val)
void SetLambdaFactor(G4double val)
void SetPIXEElectronCrossSectionModel(const G4String &)
static G4LossTableManager * Instance()
void SetPIXE(G4bool val)
void SetBremsstrahlungTh(G4double val)
void SetSplineFlag(G4bool val)
void SetLambdaBinning(G4int val)
G4String name
Definition: TRTMaterials.hh:40
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 SetPIXECrossSectionModel(const G4String &)
void SetMscGeomFactor(G4double val)
void SetStepFunction(G4double v1, G4double v2)
void SetFactorForAngleLimit(G4double 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 SetApplyCuts(G4bool val)
void SetMaxEnergyForCSDARange(G4double val)
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
void SetFluo(G4bool val)
void SetMinSubRange(G4double val)
void SetBuildCSDARange(G4bool val)
void SetAuger(G4bool val)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void SetDEDXBinning(G4int val)
static const double s
Definition: G4SIunits.hh:150
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
void SetLambdaBinning(G4int val)
void SetLPMFlag(G4bool val)
void SetBremsstrahlungTh(G4double val)
bool G4bool
Definition: G4Types.hh:79
void SetLossFluctuations(G4bool val)
void SetMaxEnergyForCSDARange(G4double val)
void SetDEDXBinningForCSDARange(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)
G4bool IsWorkerThread()
Definition: G4Threading.cc:104
void SetMinSubRange(G4double val)
void SetMinEnergy(G4double val)
void SetMaxEnergy(G4double val)
void SetStepFunction(G4double v1, G4double v2)
void SetDeexcitationActiveRegion(const G4String &rname="", G4bool valDeexcitation=true, G4bool valAuger=true, G4bool valPIXE=true)
void SetFactorForAngleLimit(G4double val)
void SetLinearLossLimit(G4double 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)
void SetPIXECrossSectionModel(const G4String &val)
void SetBuildCSDARange(G4bool val)
void SetIntegral(G4bool val)
void SetVerbose(G4int val)
void SetDEDXBinning(G4int val)
void SetMaxEnergyForMuons(G4double val)
void SetIntegral(G4bool val)
void SetLossFluctuations(G4bool val)
void SetMscStepLimitation(G4MscStepLimitType val)
void SetRandomStep(G4bool val)
void SetLambdaFactor(G4double val)
double G4double
Definition: G4Types.hh:76
void SetMscRangeFactor(G4double val)
void SetSubCutoff(G4bool val, const G4Region *r=0)
void SetLPMFlag(G4bool val)
void SetPolarAngleLimit(G4double a)
void SetSplineFlag(G4bool val)
void SetProcessBiasingFactor(const G4String &name, G4double val, G4bool flag=true)
void SetPIXEElectronCrossSectionModel(const G4String &val)
const std::vector< G4VMultipleScattering * > & GetMultipleScatteringVector()
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:437
void SetApplyCuts(G4bool val)
void SetVerbose(G4int val, const G4String &name="all", G4bool worker=false)
void SetPolarAngleLimit(G4double val)