Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VEmProcess.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 // $Id: G4VEmProcess.cc 109178 2018-04-03 07:13:58Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class file
31 //
32 //
33 // File name: G4VEmProcess
34 //
35 // Author: Vladimir Ivanchenko on base of Laszlo Urban code
36 //
37 // Creation date: 01.10.2003
38 //
39 // Modifications:
40 // 30-06-04 make it to be pure discrete process (V.Ivanchenko)
41 // 30-09-08 optimise integral option (V.Ivanchenko)
42 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko)
43 // 11-03-05 Shift verbose level by 1, add applyCuts and killPrimary flags (VI)
44 // 14-03-05 Update logic PostStepDoIt (V.Ivanchenko)
45 // 08-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
46 // 18-04-05 Use G4ParticleChangeForGamma (V.Ivanchenko)
47 // 25-07-05 Add protection: integral mode only for charged particles (VI)
48 // 04-09-05 default lambdaFactor 0.8 (V.Ivanchenko)
49 // 11-01-06 add A to parameters of ComputeCrossSectionPerAtom (VI)
50 // 12-09-06 add SetModel() (mma)
51 // 12-04-07 remove double call to Clear model manager (V.Ivanchenko)
52 // 27-10-07 Virtual functions moved to source (V.Ivanchenko)
53 // 24-06-09 Removed hidden bin in G4PhysicsVector (V.Ivanchenko)
54 // 17-02-10 Added pointer currentParticle (VI)
55 // 30-05-12 allow Russian roulette, brem splitting (D. Sawkey)
56 //
57 // Class Description:
58 //
59 
60 // -------------------------------------------------------------------
61 //
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
64 
65 #include "G4VEmProcess.hh"
66 #include "G4PhysicalConstants.hh"
67 #include "G4SystemOfUnits.hh"
68 #include "G4ProcessManager.hh"
69 #include "G4LossTableManager.hh"
70 #include "G4LossTableBuilder.hh"
71 #include "G4Step.hh"
72 #include "G4ParticleDefinition.hh"
73 #include "G4VEmModel.hh"
74 #include "G4DataVector.hh"
75 #include "G4PhysicsTable.hh"
76 #include "G4PhysicsLogVector.hh"
77 #include "G4VParticleChange.hh"
78 #include "G4ProductionCutsTable.hh"
79 #include "G4Region.hh"
80 #include "G4Gamma.hh"
81 #include "G4Electron.hh"
82 #include "G4Positron.hh"
83 #include "G4PhysicsTableHelper.hh"
84 #include "G4EmBiasingManager.hh"
85 #include "G4GenericIon.hh"
86 #include "G4Log.hh"
87 #include <iostream>
88 
89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
90 
92  G4VDiscreteProcess(name, type),
93  secondaryParticle(nullptr),
94  buildLambdaTable(true),
95  numberOfModels(0),
96  theLambdaTable(nullptr),
97  theLambdaTablePrim(nullptr),
98  theDensityFactor(nullptr),
99  theDensityIdx(nullptr),
100  integral(false),
101  applyCuts(false),
102  startFromNull(false),
103  splineFlag(true),
104  isIon(false),
105  currentCouple(nullptr),
106  currentModel(nullptr),
107  particle(nullptr),
108  currentParticle(nullptr)
109 {
111  SetVerboseLevel(1);
112 
113  // Size of tables assuming spline
114  minKinEnergy = 0.1*keV;
115  maxKinEnergy = 100.0*TeV;
116  nLambdaBins = 84;
119 
120  // default lambda factor
121  lambdaFactor = 0.8;
122 
123  // default limit on polar angle
124  biasFactor = fFactor = 1.0;
125 
126  // particle types
130 
132 
135  secParticles.reserve(5);
136 
137  baseMaterial = currentMaterial = nullptr;
138 
141  massRatio = 1.0;
142 
144  = basedCoupleIndex = 0;
145 
147  biasManager = nullptr;
148  biasFlag = false;
149  weightFlag = false;
151  lManager->Register(this);
152  secID = fluoID = augerID = biasID = -1;
153  mainSecondaries = 100;
154  if("phot" == GetProcessName() || "compt" == GetProcessName()
155  || "e-_G4DNAIonisation" == GetProcessName()
156  || "hydrogen_G4DNAIonisation" == GetProcessName()
157  || "helium_G4DNAIonisation" == GetProcessName()
158  || "alpha_G4DNAIonisation" == GetProcessName()
159  || "alpha+_G4DNAIonisation" == GetProcessName()
160  || "proton_G4DNAIonisation" == GetProcessName()
161  || "GenericIon_G4DNAIonisation" == GetProcessName() )
162  {
163  mainSecondaries = 1;
164  }
165 }
166 
167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
168 
170 {
171  /*
172  if(1 < verboseLevel) {
173  G4cout << "G4VEmProcess destruct " << GetProcessName()
174  << " " << this << " " << theLambdaTable <<G4endl;
175  }
176  */
177  if(lManager->IsMaster()) {
178  if(theLambdaTable) {
180  delete theLambdaTable;
181  }
182  if(theLambdaTablePrim) {
184  delete theLambdaTablePrim;
185  }
186  }
187  delete modelManager;
188  delete biasManager;
189  lManager->DeRegister(this);
190  //G4cout << "G4VEmProcess removed " << G4endl;
191 }
192 
193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
194 
196 {
197  currentCouple = nullptr;
198  preStepLambda = 0.0;
200  idxLambda = idxLambdaPrim = 0;
201 }
202 
203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
204 
206  const G4Material*)
207 {
208  return 0.0;
209 }
210 
211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
212 
214  const G4Region* region)
215 {
216  G4VEmFluctuationModel* fm = nullptr;
217  modelManager->AddEmModel(order, p, fm, region);
218  if(p) { p->SetParticleChange(pParticleChange); }
219 }
220 
221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
222 
224 {
225  for(auto & em : emModels) { if(em == ptr) { return; } }
226  emModels.push_back(ptr);
227 }
228 
229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
230 
231 G4VEmModel* G4VEmProcess::EmModel(size_t index) const
232 {
233  return (index < emModels.size()) ? emModels[index] : nullptr;
234 }
235 
236 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
237 
239  G4double emin, G4double emax)
240 {
241  modelManager->UpdateEmModel(nam, emin, emax);
242 }
243 
244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
245 
247 {
248  return modelManager->NumberOfModels();
249 }
250 
251 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
252 
254 {
255  return modelManager->NumberOfRegionModels(couple_index);
256 }
257 
258 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
259 
260 G4VEmModel* G4VEmProcess::GetRegionModel(G4int idx, size_t couple_index) const
261 {
262  return modelManager->GetRegionModel(idx, couple_index);
263 }
264 
265 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
266 
268 {
269  return modelManager->GetModel(idx, ver);
270 }
271 
272 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
273 
275 {
276  G4bool isMaster = lManager->IsMaster();
277 
278  if(!particle) { SetParticle(&part); }
279 
280  if(part.GetParticleType() == "nucleus" &&
281  part.GetParticleSubType() == "generic") {
282 
283  G4String pname = part.GetParticleName();
284  if(pname != "deuteron" && pname != "triton" &&
285  pname != "alpha" && pname != "He3" &&
286  pname != "alpha+" && pname != "helium" &&
287  pname != "hydrogen") {
288 
290  isIon = true;
291  }
292  }
293 
294  if(1 < verboseLevel) {
295  G4cout << "G4VEmProcess::PreparePhysicsTable() for "
296  << GetProcessName()
297  << " and particle " << part.GetParticleName()
298  << " local particle " << particle->GetParticleName()
299  << G4endl;
300  }
301 
302  if(particle != &part) { return; }
303 
305 
306  lManager->PreparePhysicsTable(&part, this, isMaster);
307 
308  Clear();
310 
311  const G4ProductionCutsTable* theCoupleTable=
313  size_t n = theCoupleTable->GetTableSize();
314 
315  theEnergyOfCrossSectionMax.resize(n, 0.0);
316  theCrossSectionMax.resize(n, DBL_MAX);
317 
318  // initialisation of the process
322 
323  if(isMaster) { SetVerboseLevel(theParameters->Verbose()); }
328 
329  // initialisation of models
331  for(G4int i=0; i<numberOfModels; ++i) {
332  G4VEmModel* mod = modelManager->GetModel(i);
333  if(0 == i) { currentModel = mod; }
335  mod->SetMasterThread(isMaster);
336  if(mod->HighEnergyLimit() > maxKinEnergy) {
338  }
339  }
340 
343  2.,verboseLevel);
347 
348  // prepare tables
349  if(buildLambdaTable && isMaster){
350  theLambdaTable =
353  }
354  // high energy table
355  if(isMaster && minKinEnergyPrim < maxKinEnergy){
359  }
360  // forced biasing
361  if(biasManager) {
363  biasFlag = false;
364  }
365  // defined ID of secondary particles
366  G4String nam1 = GetProcessName();
368  if(100 > mainSecondaries) {
369  G4String nam2 = nam1 + "_fluo" ;
370  G4String nam3 = nam1 + "_auger";
371  G4String nam4 = nam1 + "_split";
375  }
376 }
377 
378 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
379 
381 {
382  G4bool isMaster = lManager->IsMaster();
383  const G4VEmProcess* masterProc =
384  static_cast<const G4VEmProcess*>(GetMasterProcess());
385 
386  G4String num = part.GetParticleName();
387  if(1 < verboseLevel) {
388  G4cout << "### G4VEmProcess::BuildPhysicsTable() for "
389  << GetProcessName()
390  << " and particle " << num
391  << " buildLambdaTable= " << buildLambdaTable
392  << " isMaster= " << isMaster
393  << G4endl;
394  }
395 
396  if(particle == &part) {
397 
399 
400  // worker initialisation
401  if(!isMaster) {
402  theLambdaTable = masterProc->LambdaTable();
403  theLambdaTablePrim = masterProc->LambdaTablePrim();
404 
405  if(theLambdaTable) {
407  } else if(theLambdaTablePrim) {
409  }
412  if(theLambdaTable) { FindLambdaMax(); }
413 
414  // local initialisation of models
415  G4bool printing = true;
417  for(G4int i=0; i<numberOfModels; ++i) {
418  G4VEmModel* mod = GetModelByIndex(i, printing);
419  G4VEmModel* mod0= masterProc->GetModelByIndex(i, printing);
420  mod->InitialiseLocal(particle, mod0);
421  }
422  // master thread
423  } else {
428  }
429  }
430  }
431 
432  // explicitly defined printout by particle name
433  if(1 < verboseLevel ||
434  (0 < verboseLevel && (num == "gamma" || num == "e-" ||
435  num == "e+" || num == "mu+" ||
436  num == "mu-" || num == "proton"||
437  num == "pi+" || num == "pi-" ||
438  num == "kaon+" || num == "kaon-" ||
439  num == "alpha" || num == "anti_proton" ||
440  num == "GenericIon"|| num == "alpha++" ||
441  num == "alpha+" || num == "helium" ||
442  num == "hydrogen")))
443  {
444  StreamInfo(G4cout, part);
445  }
446 
447  if(1 < verboseLevel) {
448  G4cout << "### G4VEmProcess::BuildPhysicsTable() done for "
449  << GetProcessName()
450  << " and particle " << num
451  << G4endl;
452  }
453 }
454 
455 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
456 
458 {
459  if(1 < verboseLevel) {
460  G4cout << "G4EmProcess::BuildLambdaTable() for process "
461  << GetProcessName() << " and particle "
462  << particle->GetParticleName() << " " << this
463  << G4endl;
464  }
465 
466  // Access to materials
467  const G4ProductionCutsTable* theCoupleTable=
469  size_t numOfCouples = theCoupleTable->GetTableSize();
470 
472 
473  G4PhysicsLogVector* aVector = nullptr;
474  G4PhysicsLogVector* aVectorPrim = nullptr;
475  G4PhysicsLogVector* bVectorPrim = nullptr;
476 
479  *G4lrint(std::log10(scale));
480  scale = G4Log(scale);
481  if(actBinning) { nbin = std::max(nbin, nLambdaBins); }
483 
484  for(size_t i=0; i<numOfCouples; ++i) {
485 
486  if (bld->GetFlag(i)) {
487 
488  // create physics vector and fill it
489  const G4MaterialCutsCouple* couple =
490  theCoupleTable->GetMaterialCutsCouple(i);
491 
492  // build main table
493  if(buildLambdaTable) {
494  delete (*theLambdaTable)[i];
495 
496  // if start from zero then change the scale
497  G4double emin = minKinEnergy;
498  G4bool startNull = false;
499  if(startFromNull) {
501  if(e >= emin) {
502  emin = e;
503  startNull = true;
504  }
505  }
506  G4double emax = emax1;
507  if(emax <= emin) { emax = 2*emin; }
508  G4int bin = G4lrint(nbin*G4Log(emax/emin)/scale);
509  if(bin < 3) { bin = 3; }
510  aVector = new G4PhysicsLogVector(emin, emax, bin);
511  aVector->SetSpline(splineFlag);
512  modelManager->FillLambdaVector(aVector, couple, startNull);
513  if(splineFlag) { aVector->FillSecondDerivatives(); }
515  }
516  // build high energy table
518  delete (*theLambdaTablePrim)[i];
519 
520  // start not from zero
521  if(!bVectorPrim) {
523  if(bin < 3) { bin = 3; }
524  aVectorPrim =
526  bVectorPrim = aVectorPrim;
527  } else {
528  aVectorPrim = new G4PhysicsLogVector(*bVectorPrim);
529  }
530  // always use spline
531  aVectorPrim->SetSpline(splineFlag);
532  modelManager->FillLambdaVector(aVectorPrim, couple, false,
534  aVectorPrim->FillSecondDerivatives();
536  aVectorPrim);
537  }
538  }
539  }
540 
542 
543  if(1 < verboseLevel) {
544  G4cout << "Lambda table is built for "
546  << G4endl;
547  }
548 }
549 
550 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
551 
552 void G4VEmProcess::StreamInfo(std::ostream& out,
553  const G4ParticleDefinition& part, G4String endOfLine) const
554 {
555  out << std::setprecision(6);
556  out << endOfLine << GetProcessName() << ": ";
557  if (endOfLine != G4String("<br>\n")) {
558  out << " for " << part.GetParticleName();
559  if (integral) { out << ","; }
560  }
561  if(integral) { out << " integral: 1 "; }
562  if(applyCuts) { out << ", applyCuts: 1 "; }
563  out << " SubType= " << GetProcessSubType();;
564  if(biasFactor != 1.0) { out << " BiasingFactor= " << biasFactor; }
565  out << " BuildTable= " << buildLambdaTable;
566  out << endOfLine;
567  if(buildLambdaTable) {
568  if(particle == &part) {
569  size_t length = theLambdaTable->length();
570  for(size_t i=0; i<length; ++i) {
571  G4PhysicsVector* v = (*theLambdaTable)[i];
572  if(v) {
573  out << " Lambda table from ";
574  G4double emin = v->Energy(0);
575  G4double emax = v->GetMaxEnergy();
576  G4int nbin = v->GetVectorLength() - 1;
577  if(emin > minKinEnergy) { out << "threshold "; }
578  else { out << G4BestUnit(emin,"Energy"); }
579  out << " to "
580  << G4BestUnit(emax,"Energy")
581  << ", " << G4lrint(nbin/std::log10(emax/emin))
582  << " bins per decade, spline: "
583  << splineFlag
584  << endOfLine;
585  break;
586  }
587  }
588  } else {
589  out << " Used Lambda table of "
590  << particle->GetParticleName() << endOfLine;
591  }
592  }
594  if(particle == &part) {
595  size_t length = theLambdaTablePrim->length();
596  for(size_t i=0; i<length; ++i) {
597  G4PhysicsVector* v = (*theLambdaTablePrim)[i];
598  if(v) {
599  out << " LambdaPrime table from "
600  << G4BestUnit(v->Energy(0),"Energy")
601  << " to "
602  << G4BestUnit(v->GetMaxEnergy(),"Energy")
603  << " in " << v->GetVectorLength()-1
604  << " bins "
605  << endOfLine;
606  break;
607  }
608  }
609  } else {
610  out << " Used LambdaPrime table of "
611  << particle->GetParticleName() << endOfLine;
612  }
613  }
614  StreamProcessInfo(out, endOfLine);
615  modelManager->DumpModelList(out, verboseLevel, endOfLine);
616 
617  if(verboseLevel > 2 && buildLambdaTable) {
618  out << " LambdaTable address= " << theLambdaTable << endOfLine;
619  if(theLambdaTable && particle == &part) {
620  out << (*theLambdaTable) << endOfLine;
621  }
622  }
623 }
624 
625 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
626 
628 {
629  // reset parameters for the new track
634 
635  // forced biasing only for primary particles
636  if(biasManager) {
637  if(0 == track->GetParentID()) {
638  // primary particle
639  biasFlag = true;
641  }
642  }
643 }
644 
645 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
646 
648  const G4Track& track,
649  G4double previousStepSize,
651 {
652  *condition = NotForced;
653  G4double x = DBL_MAX;
654 
657  G4double scaledEnergy = preStepKinEnergy*massRatio;
658  SelectModel(scaledEnergy, currentCoupleIndex);
659 
660  if(!currentModel->IsActive(scaledEnergy)) {
663  return x;
664  }
665 
666  // forced biasing only for primary particles
667  if(biasManager) {
668  if(0 == track.GetParentID()) {
669  if(biasFlag &&
671  return biasManager->GetStepLimit(currentCoupleIndex, previousStepSize);
672  }
673  }
674  }
675 
676  // compute mean free path
680 
681  // zero cross section
682  if(preStepLambda <= 0.0) {
685  }
686  }
687 
688  // non-zero cross section
689  if(preStepLambda > 0.0) {
690 
692 
693  // beggining of tracking (or just after DoIt of this process)
696 
697  } else if(currentInteractionLength < DBL_MAX) {
698 
700  previousStepSize/currentInteractionLength;
703  }
704 
705  // new mean free path and step limit for the next step
708  /*
709 #ifdef G4VERBOSE
710  if (verboseLevel>2){
711  G4cout << "G4VEmProcess::PostStepGetPhysicalInteractionLength ";
712  G4cout << "[ " << GetProcessName() << "]" << G4endl;
713  G4cout << " for " << currentParticle->GetParticleName()
714  << " in Material " << currentMaterial->GetName()
715  << " Ekin(MeV)= " << preStepKinEnergy/MeV
716  <<G4endl;
717  G4cout << " MeanFreePath = " << currentInteractionLength/cm << "[cm]"
718  << " InteractionLength= " << x/cm <<"[cm] " <<G4endl;
719  }
720 #endif
721  */
722  }
723  return x;
724 }
725 
726 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
727 
729  const G4Step& step)
730 {
731  // In all cases clear number of interaction lengths
734 
736 
737  // Do not make anything if particle is stopped, the annihilation then
738  // should be performed by the AtRestDoIt!
739  if (track.GetTrackStatus() == fStopButAlive) { return &fParticleChange; }
740 
741  G4double finalT = track.GetKineticEnergy();
742 
743  // forced process - should happen only once per track
744  if(biasFlag) {
746  biasFlag = false;
747  }
748  }
749 
750  // Integral approach
751  if (integral) {
752  G4double lx = GetLambda(finalT, currentCouple);
753  if(preStepLambda<lx && 1 < verboseLevel) {
754  G4cout << "WARNING: for " << currentParticle->GetParticleName()
755  << " and " << GetProcessName()
756  << " E(MeV)= " << finalT/MeV
757  << " preLambda= " << preStepLambda << " < "
758  << lx << " (postLambda) "
759  << G4endl;
760  }
761 
762  if(preStepLambda*G4UniformRand() > lx) {
764  return &fParticleChange;
765  }
766  }
767 
768  G4double scaledEnergy = finalT*massRatio;
769  SelectModel(scaledEnergy, currentCoupleIndex);
770  if(!currentModel->IsActive(scaledEnergy)) { return &fParticleChange; }
771 
772  // define new weight for primary and secondaries
774  if(weightFlag) {
775  weight /= biasFactor;
777  }
778 
779  /*
780  if(0 < verboseLevel) {
781  G4cout << "G4VEmProcess::PostStepDoIt: Sample secondary; E= "
782  << finalT/MeV
783  << " MeV; model= (" << currentModel->LowEnergyLimit()
784  << ", " << currentModel->HighEnergyLimit() << ")"
785  << G4endl;
786  }
787  */
788 
789  // sample secondaries
790  secParticles.clear();
792  currentCouple,
793  track.GetDynamicParticle(),
794  (*theCuts)[currentCoupleIndex]);
795 
796  G4int num0 = secParticles.size();
797 
798  // splitting or Russian roulette
799  if(biasManager) {
801  G4double eloss = 0.0;
803  secParticles, track, currentModel, &fParticleChange, eloss,
805  step.GetPostStepPoint()->GetSafety());
806  if(eloss > 0.0) {
809  }
810  }
811  }
812 
813  // save secondaries
814  G4int num = secParticles.size();
815  if(num > 0) {
816 
819  G4double time = track.GetGlobalTime();
820 
821  for (G4int i=0; i<num; ++i) {
822  if (secParticles[i]) {
825  G4double e = dp->GetKineticEnergy();
826  G4bool good = true;
827  if(applyCuts) {
828  if (p == theGamma) {
829  if (e < (*theCutsGamma)[currentCoupleIndex]) { good = false; }
830 
831  } else if (p == theElectron) {
832  if (e < (*theCutsElectron)[currentCoupleIndex]) { good = false; }
833 
834  } else if (p == thePositron) {
837  good = false;
838  e += 2.0*electron_mass_c2;
839  }
840  }
841  // added secondary if it is good
842  }
843  if (good) {
844  G4Track* t = new G4Track(dp, time, track.GetPosition());
846  t->SetWeight(weight);
848 
849  // define type of secondary
851  else if(i < num0) {
852  if(p == theGamma) {
854  } else {
856  }
857  } else {
859  }
860  /*
861  G4cout << "Secondary(post step) has weight " << t->GetWeight()
862  << ", Ekin= " << t->GetKineticEnergy()/MeV << " MeV "
863  << GetProcessName() << " fluoID= " << fluoID
864  << " augerID= " << augerID <<G4endl;
865  */
866  } else {
867  delete dp;
868  edep += e;
869  }
870  }
871  }
873  }
874 
880  }
881 
882  return &fParticleChange;
883 }
884 
885 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
886 
888  const G4String& directory,
889  G4bool ascii)
890 {
891  G4bool yes = true;
892  const G4VEmProcess* masterProc =
893  static_cast<const G4VEmProcess*>(GetMasterProcess());
894  if(masterProc && masterProc != this) { return yes; }
895 
896  if ( theLambdaTable && part == particle) {
897  const G4String name =
898  GetPhysicsTableFileName(part,directory,"Lambda",ascii);
899  yes = theLambdaTable->StorePhysicsTable(name,ascii);
900 
901  if ( yes ) {
902  G4cout << "Physics table is stored for " << particle->GetParticleName()
903  << " and process " << GetProcessName()
904  << " in the directory <" << directory
905  << "> " << G4endl;
906  } else {
907  G4cout << "Fail to store Physics Table for "
909  << " and process " << GetProcessName()
910  << " in the directory <" << directory
911  << "> " << G4endl;
912  }
913  }
914  if ( theLambdaTablePrim && part == particle) {
915  const G4String name =
916  GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii);
917  yes = theLambdaTablePrim->StorePhysicsTable(name,ascii);
918 
919  if ( yes ) {
920  G4cout << "Physics table prim is stored for "
922  << " and process " << GetProcessName()
923  << " in the directory <" << directory
924  << "> " << G4endl;
925  } else {
926  G4cout << "Fail to store Physics Table Prim for "
928  << " and process " << GetProcessName()
929  << " in the directory <" << directory
930  << "> " << G4endl;
931  }
932  }
933  return yes;
934 }
935 
936 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
937 
939  const G4String& directory,
940  G4bool ascii)
941 {
942  if(1 < verboseLevel) {
943  G4cout << "G4VEmProcess::RetrievePhysicsTable() for "
944  << part->GetParticleName() << " and process "
945  << GetProcessName() << G4endl;
946  }
947  G4bool yes = true;
948 
950  || particle != part) { return yes; }
951 
952  const G4String particleName = part->GetParticleName();
953  G4String filename;
954 
955  if(buildLambdaTable) {
956  filename = GetPhysicsTableFileName(part,directory,"Lambda",ascii);
958  filename,ascii);
959  if ( yes ) {
960  if (0 < verboseLevel) {
961  G4cout << "Lambda table for " << particleName
962  << " is Retrieved from <"
963  << filename << ">"
964  << G4endl;
965  }
966  if(theParameters->Spline()) {
967  size_t n = theLambdaTable->length();
968  for(size_t i=0; i<n; ++i) {
969  if((* theLambdaTable)[i]) {
970  (* theLambdaTable)[i]->SetSpline(true);
971  }
972  }
973  }
974  } else {
975  if (1 < verboseLevel) {
976  G4cout << "Lambda table for " << particleName << " in file <"
977  << filename << "> is not exist"
978  << G4endl;
979  }
980  }
981  }
983  filename = GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii);
985  filename,ascii);
986  if ( yes ) {
987  if (0 < verboseLevel) {
988  G4cout << "Lambda table prim for " << particleName
989  << " is Retrieved from <"
990  << filename << ">"
991  << G4endl;
992  }
993  if(theParameters->Spline()) {
994  size_t n = theLambdaTablePrim->length();
995  for(size_t i=0; i<n; ++i) {
996  if((* theLambdaTablePrim)[i]) {
997  (* theLambdaTablePrim)[i]->SetSpline(true);
998  }
999  }
1000  }
1001  } else {
1002  if (1 < verboseLevel) {
1003  G4cout << "Lambda table prim for " << particleName << " in file <"
1004  << filename << "> is not exist"
1005  << G4endl;
1006  }
1007  }
1008  }
1009 
1010  return yes;
1011 }
1012 
1013 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1014 
1015 G4double
1017  const G4MaterialCutsCouple* couple)
1018 {
1019  // Cross section per atom is calculated
1020  DefineMaterial(couple);
1021  G4double cross = 0.0;
1023  cross = GetCurrentLambda(kineticEnergy);
1024  } else {
1025  SelectModel(kineticEnergy, currentCoupleIndex);
1028  kineticEnergy);
1029  }
1030 
1031  if(cross < 0.0) { cross = 0.0; }
1032  return cross;
1033 }
1034 
1035 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1036 
1038  G4double,
1040 {
1041  *condition = NotForced;
1042  return G4VEmProcess::MeanFreePath(track);
1043 }
1044 
1045 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1046 
1048 {
1051  G4double x = DBL_MAX;
1052  if(0.0 < preStepLambda) { x = 1.0/preStepLambda; }
1053  return x;
1054 }
1055 
1056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1057 
1058 G4double
1060  G4double Z, G4double A, G4double cut)
1061 {
1062  SelectModel(kineticEnergy, currentCoupleIndex);
1063  G4double x = 0.0;
1064  if(currentModel) {
1066  Z,A,cut);
1067  }
1068  return x;
1069 }
1070 
1071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1072 
1074 {
1075  if(1 < verboseLevel) {
1076  G4cout << "### G4VEmProcess::FindLambdaMax: "
1077  << particle->GetParticleName()
1078  << " and process " << GetProcessName() << " " << G4endl;
1079  }
1080  size_t n = theLambdaTable->length();
1081  G4PhysicsVector* pv;
1082  G4double e, ss, emax, smax;
1083 
1084  size_t i;
1085 
1086  // first loop on existing vectors
1087  for (i=0; i<n; ++i) {
1088  pv = (*theLambdaTable)[i];
1089  if(pv) {
1090  size_t nb = pv->GetVectorLength();
1091  emax = DBL_MAX;
1092  smax = 0.0;
1093  if(nb > 0) {
1094  for (size_t j=0; j<nb; ++j) {
1095  e = pv->Energy(j);
1096  ss = (*pv)(j);
1097  if(ss > smax) {
1098  smax = ss;
1099  emax = e;
1100  }
1101  }
1102  }
1104  theCrossSectionMax[i] = smax;
1105  if(1 < verboseLevel) {
1106  G4cout << "For " << particle->GetParticleName()
1107  << " Max CS at i= " << i << " emax(MeV)= " << emax/MeV
1108  << " lambda= " << smax << G4endl;
1109  }
1110  }
1111  }
1112  // second loop using base materials
1113  for (i=0; i<n; ++i) {
1114  pv = (*theLambdaTable)[i];
1115  if(!pv){
1116  G4int j = (*theDensityIdx)[i];
1118  theCrossSectionMax[i] = (*theDensityFactor)[i]*theCrossSectionMax[j];
1119  }
1120  }
1121 }
1122 
1123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1124 
1127 {
1128  G4PhysicsVector* v =
1131  return v;
1132 }
1133 
1134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1135 
1137 {
1138  const G4Element* elm = nullptr;
1140  return elm;
1141 }
1142 
1143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1144 
1146 {
1147  if(f > 0.0) {
1148  biasFactor = f;
1149  weightFlag = flag;
1150  if(1 < verboseLevel) {
1151  G4cout << "### SetCrossSectionBiasingFactor: for "
1152  << particle->GetParticleName()
1153  << " and process " << GetProcessName()
1154  << " biasFactor= " << f << " weightFlag= " << flag
1155  << G4endl;
1156  }
1157  }
1158 }
1159 
1160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1161 
1162 void
1164  G4bool flag)
1165 {
1166  if(!biasManager) { biasManager = new G4EmBiasingManager(); }
1167  if(1 < verboseLevel) {
1168  G4cout << "### ActivateForcedInteraction: for "
1169  << particle->GetParticleName()
1170  << " and process " << GetProcessName()
1171  << " length(mm)= " << length/mm
1172  << " in G4Region <" << r
1173  << "> weightFlag= " << flag
1174  << G4endl;
1175  }
1176  weightFlag = flag;
1178 }
1179 
1180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1181 
1182 void
1184  G4double factor,
1185  G4double energyLimit)
1186 {
1187  if (0.0 <= factor) {
1188 
1189  // Range cut can be applied only for e-
1190  if(0.0 == factor && secondaryParticle != G4Electron::Electron())
1191  { return; }
1192 
1193  if(!biasManager) { biasManager = new G4EmBiasingManager(); }
1194  biasManager->ActivateSecondaryBiasing(region, factor, energyLimit);
1195  if(1 < verboseLevel) {
1196  G4cout << "### ActivateSecondaryBiasing: for "
1197  << " process " << GetProcessName()
1198  << " factor= " << factor
1199  << " in G4Region <" << region
1200  << "> energyLimit(MeV)= " << energyLimit/MeV
1201  << G4endl;
1202  }
1203  }
1204 }
1205 
1206 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1207 
1209 {
1210  if(5 < n && n < 10000000) {
1211  nLambdaBins = n;
1212  actBinning = true;
1213  } else {
1214  G4double e = (G4double)n;
1215  PrintWarning("SetLambdaBinning", e);
1216  }
1217 }
1218 
1219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1220 
1222 {
1223  if(1.e-3*eV < e && e < maxKinEnergy) {
1226  minKinEnergy = e;
1227  actMinKinEnergy = true;
1228  } else { PrintWarning("SetMinKinEnergy", e); }
1229 }
1230 
1231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1232 
1234 {
1235  if(minKinEnergy < e && e < 1.e+6*TeV) {
1238  maxKinEnergy = e;
1239  actMaxKinEnergy = true;
1240  } else { PrintWarning("SetMaxKinEnergy", e); }
1241 }
1242 
1243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1244 
1246 {
1247  if(theParameters->MinKinEnergy() <= e &&
1248  e <= theParameters->MaxKinEnergy()) { minKinEnergyPrim = e; }
1249  else { PrintWarning("SetMinKinEnergyPrim", e); }
1250 }
1251 
1252 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1253 
1255 {
1256  G4String ss = "G4VEmProcess::" + tit;
1258  ed << "Parameter is out of range: " << val
1259  << " it will have no effect!\n" << " Process "
1260  << GetProcessName() << " nbins= " << theParameters->NumberOfBins()
1261  << " Emin(keV)= " << theParameters->MinKinEnergy()/keV
1262  << " Emax(GeV)= " << theParameters->MaxKinEnergy()/GeV;
1263  G4Exception(ss, "em0044", JustWarning, ed);
1264 }
1265 
1266 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1267 
1268 void G4VEmProcess::ProcessDescription(std::ostream& out) const
1269 {
1270  if(particle) {
1271  StreamInfo(out, *particle, G4String("<br>\n"));
1272  }
1273 }
1274 
1275 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
virtual void PreparePhysicsTable(const G4ParticleDefinition &) override
Float_t x
Definition: compare.C:6
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
G4double fFactor
G4double Energy(size_t index) const
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
G4double GetKineticEnergy() const
void AddSecondary(G4Track *aSecondary)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void BuildLambdaTable()
const XML_Char * name
Definition: expat.h:151
G4bool IsActive(G4double kinEnergy)
Definition: G4VEmModel.hh:735
G4int NumberOfBinsPerDecade() const
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:45
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
G4VAtomDeexcitation * AtomDeexcitation()
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
static constexpr double MeV
Definition: G4SIunits.hh:214
void SetMaxKinEnergy(G4double e)
void SetWeight(G4double aValue)
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:707
G4double preStepKinEnergy
G4VEmModel * GetRegionModel(G4int idx, size_t couple_index) const
size_t basedCoupleIndex
G4double mfpKinEnergy
void SetMinKinEnergy(G4double e)
void StreamInfo(std::ostream &outFile, const G4ParticleDefinition &, G4String endOfLine=G4String("\n")) const
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4double minSubRange, G4int verb)
static constexpr double keV
Definition: G4SIunits.hh:216
const G4Element * GetCurrentElement() const
void ComputeIntegralLambda(G4double kinEnergy)
G4bool applyCuts
std::vector< G4double > theCrossSectionMax
static constexpr double mm
Definition: G4SIunits.hh:115
void DefineRegParamForEM(G4VEmProcess *) const
void ProposeWeight(G4double finalWeight)
void SetCreatorModelIndex(G4int idx)
const std::vector< G4int > * GetCoupleIndexes()
const G4String & GetParticleSubType() const
G4bool ApplyCuts() const
#define G4endl
Definition: G4ios.hh:61
G4PhysicsTable * theLambdaTablePrim
const G4VProcess * GetMasterProcess() const
Definition: G4VProcess.hh:541
const char * p
Definition: xmltok.h:285
G4VEmProcess(const G4String &name, G4ProcessType type=fElectromagnetic)
Definition: G4VEmProcess.cc:91
G4double MaxKinEnergy() const
G4int mainSecondaries
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster)
const G4String & GetParticleName() const
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="")
const G4String & GetParticleType() const
G4bool IsMaster() const
G4VEmModel * EmModel(size_t index=0) const
const G4TouchableHandle & GetTouchableHandle() const
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="", G4bool flag=true)
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
void DefineMaterial(const G4MaterialCutsCouple *couple)
G4bool splineFlag
void SetSecondaryWeightByProcess(G4bool)
G4bool GetFlag(size_t idx) const
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
G4double ApplySecondaryBiasing(std::vector< G4DynamicParticle * > &, const G4Track &track, G4VEmModel *currentModel, G4ParticleChangeForGamma *pParticleChange, G4double &eloss, G4int coupleIdx, G4double tcut, G4double safety=0.0)
static const G4double emax
const G4ParticleDefinition * GetParticleDefinition() const
G4double condition(const G4ErrorSymMatrix &m)
G4bool ForcedInteractionRegion(G4int coupleIdx)
const G4ParticleDefinition * thePositron
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *)
void SetMasterThread(G4bool val)
Definition: G4VEmModel.hh:693
G4bool actMaxKinEnergy
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
G4bool SecondaryBiasingRegion(G4int coupleIdx)
const G4Material * baseMaterial
G4VEmModel * GetRegionModel(G4int idx, size_t index_couple)
G4VEmModel * GetModel(G4int idx, G4bool ver=false)
void PrintWarning(G4String tit, G4double val)
G4double GetPDGMass() const
void DumpModelList(std::ostream &out, G4int verb)
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
const G4ParticleDefinition * currentParticle
G4double G4Log(G4double x)
Definition: G4Log.hh:230
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)
void SetParticle(const G4ParticleDefinition *p)
G4bool actBinning
G4VEmModel * SelectModel(G4double &kinEnergy, size_t index)
const std::vector< G4int > * theDensityIdx
G4double currentInteractionLength
Definition: G4VProcess.hh:297
const std::vector< G4double > * theCutsPositron
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static constexpr double proton_mass_c2
G4double GetLocalEnergyDeposit() const
Float_t Z
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:440
std::vector< G4VEmModel * > emModels
static constexpr double TeV
Definition: G4SIunits.hh:218
G4int NumberOfModels() const
G4PhysicsTable * LambdaTablePrim() const
G4double minKinEnergy
void Register(G4VEnergyLossProcess *p)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
Double_t scale
G4int GetNumberOfModels() const
TString part[npart]
Definition: Style.C:32
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
virtual void ProcessDescription(std::ostream &outFile) const override
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
G4bool weightFlag
void SetEmModel(G4VEmModel *, G4int index=0)
G4ProcessType
G4PhysicsTable * LambdaTable() const
G4ParticleChangeForGamma fParticleChange
static constexpr double electron_mass_c2
const G4ParticleDefinition * theElectron
G4double biasFactor
G4VEmModel * currentModel
void InitialiseBaseMaterials(G4PhysicsTable *table)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
#define G4UniformRand()
Definition: Randomize.hh:53
G4double GetGlobalTime() const
void SetSpline(G4bool)
const std::vector< G4double > * GetDensityFactors()
const G4ParticleDefinition * secondaryParticle
void FillSecondDerivatives()
G4int WorkerVerbose() const
G4double ComputeCrossSectionPerAtom(G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
double A(double temperature)
G4double GetLambda(G4double &kinEnergy, const G4MaterialCutsCouple *couple)
void SetTouchableHandle(const G4TouchableHandle &apValue)
std::vector< G4DynamicParticle * > secParticles
const G4String & GetProcessName() const
Definition: G4VProcess.hh:411
const G4ThreeVector & GetPosition() const
G4double LambdaFactor() const
void SetPolarAngleLimit(G4double)
Definition: G4VEmModel.hh:742
void DeRegister(G4VEnergyLossProcess *p)
void UpdateEmModel(const G4String &model_name, G4double emin, G4double emax)
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4double maxKinEnergy
static constexpr double eV
Definition: G4SIunits.hh:215
G4EmBiasingManager * biasManager
virtual void StartTracking(G4Track *) override
G4EmParameters * theParameters
Definition: G4Step.hh:76
G4StepPoint * GetPostStepPoint() const
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:357
const std::vector< G4double > * theCutsGamma
G4int Verbose() const
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
static G4Electron * Electron()
Definition: G4Electron.cc:94
void SetLambdaBinning(G4int nbins)
float bin[41]
Definition: plottest35.C:14
Double_t edep
G4LossTableBuilder * GetTableBuilder()
G4double MinKinEnergy() const
void InitializeForPostStep(const G4Track &)
std::vector< G4double > theEnergyOfCrossSectionMax
void SetMinKinEnergyPrim(G4double e)
G4bool actSpline
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4double theInitialNumberOfInteractionLength
Definition: G4VProcess.hh:300
G4PhysicsTable * theLambdaTable
G4int NumberOfRegionModels(size_t index_couple) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double GetProposedKineticEnergy() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:252
int G4lrint(double ad)
Definition: templates.hh:151
G4double GetMaxEnergy() const
double weight
Definition: plottest35.C:25
int G4int
Definition: G4Types.hh:78
G4double MscThetaLimit() const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
Definition: G4VEmModel.cc:454
G4double minKinEnergyPrim
const std::vector< G4double > * theCutsElectron
G4double GetCurrentLambda(G4double kinEnergy)
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4ProcessManager * GetProcessManager() const
G4int verboseLevel
Definition: G4VProcess.hh:371
const std::vector< G4double > * theDensityFactor
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
G4double GetSafety() const
G4TrackStatus GetTrackStatus() const
G4ForceCondition
void FillLambdaVector(G4PhysicsVector *, const G4MaterialCutsCouple *, G4bool startFromNull=true, G4EmTableType t=fRestricted)
size_t idxLambda
G4double GetKineticEnergy() const
G4int GetNumberOfRegionModels(size_t couple_index) const
G4int size() const
G4GLOB_DLL std::ostream G4cout
const G4int smax
const G4ParticleDefinition * particle
virtual ~G4VEmProcess()
void ClearNumberOfInteractionLengthLeft()
Definition: G4VProcess.hh:450
static G4LossTableManager * Instance()
void UpdateEmModel(const G4String &, G4double, G4double)
const std::vector< G4double > * theCuts
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
void clearAndDestroy()
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
Char_t n[5]
const G4Element * GetCurrentElement() const
Definition: G4VEmModel.hh:477
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
const G4Material * GetMaterial() const
G4int numberOfModels
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
G4bool actMinKinEnergy
G4EmModelManager * modelManager
const G4ParticleDefinition * GetParticleDefinition() const
G4double theNumberOfInteractionLengthLeft
Definition: G4VProcess.hh:293
G4LossTableManager * lManager
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double lambdaFactor
G4TrackStatus GetTrackStatus() const
void FindLambdaMax()
size_t currentCoupleIndex
G4int NumberOfBins() const
G4bool buildLambdaTable
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:609
#define DBL_MAX
Definition: templates.hh:83
G4bool startFromNull
size_t idxLambdaPrim
void ProposeTrackStatus(G4TrackStatus status)
const G4MaterialCutsCouple * currentCouple
static constexpr double GeV
Definition: G4SIunits.hh:217
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
Definition: G4VProcess.cc:191
const G4DynamicParticle * GetDynamicParticle() const
const G4ParticleDefinition * theGamma
G4bool Spline() const
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
Definition: G4VEmModel.cc:218
void SetFluoFlag(G4bool val)
const G4Material * currentMaterial
static G4EmParameters * Instance()
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4double preStepLambda
size_t GetVectorLength() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double MeanFreePath(const G4Track &track)
static G4bool RetrievePhysicsTable(G4PhysicsTable *physTable, const G4String &fileName, G4bool ascii)
G4double GetParentWeight() const
G4int GetParentID() const
virtual void StreamProcessInfo(std::ostream &, G4String) const
G4int GetProcessSubType() const
Definition: G4VProcess.hh:429
void SetNumberOfSecondaries(G4int totSecondaries)
static G4int Register(const G4String &)
size_t length() const
G4double massRatio