Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
G4LivermorePolarizedComptonModel Class Reference

#include <G4LivermorePolarizedComptonModel.hh>

Inheritance diagram for G4LivermorePolarizedComptonModel:
G4VEmModel

Public Member Functions

 G4LivermorePolarizedComptonModel (const G4ParticleDefinition *p=0, const G4String &nam="LivermorePolarizedCompton")
 
virtual ~G4LivermorePolarizedComptonModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector
< G4EmElementSelector * > * 
GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=0)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 

Protected Attributes

G4ParticleChangeForGammafParticleChange
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Detailed Description

Definition at line 45 of file G4LivermorePolarizedComptonModel.hh.

Constructor & Destructor Documentation

G4LivermorePolarizedComptonModel::G4LivermorePolarizedComptonModel ( const G4ParticleDefinition p = 0,
const G4String nam = "LivermorePolarizedCompton" 
)

Definition at line 51 of file G4LivermorePolarizedComptonModel.cc.

References python.hepunit::eV, G4cout, G4endl, python.hepunit::GeV, and G4VEmModel::SetHighEnergyLimit().

53  :G4VEmModel(nam),fParticleChange(0),isInitialised(false),
54  meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0)
55 {
56  lowEnergyLimit = 250 * eV;
57  highEnergyLimit = 100 * GeV;
58  //SetLowEnergyLimit(lowEnergyLimit);
59  SetHighEnergyLimit(highEnergyLimit);
60 
61  verboseLevel= 0;
62  // Verbosity scale:
63  // 0 = nothing
64  // 1 = warning for energy non-conservation
65  // 2 = details of energy budget
66  // 3 = calculation of cross sections, file openings, sampling of atoms
67  // 4 = entering in methods
68 
69  if( verboseLevel>0 ) {
70  G4cout << "Livermore Polarized Compton is constructed " << G4endl
71  << "Energy range: "
72  << lowEnergyLimit / eV << " eV - "
73  << highEnergyLimit / GeV << " GeV"
74  << G4endl;
75  }
76 }
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:65
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:683
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4LivermorePolarizedComptonModel::~G4LivermorePolarizedComptonModel ( )
virtual

Definition at line 80 of file G4LivermorePolarizedComptonModel.cc.

81 {
82  if (meanFreePathTable) delete meanFreePathTable;
83  if (crossSectionHandler) delete crossSectionHandler;
84  if (scatterFunctionData) delete scatterFunctionData;
85 }

Member Function Documentation

G4double G4LivermorePolarizedComptonModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition ,
G4double  kinEnergy,
G4double  Z,
G4double  A = 0,
G4double  cut = 0,
G4double  emax = DBL_MAX 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 143 of file G4LivermorePolarizedComptonModel.cc.

References G4VCrossSectionHandler::FindValue(), G4cout, and G4endl.

148 {
149  if (verboseLevel > 3)
150  G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermorePolarizedComptonModel" << G4endl;
151 
152  if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) return 0.0;
153 
154  G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy);
155  return cs;
156 }
int G4int
Definition: G4Types.hh:78
G4double FindValue(G4int Z, G4double e) const
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void G4LivermorePolarizedComptonModel::Initialise ( const G4ParticleDefinition particle,
const G4DataVector cuts 
)
virtual

Implements G4VEmModel.

Definition at line 89 of file G4LivermorePolarizedComptonModel.cc.

References G4VCrossSectionHandler::BuildMeanFreePathForMaterials(), G4VCrossSectionHandler::Clear(), python.hepunit::eV, fParticleChange, G4cout, G4endl, G4VEmModel::GetParticleChangeForGamma(), python.hepunit::GeV, G4VEmModel::HighEnergyLimit(), G4VEmModel::InitialiseElementSelectors(), G4ShellData::LoadData(), G4VEMDataSet::LoadData(), G4VCrossSectionHandler::LoadData(), G4VEmModel::LowEnergyLimit(), and G4ShellData::SetOccupancyData().

