Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -1,4 +1,4 @@
$Id: History,v 1.360 2007/12/07 17:35:51 vnivanch Exp $
$Id: History,v 1.430 2008/11/24 18:28:09 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,282 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
24 November 08: V.Ivant (emstand-V09-01-45)
G4PSTARStopping, G4ASTARStopping - fixed non-initialized variable
introduced in the previous tag
19 November 08: V.Ivant (emstand-V09-01-44)
G4WentzelVIModel - minor fix in lateral displacement
13 November 08: A. Schaelicke (emstand-V09-01-43)
G4eBremsstrahlung - activate LPM switch for high energy model
G4eBremsstrahlungRelModel - revised LPMconstant
G4eBremsstrahlungModel, G4eBremsstrahlungRelModel - (VI) use LPM flag
from the base class
13 November 08: V.Ivant (emstand-V09-01-42)
G4PSTARStopping - fixed SiO2 and TEFLON data
G4ASTARStopping - fixed GRAFITE data
29 October 08: V.Ivant (emstand-V09-01-41)
G4UrbanMscModel, G4UrbanMscModel2, G4UrbanMscModel90, G4WentzelVIModel
use StepStatus from preStepPoint to identify first step for a given track
instaed of step number in order to address ATLAS problem of small step
limits happen with suspended tracks
27 October 08: V.Ivant (emstand-V09-01-40)
G4UrbanMscModel2 - extra protection for "UseDistanceToBoundary" option
G4WentzelVIModel - fixed cross section factor for single scattering
23 October 08: V.Ivant (emstand-V09-01-39)
G4eCoulombScatteringModel and G4WentzelVIModel - added protection against
precision loss in computation of cross section at high energy
G4UrbanMscModel2 - fixed screening parameter of the single scattering part
G4eMultipleScattering - set default RangeFactor = 0.04
22 October 08: V.Ivant (emstand-V09-01-38)
G4IonFluctuations - added G4UniversalFluctuation model, which are used for
high energy; added comments and cleanup
G4BetheBlochModel, G4BraggIonModel - take into account effective change
change over the step
G4hIonisation - switch off nuclear stopping for pi and K mesons
20 October 08: V.Ivant (emstand-V09-01-37)
G4UrbanMscModel2 - return back ref-08 version
G4IronStopping, G4MaterialStopping, G4SimpleMaterialStopping moved to materials
G4eBremsstrahlungHEModel - temporary model is removed
17 October 08: V.Ivant (emstand-V09-01-36)
G4UrbanMscModel2 - use logic of 9.1 version for step limitation
option "UseSafety" to fix CPU penalty in sampling
calorimeters (L.Urban)
G4UrbanMscModel2, G4UrbanMscModel, G4UrbanMscModel90 added protection
against sampling scattering angle with zero transport
cross section
15 October 08: V.Ivant (emstand-V09-01-35)
For all process classes set sub-types according to the enumeration
of G4EmProcessSubType.hh, improved cout
G4UrbanMscModel2 - use screning function from G4eCoulombScatteringModel
G4eBremsstrahlung - set relativistic model above 1 GeV by default
G4eBremsstrahlungModel, G4eBremsstrahlungRelModel removed private member
highEnergyTh and use access method to this threshold in the base class
21 September 08: V.Ivant (emstand-V09-01-34)
G4BetheBlochModel, G4BraggModel, G4BraggIonModel - simplified new methods
G4ionIonisation - use the same low-energy model for He ions and GenericIons
(like it was in 9.2beta)
16 September 08: V.Ivant (emstand-V09-01-33)
G4UrbanMscModel, G4UrbanMscModel2, G4UrbanMscModel90 - do not use
string comparison when compute transport cross section, instead
compare masses (G.Cosmo)
12 September 08: V.Ivant (emstand-V09-01-32)
Improved verbose output for processes
G4IonFluctuations - do not use Poisson sampling
G4BetheBlochModel, G4BraggModel, G4BraggIonModel - added methods
GetParticleCharge, GetChargeSquareRatio, CorrectionsAlongStep
needed for ions; define low and high energy limits inside the model
G4ionIonisation, G4hIonisation - remove InitialiseMassCharge and
CorrectionsAlongStep methods;
limits of kinetic energy for models
taken from the base class and from
models; separate trietment He ions
09 September 08: V.Ivant (emstand-V09-01-31)
G4WaterStopping, G4IronStopping, G4MaterialStopping,
G4SimpleMaterialStopping - use mass number instead of atomic mass
(A.Lechner proposal)
G4eBremsstrahlungModel - Migdal constant set to the vavue of
G4eBremsstrahlungRelModel (A.Schaelicke)
28 August 08: V.Ivant (emstand-V09-01-30)
G4WaterStopping, G4IronStopping - add method AddData to speeed up
compillation and cleanup
G4WentzelVIModel - fixed bug in lateral displacement
26 August 08: A.Schaelicke
G4eBremsstrahlungRelModel
* define threshold energy for LPM effect
* fix LPM calculation
* define Thomas-fermi FF (ala Tsai)
* some speed improvements
25 August 08: V.Ivant (emstand-V09-01-29)
G4MaterialStopping, G4SimpleMaterialStopping - fixed compillation
problem at Windows by adding a new method AddData
25 August 08: V.Ivant (emstand-V09-01-28)
23 August 08: V.Ivant (emstand-V09-01-27)
G4UrbanMscModel2 - fixed NaN in sampling of cosine theta for 50 GeV e-
22 August 08: V.Ivant (emstand-V09-01-26)
Added new classes with stopping data G4MaterialStopping,
G4SimpleMaterialStopping, G4IronStopping
13 August 08: V.Ivant (emstand-V09-01-25)
G4eCoulombScatteringModel - added extra protection for precision lost in
computation of recoil energy
G4eBremsstrahlungModel, G4eBremsstrahlungHEModel - define more precise names
of models
11 August 08: V.Ivant (emstand-V09-01-24)
G4IonFluctuations - do not perform loop over elements of material but use
effetive Z
G4UrbanMscModel2 - bug fix in ComputeTruePathLengthLimit (L.Urban)
4 August 08: V.Ivant (emstand-V09-01-23)
G4eMultipleScattering - allowed to be applied for all changed particles
G4UrbanMscModel2 - changed name to "UrbanMscUni2"
G4eCoulombScatteringModel and G4WentzelVIModel - added protections for ions
G4WaterStopping - added extra data
31 July 08: V.Ivant (emstand-V09-01-22)
G4WentzelVIModel, G4eCoulombScatteringModel, G4CoulombScatteringModel -
do not define min and max energy in constructor but use Set
methods
G4MultipleScattering, G4eMultipleScattering, G4hMultipleScattering -
added cout of model names
G4CoulombScattering - set angular limit of models by Set method
24 July 08: V.Ivant (emstand-V09-01-21)
G4UrbanMscModel2 - central part of scattering angle (theta0) and
tail of the scattering angle distribution have been tuned
using some e- and proton scattering data (L.Urban)
21 July 08: V.Ivant (emstand-V09-01-20)
G4eCoulombScatteringModel, G4CoulombScatteringModel - added usage of
G4ElementSelector vector, do not use A in SetupTarget method
G4WentzelVIModel - do not use A in SetupTarget method
16 June 08: V.Ivant (emstand-V09-01-19)
G4PAIPhotonModel - change model name
G4MultipleScattering71 - move inline virtual method to source to avoid
compillation warning
14 June 08: V.Ivant (emstand-V09-01-18)
- G4CoulombScattering - added SetHEModelLimit method to provide more easy
initialisation
11 June 08: V.Ivant (emstand-V09-01-17)
- G4eCoulombScatteringModel - SelectIsotope method moved from the derived
class and sampling of the recoil ion is performed
- G4CoulombScatteringModel - SelectIsotope method moved to the base class
- G4PAIxSection - new functions for resonance and Rutherford collisions
- G4IonFluctuations - fixed index
- G4ionIonisation - use G4BraggModel for low-energy ions heavier than He
- G4hIonisation - build separate tables for kaons to allow use hadron
bremsstrahlung and pair production by kaons
2 June 08: V.Ivant (emstand-V09-01-16)
- G4IonFluctuations - added method SetParticleAndCharge
- G4ionIonisation, G4ionGasIonisation - added pointer to G4IonFluctuations
and use of method SetParticleAndCharge; compute nuclear
stopping before adding corrections
20 May 08: V.Ivant (emstand-V09-01-15)
- G4IonFluctuations - summed fluctuation of components of a mixture instead
of computation for average Z
- G4BetheBlochModel - added projectile form-factor in computation of max
energy transfer and in sampling of the energy of e-
13 May 08: A.Schaelicke
- G4eBremsstrahlungHEModel - new model, which is an extension of the standard
bremsstrahlung model using a more sophisticated
LPM approach
09 May 08: V.Ivant (emstand-V09-01-14)
- G4hMultipleScattering - added method AlongStepGetPhysicalInteractionLength
in which for ions scaled energy normalized to one nucleon is used
- G4ionGasIonisation - fixed bug in update of the dynamic charge of
an ion
21 April 08: V.Ivant (emstand-V09-01-13)
- G4WentzelVIModel - new model of multiple scattering
- G4WaterStopping - use spline
- G4hMultipleScattering - do not build tables for particles with mass > GeV
- G4ionIonisation, G4ionGasIonisation - updated usage of high order
corrections
- G4CoulombScattering, G4eCoulombScatteringModel - use new parameter
polarAngleLimit
9 April 08: V.Ivant (emstand-V09-01-12)
- G4UrbanMscModel, G4UrbanMscModel90 - fixed assymetry in transverse
displacement
- G4eCoulombScatteringModel - fixed bug for compounds
31 March 08: V.Ivant (emstand-V09-01-11)
- G4eCoulombScatteringModel - use SelectAtomRandomly method
- G4UrbanMscModel2 (L.Urban):
- Simplification of step limitation in ComputeTruePathLengthLimit,
+ tlimitmin is the same for UseDistancetoBoundary and UseSafety
- Reorganization of SampleCosineTheta + new method SimpleScattering
SimpleScattering is used if the relative energy loss is too big
or theta0 is too big (see data members rellossmax, theta0max)
- Tuning of the correction factor in ComputeTheta0
- exponent c of the 'tail' model function is not equal to 2 any more,
value of c has been extracted from some e- scattering data
- Step limitation in ComputeTruePathLengthLimit has been
simplified further + some data members have been removed
25 March 08: V.Ivant (emstand-V09-01-10)
- G4BetheBlochModel - use formfactor for sampling
- G4eCoulombScatteringModel - remove unsued array
25 March 08: V.Ivant (emstand-V09-01-09)
- G4ionIonisation - use default linLossLimit of 9.1
- G4hIonisation - use G4IonFluctuations at low energies
- G4IonFluctuations - fixed computation of corrections
- G4BetheBlochModel - finite size correction is taken into
account both for delta-electron cross section and DEDX
- G4eCoulombScatteringModel - reorganize and cleanup computation
of cross section
14 March 08: V.Ivant (emstand-V09-01-08)
- G4UrbanMscModel2 - L.Urban fix assymetry in lateral displacement
- G4UrbanMscModel90, G4MscModel71 - fixed warnings for gcc 4.3.0
10 March 08: V.Ivant (emstand-V09-01-07)
- G4MultipleScattering, G4hMultipleScattering, G4UrbanMscModel,
G4UrbanMscModel2, G4UrbanMscModel90 uses G4VMscModel interface
- G4eMultipleScattering - new process specialized for e+,e-
06 March 08: V.Ivant (emstand-V09-01-06)
- G4UrbanMscModel2 is cloned from G4UrbanMscModel
- SubType for all processes is initialized
20 February 08: V.Ivant (emstand-V09-01-05)
G4eCoulombScatteringModel - speedup run-time computations using
precomputed nuclear form-factors per element
14 February 08: V.Ivant (emstand-V09-01-04)
- G4ionIonisation, G4ionGasIonisation - use new method to compute
corrections: IonHighOrderCorrections
- G4BetheBlochModel - when computing dedx for ions use new
method IonBarkasCorrection
- G4IonFluctuations - added protection to the computation of
the correction factor to dispersion which provide smooth
transition to small velocities of an ion
04 February 08: V.Ivant (emstand-V09-01-03)
- G4hIonisation, G4ionIonisation, G4ionGasIonisation - add extra
protections in computation of non-ionizing energy loss
04 February 08: V.Ivant (emstand-V09-01-02)
G4IonFluctuations - added protection in computation of dispersion
on allowing have a corrected dispersion below Bohr value
16 January 08: V.Ivant (emstand-V09-01-01)
G4PAIModel, G4PAIPhotonModel - added an extra protection guaranteed
correct usage of the last bin of the table of energy transfers
14 January 08: V.Ivant (emstand-V09-01-00)
- G4hIonisation, G4ionIonisation, G4ionGasIonisation - fixed
computation of non-ionizing energy loss: at the last ionization step
and at energies above 2 MeV for protons;
- G4eCoulombScatteringModel - use more safe numerical expression
07 December 07: V.Ivant (emstand-V09-00-22)
G4UrbanMscModel90 is created on base of G4UrbanMscModel of release 9.0
G4hMultipleScattering uses G4UrbanMscModel90
@@ -65,7 +341,7 @@ G4eCoulombScatteringModel - fixed computation of transport cross section
- use different correction to Highland formula for different
particle type (electron, muons, others)
- tuning ComputeGeomPathLength in order to get better low
energy behaviour for heavy particles (mu, hadrons)
energy behavior for heavy particles (mu, hadrons)
- small modification of theta0 in ComputeTheta0 (based on data)
- some old inconsistency/bug has been cured in SampleCosineTheta
now the variable prob is always in [0,1]
@@ -98,7 +374,7 @@ G4PAIphotonModel, G4PAIModel - fixed MaxSecondaryEnergy method for
15 August 07: V.Ivant (emstand-V09-00-07)
- G4eCoulombScatteringModel and G4CoulombScatteringModel - fixed bug in
computation of screening parameters in SampleSecondary method;
reorganised initialisation of kinematics and screening parameters;
reorganized initialisation of kinematics and screening parameters;
used Z(Z+1) factor to take into account scattering off e-
13 August 07: V.Ivant (emstand-V09-00-06)
@@ -132,7 +408,7 @@ G4PAIphotonModel, G4PAIModel - fixed MaxSecondaryEnergy method for
- G4eCoulombScatteringModel - updated screen radius model
- G4ionIonisation - remove obsolete method DefineMassCharge
- G4ionGasIonisation - new ion ionisation process with descrete ion charge and
no equilibrium btween ion and media
no equilibrium between ion and media
- G4BraggModel, G4BraggIonModel - more safe computation of scattering angle
16 July 07: V.Ivant (emstand-V09-00-01)
@@ -173,7 +449,7 @@ G4PAIphotonModel, G4PAIModel - fixed MaxSecondaryEnergy method for
- G4VEmModel - changed interface of SampleSecondary method, it become
void, extra parameter std::vector<G4DynamicParticle*>*, all
classes using or inhereting this interface are modified.
About 5% speadup of EM shower simulation
About 5% speedup of EM shower simulation
21 May 07: V.Ivanchenko (emstand-V08-03-05)
- G4ionIonisation - added InitialiseMassCharge method; remove
@@ -186,10 +462,10 @@ G4PAIphotonModel, G4PAIModel - fixed MaxSecondaryEnergy method for
- remove obsolete G4VeEnergyLoss and G4VhEnergyLoss
18 May 07: V.Ivanchenko (emstand-V08-03-02)
- G4MultipleScattering, G4hMultipleScattering - reorganise methods
- G4MultipleScattering, G4hMultipleScattering - reorganized methods
for setting msc
parameters
- G4UrbanMscModel - reorganise initialisation; use G4MscStepLimitType
- G4UrbanMscModel - reorganized initialisation; use G4MscStepLimitType
enumerator to choose step limit algorithm
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ASTARStopping.hh,v 1.5 2006/06/29 19:49:58 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ASTARStopping.hh,v 1.6 2008/11/13 12:04:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4ASTARStopping_h
#define G4ASTARStopping_h 1
@@ -85,7 +85,6 @@ private:
G4double currentE, res;
G4double e[74][78], kinE[78];
G4double effZ[74];
G4int Znum[74];
};
inline G4double G4ASTARStopping::GetElectronicDEDX(const G4Material* mat,
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheBlochModel.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BetheBlochModel.hh,v 1.16 2008/10/22 16:00:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,9 +44,11 @@
// 13-02-03 Add name (V.Ivanchenko)
// 12-11-03 Fix for GenericIons (V.Ivanchenko)
// 24-03-05 Add G4EmCorrections (V.Ivanchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
// 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
@@ -64,6 +66,8 @@
class G4EmCorrections;
class G4ParticleChangeForLoss;
class G4NistManager;
class G4BetheBlochModel : public G4VEmModel
{
@@ -104,6 +108,20 @@ public:
G4double kineticEnergy,
G4double cutEnergy);
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& niel,
G4double length);
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
@@ -124,19 +142,25 @@ private:
G4BetheBlochModel(const G4BetheBlochModel&);
const G4ParticleDefinition* particle;
const G4Material* currentMaterial;
G4ParticleDefinition* theElectron;
G4EmCorrections* corr;
G4ParticleChangeForLoss* fParticleChange;
G4NistManager* nist;
G4double mass;
G4double tlimit;
G4double spin;
G4double magMoment2;
G4double chargeSquare;
G4double ratio;
G4double formfact;
G4double twoln10;
G4double bg2lim;
G4double taulim;
G4double corrFactor;
G4bool isIon;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -154,19 +178,4 @@ inline G4double G4BetheBlochModel::MaxSecondaryEnergy(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
{
if(particle != p) {
particle = p;
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
ratio = electron_mass_c2/mass;
if(mass > 120.*MeV) tlimit = 51.2*GeV*std::pow(proton_mass_c2/mass,0.66667);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BetheHeitlerModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BohrFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggIonModel.hh,v 1.8 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BraggIonModel.hh,v 1.11 2008/10/22 16:00:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -42,12 +42,15 @@
// 11-05-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 25-04-06 Add stopping data from ASTAR (V.Ivanchenko)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
//
// Implementation of energy loss and delta-electron production
// by heavy slow charged particles using eveluated data
// by heavy slow charged particles using ICRU'49 and NIST evaluated data
// for He4 ions
// -------------------------------------------------------------------
//
@@ -59,6 +62,7 @@
#include "G4ASTARStopping.hh"
class G4ParticleChangeForLoss;
class G4EmCorrections;
class G4BraggIonModel : public G4VEmModel
{
@@ -105,6 +109,22 @@ public:
G4double tmin,
G4double maxEnergy);
// Compute ion charge
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
const G4Material*,
G4double kineticEnergy);
virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
// add correction to energy loss and ompute non-ionizing energy loss
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& niel,
G4double length);
protected:
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
@@ -132,6 +152,8 @@ private:
G4double DEDX(const G4Material* material, G4double kineticEnergy);
G4EmCorrections* corr;
const G4ParticleDefinition* particle;
G4ParticleDefinition* theElectron;
G4ParticleChangeForLoss* fParticleChange;
@@ -143,16 +165,16 @@ private:
G4double chargeSquare;
G4double massRate;
G4double ratio;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double lowestKinEnergy;
G4double HeMass;
G4double massFactor;
G4double corrFactor;
G4double rateMassHe2p;
G4double theZieglerFactor;
G4int iMolecula; // index in the molecula's table
G4bool isIon;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggModel.hh,v 1.10 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BraggModel.hh,v 1.12 2008/09/14 17:11:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,13 +44,16 @@
// 12-11-03 Fix for GenericIons (V.Ivanchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 25-04-06 Add stopping data from PSTAR (V.Ivanchenko)
// 25-04-06 Added stopping data from PSTAR (V.Ivanchenko)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
//
// Implementation of energy loss and delta-electron production
// by heavy slow charged particles using eveluated data
// by heavy slow charged particles using ICRU'49 and NIST evaluated data
// for protons
// -------------------------------------------------------------------
//
@@ -62,6 +65,7 @@
#include "G4PSTARStopping.hh"
class G4ParticleChangeForLoss;
class G4EmCorrections;
class G4BraggModel : public G4VEmModel
{
@@ -108,6 +112,22 @@ public:
G4double tmin,
G4double maxEnergy);
// Compute ion charge
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
const G4Material*,
G4double kineticEnergy);
virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
// add correction to energy loss and compute non-ionizing energy loss
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& niel,
G4double length);
protected:
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
@@ -139,6 +159,9 @@ private:
G4BraggModel & operator=(const G4BraggModel &right);
G4BraggModel(const G4BraggModel&);
G4EmCorrections* corr;
const G4ParticleDefinition* particle;
G4ParticleDefinition* theElectron;
G4ParticleChangeForLoss* fParticleChange;
@@ -149,8 +172,6 @@ private:
G4double chargeSquare;
G4double massRate;
G4double ratio;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double lowestKinEnergy;
G4double protonMassAMU;
G4double theZieglerFactor;
@@ -158,6 +179,7 @@ private:
G4int iMolecula; // index in the molecula's table
G4bool isIon;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -25,7 +25,7 @@
//
//
// $Id: G4ComptonScattering.hh,v 1.20 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//------------------ G4ComptonScattering physics process -----------------------
// by Michel Maire, April 1996
@@ -25,7 +25,7 @@
//
//
// $Id: G4ComptonScattering52.hh,v 1.4 2007/05/16 14:00:56 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//------------------ G4ComptonScattering52 physics process -----------------------
// by Michel Maire, April 1996
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScattering.hh,v 1.8 2007/07/31 17:24:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4CoulombScattering.hh,v 1.11 2008/06/13 08:19:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -64,14 +64,17 @@ public:
virtual G4bool IsApplicable(const G4ParticleDefinition& p);
void SetThetaMin(G4double);
inline void SetThetaMin(G4double);
void SetThetaMax(G4double);
inline void SetThetaMax(G4double);
void SetQ2Max(G4double);
inline void SetQ2Max(G4double);
// Set energy above which high energy model will be used
inline void SetHEModelLimit(G4double);
// obsolete method to be removed
void SetBuildTableFlag(G4bool);
inline void SetBuildTableFlag(G4bool);
// Print out of the class parameters
virtual void PrintInfo();
@@ -131,6 +134,14 @@ inline void G4CoulombScattering::SetQ2Max(G4double val)
inline void G4CoulombScattering::SetBuildTableFlag(G4bool)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4CoulombScattering::SetHEModelLimit(G4double val)
{
thEnergy = val;
thEnergyElec = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScatteringModel.hh,v 1.11 2007/10/09 08:16:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4CoulombScatteringModel.hh,v 1.15 2008/07/31 13:11:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -43,6 +43,7 @@
// 08.08.06 V.Ivanchenko build internal table in ekin scale, introduce faclim
// 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
//
// Class Description:
//
@@ -63,17 +64,12 @@
#include "G4eCoulombScatteringModel.hh"
#include "globals.hh"
class G4ParticleTable;
class G4NistManager;
class G4CoulombScatteringModel : public G4eCoulombScatteringModel
{
public:
G4CoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi,
G4bool build = false, G4double tlim = TeV*TeV,
const G4String& nam = "CoulombScattering");
G4CoulombScatteringModel(const G4String& nam = "CoulombScattering");
virtual ~G4CoulombScatteringModel();
@@ -93,14 +89,10 @@ public:
private:
G4double SelectIsotope(const G4Element*);
// hide assignment operator
G4CoulombScatteringModel & operator=(const G4CoulombScatteringModel &right);
G4CoulombScatteringModel(const G4CoulombScatteringModel&);
G4ParticleTable* theParticleTable;
const G4NistManager* theMatManager;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -25,7 +25,7 @@
//
//
// $Id: G4GammaConversion.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------------ G4GammaConversion physics process------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4InitXscPAI.hh,v 1.8 2006/06/29 19:50:22 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4InitXscPAI.hh -- header file
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4IonFluctuations.hh,v 1.8 2008/10/22 16:04:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -40,6 +40,7 @@
// Modifications:
//
// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
// 01-06-08 Added initialisation of effective charge prestep (V.Ivanchenko)
//
// Class Description:
//
@@ -53,6 +54,8 @@
#include "G4VEmFluctuationModel.hh"
#include "G4ParticleDefinition.hh"
#include "G4UniversalFluctuation.hh"
class G4IonFluctuations : public G4VEmFluctuationModel
{
@@ -63,37 +66,44 @@ public:
virtual ~G4IonFluctuations();
// Sample fluctuations
G4double SampleFluctuations(const G4Material*,
const G4DynamicParticle*,
G4double&,
G4double&,
G4double&);
G4double& tmax,
G4double& length,
G4double& meanLoss);
G4double Dispersion( const G4Material*,
const G4DynamicParticle*,
G4double&,
G4double&);
// Compute dispertion
G4double Dispersion(const G4Material*,
const G4DynamicParticle*,
G4double& tmax,
G4double& length);
// Initialisation prerun
void InitialiseMe(const G4ParticleDefinition*);
// Initialisation prestep
inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
private:
G4double CoeffitientA(G4double&);
G4double CoeffitientB(const G4Material*, G4double&);
G4double RelativisticFactor(const G4Material*, G4double&);
G4double Factor(const G4Material*, G4double Zeff);
G4double RelativisticFactor(const G4Material*, G4double Zeff);
// hide assignment operator
G4IonFluctuations & operator=(const G4IonFluctuations &right);
G4IonFluctuations(const G4IonFluctuations&);
G4UniversalFluctuation uniFluct;
const G4ParticleDefinition* particle;
G4double particleMass;
G4double charge;
G4double chargeSquare;
G4double chargeSqRatio;
G4double effChargeSquare;
// data members to speed up the fluctuation calculation
G4double parameter;
G4double minNumberInteractionsBohr;
G4double theBohrBeta2;
G4double minFraction;
@@ -106,5 +116,21 @@ private:
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4IonFluctuations::SetParticleAndCharge(const G4ParticleDefinition* part,
G4double q2)
{
if(part != particle) {
particle = part;
particleMass = part->GetPDGMass();
charge = part->GetPDGCharge()/eplus;
chargeSquare = charge*charge;
}
effChargeSquare = q2;
uniFluct.SetParticleAndCharge(part, q2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4KleinNishinaCompton.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4MollerBhabhaModel.hh,v 1.19 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4MscModel71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering.hh,v 1.35 2007/05/18 18:43:32 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering.hh,v 1.36 2008/03/10 10:39:21 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
@@ -99,7 +99,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel;
class G4VMscModel;
class G4MultipleScattering : public G4VMultipleScattering
@@ -132,7 +132,7 @@ protected:
private: // data members
G4UrbanMscModel* mscUrban;
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------- G4MultipleScattering71 physics process --------------------------
@@ -57,8 +57,8 @@
//
//------------------------------------------------------------------------------
//
// $Id: G4MultipleScattering71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// class description
//
@@ -179,33 +179,6 @@ inline G4bool G4MultipleScattering71::IsApplicable (const G4ParticleDefinition&
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MultipleScattering71::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimalStep,
G4double&)
{
DefineMaterial(track.GetMaterialCutsCouple());
const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple();
G4double e = track.GetKineticEnergy();
model = dynamic_cast<G4MscModel71*>(SelectModel(e));
const G4ParticleDefinition* p = track.GetDefinition();
G4double lambda0 = GetLambda(p, e);
range = G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple);
if(range < currentMinimalStep) currentMinimalStep = range;
truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep);
// G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= "
// << lambda0 << " range= " << currentRange
// << " currentMinStep= " << currentMinimalStep << G4endl;
if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;
geomPathLength = model->GeomPathLength(LambdaTable(),couple,
p,e,lambda0,range,truePathLength);
if(geomPathLength > lambda0) geomPathLength = lambda0;
return geomPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4VParticleChange* G4MultipleScattering71::AlongStepDoIt(
const G4Track&,
const G4Step& step)
@@ -67,7 +67,7 @@ class G4PAIPhotonModel : public G4VEmModel, public G4VEmFluctuationModel
public:
G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAIPhoton");
virtual ~G4PAIPhotonModel();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PAIxSection.hh,v 1.12 2006/06/29 19:50:44 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PAIxSection.hh,v 1.15 2008/05/30 16:04:40 grichine Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4PAIxSection.hh -- header file
@@ -73,111 +73,142 @@ public:
G4PAIxSection( G4MaterialCutsCouple* matCC);
G4PAIxSection( G4int materialIndex,
G4double maxEnergyTransfer ) ;
G4double maxEnergyTransfer );
G4PAIxSection( G4int materialIndex, // for proton loss table
G4double maxEnergyTransfer,
G4double betaGammaSq ,
G4double** photoAbsCof, G4int intNumber ) ;
G4double** photoAbsCof, G4int intNumber );
G4PAIxSection( G4int materialIndex, // test constructor
G4double maxEnergyTransfer,
G4double betaGammaSq ) ;
G4double betaGammaSq );
// G4PAIxSection(const G4PAIxSection& right) ;
// G4PAIxSection(const G4PAIxSection& right);
// Destructor
~G4PAIxSection() ;
~G4PAIxSection();
// Operators
// G4PAIxSection& operator=(const G4PAIxSection& right) ;
// G4int operator==(const G4PAIxSection& right)const ;
// G4int operator!=(const G4PAIxSection& right)const ;
// G4PAIxSection& operator=(const G4PAIxSection& right);
// G4int operator==(const G4PAIxSection& right)const;
// G4int operator!=(const G4PAIxSection& right)const;
// Methods
// General control functions
void InitPAI() ;
void InitPAI();
void NormShift( G4double betaGammaSq ) ;
void NormShift( G4double betaGammaSq );
void SplainPAI( G4double betaGammaSq ) ;
void SplainPAI( G4double betaGammaSq );
// Physical methods
G4double RutherfordIntegral( G4int intervalNumber,
G4double limitLow,
G4double limitHigh ) ;
G4double limitHigh );
G4double ImPartDielectricConst( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double RePartDielectricConst(G4double energy) ;
G4double GetPhotonRange( G4double energy );
G4double GetElectronRange( G4double energy );
G4double RePartDielectricConst(G4double energy);
G4double DifPAIxSection( G4int intervalNumber,
G4double betaGammaSq ) ;
G4double betaGammaSq );
G4double PAIdNdxCerenkov( G4int intervalNumber,
G4double betaGammaSq ) ;
G4double betaGammaSq );
G4double PAIdNdxMM( G4int intervalNumber,
G4double betaGammaSq );
G4double PAIdNdxPlasmon( G4int intervalNumber,
G4double betaGammaSq ) ;
G4double betaGammaSq );
void IntegralPAIxSection() ;
void IntegralCerenkov() ;
void IntegralPlasmon() ;
G4double PAIdNdxResonance( G4int intervalNumber,
G4double betaGammaSq );
G4double SumOverInterval(G4int intervalNumber) ;
G4double SumOverIntervaldEdx(G4int intervalNumber) ;
G4double SumOverInterCerenkov(G4int intervalNumber) ;
G4double SumOverInterPlasmon(G4int intervalNumber) ;
void IntegralPAIxSection();
void IntegralCerenkov();
void IntegralMM();
void IntegralPlasmon();
void IntegralResonance();
G4double SumOverInterval(G4int intervalNumber);
G4double SumOverIntervaldEdx(G4int intervalNumber);
G4double SumOverInterCerenkov(G4int intervalNumber);
G4double SumOverInterMM(G4int intervalNumber);
G4double SumOverInterPlasmon(G4int intervalNumber);
G4double SumOverInterResonance(G4int intervalNumber);
G4double SumOverBorder( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBorderdEdx( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBordCerenkov( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBordMM( G4int intervalNumber,
G4double energy );
G4double SumOverBordPlasmon( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBordResonance( G4int intervalNumber,
G4double energy );
G4double GetStepEnergyLoss( G4double step ) ;
G4double GetStepCerenkovLoss( G4double step ) ;
G4double GetStepPlasmonLoss( G4double step ) ;
G4double GetStepEnergyLoss( G4double step );
G4double GetStepCerenkovLoss( G4double step );
G4double GetStepMMLoss( G4double step );
G4double GetStepPlasmonLoss( G4double step );
G4double GetStepResonanceLoss( G4double step );
G4double GetEnergyTransfer();
G4double GetCerenkovEnergyTransfer();
G4double GetMMEnergyTransfer();
G4double GetPlasmonEnergyTransfer();
G4double GetResonanceEnergyTransfer();
G4double GetRutherfordEnergyTransfer();
// Inline access functions
G4int GetNumberOfGammas() const { return fNumberOfGammas ; }
G4int GetNumberOfGammas() const { return fNumberOfGammas; }
G4int GetSplineSize() const { return fSplineNumber ; }
G4int GetSplineSize() const { return fSplineNumber; }
G4int GetIntervalNumber() const { return fIntervalNumber ; }
G4int GetIntervalNumber() const { return fIntervalNumber; }
G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i] ; }
G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; }
G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i] ; }
G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i] ; }
G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i] ; }
G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i]; }
G4double GetPAIdNdxCerenkov(G4int i){ return fdNdxCerenkov[i]; }
G4double GetPAIdNdxMM(G4int i){ return fdNdxMM[i]; }
G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; }
G4double GetPAIdNdxResonance(G4int i){ return fdNdxResonance[i]; }
G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0] ; }
G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0] ; }
G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0] ; }
G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0]; }
G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; }
G4double GetMeanMMLoss() const {return fIntegralMM[0]; }
G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; }
G4double GetMeanResonanceLoss() const {return fIntegralResonance[0]; }
G4double GetNormalizationCof() const { return fNormalizationCof ; }
G4double GetNormalizationCof() const { return fNormalizationCof; }
inline G4double GetPAItable(G4int i,G4int j) const ;
inline G4double GetPAItable(G4int i,G4int j) const;
inline G4double GetLorentzFactor(G4int i) const ;
inline G4double GetLorentzFactor(G4int i) const;
inline G4double GetSplineEnergy(G4int i) const ;
inline G4double GetSplineEnergy(G4int i) const;
inline G4double GetIntegralPAIxSection(G4int i) const ;
inline G4double GetIntegralPAIdEdx(G4int i) const ;
inline G4double GetIntegralCerenkov(G4int i) const ;
inline G4double GetIntegralPlasmon(G4int i) const ;
inline G4double GetIntegralPAIxSection(G4int i) const;
inline G4double GetIntegralPAIdEdx(G4int i) const;
inline G4double GetIntegralCerenkov(G4int i) const;
inline G4double GetIntegralMM(G4int i) const;
inline G4double GetIntegralPlasmon(G4int i) const;
inline G4double GetIntegralResonance(G4int i) const;
protected :
@@ -185,64 +216,69 @@ private :
// Local class constants
static const G4double fDelta ; // energy shift from interval border = 0.001
static const G4double fError ; // error in lin-log approximation = 0.005
static const G4double fDelta; // energy shift from interval border = 0.001
static const G4double fError; // error in lin-log approximation = 0.005
static G4int fNumberOfGammas ; // = 111 ;
static const G4double fLorentzFactor[112] ; // static gamma array
static G4int fNumberOfGammas; // = 111;
static const G4double fLorentzFactor[112]; // static gamma array
static
const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
G4int fIntervalNumber ; // The number of energy intervals
G4double fNormalizationCof ; // Normalization cof for PhotoAbsorptionXsection
G4int fIntervalNumber ; // The number of energy intervals
G4double fNormalizationCof; // Normalization cof for PhotoAbsorptionXsection
// G4double fBetaGammaSq ; // (beta*gamma)^2
// G4double fBetaGammaSq; // (beta*gamma)^2
G4double fDensity ; // Current density
G4double fElectronDensity ; // Current electron (number) density
G4int fSplineNumber ; // Current size of spline
G4int fMaterialIndex; // current material index
G4double fDensity; // Current density
G4double fElectronDensity; // Current electron (number) density
G4int fSplineNumber; // Current size of spline
// Arrays of Sandia coefficients
G4OrderedTable* fMatSandiaMatrix;
G4SandiaTable* fSandia;
G4double* fEnergyInterval ;
G4double* fA1 ;
G4double* fA2 ;
G4double* fA3 ;
G4double* fA4 ;
G4double* fEnergyInterval;
G4double* fA1;
G4double* fA2;
G4double* fA3;
G4double* fA4;
static
const G4int fMaxSplineSize ; // Max size of output splain arrays = 500
const G4int fMaxSplineSize ; // Max size of output splain arrays = 500
/* ******************
G4double* fSplineEnergy ; // energy points of splain
G4double* fRePartDielectricConst ; // Real part of dielectric const
G4double* fImPartDielectricConst ; // Imaginary part of dielectric const
G4double* fIntegralTerm ; // Integral term in PAI cross section
G4double* fDifPAIxSection ; // Differential PAI cross section
G4double* fIntegralPAIxSection ; // Integral PAI cross section ?
G4double* fSplineEnergy; // energy points of splain
G4double* fRePartDielectricConst; // Real part of dielectric const
G4double* fImPartDielectricConst; // Imaginary part of dielectric const
G4double* fIntegralTerm; // Integral term in PAI cross section
G4double* fDifPAIxSection; // Differential PAI cross section
G4double* fIntegralPAIxSection; // Integral PAI cross section ?
*/ ///////////////
G4double fSplineEnergy[500] ; // energy points of splain
G4double fRePartDielectricConst[500] ; // Real part of dielectric const
G4double fImPartDielectricConst[500] ; // Imaginary part of dielectric const
G4double fIntegralTerm[500] ; // Integral term in PAI cross section
G4double fDifPAIxSection[500] ; // Differential PAI cross section
G4double fdNdxCerenkov[500] ; // dNdx of Cerenkov collisions
G4double fdNdxPlasmon[500] ; // dNdx of Plasmon collisions
G4double fSplineEnergy[500]; // energy points of splain
G4double fRePartDielectricConst[500]; // Real part of dielectric const
G4double fImPartDielectricConst[500]; // Imaginary part of dielectric const
G4double fIntegralTerm[500]; // Integral term in PAI cross section
G4double fDifPAIxSection[500]; // Differential PAI cross section
G4double fdNdxCerenkov[500]; // dNdx of Cerenkov collisions
G4double fdNdxMM[500]; // dNdx of MM-Cerenkov collisions
G4double fdNdxPlasmon[500]; // dNdx of Plasmon collisions
G4double fdNdxResonance[500]; // dNdx of resonance collisions
G4double fIntegralPAIxSection[500] ; // Integral PAI cross section ?
G4double fIntegralPAIdEdx[500] ; // Integral PAI dEdx ?
G4double fIntegralCerenkov[500] ; // Integral Cerenkov N>omega ?
G4double fIntegralPlasmon[500] ; // Integral Plasmon N>omega ?
G4double fIntegralPAIxSection[500]; // Integral PAI cross section ?
G4double fIntegralPAIdEdx[500]; // Integral PAI dEdx ?
G4double fIntegralCerenkov[500]; // Integral Cerenkov N>omega ?
G4double fIntegralMM[500]; // Integral MM-Cerenkov N>omega ?
G4double fIntegralPlasmon[500]; // Integral Plasmon N>omega ?
G4double fIntegralResonance[500]; // Integral resonance N>omega ?
G4double fPAItable[500][112] ; // Output array
G4double fPAItable[500][112]; // Output array
} ;
};
//////////////// Inline methods //////////////////////////////////
//
@@ -250,12 +286,12 @@ G4double fPAItable[500][112] ; // Output array
inline G4double G4PAIxSection::GetPAItable(G4int i, G4int j) const
{
return fPAItable[i][j] ;
return fPAItable[i][j];
}
inline G4double G4PAIxSection::GetLorentzFactor(G4int j) const
{
return fLorentzFactor[j] ;
return fLorentzFactor[j];
}
inline G4double G4PAIxSection::GetSplineEnergy(G4int i) const
@@ -264,7 +300,7 @@ inline G4double G4PAIxSection::GetSplineEnergy(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetSplineEnergy");
}
return fSplineEnergy[i] ;
return fSplineEnergy[i];
}
inline G4double G4PAIxSection::GetIntegralPAIxSection(G4int i) const
@@ -273,7 +309,7 @@ inline G4double G4PAIxSection::GetIntegralPAIxSection(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection");
}
return fIntegralPAIxSection[i] ;
return fIntegralPAIxSection[i];
}
inline G4double G4PAIxSection::GetIntegralPAIdEdx(G4int i) const
@@ -282,7 +318,7 @@ inline G4double G4PAIxSection::GetIntegralPAIdEdx(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection");
}
return fIntegralPAIdEdx[i] ;
return fIntegralPAIdEdx[i];
}
inline G4double G4PAIxSection::GetIntegralCerenkov(G4int i) const
@@ -291,7 +327,16 @@ inline G4double G4PAIxSection::GetIntegralCerenkov(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralCerenkov");
}
return fIntegralCerenkov[i] ;
return fIntegralCerenkov[i];
}
inline G4double G4PAIxSection::GetIntegralMM(G4int i) const
{
if(i < 1 || i > fSplineNumber)
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralMM");
}
return fIntegralMM[i];
}
inline G4double G4PAIxSection::GetIntegralPlasmon(G4int i) const
@@ -300,7 +345,16 @@ inline G4double G4PAIxSection::GetIntegralPlasmon(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralPlasmon");
}
return fIntegralPlasmon[i] ;
return fIntegralPlasmon[i];
}
inline G4double G4PAIxSection::GetIntegralResonance(G4int i) const
{
if(i < 1 || i > fSplineNumber)
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralResonance");
}
return fIntegralResonance[i];
}
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4PAIySection.hh,v 1.1 2007/10/01 17:45:14 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4PAIySection.hh -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PSTARStopping.hh,v 1.4 2006/06/29 19:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PSTARStopping.hh,v 1.5 2008/11/13 12:04:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4PSTARStopping_h
#define G4PSTARStopping_h 1
@@ -84,7 +84,6 @@ private:
G4String name[74];
G4double currentE, res;
G4double e[74][60], kinE[60];
G4int Znum[74];
};
inline G4double G4PSTARStopping::GetElectronicDEDX(const G4Material* mat,
@@ -25,7 +25,7 @@
//
//
// $Id: G4PhotoElectricEffect.hh,v 1.24 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------------ G4PhotoElectricEffect physics process ------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4PolarizedComptonScattering.hh,v 1.9 2006/06/29 19:51:14 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// --------- G4PolarizedComptonScattering physics process ----------------------
// by Vicente Lara, March 1998
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UniversalFluctuation.hh,v 1.5 2007/04/03 11:08:36 urban Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UniversalFluctuation.hh,v 1.6 2008/10/22 16:04:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -58,6 +58,7 @@
#include "G4VEmFluctuationModel.hh"
#include "G4ParticleDefinition.hh"
class G4UniversalFluctuation : public G4VEmFluctuationModel
{
@@ -81,6 +82,9 @@ public:
void InitialiseMe(const G4ParticleDefinition*);
// Initialisation prestep
inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
protected:
private:
@@ -121,6 +125,19 @@ private:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void
G4UniversalFluctuation::SetParticleAndCharge(const G4ParticleDefinition* part,
G4double q2)
{
if(part != particle) {
particle = part;
particleMass = part->GetPDGMass();
}
chargeSquare = q2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel.hh,v 1.31 2007/10/29 08:42:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UrbanMscModel.hh,v 1.33 2008/03/10 10:39:21 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -90,7 +90,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VEmModel.hh"
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
@@ -100,20 +100,17 @@ class G4LossTableManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel : public G4VEmModel
class G4UrbanMscModel : public G4VMscModel
{
public:
G4UrbanMscModel(G4double facrange, G4double dtrl, G4double lambdalimit,
G4double facgeom,G4double skin,
G4bool samplez, G4MscStepLimitType stepAlg,
const G4String& nam = "UrbanMscUni");
G4UrbanMscModel(const G4String& nam = "UrbanMscUni");
virtual ~G4UrbanMscModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
G4double KineticEnergy,
G4double AtomicNumber,
@@ -141,16 +138,6 @@ public:
G4double ComputeTheta0(G4double truePathLength,
G4double KineticEnergy);
void SetStepLimitType(G4MscStepLimitType);
void SetLateralDisplasmentFlag(G4bool val);
void SetRangeFactor(G4double);
void SetGeomFactor(G4double);
void SetSkin(G4double);
private:
G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
@@ -159,11 +146,11 @@ private:
G4double LatCorrelation();
G4double GetLambda(G4double kinEnergy);
void GeomLimit(const G4Track& track);
void SetParticle(const G4ParticleDefinition* p);
inline G4double GetLambda(G4double kinEnergy);
inline void SetParticle(const G4ParticleDefinition*);
// hide assignment operator
G4UrbanMscModel & operator=(const G4UrbanMscModel &right);
@@ -177,7 +164,6 @@ private:
const G4MaterialCutsCouple* couple;
G4LossTableManager* theManager;
G4double mass;
G4double charge;
@@ -187,10 +173,6 @@ private:
G4double tausmall;
G4double taulim;
G4double currentTau;
G4double dtrl;
G4double lambdalimit;
G4double facrange;
G4double frscaling1,frscaling2;
G4double tlimit;
G4double tlimitmin;
@@ -200,21 +182,18 @@ private:
G4double geombig;
G4double geommin;
G4double geomlimit;
G4double facgeom;
G4double skin;
G4double skindepth;
G4double smallstep;
G4double presafety;
G4double facsafety;
G4double lambda0;
G4double lambdaeff;
G4double tPathLength;
G4double zPathLength;
G4double par1,par2,par3 ;
G4double par1,par2,par3;
G4double stepmin ;
G4double stepmin;
G4double currentKinEnergy;
G4double currentRange;
@@ -224,60 +203,12 @@ private:
G4int currentMaterialIndex;
G4MscStepLimitType steppingAlgorithm;
G4bool samplez;
G4bool latDisplasment;
G4bool isInitialized;
G4bool inside;
G4bool insideskin;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetLateralDisplasmentFlag(G4bool val)
{
latDisplasment = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetSkin(G4double val)
{
skin = val;
stepmin = tlimitminfix;
skindepth = skin*stepmin;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetRangeFactor(G4double val)
{
facrange = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetGeomFactor(G4double val)
{
facgeom = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetStepLimitType(G4MscStepLimitType val)
{
steppingAlgorithm = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
@@ -0,0 +1,238 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel2.hh,v 1.11 2008/12/18 13:01:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
//
// GEANT4 Class header file
//
//
// File name: G4UrbanMscModel2
//
// Author: Laszlo Urban
//
// Creation date: 06.03.2008
//
// Modifications:
//
//
//
// Class Description:
//
// Implementation of the model of multiple scattering based on
// H.W.Lewis Phys Rev 78 (1950) 526 and L.Urban model
// -------------------------------------------------------------------
//
#ifndef G4UrbanMscModel2_h
#define G4UrbanMscModel2_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
class G4ParticleChangeForMSC;
class G4SafetyHelper;
class G4LossTableManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel2 : public G4VMscModel
{
public:
G4UrbanMscModel2(const G4String& nam = "UrbanMscUni2");
virtual ~G4UrbanMscModel2();
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicWeight=0.,
G4double cut =0.,
G4double emax=DBL_MAX);
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double,
G4double);
void SampleScattering(const G4DynamicParticle*,
G4double safety);
G4double ComputeTruePathLengthLimit(const G4Track& track,
G4PhysicsTable* theLambdaTable,
G4double currentMinimalStep);
G4double ComputeGeomPathLength(G4double truePathLength);
G4double ComputeTrueStepLength(G4double geomStepLength);
G4double ComputeTheta0(G4double truePathLength,
G4double KineticEnergy);
private:
G4double SimpleScattering(G4double xmeanth, G4double x2meanth);
G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
G4double SampleDisplacement();
G4double LatCorrelation();
void GeomLimit(const G4Track& track);
inline G4double GetLambda(G4double kinEnergy);
inline void SetParticle(const G4ParticleDefinition*);
inline void UpdateCache();
// hide assignment operator
G4UrbanMscModel2 & operator=(const G4UrbanMscModel2 &right);
G4UrbanMscModel2(const G4UrbanMscModel2&);
const G4ParticleDefinition* particle;
G4ParticleChangeForMSC* fParticleChange;
G4SafetyHelper* safetyHelper;
G4PhysicsTable* theLambdaTable;
const G4MaterialCutsCouple* couple;
G4LossTableManager* theManager;
G4double mass;
G4double charge,ChargeSquare;
G4double masslimite,lambdalimit,fr;
G4double taubig;
G4double tausmall;
G4double taulim;
G4double currentTau;
G4double tlimit;
G4double tlimitmin;
G4double tlimitminfix;
G4double tgeom;
G4double geombig;
G4double geommin;
G4double geomlimit;
G4double skindepth;
G4double smallstep;
G4double presafety;
G4double lambda0;
G4double lambdaeff;
G4double tPathLength;
G4double zPathLength;
G4double par1,par2,par3;
G4double stepmin;
G4double currentKinEnergy;
G4double currentRange;
G4double rangeinit;
G4double currentRadLength;
G4double theta0max,rellossmax;
G4double third;
G4int currentMaterialIndex;
G4double y;
G4double Zold;
G4double Zeff,Z2,Z23,lnZ;
G4double coeffth1,coeffth2;
G4double coeffc1,coeffc2;
G4double scr1ini,scr2ini,scr1,scr2;
G4bool isInitialized;
G4bool inside;
G4bool insideskin;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4UrbanMscModel2::GetLambda(G4double e)
{
G4double x;
if(theLambdaTable) {
G4bool b;
x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
} else {
x = CrossSection(couple,particle,e);
}
if(x > DBL_MIN) x = 1./x;
else x = DBL_MAX;
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel2::SetParticle(const G4ParticleDefinition* p)
{
if (p != particle) {
particle = p;
mass = p->GetPDGMass();
charge = p->GetPDGCharge()/eplus;
ChargeSquare = charge*charge;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel2::UpdateCache()
{
lnZ = std::log(Zeff);
coeffth1 = 0.885+lnZ*(0.104-0.0170*lnZ);
coeffth2 = 0.028+lnZ*(0.012-0.00125*lnZ);
coeffc1 = 2.134-lnZ*(0.1045-0.00602*lnZ);
coeffc2 = 0.001126-lnZ*(0.0001089+0.0000247*lnZ);
Z2 = Zeff*Zeff;
Z23 = std::exp(2.*lnZ/3.);
scr1 = scr1ini*Z23;
scr2 = scr2ini*Z2*ChargeSquare;
// lastMaterial = couple->GetMaterial();
Zold = Zeff;
}
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel90.hh,v 1.1 2007/12/07 17:35:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UrbanMscModel90.hh,v 1.4 2008/10/29 14:15:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -54,7 +54,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VEmModel.hh"
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
@@ -64,19 +64,16 @@ class G4LossTableManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel90 : public G4VEmModel
class G4UrbanMscModel90 : public G4VMscModel
{
public:
G4UrbanMscModel90(G4double facrange, G4double dtrl, G4double lambdalimit,
G4double facgeom,G4double skin,
G4bool samplez, G4MscStepLimitType stepAlg,
const G4String& nam = "UrbanMscUni");
G4UrbanMscModel90(const G4String& nam = "UrbanMscUni90");
virtual ~G4UrbanMscModel90();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
G4double KineticEnergy,
@@ -105,16 +102,6 @@ public:
G4double ComputeTheta0(G4double truePathLength,
G4double KineticEnergy);
void SetStepLimitType(G4MscStepLimitType);
void SetLateralDisplasmentFlag(G4bool val);
void SetRangeFactor(G4double);
void SetGeomFactor(G4double);
void SetSkin(G4double);
private:
G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
@@ -123,11 +110,11 @@ private:
G4double LatCorrelation();
G4double GetLambda(G4double kinEnergy);
void GeomLimit(const G4Track& track);
void SetParticle(const G4ParticleDefinition* p);
inline G4double GetLambda(G4double kinEnergy);
inline void SetParticle(const G4ParticleDefinition*);
// hide assignment operator
G4UrbanMscModel90 & operator=(const G4UrbanMscModel90 &right);
@@ -141,7 +128,6 @@ private:
const G4MaterialCutsCouple* couple;
G4LossTableManager* theManager;
G4double mass;
G4double charge;
@@ -151,10 +137,6 @@ private:
G4double tausmall;
G4double taulim;
G4double currentTau;
G4double dtrl;
G4double lambdalimit;
G4double facrange;
G4double frscaling1,frscaling2;
G4double tlimit;
G4double tlimitmin;
@@ -164,21 +146,18 @@ private:
G4double geombig;
G4double geommin;
G4double geomlimit;
G4double facgeom;
G4double skin;
G4double skindepth;
G4double smallstep;
G4double presafety;
G4double facsafety;
G4double lambda0;
G4double lambdaeff;
G4double tPathLength;
G4double zPathLength;
G4double par1,par2,par3 ;
G4double par1,par2,par3;
G4double stepmin ;
G4double stepmin;
G4double currentKinEnergy;
G4double currentRange;
@@ -188,60 +167,12 @@ private:
G4int currentMaterialIndex;
G4MscStepLimitType steppingAlgorithm;
G4bool samplez;
G4bool latDisplasment;
G4bool isInitialized;
G4bool inside;
G4bool insideskin;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetLateralDisplasmentFlag(G4bool val)
{
latDisplasment = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetSkin(G4double val)
{
skin = val;
stepmin = tlimitminfix;
skindepth = skin*stepmin;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetRangeFactor(G4double val)
{
facrange = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetGeomFactor(G4double val)
{
facgeom = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetStepLimitType(G4MscStepLimitType val)
{
steppingAlgorithm = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WaterStopping.hh,v 1.2 2006/06/29 19:51:56 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WaterStopping.hh,v 1.6 2008/09/09 09:30:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4WaterStopping_h
#define G4WaterStopping_h 1
@@ -59,7 +59,7 @@ class G4WaterStopping
{
public:
G4WaterStopping(G4EmCorrections* corr = 0);
G4WaterStopping(G4EmCorrections* corr = 0, G4bool splineFlag = true);
~G4WaterStopping();
@@ -69,12 +69,15 @@ private:
void Initialise(G4EmCorrections*);
void AddData(G4double* energy, G4double* stoppower, G4double factor);
// hide assignment operator
G4WaterStopping & operator=(const G4WaterStopping &right);
G4WaterStopping(const G4WaterStopping&);
G4int Z[8];
G4int A[8];
G4bool spline;
G4int Z[16];
G4double A[16];
std::vector<G4LPhysicsFreeVector*> dedx;
};
@@ -0,0 +1,309 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WentzelVIModel.hh,v 1.7 2008/08/04 08:49:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
//
// GEANT4 Class header file
//
//
// File name: G4WentzelVIModel
//
// Author: V.Ivanchenko
//
// Creation date: 09.04.2008 from G4MuMscModel
//
// Modifications:
//
//
// Class Description:
//
// Implementation of the model of multiple scattering based on
// G.Wentzel, Z. Phys. 40 (1927) 590.
// H.W.Lewis, Phys Rev 78 (1950) 526.
// J.M. Fernandez-Varea et al., NIM B73 (1993) 447.
// L.Urban, CERN-OPEN-2006-077.
// -------------------------------------------------------------------
//
#ifndef G4WentzelVIModel_h
#define G4WentzelVIModel_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4NistManager.hh"
class G4LossTableManager;
class G4ParticleChangeForMSC;
class G4SafetyHelper;
class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4WentzelVIModel : public G4VMscModel
{
public:
G4WentzelVIModel(const G4String& nam = "WentzelVIUni");
virtual ~G4WentzelVIModel();
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicWeight=0.,
G4double cut = DBL_MAX,
G4double emax= DBL_MAX);
void SampleScattering(const G4DynamicParticle*, G4double safety);
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double,
G4double);
G4double ComputeTruePathLengthLimit(const G4Track& track,
G4PhysicsTable* theLambdaTable,
G4double currentMinimalStep);
G4double ComputeGeomPathLength(G4double truePathLength);
G4double ComputeTrueStepLength(G4double geomStepLength);
private:
G4double ComputeTransportXSectionPerVolume();
G4double ComputeXSectionPerVolume();
void ComputeMaxElectronScattering(G4double cut);
inline G4double GetLambda(G4double kinEnergy);
inline void SetupParticle(const G4ParticleDefinition*);
inline void SetupKinematic(G4double kinEnergy, G4double cut);
inline void SetupTarget(G4double Z, G4double kinEnergy);
inline void DefineMaterial(const G4MaterialCutsCouple*);
// hide assignment operator
G4WentzelVIModel & operator=(const G4WentzelVIModel &right);
G4WentzelVIModel(const G4WentzelVIModel&);
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* thePositron;
G4ParticleChangeForMSC* fParticleChange;
G4SafetyHelper* safetyHelper;
G4PhysicsTable* theLambdaTable;
G4PhysicsTable* theLambda2Table;
G4LossTableManager* theManager;
const G4DataVector* currentCuts;
G4NistManager* fNistManager;
G4double numlimit;
G4double tlimitminfix;
G4double invsqrt12;
// cash
G4double preKinEnergy;
G4double ecut;
G4double lambda0;
G4double tPathLength;
G4double zPathLength;
G4double lambdaeff;
G4double currentRange;
G4double par1;
G4double par2;
G4double par3;
G4double xtsec;
std::vector<G4double> xsecn;
std::vector<G4double> prob;
G4int nelments;
G4int nbins;
G4int nwarnings;
G4int nwarnlimit;
G4int currentMaterialIndex;
const G4MaterialCutsCouple* currentCouple;
const G4Material* currentMaterial;
// single scattering parameters
G4double coeff;
G4double constn;
G4double cosThetaMin;
G4double cosThetaMax;
G4double cosTetMaxNuc;
G4double cosTetMaxNuc2;
G4double cosTetMaxElec;
G4double cosTetMaxElec2;
G4double q2Limit;
G4double alpha2;
G4double a0;
// projectile
const G4ParticleDefinition* particle;
G4double chargeSquare;
G4double spin;
G4double mass;
G4double tkin;
G4double mom2;
G4double invbeta2;
G4double etag;
G4double lowEnergyLimit;
// target
G4double targetZ;
G4double screenZ;
G4double formfactA;
G4double FF[100];
// flags
G4bool isInitialized;
G4bool inside;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4WentzelVIModel::DefineMaterial(const G4MaterialCutsCouple* cup)
{
if(cup != currentCouple) {
currentCouple = cup;
currentMaterial = cup->GetMaterial();
currentMaterialIndex = currentCouple->GetIndex();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4WentzelVIModel::GetLambda(G4double e)
{
G4double x;
if(theLambdaTable) {
G4bool b;
x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
} else {
x = CrossSection(currentCouple,particle,e,
(*currentCuts)[currentMaterialIndex]);
}
if(x > DBL_MIN) x = 1./x;
else x = DBL_MAX;
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4WentzelVIModel::SetupParticle(const G4ParticleDefinition* p)
{
// Initialise mass and charge
if(p != particle) {
particle = p;
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
tkin = 0.0;
lowEnergyLimit = keV*mass/electron_mass_c2;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4WentzelVIModel::SetupKinematic(G4double ekin, G4double cut)
{
if(ekin != tkin || ecut != cut) {
tkin = ekin;
mom2 = tkin*(tkin + 2.0*mass);
invbeta2 = 1.0 + mass*mass/mom2;
cosTetMaxNuc = cosThetaMax;
if(ekin <= 10.*cut && mass < MeV) {
cosTetMaxNuc = ekin*(cosThetaMax + 1.0)/(10.*cut) - 1.0;
}
ComputeMaxElectronScattering(cut);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4WentzelVIModel::SetupTarget(G4double Z, G4double e)
{
if(Z != targetZ || e != etag) {
etag = e;
targetZ = Z;
G4int iz= G4int(Z);
if(iz > 99) iz = 99;
G4double x = fNistManager->GetZ13(iz);
screenZ = a0*x*x/mom2;
if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2);
// screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2;
// A.V. Butkevich et al., NIM A 488 (2002) 282
formfactA = FF[iz];
if(formfactA == 0.0) {
x = fNistManager->GetA27(iz);
formfactA = constn*x*x;
FF[iz] = formfactA;
}
formfactA *= mom2;
cosTetMaxNuc2 = cosTetMaxNuc;
/*
G4double ee = 10.*eV*Z;
if(1 == iz) ee *= 2.0;
G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2
*fNistManager->GetAtomicMassAmu(iz)/mom2);
cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);
*/
cosTetMaxElec2 = cosTetMaxElec;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eBremsstrahlung.hh,v 1.36 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungModel.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eBremsstrahlungModel.hh,v 1.25 2008/11/13 19:28:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -68,7 +68,7 @@ class G4eBremsstrahlungModel : public G4VEmModel
public:
G4eBremsstrahlungModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "StandBrem");
const G4String& nam = "eBrem");
virtual ~G4eBremsstrahlungModel();
@@ -100,12 +100,6 @@ public:
G4double tmin,
G4double maxEnergy);
inline void SetLPMflag(G4bool val);
inline G4bool LPMflag() const;
inline void SetEnergyThreshold(G4double val);
inline G4double EnergyThreshold() const;
protected:
inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
@@ -153,8 +147,6 @@ private:
G4double probsup;
G4double MigdalConstant;
G4double LPMconstant;
G4double highEnergyTh;
G4bool theLPMflag;
G4bool isInitialised;
std::vector<G4DataVector*> partialSumSigma;
@@ -208,36 +200,4 @@ G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eBremsstrahlungModel::SetLPMflag(G4bool val)
{
theLPMflag = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4bool G4eBremsstrahlungModel::LPMflag() const
{
return theLPMflag;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eBremsstrahlungModel::SetEnergyThreshold(G4double val)
{
highEnergyTh = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungModel::EnergyThreshold() const
{
return highEnergyTh;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,265 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungRelModel.hh,v 1.10 2008/11/14 09:25:19 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4eBremsstrahlungRelModel
// extention of standard G4eBremsstrahlungModel
//
// Author: Andreas Schaelicke
//
// Creation date: 28.03.2008
//
// Modifications:
//
//
// Class Description:
//
// Implementation of energy loss for gamma emission by electrons and
// positrons including an improved version of the LPM effect
// -------------------------------------------------------------------
//
#ifndef G4eBremsstrahlungRelModel_h
#define G4eBremsstrahlungRelModel_h 1
#include "G4VEmModel.hh"
#include "G4NistManager.hh"
class G4ParticleChangeForLoss;
class G4PhysicsVector;
class G4eBremsstrahlungRelModel : public G4VEmModel
{
public:
G4eBremsstrahlungRelModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "eBremRel");
virtual ~G4eBremsstrahlungRelModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple*);
virtual G4double ComputeDEDXPerVolume(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double tkin,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy = DBL_MAX);
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double cutEnergy,
G4double maxEnergy);
virtual void SetupForMaterial(const G4ParticleDefinition*,
const G4Material*,G4double);
inline void SetLPMconstant(G4double val);
inline G4double LPMconstant() const;
protected:
inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy);
private:
void InitialiseConstants();
void CalcLPMFunctions(G4double gammaEnergy);
G4double ComputeBremLoss(G4double cutEnergy);
G4double ComputeXSectionPerAtom(G4double cutEnergy);
G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
G4double ComputeRelDXSectionPerAtom(G4double gammaEnergy);
void SetParticle(const G4ParticleDefinition* p);
// * fast inline functions *
inline void SetCurrentElement(const G4double);
inline G4double Phi1(G4double,G4double);
inline G4double Phi1M2(G4double,G4double);
inline G4double Psi1(G4double,G4double);
inline G4double Psi1M2(G4double,G4double);
// hide assignment operator
G4eBremsstrahlungRelModel & operator=(const G4eBremsstrahlungRelModel &right);
G4eBremsstrahlungRelModel(const G4eBremsstrahlungRelModel&);
protected:
G4NistManager* nist;
const G4ParticleDefinition* particle;
G4ParticleDefinition* theGamma;
G4ParticleChangeForLoss* fParticleChange;
static const G4double xgi[8], wgi[8];
static const G4double Fel_light[5];
static const G4double Finel_light[5];
G4double minThreshold;
// cash
G4double particleMass;
G4double kinEnergy;
G4double totalEnergy;
G4double currentZ;
G4double z13, z23, lnZ;
G4double Fel, Finel, fCoulomb, fMax;
G4double densityFactor;
G4double densityCorr;
// LPM effect
G4double lpmEnergy;
G4PhysicsVector *fXiLPM, *fPhiLPM, *fGLPM;
G4double xiLPM, phiLPM, gLPM;
// critical gamma energies
G4double klpm, kp;
G4bool isElectron;
private:
// consts
G4double highKinEnergy;
G4double lowKinEnergy;
G4double fMigdalConstant;
G4double fLPMconstant;
G4double bremFactor;
G4double energyThresholdLPM;
G4double facFel, facFinel;
G4double preS1,logTwo;
G4bool use_completescreening;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4eBremsstrahlungRelModel::SetCurrentElement(const G4double Z)
{
if(Z != currentZ) {
currentZ = Z;
G4int iz = G4int(Z);
z13 = nist->GetZ13(iz);
z23 = z13*z13;
lnZ = nist->GetLOGZ(iz);
if (iz <= 4) {
Fel = Fel_light[iz];
Finel = Finel_light[iz] ;
}
else {
Fel = facFel - lnZ/3. ;
Finel = facFinel - 2.*lnZ/3. ;
}
fCoulomb=GetCurrentElement()->GetfCoulomb();
fMax = Fel-fCoulomb + Finel/currentZ + (1.+1./currentZ)/12.;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4eBremsstrahlungRelModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy)
{
return kineticEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungRelModel::Phi1(G4double gg, G4double)
{
// Thomas-Fermi FF from Tsai, eq.(3.38) for Z>=5
return 20.863 - 2.*std::log(1. + sqr(0.55846*gg) )
- 4.*( 1. - 0.6*std::exp(-0.9*gg) - 0.4*std::exp(-1.5*gg) );
}
inline G4double G4eBremsstrahlungRelModel::Phi1M2(G4double gg, G4double)
{
// Thomas-Fermi FF from Tsai, eq. (3.39) for Z>=5
// return Phi1(gg,Z) -
return 2./(3.*(1. + 6.5*gg +6.*gg*gg) );
}
inline G4double G4eBremsstrahlungRelModel::Psi1(G4double eps, G4double)
{
// Thomas-Fermi FF from Tsai, eq.(3.40) for Z>=5
return 28.340 - 2.*std::log(1. + sqr(3.621*eps) )
- 4.*( 1. - 0.7*std::exp(-8*eps) - 0.3*std::exp(-29.*eps) );
}
inline G4double G4eBremsstrahlungRelModel::Psi1M2(G4double eps, G4double)
{
// Thomas-Fermi FF from Tsai, eq. (3.41) for Z>=5
return 2./(3.*(1. + 40.*eps +400.*eps*eps) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eBremsstrahlungRelModel::SetLPMconstant(G4double val)
{
fLPMconstant = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungRelModel::LPMconstant() const
{
return fLPMconstant;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eCoulombScatteringModel.hh,v 1.20 2007/10/24 10:42:05 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eCoulombScatteringModel.hh,v 1.36 2008/08/04 08:49:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,6 +44,7 @@
// 19.08.06 V.Ivanchenko add inline function ScreeningParameter and
// make some members protected
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion
//
// Class Description:
//
@@ -74,9 +75,7 @@ class G4eCoulombScatteringModel : public G4VEmModel
public:
G4eCoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi,
G4bool build = false, G4double tlim = TeV*TeV,
const G4String& nam = "eCoulombScattering");
G4eCoulombScatteringModel(const G4String& nam = "eCoulombScattering");
virtual ~G4eCoulombScatteringModel();
@@ -96,48 +95,57 @@ public:
G4double tmin,
G4double maxEnergy);
inline void SetRecoilThreshold(G4double eth);
protected:
G4double ComputeElectronXSectionPerAtom(
const G4ParticleDefinition*,
G4double kinEnergy,
G4double Z,
G4double A,
G4double cut);
G4double CrossSectionPerAtom();
virtual G4double CalculateCrossSectionPerAtom(
const G4ParticleDefinition*,
G4double kinEnergy,
G4double Z, G4double A);
G4double SampleCosineTheta();
inline void DefineMaterial(const G4MaterialCutsCouple*);
inline void SetupParticle(const G4ParticleDefinition*);
inline void SetupKinematic(G4double kinEnergy);
inline void SetupKinematic(G4double kinEnergy, G4double cut);
inline void SetupTarget(G4double Z, G4double A, G4double kinEnergy);
inline void SetupTarget(G4double Z, G4double kinEnergy);
private:
void ComputeMaxElectronScattering(G4double cut);
// hide assignment operator
G4eCoulombScatteringModel & operator=(const G4eCoulombScatteringModel &right);
G4eCoulombScatteringModel(const G4eCoulombScatteringModel&);
protected:
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* thePositron;
G4ParticleTable* theParticleTable;
G4ParticleChangeForGamma* fParticleChange;
G4NistManager* fNistManager;
const G4DataVector* currentCuts;
const G4MaterialCutsCouple* currentCouple;
const G4Material* currentMaterial;
const G4Element* currentElement;
G4int currentMaterialIndex;
G4double coeff;
G4double constn;
G4double cosThetaMin;
G4double cosThetaMax;
G4double cosTetMinNuc;
G4double cosTetMaxNuc;
G4double cosTetMaxNuc2;
G4double cosTetMaxElec;
G4double cosTetMaxElec2;
G4double q2Limit;
G4double recoilThreshold;
G4double elecXSection;
G4double nucXSection;
G4double ecut;
@@ -151,33 +159,39 @@ protected:
G4double tkin;
G4double mom2;
G4double invbeta2;
G4double etag;
G4double lowEnergyLimit;
// target
G4double targetZ;
G4double targetA;
G4double screenZ;
G4double formfactA;
G4int idxelm;
private:
G4PhysicsTable* theCrossSectionTable;
G4double a0;
G4double lowKEnergy;
G4double highKEnergy;
G4double alpha2;
G4double faclim;
G4double FF[100];
G4int nbins;
G4int nmax;
G4int index[100];
G4bool buildTable;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eCoulombScatteringModel::DefineMaterial(const G4MaterialCutsCouple* cup)
{
if(cup != currentCouple) {
currentCouple = cup;
currentMaterial = cup->GetMaterial();
currentMaterialIndex = currentCouple->GetIndex();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eCoulombScatteringModel::SetupParticle(const G4ParticleDefinition* p)
{
@@ -189,40 +203,71 @@ void G4eCoulombScatteringModel::SetupParticle(const G4ParticleDefinition* p)
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
tkin = 0.0;
lowEnergyLimit = keV*mass/electron_mass_c2;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin)
inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin,
G4double cut)
{
if(ekin != tkin) {
tkin = ekin;
mom2 = tkin*(tkin + 2.0*mass);
if(ekin != tkin || ecut != cut) {
tkin = ekin;
mom2 = tkin*(tkin + 2.0*mass);
invbeta2 = 1.0 + mass*mass/mom2;
}
cosTetMinNuc = cosThetaMin;
cosTetMaxNuc = cosThetaMax;
if(ekin <= 10.*cut && mass < MeV && cosThetaMin < 1.0) {
cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0;
}
ComputeMaxElectronScattering(cut);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double A,
G4double e)
inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e)
{
if(e != tkin || Z != targetZ || A != targetA) {
if(Z != targetZ || e != etag) {
etag = e;
targetZ = Z;
targetA = A;
SetupKinematic(e);
cosTetMaxNuc = std::max(cosThetaMax, 1.0 - 0.5*q2Limit/mom2);
G4double x = fNistManager->GetZ13(Z);
screenZ = a0*x*x*(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2)/mom2;
if(particle == theProton && A < 1.5 && cosTetMaxNuc < 0.0)
cosTetMaxNuc = 0.0;
G4int iz= G4int(Z);
if(iz > 99) iz = 99;
G4double x = fNistManager->GetZ13(iz);
screenZ = a0*x*x/mom2;
if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2);
//screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2;
// A.V. Butkevich et al., NIM A 488 (2002) 282
x = fNistManager->GetLOGA(A);
formfactA = mom2*constn*std::exp(0.54*x);
formfactA = FF[iz];
if(formfactA == 0.0) {
x = fNistManager->GetA27(iz);
formfactA = constn*x*x;
FF[iz] = formfactA;
}
formfactA *= mom2;
cosTetMaxNuc2 = cosTetMaxNuc;
if(particle == theProton && 1 == iz && cosTetMaxNuc2 < 0.0) {
cosTetMaxNuc2 = 0.0;
}
/*
G4double ee = 10.*eV*Z;
if(1 == iz) ee *= 2.0;
G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2
*fNistManager->GetAtomicMassAmu(iz)/mom2);
cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);
*/
cosTetMaxElec2 = cosTetMaxElec;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4eCoulombScatteringModel::SetRecoilThreshold(G4double eth)
{
recoilThreshold = eth;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eIonisation.hh,v 1.35 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eMultipleScattering.hh,v 1.2 2008/03/11 12:03:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
// GEANT4 Class header file
//
// File name: G4eMultipleScattering
//
// Author: Vladimir Ivanchenko
//
// Creation date: 10 March 2001
//
// Modifications:
//
//
//------------------------------------------------------------------------------
//
// class description
//
// The class simulates the multiple scattering for e+ and e-
//
// class description - end
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4eMultipleScattering_h
#define G4eMultipleScattering_h 1
#include "G4VMultipleScattering.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4VMscModel;
class G4eMultipleScattering : public G4VMultipleScattering
{
public: // with description
G4eMultipleScattering(const G4String& processName="msc");
virtual ~G4eMultipleScattering();
// returns true for charged particles, false otherwise
G4bool IsApplicable (const G4ParticleDefinition& p);
// Print few lines of informations about the process: validity range,
void PrintInfo();
// geom. step length distribution should be sampled or not
void Setsamplez(G4bool value) { samplez = value;};
// to reduce the energy/step dependence
void Setdtrl(G4double value) { dtrl = value;};
// 'soften' step limitation above lambdalimit
void SetLambdalimit(G4double value) { lambdalimit = value;};
protected:
// This function initialise models
void InitialiseProcess(const G4ParticleDefinition*);
private: // data members
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
G4bool samplez;
G4bool isInitialized;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eeToTwoGammaModel.hh,v 1.14 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eplusAnnihilation.hh,v 1.23 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hIonisation.hh,v 1.37 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hIonisation.hh,v 1.41 2008/09/14 17:11:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -62,6 +62,7 @@
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
// 12-09-08 Removed CorrectionsAlongStep (VI)
//
// Class Description:
//
@@ -79,8 +80,6 @@
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
#include "G4VEmModel.hh"
#include "G4EmCorrections.hh"
class G4Material;
@@ -101,13 +100,9 @@ public:
// Print out of the class parameters
virtual void PrintInfo();
protected:
void ActivateNuclearStopping(G4bool);
void CorrectionsAlongStep(
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& length);
protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*);
@@ -118,18 +113,12 @@ private:
G4hIonisation & operator=(const G4hIonisation &right);
G4hIonisation(const G4hIonisation&);
G4bool isInitialised;
G4bool nuclearStopping;
G4double mass;
G4double ratio;
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4EmCorrections* corr;
G4bool isInitialised;
G4double eth;
G4double massratio;
G4double eth;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -148,23 +137,15 @@ inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double y = electron_mass_c2/mass;
G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y));
G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4hIonisation::CorrectionsAlongStep(
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double& s)
inline void G4hIonisation::ActivateNuclearStopping(G4bool val)
{
G4double kinEnergy = dp->GetKineticEnergy();
if(eloss < kinEnergy && kinEnergy*massratio < eth)
eloss += s*corr->NuclearDEDX(theParticle,couple->GetMaterial(),
kinEnergy - eloss*0.5);
nuclearStopping = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hMultipleScattering.hh,v 1.4 2007/12/07 17:35:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hMultipleScattering.hh,v 1.6 2008/05/09 08:23:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
@@ -59,7 +59,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel90;
class G4VMscModel;
class G4hMultipleScattering : public G4VMultipleScattering
@@ -85,6 +85,16 @@ public: // with description
// 'soften' step limitation above lambdalimit
void SetLambdalimit(G4double value) { lambdalimit = value;};
// The function overloads the corresponding function of the base
// class.It limits the step near to boundaries only
// and invokes the method GetMscContinuousStepLimit at every step.
G4double AlongStepGetPhysicalInteractionLength(
const G4Track&,
G4double previousStepSize,
G4double currentMinimalStep,
G4double& currentSafety,
G4GPILSelection* selection);
protected:
// This function initialise models
@@ -92,13 +102,14 @@ protected:
private: // data members
G4UrbanMscModel90* mscUrban;
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
G4bool samplez;
G4bool isInitialized;
G4bool isIon;
};
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionGasIonisation.hh,v 1.2 2007/08/13 06:13:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ionGasIonisation.hh,v 1.4 2008/09/12 16:26:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -54,8 +54,6 @@
#include "G4ionIonisation.hh"
class G4Material;
class G4ionGasIonisation : public G4ionIonisation
{
public:
@@ -64,47 +62,11 @@ public:
virtual ~G4ionGasIonisation();
virtual void PrintInfo();
protected:
// Initialise process before run
virtual void InitialiseEnergyLossProcess(
const G4ParticleDefinition*,
const G4ParticleDefinition*);
// Initialise dynamic charge before step
virtual void InitialiseMassCharge(const G4Track&);
// Apply correction after step and modify dynamic charge
virtual void CorrectionsAlongStep(
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& length);
private:
// Sample change of charge of the projectile ion
G4double SampleChargeAfterStep(G4double qeff, G4double xeff);
// hide assignment operator
G4ionGasIonisation & operator=(const G4ionGasIonisation &right);
G4ionGasIonisation(const G4ionGasIonisation&);
const G4ParticleDefinition* currParticle;
const G4ParticleDefinition* baseParticle;
G4double basePartMass;
G4double currMassRatio;
G4double atomXS;
G4double preStepKinEnergy;
G4int currentIonZ;
G4int ionZ;
G4bool initialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionIonisation.hh,v 1.50 2007/11/09 11:45:45 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ionIonisation.hh,v 1.56 2008/09/14 17:11:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -56,6 +56,7 @@
// 10-05-06 Add a possibility to download user data (V.Ivantchenko)
// 22-07-06 Remove obsolete method (V.Ivantchenko)
// 07-11-07 Moved CorrectionsAlongStep to cc (V.Ivantchenko)
// 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI)
//
// Class Description:
//
@@ -71,13 +72,9 @@
#define G4ionIonisation_h 1
#include "G4VEnergyLossProcess.hh"
#include "G4ionEffectiveCharge.hh"
#include "G4VEmModel.hh"
#include "G4EmCorrections.hh"
class G4Material;
class G4PhysicsVector;
class G4BraggIonModel;
class G4EmCorrections;
class G4ionIonisation : public G4VEnergyLossProcess
{
@@ -93,7 +90,7 @@ public:
virtual void PrintInfo();
void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
G4PhysicsVector& dVector);
G4PhysicsVector* dVector);
void ActivateStoppingData(G4bool);
@@ -104,13 +101,6 @@ protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*);
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& length);
inline void InitialiseMassCharge(const G4Track&);
inline G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
@@ -118,33 +108,21 @@ protected:
inline G4bool NuclearStoppingFlag();
// protected pointers
G4ionEffectiveCharge* effCharge;
G4EmCorrections* corr;
private:
// hide assignment operator
G4ionIonisation & operator=(const G4ionIonisation &right);
G4ionIonisation(const G4ionIonisation&);
// cash
const G4Material* curMaterial;
const G4ParticleDefinition* curParticle;
G4EmCorrections* corr;
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4double preKinEnergy;
G4double eth;
G4double eth;
G4double baseMass;
G4double massRatio;
G4double massFactor;
G4double charge2;
G4bool isInitialised;
G4bool stopDataActive;
G4bool nuclearStopping;
G4bool isInitialised;
G4bool stopDataActive;
G4bool nuclearStopping;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -159,23 +137,10 @@ inline G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4ionIonisation::MinPrimaryEnergy(
const G4ParticleDefinition*, const G4Material*, G4double cut)
const G4ParticleDefinition* p, const G4Material*, G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double g = std::sqrt(1. + x);
return proton_mass_c2*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4ionIonisation::InitialiseMassCharge(const G4Track& track)
{
preKinEnergy = track.GetKineticEnergy();
massRatio = baseMass/track.GetDynamicParticle()->GetMass();
charge2 = effCharge->EffectiveChargeSquareRatio(track.GetDefinition(),
track.GetMaterial(),
preKinEnergy);
SetDynamicMassCharge(massRatio, charge2);
return
p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ASTARStopping.cc,v 1.6 2006/06/29 19:52:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ASTARStopping.cc,v 1.8 2008/11/24 18:28:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//---------------------------------------------------------------------------
//
@@ -52,6 +52,7 @@
G4ASTARStopping::G4ASTARStopping()
{
currentE = 0.0;
currentMaterial = 0;
index = 0;
matIndex = -1;
@@ -71,7 +72,7 @@ G4int G4ASTARStopping:: GetIndex (const G4Material* mat)
G4String matName = mat->GetName();
for (G4int i=0; i<74; i++){
if (matName == name[i]){
matIndex= -1;
matIndex = i;
currentMaterial = mat;
return i;
}
@@ -101,7 +102,7 @@ G4double G4ASTARStopping::GetElectronicDEDX(G4int i, G4double energy)
res = e[matIndex][0]*std::sqrt(energy/kinE[0]);
return res;
} else if (energy >= kinE[77]) {
index = 58;
index = 76;
res = e[matIndex][77];
return res;
}
@@ -133,9 +134,7 @@ G4double Z[74] = {
for(i=0; i<74; i++) {effZ[i]=Z[i];}
name [0] = "G4_A-150_TISSUE";
Znum [0] = 0;
name [0] = "G4_A-150_TISSUE";
G4double T0[78] = { 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03, 0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10 };
G4double e0[78] = { 168.8, 204.2, 233.8, 259.7, 283, 324.3, 360.4, 393, 422.8, 450.5, 476.5, 501, 557.1, 607.7, 654.1, 697.1, 737.4, 775.4, 811.5, 845.9, 910.3, 970, 1026, 1078, 1128, 1175, 1220, 1263, 1305, 1344, 1383, 1419, 1455, 1489, 1646, 1782, 1901, 2005, 2097, 2178, 2249, 2312, 2413, 2488, 2539, 2572, 2589, 2593, 2586, 2571, 2548, 2521, 2489, 2453, 2416, 2377, 2176, 1989, 1825, 1683, 1561, 1457, 1369, 1292, 1165, 1062, 978.5, 908.4, 848.8, 797.4, 752.4, 712.9, 677.7, 646.1, 617.7, 591.9, 568.4, 547 };
@@ -144,512 +143,366 @@ G4double e0[78] = { 168.8, 204.2, 233.8, 259.7, 283, 324.3, 360.4, 393, 422.8, 4
for(i=0; i<78; i++) {kinE[i]=T0[i];}
name [1] = "G4_ACETYLENE";
Znum [1] = 0;
G4double e1[78] = { 192.2, 229.4, 260.2, 287, 311, 353.1, 389.7, 422.5, 452.4, 480.1, 506, 530.3, 585.9, 635.7, 681.2, 723.2, 762.5, 799.4, 834.3, 867.5, 929.6, 986.9, 1040, 1090, 1137, 1182, 1224, 1265, 1304, 1341, 1376, 1411, 1444, 1475, 1619, 1741, 1847, 1938, 2017, 2085, 2144, 2195, 2275, 2331, 2367, 2388, 2397, 2395, 2386, 2370, 2350, 2326, 2299, 2271, 2241, 2210, 2056, 1913, 1783, 1666, 1562, 1468, 1384, 1308, 1177, 1072, 986.8, 915.5, 855, 802.8, 757.2, 717.1, 681.4, 649.5, 620.7, 594.7, 570.9, 549.2 };
for(i=0; i<78; i++) {e[1][i]=e1[i]*MeV*cm2/g;}
name [2] = "G4_ADIPOSE_TISSUE_ICRP";
Znum [2] = 0;
G4double e2[78] = { 169.4, 204.2, 233.3, 258.8, 281.8, 322.4, 358.1, 390.2, 419.7, 447.2, 472.9, 497.2, 552.9, 603.2, 649.4, 692.4, 732.7, 770.7, 806.8, 841.3, 906, 966.1, 1022, 1075, 1125, 1173, 1219, 1262, 1304, 1344, 1383, 1420, 1456, 1491, 1650, 1787, 1907, 2012, 2104, 2185, 2256, 2317, 2417, 2489, 2539, 2571, 2588, 2592, 2587, 2573, 2554, 2529, 2500, 2468, 2434, 2398, 2213, 2035, 1874, 1731, 1605, 1499, 1408, 1328, 1197, 1091, 1004, 932.2, 870.7, 817.8, 771.5, 730.8, 694.5, 662.1, 632.9, 606.4, 582.3, 560.2 };
for(i=0; i<78; i++) {e[2][i]=e2[i]*MeV*cm2/g;}
name [3] = "G4_Ag";
Znum [3] = 47;
G4double e3[78] = { 31.26, 38.13, 43.91, 48.98, 53.56, 61.66, 68.79, 75.21, 81.11, 86.6, 91.74, 96.6, 107.7, 117.8, 127, 135.6, 143.6, 151.2, 158.4, 165.3, 178.2, 190.2, 201.4, 212, 222, 231.6, 240.7, 249.5, 257.9, 266, 273.9, 281.4, 288.8, 295.9, 328.8, 357.8, 383.8, 407.4, 428.8, 448.4, 466.3, 482.8, 511.8, 536.2, 556.6, 573.5, 587.3, 598.4, 607.2, 613.8, 618.5, 621.6, 623.4, 623.8, 623.3, 621.8, 604.4, 578.7, 550.8, 523.3, 497.6, 474.4, 453.6, 435, 402.7, 375.9, 353.2, 333.6, 316.9, 302, 288.8, 276.9, 266.2, 256.5, 247.7, 239.5, 232, 225.1 };
for(i=0; i<78; i++) {e[3][i]=e3[i]*MeV*cm2/g;}
name [4] = "G4_AIR";
Znum [4] = 0;
G4double e4[78] = { 87.5, 108.6, 126.7, 142.7, 157.3, 183.5, 206.7, 227.9, 247.5, 265.9, 283.2, 299.6, 337.7, 372.3, 404.3, 434.3, 462.6, 489.4, 515, 539.5, 585.8, 629, 669.6, 708.1, 744.8, 779.8, 813.4, 845.7, 876.8, 906.8, 935.9, 964, 991.3, 1018, 1140, 1247, 1343, 1429, 1506, 1575, 1637, 1693, 1787, 1861, 1918, 1961, 1990, 2008, 2017, 2019, 2013, 2002, 1987, 1968, 1946, 1922, 1774, 1625, 1494, 1382, 1287, 1205, 1133, 1072, 968.6, 885.9, 818, 760.7, 711.7, 669.6, 632.7, 600.2, 571.2, 545.3, 521.9, 500.6, 481.2, 463.4 };
for(i=0; i<78; i++) {e[4][i]=e4[i]*MeV*cm2/g;}
name [5] = "G4_Al";
Znum [5] = 13;
G4double e5[78] = { 55.8, 71.89, 86.05, 98.92, 110.9, 132.7, 152.5, 170.9, 188.2, 204.5, 220.1, 235.1, 270.1, 302.5, 332.8, 361.5, 388.6, 414.6, 439.4, 463.3, 508.4, 550.4, 589.6, 626.5, 661.1, 693.7, 724.3, 753.2, 780.3, 805.9, 830.1, 852.8, 874.3, 894.5, 980, 1045, 1096, 1136, 1168, 1195, 1216, 1234, 1262, 1280, 1291, 1297, 1298, 1297, 1293, 1286, 1279, 1269, 1259, 1248, 1237, 1225, 1161, 1098, 1039, 984.9, 937.6, 895.4, 856.8, 821, 756.1, 698.6, 647.8, 604.8, 567.8, 535.7, 507.4, 482.4, 460, 439.8, 421.6, 405.1, 389.9, 376 };
for(i=0; i<78; i++) {e[5][i]=e5[i]*MeV*cm2/g;}
name [6] = "G4_ALUMINUM_OXIDE";
Znum [6] = 0;
G4double e6[78] = { 71.39, 88.59, 103.3, 116.4, 128.4, 149.9, 169, 186.5, 202.8, 218, 232.3, 246, 277.7, 306.6, 333.4, 358.5, 382.1, 404.6, 426, 446.5, 485, 520.9, 554.3, 585.8, 615.5, 643.5, 670, 695.2, 719.1, 741.9, 763.6, 784.3, 804, 822.9, 905.9, 974, 1031, 1080, 1122, 1159, 1191, 1220, 1267, 1304, 1332, 1353, 1368, 1378, 1383, 1385, 1384, 1381, 1376, 1370, 1362, 1352, 1308, 1253, 1187, 1115, 1044, 982.5, 928.4, 880, 801.2, 737, 683.4, 638.1, 599.1, 565.2, 535.4, 508.9, 485.3, 464, 444.8, 427.3, 411.4, 396.7 };
for(i=0; i<78; i++) {e[6][i]=e6[i]*MeV*cm2/g;}
name [7] = "G4_Ar";
Znum [7] = 40;
G4double e7[78] = { 34.54, 44.56, 53.39, 61.42, 68.88, 82.53, 94.95, 106.5, 117.3, 127.6, 137.4, 146.8, 168.8, 189.3, 208.5, 226.7, 244.1, 260.8, 276.8, 292.3, 321.9, 349.8, 376.5, 401.9, 426.4, 450, 472.8, 494.9, 516.3, 537.1, 557.3, 577, 596.1, 614.8, 702.1, 780.3, 850.8, 914.4, 971.9, 1024, 1070, 1111, 1181, 1233, 1272, 1298, 1314, 1321, 1321, 1315, 1305, 1291, 1276, 1258, 1240, 1222, 1130, 1047, 974, 911.2, 856.7, 809, 767, 729.8, 666.1, 613.2, 569.7, 532.7, 501, 473.4, 449.1, 427.4, 408.3, 391, 375.4, 361.1, 348.1, 336 };
for(i=0; i<78; i++) {e[7][i]=e7[i]*MeV*cm2/g;}
name [8] = "G4_Au";
Znum [8] = 79;
G4double e8[78] = { 11.5, 14.55, 17.2, 19.57, 21.76, 25.72, 29.27, 32.54, 35.59, 38.46, 41.18, 43.78, 49.83, 55.39, 60.56, 65.44, 70.06, 74.46, 78.68, 82.74, 90.45, 97.69, 104.5, 111.1, 117.3, 123.3, 129.1, 134.6, 140, 145.2, 150.3, 155.2, 160, 164.7, 186.4, 205.8, 223.5, 239.5, 254.2, 267.7, 280.1, 291.5, 311.6, 328.5, 342.6, 354.3, 363.8, 371.5, 377.5, 382.1, 385.5, 387.8, 389.1, 389.6, 389.4, 388.7, 384.4, 375.7, 362.6, 346.8, 330.5, 316.4, 304, 293, 274.1, 258.4, 245, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.5, 179.7, 174.5, 169.6, 165 };
for(i=0; i<78; i++) {e[8][i]=e8[i]*MeV*cm2/g;}
name [9] = "G4_B-100_BONE";
Znum [9] = 0;
G4double e9[78] = { 138.6, 167.7, 192, 213.3, 232.4, 266.3, 296, 322.7, 347.2, 369.9, 391.2, 411.3, 457.3, 498.8, 536.8, 572, 605, 636.1, 665.7, 693.8, 746.5, 795.4, 841, 883.9, 924.5, 963.1, 999.9, 1035, 1069, 1101, 1133, 1163, 1192, 1220, 1348, 1460, 1557, 1643, 1719, 1786, 1845, 1897, 1983, 2047, 2093, 2124, 2142, 2149, 2148, 2139, 2125, 2106, 2084, 2059, 2031, 2003, 1861, 1726, 1600, 1484, 1379, 1290, 1214, 1147, 1035, 945.3, 871.8, 810, 757.7, 712.5, 672.9, 638.1, 607, 579.2, 554.1, 531.3, 510.5, 491.5 };
for(i=0; i<78; i++) {e[9][i]=e9[i]*MeV*cm2/g;}
name [10] = "G4_Be";
Znum [10] = 4;
G4double e10[78] = { 146.3, 177.1, 202.9, 225.4, 245.6, 281.3, 312.5, 340.6, 366.2, 390, 412.2, 433.2, 481.1, 524.1, 563.3, 599.7, 633.6, 665.4, 695.6, 724.2, 777.7, 827, 872.7, 915.5, 955.7, 993.7, 1030, 1064, 1096, 1128, 1157, 1186, 1213, 1239, 1356, 1453, 1534, 1602, 1659, 1706, 1745, 1776, 1821, 1846, 1856, 1855, 1845, 1829, 1809, 1785, 1759, 1732, 1703, 1674, 1645, 1617, 1499, 1406, 1326, 1254, 1189, 1129, 1075, 1024, 935.3, 858.7, 792.9, 737.6, 690, 648.7, 612.5, 580.4, 552, 526.4, 503.3, 482.4, 463.3, 445.8 };
for(i=0; i<78; i++) {e[10][i]=e10[i]*MeV*cm2/g;}
name [11] = "G4_BONE_COMPACT_ICRU";
Znum [11] = 0;
G4double e11[78] = { 125.9, 152.6, 175, 194.8, 212.5, 244.1, 271.8, 296.8, 319.8, 341.1, 361.2, 380.2, 423.8, 463.1, 499.3, 533, 564.6, 594.5, 622.8, 649.9, 700.8, 748.1, 792.4, 834.2, 873.7, 911.4, 947.4, 981.9, 1015, 1047, 1078, 1107, 1136, 1164, 1291, 1401, 1498, 1584, 1660, 1727, 1787, 1839, 1926, 1991, 2039, 2072, 2092, 2103, 2105, 2100, 2089, 2075, 2056, 2035, 2011, 1986, 1846, 1705, 1576, 1460, 1358, 1271, 1196, 1130, 1020, 931.6, 859.4, 798.8, 747.4, 702.9, 664, 629.7, 599.1, 571.7, 547.1, 524.7, 504.3, 485.6 };
for(i=0; i<78; i++) {e[11][i]=e11[i]*MeV*cm2/g;}
name [12] = "G4_C";
Znum [12] = 6;
G4double e12[78] = { 190.6, 225.6, 254.3, 279, 300.9, 339.2, 372.1, 401.4, 427.9, 452.3, 475, 496.2, 544.3, 586.9, 625.5, 661, 693.8, 724.6, 753.5, 780.8, 831.5, 877.9, 920.8, 960.6, 998, 1033, 1066, 1098, 1128, 1156, 1184, 1210, 1235, 1259, 1366, 1455, 1531, 1595, 1650, 1698, 1738, 1772, 1825, 1862, 1886, 1900, 1906, 1906, 1901, 1892, 1880, 1866, 1850, 1833, 1814, 1795, 1684, 1571, 1466, 1372, 1288, 1213, 1145, 1085, 981.9, 898.2, 829.6, 772, 722.9, 680.4, 643.1, 610.2, 580.8, 554.4, 530.6, 509, 489.2, 471.2 };
for(i=0; i<78; i++) {e[12][i]=e12[i]*MeV*cm2/g;}
name [13] = "G4_C_Graphite";
Znum [13] = 0;
G4double e13[78] = { 192.3, 228.9, 259, 285.1, 308.3, 348.9, 384, 415.3, 443.7, 469.9, 494.2, 517, 568.9, 615.1, 657, 695.5, 731.3, 764.8, 796.3, 826.2, 881.8, 932.7, 979.8, 1024, 1065, 1104, 1141, 1175, 1209, 1240, 1271, 1300, 1327, 1354, 1473, 1574, 1658, 1731, 1793, 1845, 1890, 1929, 1987, 2027, 2051, 2063, 2065, 2060, 2049, 2034, 2015, 1993, 1969, 1944, 1917, 1891, 1751, 1620, 1502, 1400, 1310, 1231, 1161, 1099, 994.3, 909, 839.2, 780.7, 730.8, 687.6, 649.8, 616.4, 586.6, 559.8, 535.7, 513.8, 493.8, 475.5 };
for(i=0; i<78; i++) {e[13][i]=e13[i]*MeV*cm2/g;}
name [14] = "G4_ETHYLENE";
Znum [14] = 0;
G4double e14[78] = { 159.8, 195.8, 226, 252.7, 276.8, 319.7, 357.4, 391.5, 422.9, 452.1, 479.5, 505.4, 565.1, 619, 668.6, 714.8, 758.1, 799.1, 838.1, 875.3, 945.4, 1011, 1072, 1130, 1185, 1237, 1288, 1336, 1383, 1428, 1471, 1514, 1555, 1594, 1779, 1945, 2094, 2230, 2354, 2468, 2571, 2666, 2830, 2961, 3060, 3130, 3172, 3189, 3185, 3164, 3129, 3086, 3038, 2986, 2931, 2876, 2578, 2306, 2084, 1907, 1763, 1642, 1539, 1450, 1303, 1185, 1089, 1010, 941.9, 883.6, 832.8, 788.1, 748.4, 712.9, 680.9, 652, 625.7, 601.7 };
for(i=0; i<78; i++) {e[14][i]=e14[i]*MeV*cm2/g;}
name [15] = "G4_C-552";
Znum [15] = 0;
G4double e15[78] = { 124.1, 148.8, 169.3, 187.2, 203.3, 231.5, 256.1, 278.2, 298.4, 317.1, 334.5, 351, 388.6, 422.4, 453.2, 481.8, 508.4, 533.5, 557.3, 579.9, 622.2, 661.3, 697.8, 732, 764.3, 794.9, 824, 851.9, 878.5, 904.1, 928.7, 952.4, 975.2, 997.3, 1097, 1184, 1259, 1325, 1384, 1435, 1481, 1521, 1588, 1639, 1678, 1706, 1726, 1738, 1744, 1745, 1743, 1736, 1727, 1716, 1703, 1688, 1603, 1511, 1421, 1338, 1261, 1190, 1126, 1067, 965.5, 883.8, 816.4, 759.6, 711.1, 669.1, 632.3, 599.9, 571, 545, 521.6, 500.3, 480.9, 463.1 };
for(i=0; i<78; i++) {e[15][i]=e15[i]*MeV*cm2/g;}
name [16] = "G4_CARBON_DIOXIDE";
Znum [16] = 0;
G4double e16[78] = { 93.28, 114.2, 131.9, 147.5, 161.6, 186.6, 208.6, 228.5, 246.8, 263.8, 279.8, 295, 329.8, 361.2, 390.2, 417.1, 442.4, 466.4, 489.1, 510.8, 551.8, 589.8, 625.6, 659.4, 691.5, 722.2, 751.6, 779.8, 807.1, 833.4, 858.9, 883.7, 907.7, 931.1, 1040, 1137, 1225, 1306, 1380, 1449, 1513, 1571, 1676, 1763, 1834, 1891, 1933, 1961, 1977, 1982, 1978, 1967, 1952, 1932, 1911, 1888, 1752, 1614, 1490, 1383, 1290, 1209, 1139, 1077, 973.3, 890, 821.5, 764, 714.9, 672.6, 635.5, 602.6, 573.5, 547.3, 523.7, 502.4, 482.9, 465 };
for(i=0; i<78; i++) {e[16][i]=e16[i]*MeV*cm2/g;}
name [17] = "G4_CALCIUM_FLUORIDE";
Znum [17] = 0;
G4double e17[78] = { 72.78, 90.74, 106.1, 119.8, 132.3, 154.7, 174.6, 192.8, 209.7, 225.5, 240.4, 254.5, 287.2, 317, 344.6, 370.4, 394.6, 417.6, 439.5, 460.5, 499.9, 536.5, 570.8, 603.1, 633.6, 662.6, 690.1, 716.4, 741.5, 765.6, 788.6, 810.8, 832.1, 852.6, 944.4, 1022, 1088, 1145, 1194, 1237, 1275, 1308, 1361, 1401, 1431, 1453, 1467, 1476, 1481, 1481, 1479, 1474, 1466, 1458, 1447, 1436, 1352, 1256, 1166, 1086, 1016, 954.4, 900.2, 852.3, 772.1, 708.1, 655.5, 610.7, 573.3, 540.6, 511.9, 486.6, 464, 443.8, 425.4, 408.7, 393.4, 379.4 };
for(i=0; i<78; i++) {e[17][i]=e17[i]*MeV*cm2/g;}
name [18] = "G4_CERIC_SULFATE";
Znum [18] = 0;
G4double e18[78] = { 99.73, 123.7, 144.1, 162.3, 178.8, 208.3, 234.6, 258.5, 280.5, 301.2, 320.6, 339.1, 381.8, 420.6, 456.5, 490, 521.6, 551.5, 580.1, 607.4, 658.9, 707, 752.2, 795, 835.7, 874.6, 911.8, 947.6, 982, 1015, 1047, 1078, 1109, 1138, 1273, 1391, 1497, 1591, 1676, 1753, 1822, 1884, 1990, 2074, 2140, 2190, 2227, 2251, 2266, 2273, 2272, 2266, 2254, 2238, 2220, 2198, 2049, 1886, 1737, 1607, 1495, 1399, 1315, 1242, 1120, 1023, 942.8, 875.6, 818.4, 769.2, 726.1, 688, 654.2, 624, 596.7, 572, 549.5, 528.9 };
for(i=0; i<78; i++) {e[18][i]=e18[i]*MeV*cm2/g;}
name [19] = "G4_CELLULOSE_NITRATE";
Znum [19] = 0;
G4double e19[78] = { 157.6, 186.4, 209.9, 230.3, 248.3, 279.7, 306.8, 330.8, 352.6, 372.6, 391.2, 408.7, 448.1, 483.2, 514.9, 544.1, 571.1, 596.4, 620.3, 642.8, 684.8, 723.2, 758.8, 792, 823.2, 852.7, 880.6, 907.2, 932.6, 956.9, 980.2, 1003, 1024, 1045, 1139, 1220, 1290, 1353, 1408, 1457, 1502, 1541, 1608, 1662, 1704, 1736, 1761, 1778, 1789, 1796, 1798, 1796, 1790, 1782, 1772, 1760, 1674, 1574, 1476, 1385, 1302, 1227, 1160, 1099, 993.8, 909.3, 839.7, 781.1, 731.2, 688.1, 650.2, 616.7, 587, 560.3, 536.2, 514.4, 494.5, 476.2 };
for(i=0; i<78; i++) {e[19][i]=e19[i]*MeV*cm2/g;}
name [20] = "G4_BONE_CORTICAL_ICRP";
Znum [20] = 0;
G4double e20[78] = { 109.1, 132.8, 152.8, 170.4, 186.2, 214.4, 239.3, 261.7, 282.4, 301.6, 319.7, 336.8, 376.1, 411.7, 444.5, 475, 503.6, 530.7, 556.5, 581.1, 627.4, 670.4, 710.8, 748.9, 785, 819.4, 852.4, 883.9, 914.3, 943.5, 971.7, 999, 1025, 1051, 1168, 1270, 1360, 1440, 1511, 1574, 1630, 1680, 1763, 1826, 1872, 1905, 1927, 1939, 1943, 1941, 1933, 1921, 1905, 1887, 1866, 1844, 1720, 1593, 1475, 1369, 1274, 1193, 1123, 1062, 959.2, 877.1, 809.7, 753, 704.9, 663.4, 627, 594.9, 566.3, 540.6, 517.5, 496.5, 477.4, 459.8 };
for(i=0; i<78; i++) {e[20][i]=e20[i]*MeV*cm2/g;}
name [21] = "G4_CESIUM_IODIDE";
Znum [21] = 0;
G4double e21[78] = { 40.6, 48.54, 55.16, 60.95, 66.15, 75.33, 83.38, 90.64, 97.29, 103.5, 109.3, 114.8, 127.3, 138.7, 149.2, 158.9, 168, 176.7, 184.9, 192.8, 207.6, 221.3, 234.2, 246.4, 258, 269.1, 279.7, 289.9, 299.7, 309.2, 318.3, 327.1, 335.7, 344, 382.3, 415.8, 445.6, 472.1, 495.7, 516.7, 535.4, 551.8, 578.9, 599.2, 613.8, 623.8, 629.9, 633, 633.6, 632.3, 629.5, 625.5, 620.6, 615.1, 609.1, 602.8, 567.7, 533, 501.8, 474.4, 450.3, 429, 410.1, 393.3, 364.6, 340.9, 321, 304, 289.2, 275.9, 264.1, 253.6, 243.9, 235, 226.7, 218.9, 211.9, 205.4 };
for(i=0; i<78; i++) {e[21][i]=e21[i]*MeV*cm2/g;}
name [22] = "G4_Cu";
Znum [22] = 29;
G4double e22[78] = { 29.51, 36.49, 42.42, 47.68, 52.45, 60.98, 68.54, 75.4, 81.74, 87.65, 93.23, 98.51, 110.7, 121.8, 132, 141.5, 150.5, 159, 167.2, 174.9, 189.5, 203.2, 216, 228.1, 239.7, 250.7, 261.3, 271.4, 281.2, 290.7, 299.8, 308.7, 317.3, 325.6, 364.2, 398.4, 429.1, 456.8, 482.1, 505.1, 526.2, 545.4, 579, 607, 630.1, 649.1, 664.4, 676.6, 686.2, 693.4, 698.8, 702.4, 704.6, 705.7, 705.7, 704.9, 692.5, 672.6, 650.3, 627.6, 606, 585.6, 566.3, 548, 514, 483.4, 455.8, 431, 408.4, 388, 369.6, 353.7, 339.1, 325.7, 313.4, 302, 291.7, 282.3 };
for(i=0; i<78; i++) {e[22][i]=e22[i]*MeV*cm2/g;}
name [23] = "G4_Fe";
Znum [23] = 26;
G4double e23[78] = { 54.06, 65.42, 74.91, 83.2, 90.66, 103.8, 115.3, 125.6, 135.1, 143.8, 152, 159.8, 177.4, 193.3, 207.8, 221.3, 233.9, 245.7, 256.9, 267.6, 287.7, 306.2, 323.5, 339.8, 355.2, 369.8, 383.8, 397.1, 410, 422.3, 434.2, 445.7, 456.9, 467.6, 517.1, 560.6, 599.4, 634.3, 665.9, 694.6, 720.8, 744.8, 786.6, 821.5, 850.4, 874.1, 893.1, 908.1, 919.6, 928, 933.6, 936.8, 938, 937.3, 935.1, 931.5, 899.9, 856.7, 810.9, 766.9, 727.3, 691.9, 660.2, 631.5, 581.8, 540.1, 504.6, 473.9, 447.2, 423.6, 402.6, 383.5, 366.9, 352, 338.3, 325.7, 314.1, 303.6 };
for(i=0; i<78; i++) {e[23][i]=e23[i]*MeV*cm2/g;}
name [24] = "G4_FERROUS_SULFATE";
Znum [24] = 0;
G4double e24[78] = { 99.58, 123.5, 144, 162.1, 178.6, 208.1, 234.3, 258.2, 280.2, 300.8, 320.3, 338.7, 381.4, 420.2, 456, 489.5, 521, 551, 579.5, 606.8, 658.3, 706.3, 751.5, 794.2, 834.9, 873.7, 910.9, 946.6, 981, 1014, 1046, 1077, 1108, 1137, 1271, 1390, 1495, 1590, 1675, 1751, 1820, 1882, 1988, 2072, 2138, 2188, 2225, 2250, 2265, 2271, 2271, 2264, 2253, 2237, 2218, 2197, 2048, 1886, 1738, 1609, 1497, 1401, 1317, 1244, 1122, 1025, 944.6, 877.4, 820, 770.7, 727.5, 689.3, 655.4, 625.2, 597.8, 573.1, 550.5, 529.9 };
for(i=0; i<78; i++) {e[24][i]=e24[i]*MeV*cm2/g;}
name [25] = "G4_Gd";
Znum [25] = 64;
G4double e25[78] = { 38.11, 45.4, 51.41, 56.61, 61.25, 69.34, 76.36, 82.61, 88.29, 93.53, 98.41, 103, 113.4, 122.7, 131.1, 138.9, 146.1, 152.9, 159.3, 165.4, 176.7, 187.1, 196.8, 205.9, 214.4, 222.5, 230.3, 237.6, 244.7, 251.5, 258, 264.3, 270.3, 276.2, 303.1, 326.6, 347.4, 366.2, 383.1, 398.5, 412.5, 425.4, 447.8, 466.5, 482.1, 494.8, 505.1, 513.2, 519.4, 523.9, 526.9, 528.6, 529.1, 528.6, 527.3, 525.2, 505.6, 481, 456.8, 434.6, 414.6, 396.6, 380.5, 366, 340.9, 319.7, 301.6, 285.8, 272, 259.8, 248.8, 239, 230.1, 222, 214.6, 207.7, 201.4, 195.6 };
for(i=0; i<78; i++) {e[25][i]=e25[i]*MeV*cm2/g;}
name [26] = "G4_Ge";
Znum [26] = 32;
G4double e26[78] = { 47.65, 57.57, 65.83, 73.05, 79.53, 90.94, 100.9, 109.9, 118, 125.6, 132.7, 139.4, 154.6, 168.3, 180.8, 192.3, 203.1, 213.3, 222.9, 232, 249.1, 264.8, 279.5, 293.2, 306.1, 318.4, 330, 341.1, 351.7, 361.8, 371.5, 380.8, 389.8, 398.4, 437.2, 469.9, 497.8, 521.7, 542.3, 560.1, 575.5, 588.9, 610.7, 627.4, 640.1, 649.9, 657.3, 662.8, 666.8, 669.6, 671.4, 672.3, 672.4, 671.9, 670.9, 669.4, 656.9, 639.5, 619.8, 599.4, 578.4, 557.6, 537.5, 518.5, 483.6, 452.9, 425.8, 401.8, 380.5, 361.5, 344.3, 328.6, 315.1, 303.1, 292.1, 282, 272.6, 263.8 };
for(i=0; i<78; i++) {e[26][i]=e26[i]*MeV*cm2/g;}
name [27] = "G4_Pyrex_Glass";
Znum [27] = 0;
G4double e27[78] = { 83.85, 102.1, 117.5, 131, 143.3, 165, 184.1, 201.3, 217.2, 232, 245.9, 259, 289.2, 316.5, 341.5, 364.8, 386.7, 407.4, 427.1, 445.8, 481.1, 513.8, 544.4, 573.2, 600.6, 626.6, 651.5, 675.3, 698.1, 720.1, 741.3, 761.7, 781.5, 800.6, 888, 963.9, 1031, 1090, 1142, 1189, 1231, 1268, 1330, 1378, 1414, 1441, 1460, 1473, 1481, 1485, 1484, 1481, 1475, 1466, 1456, 1445, 1389, 1323, 1249, 1171, 1095, 1029, 971.4, 920.7, 835.9, 768, 711.5, 663.8, 622.8, 587.4, 556.1, 528.4, 503.7, 481.5, 461.4, 443.2, 426.5, 411.2 };
for(i=0; i<78; i++) {e[27][i]=e27[i]*MeV*cm2/g;}
name [28] = "G4_H";
Znum [28] = 1;
G4double e28[78] = { 212, 275.4, 331.7, 383, 430.9, 518.8, 599.2, 674, 744.5, 811.5, 875.6, 937.1, 1082, 1217, 1344, 1465, 1580, 1691, 1798, 1901, 2098, 2285, 2463, 2634, 2798, 2956, 3108, 3256, 3399, 3538, 3674, 3805, 3933, 4058, 4637, 5152, 5610, 6019, 6383, 6705, 6988, 7235, 7632, 7915, 8100, 8203, 8240, 8222, 8161, 8067, 7947, 7808, 7655, 7494, 7327, 7157, 6345, 5647, 5068, 4588, 4188, 3860, 3585, 3351, 2971, 2675, 2438, 2242, 2078, 1939, 1818, 1713, 1620, 1538, 1464, 1398, 1337, 1283 };
for(i=0; i<78; i++) {e[28][i]=e28[i]*MeV*cm2/g;}
name [29] = "G4_HELIUM";
Znum [29] = 2;
G4double e29[78] = { 87.26, 110.8, 131.3, 149.8, 166.8, 197.7, 225.5, 251.1, 275, 297.5, 318.9, 339.4, 387, 430.9, 471.8, 510.4, 547, 581.9, 615.3, 647.5, 708.7, 766.1, 820.5, 872.3, 921.8, 969.3, 1015, 1059, 1102, 1143, 1183, 1221, 1259, 1296, 1465, 1614, 1748, 1867, 1975, 2071, 2156, 2233, 2361, 2460, 2535, 2588, 2624, 2644, 2652, 2650, 2639, 2621, 2598, 2571, 2540, 2507, 2323, 2139, 1976, 1832, 1706, 1593, 1493, 1402, 1249, 1130, 1033, 953.8, 886.8, 829.5, 779.8, 736.4, 697.9, 663.7, 632.9, 605.2, 580, 557 };
for(i=0; i<78; i++) {e[29][i]=e29[i]*MeV*cm2/g;}
name [30] = "G4_KAPTON";
Znum [30] = 0;
G4double e30[78] = { 165.5, 197.6, 224.2, 247.2, 267.8, 304, 335.4, 363.5, 389.1, 412.8, 434.8, 455.6, 502.9, 545.2, 583.8, 619.4, 652.6, 683.8, 713.3, 741.2, 793.5, 841.6, 886.3, 928.2, 967.7, 1005, 1041, 1074, 1107, 1138, 1167, 1196, 1223, 1250, 1369, 1471, 1560, 1636, 1703, 1762, 1812, 1857, 1928, 1981, 2018, 2042, 2056, 2062, 2061, 2054, 2043, 2028, 2010, 1990, 1969, 1946, 1819, 1688, 1565, 1451, 1350, 1264, 1190, 1125, 1017, 929.8, 858.3, 798.2, 747, 702.8, 664, 629.8, 599.3, 571.9, 547.2, 524.8, 504.4, 485.7 };
for(i=0; i<78; i++) {e[30][i]=e30[i]*MeV*cm2/g;}
name [31] = "G4_Kr";
Znum [31] = 36;
G4double e31[78] = { 10.15, 13.69, 16.93, 19.96, 22.84, 28.23, 33.29, 38.08, 42.66, 47.08, 51.35, 55.5, 65.43, 74.84, 83.85, 92.52, 100.9, 109.1, 117, 124.7, 139.7, 154.1, 168, 181.5, 194.6, 207.4, 219.9, 232.1, 244, 255.7, 267.2, 278.4, 289.5, 300.3, 351.9, 399.6, 443.7, 484.4, 522.1, 556.7, 588.4, 617.2, 666.6, 705.7, 735.5, 757, 771.4, 779.9, 783.4, 783, 779.4, 773.6, 765.9, 757, 747.2, 736.9, 683.7, 635.6, 595.2, 561.5, 533, 508.6, 487.3, 468.5, 439.9, 417.9, 398.8, 381.4, 364.9, 349.2, 334.2, 319.8, 306.2, 293.7, 282.8, 272.8, 263.6, 255.2 };
for(i=0; i<78; i++) {e[31][i]=e31[i]*MeV*cm2/g;}
name [32] = "G4_LITHIUM_TETRABORATE";
Znum [32] = 0;
G4double e32[78] = { 132.7, 159.4, 181.6, 200.9, 218.2, 248.6, 275, 298.7, 320.4, 340.4, 359.1, 376.6, 416.8, 452.7, 485.5, 515.8, 544, 570.6, 595.8, 619.7, 664.3, 705.6, 743.9, 779.9, 813.9, 846.1, 876.8, 906.1, 934.2, 961.1, 987, 1012, 1036, 1059, 1166, 1258, 1338, 1410, 1474, 1531, 1583, 1628, 1706, 1767, 1814, 1849, 1874, 1891, 1899, 1902, 1899, 1891, 1875, 1852, 1825, 1795, 1638, 1494, 1375, 1276, 1193, 1121, 1058, 1002, 908.8, 833.2, 770.5, 717.6, 672.4, 633.2, 598.8, 568.3, 541.2, 516.9, 494.8, 474.9, 456.6, 439.9 };
for(i=0; i<78; i++) {e[32][i]=e32[i]*MeV*cm2/g;}
name [33] = "G4_LITHIUM_FLUORIDE";
Znum [33] = 0;
G4double e33[78] = { 118.7, 142.6, 162.5, 179.7, 195.2, 222.4, 246, 267.2, 286.5, 304.3, 321, 336.6, 372.4, 404.4, 433.5, 460.4, 485.5, 509.1, 531.4, 552.6, 592.1, 628.5, 662.4, 694.1, 724.1, 752.4, 779.4, 805.1, 829.6, 853.2, 875.9, 897.6, 918.7, 938.9, 1031, 1110, 1179, 1240, 1294, 1341, 1383, 1421, 1483, 1530, 1566, 1592, 1610, 1621, 1627, 1627, 1624, 1618, 1609, 1598, 1585, 1571, 1483, 1387, 1296, 1214, 1140, 1074, 1015, 962.2, 872, 799.7, 739.5, 688.5, 644.8, 606.9, 573.7, 544.4, 518.3, 494.9, 473.6, 454.3, 436.7, 420.6 };
for(i=0; i<78; i++) {e[33][i]=e33[i]*MeV*cm2/g;}
name [34] = "G4_M3_WAX";
Znum [34] = 0;
G4double e34[78] = { 173.6, 209, 238.5, 264.3, 287.6, 328.7, 364.7, 397.1, 426.9, 454.5, 480.4, 504.9, 561, 611.6, 658, 701.1, 741.6, 779.8, 816, 850.6, 915.4, 975.6, 1032, 1085, 1135, 1182, 1228, 1271, 1313, 1353, 1392, 1429, 1465, 1499, 1657, 1792, 1910, 2012, 2101, 2179, 2247, 2305, 2398, 2463, 2507, 2533, 2544, 2544, 2534, 2517, 2494, 2468, 2437, 2405, 2371, 2335, 2154, 1981, 1825, 1686, 1564, 1460, 1372, 1295, 1167, 1064, 980.4, 910.2, 850.4, 798.9, 753.8, 714.2, 678.9, 647.3, 618.8, 593, 569.4, 547.9 };
for(i=0; i<78; i++) {e[34][i]=e34[i]*MeV*cm2/g;}
name [35] = "G4_MS20_TISSUE";
Znum [35] = 0;
G4double e35[78] = { 163.5, 196.6, 224.1, 248.2, 269.8, 308, 341.4, 371.4, 398.9, 424.4, 448.3, 470.9, 522.5, 569, 611.6, 651.1, 688, 722.9, 756, 787.5, 846.6, 901.2, 952.3, 1000, 1046, 1089, 1130, 1169, 1207, 1243, 1278, 1311, 1344, 1375, 1516, 1638, 1744, 1836, 1916, 1986, 2048, 2101, 2185, 2247, 2288, 2314, 2327, 2330, 2325, 2312, 2295, 2273, 2249, 2222, 2193, 2163, 2002, 1845, 1703, 1575, 1463, 1368, 1286, 1215, 1097, 1001, 923.2, 857.7, 802, 753.9, 711.7, 674.6, 641.6, 611.9, 585.2, 561, 539, 518.8 };
for(i=0; i<78; i++) {e[35][i]=e35[i]*MeV*cm2/g;}
name [36] = "G4_METHANE";
Znum [36] = 0;
G4double e36[78] = { 197.5, 241.8, 279.3, 312.2, 342, 394.9, 441.5, 483.7, 522.4, 558.5, 592.4, 624.4, 698.1, 764.8, 826, 883.1, 936.6, 987.3, 1035, 1081, 1168, 1249, 1324, 1396, 1464, 1529, 1591, 1650, 1708, 1764, 1818, 1870, 1920, 1970, 2198, 2402, 2586, 2754, 2907, 3047, 3175, 3291, 3492, 3652, 3773, 3856, 3905, 3921, 3899, 3849, 3783, 3708, 3627, 3544, 3460, 3378, 2998, 2685, 2432, 2226, 2055, 1911, 1789, 1683, 1508, 1370, 1257, 1163, 1084, 1015, 955.9, 903.7, 857.5, 816.2, 779.1, 745.5, 714.9, 687.1 };
for(i=0; i<78; i++) {e[36][i]=e36[i]*MeV*cm2/g;}
name [37] = "G4_Mo";
Znum [37] = 42;
G4double e37[78] = { 58.22, 68.98, 77.79, 85.4, 92.16, 103.9, 114.1, 123.1, 131.3, 138.8, 145.8, 152.4, 167.3, 180.5, 192.5, 203.5, 213.8, 223.4, 232.4, 241, 256.9, 271.6, 285.1, 297.8, 309.8, 321.1, 331.8, 342.1, 351.9, 361.3, 370.3, 379, 387.4, 395.5, 432.4, 464.5, 492.9, 518.2, 541, 561.6, 580.4, 597.4, 626.9, 651.2, 671.2, 687.3, 700.1, 710, 717.3, 722.3, 725.4, 726.7, 726.5, 725, 722.3, 718.8, 690.9, 655, 617.8, 582.6, 552.1, 525.7, 502.3, 481.5, 445.5, 415.5, 389.9, 367.7, 348.1, 330.6, 314.8, 300.9, 288.6, 277.3, 266.9, 257.6, 249, 241.2 };
for(i=0; i<78; i++) {e[37][i]=e37[i]*MeV*cm2/g;}
name [38] = "G4_MUSCLE_WITH_SUCROSE";
Znum [38] = 0;
G4double e38[78] = { 111.7, 137.5, 159.4, 178.8, 196.5, 227.9, 255.7, 281, 304.4, 326.2, 346.7, 366.2, 411.2, 452, 489.7, 525, 558.1, 589.5, 619.5, 648.1, 702.2, 752.5, 799.9, 844.6, 887.2, 927.9, 966.8, 1004, 1040, 1075, 1108, 1141, 1172, 1203, 1343, 1467, 1576, 1674, 1762, 1841, 1912, 1975, 2081, 2165, 2230, 2277, 2310, 2331, 2342, 2344, 2339, 2329, 2313, 2293, 2270, 2244, 2074, 1896, 1739, 1607, 1494, 1398, 1314, 1241, 1120, 1022, 942.4, 875.3, 818.1, 768.9, 725.8, 687.7, 653.9, 623.7, 596.4, 571.7, 549.2, 528.6 };
for(i=0; i<78; i++) {e[38][i]=e38[i]*MeV*cm2/g;}
name [39] = "G4_MUSCLE_WITHOUT_SUCROSE";
Znum [39] = 0;
G4double e39[78] = { 108.2, 133.5, 155, 174.1, 191.4, 222.4, 249.8, 274.8, 297.8, 319.3, 339.6, 358.9, 403.3, 443.7, 481, 515.9, 548.7, 579.8, 609.5, 637.9, 691.4, 741.4, 788.3, 832.7, 875, 915.3, 953.9, 991.1, 1027, 1061, 1095, 1127, 1158, 1189, 1328, 1451, 1560, 1658, 1745, 1824, 1895, 1958, 2065, 2150, 2215, 2263, 2298, 2320, 2332, 2335, 2331, 2321, 2306, 2287, 2265, 2240, 2075, 1901, 1746, 1613, 1501, 1404, 1320, 1247, 1125, 1027, 946.2, 878.8, 821.4, 772, 728.6, 690.4, 656.4, 626.1, 598.7, 573.9, 551.3, 530.6 };
for(i=0; i<78; i++) {e[39][i]=e39[i]*MeV*cm2/g;}
name [40] = "G4_MUSCLE_SKELETAL_ICRP";
Znum [40] = 0;
G4double e40[78] = { 104.5, 129.2, 150.2, 168.8, 185.8, 216.1, 242.9, 267.4, 290, 311.1, 331, 349.8, 393.5, 433.1, 469.7, 503.9, 536.2, 566.7, 595.9, 623.7, 676.3, 725.4, 771.5, 815.1, 856.6, 896.2, 934.1, 970.6, 1006, 1040, 1072, 1104, 1135, 1165, 1302, 1422, 1530, 1626, 1712, 1790, 1860, 1922, 2029, 2113, 2178, 2228, 2263, 2286, 2299, 2304, 2302, 2293, 2280, 2262, 2242, 2218, 2059, 1888, 1735, 1604, 1492, 1396, 1312, 1240, 1118, 1021, 941.1, 874.1, 817, 767.9, 724.9, 686.8, 653.1, 622.9, 595.7, 571, 548.6, 528 };
for(i=0; i<78; i++) {e[40][i]=e40[i]*MeV*cm2/g;}
name [41] = "G4_MUSCLE_STRIATED_ICRU";
Znum [41] = 0;
G4double e41[78] = { 104.7, 129.4, 150.5, 169.2, 186.2, 216.5, 243.4, 267.9, 290.5, 311.7, 331.6, 350.5, 394.2, 433.9, 470.6, 504.9, 537.2, 567.8, 596.9, 624.9, 677.5, 726.7, 772.8, 816.5, 858.1, 897.8, 935.8, 972.3, 1007, 1041, 1074, 1106, 1137, 1167, 1304, 1425, 1532, 1629, 1715, 1793, 1863, 1925, 2032, 2116, 2181, 2230, 2265, 2289, 2302, 2306, 2304, 2295, 2282, 2264, 2244, 2220, 2063, 1894, 1742, 1611, 1498, 1401, 1318, 1244, 1123, 1025, 944.5, 877.2, 819.9, 770.6, 727.3, 689.2, 655.3, 625, 597.7, 572.9, 550.4, 529.7 };
for(i=0; i<78; i++) {e[41][i]=e41[i]*MeV*cm2/g;}
name [42] = "G4_N";
Znum [42] = 7;
G4double e42[78] = { 82.8, 103.7, 121.6, 137.7, 152.3, 178.7, 202.3, 223.8, 243.8, 262.5, 280.2, 297.1, 336.2, 372, 405.1, 436.2, 465.5, 493.4, 520.1, 545.7, 594.1, 639.3, 682, 722.5, 761, 797.9, 833.4, 867.4, 900.3, 932, 962.8, 992.5, 1021, 1049, 1179, 1293, 1395, 1486, 1567, 1640, 1706, 1765, 1864, 1940, 1999, 2041, 2069, 2086, 2093, 2091, 2083, 2069, 2051, 2030, 2005, 1978, 1819, 1660, 1522, 1406, 1308, 1224, 1151, 1088, 982.9, 898.5, 829.5, 771.1, 721.3, 678.5, 641, 608, 578.6, 552.3, 528.5, 506.9, 487.2, 469.1 };
for(i=0; i<78; i++) {e[42][i]=e42[i]*MeV*cm2/g;}
name [43] = "G4_SODIUM_IODIDE";
Znum [43] = 0;
G4double e43[78] = { 35.86, 44.19, 51.24, 57.48, 63.13, 73.21, 82.12, 90.2, 97.64, 104.6, 111.1, 117.3, 131.6, 144.5, 156.4, 167.6, 178, 187.9, 197.3, 206.3, 223.3, 239.1, 253.9, 268, 281.3, 294, 306.2, 317.9, 329.2, 340.1, 350.6, 360.8, 370.6, 380.2, 424.5, 463.5, 498.4, 529.9, 558.2, 583.8, 607, 627.8, 663.4, 691.6, 713.4, 729.6, 740.9, 748.1, 751.7, 752.4, 750.7, 747, 741.7, 735.1, 727.6, 719.5, 664.4, 611.2, 569.4, 538.3, 514, 491.6, 472.1, 454, 422.9, 393.7, 370.2, 349.6, 331.4, 315.3, 301.2, 288.5, 276.8, 266.1, 256.3, 247.1, 238.9, 231.5 };
for(i=0; i<78; i++) {e[43][i]=e43[i]*MeV*cm2/g;}
name [44] = "G4_Ne";
Znum [44] = 10;
G4double e44[78] = { 68.73, 83.7, 96.26, 107.3, 117.2, 134.8, 150.3, 164.2, 177, 188.8, 199.9, 210.4, 234.5, 256.2, 276.1, 294.6, 311.9, 328.3, 343.8, 358.6, 386.3, 412, 436.1, 458.8, 480.3, 500.8, 520.3, 539.1, 557.1, 574.5, 591.2, 607.5, 623.2, 638.4, 708.4, 770.3, 825.6, 875.7, 921.2, 962.8, 1001, 1036, 1098, 1150, 1194, 1230, 1260, 1285, 1304, 1319, 1330, 1338, 1343, 1344, 1344, 1341, 1296, 1229, 1160, 1095, 1035, 981.4, 932.6, 888.5, 812.1, 748.3, 695.6, 650.4, 611.3, 577, 546.8, 520, 496, 474.4, 454.8, 437, 420.7, 405.7 };
for(i=0; i<78; i++) {e[44][i]=e44[i]*MeV*cm2/g;}
name [45] = "G4_NYLON-6/6";
Znum [45] = 0;
G4double e45[78] = { 167.4, 201.6, 230.3, 255.4, 278, 317.9, 352.9, 384.4, 413.4, 440.3, 465.5, 489.3, 544, 593.3, 638.6, 680.6, 720.1, 757.3, 792.7, 826.4, 889.7, 948.5, 1003, 1055, 1104, 1151, 1195, 1238, 1279, 1318, 1356, 1392, 1427, 1461, 1617, 1750, 1867, 1969, 2059, 2138, 2207, 2267, 2363, 2433, 2482, 2512, 2527, 2531, 2525, 2511, 2491, 2467, 2439, 2408, 2375, 2340, 2160, 1987, 1830, 1690, 1567, 1463, 1374, 1297, 1169, 1066, 981.3, 910.8, 850.9, 799.3, 754.1, 714.4, 679, 647.4, 618.9, 593, 569.5, 547.9 };
for(i=0; i<78; i++) {e[45][i]=e45[i]*MeV*cm2/g;}
name [46] = "G4_O";
Znum [46] = 8;
G4double e46[78] = { 105.8, 117.3, 257.6, 1.139e-05, 5.976e-06, 0.005, 248.1, 71.83, 352, 3.186e-05, 2.012e-05, 0.015, 412.7, 40.96, 503.1, 6.782e-05, 5.098e-05, 0.035, 610.6, 24.07, 700.7, 0.0001156, 9.613e-05, 0.07, 820, 15.89, 884.2, 0.0001583, 0.0001354, 0.125, 1124, 8.719, 1280, 0.0002775, 0.0002641, 0.3, 1573, 4.478, 1697, 0.0004528, 0.000448, 0.65, 1818, 2.655, 1822, 0.0006468, 0.0006403, 1, 1667, 1.474, 1431, 0.00138, 0.001539, 2.75, 1038, 0.7076, 860.9, 0.003906, 0.004519, 6, 616.1, 0.3845, 556.8, 0.009419, 0.01034, 9.5, 452, 0.2295, 334.7, 0.03447, 0.04325, 27.5, 196.3, 0.09039, 156.5, 0.1784, 0.2149, 60 };
for(i=0; i<78; i++) {e[46][i]=e46[i]*MeV*cm2/g;}
name [47] = "G4_PARAFFIN";
Znum [47] = 0;
G4double e47[78] = { 193.8, 233, 265.8, 294.4, 320.3, 365.9, 405.9, 441.9, 475, 505.7, 534.5, 561.7, 624.2, 680.6, 732.3, 780.4, 825.5, 868.2, 908.6, 947.2, 1020, 1087, 1150, 1209, 1265, 1319, 1370, 1419, 1465, 1510, 1554, 1595, 1636, 1675, 1852, 2004, 2137, 2253, 2354, 2442, 2518, 2584, 2688, 2762, 2810, 2837, 2848, 2845, 2831, 2810, 2782, 2749, 2713, 2674, 2633, 2592, 2381, 2184, 2007, 1851, 1714, 1598, 1500, 1414, 1272, 1158, 1066, 988.4, 922.7, 866.1, 816.7, 773.2, 734.5, 699.9, 668.8, 640.6, 614.9, 591.4 };
for(i=0; i<78; i++) {e[47][i]=e47[i]*MeV*cm2/g;}
name [48] = "G4_Pb";
Znum [48] = 82;
G4double e48[78] = { 17.96, 22.18, 25.76, 28.92, 31.8, 36.93, 41.47, 45.6, 49.4, 52.95, 56.3, 59.46, 66.77, 73.41, 79.52, 85.23, 90.6, 95.69, 100.5, 105.2, 113.9, 122, 129.7, 136.9, 143.8, 150.3, 156.6, 162.7, 168.5, 174.1, 179.5, 184.8, 189.9, 194.9, 217.7, 237.9, 256, 272.3, 287, 300.4, 312.6, 323.6, 342.6, 358.2, 370.7, 380.6, 388.3, 394.2, 398.4, 401.3, 403.1, 404, 404.1, 403.5, 402.4, 401, 392.5, 380.4, 365.3, 348.6, 332, 317.6, 304.9, 293.7, 274.4, 258.3, 244.7, 232.9, 222.5, 213.2, 205, 197.5, 190.7, 184.4, 178.7, 173.4, 168.4, 163.9 };
for(i=0; i<78; i++) {e[48][i]=e48[i]*MeV*cm2/g;}
name [49] = "G4_PHOTOGRAPHIC_EMULSION";
Znum [49] = 0;
G4double e49[78] = { 46.69, 57.18, 66.06, 73.91, 81.04, 93.75, 105, 115.2, 124.7, 133.5, 141.8, 149.6, 167.8, 184.3, 199.6, 213.8, 227.3, 240, 252.1, 263.8, 285.7, 306.2, 325.4, 343.6, 361, 377.5, 393.4, 408.7, 423.3, 437.5, 451.2, 464.5, 477.3, 489.8, 547, 597.3, 641.7, 681.2, 716.3, 747.6, 775.5, 800.2, 841.5, 873.5, 897.8, 915.8, 928.6, 937.1, 940, 938.4, 933.8, 927, 918.6, 909.2, 899.1, 888.5, 833.7, 781.8, 735.1, 693.7, 657.1, 624.6, 595.5, 569.4, 524.5, 487.2, 455.6, 428.5, 404.9, 383.9, 365.2, 348.6, 333.8, 320.5, 308.3, 297.2, 287, 277.8 };
for(i=0; i<78; i++) {e[49][i]=e49[i]*MeV*cm2/g;}
name [50] = "G4_PLASTIC_SC_VINYLTOLUENE";
Znum [50] = 0;
G4double e50[78] = { 192.4, 229.8, 260.8, 287.8, 312, 354.4, 391.4, 424.6, 454.8, 482.8, 509, 533.7, 590, 640.5, 686.6, 729.3, 769.2, 806.7, 842.2, 876, 939.2, 997.5, 1052, 1103, 1151, 1197, 1240, 1281, 1321, 1359, 1395, 1430, 1464, 1497, 1644, 1769, 1878, 1971, 2053, 2123, 2184, 2236, 2319, 2377, 2414, 2436, 2445, 2443, 2433, 2417, 2396, 2371, 2343, 2314, 2283, 2251, 2091, 1936, 1791, 1657, 1537, 1435, 1349, 1273, 1148, 1047, 964.8, 895.9, 837.3, 786.7, 742.4, 703.5, 668.8, 637.7, 609.7, 584.3, 561.2, 540 };
for(i=0; i<78; i++) {e[50][i]=e50[i]*MeV*cm2/g;}
name [51] = "G4_POLYCARBONATE";
Znum [51] = 0;
G4double e51[78] = { 146.3, 178.1, 204.7, 228.1, 249.2, 286.4, 319.1, 348.5, 375.5, 400.6, 424.1, 446.2, 497, 542.8, 584.7, 623.5, 659.9, 694.2, 726.6, 757.6, 815.5, 869.1, 919, 965.9, 1010, 1052, 1092, 1130, 1167, 1202, 1235, 1268, 1299, 1329, 1465, 1581, 1681, 1768, 1843, 1908, 1965, 2013, 2090, 2144, 2180, 2201, 2210, 2209, 2202, 2188, 2170, 2149, 2125, 2099, 2072, 2044, 1912, 1785, 1661, 1543, 1433, 1340, 1261, 1191, 1076, 982.4, 906, 842, 787.5, 740.5, 699.2, 662.9, 630.5, 601.5, 575.3, 551.6, 529.9, 510.1 };
for(i=0; i<78; i++) {e[51][i]=e51[i]*MeV*cm2/g;}
name [52] = "G4_POLYETHYLENE";
Znum [52] = 0;
G4double e52[78] = { 168.2, 205.8, 237.5, 265.4, 290.7, 335.4, 374.8, 410.5, 443.2, 473.7, 502.3, 529.3, 591.4, 647.6, 699.1, 747.1, 792.1, 834.6, 874.9, 913.5, 985.9, 1053, 1116, 1175, 1232, 1285, 1336, 1385, 1432, 1478, 1521, 1564, 1604, 1644, 1825, 1983, 2122, 2246, 2355, 2453, 2539, 2615, 2740, 2833, 2899, 2940, 2962, 2967, 2958, 2938, 2908, 2871, 2829, 2782, 2732, 2681, 2418, 2183, 1987, 1826, 1691, 1577, 1480, 1396, 1257, 1145, 1053, 977.1, 912.4, 856.5, 807.8, 764.9, 726.7, 692.6, 661.8, 633.9, 608.6, 585.4 };
for(i=0; i<78; i++) {e[52][i]=e52[i]*MeV*cm2/g;}
name [53] = "G4_MYLAR";
Znum [53] = 0;
G4double e53[78] = { 163.2, 195.3, 221.8, 244.9, 265.6, 301.9, 333.5, 361.8, 387.6, 411.5, 433.8, 454.8, 502.7, 545.7, 584.8, 621, 654.8, 686.6, 716.7, 745.3, 798.7, 847.9, 893.8, 936.8, 977.4, 1016, 1052, 1087, 1121, 1153, 1183, 1213, 1241, 1269, 1393, 1500, 1593, 1673, 1744, 1806, 1860, 1908, 1985, 2042, 2083, 2110, 2126, 2133, 2133, 2126, 2115, 2100, 2082, 2061, 2038, 2014, 1874, 1731, 1599, 1482, 1379, 1290, 1215, 1148, 1038, 948.5, 875.3, 813.8, 761.5, 716.3, 676.6, 641.6, 610.5, 582.5, 557.3, 534.4, 513.6, 494.5 };
for(i=0; i<78; i++) {e[53][i]=e53[i]*MeV*cm2/g;}
name [54] = "G4_PLEXIGLASS";
Znum [54] = 0;
G4double e54[78] = { 118.7, 146.6, 170.3, 191.4, 210.4, 244.5, 274.7, 302.1, 327.3, 350.9, 373.1, 394.2, 442.7, 486.8, 527.4, 565.2, 600.9, 634.6, 666.7, 697.4, 755.1, 808.9, 859.3, 906.9, 952, 995, 1036, 1075, 1113, 1150, 1185, 1219, 1252, 1283, 1428, 1554, 1665, 1762, 1848, 1923, 1990, 2049, 2144, 2216, 2266, 2300, 2320, 2328, 2327, 2318, 2302, 2282, 2259, 2232, 2203, 2173, 2008, 1847, 1702, 1574, 1464, 1369, 1288, 1217, 1099, 1004, 925.6, 860.1, 804.4, 756.3, 714.1, 676.9, 643.8, 614.2, 587.4, 563.2, 541.1, 520.8 };
for(i=0; i<78; i++) {e[54][i]=e54[i]*MeV*cm2/g;}
name [55] = "G4_POLYPROPYLENE";
Znum [55] = 0;
G4double e55[78] = { 193.7, 232.8, 265.4, 293.9, 319.6, 365, 404.8, 440.6, 473.4, 503.9, 532.5, 559.6, 621.6, 677.5, 728.8, 776.5, 821.2, 863.4, 903.5, 941.8, 1014, 1080, 1142, 1201, 1257, 1309, 1360, 1408, 1454, 1499, 1541, 1583, 1622, 1661, 1836, 1986, 2117, 2231, 2331, 2417, 2492, 2557, 2660, 2732, 2779, 2806, 2817, 2814, 2801, 2780, 2752, 2720, 2684, 2646, 2606, 2565, 2359, 2165, 1991, 1836, 1700, 1585, 1488, 1403, 1263, 1150, 1058, 981.3, 916.1, 860, 810.9, 767.8, 729.5, 695.1, 664.3, 636.2, 610.8, 587.5 };
for(i=0; i<78; i++) {e[55][i]=e55[i]*MeV*cm2/g;}
name [56] = "G4_POLYSTYRENE";
Znum [56] = 0;
G4double e56[78] = { 153, 187.5, 216.6, 242.2, 265.3, 306.5, 342.7, 375.5, 405.6, 433.6, 460, 484.9, 542.1, 593.8, 641.3, 685.4, 726.9, 766, 803.1, 838.5, 905, 966.6, 1024, 1078, 1130, 1178, 1225, 1269, 1312, 1352, 1392, 1429, 1466, 1501, 1661, 1797, 1915, 2017, 2106, 2183, 2249, 2305, 2394, 2454, 2492, 2511, 2516, 2509, 2494, 2471, 2443, 2410, 2376, 2339, 2301, 2262, 2070, 1895, 1742, 1609, 1493, 1395, 1312, 1239, 1119, 1021, 941.4, 874.6, 817.8, 768.7, 725.7, 687.9, 654.1, 623.9, 596.6, 571.9, 549.4, 528.7 };
for(i=0; i<78; i++) {e[56][i]=e56[i]*MeV*cm2/g;}
name [57] = "G4_TEFLON";
Znum [57] = 0;
G4double e57[78] = { 82.7, 99.97, 114.4, 127.1, 138.4, 158.5, 176.2, 192, 206.5, 220, 232.6, 244.5, 271.9, 296.4, 319, 339.8, 359.4, 377.8, 395.3, 412, 443.3, 472.2, 499.3, 524.7, 548.8, 571.7, 593.6, 614.5, 634.6, 653.9, 672.5, 690.4, 707.8, 724.6, 801.6, 868.9, 928.6, 981.9, 1030, 1073, 1112, 1148, 1209, 1260, 1301, 1334, 1361, 1382, 1397, 1408, 1415, 1419, 1420, 1418, 1414, 1409, 1399, 1373, 1319, 1246, 1165, 1095, 1034, 979.4, 887.4, 813.7, 752.5, 700.8, 656.5, 618.1, 584.5, 554.8, 528.3, 504.6, 483, 463.5, 445.6, 429.3 };
for(i=0; i<78; i++) {e[57][i]=e57[i]*MeV*cm2/g;}
name [58] = "G4_POLYVINYL_CHLORIDE";
Znum [58] = 0;
G4double e58[78] = { 94.27, 114.4, 131.3, 146.3, 159.9, 184, 205.5, 224.9, 242.9, 259.7, 275.5, 290.5, 325.3, 357, 386.3, 413.7, 439.5, 464.1, 487.6, 510.1, 552.6, 592.4, 629.9, 665.5, 699.4, 731.8, 762.9, 792.9, 821.8, 849.7, 876.7, 902.9, 928.2, 952.9, 1067, 1167, 1255, 1335, 1405, 1468, 1525, 1574, 1657, 1719, 1764, 1795, 1814, 1823, 1824, 1818, 1807, 1792, 1774, 1753, 1731, 1708, 1591, 1482, 1385, 1299, 1222, 1153, 1092, 1037, 941.7, 862.4, 795.8, 739.8, 692.3, 651.2, 615.4, 583.7, 555.6, 530.3, 507.5, 486.9, 468, 450.8 };
for(i=0; i<78; i++) {e[58][i]=e58[i]*MeV*cm2/g;}
name [59] = "G4_PROPANE";
Znum [59] = 0;
G4double e59[78] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022, 1868, 1739, 1629, 1534, 1377, 1252, 1150, 1065, 993, 931.1, 877.2, 829.9, 787.8, 750.2, 716.4, 685.8, 658, 632.5 };
for(i=0; i<78; i++) {e[59][i]=e59[i]*MeV*cm2/g;}
name [60] = "G4_Pt";
Znum [60] = 78;
G4double e60[78] = { 14.45, 17.87, 20.78, 23.37, 25.71, 29.9, 33.61, 36.99, 40.1, 43.01, 45.75, 48.35, 54.36, 59.81, 64.84, 69.54, 73.97, 78.17, 82.17, 86, 93.22, 99.96, 106.3, 112.3, 118, 123.5, 128.7, 133.8, 138.7, 143.4, 147.9, 152.4, 156.7, 160.8, 180.3, 197.6, 213.3, 227.7, 240.9, 253, 264.3, 274.7, 293.2, 309, 322.4, 333.7, 343.1, 350.7, 356.8, 361.6, 365.1, 367.6, 369.1, 369.8, 369.9, 369.3, 364.7, 357, 347.3, 336.6, 325.5, 314.4, 303.6, 293.2, 274.3, 258.5, 245.1, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.4, 179.7, 174.4, 169.5, 164.9 };
for(i=0; i<78; i++) {e[60][i]=e60[i]*MeV*cm2/g;}
name [61] = "G4_Si";
Znum [61] = 14;
G4double e61[78] = { 47.32, 61.63, 74.34, 85.98, 96.82, 116.8, 135.1, 152.1, 168.2, 183.4, 198.1, 212.1, 245.3, 276.1, 305.2, 332.7, 359.1, 384.4, 408.7, 432.2, 477, 519.3, 559.4, 597.5, 633.9, 668.6, 701.9, 733.7, 764.3, 793.5, 821.6, 848.5, 874.4, 899.1, 1008, 1097, 1168, 1225, 1270, 1307, 1336, 1359, 1390, 1408, 1416, 1417, 1413, 1405, 1395, 1383, 1370, 1356, 1341, 1326, 1310, 1295, 1218, 1146, 1081, 1023, 970.6, 923.9, 881.4, 842.4, 773.1, 713.1, 661.2, 617.4, 579.7, 547, 518.2, 492.7, 470, 449.5, 430.9, 414, 398.6, 384.4 };
for(i=0; i<78; i++) {e[61][i]=e61[i]*MeV*cm2/g;}
name [62] = "G4_SILICON_DIOXIDE";
Znum [62] = 0;
G4double e62[78] = { 68.9, 85.1, 98.85, 111, 122.1, 141.8, 159.3, 175.1, 189.8, 203.4, 216.3, 228.5, 256.6, 282.1, 305.7, 327.6, 348.3, 367.9, 386.5, 404.4, 437.9, 469.2, 498.5, 526.3, 552.6, 577.7, 601.7, 624.7, 646.9, 668.2, 688.8, 708.7, 728, 746.7, 832.2, 906.8, 972.6, 1031, 1083, 1129, 1170, 1207, 1268, 1315, 1351, 1377, 1396, 1409, 1417, 1421, 1421, 1419, 1414, 1406, 1397, 1387, 1349, 1301, 1237, 1163, 1087, 1021, 964, 913.7, 829.4, 762.2, 706.3, 659, 618.4, 583.3, 552.3, 524.9, 500.4, 478.4, 458.5, 440.4, 423.9, 408.7 };
for(i=0; i<78; i++) {e[62][i]=e62[i]*MeV*cm2/g;}
name [63] = "G4_STILBENE";
Znum [63] = 0;
G4double e63[78] = { 192, 228.9, 259.4, 286, 309.7, 351.2, 387.4, 419.7, 449.2, 476.4, 501.9, 525.8, 580.4, 629.2, 673.8, 714.9, 753.3, 789.4, 823.5, 856, 916.5, 972.3, 1024, 1073, 1119, 1162, 1203, 1243, 1280, 1316, 1351, 1384, 1416, 1446, 1585, 1703, 1805, 1892, 1968, 2034, 2090, 2139, 2215, 2268, 2303, 2323, 2331, 2330, 2321, 2307, 2287, 2265, 2240, 2212, 2184, 2155, 1995, 1841, 1703, 1582, 1477, 1385, 1305, 1233, 1113, 1015, 936, 869.6, 813, 764.1, 721.3, 683.7, 650.1, 620, 592.9, 568.3, 545.9, 525.4 };
for(i=0; i<78; i++) {e[63][i]=e63[i]*MeV*cm2/g;}
name [64] = "G4_Ti";
Znum [64] = 22;
G4double e64[78] = { 59.24, 72.81, 84.28, 94.41, 103.6, 119.9, 134.3, 147.4, 159.4, 170.6, 181.1, 191.1, 214, 234.7, 253.8, 271.6, 288.3, 304.1, 319.1, 333.5, 360.5, 385.5, 409, 431.2, 452.2, 472.2, 491.4, 509.7, 527.3, 544.3, 560.6, 576.4, 591.7, 606.5, 674.2, 733.1, 785, 831, 871.7, 907.9, 940, 968.3, 1015, 1051, 1077, 1095, 1106, 1112, 1114, 1112, 1107, 1100, 1092, 1082, 1071, 1059, 995.6, 933.7, 877.6, 827.9, 785.2, 747.8, 714.5, 684.4, 631.9, 587.1, 548.3, 514.3, 484.2, 457.3, 433.4, 412.5, 393.7, 376.7, 361.5, 347.6, 334.9, 323.2 };
for(i=0; i<78; i++) {e[64][i]=e64[i]*MeV*cm2/g;}
name [65] = "G4_Sn";
Znum [65] = 50;
G4double e65[78] = { 27.39, 33.96, 39.55, 44.52, 49.04, 57.11, 64.28, 70.8, 76.82, 82.45, 87.76, 92.79, 104.4, 115, 124.8, 133.9, 142.5, 150.6, 158.4, 165.8, 179.8, 192.9, 205.2, 216.8, 227.8, 238.4, 248.4, 258.1, 267.4, 276.4, 285.1, 293.5, 301.6, 309.5, 345.7, 377.3, 405.3, 430.1, 452.1, 471.8, 489.3, 504.8, 530.7, 550.9, 566.3, 577.9, 586.3, 592.2, 596.1, 598.4, 599.3, 599.1, 598.1, 596.4, 594.2, 591.5, 573.8, 552.8, 531.2, 510.1, 488.3, 467, 447, 428.6, 396.3, 369.4, 346.8, 327.7, 311.4, 297.1, 283.9, 271.9, 260.8, 250.6, 241.7, 233.6, 226, 218.9 };
for(i=0; i<78; i++) {e[65][i]=e65[i]*MeV*cm2/g;}
name [66] = "G4_TISSUE_METHANE";
Znum [66] = 0;
G4double e66[78] = { 135.1, 165.6, 191.3, 213.9, 234.4, 270.7, 302.8, 331.8, 358.4, 383.2, 406.5, 428.6, 479.3, 525.2, 567.4, 606.7, 643.6, 678.5, 711.7, 743.4, 803.1, 858.6, 910.7, 960.1, 1007, 1052, 1095, 1136, 1176, 1214, 1251, 1287, 1322, 1356, 1514, 1655, 1783, 1899, 2006, 2104, 2193, 2275, 2418, 2535, 2626, 2693, 2737, 2760, 2764, 2752, 2728, 2695, 2655, 2612, 2566, 2519, 2278, 2060, 1878, 1727, 1602, 1494, 1403, 1323, 1191, 1085, 998.2, 926, 864.6, 811.7, 765.6, 724.9, 688.8, 656.5, 627.4, 601.1, 577.1, 555.2 };
for(i=0; i<78; i++) {e[66][i]=e66[i]*MeV*cm2/g;}
name [67] = "G4_TISSUE_PROPANE";
Znum [67] = 0;
G4double e67[78] = { 149.7, 181.5, 208.2, 231.7, 252.8, 290.4, 323.5, 353.4, 380.9, 406.5, 430.5, 453.3, 505.7, 553, 596.6, 637.2, 675.4, 711.5, 745.8, 778.6, 840.4, 897.8, 951.6, 1003, 1051, 1097, 1141, 1183, 1224, 1263, 1301, 1337, 1372, 1407, 1563, 1701, 1822, 1929, 2024, 2109, 2185, 2252, 2362, 2446, 2507, 2549, 2573, 2583, 2581, 2569, 2550, 2524, 2494, 2461, 2426, 2389, 2211, 2043, 1887, 1744, 1616, 1507, 1415, 1334, 1201, 1094, 1006, 933.3, 871.4, 818.1, 771.5, 730.5, 694.1, 661.5, 632.1, 605.6, 581.4, 559.3 };
for(i=0; i<78; i++) {e[67][i]=e67[i]*MeV*cm2/g;}
name [68] = "G4_TOLUENE";
Znum [68] = 0;
G4double e68[78] = { 192.5, 230, 261, 288.1, 312.3, 354.9, 392, 425.3, 455.6, 483.7, 510, 534.8, 591.3, 642.1, 688.4, 731.3, 771.4, 809.1, 844.8, 878.8, 942.4, 1001, 1056, 1107, 1155, 1201, 1245, 1287, 1327, 1365, 1401, 1437, 1471, 1504, 1652, 1779, 1888, 1983, 2065, 2136, 2197, 2250, 2333, 2392, 2430, 2452, 2461, 2459, 2449, 2433, 2411, 2386, 2358, 2328, 2296, 2264, 2109, 1960, 1817, 1683, 1560, 1456, 1368, 1291, 1163, 1060, 976.6, 906.6, 847.1, 795.7, 750.8, 711.3, 676.1, 644.6, 616.2, 590.5, 567, 545.6 };
for(i=0; i<78; i++) {e[68][i]=e68[i]*MeV*cm2/g;}
name [69] = "G4_U";
Znum [69] = 92;
G4double e69[78] = { 13.2, 16.72, 19.77, 22.52, 25.04, 29.61, 33.73, 37.51, 41.03, 44.35, 47.5, 50.51, 57.52, 63.96, 69.97, 75.62, 80.99, 86.11, 91.01, 95.73, 104.7, 113.1, 121.1, 128.7, 136, 143, 149.8, 156.3, 162.6, 168.8, 174.7, 180.5, 186.2, 191.7, 217.4, 240.5, 261.5, 280.8, 298.5, 314.8, 329.8, 343.7, 368, 388.4, 405.3, 419, 429.8, 438.1, 444.2, 448.4, 450.8, 451.8, 451.6, 450.3, 448.2, 445.4, 420, 390.1, 362.9, 339.6, 319.8, 303.1, 288.9, 276.7, 256.9, 241.7, 229.4, 218.6, 209.1, 200.6, 193, 186.1, 179.8, 174, 168.6, 163.7, 159.1, 154.8 };
for(i=0; i<78; i++) {e[69][i]=e69[i]*MeV*cm2/g;}
name [70] = "G4_W";
Znum [70] = 74;
G4double e70[78] = { 20.75, 25.23, 28.99, 32.29, 35.26, 40.51, 45.11, 49.26, 53.06, 56.59, 59.9, 63.02, 70.18, 76.63, 82.54, 88.02, 93.16, 98.01, 102.6, 107, 115.2, 122.9, 130, 136.7, 143.1, 149.2, 155, 160.6, 165.9, 171.1, 176.1, 180.9, 185.6, 190.1, 211.1, 229.6, 246.2, 261.3, 275.1, 287.7, 299.3, 310, 328.8, 344.7, 358.1, 369.2, 378.3, 385.6, 391.3, 395.6, 398.7, 400.6, 401.7, 401.9, 401.4, 400.4, 389.5, 374.8, 359.5, 344.8, 331, 318.3, 306.5, 295.7, 276.7, 260.8, 247.3, 235.5, 225.2, 216.1, 207.8, 200.3, 193.5, 187.3, 181.5, 176.2, 171.3, 166.7 };
for(i=0; i<78; i++) {e[70][i]=e70[i]*MeV*cm2/g;}
name [71] = "G4_WATER";
Znum [71] = 0;
G4double e71[78] = { 98.91, 122.7, 143.1, 161.1, 177.5, 206.9, 233, 256.8, 278.8, 299.3, 318.6, 337, 379.5, 418.1, 453.8, 487.1, 518.6, 548.3, 576.7, 603.9, 655.2, 703, 748, 790.5, 831, 869.6, 906.6, 942.2, 976.4, 1009, 1041, 1072, 1102, 1131, 1265, 1383, 1488, 1582, 1666, 1743, 1811, 1873, 1978, 2062, 2128, 2178, 2215, 2240, 2255, 2262, 2262, 2256, 2245, 2230, 2211, 2190, 2050, 1896, 1752, 1624, 1511, 1414, 1329, 1255, 1132, 1034, 952.7, 884.8, 826.9, 777.1, 733.4, 694.9, 660.7, 630.1, 602.5, 577.6, 554.8, 534 };
for(i=0; i<78; i++) {e[71][i]=e71[i]*MeV*cm2/g;}
name [72] = "G4_WATER_VAPOR";
Znum [72] = 0;
G4double e72[78] = { 126.3, 154.7, 178.7, 199.8, 218.8, 252.7, 282.5, 309.5, 334.3, 357.3, 379, 399.5, 446.7, 489.3, 528.5, 565, 599.2, 631.6, 662.4, 691.9, 747.3, 798.8, 847.2, 892.9, 936.3, 977.8, 1018, 1056, 1093, 1128, 1163, 1196, 1228, 1260, 1405, 1535, 1652, 1758, 1855, 1942, 2022, 2094, 2216, 2309, 2377, 2422, 2446, 2455, 2453, 2446, 2436, 2423, 2409, 2392, 2371, 2346, 2169, 1971, 1797, 1653, 1537, 1437, 1351, 1275, 1149, 1049, 965.8, 896.6, 837.6, 786.9, 742.5, 703.3, 668.6, 637.5, 609.5, 584.2, 561.1, 539.9 };
for(i=0; i<78; i++) {e[72][i]=e72[i]*MeV*cm2/g;}
name [73] = "G4_Xe";
Znum [73] = 54;
G4double e73[78] = { 18.11, 23.3, 27.86, 31.99, 35.83, 42.84, 49.2, 55.1, 60.63, 65.87, 70.87, 75.65, 86.89, 97.3, 107.1, 116.3, 125.1, 133.5, 141.7, 149.5, 164.4, 178.6, 192, 204.9, 217.3, 229.2, 240.7, 251.8, 262.6, 273.1, 283.4, 293.3, 303, 312.5, 356.7, 396.5, 432.5, 465.2, 494.9, 521.8, 546.1, 567.9, 604.7, 633.2, 654.5, 669.3, 678.8, 683.6, 684.6, 682.5, 678, 671.7, 663.9, 655.1, 645.6, 635.6, 584.6, 538.7, 500.4, 468.8, 446.7, 430.5, 417.1, 405.3, 383.9, 364, 344.9, 326.8, 309.7, 294.6, 281.3, 269.5, 258.7, 248.8, 239.6, 231.1, 223.2, 216.2 };
for(i=0; i<78; i++) {e[73][i]=e73[i]*MeV*cm2/g;}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheBlochModel.cc,v 1.13 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BetheBlochModel.cc,v 1.24 2008/10/22 16:00:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,10 +44,12 @@
// 27-01-03 Make models region aware (V.Ivanchenko)
// 13-02-03 Add name (V.Ivanchenko)
// 24-03-05 Add G4EmCorrections (V.Ivanchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
// 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 12-02-06 move G4LossTableManager::Instance()->EmCorrections()
// in constructor (mma)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// -------------------------------------------------------------------
//
@@ -62,6 +64,7 @@
#include "G4LossTableManager.hh"
#include "G4EmCorrections.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4NistManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -70,16 +73,20 @@ using namespace std;
G4BetheBlochModel::G4BetheBlochModel(const G4ParticleDefinition* p,
const G4String& nam)
: G4VEmModel(nam),
particle(0),
tlimit(DBL_MAX),
twoln10(2.0*log(10.0)),
bg2lim(0.0169),
taulim(8.4146e-3),
isIon(false)
particle(0),
tlimit(DBL_MAX),
twoln10(2.0*log(10.0)),
bg2lim(0.0169),
taulim(8.4146e-3),
isIon(false),
isInitialised(false)
{
fParticleChange = 0;
if(p) SetParticle(p);
theElectron = G4Electron::Electron();
corr = G4LossTableManager::Instance()->EmCorrections();
nist = G4NistManager::Instance();
SetLowEnergyLimit(2.0*MeV);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -101,24 +108,86 @@ void G4BetheBlochModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if (!particle) SetParticle(p);
G4String pname = particle->GetParticleName();
if (particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
if (pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
else
fParticleChange = new G4ParticleChangeForLoss();
corrFactor = chargeSquare;
if(!isInitialised) {
isInitialised = true;
if(!fParticleChange) {
if (pParticleChange) {
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
} else {
fParticleChange = new G4ParticleChangeForLoss();
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
{
if(particle != p) {
particle = p;
G4String pname = particle->GetParticleName();
if (particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") {
isIon = true;
}
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
ratio = electron_mass_c2/mass;
G4double magmom = particle->GetPDGMagneticMoment()
*mass/(0.5*eplus*hbar_Planck*c_squared);
magMoment2 = magmom*magmom - 1.0;
formfact = 0.0;
if(particle->GetLeptonNumber() == 0) {
G4double x = 0.8426*GeV;
if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}
else if(mass > GeV) {
x /= nist->GetZ13(mass/proton_mass_c2);
// tlimit = 51.2*GeV*A13[iz]*A13[iz];
}
formfact = 2.0*electron_mass_c2/(x*x);
tlimit = 2.0/formfact;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BetheBlochModel::ComputeCrossSectionPerElectron(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxKinEnergy)
G4double G4BetheBlochModel::GetChargeSquareRatio(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy);
corrFactor = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy);
return corrFactor;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BetheBlochModel::GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
return corr->GetParticleCharge(p,mat,kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double
G4BetheBlochModel::ComputeCrossSectionPerElectron(const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxKinEnergy)
{
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
@@ -129,11 +198,18 @@ G4double G4BetheBlochModel::ComputeCrossSectionPerElectron(
G4double energy2 = totEnergy*totEnergy;
G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax;
cross = 1.0/cutEnergy - 1.0/maxEnergy
- beta2*log(maxEnergy/cutEnergy)/tmax;
// +term for spin=1/2 particle
if( 0.5 == spin ) cross += 0.5*(maxEnergy - cutEnergy)/energy2;
// High order correction different for hadrons and ions
// nevetheless they are applied to reduce high energy transfers
// if(!isIon)
//cross += corr->FiniteSizeCorrectionXS(p,currentMaterial,
// kineticEnergy,cutEnergy);
cross *= twopi_mc2_rcl2*chargeSquare/beta2;
}
@@ -166,6 +242,7 @@ G4double G4BetheBlochModel::CrossSectionPerVolume(
G4double cutEnergy,
G4double maxEnergy)
{
currentMaterial = material;
G4double eDensity = material->GetElectronDensity();
G4double cross = eDensity*ComputeCrossSectionPerElectron
(p,kineticEnergy,cutEnergy,maxEnergy);
@@ -221,14 +298,59 @@ G4double G4BetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2;
//High order correction only for hadrons
if(!isIon) dedx += corr->HighOrderCorrections(p,material,kineticEnergy);
//High order correction different for hadrons and ions
if(isIon) {
dedx += corr->IonBarkasCorrection(p,material,kineticEnergy);
} else {
dedx += corr->HighOrderCorrections(p,material,kineticEnergy,cutEnergy);
}
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double&,
G4double length)
{
const G4ParticleDefinition* p = dp->GetDefinition();
const G4Material* mat = couple->GetMaterial();
G4double preKinEnergy = dp->GetKineticEnergy();
G4double e = preKinEnergy - eloss*0.5;
if(e < 0.0) e = preKinEnergy*0.5;
if(isIon) {
G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,e);
GetModelOfFluctuations()->SetParticleAndCharge(p, q2);
eloss *= q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor;
eloss += length*corr->IonHighOrderCorrections(p,couple,e);
}
if(nuclearStopping && preKinEnergy*proton_mass_c2/mass < chargeSquare*100.*MeV) {
G4double nloss = length*corr->NuclearDEDX(p,mat,e,false);
// too big energy loss
if(eloss + nloss > preKinEnergy) {
nloss *= (preKinEnergy/(eloss + nloss));
eloss = preKinEnergy;
} else {
eloss += nloss;
}
/*
G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy
<< " de= " << eloss << " NIEL= " << nloss
<< " dynQ= " << dp->GetCharge()/eplus << G4endl;
*/
fParticleChange->ProposeNonIonizingEnergyDeposit(nloss);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BetheBlochModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp,
const G4MaterialCutsCouple*,
const G4DynamicParticle* dp,
@@ -238,33 +360,55 @@ void G4BetheBlochModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp,
G4double kineticEnergy = dp->GetKineticEnergy();
G4double tmax = MaxSecondaryEnergy(dp->GetDefinition(),kineticEnergy);
G4double maxKinEnergy = min(maxEnergy,tmax);
G4double maxKinEnergy = std::min(maxEnergy,tmax);
if(minKinEnergy >= maxKinEnergy) return;
G4double totEnergy = kineticEnergy + mass;
G4double etot2 = totEnergy*totEnergy;
G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
G4double deltaKinEnergy, f;
G4double deltaKinEnergy, f;
G4double f1 = 0.0;
G4double fmax = 1.0;
if( 0.5 == spin ) fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2;
// sampling follows ...
// sampling without nuclear size effect
do {
G4double q = G4UniformRand();
deltaKinEnergy = minKinEnergy*maxKinEnergy
/(minKinEnergy*(1.0 - q) + maxKinEnergy*q);
f = 1.0 - beta2*deltaKinEnergy/tmax;
if( 0.5 == spin ) f += 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
if(f > 1.0) {
G4cout << "G4BetheBlochModel::SampleSecondary Warning! "
<< "Majorant 1.0 < "
<< f << " for Edelta= " << deltaKinEnergy
<< G4endl;
if( 0.5 == spin ) {
f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
f += f1;
}
} while( G4UniformRand() > f );
} while( fmax*G4UniformRand() > f);
// projectile formfactor - suppresion of high energy
// delta-electron production at high energy
G4double x = formfact*deltaKinEnergy;
if(x > 1.e-6) {
G4double x1 = 1.0 + x;
G4double g = 1.0/(x1*x1);
if( 0.5 == spin ) {
G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass);
g *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
}
if(g > 1.0) {
G4cout << "### G4BetheBlochModel WARNING: g= " << g
<< dp->GetDefinition()->GetParticleName()
<< " Ekin(MeV)= " << kineticEnergy
<< " delEkin(MeV)= " << deltaKinEnergy
<< G4endl;
}
if(G4UniformRand() > g) return;
}
// delta-electron is produced
G4double totMomentum = totEnergy*sqrt(beta2);
G4double deltaMomentum =
sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheHeitlerModel.cc,v 1.11 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BetheHeitlerModel.cc,v 1.12 2008/10/15 15:54:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -60,6 +60,7 @@
#include "G4DataVector.hh"
#include "G4PhysicsLogVector.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -69,8 +70,9 @@ G4BetheHeitlerModel::G4BetheHeitlerModel(const G4ParticleDefinition*,
const G4String& nam)
: G4VEmModel(nam),
theCrossSectionTable(0),
nbins(200)
nbins(10)
{
fParticleChange = 0;
theGamma = G4Gamma::Gamma();
thePositron = G4Positron::Positron();
theElectron = G4Electron::Electron();
@@ -91,10 +93,13 @@ G4BetheHeitlerModel::~G4BetheHeitlerModel()
void G4BetheHeitlerModel::Initialise(const G4ParticleDefinition*,
const G4DataVector&)
{
if(pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
else
fParticleChange = new G4ParticleChangeForGamma();
if(!fParticleChange) {
if(pParticleChange) {
fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
} else {
fParticleChange = new G4ParticleChangeForGamma();
}
}
if(theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
@@ -107,11 +112,14 @@ void G4BetheHeitlerModel::Initialise(const G4ParticleDefinition*,
G4PhysicsLogVector* ptrVector;
G4double emin = LowEnergyLimit();
G4double emax = HighEnergyLimit();
G4int n = nbins*G4int(log10(emax/emin));
G4bool spline = G4LossTableManager::Instance()->SplineFlag();
G4double e, value;
for(size_t j=0; j<nvect ; j++) {
ptrVector = new G4PhysicsLogVector(emin, emax, nbins);
ptrVector = new G4PhysicsLogVector(emin, emax, n);
ptrVector->SetSpline(spline);
G4double Z = (*theElementTable)[j]->GetZ();
G4int iz = G4int(Z);
indexZ[iz] = j;
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BohrFluctuations.cc,v 1.6 2007/09/27 14:02:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggIonModel.cc,v 1.17 2007/07/28 13:30:53 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BraggIonModel.cc,v 1.22 2008/10/22 16:00:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -43,6 +43,8 @@
// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 25-04-06 Add stopping data from ASTAR (V.Ivanchenko)
// 23-10-06 Reduce lowestKinEnergy to 0.25 keV (V.Ivanchenko)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
@@ -61,6 +63,8 @@
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4LossTableManager.hh"
#include "G4EmCorrections.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,13 +73,16 @@ using namespace std;
G4BraggIonModel::G4BraggIonModel(const G4ParticleDefinition* p,
const G4String& nam)
: G4VEmModel(nam),
particle(0),
iMolecula(0),
isIon(false)
corr(0),
particle(0),
fParticleChange(0),
iMolecula(0),
isIon(false),
isInitialised(false)
{
if(p) SetParticle(p);
highKinEnergy = 2.0*MeV;
lowKinEnergy = 0.0*MeV;
SetHighEnergyLimit(2.0*MeV);
HeMass = 3.727417*GeV;
rateMassHe2p = HeMass/proton_mass_c2;
lowestKinEnergy = 1.0*keV/rateMassHe2p;
@@ -103,16 +110,49 @@ void G4BraggIonModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(p != particle) SetParticle(p);
G4String pname = particle->GetParticleName();
if(particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
if(pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
else
fParticleChange = new G4ParticleChangeForLoss();
corrFactor = chargeSquare;
if(!isInitialised) {
isInitialised = true;
G4String pname = particle->GetParticleName();
if(particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
corr = G4LossTableManager::Instance()->EmCorrections();
if(!fParticleChange) {
if(pParticleChange) {
fParticleChange =
reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
} else {
fParticleChange = new G4ParticleChangeForLoss();
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggIonModel::GetChargeSquareRatio(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy);
corrFactor = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy);
return corrFactor;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggIonModel::GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
return corr->GetParticleCharge(p,mat,kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -123,10 +163,9 @@ G4double G4BraggIonModel::ComputeCrossSectionPerElectron(
G4double cutEnergy,
G4double maxKinEnergy)
{
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double maxEnergy = min(tmax,maxKinEnergy);
G4double maxEnergy = std::min(tmax,maxKinEnergy);
if(cutEnergy < tmax) {
G4double energy = kineticEnergy + mass;
@@ -212,6 +251,45 @@ G4double G4BraggIonModel::ComputeDEDXPerVolume(const G4Material* material,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BraggIonModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double&,
G4double length)
{
// this method is called only for ions
const G4ParticleDefinition* p = dp->GetDefinition();
const G4Material* mat = couple->GetMaterial();
G4double preKinEnergy = dp->GetKineticEnergy();
G4double e = preKinEnergy - eloss*0.5;
if(e < 0.0) e = preKinEnergy*0.5;
G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,e);
GetModelOfFluctuations()->SetParticleAndCharge(p, q2);
eloss *= q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor;
if(nuclearStopping) {
G4double nloss = length*corr->NuclearDEDX(p,mat,e,false);
// too big energy loss
if(eloss + nloss > preKinEnergy) {
nloss *= (preKinEnergy/(eloss + nloss));
eloss = preKinEnergy;
} else {
eloss += nloss;
}
/*
G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy
<< " de= " << eloss << " NIEL= " << nloss
<< " dynQ= " << dp->GetCharge()/eplus << G4endl;
*/
fParticleChange->ProposeNonIonizingEnergyDeposit(nloss);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BraggIonModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp,
const G4MaterialCutsCouple*,
const G4DynamicParticle* dp,
@@ -219,7 +297,7 @@ void G4BraggIonModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp,
G4double maxEnergy)
{
G4double tmax = MaxSecondaryKinEnergy(dp);
G4double xmax = min(tmax, maxEnergy);
G4double xmax = std::min(tmax, maxEnergy);
if(xmin >= xmax) return;
G4double kineticEnergy = dp->GetKineticEnergy();
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggModel.cc,v 1.16 2007/07/28 13:30:53 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BraggModel.cc,v 1.20 2008/10/22 16:01:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -49,6 +49,8 @@
// 16-06-05 Fix problem of chemical formula (V.Ivantchenko)
// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 25-04-06 Add stopping data from PSTAR (V.Ivanchenko)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
// Class Description:
//
@@ -66,6 +68,8 @@
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4LossTableManager.hh"
#include "G4EmCorrections.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,12 +77,15 @@ using namespace std;
G4BraggModel::G4BraggModel(const G4ParticleDefinition* p, const G4String& nam)
: G4VEmModel(nam),
particle(0),
protonMassAMU(1.007276),
iMolecula(0),
isIon(false)
particle(0),
protonMassAMU(1.007276),
iMolecula(0),
isIon(false),
isInitialised(false)
{
if(p) SetParticle(p);
SetHighEnergyLimit(2.0*MeV);
lowestKinEnergy = 1.0*keV;
theZieglerFactor = eV*cm2*1.0e-15;
theElectron = G4Electron::Electron();
@@ -103,15 +110,45 @@ void G4BraggModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
if(p != particle) SetParticle(p);
G4String pname = particle->GetParticleName();
if(particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
if(pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
else
fParticleChange = new G4ParticleChangeForLoss();
if(!isInitialised) {
isInitialised = true;
G4String pname = particle->GetParticleName();
if(particle->GetParticleType() == "nucleus" &&
pname != "deuteron" && pname != "triton") isIon = true;
corr = G4LossTableManager::Instance()->EmCorrections();
if(pParticleChange) {
fParticleChange =
reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
} else {
fParticleChange = new G4ParticleChangeForLoss();
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggModel::GetChargeSquareRatio(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy);
GetModelOfFluctuations()->SetParticleAndCharge(p, q2);
return q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4BraggModel::GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy)
{
// this method is called only for ions
return corr->GetParticleCharge(p,mat,kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -122,10 +159,9 @@ G4double G4BraggModel::ComputeCrossSectionPerElectron(
G4double cutEnergy,
G4double maxKinEnergy)
{
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double maxEnergy = min(tmax,maxKinEnergy);
G4double maxEnergy = std::min(tmax,maxKinEnergy);
if(cutEnergy < tmax) {
G4double energy = kineticEnergy + mass;
@@ -206,6 +242,39 @@ G4double G4BraggModel::ComputeDEDXPerVolume(const G4Material* material,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BraggModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double&,
G4double length)
{
if(nuclearStopping) {
G4double preKinEnergy = dp->GetKineticEnergy();
G4double e = preKinEnergy - eloss*0.5;
if(e < 0.0) e = preKinEnergy*0.5;
G4double nloss = length*corr->NuclearDEDX(dp->GetDefinition(),
couple->GetMaterial(),
e,false);
// too big energy loss
if(eloss + nloss > preKinEnergy) {
nloss *= (preKinEnergy/(eloss + nloss));
eloss = preKinEnergy;
} else {
eloss += nloss;
}
/*
G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy
<< " de= " << eloss << " NIEL= " << nloss
<< " dynQ= " << dp->GetCharge()/eplus << G4endl;
*/
fParticleChange->ProposeNonIonizingEnergyDeposit(nloss);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4BraggModel::SampleSecondaries(vector<G4DynamicParticle*>* vdp,
const G4MaterialCutsCouple*,
const G4DynamicParticle* dp,
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ComptonScattering.cc,v 1.27 2006/09/14 10:27:19 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ComptonScattering.cc,v 1.30 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------ G4ComptonScattering physics process -----------------------------
@@ -73,9 +73,7 @@ G4ComptonScattering::G4ComptonScattering(const G4String& processName,
G4ProcessType type):G4VEmProcess (processName, type),
isInitialised(false)
{
SetLambdaBinning(90);
SetMinKinEnergy(0.1*keV);
SetMaxKinEnergy(100.0*GeV);
SetProcessSubType(fComptonScattering);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -91,11 +89,9 @@ void G4ComptonScattering::InitialiseProcess(const G4ParticleDefinition*)
isInitialised = true;
SetBuildTableFlag(true);
SetSecondaryParticle(G4Electron::Electron());
G4double emin = MinKinEnergy();
G4double emax = MaxKinEnergy();
if(!Model()) SetModel(new G4KleinNishinaCompton);
Model()->SetLowEnergyLimit(emin);
Model()->SetHighEnergyLimit(emax);
Model()->SetLowEnergyLimit(MinKinEnergy());
Model()->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(1, Model());
}
}
@@ -103,12 +99,6 @@ void G4ComptonScattering::InitialiseProcess(const G4ParticleDefinition*)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4ComptonScattering::PrintInfo()
{
G4cout
<< " Total cross sections has a good parametrisation"
<< " from 10 KeV to (100/Z) GeV"
<< "\n Sampling according " << Model()->GetName() << " model"
<< G4endl;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ComptonScattering52.cc,v 1.5 2007/05/16 14:00:56 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ComptonScattering52.cc,v 1.7 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------ G4ComptonScattering52 physics process -----------------------------
@@ -72,7 +72,11 @@ G4ComptonScattering52::G4ComptonScattering52(const G4String& processName,
HighestEnergyLimit(100*GeV),
NumbBinTable(80),
fminimalEnergy(1*eV)
{}
{
SetProcessSubType(13);
G4cout << "!!! G4ComptonScattering52 is the obsolete process class and will be removed soon !!!"
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScattering.cc,v 1.11 2007/11/20 18:43:25 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4CoulombScattering.cc,v 1.19 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -58,23 +58,20 @@
using namespace std;
G4CoulombScattering::G4CoulombScattering(const G4String& name)
: G4VEmProcess(name),thetaMin(0.0),thetaMax(pi),q2Max(DBL_MAX),
: G4VEmProcess(name),thetaMin(0.0),thetaMax(pi),q2Max(TeV*TeV),
isInitialised(false)
{
G4VEmProcess::SetBuildTableFlag(true);
SetBuildTableFlag(true);
SetStartFromNullFlag(false);
SetIntegral(true);
SetMinKinEnergy(keV);
SetMaxKinEnergy(PeV);
thEnergy = PeV;
thEnergyElec = PeV;
if(name == "CoulombScat") {
thEnergy = 10.*MeV;
thEnergyElec = 10.*GeV;
}
SetLambdaBinning(120);
SetSecondaryParticle(G4Electron::Electron());
buildElmTableFlag = true;
SetProcessSubType(fCoulombScattering);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -86,12 +83,20 @@ G4CoulombScattering::~G4CoulombScattering()
void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p)
{
if(!isInitialised) {
// second initialisation
if(isInitialised) {
G4VEmModel* mod = GetModelByIndex(0);
mod->SetPolarAngleLimit(PolarAngleLimit());
mod = GetModelByIndex(1);
if(mod) mod->SetPolarAngleLimit(PolarAngleLimit());
// first initialisation
} else {
isInitialised = true;
aParticle = p;
G4double mass = p->GetPDGMass();
if (mass > GeV || p->GetParticleType() == "nucleus") {
buildElmTableFlag = false;
SetBuildTableFlag(false);
verboseLevel = 0;
} else {
G4String name = p->GetParticleName();
@@ -105,15 +110,15 @@ void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p)
G4double eth = thEnergy;
if(mass < MeV) eth = thEnergyElec;
if(eth > emin) {
G4eCoulombScatteringModel* model =
new G4eCoulombScatteringModel(thetaMin,thetaMax,buildElmTableFlag,q2Max);
G4eCoulombScatteringModel* model = new G4eCoulombScatteringModel();
model->SetPolarAngleLimit(PolarAngleLimit());
model->SetLowEnergyLimit(emin);
model->SetHighEnergyLimit(std::min(eth,emax));
AddEmModel(1, model);
}
if(eth < emax) {
G4CoulombScatteringModel* model =
new G4CoulombScatteringModel(thetaMin,thetaMax,buildElmTableFlag,q2Max);
G4CoulombScatteringModel* model = new G4CoulombScatteringModel();
model->SetPolarAngleLimit(PolarAngleLimit());
model->SetLowEnergyLimit(eth);
model->SetHighEnergyLimit(emax);
AddEmModel(2, model);
@@ -125,10 +130,9 @@ void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p)
void G4CoulombScattering::PrintInfo()
{
G4cout << " Scattering of " << aParticle->GetParticleName()
<< " with " << thetaMin/degree
<< " < Theta(degree) < " << thetaMax/degree
<< "; Eth(MeV)= ";
G4cout << " " << PolarAngleLimit()/degree
<< " < Theta(degree) < 180"
<< ", Eth(MeV)= ";
if(aParticle->GetPDGMass() < MeV) G4cout << thEnergyElec;
else G4cout << thEnergy;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScatteringModel.cc,v 1.29 2007/11/09 11:45:45 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4CoulombScatteringModel.cc,v 1.37 2008/07/31 13:11:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -43,6 +43,7 @@
// 08.08.06 V.Ivanchenko build internal table in ekin scale, introduce faclim
// 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
//
// Class Description:
//
@@ -54,7 +55,6 @@
#include "G4CoulombScatteringModel.hh"
#include "Randomize.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4NistManager.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4Proton.hh"
@@ -63,14 +63,9 @@
using namespace std;
G4CoulombScatteringModel::G4CoulombScatteringModel(
G4double thetaMin, G4double thetaMax, G4bool build,
G4double tlim, const G4String& nam)
: G4eCoulombScatteringModel(thetaMin,thetaMax,build,tlim,nam)
{
theMatManager = G4NistManager::Instance();
theParticleTable = G4ParticleTable::GetParticleTable();
}
G4CoulombScatteringModel::G4CoulombScatteringModel(const G4String& nam)
: G4eCoulombScatteringModel(nam)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -83,82 +78,42 @@ G4double G4CoulombScatteringModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
G4double Z,
G4double A,
G4double,
G4double cutEnergy,
G4double)
{
if(p == particle && kinEnergy == tkin && Z == targetZ &&
A == targetA && cutEnergy == ecut) return nucXSection;
SetupParticle(p);
G4double ekin = std::max(lowEnergyLimit, kinEnergy);
SetupKinematic(ekin, cutEnergy);
// Lab system
G4double ekin = std::max(keV, kinEnergy);
nucXSection = ComputeElectronXSectionPerAtom(p,ekin,Z,A,cutEnergy);
// save lab system kinematics
G4double xtkin = tkin;
G4double xmom2 = mom2;
G4double xinvb = invbeta2;
// CM system
G4int iz = G4int(Z);
G4double m1 = theMatManager->GetAtomicMassAmu(iz)*amu_c2;
G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
G4double etot = tkin + mass;
G4double ptot = sqrt(mom2);
G4double bet = ptot/(etot + m1);
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
G4double momCM= gam*(ptot - bet*etot);
// G4cout << "ptot= " << ptot << " etot= " << etot << " beta= "
// << bet << " gam= " << gam << " Z= " << Z << " A= " << A << G4endl;
// G4cout << " CM. mom= " << momCM << " m= " << m
// << " m1= " << m1 << " iz= " << iz <<G4endl;
G4double m12 = mass*mass;
G4double momCM= ptot*m2/sqrt(m12 + m2*m2 + 2.0*etot*m2);
G4double momCM2 = momCM*momCM;
cosTetMaxNuc = std::max(cosThetaMax, 1.0 - 0.5*q2Limit/momCM2);
if(1.5 > targetA && p == theProton && cosTetMaxNuc < 0.0) cosTetMaxNuc = 0.0;
//G4cout << " ctmax= " << cosTetMaxNuc
//<< " ctmin= " << cosThetaMin << G4endl;
mom2 = momCM*momCM;
tkin = sqrt(mom2 + m12) - mass;
invbeta2 = 1.0 + m12/mom2;
// Cross section in CM system
if(cosTetMaxNuc < cosThetaMin) {
G4double effmass = mass*m1/(mass + m1);
G4double x1 = 1.0 - cosThetaMin;
G4double x2 = 1.0 - cosTetMaxNuc;
G4double z1 = x1 + screenZ;
G4double z2 = x2 + screenZ;
G4double d = 1.0/formfactA;
G4double zn1= x1 + d;
G4double zn2= x2 + d;
nucXSection += coeff*Z*Z*chargeSquare*(1.0 + effmass*effmass/momCM2)
*(1./z1 - 1./z2 + 1./zn1 - 1./zn2 +
2.0*formfactA*std::log(z1*zn2/(z2*zn1)))/momCM2;
//G4cout << "XS: x1= " << x1 << " x2= " << x2
//<< " cross= " << cross << G4endl;
//G4cout << "momCM2= " << momCM2 << " invbeta2= " << invbeta2
// << " coeff= " << coeff << G4endl;
}
if(nucXSection < 0.0) nucXSection = 0.0;
return nucXSection;
}
SetupTarget(Z, tkin);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double xsec = CrossSectionPerAtom();
G4double G4CoulombScatteringModel::SelectIsotope(const G4Element* elm)
{
G4double N = elm->GetN();
G4int ni = elm->GetNumberOfIsotopes();
if(ni > 0) {
G4double* ab = elm->GetRelativeAbundanceVector();
G4double x = G4UniformRand();
G4int idx;
for(idx=0; idx<ni; idx++) {
x -= ab[idx];
if (x <= 0.0) break;
}
if(idx >= ni) {
G4cout << "G4CoulombScatteringModel::SelectIsotope WARNING: "
<< "abandance vector for"
<< elm->GetName() << " is not normalised to unit" << G4endl;
} else {
N = G4double(elm->GetIsotope(idx)->GetN());
}
}
return N;
// restore Lab system kinematics
tkin = xtkin;
mom2 = xmom2;
invbeta2 = xinvb;
return xsec;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -168,80 +123,71 @@ void G4CoulombScatteringModel::SampleSecondaries(
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double cutEnergy,
G4double maxEnergy)
G4double)
{
const G4Material* aMaterial = couple->GetMaterial();
const G4ParticleDefinition* p = dp->GetDefinition();
G4double kinEnergy = dp->GetKineticEnergy();
if(kinEnergy <= DBL_MIN) return;
DefineMaterial(couple);
SetupParticle(dp->GetDefinition());
G4double ekin = std::max(lowEnergyLimit, kinEnergy);
SetupKinematic(ekin, cutEnergy);
// Select isotope and setup
SetupParticle(p);
const G4Element* elm =
SelectRandomAtom(aMaterial,p,kinEnergy,cutEnergy,maxEnergy);
G4double Z = elm->GetZ();
G4double A = SelectIsotope(elm);
// Choose nucleus
currentElement = SelectRandomAtom(couple,particle,ekin,ecut,tkin);
G4double Z = currentElement->GetZ();
G4int iz = G4int(Z);
G4int ia = G4int(A + 0.5);
G4int ia = SelectIsotopeNumber(currentElement);
G4double m2 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia);
G4double cross =
ComputeCrossSectionPerAtom(p,kinEnergy,Z,A,cutEnergy,maxEnergy);
G4double costm = cosTetMaxNuc;
G4double formf = formfactA;
if(G4UniformRand()*cross < elecXSection) {
costm = cosTetMaxElec;
formf = 0.0;
}
// G4cout << "SampleSec: Ekin= " << kinEnergy << " m1= " << m1
// << " Z= "<< Z << " A= " <<A<< G4endl;
if(costm >= cosThetaMin) return;
// kinematics in CM system
G4double m1 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia);
G4double etot = kinEnergy + mass;
// CM system
G4double etot = tkin + mass;
G4double ptot = sqrt(mom2);
G4double bet = ptot/(etot + m1);
G4double momCM= ptot*m2/sqrt(mass*mass + m2*m2 + 2.0*etot*m2);
mom2 = momCM*momCM;
G4double m12 = mass*mass;
G4double eCM = sqrt(mom2 + m12);
// a correction for heavy projectile
G4double fm = m2/(mass + m2);
invbeta2 = 1.0 + m12*fm*fm/mom2;
// sample scattering angle in CM system
SetupTarget(Z, eCM - mass);
G4double cost = SampleCosineTheta();
G4double z1 = 1.0 - cost;
if(z1 < 0.0) return;
G4double sint = sqrt(z1*(1.0 + cost));
G4double phi = twopi * G4UniformRand();
// kinematics in the Lab system
G4double bet = ptot/(etot + m2);
G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
G4double pCM = gam*(ptot - bet*etot);
G4double eCM = gam*(etot - bet*ptot);
G4double pzCM = momCM*cost;
G4double x1 = 1. - cosThetaMin + screenZ;
G4double x2 = 1. - costm;
G4double x3 = cosThetaMin - costm;
G4double grej, z, z1;
do {
z = G4UniformRand()*x3;
z1 = (x1*x2 - screenZ*z)/(x1 + z);
if(z1 < 0.0) z1 = 0.0;
else if(z1 > 2.0) z1 = 2.0;
grej = 1.0/(1.0 + formf*z1);
} while ( G4UniformRand() > grej*grej );
G4double cost = 1.0 - z1;
G4double sint= sqrt(z1*(2.0 - z1));
G4double phi = twopi * G4UniformRand();
// projectile after scattering
G4double pzCM = pCM*cost;
G4ThreeVector v1(pCM*cos(phi)*sint,pCM*sin(phi)*sint,gam*(pzCM + bet*eCM));
G4ThreeVector v1(momCM*cos(phi)*sint,momCM*sin(phi)*sint,gam*(pzCM + bet*eCM));
G4ThreeVector dir = dp->GetMomentumDirection();
G4ThreeVector newDirection = v1.unit();
newDirection.rotateUz(dir);
fParticleChange->ProposeMomentumDirection(newDirection);
G4double elab = gam*(eCM + bet*pzCM);
G4double ekin = elab - mass;
ekin = elab - mass;
if(ekin < 0.0) ekin = 0.0;
G4double plab = sqrt(ekin*(ekin + 2.0*mass));
fParticleChange->SetProposedKineticEnergy(ekin);
// recoil
G4double erec = kinEnergy - ekin;
if(erec > Z*aMaterial->GetIonisation()->GetMeanExcitationEnergy()) {
G4double th =
std::min(recoilThreshold,
Z*currentElement->GetIonisation()->GetMeanExcitationEnergy());
if(erec > th) {
G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
G4double plab = sqrt(ekin*(ekin + 2.0*mass));
G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit();
G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, erec);
fvect->push_back(newdp);
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4GammaConversion.cc,v 1.27 2006/09/14 10:27:19 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4GammaConversion.cc,v 1.30 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------------ G4GammaConversion physics process -------------------------
@@ -78,9 +78,8 @@ G4GammaConversion::G4GammaConversion(const G4String& processName,
G4ProcessType type):G4VEmProcess (processName, type),
isInitialised(false)
{
SetLambdaBinning(100);
SetMinKinEnergy(2.0*electron_mass_c2);
SetMaxKinEnergy(100.0*GeV);
SetProcessSubType(fGammaConversion);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -96,12 +95,11 @@ void G4GammaConversion::InitialiseProcess(const G4ParticleDefinition*)
isInitialised = true;
SetBuildTableFlag(true);
SetSecondaryParticle(G4Electron::Electron());
G4double emin = max(MinKinEnergy(), 2.0*electron_mass_c2);
G4double emin = std::max(MinKinEnergy(), 2.0*electron_mass_c2);
SetMinKinEnergy(emin);
G4double emax = MaxKinEnergy();
if(!Model()) SetModel(new G4BetheHeitlerModel);
if(!Model()) SetModel(new G4BetheHeitlerModel());
Model()->SetLowEnergyLimit(emin);
Model()->SetHighEnergyLimit(emax);
Model()->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(1, Model());
}
}
@@ -109,13 +107,6 @@ void G4GammaConversion::InitialiseProcess(const G4ParticleDefinition*)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4GammaConversion::PrintInfo()
{
G4cout
<< " Total cross sections has a good parametrisation"
<< " from 1.5 MeV to 100 GeV for all Z;"
<< "\n sampling secondary e+e- according "
<< Model()->GetName() << " model"
<< G4endl;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -25,7 +25,7 @@
//
//
// $Id: G4InitXscPAI.cc,v 1.9 2006/06/29 19:53:00 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4InitXscPAI.cc -- class implementation file
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonFluctuations.cc,v 1.5 2007/09/27 14:01:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4IonFluctuations.cc,v 1.24 2008/10/22 16:25:21 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -45,6 +45,8 @@
// 23-05-03 Add control on parthalogical cases (V.Ivanchenko)
// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
// 27-09-07 Use FermiEnergy from material, add cut dependence (V.Ivanchenko)
// 01-02-08 Add protection for small energies and optimise the code (V.Ivanchenko)
// 01-06-08 Added initialisation of effective charge prestep (V.Ivanchenko)
//
// Class Description:
//
@@ -59,20 +61,24 @@
#include "G4Poisson.hh"
#include "G4Material.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4IonFluctuations::G4IonFluctuations(const G4String& nam)
:G4VEmFluctuationModel(nam),
particle(0),
minNumberInteractionsBohr(10.0),
theBohrBeta2(50.0*keV/proton_mass_c2),
minFraction(0.2),
xmin(0.2),
minLoss(0.001*eV)
: G4VEmFluctuationModel(nam),
particle(0),
particleMass(proton_mass_c2),
charge(1.0),
chargeSquare(1.0),
effChargeSquare(1.0),
parameter(10.0*CLHEP::MeV/CLHEP::proton_mass_c2),
minNumberInteractionsBohr(0.0),
theBohrBeta2(50.0*keV/CLHEP::proton_mass_c2),
minFraction(0.2),
xmin(0.2),
minLoss(0.001*eV)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -88,27 +94,35 @@ void G4IonFluctuations::InitialiseMe(const G4ParticleDefinition* part)
particleMass = part->GetPDGMass();
charge = part->GetPDGCharge()/eplus;
chargeSquare = charge*charge;
chargeSqRatio = 1.0;
effChargeSquare= chargeSquare;
uniFluct.InitialiseMe(part);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonFluctuations::SampleFluctuations(const G4Material* material,
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length,
G4double& meanLoss)
G4double& tmax,
G4double& length,
G4double& meanLoss)
{
if(meanLoss <= minLoss) return meanLoss;
// G4cout << "### meanLoss= " << meanLoss << G4endl;
if(meanLoss <= minLoss) return meanLoss;
//G4cout << "G4IonFluctuations::SampleFluctuations E(MeV)= " << dp->GetKineticEnergy()
// << " Elim(MeV)= " << parameter*charge*particleMass << G4endl;
// Vavilov fluctuations
if(dp->GetKineticEnergy() > parameter*charge*particleMass) {
return uniFluct.SampleFluctuations(material,dp,tmax,length,meanLoss);
}
G4double siga = Dispersion(material,dp,tmax,length);
G4double loss = meanLoss;
G4double navr = minNumberInteractionsBohr;
navr = meanLoss*meanLoss/siga;
// G4cout << "### siga= " << sqrt(siga) << " navr= " << navr << G4endl;
//G4cout << "### siga= " << sqrt(siga) << " navr= " << navr << G4endl;
// Gaussian fluctuation
if (navr >= minNumberInteractionsBohr) {
@@ -125,12 +139,15 @@ G4double G4IonFluctuations::SampleFluctuations(const G4Material* material,
}
// G4cout << "siga= " << siga << G4endl;
siga = sqrt(siga);
G4double lossmax = meanLoss+meanLoss;
do {
loss = G4RandGauss::shoot(meanLoss,siga);
} while (0.0 > loss || loss > lossmax);
if(siga > 5.0*meanLoss) {
loss = lossmax*G4UniformRand();
} else {
do {
loss = G4RandGauss::shoot(meanLoss,siga);
} while (0.0 > loss || loss > lossmax);
}
// Poisson fluctuations
} else {
@@ -138,71 +155,73 @@ G4double G4IonFluctuations::SampleFluctuations(const G4Material* material,
loss = meanLoss*n/navr;
}
// G4cout << "meanLoss= " << meanLoss << " loss= " << loss << G4endl;
//G4cout << "meanLoss= " << meanLoss << " loss= " << loss << G4endl;
return loss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonFluctuations::Dispersion(
const G4Material* material,
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length)
G4double G4IonFluctuations::Dispersion(const G4Material* material,
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length)
{
particle = dp->GetDefinition();
charge = particle->GetPDGCharge()/eplus;
particleMass = particle->GetPDGMass();
G4double q = dp->GetCharge()/eplus;
chargeSquare = q*q;
chargeSqRatio = chargeSquare/(charge*charge);
//chargeSquare = charge*charge;
//chargeSqRatio = 1.0;
G4double electronDensity = material->GetElectronDensity();
kineticEnergy = dp->GetKineticEnergy();
kineticEnergy = dp->GetKineticEnergy();
G4double etot = kineticEnergy + particleMass;
//G4cout << "e= " << kineticEnergy << " m= " << particleMass
// << " tmax= " << tmax << " l= " << length << " q^2= " << chargeSquare << G4endl;
beta2 = kineticEnergy*(kineticEnergy + 2.*particleMass)/(etot*etot);
G4double electronDensity = material->GetElectronDensity();
/*
G4cout << "e= " << kineticEnergy << " m= " << particleMass
<< " tmax= " << tmax << " l= " << length
<< " q^2= " << effChargeSquare << " beta2=" << beta2<< G4endl;
*/
G4double siga = (1. - beta2*0.5)*tmax*length*electronDensity*
twopi_mc2_rcl2*chargeSquare/beta2;
// Low velocity - additional ion charge fluctuations according to
// Q.Yang et al., NIM B61(1991)149-155.
G4double zeff = electronDensity/(material->GetTotNbOfAtomsPerVolume());
//G4cout << "siga= " << siga << " zeff= " << zeff << " c= " << c << G4endl;
//G4cout << "sigE= " << sqrt(siga) << " charge= " << charge <<G4endl;
// correction factors with cut dependence
if ( beta2 < 3.0*theBohrBeta2*zeff ) {
G4double Z = electronDensity/material->GetTotNbOfAtomsPerVolume();
G4double fac = Factor(material, Z);
G4double a = CoeffitientA (zeff);
G4double b = CoeffitientB (material, zeff);
// G4cout << "a= " << a << " b= " << b << G4endl;
siga *= (1. + (a*chargeSqRatio + b - 1.0)*2.0*electron_mass_c2*beta2/tmax);
} else {
// heavy ion correction
G4double f1 = 1.065e-4*chargeSquare;
if(beta2 > theBohrBeta2) f1/= beta2;
else f1/= theBohrBeta2;
if(f1 > 2.5) f1 = 2.5;
fac *= (1.0 + f1);
// H.Geissel et al. NIM B, 195 (2002) 3.
siga *= (1. + RelativisticFactor(material, zeff)*2.0*electron_mass_c2*beta2/
(tmax*(1.0 - beta2)));
// taking into account the cut
if(fac > 1.0) {
siga *= (1.0 + (fac - 1.0)*2.0*electron_mass_c2*beta2/(tmax*(1.0 - beta2)));
}
// G4cout << "siga= " << siga << G4endl;
//G4cout << "siga(keV)= " << sqrt(siga)/keV << " fac= " << fac
// << " f1= " << f1 << G4endl;
return siga;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonFluctuations::CoeffitientA(G4double& zeff)
G4double G4IonFluctuations::Factor(const G4Material* material, G4double Z)
{
// The aproximation of energy loss fluctuations
// Q.Yang et al., NIM B61(1991)149-155.
// Reduced energy in MeV/AMU
G4double energy = kineticEnergy * amu_c2/(particleMass*MeV) ;
static G4double a[96][4] = {
G4double energy = kineticEnergy *amu_c2/(particleMass*MeV) ;
// simple approximation for higher beta2
G4double s1 = RelativisticFactor(material, Z);
// tabulation for lower beta2
if( beta2 < 3.0*theBohrBeta2*Z ) {
static G4double a[96][4] = {
{-0.3291, -0.8312, 0.2460, -1.0220},
{-0.5615, -0.5898, 0.5205, -0.7258},
{-0.5280, -0.4981, 0.5519, -0.5865},
@@ -246,7 +265,7 @@ G4double G4IonFluctuations::CoeffitientA(G4double& zeff)
{-0.3977, -0.3608, 1.0260, -0.5852},
{-0.3972, -0.3600, 1.0260, -0.5842},
{-0.3985, -0.3803, 1.0200, -0.6013},
{-0.3985, -0.3803, 1.0200, -0.6013},
{-0.3985, -0.3979, 1.0150, -0.6168},
{-0.3968, -0.3990, 1.0160, -0.6195},
{-0.3971, -0.4432, 1.0050, -0.6591},
@@ -308,27 +327,21 @@ G4double G4IonFluctuations::CoeffitientA(G4double& zeff)
{-0.4307, -0.3292, 1.6210, -0.6447},
{-0.4284, -0.3204, 1.6290, -0.6380},
{-0.4227, -0.3217, 1.6360, -0.6438}
} ;
} ;
G4int iz = (G4int)zeff - 2 ;
if( 0 > iz ) iz = 0 ;
if(95 < iz ) iz = 95 ;
G4int iz = G4int(Z) - 2;
if( 0 > iz ) iz = 0;
else if(95 < iz ) iz = 95;
G4double q = 1.0 / (1.0 + a[iz][0]*pow(energy,a[iz][1])+
+ a[iz][2]*pow(energy,a[iz][3])) ;
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonFluctuations::CoeffitientB(const G4Material* material, G4double& zeff)
{
// The aproximation of energy loss fluctuations
// Q.Yang et al., NIM B61(1991)149-155.
// Reduced energy in MeV/AMU
G4double energy = kineticEnergy *amu_c2/(particleMass*MeV) ;
G4double ss = 1.0 + a[iz][0]*pow(energy,a[iz][1])+
+ a[iz][2]*pow(energy,a[iz][3]);
// protection for the validity range for low beta
G4double slim = 0.001;
if(ss < slim) s1 = 1.0/slim;
// for high value of beta
else if(s1*ss < 1.0) s1 = 1.0/ss;
}
G4int i = 0 ;
G4double factor = 1.0 ;
@@ -352,7 +365,8 @@ G4double G4IonFluctuations::CoeffitientB(const G4Material* material, G4double& z
// ions
} else {
factor = charge * pow(charge/zeff, 0.3333) ;
factor = charge * pow(charge/Z, 0.33333333);
if( kStateGas == material->GetState() ) {
energy /= (charge * sqrt(charge)) ;
@@ -364,35 +378,44 @@ G4double G4IonFluctuations::CoeffitientB(const G4Material* material, G4double& z
}
} else {
energy /= (charge * sqrt(charge*zeff)) ;
energy /= (charge * sqrt(charge*Z)) ;
i = 4 ;
}
}
G4double x = b[i][2] * (1.0 - exp( - energy * b[i][3] )) ;
G4double x = b[i][2];
G4double y = energy * b[i][3];
if(y <= 0.2) x *= (y*(1.0 - 0.5*y));
else x *= (1.0 - exp(-y));
G4double q = factor * x * b[i][0] /
((energy - b[i][1])*(energy - b[i][1]) + x*x) ;
y = energy - b[i][1];
return q ;
G4double s2 = factor * x * b[i][0] / (y*y + x*x);
/*
G4cout << "s1= " << s1 << " s2= " << s2 << " q^2= " << effChargeSquare
<< " e= " << energy << G4endl;
*/
return s1*effChargeSquare/chargeSquare + s2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonFluctuations::RelativisticFactor(const G4Material* material,
G4double& zeff)
G4double G4IonFluctuations::RelativisticFactor(const G4Material* mat,
G4double Z)
{
// H.Geissel et al. NIM B, 195 (2002) 3.
G4double eF = material->GetIonisation()->GetFermiEnergy();
G4double bF2= 2.0*eF/electron_mass_c2;
G4double I = material->GetIonisation()->GetMeanExcitationEnergy();
G4double f = 0.4*bF2*(1.0 - beta2)/((1.0 - 0.5*beta2)*beta2*zeff);
if(beta2 > bF2) f *= log(2.0*electron_mass_c2*beta2/I);
else f *= log(4.0*eF/I);
G4double factor = (1.0 + f)*(1.0 + 1.415e-4*chargeSquare/beta2);
G4double eF = mat->GetIonisation()->GetFermiEnergy();
G4double I = mat->GetIonisation()->GetMeanExcitationEnergy();
return factor;
// H.Geissel et al. NIM B, 195 (2002) 3.
G4double bF2= 2.0*eF/electron_mass_c2;
G4double f = 0.4*(1.0 - beta2)/((1.0 - 0.5*beta2)*Z);
if(beta2 > bF2) f *= log(2.0*electron_mass_c2*beta2/I)*bF2/beta2;
else f *= log(4.0*eF/I);
// G4cout << "f= " << f << " beta2= " << beta2
// << " bf2= " << bF2 << " q^2= " << chargeSquare << G4endl;
return 1.0 + f;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4KleinNishinaCompton.cc,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4MollerBhabhaModel.cc,v 1.30 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MscModel71.cc,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MscModel71.cc,v 1.6 2008/03/13 17:20:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -560,12 +560,12 @@ G4double G4MscModel71::SampleCosineTheta(G4double trueStepLength, G4double Kinet
G4double cth = 1. ;
G4double tau = trueStepLength/lambda0 ;
if(trueStepLength >= currentRange*dtrl)
if(trueStepLength >= currentRange*dtrl) {
if(par1*trueStepLength < 1.)
tau = -par2*log(1.-par1*trueStepLength) ;
else
tau = taubig ;
}
currentTau = tau ;
if(trueStepLength < stepmin)
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering.cc,v 1.70 2007/10/29 08:57:19 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering.cc,v 1.75 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
@@ -120,6 +120,7 @@
// 23-11-06 skin = 1 by default for e+-, 0 for other particles (VI)
// 12-02-07 skin can be changed via UI command, default skin=1 (VI)
// 24-04-07 default skin=0 (temporal protection) (VI)
// 11-03-08 use G4VMscModel interface (VI)
//
// -----------------------------------------------------------------------------
//
@@ -129,6 +130,7 @@
#include "G4MultipleScattering.hh"
#include "G4UrbanMscModel.hh"
#include "G4MscStepLimitType.hh"
#include "G4UrbanMscModel.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -137,11 +139,7 @@ using namespace std;
G4MultipleScattering::G4MultipleScattering(const G4String& processName)
: G4VMultipleScattering(processName)
{
dtrl = 0.05;
lambdalimit = 1.*mm;
samplez = false ;
isInitialized = false;
isInitialized = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -177,16 +175,16 @@ void G4MultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
SetStepLimitType(fMinimal);
SetLateralDisplasmentFlag(false);
SetBuildLambdaTable(false);
SetSkin(0.0);
SetRangeFactor(0.2);
}
// initialisation of parameters - defaults for particles other
// than ions can be overwritten by users
mscUrban = new G4UrbanMscModel(RangeFactor(),dtrl,lambdalimit,
GeomFactor(),Skin(),
samplez,StepLimitType());
mscUrban = new G4UrbanMscModel();
mscUrban->SetStepLimitType(StepLimitType());
mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
mscUrban->SetSkin(Skin());
mscUrban->SetRangeFactor(RangeFactor());
mscUrban->SetGeomFactor(GeomFactor());
AddEmModel(1,mscUrban);
isInitialized = true;
@@ -203,9 +201,11 @@ void G4MultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
void G4MultipleScattering::PrintInfo()
{
G4cout << " Boundary/stepping algorithm is active with RangeFactor= "
<< RangeFactor()
<< " Step limit type " << StepLimitType()
G4cout << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", skin= " << Skin()
<< ", geomFactor= " << GeomFactor()
<< G4endl;
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering71.cc,v 1.4 2006/10/16 15:26:49 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering71.cc,v 1.5 2008/07/16 11:27:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
// 16/05/01 value of cparm changed , L.Urban
@@ -75,6 +75,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MultipleScattering71.hh"
#include "G4LossTableManager.hh"
#include "G4MscModel71.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -175,6 +176,33 @@ G4double G4MultipleScattering71::TruePathLengthLimit(const G4Track& track,
return tPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MultipleScattering71::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimalStep,
G4double&)
{
DefineMaterial(track.GetMaterialCutsCouple());
const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple();
G4double e = track.GetKineticEnergy();
model = dynamic_cast<G4MscModel71*>(SelectModel(e));
const G4ParticleDefinition* p = track.GetDefinition();
G4double lambda0 = GetLambda(p, e);
range = G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple);
if(range < currentMinimalStep) currentMinimalStep = range;
truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep);
// G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= "
// << lambda0 << " range= " << currentRange
// << " currentMinStep= " << currentMinimalStep << G4endl;
if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;
geomPathLength = model->GeomPathLength(LambdaTable(),couple,
p,e,lambda0,range,truePathLength);
if(geomPathLength > lambda0) geomPathLength = lambda0;
return geomPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MultipleScattering71::PrintInfo()
@@ -665,8 +665,16 @@ G4PAIModel::GetPostStepTransfer( G4double scaledTkin )
// G4cout<<position<<"\t" ;
for( iTransfer = 0;
iTransfer < G4int((*fPAItransferTable)(iPlace)->GetVectorLength()); iTransfer++ )
G4int iTrMax1, iTrMax2, iTrMax;
iTrMax1 = G4int((*fPAItransferTable)(iPlace)->GetVectorLength());
iTrMax2 = G4int((*fPAItransferTable)(iPlace+1)->GetVectorLength());
if (iTrMax1 >= iTrMax2) iTrMax = iTrMax2;
else iTrMax = iTrMax1;
for( iTransfer = 0; iTransfer < iTrMax; iTransfer++ )
{
if( position >=
( (*(*fPAItransferTable)(iPlace))(iTransfer)*W1 +
@@ -690,35 +698,36 @@ G4PAIModel::GetPostStepTransfer( G4double scaledTkin )
G4double
G4PAIModel::GetEnergyTransfer( G4int iPlace, G4double position, G4int iTransfer )
{
G4double x1, x2, y1, y2, energyTransfer ;
G4int iTransferMax;
G4double x1, x2, y1, y2, energyTransfer;
if(iTransfer == 0)
{
energyTransfer = (*fPAItransferTable)(iPlace)->GetLowEdgeEnergy(iTransfer) ;
energyTransfer = (*fPAItransferTable)(iPlace)->GetLowEdgeEnergy(iTransfer);
}
else
{
if ( iTransfer >= G4int((*fPAItransferTable)(iPlace)->GetVectorLength()) )
{
iTransfer = (*fPAItransferTable)(iPlace)->GetVectorLength() - 1 ;
}
y1 = (*(*fPAItransferTable)(iPlace))(iTransfer-1) ;
y2 = (*(*fPAItransferTable)(iPlace))(iTransfer) ;
iTransferMax = G4int((*fPAItransferTable)(iPlace)->GetVectorLength());
x1 = (*fPAItransferTable)(iPlace)->GetLowEdgeEnergy(iTransfer-1) ;
x2 = (*fPAItransferTable)(iPlace)->GetLowEdgeEnergy(iTransfer) ;
if ( iTransfer >= iTransferMax ) iTransfer = iTransferMax - 1;
y1 = (*(*fPAItransferTable)(iPlace))(iTransfer-1);
y2 = (*(*fPAItransferTable)(iPlace))(iTransfer);
if ( x1 == x2 ) energyTransfer = x2 ;
x1 = (*fPAItransferTable)(iPlace)->GetLowEdgeEnergy(iTransfer-1);
x2 = (*fPAItransferTable)(iPlace)->GetLowEdgeEnergy(iTransfer);
if ( x1 == x2 ) energyTransfer = x2;
else
{
if ( y1 == y2 ) energyTransfer = x1 + (x2 - x1)*G4UniformRand() ;
if ( y1 == y2 ) energyTransfer = x1 + (x2 - x1)*G4UniformRand();
else
{
energyTransfer = x1 + (position - y1)*(x2 - x1)/(y2 - y1) ;
energyTransfer = x1 + (position - y1)*(x2 - x1)/(y2 - y1);
}
}
}
return energyTransfer ;
return energyTransfer;
}
///////////////////////////////////////////////////////////////////////
@@ -926,14 +926,21 @@ G4PAIPhotonModel::GetPostStepTransfer( G4PhysicsTable* pTable,
// G4cout<<position<<"\t" ;
for( iTransfer = 0;
iTransfer < G4int((*pTable)(iPlace)->GetVectorLength()); iTransfer++ )
G4int iTrMax1, iTrMax2, iTrMax;
iTrMax1 = G4int((*pTable)(iPlace)->GetVectorLength());
iTrMax2 = G4int((*pTable)(iPlace+1)->GetVectorLength());
if (iTrMax1 >= iTrMax2) iTrMax = iTrMax2;
else iTrMax = iTrMax1;
for( iTransfer = 0; iTransfer < iTrMax; iTransfer++ )
{
if( position >=
( (*(*pTable)(iPlace))(iTransfer)*W1 +
(*(*pTable)(iPlace+1))(iTransfer)*W2) ) break ;
}
transfer = GetEnergyTransfer(pTable,iPlace,position,iTransfer);
transfer = GetEnergyTransfer(pTable, iPlace, position, iTransfer);
}
}
// G4cout<<"PAIPhotonModel PostStepTransfer = "<<transfer/keV<<" keV"<<G4endl ;
@@ -950,35 +957,36 @@ G4double
G4PAIPhotonModel::GetEnergyTransfer( G4PhysicsTable* pTable, G4int iPlace,
G4double position, G4int iTransfer )
{
G4double x1, x2, y1, y2, energyTransfer ;
G4int iTransferMax;
G4double x1, x2, y1, y2, energyTransfer;
if(iTransfer == 0)
{
energyTransfer = (*pTable)(iPlace)->GetLowEdgeEnergy(iTransfer) ;
energyTransfer = (*pTable)(iPlace)->GetLowEdgeEnergy(iTransfer);
}
else
{
if ( iTransfer >= G4int((*pTable)(iPlace)->GetVectorLength()) )
{
iTransfer = (*pTable)(iPlace)->GetVectorLength() - 1 ;
}
y1 = (*(*pTable)(iPlace))(iTransfer-1) ;
y2 = (*(*fPAItransferTable)(iPlace))(iTransfer) ;
iTransferMax = G4int((*pTable)(iPlace)->GetVectorLength());
x1 = (*pTable)(iPlace)->GetLowEdgeEnergy(iTransfer-1) ;
x2 = (*pTable)(iPlace)->GetLowEdgeEnergy(iTransfer) ;
if ( iTransfer >= iTransferMax) iTransfer = iTransferMax - 1;
y1 = (*(*pTable)(iPlace))(iTransfer-1);
y2 = (*(*fPAItransferTable)(iPlace))(iTransfer);
if ( x1 == x2 ) energyTransfer = x2 ;
x1 = (*pTable)(iPlace)->GetLowEdgeEnergy(iTransfer-1);
x2 = (*pTable)(iPlace)->GetLowEdgeEnergy(iTransfer);
if ( x1 == x2 ) energyTransfer = x2;
else
{
if ( y1 == y2 ) energyTransfer = x1 + (x2 - x1)*G4UniformRand() ;
if ( y1 == y2 ) energyTransfer = x1 + (x2 - x1)*G4UniformRand();
else
{
energyTransfer = x1 + (position - y1)*(x2 - x1)/(y2 - y1) ;
energyTransfer = x1 + (position - y1)*(x2 - x1)/(y2 - y1);
}
}
}
return energyTransfer ;
return energyTransfer;
}
///////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
@@ -25,7 +25,7 @@
//
//
// $Id: G4PAIySection.cc,v 1.3 2007/10/01 18:38:10 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4PAIySection.cc -- class implementation file
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4PEEffectModel.cc,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PSTARStopping.cc,v 1.5 2006/06/29 19:53:24 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PSTARStopping.cc,v 1.8 2008/11/24 18:28:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//---------------------------------------------------------------------------
//
@@ -52,6 +52,7 @@
G4PSTARStopping::G4PSTARStopping()
{
currentE = 0.0;
currentMaterial = 0;
index = 0;
matIndex = -1;
@@ -71,7 +72,7 @@ G4int G4PSTARStopping:: GetIndex (const G4Material* mat)
G4String matName = mat->GetName();
for (G4int i=0; i<74; i++){
if (matName == name[i]){
matIndex= -1;
matIndex = i;
currentMaterial = mat;
return i;
}
@@ -114,15 +115,13 @@ G4double G4PSTARStopping::GetElectronicDEDX(G4int i, G4double energy)
G4double e2 = e[matIndex][index+1];
res = e1*std::exp(std::log(energy/t1)*std::log(e2/e1)/std::log(t2/t1));
return res;
}
}
void G4PSTARStopping::Initialise()
{
G4int i;
name [0] = "G4_A-150_TISSUE";
Znum [0] = 0;
G4double T0[60] = {
0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008,
0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03,
@@ -130,519 +129,372 @@ void G4PSTARStopping::Initialise()
0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25,
0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7,
0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.25, 1.5, 1.75, 2. };
G4double e0[60] = { 176.8, 216.6, 250.1, 279.6, 306.3, 351.1, 390.9, 426.8, 459.8, 489.9, 517.8, 544, 596.4, 641.3, 680.6, 715.7, 747, 775, 800, 822.6, 861.7, 894.2, 920.7, 941.5, 957.3, 968.6, 976.2, 980.5, 982, 981, 978, 973.2, 967, 959.5, 910.4, 853.6, 797.9, 746.9, 701.5, 661.5, 626.4, 595.6, 544.8, 504.4, 471.1, 442.8, 416.4, 392, 369.9, 350, 332.2, 316.4, 302.2, 289.5, 278.1, 267.9, 228.9, 200.8, 179.5, 162.6 };
for(i=0; i<60; i++) {e[0][i]=e0[i]*MeV*cm2/g;}
for(i=0; i<60; i++) {kinE[i]=T0[i]*MeV;}
name [1] = "G4_ACETYLENE";
Znum [1] = 0;
G4double e1[60] = { 185.5, 227.2, 262.3, 293.2, 321.2, 364.8, 404, 439.3, 471.6, 500.3, 526.4, 550.6, 600.2, 641.6, 677.4, 709.2, 737.3, 762, 783.7, 803.1, 837.2, 866.8, 891.7, 911.6, 926.6, 937.4, 944.7, 949, 950.8, 950.3, 947.9, 943.9, 938.4, 931.8, 887.1, 833.7, 779.9, 729.5, 686.8, 650.4, 618.5, 590.2, 541.4, 500.4, 465.3, 434.8, 408, 384.6, 364.4, 346.5, 330.5, 316.1, 303.2, 291.3, 280.4, 270.4, 230.7, 202.2, 180.5, 163.5 };
for(i=0; i<60; i++) {e[1][i]=e1[i]*MeV*cm2/g;}
name [2] = "G4_ADIPOSE_TISSUE_ICRP";
Znum [2] = 0;
G4double e2[60] = { 195.9, 239.9, 277, 309.7, 339.3, 387.5, 430.6, 469.4, 505, 537.2, 566.9, 594.6, 649.9, 696.7, 737.4, 773.3, 805.2, 833.4, 858.3, 880.5, 918.9, 951, 977.2, 997.6, 1013, 1023, 1030, 1034, 1034, 1033, 1029, 1023, 1016, 1008, 955.6, 895, 835.1, 779.6, 729.7, 685.6, 646.6, 612.3, 555, 509.1, 471.6, 440.3, 413.7, 390.4, 370.1, 352.1, 336, 321.4, 308.3, 296.3, 285.3, 275.2, 234.9, 206, 184, 166.7 };
for(i=0; i<60; i++) {e[2][i]=e2[i]*MeV*cm2/g;}
name [3] = "G4_Ag";
Znum [3] = 47;
G4double e3[60] = { 29.73, 36.41, 42.05, 47.01, 51.5, 59.46, 66.48, 72.83, 78.66, 84.09, 89.2, 94.02, 103.7, 112.1, 119.7, 126.6, 132.8, 138.5, 143.7, 148.5, 157.1, 164.3, 170.5, 175.7, 180.1, 183.7, 186.7, 189.1, 191.1, 192.5, 193.6, 194.4, 194.8, 195, 193.4, 189.3, 184.4, 179.2, 174.1, 169.3, 164.8, 160.5, 152.7, 145.7, 139.5, 133.8, 128.6, 123.9, 119.5, 115.4, 111.7, 108.1, 104.8, 101.7, 98.74, 95.98, 84.49, 75.92, 69.3, 64.05 };
for(i=0; i<60; i++) {e[3][i]=e3[i]*MeV*cm2/g;}
name [4] = "G4_AIR";
Znum [4] = 0;
G4double e4[60] = { 119.7, 146.7, 169.3, 189.3, 207.4, 239.5, 267.8, 293.3, 316.8, 338.7, 359.2, 378.7, 417, 450.4, 480.1, 506.7, 530.7, 552.6, 572.4, 590.5, 622.1, 648.3, 670, 687.7, 702, 713.2, 721.7, 727.8, 731.9, 734.1, 734.8, 734, 732, 729, 702.9, 667.2, 629.1, 592.2, 558.3, 527.8, 500.6, 476.3, 434.9, 401.2, 373.3, 349.8, 329.7, 312.1, 296.4, 282.4, 269.9, 258.7, 248.5, 239.1, 230.6, 222.7, 191.1, 168.2, 150.8, 137 };
for(i=0; i<60; i++) {e[4][i]=e4[i]*MeV*cm2/g;}
name [5] = "G4_Al";
Znum [5] = 13;
G4double e5[60] = { 92.38, 113.1, 130.6, 146.1, 160, 184.8, 206.6, 226.3, 244.4, 261.3, 277.1, 292.1, 320.6, 344.8, 365.7, 383.8, 399.6, 413.2, 425, 435.1, 451, 462, 469.2, 473.4, 475.2, 475.1, 473.7, 471.2, 468, 464.2, 460.1, 455.8, 451.3, 446.8, 424.5, 404.5, 386.7, 371, 356.8, 344, 332.3, 321.5, 301.7, 284.2, 268.6, 254.8, 242.5, 231.4, 221.5, 212.4, 204.2, 196.6, 189.7, 183.3, 177.4, 171.9, 149.4, 132.7, 119.8, 109.4 };
for(i=0; i<60; i++) {e[5][i]=e5[i]*MeV*cm2/g;}
name [6] = "G4_ALUMINUM_OXIDE";
Znum [6] = 0;
G4double e6[60] = { 73.51, 90.03, 104, 116.2, 127.3, 147, 164.4, 180.1, 194.5, 207.9, 220.5, 232.5, 256.1, 276.8, 295.3, 311.9, 327, 340.8, 353.4, 364.9, 385.3, 402.5, 417, 429.2, 439.3, 447.6, 454.3, 459.6, 463.7, 466.6, 468.6, 469.8, 470.2, 470, 461.9, 447.2, 430.1, 412.7, 396.5, 381.4, 367.5, 354.5, 331.1, 310.6, 292.6, 276.5, 262.2, 249.4, 238.1, 227.9, 218.7, 210.2, 202.6, 195.7, 189.2, 183.2, 158.9, 140.9, 127, 116 };
for(i=0; i<60; i++) {e[6][i]=e6[i]*MeV*cm2/g;}
name [7] = "G4_Ar";
Znum [7] = 40;
G4double e7[60] = { 86.08, 105.4, 121.7, 136.1, 149.1, 172.2, 192.5, 210.9, 227.7, 243.5, 258.2, 272.2, 299.7, 323.5, 344.5, 363.3, 380.2, 395.3, 409, 421.4, 442.5, 459.4, 472.8, 483.1, 490.7, 496, 499.2, 500.7, 500.8, 499.5, 497.2, 494, 490, 485.5, 457.4, 426.7, 397.7, 371.9, 349.5, 330.1, 313.2, 298.5, 274.2, 254.9, 239, 225.6, 214.4, 204.7, 196.1, 188.4, 181.3, 174.9, 168.9, 163.4, 158.2, 153.3, 133, 118.2, 106.8, 97.72 };
for(i=0; i<60; i++) {e[7][i]=e7[i]*MeV*cm2/g;}
name [8] = "G4_Au";
Znum [8] = 79;
G4double e8[60] = { 14.76, 18.07, 20.87, 23.33, 25.56, 29.51, 33, 36.15, 39.04, 41.74, 44.27, 46.66, 51.51, 55.8, 59.66, 63.18, 66.43, 69.43, 72.23, 74.84, 79.58, 83.77, 87.5, 90.81, 93.77, 96.4, 98.74, 100.8, 102.6, 104.3, 105.7, 106.9, 108, 108.9, 111.5, 112, 111.2, 109.6, 107.6, 105.4, 103.2, 101, 96.33, 91.8, 87.7, 84.05, 80.83, 78, 75.47, 73.18, 71.11, 69.21, 67.46, 65.83, 64.32, 62.91, 56.98, 52.39, 48.68, 45.58 };
for(i=0; i<60; i++) {e[8][i]=e8[i]*MeV*cm2/g;}
name [9] = "G4_B-100_BONE";
Znum [9] = 0;
G4double e9[60] = { 142.5, 174.5, 201.5, 225.2, 246.7, 283.1, 315.3, 344.4, 371.1, 395.5, 418.2, 439.6, 482.3, 519, 551.3, 580.1, 606, 629.2, 650.1, 669, 701.9, 729.5, 752.2, 770.4, 784.5, 795.1, 802.6, 807.4, 810, 810.5, 809.3, 806.6, 802.7, 797.7, 762.5, 719.5, 676.2, 635.8, 599.3, 566.7, 537.9, 512.3, 468.1, 431.4, 400.8, 375, 353, 333.7, 316.9, 301.9, 288.5, 276.3, 265.3, 255.1, 245.9, 237.4, 203.4, 178.9, 160.2, 145.4 };
for(i=0; i<60; i++) {e[9][i]=e9[i]*MeV*cm2/g;}
name [10] = "G4_Be";
Znum [10] = 4;
G4double e10[60] = { 149.7, 183.3, 211.7, 236.7, 259.2, 299.3, 334.7, 366.6, 396, 423.3, 449, 473.3, 517.2, 553.4, 583.6, 608.7, 629.6, 646.8, 660.7, 671.9, 687.3, 695.5, 698.4, 697.6, 694.2, 689.1, 682.8, 675.7, 668.2, 660.5, 652.7, 644.9, 637.2, 629.6, 594.2, 563, 535.4, 510.7, 488.4, 468.2, 449.8, 432.8, 404.4, 380.1, 358.1, 337.6, 318.8, 302.2, 287.4, 274.2, 262.3, 251.5, 241.7, 232.7, 224.4, 216.8, 186, 163.6, 146.3, 132.6 };
for(i=0; i<60; i++) {e[10][i]=e10[i]*MeV*cm2/g;}
name [11] = "G4_BONE_COMPACT_ICRU";
Znum [11] = 0;
G4double e11[60] = { 141.6, 173.4, 200.2, 223.8, 245.2, 281.3, 313.3, 342.2, 368.8, 393.1, 415.6, 436.8, 479, 515.2, 547, 575.3, 600.7, 623.4, 643.8, 662.1, 694.2, 721, 743.2, 760.9, 774.8, 785.2, 792.6, 797.6, 800.3, 801.1, 800.3, 797.9, 794.4, 789.9, 756.4, 714.5, 671.4, 630.5, 593.2, 559.7, 530, 503.5, 459, 423, 393.3, 368.3, 346.9, 328.1, 311.6, 296.9, 283.7, 271.8, 261, 251.1, 242, 233.7, 200.3, 176.3, 158, 143.5 };
for(i=0; i<60; i++) {e[11][i]=e11[i]*MeV*cm2/g;}
name [12] = "G4_C";
Znum [12] = 6;
G4double e12[60] = { 138.4, 169.5, 195.7, 218.8, 239.7, 270.2, 297.8, 322.7, 345.4, 365.1, 382.6, 398.7, 433.5, 462.4, 487.4, 509.9, 530, 547.7, 563.4, 577.6, 603.9, 628.3, 650.1, 668.6, 683.5, 695.3, 704.5, 711.4, 716.3, 719.4, 720.8, 720.9, 719.7, 717.4, 694.5, 661.1, 624.7, 589.1, 556, 526, 499.1, 475, 435.8, 404.4, 377.9, 354.6, 334, 315.9, 300.2, 286.2, 273.7, 262.4, 252.2, 242.7, 234.1, 226.1, 194.2, 171.1, 153.4, 139.4 };
for(i=0; i<60; i++) {e[12][i]=e12[i]*MeV*cm2/g;}
name [13] = "G4_C_Graphite";
Znum [13] = 0;
name [13] = "G4_GRAPHITE";
G4double e13[60] = { 142.6, 175.3, 203.1, 228, 250.5, 283.4, 313.3, 340.4, 365.1, 386.7, 405.9, 423.5, 462, 494, 521.9, 546.9, 569.3, 589.2, 606.9, 622.9, 652.4, 679.9, 704.5, 725.3, 742.2, 755.6, 766.1, 774, 779.6, 783.1, 784.7, 784.8, 783.4, 780.7, 753.8, 714.5, 671.4, 629.1, 590.2, 555.6, 524.9, 497.7, 453.9, 419.3, 390.3, 365.1, 343, 323.7, 307.1, 292.3, 279.1, 267.3, 256.6, 246.8, 237.8, 229.5, 196.7, 173, 155, 140.8 };
for(i=0; i<60; i++) {e[13][i]=e13[i]*MeV*cm2/g;}
name [14] = "G4_ETHYLENE";
Znum [14] = 0;
G4double e14[60] = { 225.8, 276.5, 319.3, 357, 391.1, 445.9, 494.9, 539.1, 579.6, 616, 649.5, 680.6, 742.9, 795.1, 840.1, 879.9, 914.8, 945.5, 972.4, 996.1, 1037, 1071, 1099, 1120, 1135, 1145, 1150, 1152, 1152, 1148, 1142, 1135, 1126, 1115, 1052, 981.5, 912.8, 849.7, 795.6, 749, 708.3, 672.4, 611.7, 562.1, 520.6, 485.3, 454.9, 428.4, 405.5, 385.2, 367.1, 350.8, 336.2, 322.8, 310.5, 299.3, 254.6, 222.7, 198.6, 179.6 };
for(i=0; i<60; i++) {e[14][i]=e14[i]*MeV*cm2/g;}
name [15] = "G4_C-552";
Znum [15] = 0;
G4double e15[60] = { 119.2, 146, 168.6, 188.5, 206.5, 235.1, 260.7, 283.8, 305, 323.9, 341.3, 357.4, 390.7, 418.9, 443.7, 465.8, 485.7, 503.6, 519.5, 534.1, 560.1, 583.2, 603.2, 620, 633.7, 644.7, 653.4, 660.1, 665, 668.4, 670.3, 671.1, 670.7, 669.5, 652.9, 626.4, 596.2, 565.7, 537, 510.7, 486.8, 465.1, 427.5, 396.1, 369.6, 347, 327.4, 310.1, 294.9, 281.3, 269, 258, 247.9, 238.6, 230.2, 222.4, 191, 168.2, 150.8, 137 };
for(i=0; i<60; i++) {e[15][i]=e15[i]*MeV*cm2/g;}
name [16] = "G4_CARBON_DIOXIDE";
Znum [16] = 0;
G4double e16[60] = { 106.4, 130.3, 150.4, 168.2, 184.2, 212.7, 237.9, 260.6, 281.4, 300.9, 319.1, 336.4, 370.9, 401.2, 428.3, 452.8, 475.1, 495.6, 514.4, 531.8, 562.6, 588.8, 611.2, 630.2, 646.1, 659.3, 670.1, 678.6, 685.2, 690, 693.2, 694.9, 695.4, 694.8, 679, 650.5, 617.3, 583.6, 552.1, 523.6, 497.8, 474.6, 434.7, 401.8, 374.3, 351, 330.9, 313.2, 297.6, 283.7, 271.2, 259.9, 249.6, 240.3, 231.7, 223.7, 191.9, 168.9, 151.4, 137.5 };
for(i=0; i<60; i++) {e[16][i]=e16[i]*MeV*cm2/g;}
name [17] = "G4_CALCIUM_FLUORIDE";
Znum [17] = 0;
G4double e17[60] = { 74.48, 91.21, 105.3, 117.8, 129, 149, 166.5, 182.4, 197, 210.6, 223.4, 235.5, 259.6, 280.7, 299.6, 316.6, 332, 346.2, 359.1, 371.1, 392.2, 410.1, 425.2, 438, 448.7, 457.5, 464.6, 470.3, 474.7, 477.9, 480.1, 481.4, 481.9, 481.7, 473, 456.7, 437.6, 417.8, 398.6, 380.6, 364, 348.7, 322.9, 301.7, 283.5, 267.5, 253.4, 240.9, 229.8, 219.9, 210.8, 202.5, 194.8, 187.7, 181.3, 175.5, 151.6, 134.4, 121.1, 110.6 };
for(i=0; i<60; i++) {e[17][i]=e17[i]*MeV*cm2/g;}
name [18] = "G4_CERIC_SULFATE";
Znum [18] = 0;
G4double e18[60] = { 135.4, 165.8, 191.5, 214.1, 234.5, 270.8, 302.8, 331.7, 358.2, 383, 406.2, 428.2, 471.7, 509.8, 543.6, 574, 601.5, 626.5, 649.3, 670.1, 706.4, 736.5, 761.2, 781.4, 797.4, 809.8, 819, 825.3, 829.2, 830.8, 830.6, 828.7, 825.4, 820.9, 785.9, 741.4, 696, 653.6, 618.4, 588.8, 562.8, 539.6, 499.3, 464.8, 434.6, 407.9, 384.2, 363.4, 344.9, 328.4, 313.6, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 };
for(i=0; i<60; i++) {e[18][i]=e18[i]*MeV*cm2/g;}
name [19] = "G4_CELLULOSE_NITRATE";
Znum [19] = 0;
G4double e19[60] = { 132.2, 161.9, 187, 209, 229, 262.6, 292.5, 319.4, 344.2, 366.8, 387.8, 407.5, 447, 481, 510.8, 537.6, 561.6, 583.2, 602.7, 620.4, 651.5, 677.9, 700, 718.2, 732.7, 744.1, 752.7, 759, 763.2, 765.5, 766.2, 765.5, 763.5, 760.6, 734.4, 698.2, 659.3, 621.4, 586, 553.8, 524.9, 498.9, 452.4, 413.9, 382.9, 358, 337.7, 319.7, 303.9, 289.7, 277.1, 265.6, 255.2, 245.6, 236.9, 228.8, 196.4, 173, 155, 140.8 };
for(i=0; i<60; i++) {e[19][i]=e19[i]*MeV*cm2/g;}
name [20] = "G4_BONE_CORTICAL_ICRP";
Znum [20] = 0;
G4double e20[60] = { 123.5, 151.3, 174.7, 195.3, 214, 246.1, 274.5, 300.2, 323.8, 345.6, 365.9, 385, 423, 455.7, 484.7, 510.5, 533.8, 554.8, 573.7, 590.9, 620.8, 645.9, 666.5, 683.3, 696.6, 706.8, 714.4, 719.7, 723, 724.5, 724.5, 723.1, 720.6, 717.1, 689.6, 653.5, 615.8, 579.8, 546.6, 516.7, 490, 466.2, 426.1, 393.6, 366.6, 343.7, 324, 306.7, 291.5, 278, 265.8, 254.7, 244.7, 235.5, 227.1, 219.4, 188.4, 166.1, 149, 135.4 };
for(i=0; i<60; i++) {e[20][i]=e20[i]*MeV*cm2/g;}
name [21] = "G4_CESIUM_IODIDE";
Znum [21] = 0;
G4double e21[60] = { 34.67, 42.46, 49.03, 54.82, 60.05, 69.34, 77.52, 84.92, 91.73, 98.06, 104, 109.6, 121, 130.9, 139.9, 148, 155.5, 162.3, 168.6, 174.5, 184.9, 194, 201.8, 208.5, 214.2, 219, 223, 226.3, 228.9, 231, 232.5, 233.4, 234, 234.1, 230.4, 221.9, 211.4, 200.6, 190.1, 180.6, 171.9, 164.1, 151.1, 140.6, 132.1, 125.1, 119.1, 114, 109.6, 105.6, 102.1, 98.92, 95.83, 92.83, 89.95, 87.22, 75.76, 67.41, 61.26, 56.63 };
for(i=0; i<60; i++) {e[21][i]=e21[i]*MeV*cm2/g;}
name [22] = "G4_Cu";
Znum [22] = 29;
G4double e22[60] = { 34.9, 42.74, 49.35, 55.18, 60.45, 69.8, 78.04, 85.48, 92.33, 98.71, 104.7, 110.4, 121.4, 130.9, 139.2, 146.6, 153.2, 159, 164.3, 168.9, 176.9, 183.2, 188.4, 192.5, 195.9, 198.7, 201, 202.8, 204.4, 205.6, 206.7, 207.5, 208.2, 208.7, 209.9, 209.2, 207.5, 205.1, 202.3, 199.1, 195.8, 192.3, 185.4, 178.6, 172, 165.8, 159.6, 153.6, 148, 142.7, 137.8, 133.3, 129.1, 125.2, 121.7, 118.3, 104.7, 94.43, 86.45, 79.87 };
for(i=0; i<60; i++) {e[22][i]=e22[i]*MeV*cm2/g;}
name [23] = "G4_Fe";
Znum [23] = 26;
G4double e23[60] = { 37.81, 46.31, 53.47, 59.78, 65.49, 75.62, 84.54, 92.61, 100, 106.9, 113.4, 119.6, 132, 143, 153, 162, 170.4, 178.2, 185.4, 192.2, 204.6, 215.6, 225.4, 234.2, 242.1, 249.2, 255.5, 261.2, 266.2, 270.7, 274.6, 278.1, 281, 283.6, 290.9, 291.5, 287.6, 281, 272.8, 263.9, 254.9, 246, 229.5, 214.8, 202.1, 191.1, 181.6, 173.4, 166.2, 159.7, 153.8, 148.5, 143.6, 139.1, 135, 131.1, 115.3, 103.5, 94.02, 86.52 };
for(i=0; i<60; i++) {e[23][i]=e23[i]*MeV*cm2/g;}
name [24] = "G4_FERROUS_SULFATE";
Znum [24] = 0;
G4double e24[60] = { 135.1, 165.5, 191.1, 213.6, 234, 270.2, 302.1, 330.9, 357.4, 382.1, 405.3, 427.2, 470.7, 508.7, 542.4, 572.8, 600.3, 625.3, 648, 668.8, 705, 735.1, 759.9, 780.1, 796.1, 808.5, 817.7, 824.1, 827.9, 829.6, 829.4, 827.5, 824.2, 819.7, 784.9, 740.5, 695.1, 652.8, 617.8, 588.4, 562.8, 539.9, 499.9, 465.6, 435.5, 408.8, 385, 364.1, 345.6, 329.1, 314.3, 300.9, 288.8, 277.7, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 };
for(i=0; i<60; i++) {e[24][i]=e24[i]*MeV*cm2/g;}
name [25] = "G4_Gd";
Znum [25] = 64;
G4double e25[60] = { 25.71, 31.49, 36.37, 40.66, 44.54, 51.43, 57.5, 62.99, 68.03, 72.73, 77.14, 81.32, 89.78, 97.24, 104, 110.1, 115.8, 121, 125.8, 130.4, 138.5, 145.7, 152.1, 157.7, 162.6, 166.9, 170.7, 173.9, 176.7, 179, 181, 182.5, 183.8, 184.7, 185.6, 182.1, 176.3, 169.4, 162.2, 155.2, 148.7, 142.6, 132, 123.3, 116.2, 110.2, 105, 100.6, 96.67, 93.2, 90.08, 87.27, 84.72, 82.38, 80.24, 78.26, 70.14, 63.87, 58.87, 54.76 };
for(i=0; i<60; i++) {e[25][i]=e25[i]*MeV*cm2/g;}
name [26] = "G4_Ge";
Znum [26] = 32;
G4double e26[60] = { 45.91, 56.23, 64.93, 72.59, 79.52, 91.82, 102.7, 112.5, 121.5, 129.9, 137.7, 145.2, 159.7, 172.3, 183.3, 193.1, 201.7, 209.4, 216.3, 222.3, 232.3, 240, 245.6, 249.6, 252.3, 253.9, 254.5, 254.5, 253.9, 252.9, 251.5, 250, 248.2, 246.4, 236.5, 227.2, 218.9, 211.6, 205.1, 199.3, 193.9, 189, 180.1, 172.3, 165.2, 158.8, 152.6, 146.6, 140.9, 135.7, 130.8, 126.3, 122.1, 118.3, 114.7, 111.3, 97.72, 87.77, 80.18, 74.18 };
for(i=0; i<60; i++) {e[26][i]=e26[i]*MeV*cm2/g;}
name [27] = "G4_Pyrex_Glass";
Znum [27] = 0;
G4double e27[60] = { 88.74, 108.7, 125.5, 140.3, 153.7, 177.5, 198.4, 217.4, 234.8, 251, 266.2, 280.6, 308.9, 333.6, 355.6, 375.3, 393.1, 409.2, 423.9, 437.3, 460.8, 480.4, 496.7, 510.2, 521.2, 530.1, 537.1, 542.5, 546.4, 549.1, 550.6, 551.2, 551, 550.1, 537.6, 518.1, 496.1, 473.9, 451.2, 429.2, 408.8, 390.1, 357.9, 331.5, 309.8, 291.7, 276.2, 262.4, 250.1, 239.1, 229.2, 220.2, 212, 204.6, 197.7, 191.4, 165.6, 146.7, 132.1, 120.4 };
for(i=0; i<60; i++) {e[27][i]=e27[i]*MeV*cm2/g;}
name [28] = "G4_H";
Znum [28] = 1;
G4double e28[60] = { 746.5, 914.3, 1056, 1180, 1293, 1493, 1669, 1829, 1975, 2112, 2240, 2361, 2586, 2777, 2942, 3084, 3208, 3316, 3409, 3490, 3618, 3710, 3771, 3808, 3823, 3822, 3807, 3781, 3745, 3702, 3654, 3601, 3545, 3487, 3183, 2890, 2629, 2402, 2204, 2031, 1882, 1753, 1544, 1384, 1258, 1159, 1077, 1007, 947, 894.2, 847.5, 805.9, 768.6, 734.9, 704.3, 676.4, 566.7, 489.7, 432.5, 388.1 };
for(i=0; i<60; i++) {e[28][i]=e28[i]*MeV*cm2/g;}
name [29] = "G4_He";
Znum [29] = 2;
G4double e29[60] = { 184.2, 225.6, 260.6, 291.3, 319.1, 368.5, 412, 451.3, 487.4, 521.1, 552.7, 582.6, 641.3, 691.9, 736.7, 776.6, 812.5, 844.9, 874.2, 900.8, 946.6, 984.1, 1014, 1039, 1058, 1072, 1083, 1089, 1093, 1094, 1093, 1090, 1085, 1079, 1032, 973, 911.2, 852.1, 797.5, 748.3, 704.5, 665.8, 600.4, 547.7, 504.5, 468.3, 437.7, 411.3, 388.2, 368, 349.9, 333.8, 319.3, 306.2, 294.2, 283.2, 239.6, 208.6, 185.2, 167 };
for(i=0; i<60; i++) {e[29][i]=e29[i]*MeV*cm2/g;}
name [30] = "G4_KAPTON";
Znum [30] = 0;
G4double e30[60] = { 145.4, 178.1, 205.6, 229.9, 251.8, 286.2, 317.1, 344.9, 370.4, 393.1, 413.7, 432.9, 472.6, 506.1, 535.2, 561.3, 584.6, 605.3, 623.8, 640.4, 670.2, 696.5, 719.1, 737.7, 752.5, 763.9, 772.5, 778.6, 782.6, 784.6, 784.9, 783.8, 781.4, 778, 749.2, 710.6, 669.6, 630, 593.5, 560.4, 530.8, 504.4, 459.6, 423.3, 393.3, 368.2, 346.8, 328, 311.6, 296.9, 283.8, 272, 261.3, 251.5, 242.4, 234.1, 200.8, 176.8, 158.4, 143.8 };
for(i=0; i<60; i++) {e[30][i]=e30[i]*MeV*cm2/g;}
name [31] = "G4_Kr";
Znum [31] = 36;
G4double e31[60] = { 45.92, 56.24, 64.94, 72.6, 79.53, 91.84, 102.7, 112.5, 121.5, 129.9, 137.8, 145.2, 160.1, 173.2, 184.9, 195.5, 205.1, 213.8, 221.8, 229.1, 242, 252.7, 261.6, 268.8, 274.6, 279, 282.3, 284.5, 285.8, 286.2, 286, 285.1, 283.8, 281.9, 268.6, 252.2, 236.2, 221.7, 209, 198.2, 188.9, 180.9, 168.1, 158.1, 150.2, 143.7, 138.1, 133.2, 128.8, 124.8, 121.2, 117.8, 114.6, 111.6, 108.8, 106.1, 94.63, 85.43, 77.91, 71.84 };
for(i=0; i<60; i++) {e[31][i]=e31[i]*MeV*cm2/g;}
name [32] = "G4_LITHIUM_TETRABORATE";
Znum [32] = 0;
G4double e32[60] = { 111, 135.9, 157, 175.5, 192.2, 222, 248.2, 271.9, 293.6, 313.9, 333, 351, 386.5, 417.4, 444.8, 469.4, 491.6, 511.7, 530.1, 546.7, 575.8, 599.9, 619.8, 636, 649.1, 659.3, 667.2, 672.9, 676.7, 678.9, 679.6, 679.1, 677.6, 675.1, 653, 622.4, 589.5, 557.3, 525.5, 495.6, 468.4, 444.1, 403.1, 370.6, 344.6, 323.5, 305.9, 290.3, 276.4, 263.9, 252.7, 242.4, 233.2, 224.7, 216.9, 209.6, 180.4, 159.2, 142.8, 129.9 };
for(i=0; i<60; i++) {e[32][i]=e32[i]*MeV*cm2/g;}
name [33] = "G4_LITHIUM_FLUORIDE";
Znum [33] = 0;
G4double e33[60] = { 80.87, 99.04, 114.4, 127.9, 140.1, 161.7, 180.8, 198.1, 214, 228.7, 242.6, 255.7, 281.9, 304.9, 325.4, 344, 360.9, 376.5, 390.8, 404, 427.6, 447.8, 465.3, 480.3, 493.1, 504.1, 513.3, 521.1, 527.4, 532.5, 536.5, 539.6, 541.7, 543, 540.3, 527.4, 509.2, 488.8, 467.4, 446.5, 426.9, 408.7, 376.9, 350.4, 328, 309.1, 292.7, 278.1, 265.1, 253.3, 242.5, 232.8, 223.9, 215.6, 208.2, 201.2, 173.1, 152.5, 136.8, 124.4 };
for(i=0; i<60; i++) {e[33][i]=e33[i]*MeV*cm2/g;}
name [34] = "G4_M3_WAX";
Znum [34] = 0;
G4double e34[60] = { 198.1, 242.6, 280.2, 313.3, 343.1, 391.9, 435.4, 474.6, 510.6, 543.1, 573, 601, 656.7, 703.7, 744.4, 780.4, 812.2, 840.3, 865, 887, 925, 956.5, 982.1, 1002, 1016, 1026, 1032, 1035, 1036, 1033, 1029, 1023, 1016, 1007, 953.3, 891.9, 831.3, 775.4, 725.1, 680.6, 641.3, 606.6, 546.6, 497.8, 458.8, 427.4, 401.7, 379.2, 359.6, 342.2, 326.7, 312.7, 300.1, 288.5, 277.8, 268.1, 229.1, 201, 179.7, 162.8 };
for(i=0; i<60; i++) {e[34][i]=e34[i]*MeV*cm2/g;}
name [35] = "G4_MS20_TISSUE";
Znum [35] = 0;
G4double e35[60] = { 174.4, 213.6, 246.7, 275.8, 302.1, 345, 383.2, 417.7, 449.4, 477.9, 504.3, 528.8, 578.1, 619.8, 656, 688.2, 716.7, 742, 764.4, 784.4, 819.3, 848.7, 872.8, 892, 906.4, 916.8, 923.7, 927.8, 929.4, 928.8, 926.4, 922.3, 916.9, 910.4, 866.6, 814.5, 762, 712.8, 668.3, 628.6, 593.3, 562.1, 507.7, 463.3, 427.6, 398.9, 375.3, 354.7, 336.7, 320.6, 306.2, 293.3, 281.6, 270.9, 261, 252, 215.7, 189.5, 169.6, 153.9 };
for(i=0; i<60; i++) {e[35][i]=e35[i]*MeV*cm2/g;}
name [36] = "G4_METHANE";
Znum [36] = 0;
G4double e36[60] = { 272.8, 334.1, 385.8, 431.4, 472.5, 545.6, 610, 668.2, 721.8, 771.6, 818.4, 862.7, 949.2, 1024, 1090, 1148, 1200, 1246, 1288, 1325, 1387, 1436, 1473, 1500, 1518, 1528, 1532, 1530, 1524, 1514, 1501, 1485, 1467, 1447, 1338, 1227, 1127, 1041, 967.3, 904.6, 850.4, 803.2, 724.6, 661.8, 610.5, 567.7, 531.4, 499.8, 472.5, 448.3, 426.7, 407.4, 390, 374.1, 359.6, 346.4, 293.7, 256.2, 227.9, 205.7 };
for(i=0; i<60; i++) {e[36][i]=e36[i]*MeV*cm2/g;}
name [37] = "G4_Mo";
Znum [37] = 42;
G4double e37[60] = { 40.18, 49.21, 56.82, 63.53, 69.59, 80.35, 89.84, 98.41, 106.3, 113.6, 120.5, 127, 140.2, 151.7, 162.1, 171.5, 180.1, 188, 195.4, 202.1, 214.3, 224.8, 233.8, 241.6, 248.3, 253.9, 258.7, 262.6, 265.7, 268.2, 270, 271.3, 272.1, 272.4, 268.7, 259.5, 248, 235.8, 224, 213.1, 203.1, 194.1, 178.9, 166.6, 156.5, 148.1, 141, 134.9, 129.5, 124.7, 120.4, 116.4, 112.6, 109.1, 105.8, 102.6, 89.8, 80.34, 73.15, 67.51 };
for(i=0; i<60; i++) {e[37][i]=e37[i]*MeV*cm2/g;}
name [38] = "G4_MUSCLE_WITH_SUCROSE";
Znum [38] = 0;
G4double e38[60] = { 149.4, 183, 211.3, 236.2, 258.7, 298.3, 333.3, 364.8, 393.8, 420.8, 446, 469.8, 516.6, 557.2, 593.1, 625.2, 654, 680, 703.5, 724.8, 761.7, 792, 816.7, 836.5, 851.9, 863.6, 871.9, 877.4, 880.4, 881.2, 880.1, 877.3, 873.2, 867.9, 829.5, 781.9, 733.4, 688, 647.9, 612.8, 581.8, 554.2, 507.1, 468.4, 435.9, 408.3, 384.4, 363.5, 344.9, 328.4, 313.7, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 };
for(i=0; i<60; i++) {e[38][i]=e38[i]*MeV*cm2/g;}
name [39] = "G4_MUSCLE_WITHOUT_SUCROSE";
Znum [39] = 0;
G4double e39[60] = { 146.6, 179.5, 207.3, 231.8, 253.9, 292.9, 327.3, 358.4, 386.9, 413.5, 438.4, 461.9, 508.2, 548.4, 584, 615.8, 644.5, 670.4, 693.8, 715.1, 752, 782.3, 807.1, 827, 842.5, 854.3, 862.9, 868.5, 871.6, 872.6, 871.6, 869, 865, 859.8, 822, 774.9, 726.9, 682, 643, 609.2, 579.4, 552.9, 507.4, 469.6, 437.7, 410.1, 386.1, 365.1, 346.5, 329.9, 315, 301.6, 289.4, 278.3, 268.2, 258.8, 221.3, 194.3, 173.7, 157.5 };
for(i=0; i<60; i++) {e[39][i]=e39[i]*MeV*cm2/g;}
name [40] = "G4_MUSCLE_SKELETAL_ICRP";
Znum [40] = 0;
G4double e40[60] = { 141.3, 173.1, 199.9, 223.5, 244.8, 282.5, 315.8, 345.8, 373.5, 399.2, 423.3, 446.1, 491.1, 530.2, 565, 596.1, 624.2, 649.7, 672.8, 693.8, 730.4, 760.6, 785.3, 805.3, 821.1, 833.1, 841.9, 847.9, 851.4, 852.6, 852, 849.7, 846.1, 841.2, 804.8, 758.9, 712.2, 668.5, 631.2, 599, 570.8, 545.6, 502.2, 465.8, 434.6, 407.5, 383.7, 362.8, 344.4, 327.9, 313.1, 299.8, 287.7, 276.7, 266.6, 257.3, 220, 193.2, 172.8, 156.7 };
for(i=0; i<60; i++) {e[40][i]=e40[i]*MeV*cm2/g;}
name [41] = "G4_MUSCLE_STRIATED_ICRU";
Znum [41] = 0;
G4double e41[60] = { 141.7, 173.5, 200.4, 224, 245.4, 283.2, 316.5, 346.6, 374.3, 400, 424.2, 447, 492.1, 531.3, 566.1, 597.3, 625.4, 650.9, 674, 695.1, 731.6, 761.9, 786.7, 806.6, 822.4, 834.4, 843.3, 849.2, 852.6, 853.9, 853.2, 851, 847.3, 842.4, 805.8, 759.8, 713, 669.2, 632, 600.1, 572.1, 547.1, 504, 467.7, 436.5, 409.3, 385.3, 364.3, 345.7, 329.2, 314.4, 300.9, 288.8, 277.8, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 };
for(i=0; i<60; i++) {e[41][i]=e41[i]*MeV*cm2/g;}
name [42] = "G4_N";
Znum [42] = 7;
G4double e42[60] = { 126.5, 155, 179, 200.1, 219.2, 253.1, 283, 310, 334.8, 357.9, 379.6, 400.2, 440.6, 475.8, 507, 535, 560.2, 583.1, 603.8, 622.7, 655.5, 682.7, 704.9, 722.9, 737.3, 748.4, 756.6, 762.3, 765.9, 767.5, 767.5, 766, 763.3, 759.4, 729.3, 689.8, 648.6, 609.1, 572.9, 540.4, 511.6, 486.2, 443.4, 408.8, 380.1, 356, 335.4, 317.2, 301.2, 286.8, 274.1, 262.6, 252.2, 242.7, 234, 225.9, 193.8, 170.5, 152.8, 138.8 };
for(i=0; i<60; i++) {e[42][i]=e42[i]*MeV*cm2/g;}
name [43] = "G4_SODIUM_IODIDE";
Znum [43] = 0;
G4double e43[60] = { 41.1, 50.34, 58.12, 64.98, 71.19, 82.2, 91.9, 100.7, 108.7, 116.2, 123.3, 130, 143.4, 155.2, 165.8, 175.4, 184.2, 192.3, 199.7, 206.6, 219, 229.6, 238.9, 246.8, 253.5, 259.2, 264, 268, 271.1, 273.6, 275.4, 276.7, 277.4, 277.7, 273.7, 264.2, 252.3, 239.7, 227.6, 216.2, 205.9, 196.6, 180.7, 167.8, 157.3, 148.5, 141.1, 134.7, 129.1, 124.1, 119.7, 115.7, 111.9, 108.4, 105.1, 101.9, 88.79, 78.99, 71.48, 65.54 };
for(i=0; i<60; i++) {e[43][i]=e43[i]*MeV*cm2/g;}
name [44] = "G4_Ne";
Znum [44] = 10;
G4double e44[60] = { 58.01, 71.05, 82.04, 91.73, 100.5, 116, 129.7, 142.1, 153.5, 164.1, 174, 183.5, 202.5, 219.3, 234.5, 248.3, 261, 272.8, 283.8, 294, 312.7, 329.2, 343.8, 356.9, 368.6, 379, 388.3, 396.5, 403.8, 410.2, 415.8, 420.7, 424.8, 428.4, 438.1, 437.9, 431.3, 420.8, 408.2, 394.6, 380.7, 367.1, 339, 313.8, 293.3, 277.2, 264.3, 252.6, 241.9, 232.2, 223.2, 215, 207.4, 200.4, 193.8, 187.7, 163, 144.6, 130.3, 118.9 };
for(i=0; i<60; i++) {e[44][i]=e44[i]*MeV*cm2/g;}
name [45] = "G4_NYLON_6/6";
Znum [45] = 0;
G4double e45[60] = { 191, 233.9, 270.1, 302, 330.8, 377.8, 419.7, 457.5, 492.1, 523.4, 552.3, 579.2, 633, 678.5, 717.9, 752.9, 783.8, 811.1, 835.3, 856.8, 894.2, 925.4, 951, 971, 985.8, 996.3, 1003, 1007, 1008, 1006, 1003, 997.7, 991.2, 983.5, 933.5, 875.4, 817.5, 763.6, 715, 671.7, 633.5, 599.6, 542.9, 497.4, 460.4, 429.7, 403.7, 381, 361.2, 343.6, 327.9, 313.8, 301, 289.3, 278.6, 268.8, 229.5, 201.3, 179.8, 162.9 };
for(i=0; i<60; i++) {e[45][i]=e45[i]*MeV*cm2/g;}
name [46] = "G4_O";
Znum [46] = 8;
G4double e46[60] = { 99.46, 121.8, 140.7, 157.3, 172.3, 198.9, 222.4, 243.6, 263.1, 281.3, 298.4, 314.5, 346.6, 374.7, 399.8, 422.4, 443, 461.9, 479.1, 495, 523.1, 547, 567.2, 584.4, 598.7, 610.6, 620.2, 628, 633.9, 638.3, 641.3, 643, 643.6, 643.3, 630.5, 606.7, 578.3, 549.1, 520.9, 494.6, 470.9, 449.7, 413.2, 383.1, 357.8, 336.3, 317.6, 301.1, 286.3, 273.2, 261.3, 250.5, 240.8, 231.9, 223.7, 216.1, 185.7, 163.7, 146.7, 133.4 };
for(i=0; i<60; i++) {e[46][i]=e46[i]*MeV*cm2/g;}
name [47] = "G4_PARAFFIN";
Znum [47] = 0;
G4double e47[60] = { 228.8, 280.2, 323.5, 361.7, 396.2, 451.9, 501.6, 546.5, 587.6, 624.6, 658.6, 690.2, 753.4, 806.4, 852.1, 892.4, 927.9, 959.1, 986.3, 1010, 1052, 1086, 1114, 1135, 1150, 1160, 1166, 1168, 1166, 1163, 1157, 1149, 1140, 1129, 1064, 992.4, 922.6, 858.6, 801.5, 751.1, 706.8, 667.8, 601.8, 548.9, 506.2, 471.3, 442.2, 416.9, 394.9, 375.4, 358, 342.3, 328.2, 315.3, 303.4, 292.6, 249.3, 218.3, 194.8, 176.3 };
for(i=0; i<60; i++) {e[47][i]=e47[i]*MeV*cm2/g;}
name [48] = "G4_Pb";
Znum [48] = 82;
G4double e48[60] = { 15.4, 18.86, 21.78, 24.35, 26.68, 30.81, 34.44, 37.73, 40.75, 43.57, 46.21, 48.71, 53.82, 58.34, 62.45, 66.21, 69.7, 72.94, 75.98, 78.85, 84.11, 88.84, 93.13, 97.02, 100.6, 103.8, 106.8, 109.5, 111.9, 114.1, 116.2, 118, 119.6, 121.1, 126.1, 128.1, 127.9, 126.3, 123.6, 120.4, 116.9, 113.3, 106.4, 99.98, 94.37, 89.5, 85.18, 81.37, 78.01, 75.05, 72.42, 70.08, 67.99, 66.12, 64.44, 62.92, 56.88, 52.22, 48.46, 45.34 };
for(i=0; i<60; i++) {e[48][i]=e48[i]*MeV*cm2/g;}
name [49] = "G4_PHOTO_EMULSION";
Znum [49] = 0;
G4double e49[60] = { 61.33, 75.12, 86.74, 96.97, 106.2, 122.2, 136.3, 149.1, 160.8, 171.6, 181.6, 191.1, 210, 226.3, 240.6, 253.5, 265, 275.4, 284.8, 293.3, 308, 320.3, 330.3, 338.4, 344.7, 349.4, 352.8, 355.1, 356.4, 356.9, 356.6, 355.7, 354.3, 352.4, 338.9, 322.3, 305.5, 289.9, 275.7, 263, 251.7, 241.5, 224.4, 210.3, 198.3, 188, 179, 171, 163.9, 157.5, 151.6, 146.3, 141.3, 136.6, 132.1, 128, 110.6, 97.75, 87.92, 80.2 };
for(i=0; i<60; i++) {e[49][i]=e49[i]*MeV*cm2/g;}
name [50] = "G4_PLASTIC_SC_VINYLTOLUENE";
Znum [50] = 0;
G4double e50[60] = { 190.1, 232.8, 268.8, 300.5, 329.2, 374.1, 414.4, 450.7, 483.9, 513.5, 540.4, 565.4, 616.5, 659.2, 696, 728.7, 757.6, 783, 805.3, 825.2, 860.1, 890.2, 915.4, 935.4, 950.4, 961.1, 968.2, 972.3, 973.8, 973, 970.2, 965.7, 959.9, 952.8, 906, 850.6, 795.1, 743.3, 696.4, 654.7, 617.9, 585.3, 530.7, 487.1, 451.3, 421.4, 395.9, 373.7, 354.4, 337.2, 321.9, 308.1, 295.7, 284.2, 273.8, 264.1, 225.7, 198.1, 177.1, 160.5 };
for(i=0; i<60; i++) {e[50][i]=e50[i]*MeV*cm2/g;}
name [51] = "G4_POLYCARBONATE";
Znum [51] = 0;
G4double e51[60] = { 164.8, 201.8, 233, 260.5, 285.4, 324.6, 359.7, 391.4, 420.3, 446.2, 469.7, 491.7, 536.5, 574.3, 607.1, 636.2, 662.2, 685.1, 705.4, 723.6, 755.9, 783.9, 807.7, 826.9, 841.7, 852.8, 860.8, 866, 868.8, 869.6, 868.6, 866, 862.1, 857.1, 820.5, 774.5, 727.2, 682.2, 641.1, 604.1, 571.2, 542, 492.3, 452.1, 419.1, 391.8, 368.6, 348.4, 330.7, 314.9, 300.8, 288.1, 276.7, 266.1, 256.5, 247.6, 212, 186.3, 166.8, 151.3 };
for(i=0; i<60; i++) {e[51][i]=e51[i]*MeV*cm2/g;}
name [52] = "G4_POLYETHYLENE";
Znum [52] = 0;
G4double e52[60] = { 184.9, 226.5, 261.5, 292.4, 320.3, 369.9, 413.5, 453, 489.3, 523, 554.8, 584.8, 643.9, 695.3, 740.8, 781.4, 817.9, 850.9, 880.6, 907.5, 953.7, 990.9, 1021, 1044, 1061, 1073, 1081, 1084, 1085, 1083, 1078, 1072, 1064, 1054, 994.1, 927.8, 865, 808.9, 760.1, 717.9, 681.4, 649.7, 591.2, 541, 499.2, 464.9, 436.3, 411.4, 389.8, 370.6, 353.4, 338.1, 324.2, 311.4, 299.8, 289.1, 246.4, 215.9, 192.7, 174.4 };
for(i=0; i<60; i++) {e[52][i]=e52[i]*MeV*cm2/g;}
name [53] = "G4_POLYETHYLENE_TEREPHTHALATE_MYLAR";
Znum [53] = 0;
G4double e53[60] = { 150.9, 184.9, 213.5, 238.7, 261.4, 297.8, 330.2, 359.6, 386.4, 410.5, 432.5, 453, 494.9, 530.3, 561.2, 588.8, 613.4, 635.3, 654.7, 672.3, 703.4, 730.5, 753.5, 772.3, 787, 798.3, 806.6, 812.4, 816, 817.6, 817.4, 815.8, 812.9, 808.9, 777.6, 736.5, 693.4, 651.9, 613.6, 579.1, 548.2, 520.6, 472.9, 434, 402.2, 376.1, 354.3, 335, 318.2, 303.2, 289.8, 277.7, 266.7, 256.6, 247.4, 238.9, 204.8, 180.2, 161.4, 146.5 };
for(i=0; i<60; i++) {e[53][i]=e53[i]*MeV*cm2/g;}
name [54] = "G4_PLEXIGLASS";
Znum [54] = 0;
G4double e54[60] = { 174.9, 214.2, 247.4, 276.6, 303, 345.9, 384.1, 418.7, 450.4, 479, 505.2, 529.8, 579.1, 620.8, 657.1, 689.3, 717.9, 743.2, 765.7, 785.8, 820.8, 850.5, 875, 894.5, 909.3, 920.1, 927.4, 931.9, 933.9, 933.7, 931.6, 928, 922.9, 916.8, 874.4, 823.2, 771.3, 722.4, 676.2, 634, 596.2, 562.8, 507.2, 463.4, 428.5, 400.2, 376.7, 356.1, 338, 321.9, 307.5, 294.5, 282.8, 272, 262.1, 253, 216.6, 190.4, 170.3, 154.5 };
for(i=0; i<60; i++) {e[54][i]=e54[i]*MeV*cm2/g;}
name [55] = "G4_POLYPROPYLENE";
Znum [55] = 0;
G4double e55[60] = { 197.6, 242, 279.4, 312.4, 342.2, 395.1, 441.8, 483.9, 522.7, 558.8, 592.7, 624.8, 687.3, 741.3, 789, 831.4, 869.4, 903.6, 934.3, 962, 1009, 1048, 1078, 1101, 1119, 1132, 1140, 1145, 1146, 1145, 1141, 1135, 1128, 1119, 1060, 991.7, 924.3, 862, 806.1, 756.5, 712.8, 674.2, 605.4, 548.6, 503.3, 467.5, 438.7, 413.6, 391.8, 372.4, 355.2, 339.7, 325.7, 312.9, 301.1, 290.4, 247.5, 216.8, 193.5, 175.1 };
for(i=0; i<60; i++) {e[55][i]=e55[i]*MeV*cm2/g;}
name [56] = "G4_POLYSTYRENE";
Znum [56] = 0;
G4double e56[60] = { 186, 227.8, 263.1, 294.1, 322.2, 372.1, 416, 455.7, 492.2, 526.2, 558.1, 588.3, 645.3, 693.8, 735.8, 772.4, 804.5, 832.6, 857.2, 878.7, 913.5, 939.2, 957.2, 969, 975.6, 978, 976.8, 972.8, 966.5, 958.4, 948.9, 938.3, 926.9, 914.9, 851.3, 789.6, 734.2, 685.4, 642.9, 605.7, 573, 543.9, 499.5, 465.2, 435.8, 409.1, 384.6, 363.2, 344.6, 328.1, 313.3, 300, 288, 277, 266.8, 257.5, 220.4, 193.6, 173.2, 157 };
for(i=0; i<60; i++) {e[56][i]=e56[i]*MeV*cm2/g;}
name [57] = "G4_POLYTETRAFLUOROETHYLENE";
Znum [57] = 0;
name [57] = "G4_TEFLON";
G4double e57[60] = { 83.27, 102, 117.8, 131.7, 144.2, 165, 183.4, 200.1, 215.3, 229.2, 242, 254, 278.7, 300, 319, 336.2, 351.9, 366.1, 379.2, 391.2, 413.1, 432.7, 450, 465.1, 478, 489.1, 498.5, 506.4, 513, 518.4, 522.7, 526, 528.4, 530.1, 528.6, 516.7, 499.4, 479.6, 460.4, 442.3, 425.4, 409.6, 381.2, 356.4, 334.6, 315.4, 298.3, 283.1, 269.6, 257.4, 246.5, 236.5, 227.4, 219.1, 211.5, 204.4, 175.9, 155.2, 139.3, 126.7 };
for(i=0; i<60; i++) {e[57][i]=e57[i]*MeV*cm2/g;}
name [58] = "G4_POLYVINYL_CHLORIDE";
Znum [58] = 0;
G4double e58[60] = { 140.2, 171.7, 198.3, 221.7, 242.8, 277.9, 309, 337.2, 363, 386.4, 408.1, 428.4, 468.9, 503.4, 533.6, 560.3, 584.1, 605.3, 624.1, 640.9, 670.1, 694.5, 714.3, 729.8, 741.4, 749.6, 755, 757.9, 758.6, 757.6, 755, 751, 746, 740, 701.3, 656.7, 612.9, 572.6, 538.7, 509.8, 484.7, 462.4, 424.2, 392.4, 365.3, 341.8, 321.1, 302.9, 287.3, 273.6, 261.3, 250.1, 240.1, 231.1, 222.7, 215, 184.5, 162.6, 145.9, 132.6 };
for(i=0; i<60; i++) {e[58][i]=e58[i]*MeV*cm2/g;}
name [59] = "G4_PROPANE";
Znum [59] = 0;
G4double e59[60] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022 };
for(i=0; i<60; i++) {e[59][i]=e59[i]*MeV*cm2/g;}
name [60] = "G4_Pt";
Znum [60] = 78;
G4double e60[60] = { 30.79, 33.73, 36.43, 38.95, 41.31, 43.55, 48.11, 52.16, 55.83, 59.2, 62.32, 65.23, 67.95, 70.51, 75.22, 79.46, 83.3, 86.79, 89.97, 92.87, 95.51, 97.92, 100.1, 102.1, 103.9, 105.5, 107, 108.3, 112.7, 114.5, 114.4, 113, 110.8, 108.1, 105.3, 102.4, 96.92, 92.12, 87.91, 84.22, 80.97, 78.11, 75.56, 73.26, 71.17, 69.26, 67.5, 65.87, 64.36, 62.94, 57, 52.39, 48.67, 45.57, 42.94, 40.66, 38.67, 36.9, 33.91, 31.45 };
for(i=0; i<60; i++) {e[60][i]=e60[i]*MeV*cm2/g;}
name [61] = "G4_Si";
Znum [61] = 14;
G4double e61[60] = { 105, 128.6, 148.5, 166, 181.8, 210, 234.8, 257.2, 277.8, 296.9, 315, 332, 364.6, 392.5, 416.7, 437.8, 456.3, 472.5, 486.6, 498.9, 518.4, 532.3, 541.6, 547, 549.2, 549, 546.8, 543, 538, 532.2, 525.7, 518.8, 511.7, 504.4, 468.7, 437.3, 410.7, 388.4, 369.4, 353, 338.7, 325.9, 304.1, 285.9, 270.3, 256.7, 245.2, 235.1, 225.9, 217.2, 209, 201.1, 193.6, 187, 180.9, 175.3, 152.3, 135.4, 122.2, 111.7 };
for(i=0; i<60; i++) {e[61][i]=e61[i]*MeV*cm2/g;}
name [62] = "G4_SiO2";
Znum [62] = 0;
name [62] = "G4_SILICON_DIOXIDE";
G4double e62[60] = { 85.64, 104.9, 121.1, 135.4, 148.3, 171.3, 191.5, 209.8, 226.6, 242.2, 256.9, 270.8, 298.1, 322, 343.1, 362.1, 379.3, 394.9, 409.1, 422.1, 444.8, 463.8, 479.7, 492.8, 503.6, 512.3, 519.2, 524.5, 528.5, 531.2, 532.9, 533.7, 533.6, 532.9, 521.9, 503.9, 483.5, 462.8, 442.9, 424.2, 406.7, 390.6, 358.9, 330.8, 307.6, 288.9, 273.6, 259.9, 247.8, 236.9, 227.1, 218.2, 210.1, 202.7, 195.9, 189.7, 164.2, 145.5, 131.1, 119.6 };
for(i=0; i<60; i++) {e[62][i]=e62[i]*MeV*cm2/g;}
name [63] = "G4_STILBENE";
Znum [63] = 0;
G4double e63[60] = { 179.2, 219.5, 253.4, 283.3, 310.4, 352.2, 389.8, 423.8, 454.7, 482.3, 507.2, 530.3, 577.9, 617.7, 652.1, 682.6, 709.7, 733.5, 754.4, 773, 806.1, 835.1, 859.5, 879.2, 894.2, 905.1, 912.7, 917.4, 919.6, 919.6, 917.7, 914.2, 909.3, 903.3, 861.4, 810.7, 759.2, 710.8, 667.1, 628.3, 593.9, 563.4, 511.8, 470.2, 435.9, 407.2, 382.8, 361.4, 342.9, 326.4, 311.6, 298.4, 286.4, 275.4, 265.3, 256.1, 219, 192.4, 172.1, 156.1 };
for(i=0; i<60; i++) {e[63][i]=e63[i]*MeV*cm2/g;}
name [64] = "G4_Ti";
Znum [64] = 22;
G4double e64[60] = { 60.88, 74.56, 86.1, 96.26, 105.4, 121.8, 136.1, 149.1, 161.1, 172.2, 182.6, 192.5, 212.3, 229.6, 245.1, 259.1, 271.8, 283.5, 294.2, 304.1, 321.6, 336.5, 349.1, 359.8, 368.7, 376, 382, 386.7, 390.2, 392.7, 394.4, 395.2, 395.3, 394.8, 385.4, 369.3, 351, 332.6, 315.4, 299.6, 285.5, 272.8, 251.3, 233.9, 219.6, 207.6, 197.4, 188.7, 181, 174.1, 167.9, 162.2, 157, 152.2, 147.7, 143.5, 126, 112.5, 101.7, 93.07 };
for(i=0; i<60; i++) {e[64][i]=e64[i]*MeV*cm2/g;}
name [65] = "G4_Sn";
Znum [65] = 50;
G4double e65[60] = { 32.4, 39.68, 45.82, 51.23, 56.12, 64.8, 72.45, 79.36, 85.72, 91.64, 97.2, 102.5, 113.1, 122.4, 130.8, 138.5, 145.5, 151.9, 157.9, 163.4, 173.4, 182, 189.5, 196, 201.6, 206.4, 210.4, 213.8, 216.5, 218.7, 220.4, 221.6, 222.4, 222.9, 220.7, 213.8, 204.9, 195.4, 186, 177.3, 169.4, 162.3, 150.1, 140.3, 132.2, 125.5, 119.7, 114.7, 110.1, 106.1, 102.5, 99.14, 96.12, 93.34, 90.77, 88.4, 78.69, 71.47, 65.7, 60.79 };
for(i=0; i<60; i++) {e[65][i]=e65[i]*MeV*cm2/g;}
name [66] = "G4_TISSUE-METHANE";
Znum [66] = 0;
G4double e66[60] = { 174.5, 213.8, 246.8, 276, 302.3, 349.1, 390.3, 427.6, 461.8, 493.7, 523.6, 552, 607.8, 656.2, 699.1, 737.4, 771.9, 803, 831.1, 856.5, 900.2, 935.6, 963.8, 985.9, 1003, 1015, 1022, 1027, 1028, 1027, 1023, 1018, 1011, 1002, 947.8, 885.5, 824.9, 769.7, 720.9, 678.2, 641, 608.6, 553.2, 507.9, 470.5, 439.1, 412.4, 389, 368.6, 350.5, 334.4, 319.8, 306.6, 294.6, 283.6, 273.5, 233.2, 204.4, 182.5, 165.2 };
for(i=0; i<60; i++) {e[66][i]=e66[i]*MeV*cm2/g;}
name [67] = "G4_TISSUE-PROPANE";
Znum [67] = 0;
G4double e67[60] = { 169.9, 208.1, 240.3, 268.6, 294.3, 339.8, 379.9, 416.2, 449.5, 480.6, 509.7, 537.3, 591.5, 638.4, 679.9, 716.9, 750.2, 780.2, 807.4, 832, 874.4, 909.1, 937.1, 959.3, 976.6, 989.5, 998.7, 1005, 1008, 1008, 1006, 1003, 998, 991.7, 946.9, 891.9, 836, 783.4, 735.7, 693.2, 655.4, 622, 563.5, 515.3, 475.8, 443.4, 416.2, 392.6, 371.9, 353.6, 337.3, 322.5, 309.3, 297.1, 286, 275.8, 235.1, 206, 183.9, 166.5 };
for(i=0; i<60; i++) {e[67][i]=e67[i]*MeV*cm2/g;}
name [68] = "G4_TOLUENE";
Znum [68] = 0;
G4double e68[60] = { 191.6, 234.7, 271, 302.9, 331.9, 377.2, 417.8, 454.5, 488, 517.9, 545.1, 570.4, 621.9, 665, 702.2, 735.2, 764.3, 790, 812.4, 832.5, 867.7, 897.9, 923.2, 943.3, 958.3, 969, 976, 980, 981.4, 980.4, 977.5, 972.9, 966.9, 959.8, 912.2, 856.2, 800.1, 747.8, 700.6, 658.5, 621.4, 588.5, 535.1, 492.8, 457.8, 427.9, 401.8, 379.1, 359.4, 341.9, 326.3, 312.3, 299.6, 287.9, 277.3, 267.5, 228.5, 200.4, 179.1, 162.3 };
for(i=0; i<60; i++) {e[68][i]=e68[i]*MeV*cm2/g;}
name [69] = "G4_U";
Znum [69] = 92;
G4double e69[60] = { 18.38, 22.51, 25.99, 29.06, 31.83, 36.75, 41.09, 45.01, 48.62, 51.98, 55.13, 58.11, 64.19, 69.57, 74.44, 78.9, 83.02, 86.84, 90.42, 93.78, 99.92, 105.4, 110.3, 114.8, 118.8, 122.4, 125.7, 128.6, 131.2, 133.5, 135.6, 137.4, 139, 140.4, 144.4, 144.8, 142.7, 139.1, 134.5, 129.6, 124.2, 118.8, 108.7, 100, 92.78, 86.72, 81.64, 77.35, 73.71, 70.6, 67.92, 65.59, 63.56, 61.77, 60.19, 58.78, 53.33, 49.08, 45.62, 42.73 };
for(i=0; i<60; i++) {e[69][i]=e69[i]*MeV*cm2/g;}
name [70] = "G4_W";
Znum [70] = 74;
G4double e70[60] = { 14.97, 18.34, 21.17, 23.67, 25.93, 29.94, 33.47, 36.67, 39.61, 42.34, 44.91, 47.34, 52.3, 56.7, 60.68, 64.33, 67.7, 70.84, 73.78, 76.55, 81.61, 86.15, 90.24, 93.95, 97.3, 100.3, 103.1, 105.6, 107.8, 109.9, 111.7, 113.3, 114.7, 116, 120, 121.2, 120.5, 118.5, 115.9, 112.9, 109.8, 106.7, 100.2, 94.14, 89.08, 85, 81.68, 78.78, 76.2, 73.88, 71.78, 69.86, 68.09, 66.45, 64.93, 63.5, 57.52, 52.9, 49.15, 46.04 };
for(i=0; i<60; i++) {e[70][i]=e70[i]*MeV*cm2/g;}
name [71] = "G4_WATER";
Znum [71] = 0;
G4double e71[60] = { 133.7, 163.8, 189.1, 211.4, 231.6, 267.5, 299, 327.6, 353.8, 378.2, 401.2, 422.9, 466, 503.6, 537.2, 567.3, 594.6, 619.5, 642.1, 662.8, 698.9, 729, 753.8, 774, 790.1, 802.6, 811.9, 818.3, 822.3, 824.1, 823.9, 822.2, 819, 814.5, 780.1, 736, 695.9, 660.4, 628.6, 599.9, 573.7, 549.7, 507.5, 471.4, 440.1, 412.8, 388.8, 367.6, 348.9, 332.2, 317.2, 303.7, 291.4, 280.3, 270, 260.6, 222.8, 195.5, 174.8, 158.5 };
for(i=0; i<60; i++) {e[71][i]=e71[i]*MeV*cm2/g;}
name [72] = "G4_WATER_VAPOR";
Znum [72] = 0;
G4double e72[60] = { 152.2, 186.5, 215.3, 240.7, 263.7, 304.5, 340.4, 372.9, 402.8, 430.6, 456.7, 481.4, 530.5, 573.2, 611.3, 645.4, 676.4, 704.4, 730, 753.3, 793.8, 827.4, 855, 877.2, 894.8, 908.2, 918.1, 924.7, 928.5, 929.9, 929.1, 926.5, 922.3, 916.9, 876.3, 825.9, 775.3, 728.5, 686.8, 650.1, 618, 589.9, 536.1, 489.2, 450.8, 420.2, 395.5, 373.8, 354.6, 337.5, 322.2, 308.3, 295.8, 284.4, 273.9, 264.3, 225.7, 198, 176.9, 160.4 };
for(i=0; i<60; i++) {e[72][i]=e72[i]*MeV*cm2/g;}
name [73] = "G4_Xe";
Znum [73] = 54;
G4double e73[60] = { 38.1, 46.67, 53.88, 60.24, 65.99, 76.2, 85.2, 93.33, 100.8, 107.8, 114.3, 120.5, 132.8, 143.6, 153.2, 161.8, 169.6, 176.7, 183.2, 189.1, 199.4, 208, 215, 220.7, 225.2, 228.7, 231.2, 232.9, 233.9, 234.3, 234.1, 233.5, 232.5, 231.1, 221.3, 209.3, 197.4, 186.5, 177, 168.6, 161.3, 155, 144.4, 135.9, 128.8, 122.8, 117.5, 112.7, 108.4, 104.5, 101, 97.75, 94.8, 92.09, 89.6, 87.29, 77.8, 70.52, 64.84, 60.13 };
for(i=0; i<60; i++) {e[73][i]=e73[i]*MeV*cm2/g;}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PhotoElectricEffect.cc,v 1.37 2006/09/14 10:27:19 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PhotoElectricEffect.cc,v 1.41 2008/10/16 14:12:32 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------------ G4PhotoElectricEffect physics process ---------------------
@@ -79,7 +79,9 @@ using namespace std;
G4PhotoElectricEffect::G4PhotoElectricEffect(const G4String& processName,
G4ProcessType type):G4VEmProcess (processName, type),
isInitialised(false)
{}
{
SetProcessSubType(fPhotoElectricEffect);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -94,7 +96,7 @@ void G4PhotoElectricEffect::InitialiseProcess(const G4ParticleDefinition*)
isInitialised = true;
SetBuildTableFlag(false);
SetSecondaryParticle(G4Electron::Electron());
if(!Model()) SetModel(new G4PEEffectModel);
if(!Model()) SetModel(new G4PEEffectModel());
Model()->SetLowEnergyLimit(MinKinEnergy());
Model()->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(1, Model());
@@ -104,11 +106,6 @@ void G4PhotoElectricEffect::InitialiseProcess(const G4ParticleDefinition*)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4PhotoElectricEffect::PrintInfo()
{
G4cout
<< " Total cross sections from Sandia parametrisation. "
<< "\n Sampling according " << Model()->GetName() << " model"
<< G4endl;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PolarizedComptonScattering.cc,v 1.16 2006/06/29 19:53:30 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PolarizedComptonScattering.cc,v 1.18 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//---------- G4PolarizedComptonScattering physics process ----------------------
@@ -49,9 +49,8 @@
using namespace std;
G4PolarizedComptonScattering::G4PolarizedComptonScattering(
const G4String& processName)
: G4ComptonScattering52 (processName)
G4PolarizedComptonScattering::G4PolarizedComptonScattering(const G4String& pname)
: G4ComptonScattering52 (pname)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UniversalFluctuation.cc,v 1.15 2007/07/13 11:01:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UniversalFluctuation.cc,v 1.16 2008/10/22 16:04:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -106,10 +106,10 @@ void G4UniversalFluctuation::InitialiseMe(const G4ParticleDefinition* part)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material,
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length,
G4double& meanLoss)
const G4DynamicParticle* dp,
G4double& tmax,
G4double& length,
G4double& meanLoss)
{
// Calculate actual loss from the mean loss.
// The model used to get the fluctuations is essentially the same
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel.cc,v 1.77 2007/11/30 13:53:02 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UrbanMscModel.cc,v 1.86 2008/10/29 14:15:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -165,6 +165,7 @@
#include "G4UrbanMscModel.hh"
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4LossTableManager.hh"
#include "G4ParticleChangeForMSC.hh"
#include "G4TransportationManager.hh"
@@ -176,19 +177,8 @@
using namespace std;
G4UrbanMscModel::G4UrbanMscModel(G4double m_facrange, G4double m_dtrl,
G4double m_lambdalimit,
G4double m_facgeom,G4double m_skin,
G4bool m_samplez, G4MscStepLimitType m_stepAlg,
const G4String& nam)
: G4VEmModel(nam),
dtrl(m_dtrl),
lambdalimit(m_lambdalimit),
facrange(m_facrange),
facgeom(m_facgeom),
skin(m_skin),
steppingAlgorithm(m_stepAlg),
samplez(m_samplez),
G4UrbanMscModel::G4UrbanMscModel(const G4String& nam)
: G4VMscModel(nam),
isInitialized(false)
{
masslimite = 0.6*MeV;
@@ -200,7 +190,6 @@ G4UrbanMscModel::G4UrbanMscModel(G4double m_facrange, G4double m_dtrl,
currentTau = taulim;
tlimitminfix = 1.e-6*mm;
stepmin = tlimitminfix;
skindepth = skin*stepmin;
smallstep = 1.e10;
currentRange = 0. ;
frscaling2 = 0.25;
@@ -212,7 +201,6 @@ G4UrbanMscModel::G4UrbanMscModel(G4double m_facrange, G4double m_dtrl,
geommin = 1.e-3*mm;
geomlimit = geombig;
presafety = 0.*mm;
facsafety = 0.25;
Zeff = 1.;
particle = 0;
theManager = G4LossTableManager::Instance();
@@ -231,7 +219,9 @@ G4UrbanMscModel::~G4UrbanMscModel()
void G4UrbanMscModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
{
skindepth = skin*stepmin;
if(isInitialized) return;
// set values of some data members
SetParticle(p);
@@ -243,6 +233,8 @@ void G4UrbanMscModel::Initialise(const G4ParticleDefinition* p,
safetyHelper = G4TransportationManager::GetTransportationManager()
->GetSafetyHelper();
safetyHelper->InitialiseHelper();
isInitialized = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -390,14 +382,13 @@ G4double G4UrbanMscModel::ComputeCrossSectionPerAtom(
G4double eKineticEnergy = KineticEnergy;
if((particle->GetParticleName() != "e-") &&
(particle->GetParticleName() != "e+") )
if(mass > electron_mass_c2)
{
G4double TAU = KineticEnergy/mass ;
G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ;
G4double w = c-2. ;
G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ;
eKineticEnergy = electron_mass_c2*tau ;
G4double TAU = KineticEnergy/mass ;
G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ;
G4double w = c-2. ;
G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ;
eKineticEnergy = electron_mass_c2*tau ;
}
G4double ChargeSquare = charge*charge;
@@ -498,10 +489,11 @@ G4double G4UrbanMscModel::ComputeTruePathLengthLimit(
G4double currentMinimalStep)
{
tPathLength = currentMinimalStep;
G4int stepNumber = track.GetCurrentStepNumber();
const G4DynamicParticle* dp = track.GetDynamicParticle();
G4StepPoint* sp = track.GetStep()->GetPreStepPoint();
G4StepStatus stepStatus = sp->GetStepStatus();
if(stepNumber == 1) {
if(stepStatus == fUndefined) {
inside = false;
insideskin = false;
tlimit = geombig;
@@ -521,7 +513,6 @@ G4double G4UrbanMscModel::ComputeTruePathLengthLimit(
if(tPathLength > currentRange) tPathLength = currentRange;
G4StepPoint* sp = track.GetStep()->GetPreStepPoint();
presafety = sp->GetSafety();
// G4cout << "G4UrbanMscModel::ComputeTruePathLengthLimit tPathLength= "
@@ -535,8 +526,6 @@ G4double G4UrbanMscModel::ComputeTruePathLengthLimit(
return tPathLength;
}
G4StepStatus stepStatus = sp->GetStepStatus();
// standard version
//
if (steppingAlgorithm == fUseDistanceToBoundary)
@@ -554,9 +543,9 @@ G4double G4UrbanMscModel::ComputeTruePathLengthLimit(
smallstep += 1.;
insideskin = false;
if((stepStatus == fGeomBoundary) || (stepNumber == 1))
if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined))
{
if(stepNumber == 1) smallstep = 1.e10;
if(stepStatus == fUndefined) smallstep = 1.e10;
else smallstep = 1.;
// facrange scaling in lambda
@@ -654,7 +643,7 @@ G4double G4UrbanMscModel::ComputeTruePathLengthLimit(
return tPathLength;
}
if((stepStatus == fGeomBoundary) || (stepNumber == 1))
if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined))
{
// facrange scaling in lambda
// not so strong step restriction above lambdalimit
@@ -864,12 +853,13 @@ void G4UrbanMscModel::SampleScattering(const G4DynamicParticle* dynParticle,
G4double safety)
{
G4double kineticEnergy = dynParticle->GetKineticEnergy();
if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)) return;
if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix) ||
(tPathLength/tausmall < lambda0) ) return;
G4double cth = SampleCosineTheta(tPathLength,kineticEnergy);
// protection against 'bad' cth values
if(cth > 1.) cth = 1.;
if(cth < -1.) cth = -1.;
if(abs(cth) > 1.) return;
G4double sth = sqrt((1.0 - cth)*(1.0 + cth));
G4double phi = twopi*G4UniformRand();
G4double dirx = sth*cos(phi);
@@ -898,11 +888,13 @@ void G4UrbanMscModel::SampleScattering(const G4DynamicParticle* dynParticle,
// sample direction of lateral displacement
// compute it from the lateral correlation
G4double Phi = 0.;
if(std::abs(r*sth) < latcorr)
if(std::abs(r*sth) < latcorr) {
Phi = twopi*G4UniformRand();
else
Phi = phi-std::acos(latcorr/(r*sth));
if(Phi < 0.) Phi += twopi;
} else {
G4double psi = std::acos(latcorr/(r*sth));
if(G4UniformRand() < 0.5) Phi = phi+psi;
else Phi = phi-psi;
}
dirx = std::cos(Phi);
diry = std::sin(Phi);
File diff suppressed because it is too large Load Diff
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel90.cc,v 1.1 2007/12/07 17:35:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UrbanMscModel90.cc,v 1.10 2008/10/29 14:15:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -56,6 +56,7 @@
#include "G4UrbanMscModel90.hh"
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4LossTableManager.hh"
#include "G4ParticleChangeForMSC.hh"
#include "G4TransportationManager.hh"
@@ -67,19 +68,8 @@
using namespace std;
G4UrbanMscModel90::G4UrbanMscModel90(G4double m_facrange, G4double m_dtrl,
G4double m_lambdalimit,
G4double m_facgeom,G4double m_skin,
G4bool m_samplez, G4MscStepLimitType m_stepAlg,
const G4String& nam)
: G4VEmModel(nam),
dtrl(m_dtrl),
lambdalimit(m_lambdalimit),
facrange(m_facrange),
facgeom(m_facgeom),
skin(m_skin),
steppingAlgorithm(m_stepAlg),
samplez(m_samplez),
G4UrbanMscModel90::G4UrbanMscModel90(const G4String& nam)
: G4VMscModel(nam),
isInitialized(false)
{
taubig = 8.0;
@@ -88,7 +78,6 @@ G4UrbanMscModel90::G4UrbanMscModel90(G4double m_facrange, G4double m_dtrl,
currentTau = taulim;
tlimitminfix = 1.e-6*mm;
stepmin = tlimitminfix;
skindepth = skin*stepmin;
smallstep = 1.e10;
currentRange = 0. ;
frscaling2 = 0.25;
@@ -100,13 +89,11 @@ G4UrbanMscModel90::G4UrbanMscModel90(G4double m_facrange, G4double m_dtrl,
geommin = 1.e-3*mm;
geomlimit = geombig;
presafety = 0.*mm;
facsafety = 0.25;
Zeff = 1.;
particle = 0;
theManager = G4LossTableManager::Instance();
inside = false;
insideskin = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -117,20 +104,24 @@ G4UrbanMscModel90::~G4UrbanMscModel90()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4UrbanMscModel90::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
const G4DataVector&)
{
skindepth = skin*stepmin;
if(isInitialized) return;
// set values of some data members
SetParticle(p);
if (pParticleChange)
if (pParticleChange) {
fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange);
else
} else {
fParticleChange = new G4ParticleChangeForMSC();
}
safetyHelper = G4TransportationManager::GetTransportationManager()
->GetSafetyHelper();
safetyHelper->InitialiseHelper();
isInitialized = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -278,14 +269,13 @@ G4double G4UrbanMscModel90::ComputeCrossSectionPerAtom(
G4double eKineticEnergy = KineticEnergy;
if((particle->GetParticleName() != "e-") &&
(particle->GetParticleName() != "e+") )
if(mass > electron_mass_c2)
{
G4double TAU = KineticEnergy/mass ;
G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ;
G4double w = c-2. ;
G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ;
eKineticEnergy = electron_mass_c2*tau ;
G4double TAU = KineticEnergy/mass ;
G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ;
G4double w = c-2. ;
G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ;
eKineticEnergy = electron_mass_c2*tau ;
}
G4double ChargeSquare = charge*charge;
@@ -386,10 +376,11 @@ G4double G4UrbanMscModel90::ComputeTruePathLengthLimit(
G4double currentMinimalStep)
{
tPathLength = currentMinimalStep;
G4int stepNumber = track.GetCurrentStepNumber();
const G4DynamicParticle* dp = track.GetDynamicParticle();
G4StepPoint* sp = track.GetStep()->GetPreStepPoint();
G4StepStatus stepStatus = sp->GetStepStatus();
if(stepNumber == 1) {
if(stepStatus == fUndefined) {
inside = false;
insideskin = false;
tlimit = geombig;
@@ -409,13 +400,12 @@ G4double G4UrbanMscModel90::ComputeTruePathLengthLimit(
if(tPathLength > currentRange) tPathLength = currentRange;
G4StepPoint* sp = track.GetStep()->GetPreStepPoint();
presafety = sp->GetSafety();
// G4cout << "G4UrbanMscModel90::ComputeTruePathLengthLimit tPathLength= "
// <<tPathLength<<" safety= " << presafety
// << " range= " <<currentRange<<G4endl;
/*
G4cout << "G4UrbanMscModel90::ComputeTruePathLengthLimit tPathLength= "
<<tPathLength<<" safety= " << presafety
<< " range= " <<currentRange<<G4endl;
*/
// far from geometry boundary
if(currentRange < presafety)
{
@@ -423,8 +413,6 @@ G4double G4UrbanMscModel90::ComputeTruePathLengthLimit(
return tPathLength;
}
G4StepStatus stepStatus = sp->GetStepStatus();
// standard version
//
if (steppingAlgorithm == fUseDistanceToBoundary)
@@ -442,10 +430,10 @@ G4double G4UrbanMscModel90::ComputeTruePathLengthLimit(
smallstep += 1.;
insideskin = false;
if((stepStatus == fGeomBoundary) || (stepNumber == 1))
if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined))
{
if(stepNumber == 1) smallstep = 1.e10;
if(stepStatus == fUndefined) smallstep = 1.e10;
else smallstep = 1.;
// facrange scaling in lambda
@@ -542,7 +530,7 @@ G4double G4UrbanMscModel90::ComputeTruePathLengthLimit(
return tPathLength;
}
if((stepStatus == fGeomBoundary) || (stepNumber == 1))
if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined))
{
// facrange scaling in lambda
// not so strong step restriction above lambdalimit
@@ -579,7 +567,6 @@ G4double G4UrbanMscModel90::ComputeTruePathLengthLimit(
}
// G4cout << "tPathLength= " << tPathLength << " geomlimit= " << geomlimit
// << " currentMinimalStep= " << currentMinimalStep << G4endl;
return tPathLength ;
}
@@ -750,17 +737,14 @@ G4double G4UrbanMscModel90::ComputeTheta0(G4double trueStepLength,
void G4UrbanMscModel90::SampleScattering(const G4DynamicParticle* dynParticle,
G4double safety)
{
G4double kineticEnergy = dynParticle->GetKineticEnergy();
if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)) return;
if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix) ||
(tPathLength/tausmall < lambda0) ) return;
G4double cth = SampleCosineTheta(tPathLength,kineticEnergy);
// protection against 'bad' cth values
if(cth > 1.) cth = 1.;
if(cth < -1.) cth = -1.;
if(std::abs(cth) > 1.) return;
G4double sth = sqrt((1.0 - cth)*(1.0 + cth));
G4double phi = twopi*G4UniformRand();
@@ -790,11 +774,13 @@ void G4UrbanMscModel90::SampleScattering(const G4DynamicParticle* dynParticle,
// sample direction of lateral displacement
// compute it from the lateral correlation
G4double Phi = 0.;
if(std::abs(r*sth) < latcorr)
if(std::abs(r*sth) < latcorr) {
Phi = twopi*G4UniformRand();
else
Phi = phi-std::acos(latcorr/(r*sth));
if(Phi < 0.) Phi += twopi;
} else {
G4double psi = std::acos(latcorr/(r*sth));
if(G4UniformRand() < 0.5) Phi = phi+psi;
else Phi = phi-psi;
}
dirx = std::cos(Phi);
diry = std::sin(Phi);
@@ -886,14 +872,14 @@ G4double G4UrbanMscModel90::SampleCosineTheta(G4double trueStepLength,
}
else
{
if(trueStepLength >= currentRange*dtrl)
if(par1*trueStepLength < 1.)
tau = -par2*log(1.-par1*trueStepLength) ;
// for the case if ioni/brems are inactivated
// see the corresponding condition in ComputeGeomPathLength
else if(1.-KineticEnergy/currentKinEnergy > taulim)
tau = taubig ;
if(trueStepLength >= currentRange*dtrl) {
if(par1*trueStepLength < 1.)
tau = -par2*log(1.-par1*trueStepLength) ;
// for the case if ioni/brems are inactivated
// see the corresponding condition in ComputeGeomPathLength
else if(1.-KineticEnergy/currentKinEnergy > taulim)
tau = taubig ;
}
currentTau = tau ;
lambdaeff = trueStepLength/currentTau;
currentRadLength = couple->GetMaterial()->GetRadlen();
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WaterStopping.cc,v 1.2 2006/06/29 19:53:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WaterStopping.cc,v 1.11 2008/12/18 13:01:38 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//---------------------------------------------------------------------------
//
@@ -47,101 +47,116 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4WaterStopping::G4WaterStopping(G4EmCorrections* corr)
G4WaterStopping::G4WaterStopping(G4EmCorrections* corr, G4bool splineFlag)
{
spline = splineFlag;
Initialise(corr);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4WaterStopping::~G4WaterStopping()
{
int n = dedx.size();
for(int i=0; i<n; i++) {delete dedx[i];}
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WaterStopping::GetElectronicDEDX(G4int iz, G4double energy)
{
G4double res = 0.0;
if(iz < 3 || iz > 18) return res;
G4bool b;
G4int idx = 0;
for(; idx<8; idx++) {
if(iz == Z[idx]) {
res = (dedx[idx])->GetValue(energy, b);
break;
}
G4int idx = iz - 3;
G4double scaledEnergy = energy/A[idx];
G4double emin = 0.025*MeV;
if(scaledEnergy < emin) {
res = (dedx[idx])->GetValue(emin, b)*std::sqrt(scaledEnergy/emin);
} else {
res = (dedx[idx])->GetValue(scaledEnergy, b);
}
return res;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4WaterStopping::AddData(G4double* energy, G4double* stoppower,
G4double factor)
{
G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0],energy[52]);
pv->SetSpline(spline);
dedx.push_back(pv);
for(G4int i=0;i<53;i++) {
pv->PutValues(i,energy[i],stoppower[i]*factor);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4WaterStopping::Initialise(G4EmCorrections* corr)
{
G4int i;
//..List of ions
G4int zz[8] = {3, 4, 5, 6, 7, 8, 9, 10 };
G4int aa[8] = {7, 9, 11, 12, 14, 16, 19, 20 };
for(i=0; i<8; i++) {
G4int zz[16] = {3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18};
G4int aa[16] = {7, 9, 11, 12, 14, 16, 19, 20, 23, 24, 27, 28,31,32, 35,40};
// G4double A_Ion[16] = {6.941,9.0122,10.811,12.011,14.007,15.999,18.998,20.180,22.990,24.305,26.982,28.086,30.974,32.065,35.453,39.948};
for(i=0; i<16; i++) {
Z[i] = zz[i];
A[i] = aa[i];
A[i] = G4double(aa[i]);
}
//..Reduced energies
G4double E[53] = {0.025,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250
,300,400,500,600,700,800,900,1000};
G4double E[53] = {0.025,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250,300,400,500,600,700,800,900,1000};
for(i=0; i<53; i++) {E[i] *= MeV;}
//..Li
G4double Li[53] = {2.626,2.84,3.191,3.461,3.665,3.817,3.927,4.004,4.056,4.102,3.998,3.853,3.702,3.413,3.158,2.934,2.739,2.567,2.415,2.28,1.782,1.465,1.247,1.087,0.8706,0.7299,0.631,0.5575,0.5005,0.455,0.4178,0.3004,0.2376,0.1981,0.1708,0.1354,0.1132,0.09803,0.08692,0.07842,0.07171,0.06627,0.0495,0.04085,0.03557,0.03203,0.0276,0.02498,0.02327,0.0221,0.02126,0.02064,0.02016};
G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],Li[i]*1000.*MeV/cm); }
G4double factor = 1000.*MeV/cm;
//..Be
G4double Be[53] = {3.272,3.565,4.061,4.463,4.79,5.052,5.258,5.419,5.542,5.803,5.787,5.675,5.529,5.215,4.912,4.634,4.381,4.152,3.944,3.756,3.026,2.533,2.179,1.913,1.542,1.296,1.122,0.9911,0.8898,0.8087,0.7423,0.5335,0.4219,0.3518,0.3034,0.2406,0.2013,0.1743,0.1545,0.1394,0.1275,0.1178,0.08805,0.07266,0.06328,0.05698,0.0491,0.04444,0.04141,0.03933,0.03783,0.03672,0.03588};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],Be[i]*1000.*MeV/cm); }
G4double G4_WATER_Li [53]={2.626, 2.84, 3.191, 3.461, 3.665, 3.817, 3.927, 4.004, 4.056, 4.102, 3.998, 3.853, 3.702, 3.413, 3.158, 2.934, 2.739, 2.567, 2.415, 2.28, 1.782, 1.465, 1.247, 1.087, 0.8706, 0.7299, 0.631, 0.5575, 0.5005, 0.455, 0.4178, 0.3004, 0.2376, 0.1981, 0.1708, 0.1354, 0.1132, 0.09803, 0.08692, 0.07842, 0.07171, 0.06627, 0.0495, 0.04085, 0.03557, 0.03203, 0.0276, 0.02498, 0.02327, 0.0221, 0.02126, 0.02064, 0.02016, };
AddData(E,G4_WATER_Li,factor);
//..B
G4double B[53] = {3.773,4.142,4.776,5.304,5.749,6.122,6.431,6.684,6.89,7.432,7.551,7.505,7.391,7.091,6.772,6.463,6.172,5.901,5.65,5.418,4.484,3.817,3.322,2.94,2.392,2.02,1.752,1.549,1.391,1.265,1.161,0.8332,0.6587,0.5492,0.4737,0.3757,0.3144,0.2723,0.2415,0.2179,0.1993,0.1842,0.1376,0.1136,0.09894,0.08909,0.07678,0.0695,0.06477,0.06151,0.05916,0.05743,0.05611};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],B[i]*1000.*MeV/cm); }
G4double G4_WATER_Be [53]={3.272, 3.565, 4.061, 4.463, 4.79, 5.052, 5.258, 5.419, 5.542, 5.803, 5.787, 5.675, 5.529, 5.215, 4.912, 4.634, 4.381, 4.152, 3.944, 3.756, 3.026, 2.533, 2.179, 1.913, 1.542, 1.296, 1.122, 0.9911, 0.8898, 0.8087, 0.7423, 0.5335, 0.4219, 0.3518, 0.3034, 0.2406, 0.2013, 0.1743, 0.1545, 0.1394, 0.1275, 0.1178, 0.08805, 0.07266, 0.06328, 0.05698, 0.0491, 0.04444, 0.04141, 0.03933, 0.03783, 0.03672, 0.03588, };
AddData(E,G4_WATER_Be,factor);
//..C
G4double C[53] = {4.154,4.593,5.358,6.009,6.568,7.049,7.46,7.809,8.103,8.968,9.262,9.311,9.25,8.994,8.68,8.358,8.045,7.747,7.465,7.199,6.093,5.269,4.636,4.137,3.403,2.891,2.516,2.23,2.004,1.823,1.673,1.2,0.9483,0.7904,0.6817,0.5406,0.4525,0.392,0.3477,0.3138,0.287,0.2653,0.1983,0.1637,0.1426,0.1284,0.1107,0.1002,0.09335,0.08865,0.08528,0.08278,0.08088};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],C[i]*1000.*MeV/cm); }
G4double G4_WATER_B [53]={3.773, 4.142, 4.776, 5.304, 5.749, 6.122, 6.431, 6.684, 6.89, 7.432, 7.551, 7.505, 7.391, 7.091, 6.772, 6.463, 6.172, 5.901, 5.65, 5.418, 4.484, 3.817, 3.322, 2.94, 2.392, 2.02, 1.752, 1.549, 1.391, 1.265, 1.161, 0.8332, 0.6587, 0.5492, 0.4737, 0.3757, 0.3144, 0.2723, 0.2415, 0.2179, 0.1993, 0.1842, 0.1376, 0.1136, 0.09894, 0.08909, 0.07678, 0.0695, 0.06477, 0.06151, 0.05916, 0.05743, 0.05611, };
AddData(E,G4_WATER_B,factor);
//..N
G4double N[53] = {4.49,4.984,5.86,6.616,7.276,7.854,8.36,8.799,9.179,10.39,10.89,11.07,11.08,10.9,10.61,10.3,9.974,9.66,9.357,9.068,7.823,6.859,6.097,5.484,4.56,3.9,3.408,3.029,2.727,2.482,2.28,1.636,1.291,1.076,0.9274,0.7354,0.6156,0.5333,0.4731,0.427,0.3906,0.3611,0.27,0.2229,0.1942,0.1749,0.1507,0.1365,0.1272,0.1208,0.1162,0.1128,0.1102};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],N[i]*1000.*MeV/cm); }
G4double G4_WATER_C [53]={4.154, 4.593, 5.358, 6.009, 6.568, 7.049, 7.46, 7.809, 8.103, 8.968, 9.262, 9.311, 9.25, 8.994, 8.68, 8.358, 8.045, 7.747, 7.465, 7.199, 6.093, 5.269, 4.636, 4.137, 3.403, 2.891, 2.516, 2.23, 2.004, 1.823, 1.673, 1.2, 0.9483, 0.7904, 0.6817, 0.5406, 0.4525, 0.392, 0.3477, 0.3138, 0.287, 0.2653, 0.1983, 0.1637, 0.1426, 0.1284, 0.1107, 0.1002, 0.09335, 0.08865, 0.08528, 0.08278, 0.08088, };
AddData(E,G4_WATER_C,factor);
//..O
G4double O[53] = {4.778,5.321,6.298,7.152,7.907,8.578,9.173,9.7,10.16,11.73,12.46,12.78,12.89,12.81,12.57,12.27,11.95,11.63,11.32,11.01,9.659,8.571,7.691,6.967,5.854,5.042,4.427,3.945,3.56,3.245,2.983,2.142,1.689,1.406,1.212,0.9602,0.8037,0.6963,0.6178,0.5577,0.5102,0.4716,0.3527,0.2913,0.2538,0.2285,0.197,0.1784,0.1663,0.1579,0.1519,0.1475,0.1441};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],O[i]*1000.*MeV/cm); }
G4double G4_WATER_N [53]={4.49, 4.984, 5.86, 6.616, 7.276, 7.854, 8.36, 8.799, 9.179, 10.39, 10.89, 11.07, 11.08, 10.9, 10.61, 10.3, 9.974, 9.66, 9.357, 9.068, 7.823, 6.859, 6.097, 5.484, 4.56, 3.9, 3.408, 3.029, 2.727, 2.482, 2.28, 1.636, 1.291, 1.076, 0.9274, 0.7354, 0.6156, 0.5333, 0.4731, 0.427, 0.3906, 0.3611, 0.27, 0.2229, 0.1942, 0.1749, 0.1507, 0.1365, 0.1272, 0.1208, 0.1162, 0.1128, 0.1102, };
AddData(E,G4_WATER_N,factor);
//..F
G4double F[53] = {4.992, 5.575, 6.637, 7.578, 8.418, 9.171, 9.847, 10.45, 11, 12.9, 13.88, 14.35, 14.56, 14.59, 14.4, 14.13, 13.83, 13.51, 13.19, 12.87, 11.44, 10.26, 9.279, 8.463, 7.187, 6.237, 5.506, 4.928, 4.461, 4.076, 3.753, 2.707, 2.137, 1.779, 1.533, 1.215, 1.017, 0.8809, 0.7816, 0.7056, 0.6456, 0.5969, 0.4466, 0.3688, 0.3213, 0.2894, 0.2496, 0.2259,
0.2106, 0.2, 0.1924, 0.1868, 0.1825};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],F[i]*1000.*MeV/cm); }
G4double G4_WATER_O [53]={4.778, 5.321, 6.298, 7.152, 7.907, 8.578, 9.173, 9.7, 10.16, 11.73, 12.46, 12.78, 12.89, 12.81, 12.57, 12.27, 11.95, 11.63, 11.32, 11.01, 9.659, 8.571, 7.691, 6.967, 5.854, 5.042, 4.427, 3.945, 3.56, 3.245, 2.983, 2.142, 1.689, 1.406, 1.212, 0.9602, 0.8037, 0.6963, 0.6178, 0.5577, 0.5102, 0.4716, 0.3527, 0.2913, 0.2538, 0.2285, 0.197, 0.1784, 0.1663, 0.1579, 0.1519, 0.1475, 0.1441, };
AddData(E,G4_WATER_O,factor);
//..Ne
G4double Ne[53] = {5.182, 5.797, 6.931, 7.948, 8.865, 9.693, 10.044, 11.12, 11.74, 13.98, 15.21, 15.85, 16.17, 16.33, 16.21, 15.98, 15.69, 15.38, 15.06, 14.74, 13.24, 11.98, 10.91, 10.01, 8.584, 7.503, 6.66, 5.986, 5.436, 4.979, 4.595, 3.332, 2.635, 2.195, 1.892, 1.499, 1.255, 1.087, 0.9646, 0.8709, 0.7969, 0.7368, 0.5514, 0.4555, 0.3969, 0.3576, 0.3083, 0.2792, 0.2602, 0.2472, 0.2378, 0.2308, 0.2255};
pv = new G4LPhysicsFreeVector(53,E[0],E[52]);
dedx.push_back(pv);
for(i=0; i<53; i++) { pv->PutValues(i,E[i],Ne[i]*1000.*MeV/cm); }
G4double G4_WATER_F [53]={4.992, 5.575, 6.637, 7.578, 8.418, 9.171, 9.847, 10.45, 11, 12.9, 13.88, 14.35, 14.56, 14.59, 14.4, 14.13, 13.83, 13.51, 13.19, 12.87, 11.44, 10.26, 9.279, 8.463, 7.187, 6.237, 5.506, 4.928, 4.461, 4.076, 3.753, 2.707, 2.137, 1.779, 1.533, 1.215, 1.017, 0.8809, 0.7816, 0.7056, 0.6456, 0.5969, 0.4466, 0.3688, 0.3213, 0.2894, 0.2496, 0.2259, 0.2106, 0.2, 0.1924, 0.1868, 0.1825, };
AddData(E,G4_WATER_F,factor);
G4double G4_WATER_Ne [53]={5.182, 5.797, 6.931, 7.948, 8.865, 9.693, 10.44, 11.12, 11.74, 13.98, 15.21, 15.85, 16.17, 16.33, 16.21, 15.98, 15.69, 15.38, 15.06, 14.74, 13.24, 11.98, 10.91, 10.01, 8.584, 7.503, 6.66, 5.986, 5.436, 4.979, 4.595, 3.332, 2.635, 2.195, 1.892, 1.499, 1.255, 1.087, 0.9646, 0.8709, 0.7969, 0.7368, 0.5514, 0.4555, 0.3969, 0.3576, 0.3083, 0.2792, 0.2602, 0.2472, 0.2378, 0.2308, 0.2255, };
AddData(E,G4_WATER_Ne,factor);
G4double G4_WATER_Na [53]={5.352, 5.998, 7.203, 8.3, 9.298, 10.21, 11.04, 11.81, 12.5, 15.13, 16.68, 17.56, 18.04, 18.43, 18.44, 18.29, 18.05, 17.78, 17.48, 17.18, 15.67, 14.32, 13.15, 12.14, 10.5, 9.226, 8.218, 7.401, 6.728, 6.166, 5.69, 4.112, 3.237, 2.686, 2.307, 1.821, 1.521, 1.317, 1.168, 1.054, 0.9644, 0.8917, 0.6674, 0.5514, 0.4806, 0.4329, 0.3734, 0.3381, 0.3152, 0.2993, 0.288, 0.2796, 0.2732, };
AddData(E,G4_WATER_Na,factor);
G4double G4_WATER_Mg [53]={5.542, 6.193, 7.42, 8.551, 9.59, 10.54, 11.42, 12.23, 12.98, 15.85, 17.62, 18.66, 19.26, 19.76, 19.83, 19.7, 19.47, 19.2, 18.89, 18.58, 17.02, 15.62, 14.41, 13.36, 11.64, 10.3, 9.233, 8.362, 7.64, 7.033, 6.516, 4.777, 3.792, 3.162, 2.725, 2.159, 1.806, 1.565, 1.388, 1.254, 1.147, 1.061, 0.7944, 0.6565, 0.5722, 0.5156, 0.4447, 0.4027, 0.3754, 0.3566, 0.343, 0.333, 0.3254, };
AddData(E,G4_WATER_Mg,factor);
G4double G4_WATER_Al [53]={5.724, 6.39, 7.649, 8.82, 9.905, 10.91, 11.84, 12.71, 13.51, 16.66, 18.69, 19.93, 20.68, 21.38, 21.56, 21.5, 21.32, 21.07, 20.79, 20.48, 18.91, 17.47, 16.19, 15.08, 13.24, 11.78, 10.61, 9.641, 8.835, 8.153, 7.569, 5.583, 4.444, 3.71, 3.199, 2.534, 2.12, 1.836, 1.629, 1.471, 1.346, 1.245, 0.9325, 0.7707, 0.6719, 0.6054, 0.5223, 0.473, 0.441, 0.4189, 0.403, 0.3912, 0.3823, };
AddData(E,G4_WATER_Al,factor);
G4double G4_WATER_Si [53]={5.905, 6.583, 7.868, 9.073, 10.2, 11.25, 12.23, 13.14, 13.99, 17.4, 19.66, 21.1, 22.01, 22.91, 23.21, 23.22, 23.09, 22.87, 22.61, 22.32, 20.76, 19.28, 17.95, 16.78, 14.83, 13.26, 11.99, 10.94, 10.06, 9.304, 8.656, 6.43, 5.135, 4.294, 3.705, 2.938, 2.458, 2.129, 1.889, 1.706, 1.561, 1.444, 1.082, 0.8942, 0.7796, 0.7026, 0.6061, 0.549, 0.5119, 0.4862, 0.4678, 0.4542, 0.4438, };
AddData(E,G4_WATER_Si,factor);
G4double G4_WATER_P [53]={6.12, 6.81, 8.118, 9.352, 10.51, 11.61, 12.63, 13.58, 14.48, 18.13, 20.63, 22.28, 23.34, 24.47, 24.91, 25.02, 24.95, 24.78, 24.55, 24.28, 22.76, 21.26, 19.89, 18.67, 16.59, 14.92, 13.54, 12.39, 11.42, 10.59, 9.867, 7.367, 5.896, 4.935, 4.259, 3.376, 2.824, 2.445, 2.169, 1.959, 1.792, 1.657, 1.242, 1.027, 0.8954, 0.807, 0.6963, 0.6308, 0.5881, 0.5587, 0.5375, 0.5219, 0.51, };
AddData(E,G4_WATER_P,factor);
G4double G4_WATER_S [53]={6.294, 7, 8.338, 9.604, 10.8, 11.94, 13, 14, 14.94, 18.82, 21.55, 23.41, 24.65, 26.01, 26.6, 26.81, 26.81, 26.69, 26.5, 26.26, 24.79, 23.28, 21.88, 20.61, 18.43, 16.64, 15.16, 13.92, 12.86, 11.95, 11.15, 8.371, 6.715, 5.624, 4.856, 3.847, 3.217, 2.785, 2.47, 2.229, 2.04, 1.886, 1.413, 1.169, 1.019, 0.9187, 0.7929, 0.7183, 0.6697, 0.6362, 0.6122, 0.5944, 0.5808, };
AddData(E,G4_WATER_S,factor);
G4double G4_WATER_Cl [53]={6.522, 7.237, 8.59, 9.875, 11.1, 12.26, 13.36, 14.39, 15.37, 19.45, 22.4, 24.45, 25.86, 27.46, 28.19, 28.5, 28.57, 28.5, 28.34, 28.13, 26.72, 25.21, 23.78, 22.47, 20.2, 18.32, 16.75, 15.42, 14.28, 13.3, 12.44, 9.392, 7.557, 6.34, 5.479, 4.344, 3.633, 3.145, 2.789, 2.517, 2.303, 2.13, 1.596, 1.32, 1.151, 1.038, 0.8957, 0.8115, 0.7567, 0.7189, 0.6917, 0.6717, 0.6563, };
AddData(E,G4_WATER_Cl,factor);
G4double G4_WATER_Ar [53]={6.642, 7.369, 8.739, 10.04, 11.28, 12.47, 13.59, 14.66, 15.66, 19.93, 23.08, 25.32, 26.89, 28.72, 29.6, 30.01, 30.15, 30.13, 30, 29.82, 28.46, 26.94, 25.49, 24.15, 21.81, 19.86, 18.22, 16.82, 15.61, 14.57, 13.65, 10.39, 8.394, 7.063, 6.114, 4.859, 4.067, 3.522, 3.125, 2.821, 2.581, 2.387, 1.789, 1.48, 1.291, 1.164, 1.005, 0.9105, 0.8491, 0.8067, 0.7763, 0.7537, 0.7365, };
AddData(E,G4_WATER_Ar,factor);
if(corr) {
for(i=0; i<8; i++) {corr->AddStoppingData(Z[i], A[i], "G4_WATER", *(dedx[i]));}
for(i=0; i<16; i++) {corr->AddStoppingData(Z[i], aa[i], "G4_WATER", dedx[i]);}
}
}
@@ -0,0 +1,818 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WentzelVIModel.cc,v 1.16 2008/11/19 11:47:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4WentzelVIModel
//
// Author: V.Ivanchenko
//
// Creation date: 09.04.2008 from G4MuMscModel
//
// Modifications:
//
//
// Class Description:
//
// Implementation of the model of multiple scattering based on
// G.Wentzel, Z. Phys. 40 (1927) 590.
// H.W.Lewis, Phys Rev 78 (1950) 526.
// J.M. Fernandez-Varea et al., NIM B73 (1993) 447.
// L.Urban, CERN-OPEN-2006-077.
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4WentzelVIModel.hh"
#include "Randomize.hh"
#include "G4LossTableManager.hh"
#include "G4ParticleChangeForMSC.hh"
#include "G4TransportationManager.hh"
#include "G4SafetyHelper.hh"
#include "G4PhysicsTableHelper.hh"
#include "G4ElementVector.hh"
#include "G4ProductionCutsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Proton.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4WentzelVIModel::G4WentzelVIModel(const G4String& nam) :
G4VMscModel(nam),
theLambdaTable(0),
theLambda2Table(0),
numlimit(0.2),
nbins(60),
nwarnings(0),
nwarnlimit(50),
currentCouple(0),
cosThetaMin(1.0),
q2Limit(TeV*TeV),
alpha2(fine_structure_const*fine_structure_const),
isInitialized(false),
inside(false)
{
invsqrt12 = 1./sqrt(12.);
tlimitminfix = 1.e-6*mm;
theManager = G4LossTableManager::Instance();
fNistManager = G4NistManager::Instance();
theElectron = G4Electron::Electron();
thePositron = G4Positron::Positron();
theProton = G4Proton::Proton();
a0 = alpha2*electron_mass_c2*electron_mass_c2/(0.885*0.885);
G4double p0 = electron_mass_c2*classic_electr_radius;
coeff = twopi*p0*p0;
constn = 6.937e-6/(MeV*MeV);
tkin = targetZ = mom2 = DBL_MIN;
ecut = etag = DBL_MAX;
particle = 0;
nelments = 5;
xsecn.resize(nelments);
prob.resize(nelments);
for(size_t j=0; j<100; j++) {
FF[j] = 0.0;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4WentzelVIModel::~G4WentzelVIModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4WentzelVIModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
// reset parameters
SetupParticle(p);
tkin = targetZ = mom2 = DBL_MIN;
ecut = etag = DBL_MAX;
currentRange = 0.0;
cosThetaMax = cos(PolarAngleLimit());
currentCuts = &cuts;
// set values of some data members
if(!isInitialized) {
isInitialized = true;
if (pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange);
else
fParticleChange = new G4ParticleChangeForMSC();
safetyHelper = G4TransportationManager::GetTransportationManager()
->GetSafetyHelper();
safetyHelper->InitialiseHelper();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelVIModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
G4double Z, G4double,
G4double cutEnergy, G4double)
{
SetupParticle(p);
G4double ekin = std::max(lowEnergyLimit, kinEnergy);
SetupKinematic(ekin, cutEnergy);
SetupTarget(Z, ekin);
G4double xsec = ComputeTransportXSectionPerVolume();
/*
G4cout << "CS: e= " << tkin << " cosEl= " << cosTetMaxElec2
<< " cosN= " << cosTetMaxNuc2 << " xsec(bn)= " << xsec/barn
<< " " << particle->GetParticleName() << G4endl;
*/
return xsec;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelVIModel::ComputeTransportXSectionPerVolume()
{
G4double xSection = 0.0;
G4double x, y, x1, x2, x3, x4;
// scattering off electrons
if(cosTetMaxElec2 < 1.0) {
x = (1.0 - cosTetMaxElec2)/screenZ;
if(x < numlimit) y = 0.5*x*x*(1.0 - 1.3333333*x + 1.5*x*x);
else y = log(1.0 + x) - x/(1.0 + x);
if(y < 0.0) {
nwarnings++;
if(nwarnings < nwarnlimit /*&& y < -1.e-10*/) {
G4cout << "Electron scattering <0 for L1 " << y
<< " e(MeV)= " << tkin << " p(MeV/c)= " << sqrt(mom2)
<< " Z= " << targetZ << " "
<< particle->GetParticleName() << G4endl;
G4cout << " z= " << 1.0-cosTetMaxElec2 << " screenZ= " << screenZ
<< " x= " << x << G4endl;
}
y = 0.0;
}
xSection += y/targetZ;
}
/*
G4cout << "G4WentzelVIModel:XS per A " << " Z= " << Z << " e(MeV)= " << kinEnergy/MeV
<< " cut(MeV)= " << ecut/MeV
<< " zmaxE= " << (1.0 - cosTetMaxElec)/screenZ
<< " zmaxN= " << (1.0 - cosTetMsxNuc)/screenZ << G4endl;
*/
// scattering off nucleus
if(cosTetMaxNuc2 < 1.0) {
x = 1.0 - cosTetMaxNuc2;
x1 = screenZ*formfactA;
x2 = 1.0/(1.0 - x1);
x3 = x/screenZ;
x4 = formfactA*x;
// low-energy limit
if(x3 < numlimit && x1 < numlimit) {
y = 0.5*x3*x3*x2*x2*x2*(1.0 - 1.333333*x3 + 1.5*x3*x3 - 1.5*x1
+ 3.0*x1*x1 + 2.666666*x3*x1);
// high energy limit
} else if(1.0 < x1) {
x4 = x1*(1.0 + x3);
y = x3*(1.0 + 0.5*x3 - (2.0 - x1)*(1.0 + x3 + x3*x3/3.0)/x4)/(x4*x4);
// middle energy
} else {
y = ((1.0 + x1)*x2*log((1. + x3)/(1. + x4))
- x3/(1. + x3) - x4/(1. + x4))*x2*x2;
}
if(y < 0.0) {
nwarnings++;
if(nwarnings < nwarnlimit /*&& y < -1.e-10*/) {
G4cout << "Nuclear scattering <0 for L1 " << y
<< " e(MeV)= " << tkin << " Z= " << targetZ << " "
<< particle->GetParticleName() << G4endl;
G4cout << " formfactA= " << formfactA << " screenZ= " << screenZ
<< " x= " << " x1= " << x1 << " x2= " << x2
<< " x3= " << x3 << " x4= " << x4 <<G4endl;
}
y = 0.0;
}
xSection += y;
}
xSection *= (coeff*targetZ*targetZ*chargeSquare*invbeta2/mom2);
// G4cout << " XStotal= " << xSection/barn << " screenZ= " << screenZ
// << " formF= " << formfactA << " for " << p->GetParticleName() << G4endl;
return xSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelVIModel::ComputeTruePathLengthLimit(
const G4Track& track,
G4PhysicsTable* theTable,
G4double currentMinimalStep)
{
G4double tlimit = currentMinimalStep;
const G4DynamicParticle* dp = track.GetDynamicParticle();
G4StepPoint* sp = track.GetStep()->GetPreStepPoint();
G4StepStatus stepStatus = sp->GetStepStatus();
// initialisation for 1st step
if(stepStatus == fUndefined) {
inside = false;
SetupParticle(dp->GetDefinition());
theLambdaTable = theTable;
}
// initialisation for each step, lambda may be computed from scratch
preKinEnergy = dp->GetKineticEnergy();
DefineMaterial(track.GetMaterialCutsCouple());
lambda0 = GetLambda(preKinEnergy);
currentRange =
theManager->GetRangeFromRestricteDEDX(particle,preKinEnergy,currentCouple);
// extra check for abnormal situation
// this check needed to run MSC with eIoni and eBrem inactivated
if(tlimit > currentRange) tlimit = currentRange;
// stop here if small range particle
if(inside) return tlimit;
// pre step
G4double presafety = sp->GetSafety();
// compute presafety again if presafety <= 0 and no boundary
// i.e. when it is needed for optimization purposes
if(stepStatus != fGeomBoundary && presafety < tlimitminfix)
presafety = safetyHelper->ComputeSafety(sp->GetPosition());
/*
G4cout << "G4WentzelVIModel::ComputeTruePathLengthLimit tlimit= "
<<tlimit<<" safety= " << presafety
<< " range= " <<currentRange<<G4endl;
*/
// far from geometry boundary
if(currentRange < presafety) {
inside = true;
// limit mean scattering angle
} else {
G4double rlimit = facrange*lambda0;
G4double rcut = currentCouple->GetProductionCuts()->GetProductionCut(1);
if(rcut > rlimit) rlimit = std::pow(2.0*rcut*rcut*lambda0,0.33333333);
if(rlimit < tlimit) tlimit = rlimit;
}
/*
G4cout << particle->GetParticleName() << " e= " << preKinEnergy
<< " L0= " << lambda0 << " R= " << currentRange
<< "tlimit= " << tlimit
<< " currentMinimalStep= " << currentMinimalStep << G4endl;
*/
return tlimit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelVIModel::ComputeGeomPathLength(G4double truelength)
{
tPathLength = truelength;
zPathLength = tPathLength;
lambdaeff = lambda0;
if(lambda0 > 0.0) {
G4double tau = tPathLength/lambda0;
//G4cout << "ComputeGeomPathLength: tLength= " << tPathLength
// << " lambda0= " << lambda0 << " tau= " << tau << G4endl;
// small step
if(tau < numlimit) {
zPathLength *= (1.0 - 0.5*tau + tau*tau/6.0);
// medium step
} else {
// zPathLength = lambda0*(1.0 - exp(-tPathLength/lambda0));
G4double e1 = 0.0;
if(currentRange > tPathLength) {
e1 = theManager->GetEnergy(particle,
currentRange-tPathLength,
currentCouple);
}
lambdaeff = GetLambda(0.5*(e1 + preKinEnergy));
zPathLength = lambdaeff*(1.0 - exp(-tPathLength/lambdaeff));
}
}
//G4cout<<"Comp.geom: zLength= "<<zPathLength<<" tLength= "<<tPathLength<<G4endl;
return zPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelVIModel::ComputeTrueStepLength(G4double geomStepLength)
{
// step defined other than transportation
if(geomStepLength == zPathLength) return tPathLength;
// step defined by transportation
tPathLength = geomStepLength;
zPathLength = geomStepLength;
G4double tau = zPathLength/lambdaeff;
tPathLength *= (1.0 + 0.5*tau + tau*tau/3.0);
if(tau > numlimit) {
G4double e1 = 0.0;
if(currentRange > tPathLength) {
e1 = theManager->GetEnergy(particle,
currentRange-tPathLength,
currentCouple);
}
lambdaeff = GetLambda(0.5*(e1 + preKinEnergy));
tau = zPathLength/lambdaeff;
if(tau < 0.999999) tPathLength = -lambdaeff*log(1.0 - tau);
else tPathLength = currentRange;
if(tPathLength < zPathLength) tPathLength = zPathLength;
}
if(tPathLength > currentRange) tPathLength = currentRange;
//G4cout<<"Comp.true: zLength= "<<zPathLength<<" tLength= "<<tPathLength<<G4endl;
return tPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4WentzelVIModel::SampleScattering(const G4DynamicParticle* dynParticle,
G4double safety)
{
//G4cout << "!##! G4WentzelVIModel::SampleScattering for "
// << particle->GetParticleName() << G4endl;
G4double kinEnergy = dynParticle->GetKineticEnergy();
if(kinEnergy <= DBL_MIN || tPathLength <= DBL_MIN) return;
G4double ekin = preKinEnergy;
if(ekin - kinEnergy > ekin*dtrl) {
ekin = 0.5*(preKinEnergy + kinEnergy);
lambdaeff = GetLambda(ekin);
}
G4double x1 = 0.5*tPathLength/lambdaeff;
G4double cut= (*currentCuts)[currentMaterialIndex];
/*
G4cout <<"SampleScat: E0(MeV)= "<< preKinEnergy<<" Eeff(MeV)= "<<ekin/MeV
<< " L0= " << lambda0 << " Leff= " << lambdaeff
<< " x1= " << x1 << " safety= " << safety << G4endl;
*/
G4double xsec = 0.0;
G4bool largeAng = false;
// large scattering angle case
if(x1 > 0.5) {
x1 *= 0.5;
largeAng = true;
// normal case
} else {
// define threshold angle as 2 sigma of central value
cosThetaMin = 1.0 - 3.0*x1;
// for low-energy e-,e+ no limit
ekin = std::max(ekin, lowEnergyLimit);
SetupKinematic(ekin, cut);
// recompute transport cross section
if(cosThetaMin > cosTetMaxNuc) {
xsec = ComputeXSectionPerVolume();
if(xtsec > DBL_MIN) x1 = 0.5*tPathLength*xtsec;
else x1 = 0.0;
/*
G4cout << "cosTetMaxNuc= " << cosTetMaxNuc
<< " cosThetaMin= " << cosThetaMin
<< " cosThetaMax= " << cosThetaMax
<< " cosTetMaxElec2= " << cosTetMaxElec2 << G4endl;
G4cout << "Recomputed xsec(1/mm)= " << xsec << " x1= " << x1 << G4endl;
*/
}
}
// result of central part sampling
G4double z;
do {
z = -x1*log(G4UniformRand());
} while (z > 1.0);
// cost is sampled ------------------------------
G4double cost = 1.0 - 2.0*z;
if(cost < -1.0) cost = -1.0;
else if(cost > 1.0) cost = 1.0;
G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
G4double phi = twopi*G4UniformRand();
G4double dirx = sint*cos(phi);
G4double diry = sint*sin(phi);
//G4cout << "G4WentzelVIModel: step(mm)= " << tPathLength/mm
// << " sint= " << sint << " cost= " << cost<< G4endl;
G4ThreeVector oldDirection = dynParticle->GetMomentumDirection();
G4ThreeVector newDirection(dirx,diry,cost);
G4ThreeVector temp(0.0,0.0,1.0);
G4ThreeVector pos(0.0,0.0,-zPathLength);
G4ThreeVector dir(0.0,0.0,1.0);
G4bool isscat = false;
// sample MSC scattering for large angle
// extra central scattering for holf step
if(largeAng) {
isscat = true;
pos.setZ(-0.5*zPathLength);
do {
z = -x1*log(G4UniformRand());
} while (z > 1.0);
cost = 1.0 - 2.0*z;
if(std::abs(cost) > 1.0) cost = 1.0;
sint = sqrt((1.0 - cost)*(1.0 + cost));
phi = twopi*G4UniformRand();
// position and direction for secondary scattering
dir.set(sint*cos(phi),sint*sin(phi),cost);
pos += 0.5*dir*zPathLength;
x1 *= 2.0;
}
// sample Reserford scattering for large angle
if(xsec > DBL_MIN) {
G4double t = tPathLength;
G4int nelm = currentMaterial->GetNumberOfElements();
const G4ElementVector* theElementVector =
currentMaterial->GetElementVector();
do{
G4double x = -log(G4UniformRand())/xsec;
pos += dir*(zPathLength*std::min(x,t)/tPathLength);
t -= x;
if(t > 0.0) {
G4double zz1 = 1.0;
G4double qsec = G4UniformRand()*xsec;
// scattering off nucleus
G4int i = 0;
if(nelm > 1) {
for (; i<nelm; i++) {if(xsecn[i] >= qsec) break;}
if(i >= nelm) i = nelm - 1;
}
SetupTarget((*theElementVector)[i]->GetZ(), tkin);
G4double formf = formfactA;
G4double costm = cosTetMaxNuc2;
if(prob[i] > 0.0) {
if(G4UniformRand() <= prob[i]) {
formf = 0.0;
costm = cosTetMaxElec2;
}
}
if(cosThetaMin > costm) {
G4double w1 = 1. - cosThetaMin + screenZ;
G4double w2 = 1. - costm + screenZ;
G4double w3 = cosThetaMin - costm;
G4double grej, zz;
do {
zz = w1*w2/(w1 + G4UniformRand()*w3) - screenZ;
grej = 1.0/(1.0 + formf*zz);
} while ( G4UniformRand() > grej*grej );
if(zz < 0.0) zz = 0.0;
else if(zz > 2.0) zz = 2.0;
zz1 = 1.0 - zz;
}
if(zz1 < 1.0) {
isscat = true;
//G4cout << "Reserford zz1= " << zz1 << " t= " << t << G4endl;
sint = sqrt((1.0 - zz1)*(1.0 + zz1));
//G4cout << "sint= " << sint << G4endl;
phi = twopi*G4UniformRand();
G4double vx1 = sint*cos(phi);
G4double vy1 = sint*sin(phi);
temp.set(vx1,vy1,zz1);
temp.rotateUz(dir);
dir = temp;
}
}
} while (t > 0.0);
}
if(isscat) newDirection.rotateUz(dir);
newDirection.rotateUz(oldDirection);
//G4cout << "G4WentzelVIModel sampling of scattering is done" << G4endl;
// end of sampling -------------------------------
fParticleChange->ProposeMomentumDirection(newDirection);
if (latDisplasment && safety > tlimitminfix) {
G4double rms = invsqrt12*sqrt(2.0*x1);
G4double dx = zPathLength*(0.5*dirx + rms*G4RandGauss::shoot(0.0,1.0));
G4double dy = zPathLength*(0.5*diry + rms*G4RandGauss::shoot(0.0,1.0));
G4double dz;
G4double d = (dx*dx + dy*dy)/(zPathLength*zPathLength);
if(d < numlimit) dz = -0.5*zPathLength*d*(1.0 + 0.25*d);
else if(d < 1.0) dz = -zPathLength*(1.0 - sqrt(1.0 - d));
else {
dx = dy = dz = 0.0;
}
temp.set(dx,dy,dz);
if(isscat) temp.rotateUz(dir);
pos += temp;
pos.rotateUz(oldDirection);
G4double r = pos.mag();
/*
G4cout << " r(mm)= " << r << " safety= " << safety
<< " trueStep(mm)= " << tPathLength
<< " geomStep(mm)= " << zPathLength
<< G4endl;
*/
if(r > tlimitminfix) {
G4ThreeVector Position = *(fParticleChange->GetProposedPosition());
G4double fac= 1.;
if(r >= safety) {
// ******* so safety is computed at boundary too ************
G4double newsafety =
safetyHelper->ComputeSafety(Position) - tlimitminfix;
if(newsafety <= 0.0) fac = 0.0;
else if(r > newsafety) fac = newsafety/r ;
//G4cout << "NewSafety= " << newsafety << " fac= " << fac
// << " r= " << r << " sint= " << sint << " pos " << Position << G4endl;
}
if(fac > 0.) {
// compute new endpoint of the Step
G4ThreeVector newPosition = Position + fac*pos;
// check safety after displacement
G4double postsafety = safetyHelper->ComputeSafety(newPosition);
// displacement to boundary
if(postsafety <= 0.0) {
safetyHelper->Locate(newPosition, newDirection);
// not on the boundary
} else {
safetyHelper->ReLocateWithinVolume(newPosition);
// if(fac < 1.0) G4cout << "NewPosition " << newPosition << G4endl;
}
fParticleChange->ProposePosition(newPosition);
}
}
}
//G4cout << "G4WentzelVIModel::SampleScattering end" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4WentzelVIModel::ComputeXSectionPerVolume()
{
const G4ElementVector* theElementVector =
currentMaterial->GetElementVector();
const G4double* theAtomNumDensityVector =
currentMaterial->GetVecNbOfAtomsPerVolume();
G4int nelm = currentMaterial->GetNumberOfElements();
if(nelm > nelments) {
nelments = nelm;
xsecn.resize(nelments);
prob.resize(nelments);
}
xtsec = 0.0;
G4double xs = 0.0;
G4double fac = coeff*chargeSquare*invbeta2/mom2;
for (G4int i=0; i<nelm; i++) {
SetupTarget((*theElementVector)[i]->GetZ(), tkin);
G4double density = theAtomNumDensityVector[i];
G4double cosnm = cosTetMaxNuc2;
G4double cosem = cosTetMaxElec2;
// recompute the angular limit
cosTetMaxNuc2 = std::max(cosnm,cosThetaMin);
cosTetMaxElec2 = std::max(cosem,cosThetaMin);
xtsec += ComputeTransportXSectionPerVolume()*density;
// return limit back
cosTetMaxElec2 = cosem;
cosTetMaxNuc2 = cosnm;
G4double esec = 0.0;
G4double nsec = 0.0;
G4double x1 = 1.0 - cosThetaMin + screenZ;
G4double f = fac*targetZ*density;
// scattering off electrons
if(cosThetaMin > cosem) {
esec = f*(cosThetaMin - cosem)/(x1*(1.0 - cosem + screenZ));
}
// scattering off nucleaus
if(cosThetaMin > cosnm) {
// Reserford part
G4double s = screenZ*formfactA;
G4double z1 = 1.0 - cosnm + screenZ;
G4double d = (1.0 - s)/formfactA;
// check numerical limit
if(d < numlimit*x1) {
G4double x2 = x1*x1;
G4double z2 = z1*z1;
nsec = (1.0/(x1*x2) - 1.0/(z1*z2) - d*1.5*(1.0/(x2*x2) - 1.0/(z2*z2)))/
(3.0*formfactA*formfactA);
} else {
G4double x2 = x1 + d;
G4double z2 = z1 + d;
nsec = (1.0 + 2.0*s)*((cosThetaMin - cosnm)*(1.0/(x1*z1) + 1.0/(x2*z2)) -
2.0*log(z1*x2/(z2*x1))/d);
}
nsec *= f*targetZ;
}
nsec += esec;
if(nsec > 0.0) esec /= nsec;
xs += nsec;
xsecn[i] = xs;
prob[i] = esec;
//G4cout << i << " xs= " << xs << " cosThetaMin= " << cosThetaMin
// << " costm= " << costm << G4endl;
}
//G4cout << "ComputeXS result: xsec(1/mm)= " << xs
//<< " txsec(1/mm)= " << xtsec <<G4endl;
return xs;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/*
G4double G4MuMscModel::ComputeXSectionPerVolume()
{
const G4ElementVector* theElementVector =
currentMaterial->GetElementVector();
const G4double* theAtomNumDensityVector =
currentMaterial->GetVecNbOfAtomsPerVolume();
size_t nelm = currentMaterial->GetNumberOfElements();
xsece1 = 0.0;
xsece2 = 0.0;
xsecn2 = 0.0;
zcorr = 0.0;
G4double fac = coeff*chargeSquare*invbeta2/mom2;
for (size_t i=0; i<nelm; i++) {
const G4Element* elm = (*theElementVector)[i];
G4double Z = elm->GetZ();
SetupTarget(Z, tkin);
G4double den = fac*theAtomNumDensityVector[i]*Z;
G4double x = 1.0 - cosThetaMin;
G4double x1 = x + screenZ;
G4double x2 = 1.0/(x1*x1);
G4double x3 = 1.0 + x*formfactA;
//G4cout << "x= " << x << " den= " << den << " cosE= " << cosTetMaxElec << G4endl;
//G4cout << "cosThtaMin= " << cosThetaMin << G4endl;
//G4cout << "cosTetMaxNuc= " << cosTetMaxNuc << " q2Limit= " << q2Limit << G4endl;
// scattering off electrons
if(cosTetMaxElec < cosThetaMin) {
// flat part
G4double s = den*x2*x;
xsece1 += s;
zcorr += 0.5*x*s;
// Reserford part
G4double z1 = 1.0 - cosTetMaxElec + screenZ;
G4double z2 = (cosThetaMin - cosTetMaxElec)/x1;
if(z2 < 0.2) s = z2*(x - 0.5*z2*(x - screenZ))/x1;
else s = log(1.0 + z2) - screenZ*z2/z1;
xsece2 += den*z2/z1;
zcorr += den*s;
}
den *= Z;
//G4cout << "Z= " << Z<< " cosL= " << cosTetMaxNuc << " cosMin= " << cosThetaMin << G4endl;
// scattering off nucleaus
if(cosTetMaxNuc < cosThetaMin) {
// flat part
G4double s = den*x2*x/(x3*x3);
xsece1 += s;
zcorr += 0.5*x*s;
// Reserford part
s = screenZ*formfactA;
G4double w = 1.0 + 2.0*s;
G4double z1 = 1.0 - cosTetMaxNuc + screenZ;
G4double d = (1.0 - s)/formfactA;
G4double x4 = x1 + d;
G4double z4 = z1 + d;
G4double t1 = 1.0/(x1*z1);
G4double t4 = 1.0/(x4*z4);
G4double w1 = cosThetaMin - cosTetMaxNuc;
G4double w2 = log(z1*x4/(x1*z4));
den *= w;
xsecn2 += den*(w1*(t1 + t4) - 2.0*w2/d);
zcorr += den*(w*w2 - w1*(screenZ*t1 + t4/formfactA));
}
xsece[i] = xsece2;
xsecn[i] = xsecn2;
// G4cout << i << " xsece2= " << xsece2 << " xsecn2= " << xsecn2 << G4endl;
}
G4double xsec = xsece1 + xsece2 + xsecn2;
//G4cout << "xsece1= " << xsece1 << " xsece2= " << xsece2
//<< " xsecn2= " << xsecn2
// << " zsec= " << zcorr*0.5*tPathLength << G4endl;
zcorr *= 0.5*tPathLength;
return xsec;
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4WentzelVIModel::ComputeMaxElectronScattering(G4double cutEnergy)
{
ecut = cutEnergy;
G4double tmax = tkin;
cosTetMaxElec = 1.0;
if(mass > MeV) {
G4double ratio = electron_mass_c2/mass;
G4double tau = tkin/mass;
tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/
(1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2;
} else {
if(particle == theElectron) tmax *= 0.5;
G4double t = std::min(cutEnergy, tmax);
G4double mom21 = t*(t + 2.0*electron_mass_c2);
G4double t1 = tkin - t;
//G4cout <<"tkin=" <<tkin<<" tmax= "<<tmax<<" t= "
//<<t<< " t1= "<<t1<<" cut= "<<ecut<<G4endl;
if(t1 > 0.0) {
G4double mom22 = t1*(t1 + 2.0*mass);
G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
if(ctm < 1.0) cosTetMaxElec = ctm;
}
}
if(cosTetMaxElec < cosTetMaxNuc) cosTetMaxElec = cosTetMaxNuc;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4WentzelVIModel::SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double,
G4double)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlung.cc,v 1.48 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eBremsstrahlung.cc,v 1.55 2008/11/14 19:23:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -68,7 +68,8 @@
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 22-05-06 Use gammaThreshold from manager (V.Ivantchenko)
// 15-01-07 use SetEmModel() from G4VEnergyLossProcess (mma)
//
// use RelEmModel above 1GeV (AS & VI)
// 13-11-08 reenable LPM switch (A.Schaelicke)
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -77,7 +78,7 @@
#include "G4eBremsstrahlung.hh"
#include "G4Gamma.hh"
#include "G4eBremsstrahlungModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4eBremsstrahlungRelModel.hh"
#include "G4UnitsTable.hh"
#include "G4LossTableManager.hh"
@@ -91,7 +92,9 @@ using namespace std;
G4eBremsstrahlung::G4eBremsstrahlung(const G4String& name):
G4VEnergyLossProcess(name),
isInitialised(false)
{}
{
SetProcessSubType(fBremsstrahlung);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -108,38 +111,40 @@ void G4eBremsstrahlung::InitialiseEnergyLossProcess(
particle = p;
SetSecondaryParticle(G4Gamma::Gamma());
SetIonisation(false);
if (!EmModel()) SetEmModel(new G4eBremsstrahlungModel());
EmModel()->SetLowEnergyLimit (100*eV);
EmModel()->SetHighEnergyLimit(100*TeV);
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
if (!EmModel(1)) SetEmModel(new G4eBremsstrahlungModel(), 1);
if (!EmModel(2)) SetEmModel(new G4eBremsstrahlungRelModel(), 2);
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
EmModel(1)->SetHighEnergyLimit(EmModel(2)->LowEnergyLimit());
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(1, EmModel(), FluctModel());
G4VEmFluctuationModel* fm = 0;
AddEmModel(1, EmModel(1), fm);
AddEmModel(2, EmModel(2), fm);
isInitialised = true;
}
G4LossTableManager* man = G4LossTableManager::Instance();
dynamic_cast<G4eBremsstrahlungModel*>(EmModel())
->SetEnergyThreshold(man->BremsstrahlungTh());
dynamic_cast<G4eBremsstrahlungModel*>(EmModel())
->SetLPMflag(man->LPMFlag());
G4double eth = man->BremsstrahlungTh();
EmModel(1)->SetSecondaryThreshold(eth);
EmModel(2)->SetSecondaryThreshold(eth);
// Only high energy model LMP flag is ON/OFF
EmModel(1)->SetLPMFlag(false);
EmModel(2)->SetLPMFlag(man->LPMFlag());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlung::PrintInfo()
{
if(EmModel()) {
G4cout << " Total cross sections and sampling from "
<< EmModel()->GetName() << " model"
<< " (based on the EEDL data library) "
<< "\n Good description from 1 KeV to 100 GeV, "
<< "log scale extrapolation above 100 GeV."
<< " LPM flag "
<< dynamic_cast<G4eBremsstrahlungModel*>(EmModel())->LPMflag()
<< G4endl;
G4double eth = dynamic_cast<G4eBremsstrahlungModel*>(EmModel())->EnergyThreshold();
if(eth < DBL_MIN)
G4cout << " HighEnergyThreshold(GeV)= " << eth/GeV
<< G4endl;
if(EmModel(1)) {
G4LossTableManager* man = G4LossTableManager::Instance();
G4double eth = man->BremsstrahlungTh();
G4cout << " LPM flag: " << man->LPMFlag() << " for E > "
<< EmModel(1)->HighEnergyLimit()/GeV << " GeV";
if(eth < DBL_MAX) G4cout << ", HighEnergyThreshold(GeV)= " << eth/GeV;
G4cout << G4endl;
}
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungModel.cc,v 1.39 2007/05/23 08:47:35 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eBremsstrahlungModel.cc,v 1.43 2008/11/13 19:28:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -53,6 +53,7 @@
// 21-03-06 Fix problem of initialisation in case when cuts are not defined (VI)
// 27-03-06 Fix calculation of fl parameter at low energy (energy loss) (VI)
// 15-02-07 correct LPMconstant by a factor 2, thanks to G. Depaola (mma)
// 09-09-08 MigdalConstant increased in (2pi)^2 times (A.Schaelicke)
//
// Class Description:
//
@@ -84,17 +85,13 @@ G4eBremsstrahlungModel::G4eBremsstrahlungModel(const G4ParticleDefinition* p,
particle(0),
isElectron(true),
probsup(1.0),
MigdalConstant(classic_electr_radius*electron_Compton_length*electron_Compton_length/pi),
MigdalConstant(classic_electr_radius*electron_Compton_length*electron_Compton_length*4.0*pi),
LPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(4.*pi*hbarc)),
theLPMflag(true),
isInitialised(false)
{
if(p) SetParticle(p);
theGamma = G4Gamma::Gamma();
minThreshold = 1.0*keV;
highKinEnergy= 100.*TeV;
lowKinEnergy = 1.0*keV;
highEnergyTh = DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -163,11 +160,11 @@ void G4eBremsstrahlungModel::Initialise(const G4ParticleDefinition* p,
}
if(isInitialised) return;
if(pParticleChange)
if(pParticleChange) {
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
else
} else {
fParticleChange = new G4ParticleChangeForLoss();
}
isInitialised = true;
}
@@ -833,7 +830,7 @@ void G4eBremsstrahlungModel::SampleSecondaries(std::vector<G4DynamicParticle*>*
*/
gammaEnergy = x*kineticEnergy;
if (theLPMflag) {
if (LPMFlag()) {
// take into account the supression due to the LPM effect
if (G4UniformRand() <= SupressionFunction(material,kineticEnergy,
gammaEnergy))
@@ -878,7 +875,7 @@ void G4eBremsstrahlungModel::SampleSecondaries(std::vector<G4DynamicParticle*>*
G4double finalE = kineticEnergy - gammaEnergy;
// stop tracking and create new secondary instead of primary
if(gammaEnergy > highEnergyTh) {
if(gammaEnergy > SecondaryThreshold()) {
fParticleChange->ProposeTrackStatus(fStopAndKill);
fParticleChange->SetProposedKineticEnergy(0.0);
G4DynamicParticle* el =
@@ -950,7 +947,7 @@ G4double G4eBremsstrahlungModel::SupressionFunction(const G4Material* material,
G4double supr = 1.0;
if (theLPMflag) {
if (LPMFlag()) {
G4double s2lpm = LPMEnergy*gammaEnergy/totEnergySquare;
@@ -0,0 +1,562 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungRelModel.cc,v 1.12 2008/11/13 23:28:27 schaelic Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4eBremsstrahlungRelModel
//
// Author: Andreas Schaelicke
//
// Creation date: 12.08.2008
//
// Modifications:
//
// 13.11.08 add SetLPMflag and SetLPMconstant methods
// 13.11.08 change default LPMconstant value
//
// Main References:
// Y.-S.Tsai, Rev. Mod. Phys. 46 (1974) 815; Rev. Mod. Phys. 49 (1977) 421.
// S.Klein, Rev. Mod. Phys. 71 (1999) 1501.
// T.Stanev et.al., Phys. Rev. D25 (1982) 1291.
// M.L.Ter-Mikaelian, High-energy Electromagnetic Processes in Condensed Media, Wiley, 1972.
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4eBremsstrahlungRelModel.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Gamma.hh"
#include "Randomize.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4ProductionCutsTable.hh"
#include "G4ParticleChangeForLoss.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4double G4eBremsstrahlungRelModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083,
0.5917, 0.7628, 0.8983, 0.9801 };
const G4double G4eBremsstrahlungRelModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813,
0.1813, 0.1569, 0.1112, 0.0506 };
const G4double G4eBremsstrahlungRelModel::Fel_light[] = {0., 5.31 , 4.79 , 4.74 , 4.71} ;
const G4double G4eBremsstrahlungRelModel::Finel_light[] = {0., 6.144 , 5.621 , 5.805 , 5.924} ;
using namespace std;
G4eBremsstrahlungRelModel::G4eBremsstrahlungRelModel(const G4ParticleDefinition* p,
const G4String& name)
: G4VEmModel(name),
particle(0),
fXiLPM(0), fPhiLPM(0), fGLPM(0),
isElectron(true),
fMigdalConstant(classic_electr_radius*electron_Compton_length*electron_Compton_length*4.0*pi),
fLPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(4.*pi*hbarc)*0.5),
bremFactor(fine_structure_const*classic_electr_radius*classic_electr_radius*16./3.),
use_completescreening(true),isInitialised(false)
{
if(p) SetParticle(p);
theGamma = G4Gamma::Gamma();
minThreshold = 1.0*keV;
SetLowEnergyLimit(GeV);
nist = G4NistManager::Instance();
InitialiseConstants();
SetLPMFlag(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::InitialiseConstants()
{
facFel = log(184.15);
facFinel = log(1194.);
preS1 = 1./(184.15*184.15);
logTwo = log(2.);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eBremsstrahlungRelModel::~G4eBremsstrahlungRelModel()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::SetParticle(const G4ParticleDefinition* p)
{
particle = p;
particleMass = p->GetPDGMass();
if(p == G4Electron::Electron()) isElectron = true;
else isElectron = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple*)
{
return minThreshold;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::SetupForMaterial(const G4ParticleDefinition*,
const G4Material* mat, G4double kineticEnergy)
{
densityFactor = mat->GetElectronDensity()*fMigdalConstant;
lpmEnergy = mat->GetRadlen()*fLPMconstant;
// Threshold for LPM effect (i.e. below which LPM hidden by density effect)
if (LPMFlag())
energyThresholdLPM=sqrt(densityFactor)*lpmEnergy;
else
energyThresholdLPM=1.e39; // i.e. do not use LPM effect
// calculate threshold for density effect
kinEnergy = kineticEnergy;
totalEnergy = kineticEnergy + particleMass;
densityCorr = densityFactor*totalEnergy*totalEnergy;
// define critical gamma energies (important for integration/dicing)
klpm=totalEnergy*totalEnergy/lpmEnergy;
kp=sqrt(densityCorr);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
{
if(p) SetParticle(p);
highKinEnergy = HighEnergyLimit();
lowKinEnergy = LowEnergyLimit();
currentZ = 0.;
InitialiseElementSelectors(p, cuts);
if(isInitialised) return;
if(pParticleChange) {
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
} else {
fParticleChange = new G4ParticleChangeForLoss();
}
isInitialised = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::ComputeDEDXPerVolume(
const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy)
{
if(!particle) SetParticle(p);
if(kineticEnergy < lowKinEnergy) return 0.0;
G4double cut = std::min(cutEnergy, kineticEnergy);
if(cut == 0.0) return 0.0;
SetupForMaterial(particle, material,kineticEnergy);
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomicNumDensityVector = material->GetAtomicNumDensityVector();
G4double dedx = 0.0;
// loop for elements in the material
for (size_t i=0; i<material->GetNumberOfElements(); i++) {
G4VEmModel::SetCurrentElement((*theElementVector)[i]);
SetCurrentElement((*theElementVector)[i]->GetZ());
dedx += theAtomicNumDensityVector[i]*currentZ*currentZ*ComputeBremLoss(cut);
}
dedx *= bremFactor;
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::ComputeBremLoss(G4double cut)
{
G4double loss = 0.0;
// number of intervals and integration step
G4double vcut = cut/totalEnergy;
G4int n = (G4int)(20*vcut) + 3;
G4double delta = vcut/G4double(n);
G4double e0 = 0.0;
G4double xs;
// integration
for(G4int l=0; l<n; l++) {
for(G4int i=0; i<8; i++) {
G4double eg = (e0 + xgi[i]*delta)*totalEnergy;
if(totalEnergy > energyThresholdLPM) {
xs = ComputeRelDXSectionPerAtom(eg);
} else {
xs = ComputeDXSectionPerAtom(eg);
}
loss += wgi[i]*xs/(1.0 + densityCorr/(eg*eg));
}
e0 += delta;
}
loss *= delta*totalEnergy;
return loss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy)
{
if(!particle) SetParticle(p);
if(kineticEnergy < lowKinEnergy) return 0.0;
G4double cut = std::min(cutEnergy, kineticEnergy);
G4double tmax = std::min(maxEnergy, kineticEnergy);
if(cut >= tmax) return 0.0;
SetCurrentElement(Z);
G4double cross = ComputeXSectionPerAtom(cut);
// allow partial integration
if(tmax < kinEnergy) cross -= ComputeXSectionPerAtom(tmax);
cross *= Z*Z*bremFactor;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::ComputeXSectionPerAtom(G4double cut)
{
G4double cross = 0.0;
// number of intervals and integration step
G4double vcut = log(cut/totalEnergy);
G4double vmax = log(kinEnergy/totalEnergy);
G4int n = (G4int)(0.45*(vmax - vcut)) + 4;
// n=1; // integration test
G4double delta = (vmax - vcut)/G4double(n);
G4double e0 = vcut;
G4double xs;
// integration
for(G4int l=0; l<n; l++) {
for(G4int i=0; i<8; i++) {
G4double eg = exp(e0 + xgi[i]*delta)*totalEnergy;
if(totalEnergy > energyThresholdLPM) {
xs = ComputeRelDXSectionPerAtom(eg);
} else {
xs = ComputeDXSectionPerAtom(eg);
}
cross += wgi[i]*xs/(1.0 + densityCorr/(eg*eg));
}
e0 += delta;
}
cross *= delta;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::CalcLPMFunctions(G4double k)
{
// *** calculate lpm variable s & sprime ***
// Klein eqs. (78) & (79)
G4double sprime = sqrt(0.125*k*lpmEnergy/(totalEnergy*(totalEnergy-k)));
G4double s1 = preS1*z23;
G4double logS1 = 2./3.*lnZ-2.*facFel;
G4double logTS1 = logTwo+logS1;
xiLPM = 2.;
if (sprime>1)
xiLPM = 1.;
else if (sprime>sqrt(2.)*s1) {
G4double h = log(sprime)/logTS1;
xiLPM = 1+h-0.08*(1-h)*(1-sqr(1-h))/logTS1;
}
G4double s = sprime/sqrt(xiLPM);
// *** merging with density effect*** should be only necessary in region "close to" kp, e.g. k<100*kp
// using Ter-Mikaelian eq. (20.9)
G4double k2 = k*k;
s = s * (1 + (densityCorr/k2) );
// recalculate Xi using modified s above
// Klein eq. (75)
xiLPM = 1.;
if (s<=s1) xiLPM = 2.;
else if ( (s1<s) && (s<=1) ) xiLPM = 1. + log(s)/logS1;
// *** calculate supression functions phi and G ***
// Klein eqs. (77)
G4double s2=s*s;
G4double s3=s*s2;
G4double s4=s2*s2;
if (s<0.1) {
// high suppression limit
phiLPM = 6.*s - 18.84955592153876*s2 + 39.47841760435743*s3
- 57.69873135166053*s4;
gLPM = 37.69911184307752*s2 - 236.8705056261446*s3 + 807.7822389*s4;
}
else if (s<1.9516) {
// intermediate suppression
// using eq.77 approxim. valid s<2.
phiLPM = 1.-exp(-6.*s*(1.+(3.-pi)*s)
+s3/(0.623+0.795*s+0.658*s2));
if (s<0.415827397755) {
// using eq.77 approxim. valid 0.07<s<2
G4double psiLPM = 1-exp(-4*s-8*s2/(1+3.936*s+4.97*s2-0.05*s3+7.50*s4));
gLPM = 3*psiLPM-2*phiLPM;
}
else {
// using alternative parametrisiation
G4double pre = -0.16072300849123999 + s*3.7550300067531581 + s2*-1.7981383069010097
+ s3*0.67282686077812381 + s4*-0.1207722909879257;
gLPM = tanh(pre);
}
}
else {
// low suppression limit valid s>2.
phiLPM = 1. - 0.0119048/s4;
gLPM = 1. - 0.0230655/s4;
}
// *** make sure suppression is smaller than 1 ***
// *** caused by Migdal approximation in xi ***
if (xiLPM*phiLPM>1. || s>0.57) xiLPM=1./phiLPM;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(G4double gammaEnergy)
// Ultra relativistic model
// only valid for very high energies, but includes LPM suppression
// * complete screening
{
if(gammaEnergy < 0.0) return 0.0;
G4double y = gammaEnergy/totalEnergy;
G4double y2 = y*y*.25;
G4double yone2 = (1.-y+2.*y2);
// ** form factors complete screening case **
// ** calc LPM functions -- include ter-mikaelian merging with density effect **
// G4double xiLPM, gLPM, phiLPM; // to be made member variables !!!
CalcLPMFunctions(gammaEnergy);
G4double mainLPM = xiLPM*(y2 * gLPM + yone2*phiLPM) * ( (Fel-fCoulomb) + Finel/currentZ );
G4double secondTerm = (1.-y)/12.*(1.+1./currentZ);
G4double cross = mainLPM+secondTerm;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungRelModel::ComputeDXSectionPerAtom(G4double gammaEnergy)
// Relativistic model
// only valid for high energies (and if LPM suppression does not play a role)
// * screening according to thomas-fermi-Model (only valid for Z>5)
// * no LPM effect
{
if(gammaEnergy < 0.0) return 0.0;
G4double y = gammaEnergy/totalEnergy;
G4double main=0.,secondTerm=0.;
if (use_completescreening|| currentZ<5) {
// ** form factors complete screening case **
main = (3./4.*y*y - y + 1.) * ( (Fel-fCoulomb) + Finel/currentZ );
secondTerm = (1.-y)/12.*(1.+1./currentZ);
}
else {
// ** intermediate screening using Thomas-Fermi FF from Tsai only valid for Z>=5**
G4double dd=100.*electron_mass_c2*y/(totalEnergy-gammaEnergy);
G4double gg=dd*z13;
G4double eps=dd*z23;
G4double phi1=Phi1(gg,currentZ), phi1m2=Phi1M2(gg,currentZ);
G4double psi1=Psi1(eps,currentZ), psi1m2=Psi1M2(eps,currentZ);
main = (3./4.*y*y - y + 1.) * ( (0.25*phi1-1./3.*lnZ-fCoulomb) + (0.25*psi1-2./3.*lnZ)/currentZ );
secondTerm = (1.-y)/8.*(phi1m2+psi1m2/currentZ);
}
G4double cross = main+secondTerm;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungRelModel::SampleSecondaries(
std::vector<G4DynamicParticle*>* vdp,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double cutEnergy,
G4double maxEnergy)
{
G4double kineticEnergy = dp->GetKineticEnergy();
if(kineticEnergy < lowKinEnergy) return;
G4double cut = std::min(cutEnergy, kineticEnergy);
G4double emax = std::min(maxEnergy, kineticEnergy);
if(cut >= emax) return;
SetupForMaterial(particle, couple->GetMaterial(),kineticEnergy);
const G4Element* elm =
SelectRandomAtom(couple,particle,kineticEnergy,cut,emax);
SetCurrentElement(elm->GetZ());
kinEnergy = kineticEnergy;
totalEnergy = kineticEnergy + particleMass;
densityCorr = densityFactor*totalEnergy*totalEnergy;
G4ThreeVector direction = dp->GetMomentumDirection();
// G4double fmax= fMax;
G4bool highe = true;
if(totalEnergy < energyThresholdLPM) highe = false;
G4double xmin = log(cut*cut + densityCorr);
G4double xmax = log(emax*emax + densityCorr);
G4double gammaEnergy, f, x;
do {
x = exp(xmin + G4UniformRand()*(xmax - xmin)) - densityCorr;
if(x < 0.0) x = 0.0;
gammaEnergy = sqrt(x);
if(highe) f = ComputeRelDXSectionPerAtom(gammaEnergy);
else f = ComputeDXSectionPerAtom(gammaEnergy);
if ( f > fMax ) {
G4cout << "### G4eBremsstrahlungRelModel Warning: Majoranta exceeded! "
<< f << " > " << fMax
<< " Egamma(MeV)= " << gammaEnergy
<< " E(mEV)= " << kineticEnergy
<< G4endl;
}
} while (f < fMax*G4UniformRand());
//
// angles of the emitted gamma. ( Z - axis along the parent particle)
//
// universal distribution suggested by L. Urban
// (Geant3 manual (1993) Phys211),
// derived from Tsai distribution (Rev Mod Phys 49,421(1977))
G4double u;
const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ;
if (9./(9.+d) > G4UniformRand()) u = - log(G4UniformRand()*G4UniformRand())/a1;
else u = - log(G4UniformRand()*G4UniformRand())/a2;
G4double theta = u*particleMass/totalEnergy;
G4double sint = sin(theta);
G4double phi = twopi * G4UniformRand();
G4ThreeVector gammaDirection(sint*cos(phi),sint*sin(phi), cos(theta));
gammaDirection.rotateUz(direction);
// create G4DynamicParticle object for the Gamma
G4DynamicParticle* g = new G4DynamicParticle(theGamma,gammaDirection,
gammaEnergy);
vdp->push_back(g);
G4double totMomentum = sqrt(kineticEnergy*(totalEnergy + electron_mass_c2));
G4ThreeVector dir = totMomentum*direction - gammaEnergy*gammaDirection;
direction = dir.unit();
// energy of primary
G4double finalE = kineticEnergy - gammaEnergy;
// stop tracking and create new secondary instead of primary
if(gammaEnergy > SecondaryThreshold()) {
fParticleChange->ProposeTrackStatus(fStopAndKill);
fParticleChange->SetProposedKineticEnergy(0.0);
G4DynamicParticle* el =
new G4DynamicParticle(const_cast<G4ParticleDefinition*>(particle),
direction, finalE);
vdp->push_back(el);
// continue tracking
} else {
fParticleChange->SetProposedMomentumDirection(direction);
fParticleChange->SetProposedKineticEnergy(finalE);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eCoulombScatteringModel.cc,v 1.39 2007/11/28 12:36:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eCoulombScatteringModel.cc,v 1.59 2008/10/22 18:39:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -43,6 +43,7 @@
// 08.08.06 V.Ivanchenko build internal table in ekin scale, introduce faclim
// 19.08.06 V.Ivanchenko add inline function ScreeningParameter
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion
//
// Class Description:
//
@@ -60,61 +61,63 @@
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Proton.hh"
#include "G4ParticleTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4eCoulombScatteringModel::G4eCoulombScatteringModel(
G4double thetaMin, G4double thetaMax, G4bool build,
G4double tlim, const G4String& nam)
G4eCoulombScatteringModel::G4eCoulombScatteringModel(const G4String& nam)
: G4VEmModel(nam),
cosThetaMin(cos(thetaMin)),
cosThetaMax(cos(thetaMax)),
q2Limit(tlim),
theCrossSectionTable(0),
lowKEnergy(keV),
highKEnergy(TeV),
cosThetaMin(1.0),
cosThetaMax(-1.0),
q2Limit(TeV*TeV),
alpha2(fine_structure_const*fine_structure_const),
faclim(100.0),
nbins(12),
nmax(100),
buildTable(build),
isInitialised(false)
{
fNistManager = G4NistManager::Instance();
theParticleTable = G4ParticleTable::GetParticleTable();
theElectron = G4Electron::Electron();
thePositron = G4Positron::Positron();
theProton = G4Proton::Proton();
currentMaterial = 0;
currentElement = 0;
a0 = alpha2*electron_mass_c2*electron_mass_c2/(0.885*0.885);
G4double p0 = electron_mass_c2*classic_electr_radius;
coeff = twopi*p0*p0;
constn = 6.937e-6/(MeV*MeV);
tkin = targetZ = targetA = mom2 = DBL_MIN;
tkin = targetZ = mom2 = DBL_MIN;
elecXSection = nucXSection = 0.0;
recoilThreshold = DBL_MAX;
ecut = DBL_MAX;
particle = 0;
for(size_t j=0; j<100; j++) {index[j] = -1;}
currentCouple = 0;
for(size_t j=0; j<100; j++) {
FF[j] = 0.0;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eCoulombScatteringModel::~G4eCoulombScatteringModel()
{
if(theCrossSectionTable) {
theCrossSectionTable->clearAndDestroy();
delete theCrossSectionTable;
}
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
const G4DataVector& cuts)
{
// G4cout << "!!! G4eCoulombScatteringModel::Initialise for "
// << p->GetParticleName() << " cos(TetMin)= " << cosThetaMin
// << " cos(TetMax)= " << cosThetaMax <<G4endl;
SetupParticle(p);
currentCouple = 0;
elecXSection = nucXSection = 0.0;
tkin = targetZ = mom2 = DBL_MIN;
ecut = etag = DBL_MAX;
cosThetaMin = cos(PolarAngleLimit());
currentCuts = &cuts;
//G4cout << "!!! G4eCoulombScatteringModel::Initialise for "
// << p->GetParticleName() << " cos(TetMin)= " << cosThetaMin
// << " cos(TetMax)= " << cosThetaMax <<G4endl;
if(!isInitialised) {
isInitialised = true;
@@ -123,17 +126,39 @@ void G4eCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
else
fParticleChange = new G4ParticleChangeForGamma();
} else {
return;
}
if(mass < GeV && particle->GetParticleType() != "nucleus") {
InitialiseElementSelectors(p,cuts);
}
}
if(p->GetParticleType() == "nucleus") buildTable = false;
if(!buildTable) return;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Compute log cross section table per atom
if(!theCrossSectionTable) theCrossSectionTable = new G4PhysicsTable();
nbins = 2*G4int(log10(highKEnergy/lowKEnergy));
void G4eCoulombScatteringModel::ComputeMaxElectronScattering(G4double cutEnergy)
{
ecut = cutEnergy;
G4double tmax = tkin;
cosTetMaxElec = 1.0;
if(mass > MeV) {
G4double ratio = electron_mass_c2/mass;
G4double tau = tkin/mass;
tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/
(1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2;
} else {
if(particle == theElectron) tmax *= 0.5;
G4double t = std::min(cutEnergy, tmax);
G4double mom21 = t*(t + 2.0*electron_mass_c2);
G4double t1 = tkin - t;
//G4cout << "tkin= " << tkin << " t= " << t << " t1= " << t1 << G4endl;
if(t1 > 0.0) {
G4double mom22 = t1*(t1 + 2.0*mass);
G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
//G4cout << "ctm= " << ctm << G4endl;
if(ctm < 1.0) cosTetMaxElec = ctm;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -141,194 +166,109 @@ void G4eCoulombScatteringModel::Initialise(const G4ParticleDefinition* p,
G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
G4double Z, G4double A,
G4double Z, G4double,
G4double cutEnergy, G4double)
{
if(p == particle && kinEnergy == tkin && Z == targetZ &&
A == targetA && cutEnergy == ecut) return nucXSection;
//G4cout << "### G4eCoulombScatteringModel::ComputeCrossSectionPerAtom for "
// << p->GetParticleName() << " Z= " << Z << " A= " << A
// << " e= " << kinEnergy << G4endl;
nucXSection = ComputeElectronXSectionPerAtom(p,kinEnergy,Z,A,cutEnergy);
// nuclear cross section
if(theCrossSectionTable) {
G4bool b;
G4int iz = G4int(Z);
G4int idx = index[iz];
// compute table for given Z
if(-1 == idx) {
idx = theCrossSectionTable->size();
index[iz] = idx;
G4PhysicsLogVector* ptrVector
= new G4PhysicsLogVector(lowKEnergy, highKEnergy, nbins);
// G4cout << "New vector Z= " << iz << " A= " << A << " idx= " << idx << G4endl;
G4double e, value;
for(G4int i=0; i<=nbins; i++) {
e = ptrVector->GetLowEdgeEnergy( i ) ;
value = CalculateCrossSectionPerAtom(p, e, Z, A);
ptrVector->PutValue( i, log(value) );
}
theCrossSectionTable->push_back(ptrVector);
}
// take value from the table
nucXSection +=
std::exp((((*theCrossSectionTable)[idx]))->GetValue(kinEnergy, b));
// compute value from scratch
} else nucXSection += CalculateCrossSectionPerAtom(p, kinEnergy, Z, A);
// G4cout << " cross(bn)= " << nucXSection/barn << G4endl;
if(nucXSection < 0.0) nucXSection = 0.0;
return nucXSection;
// << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV << G4endl;
G4double xsec = 0.0;
SetupParticle(p);
G4double ekin = std::max(lowEnergyLimit, kinEnergy);
SetupKinematic(ekin, cutEnergy);
if(cosTetMaxNuc < cosTetMinNuc) {
SetupTarget(Z, ekin);
xsec = CrossSectionPerAtom();
}
/*
G4cout << "e(MeV)= " << ekin/MeV << "cosTetMinNuc= " << cosTetMinNuc
<< " cosTetMaxNuc= " << cosTetMaxNuc
<< " cosTetMaxElec= " << cosTetMaxElec
<< " screenZ= " << screenZ
<< " formfactA= " << formfactA
<< " cosTetMaxHad= " << cosTetMaxHad << G4endl;
*/
return xsec;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4eCoulombScatteringModel::ComputeElectronXSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
G4double Z,
G4double A,
G4double cutEnergy)
G4double G4eCoulombScatteringModel::CrossSectionPerAtom()
{
if(p == particle && kinEnergy == tkin && Z == targetZ &&
cutEnergy == ecut) return elecXSection;
ecut = cutEnergy;
// This method needs initialisation before be called
G4double fac = coeff*targetZ*chargeSquare*invbeta2/mom2;
elecXSection = 0.0;
SetupParticle(p);
G4double ekin = std::max(keV, kinEnergy);
//G4double ekin = kinEnergy;
SetupTarget(Z, A, ekin);
nucXSection = 0.0;
G4double tmax = tkin;
if(p == theElectron) tmax *= 0.5;
else if(p != thePositron) {
G4double ratio = electron_mass_c2/mass;
G4double tau = tkin/mass;
tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/
(1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio);
G4double x = 1.0 - cosTetMinNuc;
G4double x1 = x + screenZ;
if(cosTetMaxElec2 < cosTetMinNuc) {
elecXSection = fac*(cosTetMinNuc - cosTetMaxElec2)/
(x1*(1.0 - cosTetMaxElec2 + screenZ));
nucXSection = elecXSection;
}
G4double t = std::min(cutEnergy, tmax);
G4double mom21 = t*(t + 2.0*electron_mass_c2);
t = tkin - t;
G4double mom22 = t*(t + 2.0*mass);
cosTetMaxElec = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
if(cosTetMaxElec < cosTetMaxNuc) cosTetMaxElec = cosTetMaxNuc;
if(cosTetMaxElec < cosThetaMin) {
G4double x1 = 1.0 - cosThetaMin + screenZ;
G4double x2 = 1.0 - cosTetMaxElec + screenZ;
elecXSection = coeff*Z*chargeSquare*invbeta2*
(cosThetaMin - cosTetMaxElec)/(x1*x2*mom2);
//G4cout << "XS tkin(MeV)= " << tkin<<" xs= " <<nucXSection
// << " costmax= " << cosTetMaxNuc2
// << " costmin= " << cosTetMinNuc << " Z= " << targetZ <<G4endl;
if(cosTetMaxNuc2 < cosTetMinNuc) {
G4double s = screenZ*formfactA;
G4double z1 = 1.0 - cosTetMaxNuc2 + screenZ;
G4double d = (1.0 - s)/formfactA;
//G4cout <<"x1= "<<x1<<" z1= " <<z1<<" s= "<<s << " d= " <<d <<G4endl;
if(d < 0.2*x1) {
G4double x2 = x1*x1;
G4double z2 = z1*z1;
x = (1.0/(x1*x2) - 1.0/(z1*z2) - d*1.5*(1.0/(x2*x2) - 1.0/(z2*z2)))/
(3.0*formfactA*formfactA);
} else {
G4double x2 = x1 + d;
G4double z2 = z1 + d;
x = (1.0 + 2.0*s)*((cosTetMinNuc - cosTetMaxNuc2)*(1.0/(x1*z1) + 1.0/(x2*z2)) -
2.0*log(z1*x2/(z2*x1))/d);
}
nucXSection += fac*targetZ*x;
}
// G4cout << "cut= " << ecut << " e= " << tkin
// << " croosE(barn)= " << elecXSection/barn
// << " cosEl= " << cosTetMaxElec << " costmin= " << cosThetaMin << G4endl;
return elecXSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eCoulombScatteringModel::CalculateCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kinEnergy,
G4double Z, G4double A)
{
G4double cross = 0.0;
SetupParticle(p);
G4double ekin = std::max(keV, kinEnergy);
//G4double ekin = kinEnergy;
SetupTarget(Z, A, ekin);
if(cosTetMaxNuc < cosThetaMin) {
G4double x1 = 1.0 - cosThetaMin;
G4double x2 = 1.0 - cosTetMaxNuc;
G4double x3 = cosThetaMin - cosTetMaxNuc;
G4double z1 = x1 + screenZ;
G4double z2 = x2 + screenZ;
G4double d = 1.0/formfactA - screenZ;
G4double d1 = 1.0 - formfactA*screenZ;
G4double zn1= x1 + d;
G4double zn2= x2 + d;
cross = coeff*Z*Z*chargeSquare*invbeta2
*(x3/(z1*z2) + x3/(zn1*zn2) +
2.0*std::log(z1*zn2/(z2*zn1))/d) / (mom2*d1*d1);
}
//G4cout<<" cross(bn)= "<<nucXSection/barn<<" xsElec(bn)= "<<elecXSection/barn
// << " Asc= " << screenZ << G4endl;
// G4cout << "CalculateCrossSectionPerAtom: e(MeV)= " << tkin
// << " cross(b)= " << cross/barn << " ctmin= " << cosThetaMin
// << " ctmax= " << cosTetMaxNuc << G4endl;
return cross;
return nucXSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eCoulombScatteringModel::SampleSecondaries(
std::vector<G4DynamicParticle*>*,
std::vector<G4DynamicParticle*>* fvect,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double cutEnergy,
G4double maxEnergy)
G4double)
{
const G4Material* aMaterial = couple->GetMaterial();
const G4ParticleDefinition* p = dp->GetDefinition();
G4double kinEnergy = dp->GetKineticEnergy();
if(kinEnergy <= DBL_MIN) return;
DefineMaterial(couple);
SetupParticle(dp->GetDefinition());
G4double ekin = std::max(lowEnergyLimit, kinEnergy);
SetupKinematic(ekin, cutEnergy);
//G4cout << "G4eCoulombScatteringModel::SampleSecondaries e(MeV)= "
// << kinEnergy << " " << particle->GetParticleName() << G4endl;
// Choose nucleus
currentElement = SelectRandomAtom(couple,particle,ekin,cutEnergy,ekin);
// Select atom and setup
SetupParticle(p);
const G4Element* elm =
SelectRandomAtom(aMaterial,p,kinEnergy,cutEnergy,maxEnergy);
G4double Z = elm->GetZ();
G4double A = elm->GetN();
G4double cross =
ComputeCrossSectionPerAtom(p,kinEnergy,Z,A,cutEnergy,maxEnergy);
G4double costm = cosTetMaxNuc;
G4double formf = formfactA;
if(G4UniformRand()*cross < elecXSection) {
costm = cosTetMaxElec;
formf = 0.0;
}
/*
G4cout << "G4eCoul...SampleSecondaries: e(MeV)= " << tkin
<< " ctmin= " << cosThetaMin
<< " ctmaxN= " << cosTetMaxNuc
<< " ctmax= " << costm
<< " Z= " << Z << " A= " << A
<< " cross= " << cross/barn << " crossE= " << elecXSection/barn
<< G4endl;
*/
if(costm >= cosThetaMin) return;
G4double x1 = 1. - cosThetaMin + screenZ;
G4double x2 = 1. - costm;
G4double x3 = cosThetaMin - costm;
G4double grej, z, z1;
do {
z = G4UniformRand()*x3;
z1 = (x1*x2 - screenZ*z)/(x1 + z);
if(z1 < 0.0) z1 = 0.0;
else if(z1 > 2.0) z1 = 2.0;
grej = 1.0/(1.0 + formf*z1);
} while ( G4UniformRand() > grej*grej );
SetupTarget(currentElement->GetZ(),ekin);
G4double cost = SampleCosineTheta();
G4double z1 = 1.0 - cost;
if(z1 < 0.0) return;
G4double sint = sqrt(z1*(1.0 + cost));
//G4cout<<"## Sampled sint= " << sint << " Z= " << targetZ
// << " screenZ= " << screenZ << " cn= " << formfactA << G4endl;
G4double cost = 1.0 - z1;
G4double sint= sqrt(z1*(2.0 - z1));
/*
if(sint > 0.1)
G4cout<<"## SampleSecondaries: e(MeV)= " << kinEnergy
<< " sint= " << sint << " Z= " << Z << " screenZ= " << screenZ
<< " cn= " << formf
<< G4endl;
*/
G4double phi = twopi * G4UniformRand();
G4ThreeVector direction = dp->GetMomentumDirection();
@@ -336,10 +276,73 @@ void G4eCoulombScatteringModel::SampleSecondaries(
newDirection.rotateUz(direction);
fParticleChange->ProposeMomentumDirection(newDirection);
// recoil sampling assuming a small recoil
// and first order correction to primary 4-momentum
if(lowEnergyLimit < kinEnergy) {
G4int ia = SelectIsotopeNumber(currentElement);
G4double Trec = z1*mom2/(amu_c2*G4double(ia));
G4double th =
std::min(recoilThreshold,
targetZ*currentElement->GetIonisation()->GetMeanExcitationEnergy());
if(Trec > th) {
G4int iz = G4int(targetZ);
G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
Trec = z1*mom2/ion->GetPDGMass();
if(Trec < kinEnergy) {
G4ThreeVector dir = (direction - newDirection).unit();
G4DynamicParticle* newdp = new G4DynamicParticle(ion, dir, Trec);
fvect->push_back(newdp);
fParticleChange->SetProposedKineticEnergy(kinEnergy - Trec);
}
}
}
return;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4eCoulombScatteringModel::SampleCosineTheta()
{
G4double costm = cosTetMaxNuc2;
G4double formf = formfactA;
G4double prob = 0.0;
G4double xs = CrossSectionPerAtom();
if(xs > 0.0) prob = elecXSection/xs;
// scattering off e or A?
if(G4UniformRand() < prob) {
costm = cosTetMaxElec2;
formf = 0.0;
}
/*
G4cout << "SampleCost: e(MeV)= " << tkin
<< " ctmin= " << cosThetaMin
<< " ctmaxN= " << cosTetMaxNuc
<< " ctmax= " << costm
<< " Z= " << targetZ << " A= " << targetA
<< G4endl;
*/
if(costm >= cosTetMinNuc) return 2.0;
G4double x1 = 1. - cosTetMinNuc + screenZ;
G4double x2 = 1. - costm + screenZ;
G4double x3 = cosTetMinNuc - costm;
G4double grej, z1;
do {
z1 = x1*x2/(x1 + G4UniformRand()*x3) - screenZ;
grej = 1.0/(1.0 + formf*z1);
} while ( G4UniformRand() > grej*grej );
//G4cout << "z= " << z1 << " cross= " << nucXSection/barn
// << " crossE= " << elecXSection/barn << G4endl;
return 1.0 - z1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eIonisation.cc,v 1.53 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eIonisation.cc,v 1.56 2008/10/20 08:56:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -89,9 +89,10 @@ G4eIonisation::G4eIonisation(const G4String& name)
isElectron(true),
isInitialised(false)
{
SetStepFunction(0.2, 1*mm);
SetIntegral(true);
SetVerboseLevel(1);
// SetStepFunction(0.2, 1*mm);
// SetIntegral(true);
// SetVerboseLevel(1);
SetProcessSubType(fIonisation);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -109,8 +110,8 @@ void G4eIonisation::InitialiseEnergyLossProcess(
if(part == G4Positron::Positron()) isElectron = false;
SetSecondaryParticle(theElectron);
if (!EmModel()) SetEmModel(new G4MollerBhabhaModel());
EmModel()->SetLowEnergyLimit (100*eV);
EmModel()->SetHighEnergyLimit(100*TeV);
EmModel()->SetLowEnergyLimit (MinKinEnergy());
EmModel()->SetHighEnergyLimit(MaxKinEnergy());
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
AddEmModel(1, EmModel(), FluctModel());
@@ -121,12 +122,6 @@ void G4eIonisation::InitialiseEnergyLossProcess(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eIonisation::PrintInfo()
{
if(EmModel())
G4cout << " Delta cross sections and sampling from "
<< EmModel()->GetName() << " model"
<< "\n Good description from 1 KeV to 100 GeV."
<< G4endl;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,132 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eMultipleScattering.cc,v 1.7 2008/10/23 17:55:20 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
// GEANT4 Class file
//
// File name: G4eMultipleScattering
//
// Author: Vladimir Ivanchenko
//
// Creation date: 10 March 2008
//
// Modifications:
//
// -----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4eMultipleScattering.hh"
#include "G4UrbanMscModel2.hh"
#include "G4MscStepLimitType.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
G4eMultipleScattering::G4eMultipleScattering(const G4String& processName)
: G4VMultipleScattering(processName)
{
isInitialized = false;
SetRangeFactor(0.04);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4eMultipleScattering::~G4eMultipleScattering()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool G4eMultipleScattering::IsApplicable (const G4ParticleDefinition& p)
{
return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());
// return (&p == G4Electron::Electron() || &p == G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4eMultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
{
// Modification of parameters between runs
if(isInitialized) {
if (p->GetParticleType() != "nucleus") {
mscUrban->SetStepLimitType(StepLimitType());
mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
mscUrban->SetSkin(Skin());
mscUrban->SetRangeFactor(RangeFactor());
mscUrban->SetGeomFactor(GeomFactor());
}
return;
}
// defaults for ions, which cannot be overwritten
if (p->GetParticleType() == "nucleus") {
SetStepLimitType(fMinimal);
SetLateralDisplasmentFlag(false);
SetBuildLambdaTable(false);
}
// initialisation of parameters - defaults for particles other
// than ions can be overwritten by users
mscUrban = new G4UrbanMscModel2();
mscUrban->SetStepLimitType(StepLimitType());
mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
mscUrban->SetSkin(Skin());
mscUrban->SetRangeFactor(RangeFactor());
mscUrban->SetGeomFactor(GeomFactor());
AddEmModel(1,mscUrban);
isInitialized = true;
/*
G4cout << "G4eMultipleScattering::InitialiseProcess for "
<< p->GetParticleName()
<< " skin= " << Skin()
<< " SA= " << steppingAlgorithm
<< G4endl;
*/
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4eMultipleScattering::PrintInfo()
{
G4cout << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", skin= " << Skin()
<< ", geomFactor= " << GeomFactor()
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eeToTwoGammaModel.cc,v 1.14 2007/05/23 08:47:35 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eplusAnnihilation.cc,v 1.27 2007/10/02 10:17:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eplusAnnihilation.cc,v 1.29 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -67,6 +67,7 @@ using namespace std;
G4eplusAnnihilation::G4eplusAnnihilation(const G4String& name)
: G4VEmProcess(name), isInitialised(false)
{
SetProcessSubType(fAnnihilation);
enableAtRestDoIt = true;
}
@@ -84,14 +85,9 @@ void G4eplusAnnihilation::InitialiseProcess(const G4ParticleDefinition*)
SetBuildTableFlag(true);
SetStartFromNullFlag(false);
SetSecondaryParticle(G4Gamma::Gamma());
G4double emin = 0.1*keV;
G4double emax = 100.*TeV;
SetLambdaBinning(120);
SetMinKinEnergy(emin);
SetMaxKinEnergy(emax);
if(!Model()) SetModel(new G4eeToTwoGammaModel);
Model()->SetLowEnergyLimit(emin);
Model()->SetHighEnergyLimit(emax);
if(!Model()) SetModel(new G4eeToTwoGammaModel());
Model()->SetLowEnergyLimit(MinKinEnergy());
Model()->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(1, Model());
}
}
@@ -99,11 +95,7 @@ void G4eplusAnnihilation::InitialiseProcess(const G4ParticleDefinition*)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eplusAnnihilation::PrintInfo()
{
G4cout
<< " Sampling according " << Model()->GetName() << " model"
<< G4endl;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hIonisation.cc,v 1.69 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hIonisation.cc,v 1.81 2008/10/22 16:02:20 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -77,6 +77,7 @@
// 26-05-06 scale negative particles from pi- and pbar,
// positive from pi+ and p (VI)
// 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
// 12-09-08 Removed CorrectionsAlongStep (VI)
//
// -------------------------------------------------------------------
//
@@ -89,12 +90,14 @@
#include "G4AntiProton.hh"
#include "G4BraggModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4IonFluctuations.hh"
#include "G4UniversalFluctuation.hh"
#include "G4BohrFluctuations.hh"
#include "G4UnitsTable.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4LossTableManager.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -102,16 +105,15 @@ using namespace std;
G4hIonisation::G4hIonisation(const G4String& name)
: G4VEnergyLossProcess(name),
theParticle(0),
theBaseParticle(0),
isInitialised(false)
isInitialised(false),
nuclearStopping(true)
{
SetStepFunction(0.2, 1*mm);
SetIntegral(true);
SetVerboseLevel(1);
// SetStepFunction(0.2, 1.0*mm);
//SetIntegral(true);
//SetVerboseLevel(1);
SetProcessSubType(fIonisation);
mass = 0.0;
ratio = 0.0;
corr = G4LossTableManager::Instance()->EmCorrections();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -125,61 +127,74 @@ void G4hIonisation::InitialiseEnergyLossProcess(
const G4ParticleDefinition* part,
const G4ParticleDefinition* bpart)
{
if(isInitialised) return;
if(!isInitialised) {
theParticle = part;
const G4ParticleDefinition* theBaseParticle = 0;
G4String pname = part->GetParticleName();
G4String pname = part->GetParticleName();
// standard base particles
if(part == bpart || pname == "proton" ||
pname == "anti_proton" ||
pname == "pi+" || pname == "pi-" ||
pname == "kaon+" || pname == "kaon-")
{
theBaseParticle = 0;
}
// select base particle
else if(bpart == 0) {
// standard base particles
if(part == bpart || pname == "proton" ||
pname == "anti_proton" || pname == "pi+" || pname == "pi-" )
theBaseParticle = 0;
if(part->GetPDGSpin() == 0.0)
if(part->GetPDGCharge() > 0.0 ) {
theBaseParticle = G4KaonPlus::KaonPlus();
} else {
theBaseParticle = G4KaonMinus::KaonMinus();
}
else if(part->GetPDGCharge() > 0.0) {
theBaseParticle = G4Proton::Proton();
} else {
theBaseParticle = G4AntiProton::AntiProton();
}
// base particle defined by interface
} else {
theBaseParticle = bpart;
}
SetBaseParticle(theBaseParticle);
SetSecondaryParticle(G4Electron::Electron());
// select base particle
else if(bpart == 0) {
mass = part->GetPDGMass();
ratio = electron_mass_c2/mass;
if(pname == "kaon+") theBaseParticle = G4PionPlus::PionPlus();
else if(pname == "kaon-") theBaseParticle = G4PionMinus::PionMinus();
else if(part->GetPDGCharge() > 0.0) theBaseParticle = G4Proton::Proton();
else theBaseParticle = G4AntiProton::AntiProton();
if(mass < 900.*MeV) nuclearStopping = false;
} else theBaseParticle = bpart;
if (!EmModel(1)) SetEmModel(new G4BraggModel(),1);
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
SetBaseParticle(theBaseParticle);
SetSecondaryParticle(G4Electron::Electron());
mass = theParticle->GetPDGMass();
ratio = electron_mass_c2/mass;
massratio = 1.0;
if(theBaseParticle) massratio = theBaseParticle->GetPDGMass()/mass;
// model limit defined for protons
eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
EmModel(1)->SetHighEnergyLimit(eth);
AddEmModel(1, EmModel(1), new G4IonFluctuations());
if (!EmModel(1)) SetEmModel(new G4BraggModel(),1);
EmModel(1)->SetLowEnergyLimit(100*eV);
eth = 2.0*MeV*mass/proton_mass_c2;
EmModel(1)->SetHighEnergyLimit(eth);
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
AddEmModel(1, EmModel(1), FluctModel());
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(100*TeV);
AddEmModel(2, EmModel(2), FluctModel());
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(2, EmModel(2), FluctModel());
isInitialised = true;
isInitialised = true;
}
EmModel(1)->ActivateNuclearStopping(nuclearStopping);
EmModel(2)->ActivateNuclearStopping(nuclearStopping);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hIonisation::PrintInfo()
{
if(EmModel(1) && EmModel(2))
G4cout << " Scaling relation is used from proton dE/dx and range."
<< "\n Delta cross sections and sampling from "
<< EmModel(2)->GetName() << " model for scaled energy > "
<< eth/MeV << " MeV"
<< "\n Parametrisation from "
<< EmModel(1)->GetName() << " for protons below."
if(EmModel(1) && EmModel(2)) {
G4cout << " NuclearStopping= " << nuclearStopping
<< G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hMultipleScattering.cc,v 1.7 2007/12/07 17:35:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hMultipleScattering.cc,v 1.13 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
@@ -57,16 +57,8 @@ using namespace std;
G4hMultipleScattering::G4hMultipleScattering(const G4String& processName)
: G4VMultipleScattering(processName)
{
dtrl = 0.05;
lambdalimit = 1.*mm;
samplez = false ;
isInitialized = false;
SetLateralDisplasmentFlag(true);
SetSkin(0.0);
SetRangeFactor(0.2);
SetGeomFactor(0.1);
isInitialized = false;
isIon = false;
SetStepLimitType(fMinimal);
}
@@ -88,7 +80,7 @@ void G4hMultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
{
// Modification of parameters between runs
if(isInitialized) {
if (p->GetParticleType() != "nucleus") {
if (p->GetParticleType() != "nucleus" && p->GetPDGMass() < GeV) {
mscUrban->SetStepLimitType(StepLimitType());
mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
mscUrban->SetSkin(Skin());
@@ -98,20 +90,24 @@ void G4hMultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
return;
}
// initialisation of parameters
G4String part_name = p->GetParticleName();
mscUrban = new G4UrbanMscModel90(RangeFactor(),dtrl,lambdalimit,
GeomFactor(),Skin(),
samplez,StepLimitType());
mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
if (p->GetParticleType() == "nucleus") {
mscUrban->SetStepLimitType(fMinimal);
// defaults for ions, which cannot be overwritten
if (p->GetParticleType() == "nucleus" || p->GetPDGMass() > GeV) {
SetStepLimitType(fMinimal);
SetLateralDisplasmentFlag(false);
SetBuildLambdaTable(false);
SetSkin(0.0);
SetRangeFactor(0.2);
if(p->GetParticleType() == "nucleus") isIon = true;
}
// initialisation of parameters
G4String part_name = p->GetParticleName();
mscUrban = new G4UrbanMscModel90();
mscUrban->SetStepLimitType(StepLimitType());
mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
mscUrban->SetSkin(Skin());
mscUrban->SetRangeFactor(RangeFactor());
mscUrban->SetGeomFactor(GeomFactor());
AddEmModel(1,mscUrban);
isInitialized = true;
}
@@ -120,11 +116,38 @@ void G4hMultipleScattering::InitialiseProcess(const G4ParticleDefinition* p)
void G4hMultipleScattering::PrintInfo()
{
G4cout << " Boundary/stepping algorithm is active with RangeFactor= "
<< RangeFactor()
<< " Step limit type " << StepLimitType()
G4cout << " RangeFactor= " << RangeFactor()
<< ", step limit type: " << StepLimitType()
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
<< ", skin= " << Skin()
// << ", geomFactor= " << GeomFactor()
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4hMultipleScattering::AlongStepGetPhysicalInteractionLength(
const G4Track& track,
G4double,
G4double currentMinimalStep,
G4double& currentSafety,
G4GPILSelection* selection)
{
// get Step limit proposed by the process
valueGPILSelectionMSC = NotCandidateForSelection;
G4double escaled = track.GetKineticEnergy();
if(isIon) escaled *= track.GetDynamicParticle()->GetMass()/proton_mass_c2;
G4double steplength = GetMscContinuousStepLimit(track,
escaled,
currentMinimalStep,
currentSafety);
// G4cout << "StepLimit= " << steplength << G4endl;
// set return value for G4GPILSelection
*selection = valueGPILSelectionMSC;
return steplength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionGasIonisation.cc,v 1.3 2007/11/09 11:45:45 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ionGasIonisation.cc,v 1.14 2008/09/12 16:26:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -55,13 +55,8 @@
using namespace std;
G4ionGasIonisation::G4ionGasIonisation(const G4String& name)
: G4ionIonisation(name),
currParticle(0),
baseParticle(0),
initialised(false)
: G4ionIonisation(name)
{
atomXS = CLHEP::pi*CLHEP::Bohr_radius*CLHEP::Bohr_radius;
verboseLevel = 1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -69,86 +64,7 @@ G4ionGasIonisation::G4ionGasIonisation(const G4String& name)
G4ionGasIonisation::~G4ionGasIonisation()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionGasIonisation::InitialiseEnergyLossProcess(
const G4ParticleDefinition* part,
const G4ParticleDefinition* bpart)
{
G4ionIonisation::InitialiseEnergyLossProcess(part, bpart);
if(initialised) return;
currParticle = part;
if(part == bpart || part == G4GenericIon::GenericIon()) baseParticle = 0;
else if(bpart == 0) baseParticle = G4GenericIon::GenericIon();
else baseParticle = bpart;
if(baseParticle) basePartMass = baseParticle->GetPDGMass();
else basePartMass = currParticle->GetPDGMass();
initialised = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionGasIonisation::PrintInfo()
{
G4ionIonisation::PrintInfo();
G4cout << " Version of ion process with simulation discrete ion/media change exchange."
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionGasIonisation::InitialiseMassCharge(const G4Track& track)
{
// First step of an ion
if(track.GetCurrentStepNumber() == 1) {
currParticle = track.GetDefinition();
ionZ = G4int(currParticle->GetPDGCharge()/eplus + 0.5);
currentIonZ = G4int(track.GetDynamicParticle()->GetCharge()/eplus + 0.5);
currMassRatio = basePartMass/currParticle->GetPDGMass();
}
// any step
G4double q = eplus*currentIonZ;
SetDynamicMassCharge(currMassRatio, q*q);
preStepKinEnergy = track.GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionGasIonisation::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double& s)
{
// add corrections
if(eloss < preStepKinEnergy) {
const G4ParticleDefinition* part = dp->GetDefinition();
const G4Material* mat = couple->GetMaterial();
// use Bethe-Bloch with corrections
if(preStepKinEnergy*currMassRatio > BetheBlochEnergyThreshold())
eloss += s*corr->HighOrderCorrections(part,mat,preStepKinEnergy);
// use nuclear stopping
else if(NuclearStoppingFlag()) {
G4double nloss = s*corr->NuclearDEDX(part,mat,preStepKinEnergy - eloss*0.5);
eloss += nloss;
fParticleChange.ProposeNonIonizingEnergyDeposit(nloss);
}
// effective number of collisions
G4double x = mat->GetElectronDensity()*s*atomXS;
// equilibrium charge
G4double q = fParticleChange.GetProposedCharge();
// sample charge change during the step
fParticleChange.SetProposedCharge(SampleChargeAfterStep(q, x));
}
}
/*
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4ionGasIonisation::SampleChargeAfterStep(G4double qeff, G4double xeff)
@@ -156,11 +72,18 @@ G4double G4ionGasIonisation::SampleChargeAfterStep(G4double qeff, G4double xeff)
// qeff - equilibrium charge
// xeff - effective number of collisions
// q - current charge
G4double q = eplus*currentIonZ;
G4double q = G4double(currentIonZ);
if(qeff > q) {
if(G4UniformRand() < qeff - q) currentIonZ++;
} else {
if(G4UniformRand() < q - qeff) currentIonZ--;
}
q = eplus*currentIonZ;
if(verboseLevel > 1) G4cout << "G4ionGasIonisation: Q1= " << currentIonZ
<< " Qeff= " << qeff/eplus << " Neff= " << xeff
<< G4endl;
return q;
}
*/
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionIonisation.cc,v 1.44 2007/11/09 11:45:45 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ionIonisation.cc,v 1.65 2008/10/15 17:53:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -54,6 +54,7 @@
// 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
// 16-05-07 Add data for light ion stopping only for GenericIon (V.Ivantchenko)
// 07-11-07 Fill non-ionizing energy loss (V.Ivantchenko)
// 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI)
//
//
// -------------------------------------------------------------------
@@ -64,14 +65,16 @@
#include "G4ionIonisation.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
//#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4BraggModel.hh"
#include "G4BraggIonModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4IonFluctuations.hh"
#include "G4UnitsTable.hh"
#include "G4LossTableManager.hh"
#include "G4WaterStopping.hh"
#include "G4EmCorrections.hh"
#include "G4IonFluctuations.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -79,8 +82,8 @@ using namespace std;
G4ionIonisation::G4ionIonisation(const G4String& name)
: G4VEnergyLossProcess(name),
corr(0),
theParticle(0),
theBaseParticle(0),
isInitialised(false),
stopDataActive(true),
nuclearStopping(true)
@@ -88,7 +91,8 @@ G4ionIonisation::G4ionIonisation(const G4String& name)
SetLinearLossLimit(0.15);
SetStepFunction(0.1, 0.1*mm);
SetIntegral(true);
SetVerboseLevel(1);
SetProcessSubType(fIonisation);
// SetVerboseLevel(1);
corr = G4LossTableManager::Instance()->EmCorrections();
}
@@ -103,97 +107,70 @@ void G4ionIonisation::InitialiseEnergyLossProcess(
const G4ParticleDefinition* part,
const G4ParticleDefinition* bpart)
{
if(isInitialised) return;
const G4ParticleDefinition* ion = G4GenericIon::GenericIon();
theParticle = part;
if(!isInitialised) {
if(part == bpart || part == G4GenericIon::GenericIon()) theBaseParticle = 0;
else if(bpart == 0) theBaseParticle = G4GenericIon::GenericIon();
else theBaseParticle = bpart;
theParticle = part;
//G4String pname = part->GetParticleName();
SetBaseParticle(theBaseParticle);
SetSecondaryParticle(G4Electron::Electron());
// define base particle
const G4ParticleDefinition* theBaseParticle = 0;
if(theBaseParticle) baseMass = theBaseParticle->GetPDGMass();
else baseMass = theParticle->GetPDGMass();
if (!EmModel(1)) SetEmModel(new G4BraggIonModel(),1);
EmModel(1)->SetLowEnergyLimit(100*eV);
eth = 2.0*MeV;
EmModel(1)->SetHighEnergyLimit(eth);
if (!FluctModel()) SetFluctModel(new G4IonFluctuations());
AddEmModel(1, EmModel(1), FluctModel());
if(part == ion) theBaseParticle = 0;
else if(bpart == 0) theBaseParticle = ion;
else theBaseParticle = bpart;
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(100*TeV);
AddEmModel(2, EmModel(2), FluctModel());
SetBaseParticle(theBaseParticle);
SetSecondaryParticle(G4Electron::Electron());
// Add ion stoping tables for Generic Ion
if(part == G4GenericIon::GenericIon()) {
G4WaterStopping ws(corr);
effCharge = corr->GetIonEffectiveCharge(EmModel(1));
} else {
effCharge = corr->GetIonEffectiveCharge(0);
if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1);
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
// model limit defined for protons
eth = (EmModel(1)->HighEnergyLimit())*part->GetPDGMass()/proton_mass_c2;
EmModel(1)->SetHighEnergyLimit(eth);
if (!FluctModel()) SetFluctModel(new G4IonFluctuations());
AddEmModel(1, EmModel(1), FluctModel());
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
EmModel(2)->SetLowEnergyLimit(eth);
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(2, EmModel(2), FluctModel());
// Add ion stoping tables for Generic Ion
if(part == ion) {
G4WaterStopping ws(corr);
corr->SetIonisationModels(EmModel(1),EmModel(2));
}
isInitialised = true;
}
isInitialised = true;
// reinitialisation of corrections for the new run
EmModel(1)->ActivateNuclearStopping(nuclearStopping);
EmModel(2)->ActivateNuclearStopping(nuclearStopping);
if(part == ion) corr->InitialiseForNewRun();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionIonisation::PrintInfo()
{
if(EmModel(1) && EmModel(2))
G4cout << " Scaling relation is used from proton dE/dx and range."
<< "\n Delta cross sections and sampling from "
<< EmModel(2)->GetName() << " model for scaled energy > "
<< eth/MeV << " MeV"
<< "\n Parametrisation from "
<< EmModel(1)->GetName() << " for protons below."
<< " NuclearStopping " << nuclearStopping
<< G4endl;
if (stopDataActive)
G4cout << "\n Stopping Power data for "
if (stopDataActive && G4GenericIon::GenericIon() == theParticle) {
G4cout << " Stopping Power data for "
<< corr->GetNumberOfStoppingVectors()
<< " ion/material pairs are used."
<< " ion/material pairs, nuclearStopping: " << nuclearStopping
<< G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionIonisation::AddStoppingData(G4int Z, G4int A,
const G4String& mname,
G4PhysicsVector& dVector)
G4PhysicsVector* dVector)
{
corr->AddStoppingData(Z, A, mname, dVector);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionIonisation::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double& s)
{
if(eloss < preKinEnergy) {
const G4ParticleDefinition* part = dp->GetDefinition();
const G4Material* mat = couple->GetMaterial();
if(preKinEnergy*massRatio > eth)
eloss += s*corr->HighOrderCorrections(part,mat,preKinEnergy);
else {
if(stopDataActive)
eloss *= corr->EffectiveChargeCorrection(part,mat,preKinEnergy);
if(nuclearStopping) {
G4double nloss = s*corr->NuclearDEDX(part,mat,preKinEnergy - eloss*0.5);
eloss += nloss;
fParticleChange.ProposeNonIonizingEnergyDeposit(nloss);
}
}
fParticleChange.SetProposedCharge(effCharge->EffectiveCharge(part,
mat,preKinEnergy-eloss));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....