Geant4  10.02.p01
G4LowEPPolarizedComptonModel.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 // *********************************************************************
27 // | |
28 // | G4LowEPPolarizedComptonModel-- Geant4 Monash University |
29 // | polarised low energy Compton scattering model. |
30 // | J. M. C. Brown, Monash University, Australia |
31 // | |
32 // | |
33 // *********************************************************************
34 // | |
35 // | The following is a Geant4 class to simulate the process of |
36 // | bound electron Compton scattering. General code structure is |
37 // | based on G4LowEnergyCompton.cc and |
38 // | G4LivermorePolarizedComptonModel.cc. |
39 // | Algorithms for photon energy, and ejected Compton electron |
40 // | direction taken from: |
41 // | |
42 // | J. M. C. Brown, M. R. Dimmock, J. E. Gillam and D. M. Paganin, |
43 // | "A low energy bound atomic electron Compton scattering model |
44 // | for Geant4", NIMB, Vol. 338, 77-88, 2014. |
45 // | |
46 // | The author acknowledges the work of the Geant4 collaboration |
47 // | in developing the following algorithms that have been employed |
48 // | or adapeted for the present software: |
49 // | |
50 // | # sampling of photon scattering angle, |
51 // | # target element selection in composite materials, |
52 // | # target shell selection in element, |
53 // | # and sampling of bound electron momentum from Compton profiles. |
54 // | |
55 // *********************************************************************
56 // | |
57 // | History: |
58 // | -------- |
59 // | |
60 // | Jan. 2015 JMCB - 1st Version based on G4LowEPPComptonModel |
61 // | |
62 // *********************************************************************
63 
65 #include "G4PhysicalConstants.hh"
66 #include "G4SystemOfUnits.hh"
67 
68 //****************************************************************************
69 
70 using namespace std;
71 
76 
77 static const G4double ln10 = G4Log(10.);
78 
80  const G4String& nam)
81  : G4VEmModel(nam),isInitialised(false)
82 {
83  verboseLevel=1 ;
84  // Verbosity scale:
85  // 0 = nothing
86  // 1 = warning for energy non-conservation
87  // 2 = details of energy budget
88  // 3 = calculation of cross sections, file openings, sampling of atoms
89  // 4 = entering in methods
90 
91  if( verboseLevel>1 ) {
92  G4cout << "Low energy photon Compton model is constructed " << G4endl;
93  }
94 
95  //Mark this model as "applicable" for atomic deexcitation
96  SetDeexcitationFlag(true);
97 
98  fParticleChange = 0;
100 }
101 
102 //****************************************************************************
103 
105 {
106  if(IsMaster()) {
107  delete shellData;
108  shellData = 0;
109  delete profileData;
110  profileData = 0;
111  }
112 }
113 
114 //****************************************************************************
115 
117  const G4DataVector& cuts)
118 {
119  if (verboseLevel > 1) {
120  G4cout << "Calling G4LowEPPolarizedComptonModel::Initialise()" << G4endl;
121  }
122 
123  // Initialise element selector
124 
125  if(IsMaster()) {
126 
127  // Access to elements
128 
129  char* path = getenv("G4LEDATA");
130 
131  G4ProductionCutsTable* theCoupleTable =
133  G4int numOfCouples = theCoupleTable->GetTableSize();
134 
135  for(G4int i=0; i<numOfCouples; ++i) {
136  const G4Material* material =
137  theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial();
138  const G4ElementVector* theElementVector = material->GetElementVector();
139  G4int nelm = material->GetNumberOfElements();
140 
141  for (G4int j=0; j<nelm; ++j) {
142  G4int Z = G4lrint((*theElementVector)[j]->GetZ());
143  if(Z < 1) { Z = 1; }
144  else if(Z > maxZ){ Z = maxZ; }
145 
146  if( (!data[Z]) ) { ReadData(Z, path); }
147  }
148  }
149 
150  // For Doppler broadening
151  if(!shellData) {
152  shellData = new G4ShellData();
154  G4String file = "/doppler/shell-doppler";
155  shellData->LoadData(file);
156  }
157  if(!profileData) { profileData = new G4DopplerProfile(); }
158 
159  InitialiseElementSelectors(particle, cuts);
160  }
161 
162  if (verboseLevel > 2) {
163  G4cout << "Loaded cross section files" << G4endl;
164  }
165 
166  if( verboseLevel>1 ) {
167  G4cout << "G4LowEPPolarizedComptonModel is initialized " << G4endl
168  << "Energy range: "
169  << LowEnergyLimit() / eV << " eV - "
170  << HighEnergyLimit() / GeV << " GeV"
171  << G4endl;
172  }
173 
174  if(isInitialised) { return; }
175 
178  isInitialised = true;
179 }
180 
181 //****************************************************************************
182 
184  G4VEmModel* masterModel)
185 {
187 }
188 
189 //****************************************************************************
190 
191 void G4LowEPPolarizedComptonModel::ReadData(size_t Z, const char* path)
192 {
193  if (verboseLevel > 1)
194  {
195  G4cout << "G4LowEPPolarizedComptonModel::ReadData()"
196  << G4endl;
197  }
198  if(data[Z]) { return; }
199  const char* datadir = path;
200  if(!datadir)
201  {
202  datadir = getenv("G4LEDATA");
203  if(!datadir)
204  {
205  G4Exception("G4LowEPPolarizedComptonModel::ReadData()",
206  "em0006",FatalException,
207  "Environment variable G4LEDATA not defined");
208  return;
209  }
210  }
211 
212  data[Z] = new G4LPhysicsFreeVector();
213 
214  // Activation of spline interpolation
215  data[Z]->SetSpline(false);
216 
217  std::ostringstream ost;
218  ost << datadir << "/livermore/comp/ce-cs-" << Z <<".dat";
219  std::ifstream fin(ost.str().c_str());
220 
221  if( !fin.is_open())
222  {
224  ed << "G4LowEPPolarizedComptonModel data file <" << ost.str().c_str()
225  << "> is not opened!" << G4endl;
226  G4Exception("G4LowEPPolarizedComptonModel::ReadData()",
227  "em0003",FatalException,
228  ed,"G4LEDATA version should be G4EMLOW6.34 or later");
229  return;
230  } else {
231  if(verboseLevel > 3) {
232  G4cout << "File " << ost.str()
233  << " is opened by G4LowEPPolarizedComptonModel" << G4endl;
234  }
235  data[Z]->Retrieve(fin, true);
236  data[Z]->ScaleVector(MeV, MeV*barn);
237  }
238  fin.close();
239 }
240 
241 //****************************************************************************
242 
243 
244 G4double
246  G4double GammaEnergy,
247  G4double Z, G4double,
249 {
250  if (verboseLevel > 3) {
251  G4cout << "G4LowEPPolarizedComptonModel::ComputeCrossSectionPerAtom()"
252  << G4endl;
253  }
254  G4double cs = 0.0;
255 
256  if (GammaEnergy < LowEnergyLimit()) { return 0.0; }
257 
258  G4int intZ = G4lrint(Z);
259  if(intZ < 1 || intZ > maxZ) { return cs; }
260 
261  G4LPhysicsFreeVector* pv = data[intZ];
262 
263  // if element was not initialised
264  // do initialisation safely for MT mode
265  if(!pv)
266  {
267  InitialiseForElement(0, intZ);
268  pv = data[intZ];
269  if(!pv) { return cs; }
270  }
271 
272  G4int n = pv->GetVectorLength() - 1;
273  G4double e1 = pv->Energy(0);
274  G4double e2 = pv->Energy(n);
275 
276  if(GammaEnergy <= e1) { cs = GammaEnergy/(e1*e1)*pv->Value(e1); }
277  else if(GammaEnergy <= e2) { cs = pv->Value(GammaEnergy)/GammaEnergy; }
278  else if(GammaEnergy > e2) { cs = pv->Value(e2)/GammaEnergy; }
279 
280  return cs;
281 }
282 
283 //****************************************************************************
284 
285 void G4LowEPPolarizedComptonModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
286  const G4MaterialCutsCouple* couple,
287  const G4DynamicParticle* aDynamicGamma,
289 {
290 
291  //Determine number of digits (in decimal base) that G4double can accurately represent
292  G4double g4d_order = G4double(numeric_limits<G4double>::digits10);
293  G4double g4d_limit = std::pow(10.,-g4d_order);
294 
295  // The scattered gamma energy is sampled according to Klein - Nishina formula.
296  // then accepted or rejected depending on the Scattering Function multiplied
297  // by factor from Klein - Nishina formula.
298  // Expression of the angular distribution as Klein Nishina
299  // angular and energy distribution and Scattering fuctions is taken from
300  // D. E. Cullen "A simple model of photon transport" Nucl. Instr. Meth.
301  // Phys. Res. B 101 (1995). Method of sampling with form factors is different
302  // data are interpolated while in the article they are fitted.
303  // Reference to the article is from J. Stepanek New Photon, Positron
304  // and Electron Interaction Data for GEANT in Energy Range from 1 eV to 10
305  // TeV (draft).
306  // The random number techniques of Butcher & Messel are used
307  // (Nucl Phys 20(1960),15).
308 
309 
310  G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy()/MeV;
311 
312  if (verboseLevel > 3) {
313  G4cout << "G4LowEPPolarizedComptonModel::SampleSecondaries() E(MeV)= "
314  << photonEnergy0/MeV << " in " << couple->GetMaterial()->GetName()
315  << G4endl;
316  }
317  // do nothing below the threshold
318  // should never get here because the XS is zero below the limit
319  if (photonEnergy0 < LowEnergyLimit())
320  return ;
321 
322  G4double e0m = photonEnergy0 / electron_mass_c2 ;
323  G4ParticleMomentum photonDirection0 = aDynamicGamma->GetMomentumDirection();
324 
325 
326  // Polarisation: check orientation of photon propagation direction and polarisation
327  // Fix if needed
328 
329  G4ThreeVector photonPolarization0 = aDynamicGamma->GetPolarization();
330 
331  // Check if polarisation vector is perpendicular and fix if not
332 
333  if (!(photonPolarization0.isOrthogonal(photonDirection0, 1e-6))||(photonPolarization0.mag()==0))
334  {
335  photonPolarization0 = GetRandomPolarization(photonDirection0);
336  }
337 
338  else
339  {
340  if ((photonPolarization0.howOrthogonal(photonDirection0) !=0) && (photonPolarization0.howOrthogonal(photonDirection0) > g4d_limit))
341  {
342  photonPolarization0 = GetPerpendicularPolarization(photonDirection0,photonPolarization0);
343  }
344  }
345 
346  // Select randomly one element in the current material
347 
348  const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition();
349  const G4Element* elm = SelectRandomAtom(couple,particle,photonEnergy0);
350  G4int Z = (G4int)elm->GetZ();
351 
352  G4double LowEPPCepsilon0 = 1. / (1. + 2. * e0m);
353  G4double LowEPPCepsilon0Sq = LowEPPCepsilon0 * LowEPPCepsilon0;
354  G4double alpha1 = -std::log(LowEPPCepsilon0);
355  G4double alpha2 = 0.5 * (1. - LowEPPCepsilon0Sq);
356 
357  G4double wlPhoton = h_Planck*c_light/photonEnergy0;
358 
359  // Sample the energy of the scattered photon
360  G4double LowEPPCepsilon;
361  G4double LowEPPCepsilonSq;
362  G4double oneCosT;
363  G4double sinT2;
364  G4double gReject;
365 
366  if (verboseLevel > 3) {
367  G4cout << "Started loop to sample gamma energy" << G4endl;
368  }
369 
370  do
371  {
372  if ( alpha1/(alpha1+alpha2) > G4UniformRand())
373  {
374  LowEPPCepsilon = G4Exp(-alpha1 * G4UniformRand());
375  LowEPPCepsilonSq = LowEPPCepsilon * LowEPPCepsilon;
376  }
377  else
378  {
379  LowEPPCepsilonSq = LowEPPCepsilon0Sq + (1. - LowEPPCepsilon0Sq) * G4UniformRand();
380  LowEPPCepsilon = std::sqrt(LowEPPCepsilonSq);
381  }
382 
383  oneCosT = (1. - LowEPPCepsilon) / ( LowEPPCepsilon * e0m);
384  sinT2 = oneCosT * (2. - oneCosT);
385  G4double x = std::sqrt(oneCosT/2.) / (wlPhoton/cm);
386  G4double scatteringFunction = ComputeScatteringFunction(x, Z);
387  gReject = (1. - LowEPPCepsilon * sinT2 / (1. + LowEPPCepsilonSq)) * scatteringFunction;
388 
389  } while(gReject < G4UniformRand()*Z);
390 
391  G4double cosTheta = 1. - oneCosT;
392  G4double sinTheta = std::sqrt(sinT2);
393  G4double phi = SetPhi(LowEPPCepsilon,sinT2);
394  G4double dirx = sinTheta * std::cos(phi);
395  G4double diry = sinTheta * std::sin(phi);
396  G4double dirz = cosTheta ;
397 
398  // Set outgoing photon polarization
399 
400  G4ThreeVector photonPolarization1 = SetNewPolarization(LowEPPCepsilon,
401  sinT2,
402  phi,
403  cosTheta);
404 
405  // Scatter photon energy and Compton electron direction - Method based on:
406  // J. M. C. Brown, M. R. Dimmock, J. E. Gillam and D. M. Paganin'
407  // "A low energy bound atomic electron Compton scattering model for Geant4"
408  // NIMB, Vol. 338, 77-88, 2014.
409 
410  // Set constants and initialize scattering parameters
411 
412  const G4double vel_c = c_light / (m/s);
413  const G4double momentum_au_to_nat = halfpi* hbar_Planck / Bohr_radius / (kg*m/s);
414  const G4double e_mass_kg = electron_mass_c2 / c_squared / kg ;
415 
416  const G4int maxDopplerIterations = 1000;
417  G4double bindingE = 0.;
418  G4double pEIncident = photonEnergy0 ;
419  G4double pERecoil = -1.;
420  G4double eERecoil = -1.;
421  G4double e_alpha =0.;
422  G4double e_beta = 0.;
423 
424  G4double CE_emission_flag = 0.;
425  G4double ePAU = -1;
426  G4int shellIdx = 0;
427  G4double u_temp = 0;
428  G4double cosPhiE =0;
429  G4double sinThetaE =0;
430  G4double cosThetaE =0;
431  G4int iteration = 0;
432 
433  if (verboseLevel > 3) {
434  G4cout << "Started loop to sample photon energy and electron direction" << G4endl;
435  }
436 
437  do{
438 
439 
440  // ******************************************
441  // | Determine scatter photon energy |
442  // ******************************************
443 
444  do
445  {
446  iteration++;
447 
448 
449  // ********************************************
450  // | Sample bound electron information |
451  // ********************************************
452 
453  // Select shell based on shell occupancy
454 
455  shellIdx = shellData->SelectRandomShell(Z);
456  bindingE = shellData->BindingEnergy(Z,shellIdx)/MeV;
457 
458 
459  // Randomly sample bound electron momentum (memento: the data set is in Atomic Units)
460  ePAU = profileData->RandomSelectMomentum(Z,shellIdx);
461 
462  // Convert to SI units
463  G4double ePSI = ePAU * momentum_au_to_nat;
464 
465  //Calculate bound electron velocity and normalise to natural units
466  u_temp = sqrt( ((ePSI*ePSI)*(vel_c*vel_c)) / ((e_mass_kg*e_mass_kg)*(vel_c*vel_c)+(ePSI*ePSI)) )/vel_c;
467 
468  // Sample incident electron direction, amorphous material, to scattering photon scattering plane
469 
470  e_alpha = pi*G4UniformRand();
471  e_beta = twopi*G4UniformRand();
472 
473  // Total energy of system
474 
475  G4double eEIncident = electron_mass_c2 / sqrt( 1 - (u_temp*u_temp));
476  G4double systemE = eEIncident + pEIncident;
477 
478 
479  G4double gamma_temp = 1.0 / sqrt( 1 - (u_temp*u_temp));
480  G4double numerator = gamma_temp*electron_mass_c2*(1 - u_temp * std::cos(e_alpha));
481  G4double subdenom1 = u_temp*cosTheta*std::cos(e_alpha);
482  G4double subdenom2 = u_temp*sinTheta*std::sin(e_alpha)*std::cos(e_beta);
483  G4double denominator = (1.0 - cosTheta) + (gamma_temp*electron_mass_c2*(1 - subdenom1 - subdenom2) / pEIncident);
484  pERecoil = (numerator/denominator);
485  eERecoil = systemE - pERecoil;
486  CE_emission_flag = pEIncident - pERecoil;
487  } while ( (iteration <= maxDopplerIterations) && (CE_emission_flag < bindingE));
488 
489 // End of recalculation of photon energy with Doppler broadening
490 
491 
492 
493  // *******************************************************
494  // | Determine ejected Compton electron direction |
495  // *******************************************************
496 
497  // Calculate velocity of ejected Compton electron
498 
499  G4double a_temp = eERecoil / electron_mass_c2;
500  G4double u_p_temp = sqrt(1 - (1 / (a_temp*a_temp)));
501 
502  // Coefficients and terms from simulatenous equations
503 
504  G4double sinAlpha = std::sin(e_alpha);
505  G4double cosAlpha = std::cos(e_alpha);
506  G4double sinBeta = std::sin(e_beta);
507  G4double cosBeta = std::cos(e_beta);
508 
509  G4double gamma = 1.0 / sqrt(1 - (u_temp*u_temp));
510  G4double gamma_p = 1.0 / sqrt(1 - (u_p_temp*u_p_temp));
511 
512  G4double var_A = pERecoil*u_p_temp*sinTheta;
513  G4double var_B = u_p_temp* (pERecoil*cosTheta-pEIncident);
514  G4double var_C = (pERecoil-pEIncident) - ( (pERecoil*pEIncident) / (gamma_p*electron_mass_c2))*(1 - cosTheta);
515 
516  G4double var_D1 = gamma*electron_mass_c2*pERecoil;
517  G4double var_D2 = (1 - (u_temp*cosTheta*cosAlpha) - (u_temp*sinTheta*cosBeta*sinAlpha));
518  G4double var_D3 = ((electron_mass_c2*electron_mass_c2)*(gamma*gamma_p - 1)) - (gamma_p*electron_mass_c2*pERecoil);
519  G4double var_D = var_D1*var_D2 + var_D3;
520 
521  G4double var_E1 = ((gamma*gamma_p)*(electron_mass_c2*electron_mass_c2)*(u_temp*u_p_temp)*cosAlpha);
522  G4double var_E2 = gamma_p*electron_mass_c2*pERecoil*u_p_temp*cosTheta;
523  G4double var_E = var_E1 - var_E2;
524 
525  G4double var_F1 = ((gamma*gamma_p)*(electron_mass_c2*electron_mass_c2)*(u_temp*u_p_temp)*cosBeta*sinAlpha);
526  G4double var_F2 = (gamma_p*electron_mass_c2*pERecoil*u_p_temp*sinTheta);
527  G4double var_F = var_F1 - var_F2;
528 
529  G4double var_G = (gamma*gamma_p)*(electron_mass_c2*electron_mass_c2)*(u_temp*u_p_temp)*sinBeta*sinAlpha;
530 
531  // Two equations form a quadratic form of Wx^2 + Yx + Z = 0
532  // Coefficents and solution to quadratic
533 
534  G4double var_W1 = (var_F*var_B - var_E*var_A)*(var_F*var_B - var_E*var_A);
535  G4double var_W2 = (var_G*var_G)*(var_A*var_A) + (var_G*var_G)*(var_B*var_B);
536  G4double var_W = var_W1 + var_W2;
537 
538  G4double var_Y = 2.0*(((var_A*var_D-var_F*var_C)*(var_F*var_B-var_E*var_A)) - ((var_G*var_G)*var_B*var_C));
539 
540  G4double var_Z1 = (var_A*var_D - var_F*var_C)*(var_A*var_D - var_F*var_C);
541  G4double var_Z2 = (var_G*var_G)*(var_C*var_C) - (var_G*var_G)*(var_A*var_A);
542  G4double var_Z = var_Z1 + var_Z2;
543  G4double diff1 = var_Y*var_Y;
544  G4double diff2 = 4*var_W*var_Z;
545  G4double diff = diff1 - diff2;
546 
547 
548  // Check if diff is less than zero, if so ensure it is due to FPE
549 
550  //Confirm that diff less than zero is due FPE, i.e if abs of diff / diff1 and diff/ diff2 is less
551  //than 10^(-g4d_order), then set diff to zero
552 
553  if ((diff < 0.0) && (abs(diff / diff1) < g4d_limit) && (abs(diff / diff2) < g4d_limit) )
554  {
555  diff = 0.0;
556  }
557 
558 
559  // Plus and minus of quadratic
560  G4double X_p = (-var_Y + sqrt (diff))/(2*var_W);
561  G4double X_m = (-var_Y - sqrt (diff))/(2*var_W);
562 
563 
564  // Randomly sample one of the two possible solutions and determin theta angle of ejected Compton electron
565  G4double ThetaE = 0.;
566  G4double sol_select = G4UniformRand();
567 
568  if (sol_select < 0.5)
569  {
570  ThetaE = std::acos(X_p);
571  }
572  if (sol_select > 0.5)
573  {
574  ThetaE = std::acos(X_m);
575  }
576 
577  cosThetaE = std::cos(ThetaE);
578  sinThetaE = std::sin(ThetaE);
579  G4double Theta = std::acos(cosTheta);
580 
581  //Calculate electron Phi
582  G4double iSinThetaE = std::sqrt(1+std::tan((pi/2.0)-ThetaE)*std::tan((pi/2.0)-ThetaE));
583  G4double iSinTheta = std::sqrt(1+std::tan((pi/2.0)-Theta)*std::tan((pi/2.0)-Theta));
584  G4double ivar_A = iSinTheta/ (pERecoil*u_p_temp);
585  // Trigs
586  cosPhiE = (var_C - var_B*cosThetaE)*(ivar_A*iSinThetaE);
587 
588  // End of calculation of ejection Compton electron direction
589 
590  //Fix for floating point errors
591 
592  } while ( (iteration <= maxDopplerIterations) && (abs(cosPhiE) > 1));
593 
594  // Revert to original if maximum number of iterations threshold has been reached
595  if (iteration >= maxDopplerIterations)
596  {
597  pERecoil = photonEnergy0 ;
598  bindingE = 0.;
599  dirx=0.0;
600  diry=0.0;
601  dirz=1.0;
602  }
603 
604  // Set "scattered" photon direction and energy
605 
606  G4ThreeVector photonDirection1(dirx,diry,dirz);
607  photonDirection1.rotateUz(photonDirection0);
608  photonPolarization1.rotateUz(photonDirection0);
609  if (pERecoil > 0.)
610  {
612  fParticleChange->ProposeMomentumDirection(photonDirection1) ;
613  fParticleChange->ProposePolarization(photonPolarization1);
614 
615  // Set ejected Compton electron direction and energy
616  G4double PhiE = std::acos(cosPhiE);
617  G4double eDirX = sinThetaE * std::cos(phi+PhiE);
618  G4double eDirY = sinThetaE * std::sin(phi+PhiE);
619  G4double eDirZ = cosThetaE;
620 
621  G4double eKineticEnergy = pEIncident - pERecoil - bindingE;
622 
623  G4ThreeVector eDirection(eDirX,eDirY,eDirZ);
624  eDirection.rotateUz(photonDirection0);
626  eDirection,eKineticEnergy) ;
627  fvect->push_back(dp);
628 
629  }
630  else
631  {
634  }
635 
636  // sample deexcitation
637  //
638 
639  if (verboseLevel > 3) {
640  G4cout << "Started atomic de-excitation " << fAtomDeexcitation << G4endl;
641  }
642 
643  if(fAtomDeexcitation && iteration < maxDopplerIterations) {
644  G4int index = couple->GetIndex();
646  size_t nbefore = fvect->size();
648  const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
649  fAtomDeexcitation->GenerateParticles(fvect, shell, Z, index);
650  size_t nafter = fvect->size();
651  if(nafter > nbefore) {
652  for (size_t i=nbefore; i<nafter; ++i) {
653  //Check if there is enough residual energy
654  if (bindingE >= ((*fvect)[i])->GetKineticEnergy())
655  {
656  //Ok, this is a valid secondary: keep it
657  bindingE -= ((*fvect)[i])->GetKineticEnergy();
658  }
659  else
660  {
661  //Invalid secondary: not enough energy to create it!
662  //Keep its energy in the local deposit
663  delete (*fvect)[i];
664  (*fvect)[i]=0;
665  }
666  }
667  }
668  }
669  }
670 
671  //This should never happen
672  if(bindingE < 0.0)
673  G4Exception("G4LowEPPolarizedComptonModel::SampleSecondaries()",
674  "em2051",FatalException,"Negative local energy deposit");
675 
677 
678 }
679 
680 //****************************************************************************
681 
682 G4double
684 {
685  G4double value = Z;
686  if (x <= ScatFuncFitParam[Z][2]) {
687 
688  G4double lgq = G4Log(x)/ln10;
689 
690  if (lgq < ScatFuncFitParam[Z][1]) {
691  value = ScatFuncFitParam[Z][3] + lgq*ScatFuncFitParam[Z][4];
692  } else {
693  value = ScatFuncFitParam[Z][5] + lgq*ScatFuncFitParam[Z][6] +
694  lgq*lgq*ScatFuncFitParam[Z][7] + lgq*lgq*lgq*ScatFuncFitParam[Z][8];
695  }
696  value = G4Exp(value*ln10);
697  }
698  return value;
699 }
700 
701 
702 //****************************************************************************
703 
704 #include "G4AutoLock.hh"
705 namespace { G4Mutex LowEPPolarizedComptonModelMutex = G4MUTEX_INITIALIZER; }
706 
707 void
709  G4int Z)
710 {
711  G4AutoLock l(&LowEPPolarizedComptonModelMutex);
712  if(!data[Z]) { ReadData(Z); }
713  l.unlock();
714 }
715 
716 //****************************************************************************
717 
718 //Fitting data to compute scattering function
719 
721 { 0, 0., 0., 0., 0., 0., 0., 0., 0.},
722 { 1, 6.673, 1.49968E+08, -14.352, 1.999, -143.374, 50.787, -5.951, 0.2304418},
723 { 2, 6.500, 2.50035E+08, -14.215, 1.970, -53.649, 13.892, -0.948, 0.006996759},
724 { 3, 6.551, 3.99945E+08, -13.555, 1.993, -62.090, 21.462, -2.453, 0.093416},
725 { 4, 6.500, 5.00035E+08, -13.746, 1.998, -127.906, 46.491, -5.614, 0.2262103},
726 { 5, 6.500, 5.99791E+08, -13.800, 1.998, -131.153, 47.132, -5.619, 0.2233819},
727 { 6, 6.708, 6.99842E+08, -13.885, 1.999, -128.143, 45.379, -5.325, 0.2083009},
728 { 7, 6.685, 7.99834E+08, -13.885, 2.000, -131.048, 46.314, -5.421, 0.2114925},
729 { 8, 6.669, 7.99834E+08, -13.962, 2.001, -128.225, 44.818, -5.183, 0.1997155},
730 { 9, 6.711, 7.99834E+08, -13.999, 2.000, -122.112, 42.103, -4.796, 0.1819099},
731 { 10, 6.702, 7.99834E+08, -14.044, 1.999, -110.143, 37.225, -4.143, 0.1532094},
732 { 11, 6.425, 1.00000E+09, -13.423, 1.993, -41.137, 12.313, -1.152, 0.03384553},
733 { 12, 6.542, 1.00000E+09, -13.389, 1.997, -53.549, 17.420, -1.840, 0.06431849},
734 { 13, 6.570, 1.49968E+09, -13.401, 1.997, -66.243, 22.297, -2.460, 0.09045854},
735 { 14, 6.364, 1.49968E+09, -13.452, 1.999, -78.271, 26.757, -3.008, 0.1128195},
736 { 15, 6.500, 1.49968E+09, -13.488, 1.998, -85.069, 29.164, -3.291, 0.1239113},
737 { 16, 6.500, 1.49968E+09, -13.532, 1.998, -93.640, 32.274, -3.665, 0.1388633},
738 { 17, 6.500, 1.49968E+09, -13.584, 2.000, -98.534, 33.958, -3.857, 0.1461557},
739 { 18, 6.500, 1.49968E+09, -13.618, 1.999, -100.077, 34.379, -3.891, 0.1468902},
740 { 19, 6.500, 1.99986E+09, -13.185, 1.992, -53.819, 17.528, -1.851, 0.0648722},
741 { 20, 6.490, 1.99986E+09, -13.123, 1.993, -52.221, 17.169, -1.832, 0.06502094},
742 { 21, 6.498, 1.99986E+09, -13.157, 1.994, -55.365, 18.276, -1.961, 0.07002778},
743 { 22, 6.495, 1.99986E+09, -13.183, 1.994, -57.412, 18.957, -2.036, 0.07278856},
744 { 23, 6.487, 1.99986E+09, -13.216, 1.995, -58.478, 19.270, -2.065, 0.07362722},
745 { 24, 6.500, 1.99986E+09, -13.330, 1.997, -62.192, 20.358, -2.167, 0.07666583},
746 { 25, 6.488, 1.99986E+09, -13.277, 1.997, -58.007, 18.924, -2.003, 0.0704305},
747 { 26, 6.500, 5.00035E+09, -13.292, 1.997, -61.176, 20.067, -2.141, 0.0760269},
748 { 27, 6.500, 5.00035E+09, -13.321, 1.998, -61.909, 20.271, -2.159, 0.07653559},
749 { 28, 6.500, 5.00035E+09, -13.340, 1.998, -62.402, 20.391, -2.167, 0.07664243},
750 { 29, 6.500, 5.00035E+09, -13.439, 1.998, -67.305, 21.954, -2.331, 0.0823267},
751 { 30, 6.500, 5.00035E+09, -13.383, 1.999, -62.064, 20.136, -2.122, 0.07437589},
752 { 31, 6.500, 5.00035E+09, -13.349, 1.997, -61.068, 19.808, -2.086, 0.07307488},
753 { 32, 6.500, 5.00035E+09, -13.373, 1.999, -63.126, 20.553, -2.175, 0.07660222},
754 { 33, 6.500, 5.00035E+09, -13.395, 1.999, -65.674, 21.445, -2.278, 0.08054694},
755 { 34, 6.500, 5.00035E+09, -13.417, 1.999, -69.457, 22.811, -2.442, 0.08709536},
756 { 35, 6.500, 5.00035E+09, -13.442, 2.000, -72.283, 23.808, -2.558, 0.09156808},
757 { 36, 6.500, 5.00035E+09, -13.451, 1.998, -74.696, 24.641, -2.653, 0.09516597},
758 { 37, 6.500, 5.00035E+09, -13.082, 1.991, -46.235, 14.519, -1.458, 0.04837659},
759 { 38, 6.465, 5.00035E+09, -13.022, 1.993, -41.784, 13.065, -1.300, 0.04267703},
760 { 39, 6.492, 5.00035E+09, -13.043, 1.994, -44.609, 14.114, -1.429, 0.0479348},
761 { 40, 6.499, 5.00035E+09, -13.064, 1.994, -47.142, 15.019, -1.536, 0.0521347},
762 { 41, 6.384, 5.00035E+09, -13.156, 1.996, -53.114, 17.052, -1.766, 0.06079426},
763 { 42, 6.500, 5.00035E+09, -13.176, 1.996, -54.590, 17.550, -1.822, 0.06290335},
764 { 43, 6.500, 5.00035E+09, -13.133, 1.997, -51.272, 16.423, -1.694, 0.05806108},
765 { 44, 6.500, 5.00035E+09, -13.220, 1.996, -58.314, 18.839, -1.969, 0.0684608},
766 { 45, 6.500, 5.00035E+09, -13.246, 1.998, -59.674, 19.295, -2.020, 0.07037294},
767 { 46, 6.500, 5.00035E+09, -13.407, 1.999, -72.228, 23.693, -2.532, 0.09017969},
768 { 47, 6.500, 5.00035E+09, -13.277, 1.998, -60.890, 19.647, -2.053, 0.07138694},
769 { 48, 6.500, 5.00035E+09, -13.222, 1.998, -56.152, 18.002, -1.863, 0.06410123},
770 { 49, 6.500, 5.00035E+09, -13.199, 1.997, -56.208, 18.052, -1.872, 0.06456884},
771 { 50, 6.500, 5.00035E+09, -13.215, 1.998, -58.478, 18.887, -1.973, 0.06860356},
772 { 51, 6.500, 5.00035E+09, -13.230, 1.998, -60.708, 19.676, -2.066, 0.07225841},
773 { 52, 6.500, 7.99834E+09, -13.246, 1.998, -63.341, 20.632, -2.180, 0.0767412},
774 { 53, 6.500, 5.00035E+09, -13.262, 1.998, -66.339, 21.716, -2.310, 0.08191981},
775 { 54, 6.500, 7.99834E+09, -13.279, 1.998, -67.649, 22.151, -2.357, 0.08357825},
776 { 55, 6.500, 5.00035E+09, -12.951, 1.990, -45.302, 14.219, -1.423, 0.04712317},
777 { 56, 6.425, 5.00035E+09, -12.882, 1.992, -39.825, 12.363, -1.214, 0.03931009},
778 { 57, 6.466, 2.82488E+09, -12.903, 1.992, -38.952, 11.982, -1.160, 0.03681554},
779 { 58, 6.451, 5.00035E+09, -12.915, 1.993, -41.959, 13.118, -1.302, 0.04271291},
780 { 59, 6.434, 5.00035E+09, -12.914, 1.993, -40.528, 12.555, -1.230, 0.03971407},
781 { 60, 6.444, 5.00035E+09, -12.922, 1.992, -39.986, 12.329, -1.200, 0.03843737},
782 { 61, 6.414, 7.99834E+09, -12.930, 1.993, -42.756, 13.362, -1.327, 0.0436124},
783 { 62, 6.420, 7.99834E+09, -12.938, 1.992, -42.682, 13.314, -1.319, 0.04322509},
784 { 63, 6.416, 7.99834E+09, -12.946, 1.993, -42.399, 13.185, -1.301, 0.04243861},
785 { 64, 6.443, 7.99834E+09, -12.963, 1.993, -43.226, 13.475, -1.335, 0.04377341},
786 { 65, 6.449, 7.99834E+09, -12.973, 1.993, -43.232, 13.456, -1.330, 0.04347536},
787 { 66, 6.419, 7.99834E+09, -12.966, 1.993, -42.047, 12.990, -1.270, 0.04095499},
788 { 67, 6.406, 7.99834E+09, -12.976, 1.993, -42.405, 13.106, -1.283, 0.04146024},
789 { 68, 6.424, 7.99834E+09, -12.986, 1.993, -41.974, 12.926, -1.259, 0.040435},
790 { 69, 6.417, 7.99834E+09, -12.989, 1.993, -42.132, 12.967, -1.262, 0.04048908},
791 { 70, 6.405, 7.99834E+09, -13.000, 1.994, -42.582, 13.122, -1.280, 0.04119599},
792 { 71, 6.449, 7.99834E+09, -13.015, 1.994, -42.586, 13.115, -1.278, 0.04107587},
793 { 72, 6.465, 7.99834E+09, -13.030, 1.994, -43.708, 13.509, -1.324, 0.04286491},
794 { 73, 6.447, 7.99834E+09, -13.048, 1.996, -44.838, 13.902, -1.369, 0.04457132},
795 { 74, 6.452, 7.99834E+09, -13.073, 1.997, -45.545, 14.137, -1.395, 0.04553459},
796 { 75, 6.432, 7.99834E+09, -13.082, 1.997, -46.426, 14.431, -1.428, 0.04678218},
797 { 76, 6.439, 7.99834E+09, -13.100, 1.997, -47.513, 14.806, -1.471, 0.04842566},
798 { 77, 6.432, 7.99834E+09, -13.110, 1.997, -48.225, 15.042, -1.497, 0.04938364},
799 { 78, 6.500, 7.99834E+09, -13.185, 1.997, -53.256, 16.739, -1.687, 0.05645173},
800 { 79, 6.500, 7.99834E+09, -13.200, 1.997, -53.900, 16.946, -1.709, 0.05723134},
801 { 80, 6.500, 7.99834E+09, -13.156, 1.998, -49.801, 15.536, -1.547, 0.05103522},
802 { 81, 6.500, 7.99834E+09, -13.128, 1.997, -49.651, 15.512, -1.548, 0.05123203},
803 { 82, 6.500, 7.99834E+09, -13.134, 1.997, -51.021, 16.018, -1.609, 0.05364831},
804 { 83, 6.500, 7.99834E+09, -13.148, 1.998, -52.693, 16.612, -1.679, 0.05638698},
805 { 84, 6.500, 7.99834E+09, -13.161, 1.998, -54.415, 17.238, -1.754, 0.05935566},
806 { 85, 6.500, 7.99834E+09, -13.175, 1.998, -56.083, 17.834, -1.824, 0.06206068},
807 { 86, 6.500, 7.99834E+09, -13.189, 1.998, -57.860, 18.463, -1.898, 0.0649633},
808 { 87, 6.500, 7.99834E+09, -12.885, 1.990, -39.973, 12.164, -1.162, 0.0364598},
809 { 88, 6.417, 7.99834E+09, -12.816, 1.991, -34.591, 10.338, -0.956, 0.0287409},
810 { 89, 6.442, 7.99834E+09, -12.831, 1.992, -36.002, 10.867, -1.021, 0.03136835},
811 { 90, 6.463, 7.99834E+09, -12.850, 1.993, -37.660, 11.475, -1.095, 0.03435334},
812 { 91, 6.447, 7.99834E+09, -12.852, 1.993, -37.268, 11.301, -1.071, 0.0330539},
813 { 92, 6.439, 7.99834E+09, -12.858, 1.993, -37.695, 11.438, -1.085, 0.03376669},
814 { 93, 6.437, 1.00000E+10, -12.866, 1.993, -39.010, 11.927, -1.146, 0.03630848},
815 { 94, 6.432, 7.99834E+09, -12.862, 1.993, -37.192, 11.229, -1.057, 0.0325621},
816 { 95, 6.435, 7.99834E+09, -12.869, 1.993, -37.589, 11.363, -1.072, 0.03312393},
817 { 96, 6.449, 1.00000E+10, -12.886, 1.993, -39.573, 12.095, -1.162, 0.03680527},
818 { 97, 6.446, 1.00000E+10, -12.892, 1.993, -40.007, 12.242, -1.178, 0.03737377},
819 { 98, 6.421, 1.00000E+10, -12.887, 1.993, -39.509, 12.041, -1.152, 0.03629023},
820 { 99, 6.414, 1.00000E+10, -12.894, 1.993, -39.939, 12.183, -1.168, 0.03690464},
821 {100, 6.412, 1.00000E+10, -12.900, 1.993, -39.973, 12.180, -1.166, 0.036773}
822  };
823 
824 //****************************************************************************
825 
826 //Supporting functions for photon polarisation effects
827 
829  G4double sinT2)
830 {
831  G4double rand1;
832  G4double rand2;
833  G4double phiProbability;
834  G4double phi;
835  G4double a, b;
836 
837  do
838  {
839  rand1 = G4UniformRand();
840  rand2 = G4UniformRand();
841  phiProbability=0.;
842  phi = twopi*rand1;
843 
844  a = 2*sinT2;
845  b = energyRate + 1/energyRate;
846 
847  phiProbability = 1 - (a/b)*(std::cos(phi)*std::cos(phi));
848 
849 
850 
851  }
852  while ( rand2 > phiProbability );
853  return phi;
854 }
855 
856 //****************************************************************************
857 
859 {
860  G4double dx = a.x();
861  G4double dy = a.y();
862  G4double dz = a.z();
863  G4double x = dx < 0.0 ? -dx : dx;
864  G4double y = dy < 0.0 ? -dy : dy;
865  G4double z = dz < 0.0 ? -dz : dz;
866  if (x < y) {
867  return x < z ? G4ThreeVector(-dy,dx,0) : G4ThreeVector(0,-dz,dy);
868  }else{
869  return y < z ? G4ThreeVector(dz,0,-dx) : G4ThreeVector(-dy,dx,0);
870  }
871 }
872 
873 //****************************************************************************
874 
876 {
877  G4ThreeVector d0 = direction0.unit();
878  G4ThreeVector a1 = SetPerpendicularVector(d0); //different orthogonal
879  G4ThreeVector a0 = a1.unit(); // unit vector
880 
881  G4double rand1 = G4UniformRand();
882 
883  G4double angle = twopi*rand1; // random polar angle
884  G4ThreeVector b0 = d0.cross(a0); // cross product
885 
886  G4ThreeVector c;
887 
888  c.setX(std::cos(angle)*(a0.x())+std::sin(angle)*b0.x());
889  c.setY(std::cos(angle)*(a0.y())+std::sin(angle)*b0.y());
890  c.setZ(std::cos(angle)*(a0.z())+std::sin(angle)*b0.z());
891 
892  G4ThreeVector c0 = c.unit();
893 
894  return c0;
895 
896 }
897 
898 //****************************************************************************
899 
901 (const G4ThreeVector& photonDirection, const G4ThreeVector& photonPolarization) const
902 {
903 
904  //
905  // The polarization of a photon is always perpendicular to its momentum direction.
906  // Therefore this function removes those vector component of photonPolarization, which
907  // points in direction of photonDirection
908  //
909  // Mathematically we search the projection of the vector a on the plane E, where n is the
910  // plains normal vector.
911  // The basic equation can be found in each geometry book (e.g. Bronstein):
912  // p = a - (a o n)/(n o n)*n
913 
914  return photonPolarization - photonPolarization.dot(photonDirection)/photonDirection.dot(photonDirection) * photonDirection;
915 }
916 
917 //****************************************************************************
918 
920  G4double sinT2,
921  G4double phi,
922  G4double costheta)
923 {
924  G4double rand1;
925  G4double rand2;
926  G4double cosPhi = std::cos(phi);
927  G4double sinPhi = std::sin(phi);
928  G4double sinTheta = std::sqrt(sinT2);
929  G4double cosP2 = cosPhi*cosPhi;
930  G4double normalisation = std::sqrt(1. - cosP2*sinT2);
931 
932 
933  // Method based on:
934  // D. Xu, Z. He and F. Zhang
935  // "Detection of Gamma Ray Polarization Using a 3-D Position Sensitive CdZnTe Detector"
936  // IEEE TNS, Vol. 52(4), 1160-1164, 2005.
937 
938  // Determination of Theta
939 
940  G4double theta;
941 
942  rand1 = G4UniformRand();
943  rand2 = G4UniformRand();
944 
945  if (rand1<(LowEPPCepsilon+1.0/LowEPPCepsilon-2)/(2.0*(LowEPPCepsilon+1.0/LowEPPCepsilon)-4.0*sinT2*cosP2))
946  {
947  if (rand2<0.5)
948  theta = pi/2.0;
949  else
950  theta = 3.0*pi/2.0;
951  }
952  else
953  {
954  if (rand2<0.5)
955  theta = 0;
956  else
957  theta = pi;
958  }
959  G4double cosBeta = std::cos(theta);
960  G4double sinBeta = std::sqrt(1-cosBeta*cosBeta);
961 
962  G4ThreeVector photonPolarization1;
963 
964  G4double xParallel = normalisation*cosBeta;
965  G4double yParallel = -(sinT2*cosPhi*sinPhi)*cosBeta/normalisation;
966  G4double zParallel = -(costheta*sinTheta*cosPhi)*cosBeta/normalisation;
967  G4double xPerpendicular = 0.;
968  G4double yPerpendicular = (costheta)*sinBeta/normalisation;
969  G4double zPerpendicular = -(sinTheta*sinPhi)*sinBeta/normalisation;
970 
971  G4double xTotal = (xParallel + xPerpendicular);
972  G4double yTotal = (yParallel + yPerpendicular);
973  G4double zTotal = (zParallel + zPerpendicular);
974 
975  photonPolarization1.setX(xTotal);
976  photonPolarization1.setY(yTotal);
977  photonPolarization1.setZ(zTotal);
978 
979  return photonPolarization1;
980 
981 }
void SetOccupancyData()
Definition: G4ShellData.hh:70
static const double cm
Definition: G4SIunits.hh:118
const G4double a0
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:641
static const double MeV
Definition: G4SIunits.hh:211
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
static G4LossTableManager * Instance()
static const double halfpi
Definition: G4SIunits.hh:76
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
std::vector< G4Element * > G4ElementVector
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4VEmModel.cc:148
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:634
G4double z
Definition: TRTMaterials.hh:39
static const G4double a1
const G4String & GetName() const
Definition: G4Material.hh:178
G4double GetZ() const
Definition: G4Element.hh:131
static const G4double e2
static G4double angle[DIM]
G4bool IsMaster() const
Definition: G4VEmModel.hh:718
G4ParticleDefinition * GetDefinition() const
G4double a
Definition: TRTMaterials.hh:39
size_t GetVectorLength() const
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
int G4int
Definition: G4Types.hh:78
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:175
G4int SelectRandomShell(G4int Z) const
Definition: G4ShellData.cc:363
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:234
static const G4double ln10
void SetSpline(G4bool)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
static const double s
Definition: G4SIunits.hh:168
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
G4double ComputeScatteringFunction(G4double x, G4int Z)
const G4ThreeVector & GetMomentumDirection() const
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:166
static const double twopi
Definition: G4SIunits.hh:75
void ProposePolarization(const G4ThreeVector &dir)
static const double kg
Definition: G4SIunits.hh:179
G4ThreeVector GetPerpendicularPolarization(const G4ThreeVector &direction0, const G4ThreeVector &polarization0) const
static const double GeV
Definition: G4SIunits.hh:214
virtual void ScaleVector(G4double factorE, G4double factorV)
const G4int n
G4double Energy(size_t index) const
std::vector< G4EmElementSelector * > * GetElementSelectors()
Definition: G4VEmModel.hh:802
G4double Value(G4double theEnergy, size_t &lastidx) const
static const G4double ScatFuncFitParam[101][9]
static const G4double e1
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
G4LowEPPolarizedComptonModel(const G4ParticleDefinition *p=0, const G4String &nam="LowEPComptonModel")
G4ThreeVector SetPerpendicularVector(G4ThreeVector &a)
static G4LPhysicsFreeVector * data[100]
static G4ProductionCutsTable * GetProductionCutsTable()
static const double eV
Definition: G4SIunits.hh:212
G4int G4Mutex
Definition: G4Threading.hh:173
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
Definition: G4VEmModel.hh:810
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static const double pi
Definition: G4SIunits.hh:74
G4ThreeVector SetNewPolarization(G4double LowEPPCepsilon, G4double sinT2, G4double phi, G4double cosTheta)
int G4lrint(double ad)
Definition: templates.hh:163
static const G4double c0
G4ParticleChangeForGamma * fParticleChange
const G4double x[NPOINTSGL]
const G4ThreeVector & GetPolarization() const
void ReadData(size_t Z, const char *path=0)
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
static G4Electron * Electron()
Definition: G4Electron.cc:94
void SetProposedKineticEnergy(G4double proposedKinEnergy)
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:128
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
G4VAtomDeexcitation * AtomDeexcitation()
static const double barn
Definition: G4SIunits.hh:104
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:781
G4ThreeVector G4ParticleMomentum
static const G4double b0
G4double RandomSelectMomentum(G4int Z, G4int shellIndex) const
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:134
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
const G4Material * GetMaterial() const
G4ThreeVector GetRandomPolarization(G4ThreeVector &direction0)