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

#include <G4MollerBhabhaModel.hh>

Inheritance diagram for G4MollerBhabhaModel:
G4VEmModel G4PolarizedMollerBhabhaModel MyMollerBhabhaModel MyMollerBhabhaModel

Public Member Functions

 G4MollerBhabhaModel (const G4ParticleDefinition *p=0, const G4String &nam="MollerBhabha")
 
virtual ~G4MollerBhabhaModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
 
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 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 Member Functions

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

Protected Attributes

const G4ParticleDefinitionparticle
 
G4ParticleDefinitiontheElectron
 
G4ParticleChangeForLossfParticleChange
 
G4bool isElectron
 
G4double twoln10
 
G4double lowLimit
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 

Detailed Description

Definition at line 63 of file G4MollerBhabhaModel.hh.

Constructor & Destructor Documentation

G4MollerBhabhaModel::G4MollerBhabhaModel ( const G4ParticleDefinition p = 0,
const G4String nam = "MollerBhabha" 
)

Definition at line 76 of file G4MollerBhabhaModel.cc.

References G4Electron::Electron(), fParticleChange, SetParticle(), and theElectron.

78  : G4VEmModel(nam),
79  particle(0),
80  isElectron(true),
81  twoln10(2.0*G4Log(10.0)),
82  lowLimit(0.02*keV),
83  isInitialised(false)
84 {
86  if(p) { SetParticle(p); }
87  fParticleChange = 0;
88 }
void SetParticle(const G4ParticleDefinition *p)
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:65
G4ParticleChangeForLoss * fParticleChange
const G4ParticleDefinition * particle
G4double G4Log(G4double x)
Definition: G4Log.hh:227
G4ParticleDefinition * theElectron
static G4Electron * Electron()
Definition: G4Electron.cc:94
G4MollerBhabhaModel::~G4MollerBhabhaModel ( )
virtual

Definition at line 92 of file G4MollerBhabhaModel.cc.

93 {}

Member Function Documentation

G4double G4MollerBhabhaModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  Z,
G4double  A,
G4double  cutEnergy,
G4double  maxEnergy 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 177 of file G4MollerBhabhaModel.cc.

References ComputeCrossSectionPerElectron().

183 {
184  return Z*ComputeCrossSectionPerElectron(p,kineticEnergy,cutEnergy,maxEnergy);
185 }
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double G4MollerBhabhaModel::ComputeCrossSectionPerElectron ( const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
)
virtual

Reimplemented in G4PolarizedMollerBhabhaModel.

Definition at line 124 of file G4MollerBhabhaModel.cc.

References python.hepunit::electron_mass_c2, G4Log(), G4InuclParticleNames::gam, isElectron, MaxSecondaryEnergy(), G4INCL::Math::min(), particle, SetParticle(), and python.hepunit::twopi_mc2_rcl2.

Referenced by ComputeCrossSectionPerAtom(), G4PolarizedMollerBhabhaModel::ComputeCrossSectionPerElectron(), and CrossSectionPerVolume().