91 {
92  if (verboseLevel > 3)
93  G4cout << "Calling G4LivermorePolarizedComptonModel::Initialise()" << G4endl;
94 
95  if (crossSectionHandler)
96  {
97  crossSectionHandler->Clear();
98  delete crossSectionHandler;
99  }
100 
101  // Reading of data files - all materials are read
102 
103  crossSectionHandler = new G4CrossSectionHandler;
104  crossSectionHandler->Clear();
105  G4String crossSectionFile = "comp/ce-cs-";
106  crossSectionHandler->LoadData(crossSectionFile);
107 
108  meanFreePathTable = 0;
109  meanFreePathTable = crossSectionHandler->BuildMeanFreePathForMaterials();
110 
111  G4VDataSetAlgorithm* scatterInterpolation = new G4LogLogInterpolation;
112  G4String scatterFile = "comp/ce-sf-";
113  scatterFunctionData = new G4CompositeEMDataSet(scatterInterpolation, 1., 1.);
114  scatterFunctionData->LoadData(scatterFile);
115 
116  // For Doppler broadening
117  shellData.SetOccupancyData();
118  G4String file = "/doppler/shell-doppler";
119  shellData.LoadData(file);
120 
121  if (verboseLevel > 2)
122  G4cout << "Loaded cross section files for Livermore Polarized Compton model" << G4endl;
123 
124  InitialiseElementSelectors(particle,cuts);
125 
126  if( verboseLevel>0 ) {
127  G4cout << "Livermore Polarized Compton model is initialized " << G4endl
128  << "Energy range: "
129  << LowEnergyLimit() / eV << " eV - "
130  << HighEnergyLimit() / GeV << " GeV"
131  << G4endl;
132  }
133 
134  //
135 
136  if(isInitialised) return;
138  isInitialised = true;
139 }
void SetOccupancyData()
Definition: G4ShellData.hh:70
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:599
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4VEmModel.cc:135
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:592
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:234
G4GLOB_DLL std::ostream G4cout
G4VEMDataSet * BuildMeanFreePathForMaterials(const G4DataVector *energyCuts=0)
void LoadData(const G4String &dataFile)
virtual G4bool LoadData(const G4String &fileName)=0
#define G4endl
Definition: G4ios.hh:61
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:121
void G4LivermorePolarizedComptonModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple couple,
const G4DynamicParticle aDynamicGamma,
G4double  tmin,
G4double  maxEnergy 
)
virtual

Implements G4VEmModel.

Definition at line 160 of file G4LivermorePolarizedComptonModel.cc.

References G4ShellData::BindingEnergy(), python.hepunit::c_light, python.hepunit::cm, G4Electron::Electron(), python.hepunit::electron_mass_c2, G4VEMDataSet::FindValue(), python.hepunit::fine_structure_const, fParticleChange, fStopAndKill, G4cout, G4endl, G4UniformRand, G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentumDirection(), G4DynamicParticle::GetPolarization(), G4Element::GetZ(), python.hepunit::h_Planck, CLHEP::Hep3Vector::howOrthogonal(), CLHEP::Hep3Vector::isOrthogonal(), CLHEP::Hep3Vector::mag(), G4VParticleChange::ProposeLocalEnergyDeposit(), G4ParticleChangeForGamma::ProposeMomentumDirection(), G4ParticleChangeForGamma::ProposePolarization(), G4VParticleChange::ProposeTrackStatus(), G4DopplerProfile::RandomSelectMomentum(), G4VEmModel::SelectRandomAtom(), G4ShellData::SelectRandomShell(), G4ParticleChangeForGamma::SetProposedKineticEnergy(), CLHEP::Hep3Vector::unit(), var(), and test::x.

