Geant4  10.01.p02
G4LivermorePolarizedComptonModel.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: G4LivermorePolarizedComptonModel.cc 82874 2014-07-15 15:25:29Z gcosmo $
27 //
28 // Authors: G.Depaola & F.Longo
29 //
30 // History:
31 // --------
32 // 02 May 2009 S Incerti as V. Ivanchenko proposed in G4LivermoreComptonModel.cc
33 //
34 // Cleanup initialisation and generation of secondaries:
35 // - apply internal high-energy limit only in constructor
36 // - do not apply low-energy limit (default is 0)
37 // - remove GetMeanFreePath method and table
38 // - added protection against numerical problem in energy sampling
39 // - use G4ElementSelector
40 
42 #include "G4PhysicalConstants.hh"
43 #include "G4SystemOfUnits.hh"
44 
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
46 
47 using namespace std;
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
50 
52  const G4String& nam)
53  :G4VEmModel(nam),fParticleChange(0),isInitialised(false),
54  meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0)
55 {
56  verboseLevel= 0;
57  // Verbosity scale:
58  // 0 = nothing
59  // 1 = warning for energy non-conservation
60  // 2 = details of energy budget
61  // 3 = calculation of cross sections, file openings, sampling of atoms
62  // 4 = entering in methods
63 
64  if( verboseLevel>0 )
65  G4cout << "Livermore Polarized Compton is constructed " << G4endl;
66 
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
70 
72 {
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79 
81  const G4DataVector& cuts)
82 {
83  if (verboseLevel > 3)
84  G4cout << "Calling G4LivermorePolarizedComptonModel::Initialise()" << G4endl;
85 
87  {
89  delete crossSectionHandler;
90  }
91 
92  // Reading of data files - all materials are read
93 
96  G4String crossSectionFile = "comp/ce-cs-";
97  crossSectionHandler->LoadData(crossSectionFile);
98 
101 
102  G4VDataSetAlgorithm* scatterInterpolation = new G4LogLogInterpolation;
103  G4String scatterFile = "comp/ce-sf-";
104  scatterFunctionData = new G4CompositeEMDataSet(scatterInterpolation, 1., 1.);
105  scatterFunctionData->LoadData(scatterFile);
106 
107  // For Doppler broadening
109  G4String file = "/doppler/shell-doppler";
110  shellData.LoadData(file);
111 
112  if (verboseLevel > 2)
113  G4cout << "Loaded cross section files for Livermore Polarized Compton model" << G4endl;
114 
115  InitialiseElementSelectors(particle,cuts);
116 
117  if( verboseLevel>0 ) {
118  G4cout << "Livermore Polarized Compton model is initialized " << G4endl
119  << "Energy range: "
120  << LowEnergyLimit() / eV << " eV - "
121  << HighEnergyLimit() / GeV << " GeV"
122  << G4endl;
123  }
124 
125  //
126 
127  if(isInitialised) return;
129  isInitialised = true;
130 }
131 
132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
133 
135  const G4ParticleDefinition*,
136  G4double GammaEnergy,
137  G4double Z, G4double,
139 {
140  if (verboseLevel > 3)
141  G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermorePolarizedComptonModel" << G4endl;
142 
143  if (GammaEnergy < LowEnergyLimit())
144  return 0.0;
145 
146  G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy);
147  return cs;
148 }
149 
150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
151 
152 void G4LivermorePolarizedComptonModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
153  const G4MaterialCutsCouple* couple,
154  const G4DynamicParticle* aDynamicGamma,
155  G4double,
156  G4double)
157 {
158  // The scattered gamma energy is sampled according to Klein - Nishina formula.
159  // The random number techniques of Butcher & Messel are used (Nuc Phys 20(1960),15).
160  // GEANT4 internal units
161  //
162  // Note : Effects due to binding of atomic electrons are negliged.
163 
164  if (verboseLevel > 3)
165  G4cout << "Calling SampleSecondaries() of G4LivermorePolarizedComptonModel" << G4endl;
166 
167  G4double gammaEnergy0 = aDynamicGamma->GetKineticEnergy();
168 
169  // do nothing below the threshold
170  // should never get here because the XS is zero below the limit
171  if (gammaEnergy0 < LowEnergyLimit())
172  return ;
173 
174 
175  G4ThreeVector gammaPolarization0 = aDynamicGamma->GetPolarization();
176 
177  // Protection: a polarisation parallel to the
178  // direction causes problems;
179  // in that case find a random polarization
180 
181  G4ThreeVector gammaDirection0 = aDynamicGamma->GetMomentumDirection();
182 
183  // Make sure that the polarization vector is perpendicular to the
184  // gamma direction. If not
185 
186  if(!(gammaPolarization0.isOrthogonal(gammaDirection0, 1e-6))||(gammaPolarization0.mag()==0))
187  { // only for testing now
188  gammaPolarization0 = GetRandomPolarization(gammaDirection0);
189  }
190  else
191  {
192  if ( gammaPolarization0.howOrthogonal(gammaDirection0) != 0)
193  {
194  gammaPolarization0 = GetPerpendicularPolarization(gammaDirection0, gammaPolarization0);
195  }
196  }
197 
198  // End of Protection
199 
200  G4double E0_m = gammaEnergy0 / electron_mass_c2 ;
201 
202  // Select randomly one element in the current material
203  //G4int Z = crossSectionHandler->SelectRandomAtom(couple,gammaEnergy0);
204  const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition();
205  const G4Element* elm = SelectRandomAtom(couple,particle,gammaEnergy0);
206  G4int Z = (G4int)elm->GetZ();
207 
208  // Sample the energy and the polarization of the scattered photon
209 
210  G4double epsilon, epsilonSq, onecost, sinThetaSqr, greject ;
211 
212  G4double epsilon0Local = 1./(1. + 2*E0_m);
213  G4double epsilon0Sq = epsilon0Local*epsilon0Local;
214  G4double alpha1 = - std::log(epsilon0Local);
215  G4double alpha2 = 0.5*(1.- epsilon0Sq);
216 
217  G4double wlGamma = h_Planck*c_light/gammaEnergy0;
218  G4double gammaEnergy1;
219  G4ThreeVector gammaDirection1;
220 
221  do {
222  if ( alpha1/(alpha1+alpha2) > G4UniformRand() )
223  {
224  epsilon = std::exp(-alpha1*G4UniformRand());
225  epsilonSq = epsilon*epsilon;
226  }
227  else
228  {
229  epsilonSq = epsilon0Sq + (1.- epsilon0Sq)*G4UniformRand();
230  epsilon = std::sqrt(epsilonSq);
231  }
232 
233  onecost = (1.- epsilon)/(epsilon*E0_m);
234  sinThetaSqr = onecost*(2.-onecost);
235 
236  // Protection
237  if (sinThetaSqr > 1.)
238  {
239  G4cout
240  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
241  << "sin(theta)**2 = "
242  << sinThetaSqr
243  << "; set to 1"
244  << G4endl;
245  sinThetaSqr = 1.;
246  }
247  if (sinThetaSqr < 0.)
248  {
249  G4cout
250  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
251  << "sin(theta)**2 = "
252  << sinThetaSqr
253  << "; set to 0"
254  << G4endl;
255  sinThetaSqr = 0.;
256  }
257  // End protection
258 
259  G4double x = std::sqrt(onecost/2.) / (wlGamma/cm);;
260  G4double scatteringFunction = scatterFunctionData->FindValue(x,Z-1);
261  greject = (1. - epsilon*sinThetaSqr/(1.+ epsilonSq))*scatteringFunction;
262 
263  } while(greject < G4UniformRand()*Z);
264 
265 
266  // ****************************************************
267  // Phi determination
268  // ****************************************************
269 
270  G4double phi = SetPhi(epsilon,sinThetaSqr);
271 
272  //
273  // scattered gamma angles. ( Z - axis along the parent gamma)
274  //
275 
276  G4double cosTheta = 1. - onecost;
277 
278  // Protection
279 
280  if (cosTheta > 1.)
281  {
282  G4cout
283  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
284  << "cosTheta = "
285  << cosTheta
286  << "; set to 1"
287  << G4endl;
288  cosTheta = 1.;
289  }
290  if (cosTheta < -1.)
291  {
292  G4cout
293  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
294  << "cosTheta = "
295  << cosTheta
296  << "; set to -1"
297  << G4endl;
298  cosTheta = -1.;
299  }
300  // End protection
301 
302 
303  G4double sinTheta = std::sqrt (sinThetaSqr);
304 
305  // Protection
306  if (sinTheta > 1.)
307  {
308  G4cout
309  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
310  << "sinTheta = "
311  << sinTheta
312  << "; set to 1"
313  << G4endl;
314  sinTheta = 1.;
315  }
316  if (sinTheta < -1.)
317  {
318  G4cout
319  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
320  << "sinTheta = "
321  << sinTheta
322  << "; set to -1"
323  << G4endl;
324  sinTheta = -1.;
325  }
326  // End protection
327 
328 
329  G4double dirx = sinTheta*std::cos(phi);
330  G4double diry = sinTheta*std::sin(phi);
331  G4double dirz = cosTheta ;
332 
333 
334  // oneCosT , eom
335 
336  // Doppler broadening - Method based on:
337  // Y. Namito, S. Ban and H. Hirayama,
338  // "Implementation of the Doppler Broadening of a Compton-Scattered Photon Into the EGS4 Code"
339  // NIM A 349, pp. 489-494, 1994
340 
341  // Maximum number of sampling iterations
342 
343  G4int maxDopplerIterations = 1000;
344  G4double bindingE = 0.;
345  G4double photonEoriginal = epsilon * gammaEnergy0;
346  G4double photonE = -1.;
347  G4int iteration = 0;
348  G4double eMax = gammaEnergy0;
349 
350  do
351  {
352  iteration++;
353  // Select shell based on shell occupancy
354  G4int shell = shellData.SelectRandomShell(Z);
355  bindingE = shellData.BindingEnergy(Z,shell);
356 
357  eMax = gammaEnergy0 - bindingE;
358 
359  // Randomly sample bound electron momentum (memento: the data set is in Atomic Units)
360  G4double pSample = profileData.RandomSelectMomentum(Z,shell);
361  // Rescale from atomic units
362  G4double pDoppler = pSample * fine_structure_const;
363  G4double pDoppler2 = pDoppler * pDoppler;
364  G4double var2 = 1. + onecost * E0_m;
365  G4double var3 = var2*var2 - pDoppler2;
366  G4double var4 = var2 - pDoppler2 * cosTheta;
367  G4double var = var4*var4 - var3 + pDoppler2 * var3;
368  if (var > 0.)
369  {
370  G4double varSqrt = std::sqrt(var);
371  G4double scale = gammaEnergy0 / var3;
372  // Random select either root
373  if (G4UniformRand() < 0.5) photonE = (var4 - varSqrt) * scale;
374  else photonE = (var4 + varSqrt) * scale;
375  }
376  else
377  {
378  photonE = -1.;
379  }
380  } while ( iteration <= maxDopplerIterations &&
381  (photonE < 0. || photonE > eMax || photonE < eMax*G4UniformRand()) );
382 
383  // End of recalculation of photon energy with Doppler broadening
384  // Revert to original if maximum number of iterations threshold has been reached
385  if (iteration >= maxDopplerIterations)
386  {
387  photonE = photonEoriginal;
388  bindingE = 0.;
389  }
390 
391  gammaEnergy1 = photonE;
392 
393  //
394  // update G4VParticleChange for the scattered photon
395  //
396 
397  // gammaEnergy1 = epsilon*gammaEnergy0;
398 
399 
400  // New polarization
401 
402  G4ThreeVector gammaPolarization1 = SetNewPolarization(epsilon,
403  sinThetaSqr,
404  phi,
405  cosTheta);
406 
407  // Set new direction
408  G4ThreeVector tmpDirection1( dirx,diry,dirz );
409  gammaDirection1 = tmpDirection1;
410 
411  // Change reference frame.
412 
413  SystemOfRefChange(gammaDirection0,gammaDirection1,
414  gammaPolarization0,gammaPolarization1);
415 
416  if (gammaEnergy1 > 0.)
417  {
418  fParticleChange->SetProposedKineticEnergy( gammaEnergy1 ) ;
419  fParticleChange->ProposeMomentumDirection( gammaDirection1 );
420  fParticleChange->ProposePolarization( gammaPolarization1 );
421  }
422  else
423  {
424  gammaEnergy1 = 0.;
427  }
428 
429  //
430  // kinematic of the scattered electron
431  //
432 
433  G4double ElecKineEnergy = gammaEnergy0 - gammaEnergy1 -bindingE;
434 
435  // SI -protection against negative final energy: no e- is created
436  // like in G4LivermoreComptonModel.cc
437  if(ElecKineEnergy < 0.0) {
438  fParticleChange->ProposeLocalEnergyDeposit(gammaEnergy0 - gammaEnergy1);
439  return;
440  }
441 
442  // SI - Removed range test
443 
444  G4double ElecMomentum = std::sqrt(ElecKineEnergy*(ElecKineEnergy+2.*electron_mass_c2));
445 
446  G4ThreeVector ElecDirection((gammaEnergy0 * gammaDirection0 -
447  gammaEnergy1 * gammaDirection1) * (1./ElecMomentum));
448 
450 
451  G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),ElecDirection.unit(),ElecKineEnergy) ;
452  fvect->push_back(dp);
453 
454 }
455 
456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
457 
459  G4double sinSqrTh)
460 {
461  G4double rand1;
462  G4double rand2;
463  G4double phiProbability;
464  G4double phi;
465  G4double a, b;
466 
467  do
468  {
469  rand1 = G4UniformRand();
470  rand2 = G4UniformRand();
471  phiProbability=0.;
472  phi = twopi*rand1;
473 
474  a = 2*sinSqrTh;
475  b = energyRate + 1/energyRate;
476 
477  phiProbability = 1 - (a/b)*(std::cos(phi)*std::cos(phi));
478 
479 
480 
481  }
482  while ( rand2 > phiProbability );
483  return phi;
484 }
485 
486 
487 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
488 
490 {
491  G4double dx = a.x();
492  G4double dy = a.y();
493  G4double dz = a.z();
494  G4double x = dx < 0.0 ? -dx : dx;
495  G4double y = dy < 0.0 ? -dy : dy;
496  G4double z = dz < 0.0 ? -dz : dz;
497  if (x < y) {
498  return x < z ? G4ThreeVector(-dy,dx,0) : G4ThreeVector(0,-dz,dy);
499  }else{
500  return y < z ? G4ThreeVector(dz,0,-dx) : G4ThreeVector(-dy,dx,0);
501  }
502 }
503 
504 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
505 
507 {
508  G4ThreeVector d0 = direction0.unit();
509  G4ThreeVector a1 = SetPerpendicularVector(d0); //different orthogonal
510  G4ThreeVector a0 = a1.unit(); // unit vector
511 
512  G4double rand1 = G4UniformRand();
513 
514  G4double angle = twopi*rand1; // random polar angle
515  G4ThreeVector b0 = d0.cross(a0); // cross product
516 
517  G4ThreeVector c;
518 
519  c.setX(std::cos(angle)*(a0.x())+std::sin(angle)*b0.x());
520  c.setY(std::cos(angle)*(a0.y())+std::sin(angle)*b0.y());
521  c.setZ(std::cos(angle)*(a0.z())+std::sin(angle)*b0.z());
522 
523  G4ThreeVector c0 = c.unit();
524 
525  return c0;
526 
527 }
528 
529 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
530 
532 (const G4ThreeVector& gammaDirection, const G4ThreeVector& gammaPolarization) const
533 {
534 
535  //
536  // The polarization of a photon is always perpendicular to its momentum direction.
537  // Therefore this function removes those vector component of gammaPolarization, which
538  // points in direction of gammaDirection
539  //
540  // Mathematically we search the projection of the vector a on the plane E, where n is the
541  // plains normal vector.
542  // The basic equation can be found in each geometry book (e.g. Bronstein):
543  // p = a - (a o n)/(n o n)*n
544 
545  return gammaPolarization - gammaPolarization.dot(gammaDirection)/gammaDirection.dot(gammaDirection) * gammaDirection;
546 }
547 
548 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
549 
551  G4double sinSqrTh,
552  G4double phi,
553  G4double costheta)
554 {
555  G4double rand1;
556  G4double rand2;
557  G4double cosPhi = std::cos(phi);
558  G4double sinPhi = std::sin(phi);
559  G4double sinTheta = std::sqrt(sinSqrTh);
560  G4double cosSqrPhi = cosPhi*cosPhi;
561  // G4double cossqrth = 1.-sinSqrTh;
562  // G4double sinsqrphi = sinPhi*sinPhi;
563  G4double normalisation = std::sqrt(1. - cosSqrPhi*sinSqrTh);
564 
565 
566  // Determination of Theta
567 
568  // ---- MGP ---- Commented out the following 3 lines to avoid compilation
569  // warnings (unused variables)
570  // G4double thetaProbability;
571  G4double theta;
572  // G4double a, b;
573  // G4double cosTheta;
574 
575  /*
576 
577  depaola method
578 
579  do
580  {
581  rand1 = G4UniformRand();
582  rand2 = G4UniformRand();
583  thetaProbability=0.;
584  theta = twopi*rand1;
585  a = 4*normalisation*normalisation;
586  b = (epsilon + 1/epsilon) - 2;
587  thetaProbability = (b + a*std::cos(theta)*std::cos(theta))/(a+b);
588  cosTheta = std::cos(theta);
589  }
590  while ( rand2 > thetaProbability );
591 
592  G4double cosBeta = cosTheta;
593 
594  */
595 
596 
597  // Dan Xu method (IEEE TNS, 52, 1160 (2005))
598 
599  rand1 = G4UniformRand();
600  rand2 = G4UniformRand();
601 
602  if (rand1<(epsilon+1.0/epsilon-2)/(2.0*(epsilon+1.0/epsilon)-4.0*sinSqrTh*cosSqrPhi))
603  {
604  if (rand2<0.5)
605  theta = pi/2.0;
606  else
607  theta = 3.0*pi/2.0;
608  }
609  else
610  {
611  if (rand2<0.5)
612  theta = 0;
613  else
614  theta = pi;
615  }
616  G4double cosBeta = std::cos(theta);
617  G4double sinBeta = std::sqrt(1-cosBeta*cosBeta);
618 
619  G4ThreeVector gammaPolarization1;
620 
621  G4double xParallel = normalisation*cosBeta;
622  G4double yParallel = -(sinSqrTh*cosPhi*sinPhi)*cosBeta/normalisation;
623  G4double zParallel = -(costheta*sinTheta*cosPhi)*cosBeta/normalisation;
624  G4double xPerpendicular = 0.;
625  G4double yPerpendicular = (costheta)*sinBeta/normalisation;
626  G4double zPerpendicular = -(sinTheta*sinPhi)*sinBeta/normalisation;
627 
628  G4double xTotal = (xParallel + xPerpendicular);
629  G4double yTotal = (yParallel + yPerpendicular);
630  G4double zTotal = (zParallel + zPerpendicular);
631 
632  gammaPolarization1.setX(xTotal);
633  gammaPolarization1.setY(yTotal);
634  gammaPolarization1.setZ(zTotal);
635 
636  return gammaPolarization1;
637 
638 }
639 
640 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
641 
643  G4ThreeVector& direction1,
644  G4ThreeVector& polarization0,
645  G4ThreeVector& polarization1)
646 {
647  // direction0 is the original photon direction ---> z
648  // polarization0 is the original photon polarization ---> x
649  // need to specify y axis in the real reference frame ---> y
650  G4ThreeVector Axis_Z0 = direction0.unit();
651  G4ThreeVector Axis_X0 = polarization0.unit();
652  G4ThreeVector Axis_Y0 = (Axis_Z0.cross(Axis_X0)).unit(); // to be confirmed;
653 
654  G4double direction_x = direction1.getX();
655  G4double direction_y = direction1.getY();
656  G4double direction_z = direction1.getZ();
657 
658  direction1 = (direction_x*Axis_X0 + direction_y*Axis_Y0 + direction_z*Axis_Z0).unit();
659  G4double polarization_x = polarization1.getX();
660  G4double polarization_y = polarization1.getY();
661  G4double polarization_z = polarization1.getZ();
662 
663  polarization1 = (polarization_x*Axis_X0 + polarization_y*Axis_Y0 + polarization_z*Axis_Z0).unit();
664 
665 }
666 
667 
void SetOccupancyData()
Definition: G4ShellData.hh:70
static const double cm
Definition: G4SIunits.hh:106
const G4double a0
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:623
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4VEmModel.cc:148
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:616
G4double z
Definition: TRTMaterials.hh:39
static const G4double a1
const G4double pi
G4double GetZ() const
Definition: G4Element.hh:131
G4ParticleDefinition * GetDefinition() const
G4double a
Definition: TRTMaterials.hh:39
int G4int
Definition: G4Types.hh:78
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4int SelectRandomShell(G4int Z) const
Definition: G4ShellData.cc:363
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:234
G4double FindValue(G4int Z, G4double e) const
#define G4UniformRand()
Definition: Randomize.hh:93
G4GLOB_DLL std::ostream G4cout
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
const G4ThreeVector & GetMomentumDirection() const
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:166
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
void ProposePolarization(const G4ThreeVector &dir)
static const double GeV
Definition: G4SIunits.hh:196
G4VEMDataSet * BuildMeanFreePathForMaterials(const G4DataVector *energyCuts=0)
G4ThreeVector SetNewPolarization(G4double epsilon, G4double sinSqrTheta, G4double phi, G4double cosTheta)
G4ThreeVector GetPerpendicularPolarization(const G4ThreeVector &direction0, const G4ThreeVector &polarization0) const
static const double eV
Definition: G4SIunits.hh:194
static const G4double c0
G4LivermorePolarizedComptonModel(const G4ParticleDefinition *p=0, const G4String &nam="LivermorePolarizedCompton")
const G4ThreeVector & GetPolarization() const
void LoadData(const G4String &dataFile)
void SystemOfRefChange(G4ThreeVector &direction0, G4ThreeVector &direction1, G4ThreeVector &polarization0, G4ThreeVector &polarization1)
virtual G4bool LoadData(const G4String &fileName)=0
G4ThreeVector SetPerpendicularVector(G4ThreeVector &a)
static G4Electron * Electron()
Definition: G4Electron.cc:94
void SetProposedKineticEnergy(G4double proposedKinEnergy)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void ProposeTrackStatus(G4TrackStatus status)
static const G4double b0
G4double RandomSelectMomentum(G4int Z, G4int shellIndex) const
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:526
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:134
G4ThreeVector GetRandomPolarization(G4ThreeVector &direction0)