128 {
129  if(!particle) { SetParticle(p); }
130 
131  G4double cross = 0.0;
132  G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
133  tmax = std::min(maxEnergy, tmax);
134 
135  if(cutEnergy < tmax) {
136 
137  G4double xmin = cutEnergy/kineticEnergy;
138  G4double xmax = tmax/kineticEnergy;
139  G4double tau = kineticEnergy/electron_mass_c2;
140  G4double gam = tau + 1.0;
141  G4double gamma2= gam*gam;
142  G4double beta2 = tau*(tau + 2)/gamma2;
143 
144  //Moller (e-e-) scattering
145  if (isElectron) {
146 
147  G4double gg = (2.0*gam - 1.0)/gamma2;
148  cross = ((xmax - xmin)*(1.0 - gg + 1.0/(xmin*xmax)
149  + 1.0/((1.0-xmin)*(1.0 - xmax)))
150  - gg*G4Log( xmax*(1.0 - xmin)/(xmin*(1.0 - xmax)) ) ) / beta2;
151 
152  //Bhabha (e+e-) scattering
153  } else {
154 
155  G4double y = 1.0/(1.0 + gam);
156  G4double y2 = y*y;
157  G4double y12 = 1.0 - 2.0*y;
158  G4double b1 = 2.0 - y2;
159  G4double b2 = y12*(3.0 + y2);
160  G4double y122= y12*y12;
161  G4double b4 = y122*y12;
162  G4double b3 = b4 + y122;
163 
164  cross = (xmax - xmin)*(1.0/(beta2*xmin*xmax) + b2
165  - 0.5*b3*(xmin + xmax)
166  + b4*(xmin*xmin + xmin*xmax + xmax*xmax)/3.0)
167  - b1*G4Log(xmax/xmin);
168  }
169 
170  cross *= twopi_mc2_rcl2/kineticEnergy;
171  }
172  return cross;
173 }
void SetParticle(const G4ParticleDefinition *p)
const G4ParticleDefinition * particle
float electron_mass_c2
Definition: hepunit.py:274
G4double G4Log(G4double x)
Definition: G4Log.hh:227
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76
G4double G4MollerBhabhaModel::ComputeDEDXPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy 
)
virtual

Reimplemented from G4VEmModel.

Reimplemented in MyMollerBhabhaModel, and MyMollerBhabhaModel.

Definition at line 215 of file G4MollerBhabhaModel.cc.

References G4IonisParamMat::DensityCorrection(), python.hepunit::electron_mass_c2, G4Log(), G4InuclParticleNames::gam, G4Material::GetElectronDensity(), G4Material::GetIonisation(), G4IonisParamMat::GetMeanExcitationEnergy(), G4Material::GetTotNbOfAtomsPerVolume(), isElectron, python.hepunit::keV, MaxSecondaryEnergy(), G4INCL::Math::min(), particle, SetParticle(), twoln10, python.hepunit::twopi_mc2_rcl2, and test::x.