165 {
166  // The scattered gamma energy is sampled according to Klein - Nishina formula.
167  // The random number techniques of Butcher & Messel are used (Nuc Phys 20(1960),15).
168  // GEANT4 internal units
169  //
170  // Note : Effects due to binding of atomic electrons are negliged.
171 
172  if (verboseLevel > 3)
173  G4cout << "Calling SampleSecondaries() of G4LivermorePolarizedComptonModel" << G4endl;
174 
175  G4double gammaEnergy0 = aDynamicGamma->GetKineticEnergy();
176  G4ThreeVector gammaPolarization0 = aDynamicGamma->GetPolarization();
177 
178  // Protection: a polarisation parallel to the
179  // direction causes problems;
180  // in that case find a random polarization
181 
182  G4ThreeVector gammaDirection0 = aDynamicGamma->GetMomentumDirection();
183 
184  // Make sure that the polarization vector is perpendicular to the
185  // gamma direction. If not
186 
187  if(!(gammaPolarization0.isOrthogonal(gammaDirection0, 1e-6))||(gammaPolarization0.mag()==0))
188  { // only for testing now
189  gammaPolarization0 = GetRandomPolarization(gammaDirection0);
190  }
191  else
192  {
193  if ( gammaPolarization0.howOrthogonal(gammaDirection0) != 0)
194  {
195  gammaPolarization0 = GetPerpendicularPolarization(gammaDirection0, gammaPolarization0);
196  }
197  }
198 
199  // End of Protection
200 
201  // Within energy limit?
202 
203  if(gammaEnergy0 <= lowEnergyLimit)
204  {
208  return;
209  }
210 
211  G4double E0_m = gammaEnergy0 / electron_mass_c2 ;
212 
213  // Select randomly one element in the current material
214  //G4int Z = crossSectionHandler->SelectRandomAtom(couple,gammaEnergy0);
215  const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition();
216  const G4Element* elm = SelectRandomAtom(couple,particle,gammaEnergy0);
217  G4int Z = (G4int)elm->GetZ();
218 
219  // Sample the energy and the polarization of the scattered photon
220 
221  G4double epsilon, epsilonSq, onecost, sinThetaSqr, greject ;
222 
223  G4double epsilon0Local = 1./(1. + 2*E0_m);
224  G4double epsilon0Sq = epsilon0Local*epsilon0Local;
225  G4double alpha1 = - std::log(epsilon0Local);
226  G4double alpha2 = 0.5*(1.- epsilon0Sq);
227 
228  G4double wlGamma = h_Planck*c_light/gammaEnergy0;
229  G4double gammaEnergy1;
230  G4ThreeVector gammaDirection1;
231 
232  do {
233  if ( alpha1/(alpha1+alpha2) > G4UniformRand() )
234  {
235  epsilon = std::exp(-alpha1*G4UniformRand());
236  epsilonSq = epsilon*epsilon;
237  }
238  else
239  {
240  epsilonSq = epsilon0Sq + (1.- epsilon0Sq)*G4UniformRand();
241  epsilon = std::sqrt(epsilonSq);
242  }
243 
244  onecost = (1.- epsilon)/(epsilon*E0_m);
245  sinThetaSqr = onecost*(2.-onecost);
246 
247  // Protection
248  if (sinThetaSqr > 1.)
249  {
250  G4cout
251  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
252  << "sin(theta)**2 = "
253  << sinThetaSqr
254  << "; set to 1"
255  << G4endl;
256  sinThetaSqr = 1.;
257  }
258  if (sinThetaSqr < 0.)
259  {
260  G4cout
261  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
262  << "sin(theta)**2 = "
263  << sinThetaSqr
264  << "; set to 0"
265  << G4endl;
266  sinThetaSqr = 0.;
267  }
268  // End protection
269 
270  G4double x = std::sqrt(onecost/2.) / (wlGamma/cm);;
271  G4double scatteringFunction = scatterFunctionData->FindValue(x,Z-1);
272  greject = (1. - epsilon*sinThetaSqr/(1.+ epsilonSq))*scatteringFunction;
273 
274  } while(greject < G4UniformRand()*Z);
275 
276 
277  // ****************************************************
278  // Phi determination
279  // ****************************************************
280 
281  G4double phi = SetPhi(epsilon,sinThetaSqr);
282 
283  //
284  // scattered gamma angles. ( Z - axis along the parent gamma)
285  //
286 
287  G4double cosTheta = 1. - onecost;
288 
289  // Protection
290 
291  if (cosTheta > 1.)
292  {
293  G4cout
294  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
295  << "cosTheta = "
296  << cosTheta
297  << "; set to 1"
298  << G4endl;
299  cosTheta = 1.;
300  }
301  if (cosTheta < -1.)
302  {
303  G4cout
304  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
305  << "cosTheta = "
306  << cosTheta
307  << "; set to -1"
308  << G4endl;
309  cosTheta = -1.;
310  }
311  // End protection
312 
313 
314  G4double sinTheta = std::sqrt (sinThetaSqr);
315 
316  // Protection
317  if (sinTheta > 1.)
318  {
319  G4cout
320  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
321  << "sinTheta = "
322  << sinTheta
323  << "; set to 1"
324  << G4endl;
325  sinTheta = 1.;
326  }
327  if (sinTheta < -1.)
328  {
329  G4cout
330  << " -- Warning -- G4LivermorePolarizedComptonModel::SampleSecondaries "
331  << "sinTheta = "
332  << sinTheta
333  << "; set to -1"
334  << G4endl;
335  sinTheta = -1.;
336  }
337  // End protection
338 
339 
340  G4double dirx = sinTheta*std::cos(phi);
341  G4double diry = sinTheta*std::sin(phi);
342  G4double dirz = cosTheta ;
343 
344 
345  // oneCosT , eom
346 
347  // Doppler broadening - Method based on:
348  // Y. Namito, S. Ban and H. Hirayama,
349  // "Implementation of the Doppler Broadening of a Compton-Scattered Photon Into the EGS4 Code"
350  // NIM A 349, pp. 489-494, 1994
351 
352  // Maximum number of sampling iterations
353 
354  G4int maxDopplerIterations = 1000;
355  G4double bindingE = 0.;
356  G4double photonEoriginal = epsilon * gammaEnergy0;
357  G4double photonE = -1.;
358  G4int iteration = 0;
359  G4double eMax = gammaEnergy0;
360 
361  do
362  {
363  iteration++;
364  // Select shell based on shell occupancy
365  G4int shell = shellData.SelectRandomShell(Z);
366  bindingE = shellData.BindingEnergy(Z,shell);
367 
368  eMax = gammaEnergy0 - bindingE;
369 
370  // Randomly sample bound electron momentum (memento: the data set is in Atomic Units)
371  G4double pSample = profileData.RandomSelectMomentum(Z,shell);
372  // Rescale from atomic units
373  G4double pDoppler = pSample * fine_structure_const;
374  G4double pDoppler2 = pDoppler * pDoppler;
375  G4double var2 = 1. + onecost * E0_m;
376  G4double var3 = var2*var2 - pDoppler2;
377  G4double var4 = var2 - pDoppler2 * cosTheta;
378  G4double var = var4*var4 - var3 + pDoppler2 * var3;
379  if (var > 0.)
380  {
381  G4double varSqrt = std::sqrt(var);
382  G4double scale = gammaEnergy0 / var3;
383  // Random select either root
384  if (G4UniformRand() < 0.5) photonE = (var4 - varSqrt) * scale;
385  else photonE = (var4 + varSqrt) * scale;
386  }
387  else
388  {
389  photonE = -1.;
390  }
391  } while ( iteration <= maxDopplerIterations &&
392  (photonE < 0. || photonE > eMax || photonE < eMax*G4UniformRand()) );
393 
394  // End of recalculation of photon energy with Doppler broadening
395  // Revert to original if maximum number of iterations threshold has been reached
396  if (iteration >= maxDopplerIterations)
397  {
398  photonE = photonEoriginal;
399  bindingE = 0.;
400  }
401 
402  gammaEnergy1 = photonE;
403 
404  //
405  // update G4VParticleChange for the scattered photon
406  //
407 
408  // gammaEnergy1 = epsilon*gammaEnergy0;
409 
410 
411  // New polarization
412 
413  G4ThreeVector gammaPolarization1 = SetNewPolarization(epsilon,
414  sinThetaSqr,
415  phi,
416  cosTheta);
417 
418  // Set new direction
419  G4ThreeVector tmpDirection1( dirx,diry,dirz );
420  gammaDirection1 = tmpDirection1;
421 
422  // Change reference frame.
423 
424  SystemOfRefChange(gammaDirection0,gammaDirection1,
425  gammaPolarization0,gammaPolarization1);
426 
427  if (gammaEnergy1 > 0.)
428  {
429  fParticleChange->SetProposedKineticEnergy( gammaEnergy1 ) ;
430  fParticleChange->ProposeMomentumDirection( gammaDirection1 );
431  fParticleChange->ProposePolarization( gammaPolarization1 );
432  }
433  else
434  {
435  gammaEnergy1 = 0.;
438  }
439 
440  //
441  // kinematic of the scattered electron
442  //
443 
444  G4double ElecKineEnergy = gammaEnergy0 - gammaEnergy1 -bindingE;
445 
446  // SI -protection against negative final energy: no e- is created
447  // like in G4LivermoreComptonModel.cc
448  if(ElecKineEnergy < 0.0) {
449  fParticleChange->ProposeLocalEnergyDeposit(gammaEnergy0 - gammaEnergy1);
450  return;
451  }
452 
453  // SI - Removed range test
454 
455  G4double ElecMomentum = std::sqrt(ElecKineEnergy*(ElecKineEnergy+2.*electron_mass_c2));
456 
457  G4ThreeVector ElecDirection((gammaEnergy0 * gammaDirection0 -
458  gammaEnergy1 * gammaDirection1) * (1./ElecMomentum));
459 
461 
462  G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),ElecDirection.unit(),ElecKineEnergy) ;
463  fvect->push_back(dp);
464 
465 }
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
real *8 function var(A, B, C, D)
Definition: dpm25nuc1.f:4649
G4double GetKineticEnergy() const
float h_Planck
Definition: hepunit.py:263
G4double GetZ() const
Definition: G4Element.hh:131
G4ParticleDefinition * GetDefinition() const
bool isOrthogonal(const Hep3Vector &v, double epsilon=tolerance) const
Definition: SpaceVector.cc:237
int G4int
Definition: G4Types.hh:78
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4int SelectRandomShell(G4int Z) const
Definition: G4ShellData.cc:363
double howOrthogonal(const Hep3Vector &v) const
Definition: SpaceVector.cc:219
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:166
void ProposePolarization(const G4ThreeVector &dir)
float electron_mass_c2
Definition: hepunit.py:274
const G4ThreeVector & GetPolarization() const
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)
double mag() const
G4double RandomSelectMomentum(G4int Z, G4int shellIndex) const
float c_light
Definition: hepunit.py:257
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:510

Field Documentation

G4ParticleChangeForGamma* G4LivermorePolarizedComptonModel::fParticleChange
protected

Definition at line 73 of file G4LivermorePolarizedComptonModel.hh.

Referenced by Initialise(), and SampleSecondaries().


The documentation for this class was generated from the following files: