Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VMultipleScattering.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: G4VMultipleScattering.cc 107364 2017-11-09 10:53:25Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class file
31 //
32 //
33 // File name: G4VMultipleScattering
34 //
35 // Author: Vladimir Ivanchenko on base of Laszlo Urban code
36 //
37 // Creation date: 25.03.2003
38 //
39 // Modifications:
40 //
41 // 13.04.03 Change printout (V.Ivanchenko)
42 // 04-06-03 Fix compilation warnings (V.Ivanchenko)
43 // 16-07-03 Use G4VMscModel interface (V.Ivanchenko)
44 // 03-11-03 Fix initialisation problem in RetrievePhysicsTable (V.Ivanchenko)
45 // 04-11-03 Update PrintInfoDefinition (V.Ivanchenko)
46 // 01-03-04 SampleCosineTheta signature changed
47 // 22-04-04 SampleCosineTheta signature changed back to original
48 // 27-08-04 Add InitialiseForRun method (V.Ivanchneko)
49 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
50 // 11-03-05 Shift verbose level by 1 (V.Ivantchenko)
51 // 15-04-05 optimize internal interface (V.Ivanchenko)
52 // 15-04-05 remove boundary flag (V.Ivanchenko)
53 // 27-10-05 introduce virtual function MscStepLimitation() (V.Ivanchenko)
54 // 12-04-07 Add verbosity at destruction (V.Ivanchenko)
55 // 27-10-07 Virtual functions moved to source (V.Ivanchenko)
56 // 11-03-08 Set skin value does not effect step limit type (V.Ivanchenko)
57 // 24-06-09 Removed hidden bin in G4PhysicsVector (V.Ivanchenko)
58 // 04-06-13 Adoptation to MT mode (V.Ivanchenko)
59 //
60 // Class Description:
61 //
62 // It is the generic process of multiple scattering it includes common
63 // part of calculations for all charged particles
64 
65 // -------------------------------------------------------------------
66 //
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
69 
70 #include "G4VMultipleScattering.hh"
71 #include "G4PhysicalConstants.hh"
72 #include "G4SystemOfUnits.hh"
73 #include "G4LossTableManager.hh"
74 #include "G4MaterialCutsCouple.hh"
75 #include "G4Step.hh"
76 #include "G4ParticleDefinition.hh"
77 #include "G4VEmFluctuationModel.hh"
78 #include "G4UnitsTable.hh"
79 #include "G4ProductionCutsTable.hh"
80 #include "G4Electron.hh"
81 #include "G4GenericIon.hh"
83 #include "G4SafetyHelper.hh"
84 #include "G4ParticleTable.hh"
85 #include "G4ProcessVector.hh"
86 #include "G4ProcessManager.hh"
87 #include <iostream>
88 
89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
90 
93  numberOfModels(0),
94  firstParticle(nullptr),
95  currParticle(nullptr),
96  stepLimit(fUseSafety),
97  facrange(0.04),
98  latDisplacement(true),
99  isIon(false),
100  fDispBeyondSafety(false),
101  fNewPosition(0.,0.,0.),
102  fNewDirection(0.,0.,1.)
103 {
105  SetVerboseLevel(1);
107  if("ionmsc" == name) { firstParticle = G4GenericIon::GenericIon(); }
108 
110 
112  fIonisation = nullptr;
113 
114  geomMin = 0.05*CLHEP::nm;
116 
118  safetyHelper = nullptr;
119  fPositionChanged = false;
120  isActive = false;
121 
122  currentModel = nullptr;
125  emManager->Register(this);
126 }
127 
128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
129 
131 {
132  /*
133  if(1 < verboseLevel) {
134  G4cout << "G4VMultipleScattering destruct " << GetProcessName()
135  << G4endl;
136  }
137  */
138  delete modelManager;
139  emManager->DeRegister(this);
140 }
141 
142 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
143 
145  const G4Region* region)
146 {
147  G4VEmFluctuationModel* fm = nullptr;
148  modelManager->AddEmModel(order, p, fm, region);
149  if(p) { p->SetParticleChange(pParticleChange); }
150 }
151 
152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
153 
155 {
156  for(auto & msc : mscModels) { if(msc == p) { return; } }
157  mscModels.push_back(p);
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
161 
163 {
164  return (index < mscModels.size()) ? mscModels[index] : nullptr;
165 }
166 
167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
168 
169 void
171 {
172  if(1 < verboseLevel) {
173  G4cout << "### G4VMultipleScattering::PrepearPhysicsTable() for "
174  << GetProcessName()
175  << " and particle " << part.GetParticleName()
176  << G4endl;
177  }
178  G4bool master = emManager->IsMaster();
179 
180  if(!firstParticle) { firstParticle = &part; }
181  if(part.GetParticleType() == "nucleus") {
183  latDisplacement = false;
184  facrange = 0.2;
185  G4String pname = part.GetParticleName();
186  if(pname != "deuteron" && pname != "triton" &&
187  pname != "alpha+" && pname != "helium" &&
188  pname != "alpha" && pname != "He3" &&
189  pname != "hydrogen") {
190 
191  const G4ParticleDefinition* theGenericIon =
193  if(&part == theGenericIon) { isIon = true; }
194 
195  if(theGenericIon && firstParticle != theGenericIon) {
196  G4ProcessManager* pm = theGenericIon->GetProcessManager();
198  size_t n = v->size();
199  for(size_t j=0; j<n; ++j) {
200  if((*v)[j] == this) {
201  firstParticle = theGenericIon;
202  isIon = true;
203  break;
204  }
205  }
206  }
207  }
208  }
209 
210  emManager->PreparePhysicsTable(&part, this, master);
211  currParticle = nullptr;
212 
213  if(1 < verboseLevel) {
214  G4cout << "### G4VMultipleScattering::PrepearPhysicsTable() for "
215  << GetProcessName()
216  << " and particle " << part.GetParticleName()
217  << " local particle " << firstParticle->GetParticleName()
218  << " isIon: " << isIon << " isMaster: " << master
219  << G4endl;
220  }
221 
222  if(firstParticle == &part) {
223 
224  // initialise process
226 
227  // heavy particles and not ions
228  if(!isIon) {
229  if(part.GetPDGMass() > MeV) {
233  } else {
237  }
238  if(latDisplacement) {
240  }
241  }
242  if(master) { SetVerboseLevel(theParameters->Verbose()); }
244 
245  // initialisation of models
247  /*
248  G4cout << "### G4VMultipleScattering::PreparePhysicsTable() for "
249  << GetProcessName()
250  << " and particle " << part.GetParticleName()
251  << " Nmod= " << numberOfModels << " " << this
252  << G4endl;
253  */
254  for(G4int i=0; i<numberOfModels; ++i) {
255  G4VMscModel* msc = static_cast<G4VMscModel*>(GetModelByIndex(i));
256  if(!msc) { continue; }
257  msc->SetIonisation(nullptr, firstParticle);
258  msc->SetMasterThread(master);
259  currentModel = msc;
262  msc->SetSkin(theParameters->MscSkin());
263  msc->SetRangeFactor(facrange);
266  G4double emax =
268  msc->SetHighEnergyLimit(emax);
269  }
270 
272  10.0, verboseLevel);
273 
274  if(!safetyHelper) {
276  ->GetSafetyHelper();
278  }
279  }
280 }
281 
282 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
283 
285 {
286  G4String num = part.GetParticleName();
287  G4bool master = emManager->IsMaster();
288  if(1 < verboseLevel) {
289  G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for "
290  << GetProcessName()
291  << " and particle " << num << " isIon: " << isIon
292  << " IsMaster: " << master << G4endl;
293  }
294  const G4VMultipleScattering* masterProcess =
295  static_cast<const G4VMultipleScattering*>(GetMasterProcess());
296 
297  if(firstParticle == &part) {
298  /*
299  G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for "
300  << GetProcessName()
301  << " and particle " << num
302  << " IsMaster= " << G4LossTableManager::Instance()->IsMaster()
303  << " " << this
304  << G4endl;
305  */
307 
308  if(!master) {
309  // initialisation of models
310  /*
311  G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for "
312  << GetProcessName()
313  << " and particle " << num
314  << " Nmod= " << numberOfModels << " " << this
315  << G4endl;
316  */
317  for(G4int i=0; i<numberOfModels; ++i) {
318  G4VMscModel* msc = static_cast<G4VMscModel*>(GetModelByIndex(i));
319  if(!msc) { continue; }
320  G4VMscModel* msc0=
321  static_cast<G4VMscModel*>(masterProcess->GetModelByIndex(i));
322  msc->SetCrossSectionTable(msc0->GetCrossSectionTable(), false);
323  msc->InitialiseLocal(firstParticle, msc0);
324  }
325  }
326  }
327 
328  // explicitly defined printout by particle name
329  if(1 < verboseLevel ||
330  (0 < verboseLevel && (num == "e-" ||
331  num == "e+" || num == "mu+" ||
332  num == "mu-" || num == "proton"||
333  num == "pi+" || num == "pi-" ||
334  num == "kaon+" || num == "kaon-" ||
335  num == "alpha" || num == "anti_proton" ||
336  num == "GenericIon" || num == "alpha+" ||
337  num == "alpha++" )))
338  {
339  StreamInfo(G4cout, part);
340  }
341 
342  if(1 < verboseLevel) {
343  G4cout << "### G4VMultipleScattering::BuildPhysicsTable() done for "
344  << GetProcessName()
345  << " and particle " << num
346  << G4endl;
347  }
348 }
349 
350 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
351 
352 void G4VMultipleScattering::StreamInfo(std::ostream& outFile,
353  const G4ParticleDefinition& part, G4String endOfLine) const
354 {
355  outFile << endOfLine << GetProcessName() << ": ";
356  if (endOfLine != G4String("<br>\n")) {
357  outFile << " for " << part.GetParticleName();
358  }
359  outFile << " SubType= " << GetProcessSubType() << endOfLine;
360  StreamProcessInfo(outFile, endOfLine);
361  modelManager->DumpModelList(outFile, verboseLevel, endOfLine);
362 }
363 
364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
365 
367 {
368  G4VEnergyLossProcess* eloss = nullptr;
369  if(track->GetParticleDefinition() != currParticle) {
372  eloss = fIonisation;
373  }
374  /*
375  G4cout << "G4VMultipleScattering::StartTracking Nmod= " << numberOfModels
376  << " " << currParticle->GetParticleName()
377  << " E(MeV)= " << track->GetKineticEnergy()
378  << " Ion= " << eloss << " " << fIonisation << " IsMaster= "
379  << G4LossTableManager::Instance()->IsMaster()
380  << G4endl;
381  */
382  for(G4int i=0; i<numberOfModels; ++i) {
383  /*
384  G4cout << "Next model " << i << " " << msc
385  << " Emin= " << msc->LowEnergyLimit()
386  << " Emax= " << msc->HighEnergyLimit()
387  << " Eact= " << msc->LowEnergyActivationLimit() << G4endl;
388  */
389  G4VEmModel* msc = GetModelByIndex(i);
390  msc->StartTracking(track);
391  if(eloss) {
392  G4VMscModel* mscmod = static_cast<G4VMscModel*>(msc);
393  if(mscmod) { mscmod->SetIonisation(fIonisation, currParticle); }
394  }
395  }
396 }
397 
398 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
399 
401  const G4Track& track,
402  G4double,
403  G4double currentMinimalStep,
404  G4double&,
405  G4GPILSelection* selection)
406 {
407  // get Step limit proposed by the process
408  *selection = NotCandidateForSelection;
409  physStepLimit = gPathLength = tPathLength = currentMinimalStep;
410 
411  G4double ekin = track.GetKineticEnergy();
412  /*
413  G4cout << "MSC::AlongStepGPIL: Ekin= " << ekin
414  << " " << currParticle->GetParticleName()
415  << " currMod " << currentModel
416  << G4endl;
417  */
418  // isIon flag is used only to select a model
419  if(isIon) {
420  ekin *= proton_mass_c2/track.GetParticleDefinition()->GetPDGMass();
421  }
422 
423  // select new model
424  if(1 < numberOfModels) {
425  currentModel = static_cast<G4VMscModel*>(
426  SelectModel(ekin,track.GetMaterialCutsCouple()->GetIndex()));
427  }
428  // msc is active is model is active, energy above the limit,
429  // and step size is above the limit;
430  // if it is active msc may limit the step
432  && ekin >= lowestKinEnergy) {
433  isActive = true;
434  tPathLength =
436  if (tPathLength < physStepLimit) {
437  *selection = CandidateForSelection;
438  }
439  } else { isActive = false; }
440 
441  //if(currParticle->GetPDGMass() > GeV)
442  /*
443  G4cout << "MSC::AlongStepGPIL: Ekin= " << ekin
444  << " " << currParticle->GetParticleName()
445  << " gPathLength= " << gPathLength
446  << " tPathLength= " << tPathLength
447  << " currentMinimalStep= " << currentMinimalStep
448  << " isActive " << isActive << G4endl;
449  */
450  return gPathLength;
451 }
452 
453 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
454 
455 G4double
458 {
459  *condition = NotForced;
460  return DBL_MAX;
461 }
462 
463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
464 
467 {
472  fPositionChanged = false;
473 
474  G4double geomLength = step.GetStepLength();
475 
476  // very small step - no msc
477  if(!isActive) {
478  tPathLength = geomLength;
479 
480  // sample msc
481  } else {
482  G4double range =
484  track.GetMaterialCutsCouple());
485 
487 
488  /*
489  if(currParticle->GetPDGMass() > 0.9*GeV)
490  G4cout << "G4VMsc::AlongStepDoIt: GeomLength= "
491  << geomLength
492  << " tPathLength= " << tPathLength
493  << " physStepLimit= " << physStepLimit
494  << " dr= " << range - tPathLength
495  << " ekin= " << track.GetKineticEnergy() << G4endl;
496  */
497  // protection against wrong t->g->t conversion
499 
500  // do not sample scattering at the last or at a small step
501  if(tPathLength < range && tPathLength > geomMin) {
502 
503  static const G4double minSafety = 1.20*CLHEP::nm;
504  static const G4double sFact = 0.99;
505 
507  step.GetPostStepPoint()->GetMomentumDirection(),minSafety);
508 
509  G4double r2 = displacement.mag2();
510  //G4cout << " R= " << sqrt(r2) << " Rmin= " << sqrt(minDisplacement2)
511  // << " flag= " << fDispBeyondSafety << G4endl;
512  if(r2 > minDisplacement2) {
513 
514  fPositionChanged = true;
515  G4double dispR = std::sqrt(r2);
516  G4double postSafety =
517  sFact*safetyHelper->ComputeSafety(fNewPosition, dispR);
518  //G4cout<<" R= "<< dispR<<" postSafety= "<<postSafety<<G4endl;
519 
520  // far away from geometry boundary
521  if(postSafety > 0.0 && dispR <= postSafety) {
522  fNewPosition += displacement;
523 
524  //near the boundary
525  } else {
526  // displaced point is definitely within the volume
527  //G4cout<<" R= "<<dispR<<" postSafety= "<<postSafety<<G4endl;
528  if(dispR < postSafety) {
529  fNewPosition += displacement;
530 
531  // optional extra mechanism is applied only if a particle
532  // is stopped by the boundary
533  } else if(fDispBeyondSafety && 0.0 == postSafety) {
534  fNewPosition += displacement;
535  G4double maxshift =
536  std::min(2.0*dispR, geomLength*(physStepLimit/tPathLength - 1.0));
537  G4double dist = 0.0;
538  G4double safety = postSafety + dispR;
540  /*
541  G4cout << "##MSC before Recheck maxshift= " << maxshift
542  << " postsafety= " << postSafety
543  << " Ekin= " << track.GetKineticEnergy()
544  << " " << track.GetDefinition()->GetParticleName()
545  << G4endl;
546  */
547  // check if it is possible to shift to the boundary
548  // and the shift is not large
550  fNewDirection, maxshift, &dist, &safety)
551  && std::abs(dist) < maxshift) {
552  /*
553  G4cout << "##MSC after Recheck dist= " << dist
554  << " postsafety= " << postSafety
555  << " t= " << tPathLength
556  << " g= " << geomLength
557  << " p= " << physStepLimit
558  << G4endl;
559  */
560  // shift is positive
561  if(dist >= 0.0) {
562  tPathLength *= (1.0 + dist/geomLength);
563  fNewPosition += dist*fNewDirection;
564 
565  // shift is negative cannot be larger than geomLength
566  } else {
567  maxshift = std::min(maxshift, geomLength);
568  if(0.0 < maxshift + dist) {
569  const G4ThreeVector& postpoint = step.GetPostStepPoint()->GetPosition();
571  G4double R2 = (postpoint - point).mag2();
572  G4double newdist = dist;
573  // check not more than 10 extra boundaries
574  for(G4int i=0; i<10; ++i) {
575  dist = 0.0;
577  point, fNewDirection, maxshift, &dist, &safety)
578  && std::abs(newdist + dist) < maxshift) {
579  point += dist*fNewDirection;
580  G4double R2new = (postpoint - point).mag2();
581  //G4cout << "Backward i= " << i << " dist= " << dist
582  // << " R2= " << R2new << G4endl;
583  if(dist >= 0.0 || R2new > R2) { break; }
584  R2 = R2new;
585  fNewPosition = point;
586  newdist += dist;
587  } else {
588  break;
589  }
590  }
591  tPathLength *= (1.0 + newdist/geomLength);
592  // shift on boundary is not possible for negative disp
593  } else {
594  fNewPosition += displacement*(postSafety/dispR - 1.0);
595  }
596  }
597  // shift on boundary is not possible for any disp
598  } else {
599  fNewPosition += displacement*(postSafety/dispR - 1.0);
600  }
601  // reduced displacement
602  } else if(postSafety > geomMin) {
603  fNewPosition += displacement*(postSafety/dispR);
604 
605  // very small postSafety
606  } else {
607  fPositionChanged = false;
608  }
609  }
610  if(fPositionChanged) {
613  }
614  }
615  }
616  }
618  return &fParticleChange;
619 }
620 
621 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
622 
625 {
627  return &fParticleChange;
628 }
629 
630 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
631 
633  const G4Track& track,
634  G4double previousStepSize,
635  G4double currentMinimalStep,
636  G4double& currentSafety)
637 {
639  G4double x = AlongStepGetPhysicalInteractionLength(track,previousStepSize,
640  currentMinimalStep,
641  currentSafety,
642  &selection);
643  return x;
644 }
645 
646 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
647 
649  const G4Track& track,
650  G4double previousStepSize,
651  G4double currentMinimalStep,
652  G4double& currentSafety)
653 {
654  return GetContinuousStepLimit(track,previousStepSize,currentMinimalStep,
655  currentSafety);
656 }
657 
658 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
659 
662 {
663  *condition = Forced;
664  return DBL_MAX;
665 }
666 
667 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
668 
669 G4bool
671  const G4String& directory,
672  G4bool ascii)
673 {
674  G4bool yes = true;
675  if(part != firstParticle) { return yes; }
676  const G4VMultipleScattering* masterProcess =
677  static_cast<const G4VMultipleScattering*>(GetMasterProcess());
678  if(masterProcess && masterProcess != this) { return yes; }
679 
681  static const G4String ss[4] = {"1","2","3","4"};
682  for(G4int i=0; i<nmod; ++i) {
683  G4VEmModel* msc = modelManager->GetModel(i);
684  yes = true;
685  G4PhysicsTable* table = msc->GetCrossSectionTable();
686  if (table) {
687  G4int j = std::min(i,3);
688  G4String name =
689  GetPhysicsTableFileName(part,directory,"LambdaMod"+ss[j],ascii);
690  yes = table->StorePhysicsTable(name,ascii);
691 
692  if ( yes ) {
693  if ( verboseLevel>0 ) {
694  G4cout << "Physics table are stored for "
695  << part->GetParticleName()
696  << " and process " << GetProcessName()
697  << " with a name <" << name << "> " << G4endl;
698  }
699  } else {
700  G4cout << "Fail to store Physics Table for "
701  << part->GetParticleName()
702  << " and process " << GetProcessName()
703  << " in the directory <" << directory
704  << "> " << G4endl;
705  }
706  }
707  }
708  return yes;
709 }
710 
711 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
712 
713 G4bool
715  const G4String&,
716  G4bool)
717 {
718  return true;
719 }
720 
721 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
722 
724 {
725  for(G4int i=0; i<numberOfModels; ++i) {
726  G4VMscModel* msc = static_cast<G4VMscModel*>(GetModelByIndex(i, true));
727  if(msc) { msc->SetIonisation(p, firstParticle); }
728  }
729 }
730 
731 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
732 
733 void G4VMultipleScattering::ProcessDescription(std::ostream& outFile) const
734 {
735  if(firstParticle) {
736  StreamInfo(outFile, *firstParticle, G4String("<br>\n"));
737  }
738 }
739 
740 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
741 
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
Float_t x
Definition: compare.C:6
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
void SetCrossSectionTable(G4PhysicsTable *, G4bool isLocal)
Definition: G4VEmModel.cc:462
G4double GetKineticEnergy() const
const XML_Char * name
Definition: expat.h:151
G4MscStepLimitType MscMuHadStepLimitType() const
G4VMultipleScattering(const G4String &name="msc", G4ProcessType type=fElectromagnetic)
void SetIonisation(G4VEnergyLossProcess *, const G4ParticleDefinition *part)
Definition: G4VMscModel.hh:330
G4bool IsActive(G4double kinEnergy)
Definition: G4VEmModel.hh:735
void ReLocateWithinVolume(const G4ThreeVector &pGlobalPoint)
G4SafetyHelper * GetSafetyHelper() const
G4ParticleChangeForMSC fParticleChange
static G4ParticleTable * GetParticleTable()
static constexpr double MeV
Definition: G4SIunits.hh:214
G4MscStepLimitType MscStepLimitType() const
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:707
G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4double minSubRange, G4int verb)
void ProposePosition(const G4ThreeVector &finalPosition)
G4bool LateralDisplacement() const
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
#define G4endl
Definition: G4ios.hh:61
G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
const G4VProcess * GetMasterProcess() const
Definition: G4VProcess.hh:541
const char * p
Definition: xmltok.h:285
void BuildPhysicsTable(const G4ParticleDefinition *aParticle)
virtual G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety)
Definition: G4VMscModel.cc:142
G4double MaxKinEnergy() const
G4bool RecheckDistanceToCurrentBoundary(const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double *prDistance, G4double *prNewSafety=0) const
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster)
const G4String & GetParticleName() const
const G4String & GetParticleType() const
G4bool IsMaster() const
void SetLateralDisplasmentFlag(G4bool val)
Definition: G4VMscModel.hh:195
G4MscStepLimitType stepLimit
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
G4bool MuHadLateralDisplacement() const
static const G4double emax
const G4ParticleDefinition * GetParticleDefinition() const
G4double MscMuHadRangeFactor() const
G4double condition(const G4ErrorSymMatrix &m)
void BuildPhysicsTable(const G4ParticleDefinition &) override
void SetMasterThread(G4bool val)
Definition: G4VEmModel.hh:693
virtual void Initialize(const G4Track &)
G4VEmModel * GetModel(G4int idx, G4bool ver=false)
G4double GetPDGMass() const
void DumpModelList(std::ostream &out, G4int verb)
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
const G4ParticleDefinition * currParticle
G4double ContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimalStep, G4double &currentSafety)
static constexpr double proton_mass_c2
const G4ParticleDefinition * firstParticle
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:440
G4int NumberOfModels() const
void Register(G4VEnergyLossProcess *p)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
TString part[npart]
Definition: Style.C:32
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
G4PhysicsTable * GetCrossSectionTable()
Definition: G4VEmModel.hh:808
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
G4bool LatDisplacementBeyondSafety() const
const G4ParticleDefinition const G4Material *G4double range
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
Definition: G4VMscModel.hh:283
G4ProcessType
G4double GetStepLength() const
const G4ThreeVector & GetPosition() const
G4double MscSkin() const
G4GPILSelection
G4VEmModel * SelectModel(G4double kinEnergy, size_t idx)
void SetStepLimitType(G4MscStepLimitType)
Definition: G4VMscModel.hh:223
G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimalStep, G4double &currentSafety) override
G4VMscModel * EmModel(size_t index=0) const
G4EmModelManager * modelManager
G4int WorkerVerbose() const
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
virtual void StartTracking(G4Track *)
Definition: G4VEmModel.cc:286
const G4String & GetProcessName() const
Definition: G4VProcess.hh:411
const G4ThreeVector & GetMomentumDirection() const
void SetPolarAngleLimit(G4double)
Definition: G4VEmModel.hh:742
void StartTracking(G4Track *) override
void DeRegister(G4VEnergyLossProcess *p)
double mag2() const
static constexpr double eV
G4LossTableManager * emManager
void StreamInfo(std::ostream &outFile, const G4ParticleDefinition &, G4String endOfLine=G4String("\n")) const
Definition: G4Step.hh:76
G4StepPoint * GetPostStepPoint() const
void SetIonisation(G4VEnergyLossProcess *)
virtual G4double ComputeTruePathLengthLimit(const G4Track &track, G4double &stepLimit)
Definition: G4VMscModel.cc:149
void ProposeTrueStepLength(G4double truePathLength)
G4int Verbose() const
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &) override
void InitialiseHelper()
static G4Electron * Electron()
Definition: G4Electron.cc:94
G4double GetMeanFreePath(const G4Track &track, G4double, G4ForceCondition *condition) override
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4ForceCondition *condition) override
void SetRangeFactor(G4double)
Definition: G4VMscModel.hh:209
G4double MscRangeFactor() const
static G4TransportationManager * GetTransportationManager()
void SetSkin(G4double)
Definition: G4VMscModel.hh:202
void PreparePhysicsTable(const G4ParticleDefinition &) override
virtual G4double ComputeTrueStepLength(G4double geomPathLength)
Definition: G4VMscModel.cc:163
int G4int
Definition: G4Types.hh:78
G4double MscThetaLimit() const
static constexpr double nm
Definition: SystemOfUnits.h:92
void SetEmModel(G4VMscModel *, size_t index=0)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4double currentMinimalStep, G4double &currentSafety, G4GPILSelection *selection) override
std::vector< G4VMscModel * > mscModels
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
Definition: G4VEmModel.cc:454
G4ProcessManager * GetProcessManager() const
G4int verboseLevel
Definition: G4VProcess.hh:371
virtual void ProcessDescription(std::ostream &outFile) const override
virtual void StreamProcessInfo(std::ostream &, G4String) const
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
void SetGeomFactor(G4double)
Definition: G4VMscModel.hh:216
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:435
G4ForceCondition
G4int size() const
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
G4double MscGeomFactor() const
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=nullptr)
Char_t n[5]
G4double ComputeSafety(const G4ThreeVector &pGlobalPoint, G4double maxRadius=DBL_MAX)
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:609
#define DBL_MAX
Definition: templates.hh:83
G4VEnergyLossProcess * fIonisation
const G4ThreeVector * GetMomentumDirection() const
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
Definition: G4VProcess.cc:191
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
Definition: G4VEmModel.cc:218
static G4EmParameters * Instance()
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4int GetProcessSubType() const
Definition: G4VProcess.hh:429