220 {
221  if(!particle) { SetParticle(p); }
222  // calculate the dE/dx due to the ionization by Seltzer-Berger formula
223  // checl low-energy limit
224  G4double electronDensity = material->GetElectronDensity();
225 
226  G4double Zeff = electronDensity/material->GetTotNbOfAtomsPerVolume();
227  G4double th = 0.25*sqrt(Zeff)*keV;
228  // G4double cut;
229  // if(isElectron) { cut = std::max(th*0.5, cutEnergy); }
230  // else { cut = std::max(th, cutEnergy); }
231  G4double tkin = kineticEnergy;
232  if (kineticEnergy < th) { tkin = th; }
233 
234  G4double tau = tkin/electron_mass_c2;
235  G4double gam = tau + 1.0;
236  G4double gamma2= gam*gam;
237  G4double bg2 = tau*(tau + 2);
238  G4double beta2 = bg2/gamma2;
239 
240  G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
241  eexc /= electron_mass_c2;
242  G4double eexc2 = eexc*eexc;
243 
245  G4double dedx;
246 
247  // electron
248  if (isElectron) {
249 
250  dedx = G4Log(2.0*(tau + 2.0)/eexc2) - 1.0 - beta2
251  + G4Log((tau-d)*d) + tau/(tau-d)
252  + (0.5*d*d + (2.0*tau + 1.)*G4Log(1. - d/tau))/gamma2;
253 
254  //positron
255  } else {
256 
257  G4double d2 = d*d*0.5;
258  G4double d3 = d2*d/1.5;
259  G4double d4 = d3*d*0.75;
260  G4double y = 1.0/(1.0 + gam);
261  dedx = G4Log(2.0*(tau + 2.0)/eexc2) + G4Log(tau*d)
262  - beta2*(tau + 2.0*d - y*(3.0*d2
263  + y*(d - d3 + y*(d2 - tau*d3 + d4))))/tau;
264  }
265 
266  //density correction
267  G4double x = G4Log(bg2)/twoln10;
268  dedx -= material->GetIonisation()->DensityCorrection(x);
269 
270  // now you can compute the total ionization loss
271  dedx *= twopi_mc2_rcl2*electronDensity/beta2;
272  if (dedx < 0.0) { dedx = 0.0; }
273 
274  // lowenergy extrapolation
275 
276  if (kineticEnergy < th) {
277  x = kineticEnergy/th;
278  if(x > 0.25) { dedx /= sqrt(x); }
279  else { dedx *= 1.4*sqrt(x)/(0.1 + x); }
280  }
281  return dedx;
282 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224
void SetParticle(const G4ParticleDefinition *p)
G4double GetElectronDensity() const
Definition: G4Material.hh:215
const G4ParticleDefinition * particle
float electron_mass_c2
Definition: hepunit.py:274
G4double G4Log(G4double x)
Definition: G4Log.hh:227
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:207
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
G4double DensityCorrection(G4double x)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double GetMeanExcitationEnergy() const
double G4double
Definition: G4Types.hh:76
G4double G4MollerBhabhaModel::CrossSectionPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 189 of file G4MollerBhabhaModel.cc.

References ComputeCrossSectionPerElectron(), and G4Material::GetElectronDensity().

195 {
196  G4double eDensity = material->GetElectronDensity();
197  return eDensity*ComputeCrossSectionPerElectron(p,kinEnergy,cutEnergy,maxEnergy);
198  /*
199  G4double Zeff = eDensity/material->GetTotNbOfAtomsPerVolume();
200  G4double th = 0.25*sqrt(Zeff)*keV;
201  G4double cut;
202  if(isElectron) { cut = std::max(th*0.5, cutEnergy); }
203  else { cut = std::max(th, cutEnergy); }
204  G4double res = 0.0;
205  // below this threshold no bremsstrahlung
206  if (kinEnergy > th) {
207  res = eDensity*ComputeCrossSectionPerElectron(p,kinEnergy,cut,maxEnergy);
208  }
209  return res;
210  */
211 }
G4double GetElectronDensity() const
Definition: G4Material.hh:215
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
double G4double
Definition: G4Types.hh:76
void G4MollerBhabhaModel::Initialise ( const G4ParticleDefinition p,
const G4DataVector  
)
virtual

Implements G4VEmModel.

Definition at line 107 of file G4MollerBhabhaModel.cc.

References fParticleChange, G4VEmModel::GetAngularDistribution(), G4VEmModel::GetParticleChangeForLoss(), particle, G4VEmModel::SetAngularDistribution(), SetParticle(), and G4VEmModel::UseAngularGeneratorFlag().

109 {
110  if(!particle) { SetParticle(p); }
111 
112  if(isInitialised) { return; }
113 
114  isInitialised = true;
118  }
119 }
G4ParticleChangeForLoss * GetParticleChangeForLoss()
Definition: G4VEmModel.cc:107
void SetParticle(const G4ParticleDefinition *p)
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:578
G4ParticleChangeForLoss * fParticleChange
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:655
const G4ParticleDefinition * particle
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:585
G4double G4MollerBhabhaModel::MaxSecondaryEnergy ( const G4ParticleDefinition ,
G4double  kinEnergy 
)
protectedvirtual

Reimplemented from G4VEmModel.

Definition at line 97 of file G4MollerBhabhaModel.cc.

References isElectron.

Referenced by G4PolarizedMollerBhabhaModel::ComputeCrossSectionPerElectron(), ComputeCrossSectionPerElectron(), MyMollerBhabhaModel::ComputeDEDXPerVolume(), and ComputeDEDXPerVolume().

