Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4LivermorePhotoElectricModel.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: G4LivermorePhotoElectricModel.cc 94854 2015-12-11 13:54:09Z gcosmo $
27 //
28 //
29 // Author: Sebastien Incerti
30 // 30 October 2008
31 // on base of G4LowEnergyPhotoElectric developed by A.Forti and M.G.Pia
32 //
33 // 22 Oct 2012 A & V Ivanchenko Migration data structure to G4PhysicsVector
34 //
35 
37 #include "G4SystemOfUnits.hh"
38 #include "G4PhysicalConstants.hh"
39 #include "G4LossTableManager.hh"
40 #include "G4Electron.hh"
41 #include "G4Gamma.hh"
43 #include "G4CrossSectionHandler.hh"
44 #include "G4LPhysicsFreeVector.hh"
45 #include "G4VAtomDeexcitation.hh"
47 #include "G4AtomicShell.hh"
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
50 
51 G4LPhysicsFreeVector* G4LivermorePhotoElectricModel::fCrossSection[] = {nullptr};
52 G4LPhysicsFreeVector* G4LivermorePhotoElectricModel::fCrossSectionLE[] = {nullptr};
53 std::vector<G4double>* G4LivermorePhotoElectricModel::fParam[] = {nullptr};
54 G4int G4LivermorePhotoElectricModel::fNShells[] = {0};
55 G4int G4LivermorePhotoElectricModel::fNShellsUsed[] = {0};
56 G4ElementData* G4LivermorePhotoElectricModel::fShellCrossSection = nullptr;
57 G4Material* G4LivermorePhotoElectricModel::fWater = nullptr;
58 G4double G4LivermorePhotoElectricModel::fWaterEnergyLimit = 0.0;
59 
60 using namespace std;
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
65  const G4String& nam)
66  : G4VEmModel(nam),fParticleChange(nullptr),maxZ(99),
67  nShellLimit(100),fDeexcitationActive(false),isInitialised(false),
68  fAtomDeexcitation(nullptr)
69 {
70  verboseLevel= 0;
71  // Verbosity scale:
72  // 0 = nothing
73  // 1 = warning for energy non-conservation
74  // 2 = details of energy budget
75  // 3 = calculation of cross sections, file openings, sampling of atoms
76  // 4 = entering in methods
77 
78  theGamma = G4Gamma::Gamma();
79  theElectron = G4Electron::Electron();
80 
81  // default generator
83 
84  if(verboseLevel>0) {
85  G4cout << "Livermore PhotoElectric is constructed "
86  << " nShellLimit= " << nShellLimit << G4endl;
87  }
88 
89  //Mark this model as "applicable" for atomic deexcitation
90  SetDeexcitationFlag(true);
91  fSandiaCof.resize(4,0.0);
92  fCurrSection = 0.0;
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
96 
98 {
99  if(IsMaster()) {
100  delete fShellCrossSection;
101  for(G4int i=0; i<maxZ; ++i) {
102  delete fParam[i];
103  fParam[i] = 0;
104  delete fCrossSection[i];
105  fCrossSection[i] = 0;
106  delete fCrossSectionLE[i];
107  fCrossSectionLE[i] = 0;
108  }
109  }
110 }
111 
112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
113 
114 void
116  const G4DataVector&)
117 {
118  if (verboseLevel > 2) {
119  G4cout << "Calling G4LivermorePhotoElectricModel::Initialise()" << G4endl;
120  }
121 
122  if(IsMaster()) {
123 
124  if(!fWater) {
125  fWater = G4Material::GetMaterial("G4_WATER", false);
126  if(fWater) { fWaterEnergyLimit = 13.6*eV; }
127  }
128 
129  if(!fShellCrossSection) { fShellCrossSection = new G4ElementData(); }
130 
131  char* path = getenv("G4LEDATA");
132 
133  G4ProductionCutsTable* theCoupleTable =
135  G4int numOfCouples = theCoupleTable->GetTableSize();
136 
137  for(G4int i=0; i<numOfCouples; ++i) {
138  const G4MaterialCutsCouple* couple =
139  theCoupleTable->GetMaterialCutsCouple(i);
140  const G4Material* material = couple->GetMaterial();
141  const G4ElementVector* theElementVector = material->GetElementVector();
142  G4int nelm = material->GetNumberOfElements();
143 
144  for (G4int j=0; j<nelm; ++j) {
145  G4int Z = (G4int)(*theElementVector)[j]->GetZ();
146  if(Z < 1) { Z = 1; }
147  else if(Z > maxZ) { Z = maxZ; }
148  if(!fCrossSection[Z]) { ReadData(Z, path); }
149  }
150  }
151  }
152  //
153  if (verboseLevel > 2) {
154  G4cout << "Loaded cross section files for LivermorePhotoElectric model"
155  << G4endl;
156  }
157  if(!isInitialised) {
158  isInitialised = true;
160 
161  fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
162  }
163  fDeexcitationActive = false;
164  if(fAtomDeexcitation) {
165  fDeexcitationActive = fAtomDeexcitation->IsFluoActive();
166  }
167 
168  if (verboseLevel > 0) {
169  G4cout << "LivermorePhotoElectric model is initialized " << G4endl
170  << G4endl;
171  }
172 }
173 
174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
175 
177  const G4Material* material,
178  const G4ParticleDefinition* p,
181 {
182  fCurrSection = 0.0;
183  if(fWater && (material == fWater ||
184  material->GetBaseMaterial() == fWater)) {
185  if(energy <= fWaterEnergyLimit) {
186  fWater->GetSandiaTable()->GetSandiaCofWater(energy, fSandiaCof);
187 
188  G4double energy2 = energy*energy;
189  G4double energy3 = energy*energy2;
190  G4double energy4 = energy2*energy2;
191 
192  fCurrSection = material->GetDensity()*
193  (fSandiaCof[0]/energy + fSandiaCof[1]/energy2 +
194  fSandiaCof[2]/energy3 + fSandiaCof[3]/energy4);
195  }
196  }
197  if(0.0 == fCurrSection) {
198  fCurrSection = G4VEmModel::CrossSectionPerVolume(material, p, energy);
199  }
200  return fCurrSection;
201 }
202 
203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
204 
206  const G4ParticleDefinition*,
208  G4double ZZ, G4double,
210 {
211  if (verboseLevel > 3) {
212  G4cout << "G4LivermorePhotoElectricModel::ComputeCrossSectionPerAtom():"
213  << " Z= " << ZZ << " R(keV)= " << energy/keV << G4endl;
214  }
215  G4double cs = 0.0;
216  G4int Z = G4lrint(ZZ);
217  if(Z < 1 || Z >= maxZ) { return cs; }
218 
219  // if element was not initialised
220  // do initialisation safely for MT mode
221  if(!fCrossSection[Z]) {
222  InitialiseForElement(0, Z);
223  if(!fCrossSection[Z]) { return cs; }
224  }
225 
226  G4int idx = fNShells[Z]*6 - 4;
227  if (energy < (*(fParam[Z]))[idx-1]) { energy = (*(fParam[Z]))[idx-1]; }
228 
229  G4double x1 = 1.0/energy;
230  G4double x2 = x1*x1;
231  G4double x3 = x2*x1;
232 
233  // parameterisation
234  if(energy >= (*(fParam[Z]))[0]) {
235  G4double x4 = x2*x2;
236  cs = x1*((*(fParam[Z]))[idx] + x1*(*(fParam[Z]))[idx+1]
237  + x2*(*(fParam[Z]))[idx+2] + x3*(*(fParam[Z]))[idx+3]
238  + x4*(*(fParam[Z]))[idx+4]);
239  // high energy part
240  } else if(energy >= (*(fParam[Z]))[1]) {
241  cs = x3*(fCrossSection[Z])->Value(energy);
242 
243  // low energy part
244  } else {
245  cs = x3*(fCrossSectionLE[Z])->Value(energy);
246  }
247  if (verboseLevel > 1) {
248  G4cout << "LivermorePhotoElectricModel: E(keV)= " << energy/keV
249  << " Z= " << Z << " cross(barn)= " << cs/barn << G4endl;
250  }
251  return cs;
252 }
253 
254 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
255 
256 void
258  std::vector<G4DynamicParticle*>* fvect,
259  const G4MaterialCutsCouple* couple,
260  const G4DynamicParticle* aDynamicGamma,
261  G4double,
262  G4double)
263 {
264  G4double gammaEnergy = aDynamicGamma->GetKineticEnergy();
265  if (verboseLevel > 3) {
266  G4cout << "G4LivermorePhotoElectricModel::SampleSecondaries() Egamma(keV)= "
267  << gammaEnergy/keV << G4endl;
268  }
269 
270  // kill incident photon
273 
274  // low-energy photo-effect in water - full absorption
275  const G4Material* material = couple->GetMaterial();
276  if(fWater && (material == fWater ||
277  material->GetBaseMaterial() == fWater)) {
278  if(gammaEnergy <= fWaterEnergyLimit) {
280  return;
281  }
282  }
283 
284  // Returns the normalized direction of the momentum
285  G4ThreeVector photonDirection = aDynamicGamma->GetMomentumDirection();
286 
287  // Select randomly one element in the current material
288  //G4cout << "Select random atom Egamma(keV)= " << gammaEnergy/keV << G4endl;
289  const G4Element* elm = SelectRandomAtom(material, theGamma, gammaEnergy);
290  G4int Z = G4lrint(elm->GetZ());
291 
292  // Select the ionised shell in the current atom according to shell
293  // cross sections
294  // G4cout << "Select random shell Z= " << Z << G4endl;
295 
296  if(Z >= maxZ) { Z = maxZ-1; }
297 
298  // element was not initialised gamma should be absorbed
299  if(!fCrossSection[Z]) {
301  return;
302  }
303 
304  // shell index
305  size_t shellIdx = 0;
306  size_t nn = fNShellsUsed[Z];
307 
308  if(nn > 1) {
309  if(gammaEnergy >= (*(fParam[Z]))[0]) {
310  G4double x1 = 1.0/gammaEnergy;
311  G4double x2 = x1*x1;
312  G4double x3 = x2*x1;
313  G4double x4 = x3*x1;
314  G4int idx = nn*6 - 4;
315  // when do sampling common factors are not taken into account
316  // so cross section is not real
317  G4double cs0 = G4UniformRand()*((*(fParam[Z]))[idx]
318  + x1*(*(fParam[Z]))[idx+1]
319  + x2*(*(fParam[Z]))[idx+2]
320  + x3*(*(fParam[Z]))[idx+3]
321  + x4*(*(fParam[Z]))[idx+4]);
322  for(shellIdx=0; shellIdx<nn; ++shellIdx) {
323  idx = shellIdx*6 + 2;
324  if(gammaEnergy > (*(fParam[Z]))[idx-1]) {
325  G4double cs = (*(fParam[Z]))[idx] + x1*(*(fParam[Z]))[idx+1]
326  + x2*(*(fParam[Z]))[idx+2] + x3*(*(fParam[Z]))[idx+3]
327  + x4*(*(fParam[Z]))[idx+4];
328  if(cs >= cs0) { break; }
329  }
330  }
331  if(shellIdx >= nn) { shellIdx = nn-1; }
332 
333  } else {
334 
335  // when do sampling common factors are not taken into account
336  // so cross section is not real
337  G4double cs = G4UniformRand();
338 
339  if(gammaEnergy >= (*(fParam[Z]))[1]) {
340  cs *= (fCrossSection[Z])->Value(gammaEnergy);
341  } else {
342  cs *= (fCrossSectionLE[Z])->Value(gammaEnergy);
343  }
344 
345  for(size_t j=0; j<nn; ++j) {
346  shellIdx = (size_t)fShellCrossSection->GetComponentID(Z, j);
347  if(gammaEnergy > (*(fParam[Z]))[6*shellIdx+1]) {
348  cs -= fShellCrossSection->GetValueForComponent(Z, j, gammaEnergy);
349  }
350  if(cs <= 0.0 || j+1 == nn) { break; }
351  }
352  }
353  }
354 
355  G4double bindingEnergy = (*(fParam[Z]))[shellIdx*6 + 1];
356  //G4cout << "Z= " << Z << " shellIdx= " << shellIdx
357  // << " nShells= " << fNShells[Z]
358  // << " Ebind(keV)= " << bindingEnergy/keV
359  // << " Egamma(keV)= " << gammaEnergy/keV << G4endl;
360 
361  const G4AtomicShell* shell = 0;
362 
363  // no de-excitation from the last shell
364  if(fDeexcitationActive && shellIdx + 1 < nn) {
366  shell = fAtomDeexcitation->GetAtomicShell(Z, as);
367  }
368 
369  // If binding energy of the selected shell is larger than photon energy
370  // do not generate secondaries
371  if(gammaEnergy < bindingEnergy) {
373  return;
374  }
375 
376  // Primary outcoming electron
377  G4double eKineticEnergy = gammaEnergy - bindingEnergy;
378  G4double edep = bindingEnergy;
379 
380  // Calculate direction of the photoelectron
381  G4ThreeVector electronDirection =
382  GetAngularDistribution()->SampleDirection(aDynamicGamma,
383  eKineticEnergy,
384  shellIdx,
385  couple->GetMaterial());
386 
387  // The electron is created
388  G4DynamicParticle* electron = new G4DynamicParticle (theElectron,
389  electronDirection,
390  eKineticEnergy);
391  fvect->push_back(electron);
392 
393  // Sample deexcitation
394  if(shell) {
395  G4int index = couple->GetIndex();
396  if(fAtomDeexcitation->CheckDeexcitationActiveRegion(index)) {
397  G4int nbefore = fvect->size();
398 
399  fAtomDeexcitation->GenerateParticles(fvect, shell, Z, index);
400  G4int nafter = fvect->size();
401  if(nafter > nbefore) {
402  G4double esec = 0.0;
403  for (G4int j=nbefore; j<nafter; ++j) {
404 
405  G4double e = ((*fvect)[j])->GetKineticEnergy();
406  if(esec + e > edep) {
407  // correct energy in order to have energy balance
408  e = edep - esec;
409  ((*fvect)[j])->SetKineticEnergy(e);
410  esec += e;
411  // delete the rest of secondaries (should not happens)
412  for (G4int jj=nafter-1; jj>j; --jj) {
413  delete (*fvect)[jj];
414  fvect->pop_back();
415  }
416  break;
417  }
418  esec += e;
419  }
420  edep -= esec;
421  }
422  }
423  }
424  // energy balance - excitation energy left
425  if(edep > 0.0) {
427  }
428 }
429 
430 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
431 
432 void
433 G4LivermorePhotoElectricModel::ReadData(G4int Z, const char* path)
434 {
435  if (verboseLevel > 1)
436  {
437  G4cout << "Calling ReadData() of G4LivermoreGammaConversionModel"
438  << G4endl;
439  }
440 
441  if(fCrossSection[Z]) { return; }
442 
443  const char* datadir = path;
444 
445  if(!datadir)
446  {
447  datadir = getenv("G4LEDATA");
448  if(!datadir)
449  {
450  G4Exception("G4LivermorePhotoElectricModel::ReadData()",
451  "em0006",FatalException,
452  "Environment variable G4LEDATA not defined");
453  return;
454  }
455  }
456 
457  // spline for photoeffect total x-section above K-shell
458  fCrossSection[Z] = new G4LPhysicsFreeVector();
459  fCrossSection[Z]->SetSpline(true);
460 
461  std::ostringstream ost;
462  ost << datadir << "/livermore/phot/pe-cs-" << Z <<".dat";
463  std::ifstream fin(ost.str().c_str());
464  if( !fin.is_open()) {
466  ed << "G4LivermorePhotoElectricModel data file <" << ost.str().c_str()
467  << "> is not opened!" << G4endl;
468  G4Exception("G4LivermorePhotoElectricModel::ReadData()",
469  "em0003",FatalException,
470  ed,"G4LEDATA version should be G4EMLOW6.32 or later.");
471  return;
472  } else {
473  if(verboseLevel > 3) { G4cout << "File " << ost.str().c_str()
474  << " is opened by G4LivermorePhotoElectricModel" << G4endl;}
475  fCrossSection[Z]->Retrieve(fin, true);
476  fCrossSection[Z]->ScaleVector(MeV, barn);
477  fin.close();
478  }
479 
480  fParam[Z] = new std::vector<G4double>;
481 
482  // read fit parameters
483  G4int n1 = 0;
484  G4int n2 = 0;
485  G4double x;
486  std::ostringstream ost1;
487  ost1 << datadir << "/livermore/phot/pe-" << Z <<".dat";
488  std::ifstream fin1(ost1.str().c_str());
489  if( !fin1.is_open()) {
491  ed << "G4LivermorePhotoElectricModel data file <" << ost1.str().c_str()
492  << "> is not opened!" << G4endl;
493  G4Exception("G4LivermorePhotoElectricModel::ReadData()",
494  "em0003",FatalException,
495  ed,"G4LEDATA version should be G4EMLOW6.32 or later.");
496  return;
497  } else {
498  if(verboseLevel > 3) {
499  G4cout << "File " << ost1.str().c_str()
500  << " is opened by G4LivermorePhotoElectricModel" << G4endl;
501  }
502  fin1 >> n1;
503  if(fin1.fail()) { return; }
504  if(0 > n1 || n1 >= INT_MAX) { n1 = 0; }
505 
506  fin1 >> n2;
507  if(fin1.fail()) { return; }
508  if(0 > n2 || n2 >= INT_MAX) { n2 = 0; }
509 
510  fin1 >> x;
511  if(fin1.fail()) { return; }
512 
513  fNShells[Z] = n1;
514  fParam[Z]->reserve(6*n1+1);
515  fParam[Z]->push_back(x*MeV);
516  for(G4int i=0; i<n1; ++i) {
517  for(G4int j=0; j<6; ++j) {
518  fin1 >> x;
519  if(0 == j) { x *= MeV; }
520  else { x *= barn; }
521  fParam[Z]->push_back(x);
522  }
523  }
524  fin1.close();
525  }
526  // there is a possibility to used only main shells
527  if(nShellLimit < n2) { n2 = nShellLimit; }
528  fShellCrossSection->InitialiseForComponent(Z, n2);
529  fNShellsUsed[Z] = n2;
530 
531  if(1 < n2) {
532  std::ostringstream ost2;
533  ost2 << datadir << "/livermore/phot/pe-ss-cs-" << Z <<".dat";
534  std::ifstream fin2(ost2.str().c_str());
535  if( !fin2.is_open()) {
537  ed << "G4LivermorePhotoElectricModel data file <" << ost2.str().c_str()
538  << "> is not opened!" << G4endl;
539  G4Exception("G4LivermorePhotoElectricModel::ReadData()",
540  "em0003",FatalException,
541  ed,"G4LEDATA version should be G4EMLOW6.32 or later.");
542  return;
543  } else {
544  if(verboseLevel > 3) {
545  G4cout << "File " << ost2.str().c_str()
546  << " is opened by G4LivermorePhotoElectricModel" << G4endl;
547  }
548 
549  G4int n3, n4;
550  G4double y;
551  for(G4int i=0; i<n2; ++i) {
552  fin2 >> x >> y >> n3 >> n4;
554  for(G4int j=0; j<n3; ++j) {
555  fin2 >> x >> y;
556  v->PutValues(j, x*MeV, y*barn);
557  }
558  fShellCrossSection->AddComponent(Z, n4, v);
559  }
560  fin2.close();
561  }
562  }
563 
564  // no spline for photoeffect total x-section below K-shell
565  if(1 < fNShells[Z]) {
566  fCrossSectionLE[Z] = new G4LPhysicsFreeVector();
567 
568  std::ostringstream ost3;
569  ost3 << datadir << "/livermore/phot/pe-le-cs-" << Z <<".dat";
570  std::ifstream fin3(ost3.str().c_str());
571  if( !fin3.is_open()) {
573  ed << "G4LivermorePhotoElectricModel data file <" << ost3.str().c_str()
574  << "> is not opened!" << G4endl;
575  G4Exception("G4LivermorePhotoElectricModel::ReadData()",
576  "em0003",FatalException,
577  ed,"G4LEDATA version should be G4EMLOW6.32 or later.");
578  return;
579  } else {
580  if(verboseLevel > 3) {
581  G4cout << "File " << ost3.str().c_str()
582  << " is opened by G4LivermorePhotoElectricModel" << G4endl;
583  }
584  fCrossSectionLE[Z]->Retrieve(fin3, true);
585  fCrossSectionLE[Z]->ScaleVector(MeV, barn);
586  fin3.close();
587  }
588  }
589 }
590 
591 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
592 
593 #include "G4AutoLock.hh"
594 namespace { G4Mutex LivermorePhotoElectricModelMutex = G4MUTEX_INITIALIZER; }
595 
597  const G4ParticleDefinition*, G4int Z)
598 {
599  G4AutoLock l(&LivermorePhotoElectricModelMutex);
600  // G4cout << "G4LivermorePhotoElectricModel::InitialiseForElement Z= "
601  // << Z << G4endl;
602  if(!fCrossSection[Z]) { ReadData(Z); }
603  l.unlock();
604 }
605 
606 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:257
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
static G4LossTableManager * Instance()
G4bool IsFluoActive() const
void AddComponent(G4int Z, G4int id, G4PhysicsVector *v)
std::vector< G4Element * > G4ElementVector
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4double GetKineticEnergy() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
const char * p
Definition: xmltok.h:285
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
G4double GetZ() const
Definition: G4Element.hh:131
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:619
G4double GetDensity() const
Definition: G4Material.hh:180
G4bool IsMaster() const
Definition: G4VEmModel.hh:725
G4LivermorePhotoElectricModel(const G4String &nam="LivermorePhElectric")
tuple x
Definition: test.py:50
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
int G4int
Definition: G4Types.hh:78
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:175
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetSpline(G4bool)
G4SandiaTable * GetSandiaTable() const
Definition: G4Material.hh:229
string material
Definition: eplot.py:19
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
G4int GetComponentID(G4int Z, size_t idx)
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double energy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4ThreeVector & GetMomentumDirection() const
static constexpr double eV
Definition: G4SIunits.hh:215
virtual void ScaleVector(G4double factorE, G4double factorV)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double energy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
tuple v
Definition: test.py:18
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define INT_MAX
Definition: templates.hh:111
static G4ProductionCutsTable * GetProductionCutsTable()
G4int G4Mutex
Definition: G4Threading.hh:173
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
int G4lrint(double ad)
Definition: templates.hh:163
G4double energy(const ThreeVector &p, const G4double m)
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:626
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4double GetValueForComponent(G4int Z, size_t idx, G4double kinEnergy)
const G4Material * GetBaseMaterial() const
Definition: G4Material.hh:233
static G4Electron * Electron()
Definition: G4Electron.cc:94
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void PutValues(size_t index, G4double e, G4double dataValue)
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
G4VAtomDeexcitation * AtomDeexcitation()
void GetSandiaCofWater(G4double energy, std::vector< G4double > &coeff) const
double G4double
Definition: G4Types.hh:76
void ProposeTrackStatus(G4TrackStatus status)
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:788
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
static constexpr double barn
Definition: G4SIunits.hh:105
G4double bindingEnergy(G4int A, G4int Z)
void InitialiseForComponent(G4int Z, G4int nComponents=0)
static constexpr double keV
Definition: G4SIunits.hh:216
G4ParticleChangeForGamma * fParticleChange
G4AtomicShellEnumerator
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:544
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:132
virtual G4double Value(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
Definition: G4VEmModel.cc:377
const G4Material * GetMaterial() const