99 {
100  G4double tmax = kinEnergy;
101  if(isElectron) { tmax *= 0.5; }
102  return tmax;
103 }
double G4double
Definition: G4Types.hh:76
void G4MollerBhabhaModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  vdp,
const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double  tmin,
G4double  maxEnergy 
)
virtual

Implements G4VEmModel.

Reimplemented in G4PolarizedMollerBhabhaModel.

Definition at line 287 of file G4MollerBhabhaModel.cc.

References python.hepunit::electron_mass_c2, energy(), fParticleChange, G4UniformRand, G4InuclParticleNames::gam, G4VEmModel::GetAngularDistribution(), G4DynamicParticle::GetKineticEnergy(), G4MaterialCutsCouple::GetMaterial(), G4DynamicParticle::GetMomentum(), G4DynamicParticle::GetMomentumDirection(), G4DynamicParticle::GetTotalMomentum(), isElectron, CLHEP::Hep3Vector::rotateUz(), G4VEmAngularDistribution::SampleDirection(), G4VEmModel::SelectRandomAtomNumber(), CLHEP::Hep3Vector::set(), G4ParticleChangeForLoss::SetProposedKineticEnergy(), G4ParticleChangeForLoss::SetProposedMomentumDirection(), theElectron, python.hepunit::twopi, CLHEP::Hep3Vector::unit(), G4VEmModel::UseAngularGeneratorFlag(), test::x, and z.

292 {
293  G4double kineticEnergy = dp->GetKineticEnergy();
294  //const G4Material* mat = couple->GetMaterial();
295  //G4double Zeff = mat->GetElectronDensity()/mat->GetTotNbOfAtomsPerVolume();
296  // G4double th = 0.25*sqrt(Zeff)*keV;
297  G4double tmax;
298  G4double tmin = cutEnergy;
299  if(isElectron) {
300  tmax = 0.5*kineticEnergy;
301  } else {
302  tmax = kineticEnergy;
303  }
304  if(maxEnergy < tmax) { tmax = maxEnergy; }
305  if(tmin >= tmax) { return; }
306 
307  G4double energy = kineticEnergy + electron_mass_c2;
308  G4double xmin = tmin/kineticEnergy;
309  G4double xmax = tmax/kineticEnergy;
310  G4double gam = energy/electron_mass_c2;
311  G4double gamma2 = gam*gam;
312  G4double beta2 = 1.0 - 1.0/gamma2;
313  G4double x, z, q, grej;
314 
315  //Moller (e-e-) scattering
316  if (isElectron) {
317 
318  G4double gg = (2.0*gam - 1.0)/gamma2;
319  G4double y = 1.0 - xmax;
320  grej = 1.0 - gg*xmax + xmax*xmax*(1.0 - gg + (1.0 - gg*y)/(y*y));
321 
322  do {
323  q = G4UniformRand();
324  x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
325  y = 1.0 - x;
326  z = 1.0 - gg*x + x*x*(1.0 - gg + (1.0 - gg*y)/(y*y));
327  /*
328  if(z > grej) {
329  G4cout << "G4MollerBhabhaModel::SampleSecondary Warning! "
330  << "Majorant " << grej << " < "
331  << z << " for x= " << x
332  << " e-e- scattering"
333  << G4endl;
334  }
335  */
336  } while(grej * G4UniformRand() > z);
337 
338  //Bhabha (e+e-) scattering
339  } else {
340 
341  G4double y = 1.0/(1.0 + gam);
342  G4double y2 = y*y;
343  G4double y12 = 1.0 - 2.0*y;
344  G4double b1 = 2.0 - y2;
345  G4double b2 = y12*(3.0 + y2);
346  G4double y122= y12*y12;
347  G4double b4 = y122*y12;
348  G4double b3 = b4 + y122;
349 
350  y = xmax*xmax;
351  grej = 1.0 + (y*y*b4 - xmin*xmin*xmin*b3 + y*b2 - xmin*b1)*beta2;
352  do {
353  q = G4UniformRand();
354  x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
355  y = x*x;
356  z = 1.0 + (y*y*b4 - x*y*b3 + y*b2 - x*b1)*beta2;
357  /*
358  if(z > grej) {
359  G4cout << "G4MollerBhabhaModel::SampleSecondary Warning! "
360  << "Majorant " << grej << " < "
361  << z << " for x= " << x
362  << " e+e- scattering"
363  << G4endl;
364  }
365  */
366  } while(grej * G4UniformRand() > z);
367  }
368 
369  G4double deltaKinEnergy = x * kineticEnergy;
370 
371  G4ThreeVector deltaDirection;
372 
374  const G4Material* mat = couple->GetMaterial();
375  G4int Z = SelectRandomAtomNumber(mat);
376 
377  deltaDirection =
378  GetAngularDistribution()->SampleDirection(dp, deltaKinEnergy, Z, mat);
379 
380  } else {
381 
382  G4double deltaMomentum =
383  sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
384  G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
385  (deltaMomentum * dp->GetTotalMomentum());
386  if(cost > 1.0) { cost = 1.0; }
387  G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
388 
389  G4double phi = twopi * G4UniformRand() ;
390 
391  deltaDirection.set(sint*cos(phi),sint*sin(phi), cost) ;
392  deltaDirection.rotateUz(dp->GetMomentumDirection());
393  }
394 
395  // create G4DynamicParticle object for delta ray
396  G4DynamicParticle* delta =
397  new G4DynamicParticle(theElectron,deltaDirection,deltaKinEnergy);
398  vdp->push_back(delta);
399 
400  // primary change
401  kineticEnergy -= deltaKinEnergy;
402  G4ThreeVector finalP = dp->GetMomentum() - delta->GetMomentum();
403  finalP = finalP.unit();
404 
407 }
void set(double x, double y, double z)
G4double GetKineticEnergy() const
G4double z
Definition: TRTMaterials.hh:39
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:578
int G4int
Definition: G4Types.hh:78
G4double GetTotalMomentum() const
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
#define G4UniformRand()
Definition: Randomize.hh:87
G4ParticleChangeForLoss * fParticleChange
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:655
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:72
void SetProposedKineticEnergy(G4double proposedKinEnergy)
float electron_mass_c2
Definition: hepunit.py:274
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4ParticleDefinition * theElectron
Hep3Vector unit() const
double G4double
Definition: G4Types.hh:76
G4ThreeVector GetMomentum() const
const G4Material * GetMaterial() const
G4int SelectRandomAtomNumber(const G4Material *)
Definition: G4VEmModel.hh:529
void G4MollerBhabhaModel::SetParticle ( const G4ParticleDefinition p)
inlineprotected

Definition at line 132 of file G4MollerBhabhaModel.hh.

References isElectron, particle, and theElectron.

Referenced by ComputeCrossSectionPerElectron(), MyMollerBhabhaModel::ComputeDEDXPerVolume(), ComputeDEDXPerVolume(), G4MollerBhabhaModel(), and Initialise().

133 {
134  particle = p;
135  if(p != theElectron) { isElectron = false; }
136 }
const char * p
Definition: xmltok.h:285
const G4ParticleDefinition * particle
G4ParticleDefinition * theElectron

Field Documentation

G4ParticleChangeForLoss* G4MollerBhabhaModel::fParticleChange
protected
G4bool G4MollerBhabhaModel::isElectron
protected
G4double G4MollerBhabhaModel::lowLimit
protected

Definition at line 118 of file G4MollerBhabhaModel.hh.

Referenced by MyMollerBhabhaModel::ComputeDEDXPerVolume().

const G4ParticleDefinition* G4MollerBhabhaModel::particle
protected
G4ParticleDefinition* G4MollerBhabhaModel::theElectron
protected
G4double G4MollerBhabhaModel::twoln10
protected

Definition at line 117 of file G4MollerBhabhaModel.hh.

Referenced by ComputeDEDXPerVolume().


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