Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 1999/05/29 14:16:45 aforti Exp $
# $Id: GNUmakefile,v 1.4 2000/10/31 11:46:02 pia Exp $
# --------------------------------------------------------------------
# GNUmakefile for electromagnetic sub-library. John Allison, 25/6/98.
# --------------------------------------------------------------------
@@ -15,13 +15,9 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/geometry/magneticfield/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/electromagnetic/utils/include \
-I$(G4BASE)/processes/electromagnetic/standard/include \
-I$(G4BASE)/management/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/leptons/include \
@@ -1,4 +1,4 @@
$Id: History,v 1.22 2000/06/24 18:00:50 pia Exp $
$Id: History,v 1.57 2000/12/14 09:46:23 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,180 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
14.12.2000 - G.Cosmo, tag emlowen-V02-00-23
Removed inclusion of CLHEP/String/Strings.h from G4LowEnergyUtilities.cc.
22.11.2000 - MGP, tag emlowen-V02-00-22
Yang and Chu fluctuation models applied for positive
charged ions only
23.11.2000 - Ion energy fluctuations only for charge>0
V.Ivanchenko
22.11.2000 - MGP, tag emlowen-V02-00-21
Includes bug fix to electron energy fluctuations
Compatible with electromagnetic/utils V02-00-04 tag, that has
been finally accepted by STT
22.11.2000 - Bug fixed in electron energy fluctuations
V.Ivanchenko
21.11.2000 - MGP, tag emlowen-V02-00-20
Same as emlowen-V02-00-18, Vladimir's fix to energy fluctuations
(All this duplication of emlowen tags is due to the fact that the
electromagnetic/utils tag with the interface updates contains
also bug fixes and new features, and such tag has not passed
system testing yet)
21.11.2000 - MGP, tag emlowen-V02-00-19
Same as emlowen-V02-00-17, Vladimir's fix to energy fluctuations
21.11.2000 - Bug fixed in hadron/ion energy fluctuations
V.Ivanchenko
16.11.2000 - MGP, tag emlowen-V02-00-18
Same as emlowen-V02-00-16, with on top modifications to
G4LowEnergyUtilities to replace the obsolete HepString
with G4String in several places
16.11.2000 - MGP, tag emlowen-V02-00-17
Same as emlowen-V02-00-15, with on top modifications to
G4LowEnergyUtilities to replace the obsolete HepString
with G4String in several places
05.11.2000 - MGP, tag emlowen-V02-00-16
Remove the temporary const cast introduced with emlowen-V02-00-08
Co-works with Michel's electromagnetic/utils utils-V02-00-03 tag
05.11.2000 - MGP, tag emlowen-V02-00-15
Includes bug fixes and other modifications by V. Ivanchenko
listed below
05.11.2000 - Bugs fix in G4QAOLowEnergyLoss.cc : inserted at previous
edition, name "Aluninum", de/dx at E=2 MeV, and
more correct charge calculation
- New method to calculate ranges via de/dx table and
remove dynamic binning in G4hLowEnergyLoss.cc
- More precise calculation of ionisation ranges for
KineticEnergy<MinKineticEnergy in G4hLowEnergyIonisation.cc
V. Ivanchenko
03.11.2000 - MGP, tag emlowen-V02-00-14
Fix by V. Ivanchenko to remove the cause of instability
of hadron ionisation on different platforms, related to the last
step
Set MinKineticEnergy = LowestKineticEnergy = 10eV
Results changed w.r.t. the previous version by 0.5% for protons,
1% for antiprotons and 2.8% for C12
03.11.2000 - Modification
MinKineticEnergy=LowestKineticEnergy=10eV
V. Ivanchenko
03.11.2000 - MGP, tag emlowen-V02-00-13
Same as emlowen-V02-00-12, added comments for the generation of
the Software Reference Manual
31.10.2000 - MGP, tag emlowen-V02-00-12
Including modifications by V. Ivanchenko since emlowen-V02-00-11
listed below
23.10.2000 -
Clean up and update comments
V. Ivanchenko
14.10.2000 -
Bug fix in nuclear stopping table name
V. Ivanchenko
20.09.2000 - MGP, tag emlowen-V02-00-11
Bug fix related to electron energy loss fluctuations by
V. Ivanchenko
18.09.2000 - MGP, tag emlowen-V02-00-10
Improvements to the readability of the code by V. Ivanchenko
17.09.2000 - MGP, tag emlowen-V02-00-09
New features on antiproton ionisation by Stephane Chauvie:
extension of the Quantum Harmonic Oscillator model to
generic materials, calculation of oscillator strengths for
all elements
Antiproton model also moved to be compliant with the new design
iteration
16.09.2000 - MGP, tag emlowen-V02-00-08
Const cast in G4hLowEnergyIonisation (const G4Material* into
G4Material*) to convert the previously _good_ LowE code
into bad one, but palatable to G4EnergyLossTables, that has
various member functions requiring a non-const G4Material*
pointer in the arguments
This modification was required to avoid compilation errors
on DEC; it is meant to be temporary
The affected pointers SHOULD BE REVERTED TO CONST
AS SOON AS POSSIBLE, after agreement with the
G4EnergyLossTables author
16.09.2000 - MGP, tag emlowen-V02-00-07
Fix in G4hICRU49He::StoppingPower - a1 changed into e1 (typo?)
to remove compilation problems on DEC (uninitialized variable)
Fix in G4hLowEnergyLoss, eliminated two protected variables
G4Proton* theProton and G4AntiProton* theAntiProton
to revove compilation problems on DEC (hiding)
16.09.2000 - MGP, tag emlowen-V02-00-06
Modifications by V.I. in hadron classes (renaming of classes
for better understanding of the code)
05.09.2000 - MGP, tag emlowen-V02-00-05
Fixes to remove warnings (hiding member functions and
data members) in hadron classes
04.09.2000 - MGP, tag emlowen-V02-00-04
Same as emlowen-V02-00-03, with V.I.'s new implementations
and fixes (see below, July-August 2000)
04.09.2000 - MGP, tag emlowen-V02-00-03
Same as emlowen-V02-00-02, with Gabriele's fixes
(see below, 03.08.2000)
22.08.2000 - V.Ivanchenko: A bug in Nuclear Stopping Power was fixed.
The calculation of step limit for low energy
hadrons/ions is upgraded.
The Barkas and Bloch corrections are introduced
for ions "on fly"
18.08.2000 - V.Ivanchenko: TRIM1985 model have been implemented
A bug in GetConstrain method for hadrons/ions is fixed
18.08.2000 - V.Ivanchenko: two additional models of ions energy
loss fluctuations have been implemented
10.08.2000 - V.Ivanchenko: Old bug in Fluctuations of Electronic
energy losses of hadrons and ions are fixed
04.08.2000 - V.Ivanchenko: Fluctuations of Nuclear Stopping Powers are
Energy losses of hadrons and ions are implemented
03.08.2000 - G.Cosmo
Fixes to allow events' reproducibility:
G4LowEnergyGammaConversion.cc: changed usage of RandFlat::shootBit() to
RandBit::shootBit().
G4VeLowEnergyLoss.cc, G4hLowEnergyLoss.cc: changed RandGauss to
G4RandGauss.
02.08.2000 - V.Ivanchenko: Energy losses of hadrons and ions are redesigned,
a lot of new classes are created. New unit test is designed
as well (G4hTestStoppingPower).
29.07.2000 - MGP, tag emlowen-V02-00-02
Added theta to ntuples in G4BremsstrahlungTest
18.07.2000 - MGP, tag emlowen-V02-00-01
V.Ivanchenko: bug fix in G4hLowEnergyIonisation in AlongStepDoIt
11.07.2000 - MGP, tag emlowen-V02-00-00
Improvements in G4BremsstrahlungTest and G4eIonisationTest
24.06.2000 - MGP, tag emlowen-V01-01-22
Modification to hTest G4Ion... classes by V. Ivanchenko to
fix crash on exit on Linux
@@ -19,7 +19,12 @@
// Creation date: 1 Giugno 1999
//
// Modifications:
//
//
//
// Class description:
// Utility for Low Energy electromagnetic e/photon processes
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
#ifndef G4DATA_HH
@@ -19,7 +19,11 @@
// Creation date: 1 Giugno 1999
//
// Modifications:
//
//
// Class description:
// Utility for Low Energy e.m. e/photon processes
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
#ifndef G4FIRSTLEVEL_HH
@@ -0,0 +1,83 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: IonChuFluctuationModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 18 August 2000
//
// Modifications:
// 18/08/2000 V.Ivanchenko First implementation
//
// Class description:
//
// The aproximation of additional ion energy loss fluctuations
// W.K.Chu, In: Ion Beam Handbook for Material Analysis.
// eds. J.W. Mayer and E. Rimini (Academic Press, New York, 1977).
// Q.Yang et al., NIM B61(1991)149-155.
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
#ifndef G4IonChuFluctuationModel_h
#define G4IonChuFluctuationModel_h 1
#include "G4VLowEnergyModel.hh"
class G4IonChuFluctuationModel : public G4VLowEnergyModel
{
public:
G4IonChuFluctuationModel(const G4String& name) ;
~G4IonChuFluctuationModel() ;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const;
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
protected:
private:
G4double ChuFluctuationModel(const G4Material* material,
G4double kineticEnergy,
G4double particleMass) const;
};
#endif
@@ -0,0 +1,81 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: IonYangFluctuationModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 18 August 2000
//
// Modifications:
// 18/08/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// The aproximation of additional ion energy loss fluctuations
// Q.Yang et al., NIM B61(1991)149-155.
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4IonYangFluctuationModel_h
#define G4IonYangFluctuationModel_h 1
#include "G4VLowEnergyModel.hh"
class G4IonYangFluctuationModel : public G4VLowEnergyModel
{
public:
G4IonYangFluctuationModel(const G4String& name) ;
~G4IonYangFluctuationModel() ;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const;
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
protected:
private:
G4double YangFluctuationModel(const G4Material* material,
G4double kineticEnergy,
G4double particleMass,
G4double charge) const;
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyBremsstrahlung.hh,v 1.11 2000/04/19 13:20:53 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyBremsstrahlung.hh,v 1.12 2000/11/03 10:29:50 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -22,6 +22,10 @@
// - First implementation of continuous energy loss.
//
//
// Class description:
// Low Energy electromagnetic process, Bremsstrahlung
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ************************************************************
#ifndef G4LowEnergyBremsstrahlung_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LowEnergyBremsstrahlung.icc,v 1.13 2000/04/19 13:20:53 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyCompton.hh,v 1.6 2000/06/22 02:25:24 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyCompton.hh,v 1.7 2000/11/03 10:29:50 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -17,6 +17,11 @@
// CERN, CN Division, ASD group
// ------------ G4LowEnergyCompton physics process ------
// by A.Forti 1999/03/02
//
// Class description:
// Low Energy electromagnetic process, Compton
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ************************************************************
#ifndef G4LowEnergyCompton_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LowEnergyCompton.icc,v 1.11 2000/06/22 02:25:25 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyGammaConversion.hh,v 1.5 2000/06/22 02:25:25 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyGammaConversion.hh,v 1.6 2000/11/03 10:29:50 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -17,6 +17,11 @@
// CERN, CN Division, ASD group
// ------------ G4LowEnergyGammaConversion physics process ------
// by A.Forti 1999/03/02
//
// Class description:
// Low Energy process, Photon conversion
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ************************************************************
#ifndef G4LowEnergyGammaConversion_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LowEnergyGammaConversion.icc,v 1.9 2000/06/22 02:25:25 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyIonisation.hh,v 1.14 2000/04/07 13:43:13 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyIonisation.hh,v 1.16 2000/11/03 10:29:51 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -14,13 +14,19 @@
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ---------- G4LowEnergyIonisation physics process -----------
// --- G4LowEnergyIonisation physics process for electrons
// by Alessandra Forti July 1999
// ************************************************************
//
// 07.04.2000 Veronique Lefebure + Laszlo Urban
// - First implemention of continuous energy loss
// 14/07/99: corrections , L.Urban
// 20/09/00 update fluctuations V.Ivanchenko
//
// Class description:
// Low Energy Electromagnetic process, electron Ionisation
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ------------------------------------------------------------
#ifndef G4LowEnergyIonisation_h
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyPhotoElectric.hh,v 1.13 2000/06/22 02:25:26 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyPhotoElectric.hh,v 1.14 2000/11/03 10:29:51 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -17,6 +17,11 @@
// CERN, CN Division, ASD group
// ------------ G4LowEnergyPhotoElectric physics process ------
// by A.Forti 1999/03/02
//
// Class description:
// Low Energy Electromagnetic process, Photoelectric effect
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ************************************************************
#ifndef G4LowEnergyPhotoElectric_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LowEnergyPhotoElectric.icc,v 1.14 2000/06/22 02:25:26 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyRayleigh.hh,v 1.6 2000/06/22 02:19:01 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyRayleigh.hh,v 1.7 2000/11/03 10:29:51 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -17,6 +17,11 @@
// CERN, CN Division, ASD group
// ------------ G4LowEnergyRayleigh physics process ------
// by A.Forti 1999/03/02
//
// Class description:
// Low Energy Electromagnetic process, Rayleigh effect
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ************************************************************
#ifndef G4LowEnergyRayleigh_h
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LowEnergyRayleigh.icc,v 1.10 2000/06/22 02:25:26 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyUtilities.hh,v 1.5 2000/06/22 02:25:27 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyUtilities.hh,v 1.6 2000/11/03 10:29:51 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -17,6 +17,11 @@
// CERN, CN Division, ASD group
// ------------ G4LowEnergyPhotoElectric physics process ------
// by A.Forti 1999/06/28
//
// Class description:
// Class for the handling of the data libraries
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ************************************************************
#ifndef G4LowEnergyUtilities_h
@@ -16,60 +16,78 @@
// by Stephane Chauvie, 21 May 2000
//
// Modified:
// 16/09/2000 S. Chauvie Oscillator for all materials
// 23/05/2000 MGP Made compliant to design
//
// Class Description:
// Quantal Harmonic Oscillator Model for energy loss of slow antiprotons
// Class Description - End
//
// Class description:
// Quantal Harmonic Oscillator Model for energy loss of low energy antiprotons
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ------------------------------------------------------------
#ifndef G4QAOLowEnergyLoss_hh
#define G4QAOLowEnergyLoss_hh 1
#include "G4VhEnergyLossModel.hh"
#include "G4VLowEnergyModel.hh"
#include "globals.hh"
class G4DynamicParticle;
class G4Material;
class G4ParticleDefinition;
class G4QAOLowEnergyLoss : public G4VhEnergyLossModel
class G4QAOLowEnergyLoss : public G4VLowEnergyModel
{
public:
G4QAOLowEnergyLoss();
G4QAOLowEnergyLoss(const G4String& name);
~G4QAOLowEnergyLoss();
virtual G4double LowEnergyLimit() const {return 50*keV;};
// returns the lower limit for model validity
virtual G4double HighEnergyLimit() const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
// returns the higher limit for model validity
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
// returns the lower limit for model validity
virtual G4bool IsInCharge(G4double energy,
const G4ParticleDefinition* particleDefinition,
const G4Material* material) const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const;
// returns the higher limit for model validity
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const;
// returns the lower limit for model validity
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const;
// returns true if the model is applicable at that energy for
// that particle for that material
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
// returns true if the model is applicable at that energy for
// that particle for that material
virtual G4double EnergyLoss(const G4DynamicParticle* particle,
const G4Material* material) const;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
// returns the energy loss via the quantal harmonic oscillator model
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
// returns the energy loss via the quantal harmonic oscillator model
private:
// hide assignment operator
G4QAOLowEnergyLoss & operator=( G4QAOLowEnergyLoss &right);
G4QAOLowEnergyLoss( G4QAOLowEnergyLoss&);
G4double EnergyLoss(const G4Material* material,
G4double kineticEnergy,
G4double zParticle) const;
// returns the energy loss via the quantal harmonic oscillator model
// get number of shell, energy and oscillator strenghts for material
G4int GetNumberOfShell(const G4Material* material) const;
G4double GetShellEnergy(const G4Material* material,G4int nbOfTheShell) const;
G4double GetOscillatorEnergy(const G4Material* material,G4int nbOfTheShell) const;
G4double GetShellStrength(const G4Material* material,G4int nbOfTheShell) const;
G4double GetOccupationNumber(G4int Z, G4int ShellNb) const;
// calculate stopping number for L's term
G4double GetL0(G4double normEnergy) const;
// terms in Z^2
@@ -103,7 +121,9 @@ private:
static const G4double L0[67][2];
static const G4double L1[22][2];
static const G4double L2[14][2];
static const G4int nbOfElectronPerSubShell[1540];
static const G4int fNumberOfShells[101];
G4int sizeL0;
G4int sizeL1;
G4int sizeL2;
@@ -20,6 +20,11 @@
//
// Modifications:
//
//
// Class description:
// Utility for Low Energy electromagnetic e/photon processes
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
#ifndef G4SECONDLEVEL_HH
@@ -20,6 +20,10 @@
//
// Modifications:
//
// Class description:
// Utility for Low Energy electromagnetic e/photon processes
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
#ifndef G4THIRDLEVEL_HH
@@ -0,0 +1,88 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4VLowEnergyModel
//
// Author: Maria Grazia Pia (MariaGrazia.Pia@ge.infn.it)
//
// Creation date: 7 May 2000
//
// Modifications:
// 22/05/2000 MGP Version compliant with design
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Abstract class for Low Energy Electromagnetic models
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4VLowEnergyModel_h
#define G4VLowEnergyModel_h 1
#include "G4ios.hh"
#include "globals.hh"
class G4ParticleDefinition;
class G4DynamicParticle;
class G4Material;
class G4VLowEnergyModel
{
public:
G4VLowEnergyModel(const G4String& name);
virtual ~G4VLowEnergyModel();
virtual G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material) = 0;
virtual G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy) = 0;
virtual G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const = 0;
virtual G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const = 0;
virtual G4double HighEnergyLimit(const G4ParticleDefinition* aParticle)
const = 0;
virtual G4double LowEnergyLimit(const G4ParticleDefinition* aParticle)
const = 0;
virtual G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const = 0;
virtual G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const = 0;
protected:
private:
// hide assignment operator
G4VLowEnergyModel & operator=(const G4VLowEnergyModel &right);
G4VLowEnergyModel(const G4VLowEnergyModel&);
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VeLowEnergyLoss.hh,v 1.1 2000/04/04 13:47:35 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4VeLowEnergyLoss.hh,v 1.3 2000/11/03 10:29:51 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// 3.4.2000 Veronique Lefebure:
// Move utils/include/G4VEnergyLoss.hh to
@@ -32,6 +32,15 @@
//
// -----------------------------------------------------------
// created on 28 January 2000 by L. Urban
// -----------------------------------------------------------
//
// Modifications:
// 20/09/00 update fluctuations V.Ivanchenko
//
// Class description:
// Abstract class for Low Energy Electromagnetic electron energy loss
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -----------------------------------------------------------
#ifndef G4VeLowEnergyLoss_h
@@ -80,7 +89,8 @@ class G4VeLowEnergyLoss : public G4VContinuousDiscreteProcess
G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double threshold);
G4double MeanLoss,
G4double step);
private:
@@ -0,0 +1,79 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4VhElectronicStoppingPower
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Low energy hadrons/ions electronic stopping power parametrisation
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4VhElectronicStoppingPower_h
#define G4VhElectronicStoppingPower_h 1
#include "G4ios.hh"
#include "globals.hh"
class G4Material;
class G4VhElectronicStoppingPower
{
public:
G4VhElectronicStoppingPower();
virtual ~G4VhElectronicStoppingPower();
virtual G4double StoppingPower(const G4Material* material,
G4double kineticEnergy) = 0 ;
virtual G4bool HasMaterial(const G4Material* material) = 0 ;
virtual G4double ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const = 0;
protected:
G4double HeEffChargeSquare(const G4double z,
const G4double kineticEnergyHe) const;
// This method returns He effective charge square parametrised according to
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
G4double GetHeMassAMU() const {return theHeMassAMU;};
private:
// hide assignment operator
G4VhElectronicStoppingPower(G4VhElectronicStoppingPower &);
G4VhElectronicStoppingPower & operator =
(const G4VhElectronicStoppingPower &right);
const G4double theHeMassAMU;
};
#endif
@@ -23,10 +23,9 @@
//
// Class Description:
//
// Abstract base class for hadron energy loss model
//
// Class Description: End
//
// Abstract class for hadron energy loss model
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
@@ -0,0 +1,67 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4VhNuclearStoppingPower
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Hadrons/ions nuclear stopping power parameterisation
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4VhNuclearStoppingPower_h
#define G4VhNuclearStoppingPower_h 1
#include "globals.hh"
class G4VhNuclearStoppingPower
{
public:
G4VhNuclearStoppingPower();
virtual ~G4VhNuclearStoppingPower();
void SetNuclearStoppingFluctuationsOn() {lossFlucFlag = true;};
void SetNuclearStoppingFluctuationsOff() {lossFlucFlag = false;};
virtual G4double NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const=0;
protected:
G4bool lossFlucFlag;
private:
// hide assignment operator
G4VhNuclearStoppingPower & operator=(const G4VhNuclearStoppingPower &right);
G4VhNuclearStoppingPower(const G4VhNuclearStoppingPower&);
};
#endif
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4eLowEnergyLoss.hh,v 1.1 2000/04/04 13:47:35 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4eLowEnergyLoss.icc,v 1.1 2000/04/04 13:47:36 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
@@ -0,0 +1,89 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hBetheBlochModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Bethe-Bloch ionisation model
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4hBetheBlochModel_h
#define G4hBetheBlochModel_h 1
#include "G4VLowEnergyModel.hh"
class G4hBetheBlochModel : public G4VLowEnergyModel
{
public:
G4hBetheBlochModel(const G4String& name) ;
~G4hBetheBlochModel() ;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const;
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
protected:
private:
G4double BetheBlochFormula(const G4Material* material,
G4double kineticEnergy,
G4double particleMass) const;
// Low energy limit of the model
G4double lowEnergyLimit;
G4double highEnergyLimit;
// constants needed for the energy loss calculation
const G4double twoln10;
const G4double bg2lim;
const G4double taulim; // energy to start to switch off shell corrections
};
#endif
@@ -0,0 +1,66 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hICRU49He
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Electronic stopping power parameterised according to
// ICRU Report N49, 1993. J.F. Ziegler model for He ion.
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4hICRU49He_h
#define G4hICRU49He_h 1
#include "G4VhElectronicStoppingPower.hh"
class G4hICRU49He : public G4VhElectronicStoppingPower
{
public:
G4hICRU49He();
~G4hICRU49He();
G4bool HasMaterial(const G4Material* material);
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy) ;
G4double ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const;
protected:
private:
void SetMoleculaNumber(G4int number) {iMolecula = number;};
G4double rateMass; // HeMassAMU/ProtonMassAMU
G4int iMolecula; // index in the molecula's table
};
#endif
@@ -0,0 +1,58 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hICRU49Nuclear
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Nuclear stopping power parametrised according to
// ICRU Report N49, 1993. Moliere model.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
#ifndef G4hICRU49Nuclear_h
#define G4hICRU49Nuclear_h 1
#include "G4VhNuclearStoppingPower.hh"
class G4hICRU49Nuclear : public G4VhNuclearStoppingPower
{
public:
G4hICRU49Nuclear() ;
~G4hICRU49Nuclear() ;
G4double NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const;
protected:
private:
};
#endif
@@ -0,0 +1,67 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hICRU49p
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Electronic stopping power parametrised according to
// ICRU Report N49, 1993, for protons.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
#ifndef G4hICRU49p_h
#define G4hICRU49p_h 1
#include "G4VhElectronicStoppingPower.hh"
class G4hICRU49p : public G4VhElectronicStoppingPower
{
public:
G4hICRU49p();
~G4hICRU49p();
G4bool HasMaterial(const G4Material* material);
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy) ;
G4double ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const;
protected:
private:
void SetMoleculaNumber(G4int number) {iMolecula = number;};
G4int iMolecula; // index in the molecula's table
const G4double protonMassAMU;
};
#endif
@@ -0,0 +1,85 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hIonEffChargeSquare
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Ion effective charge model
// J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
// Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4hIonEffChargeSquare_h
#define G4hIonEffChargeSquare_h 1
#include "G4VLowEnergyModel.hh"
class G4hIonEffChargeSquare : public G4VLowEnergyModel
{
public:
G4hIonEffChargeSquare(const G4String& name) ;
~G4hIonEffChargeSquare() ;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const;
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
protected:
private:
G4double IonEffChargeSquare(const G4Material* material,
G4double kineticEnergy,
G4double particleMass,
G4double ionCharge) const;
// This method returns ion effective charge square parametrised
const G4double theHeMassAMU;
};
#endif
@@ -17,272 +17,241 @@
// was made on the base of G4hIonisation class
// developed by Laszlo Urban
// ************************************************************
// Class Description:
// G4hLowEnergyIonisation class is the extention of the ionisation
// process for the slow charged hadrons. The physics model is
// described in CERN-OPEN-99-121. User have a possibility to define
// a parametrisation table via its name.
// Class Description - End
//
// ************************************************************
// 23 May 2000 MG Pia Clean up for QAO model
// 28 July 1999 V.Ivanchenko cleen up
// 28 July 1999 V.Ivanchenko cleen up
// 17 August 1999 G.Mancinelli implemented ICRU parametrization (protons)
// 20 August 1999 G.Mancinelli implemented ICRU parametrization (alpha)
// 31 August 1999 V.Ivanchenko update and cleen up
// 23 May 2000 MG Pia Clean up for QAO model
// 25 July 2000 V.Ivanchenko New design iteration
// 09 August 2000 V.Ivanchenko Add GetContinuousStepLimit
// 17 August 2000 V.Ivanchenko Add IonFluctuationModel
// 23 Oct 2000 V.Ivanchenko Renew comments
// ------------------------------------------------------------
// Class Description:
// Ionisation process of charged hadrons and ions, including low energy
// extensions
// The physics model is described in CERN-OPEN-99-121 and CERN-OPEN-99-300.
// The user may select parametrisation tables for electronic
// stopping powers and nuclear stopping powers
// The list of available tables:
// Electronic stopping powers: "ICRU_49p" (default), "ICRU_49He",
// "Ziegler1977p", "Ziegler1985p",
// "Ziegler1977He"
// Nuclear stopping powers: "ICRU_49" (default), "Ziegler1977",
// "Ziegler1985"
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ------------------------------------------------------------
#ifndef G4hLowEnergyIonisation_h
#define G4hLowEnergyIonisation_h 1
#include "G4ios.hh"
#include "Randomize.hh"
#include "G4hLowEnergyLoss.hh"
#include "G4VhEnergyLossModel.hh"
#include "G4QAOLowEnergyLoss.hh"
#include "globals.hh"
#include "G4VLowEnergyModel.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Electron.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4hNuclearStoppingModel.hh"
#include "G4hBetheBlochModel.hh"
#include "G4hParametrisedLossModel.hh"
#include "G4QAOLowEnergyLoss.hh"
#include "G4hIonEffChargeSquare.hh"
#include "G4IonChuFluctuationModel.hh"
#include "G4IonYangFluctuationModel.hh"
class G4hLowEnergyIonisation : public G4hLowEnergyLoss
{
public: // Without description
G4hLowEnergyIonisation(const G4String& processName = "hLowEIoni");
~G4hLowEnergyIonisation();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
void BuildLossTable(const G4ParticleDefinition& aParticleType);
void PrintInfoDefinition();
protected:
virtual G4double ComputeMicroscopicCrossSection(const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double ExcEnergy);
public: // With description
void SetStoppingPowerTableName(const G4String& dedxTable);
// This method defines the ionisation parametrisation method via its name
G4hLowEnergyIonisation(const G4String& processName = "hLowEIoni");
// The ionisation process for hadrons/ions to be include in the
// UserPhysicsList
void SetNuclearStoppingOn();
~G4hLowEnergyIonisation();
// Destructor
G4bool IsApplicable(const G4ParticleDefinition&);
// True for all charged hadrons/ions
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) ;
// Build physics table during inicialisation
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
enum G4ForceCondition* condition );
// Return MeanFreePath until delta-electron production
void PrintInfoDefinition() const;
// Print out of the class parameters
void SetHighEnergyForProtonParametrisation(G4double energy)
{protonHighEnergy = energy;} ;
// Definition of the boundary proton energy. For higher energies
// Bethe-Bloch formula is used, for lower energies parametrisation
// of the energy losses is performed.
void SetLowEnergyForProtonParametrisation(G4double energy)
{protonLowEnergy = energy;} ;
// Definition of the boundary proton energy. For lower energies
// Free Electron Gas model is used for the energy losses
void SetHighEnergyForAntiProtonParametrisation(G4double energy)
{antiProtonHighEnergy = energy;} ;
// Definition of the boundary antiproton energy. For higher energies
// Bethe-Bloch formula is used, for lower energies parametrisation
// of the energy losses is performed. Default is 2 MeV.
void SetLowEnergyForAntiProtonParametrisation(G4double energy)
{antiProtonLowEnergy = energy;} ;
// Definition of the boundary antiproton energy. For lower energies
// Free Electron Gas model is used for the energy losses. Default
// is 1 keV.
G4double GetContinuousStepLimit(const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety);
// Calculation of the step limit due to ionisation losses
void SetElectronicStoppingPowerModel(const G4ParticleDefinition* aParticle,
const G4String& dedxTable);
// This method defines the electron ionisation parametrisation method
// via the name of the table. Default is "ICRU_49p".
void SetNuclearStoppingPowerModel(const G4String& dedxTable)
{theNuclearTable = dedxTable; SetNuclearStoppingOn();};
// This method defines the nuclear ionisation parametrisation method
// via the name of the table. Default is "ICRU_49".
void SetNuclearStoppingOn() {nStopping = true;};
// This method switch on calculation of the nuclear stopping power.
void SetNuclearStoppingOff();
void SetNuclearStoppingOff() {nStopping = false;};
// This method switch off calculation of the nuclear stopping power.
void SetAntiProtonStoppingOn();
// This method switch on calculation of the Barkas Effect for antiproton
void SetBarkasOn() {theBarkas = true;};
// This method switch on calculation of the Barkas and Bloch effects
void SetAntiProtonStoppingOff();
// This method switch on calculation of the Barkas Effect for antiproton
virtual G4double GetParametrisedLoss(G4Material* aMaterial,
const G4double KinEnergy,
const G4double DeltaRayCutNow);
// This method returns parametrised energy loss.
G4double GetPreciseDEDX(G4Material* aMaterial,
const G4double KinEnergy,
const G4ParticleDefinition* aParticleType);
// This method returns electron ionisation energy loss for any energy.
G4double GetNuclearDEDX(G4Material* aMaterial,
const G4double KinEnergy,
const G4ParticleDefinition* aParticleType);
// This method returns nuclear energy loss.
G4double GetBetheBlochLoss(const G4Material* material,
const G4double KinEnergy,
const G4double DeltaRayCutNow);
// This method returns energy loss calculated via Bethe-Bloch formula.
G4double GetFreeElectronGasLoss(G4double paramA, G4double KinEnergy);
// This method returns energy loss parametrised in the free electron gas model.
G4double GetUrbanModel(const G4Element* element, G4double KinEnergy);
// This method returns energy loss parametrised as in the hIonisation class.
G4double GetDeltaRaysEnergy(const G4Material* material, const G4double KinEnergy,
const G4double DeltaRayCutNow);
// This method returns average energy loss due to delta-rays emission with
// energy higher than the cut energy for given material.
G4int MolecIsInICRU_R49p(const G4Material* material);
// This method returns index of the material in the table of protons energy
// loss in ICRU Report N49. If material is not in the table the method returns -1.
G4int MolecIsInICRU_R49PowersHe(const G4Material* material);
// This method returns index of the material in the table of He energy loss
// in ICRU Report N49. If material is not in the table the method returns -1.
G4double MolecIsInZiegler1988(const G4Material* material);
// This method returns index of the material in the table of energy loss from
// NIM B35 (1988) 215-228. If material is not in the table the method returns -1.
G4double GetMolecICRU_R49Loss(const G4Material* material, const G4double KinEnergy,
const G4double DeltaRayCutNow, const G4int molecIndex);
// This method returns energy loss of protons in material from the table of ICRU
// Report N49.
G4double GetChemicalFactor(const G4double ExpStopPower125, const G4double KinEnergy,
const G4double BraggStopPower125);
// This method returns the value of "chemical factor" which allows to correct
// energy losses calculated according to the Bragg's rule (NIM B35 (1988) 215-228).
G4double GetStoppingPower1977H(G4int iz, G4double E);
// This method returns protons electronic stopping power parametrised according to
// H.H.Andersen & J.F.Ziegler, Hydrogen Stopping Powers and
// Ranges in All Elements, Vol.3, Pergamon Press, 1977
G4double GetStoppingPowerICRU_R49p(G4int iz, G4double E, G4String type);
// This method returns protons electronic stopping power parametrised according to
// ICRU Report N49, 1993.
G4double GetStoppingPower1977He(G4int iz, G4double E);
// This method returns He electronic stopping power parametrised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
G4double GetStoppingPowerICRU_R49He(G4int iz, G4double E);
// This method returns He electronic stopping power parametrised according to
// ICRU Report N49, 1993. J.F. Ziegler model.
G4double GetStoppingPowerICRU_R49PowersHe(G4int iz, G4double E);
// This method returns He electronic stopping power parametrised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
G4double GetStoppingPower1977n(G4double Z1, G4double Z2,
G4double M1, G4double M2, G4double E);
// This method returns nuclear stopping power parametrised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
G4double GetStoppingPower1985n(G4double Z1, G4double Z2,
G4double M1, G4double M2, G4double E);
// This method returns nuclear stopping power parametrised according to
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
G4double GetStoppingPowerMoliere(G4double Z1, G4double Z2,
G4double M1, G4double M2, G4double E);
// This method returns nuclear stopping power parametrised according to
// ICRU Report N49, 1993. Moliere model.
G4double GetHeEffChargeSquare(const G4int iz, const G4double HeKinEnergy);
// This method returns He effective charge square parametrised according to
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
G4double GetIonEffChargeSquare(const G4Material* material, const G4double KinEnergy,
const G4double IonCharge);
// This method returns ion effective charge square parametrised according to
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
G4double ComputeBarkasTerm(const G4Material* material, const G4double KinEnergy);
// Function to compute the Barkas term
G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
// Function to determine StepLimit
void SetBarkasOff() {theBarkas = false;};
// This method switch off calculation of the Barkas and Bloch effects
G4VParticleChange* AlongStepDoIt(const G4Track& trackData ,
const G4Step& stepData );
const G4Step& stepData ) ;
// Function to determine total energy deposition on the step
G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
// Simulation of delta rays production
G4double ComputeDEDX(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
// This method returns electronic dE/dx for protons or antiproton.
protected:
private:
void InitializeMe();
void InitializeParametrisation();
void BuildLossTable(const G4ParticleDefinition& aParticleType) ;
void BuildLambdaTable(const G4ParticleDefinition& aParticleType) ;
void SetProtonElectronicStoppingPowerModel(const G4String& dedxTable)
{theProtonTable = dedxTable ;};
// This method defines the ionisation parametrisation method via its name
void SetAntiProtonElectronicStoppingPowerModel(const G4String& dedxTable)
{theAntiProtonTable = dedxTable ;};
G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition& aParticleType,
G4double kineticEnergy,
G4double atomicNumber,
G4double deltaCutInEnergy) const;
G4double GetConstraints(const G4DynamicParticle* particle,
const G4Material* material);
// Function to determine StepLimit
G4double ProtonParametrisedDEDX(const G4Material* material,
G4double kineticEnergy) const;
G4double AntiProtonParametrisedDEDX(const G4Material* material,
G4double kineticEnergy) const;
G4double DeltaRaysEnergy(const G4Material* material,
G4double kineticEnergy,
G4double particleMass) const;
// This method returns average energy loss due to delta-rays emission with
// energy higher than the cut energy for given material.
G4double BarkasTerm(const G4Material* material,
G4double kineticEnergy) const;
// Function to compute the Barkas term for protons
G4double BlochTerm(const G4Material* material,
G4double kineticEnergy,
G4double cSquare) const;
// Function to compute the Bloch term for protons
G4double ElectronicLossFluctuation(const G4DynamicParticle* particle,
const G4Material* material,
G4double meanLoss,
G4double step) const;
// Function to sample electronic losses
// hide assignment operator
G4hLowEnergyIonisation & operator=(const G4hLowEnergyIonisation &right);
G4hLowEnergyIonisation(const G4hLowEnergyIonisation&);
private:
// private data members ...............................
G4VhEnergyLossModel* qaoLoss;
G4VLowEnergyModel* theBetheBlochModel;
G4VLowEnergyModel* theProtonModel;
G4VLowEnergyModel* theAntiProtonModel;
G4VLowEnergyModel* theIonEffChargeModel;
G4VLowEnergyModel* theNuclearStoppingModel;
G4VLowEnergyModel* theIonChuFluctuationModel;
G4VLowEnergyModel* theIonYangFluctuationModel;
protected:
// protected data members ...............................
G4PhysicsTable* theMeanFreePathTable;
// interval of parametrisation of electron stopping power
G4double ParamLowEnergy;
G4double ParamHighEnergy;
// name of parametrisation table of electron stopping power
G4String DEDXtable;
G4String theProtonTable;
G4String theAntiProtonTable;
G4String theNuclearTable;
// interval of parametrisation of electron stopping power
G4double protonLowEnergy;
G4double protonHighEnergy;
G4double antiProtonLowEnergy;
G4double antiProtonHighEnergy;
// flag of parametrisation of nucleus stopping power
G4bool nStopping;
G4bool pbarStop;
// constants needed for the energy loss calculation
const G4double twoln10;
const G4double Factor;
const G4double bg2lim;
const G4double taulim; // energy to start to switch off shell corrections
G4double RateMass; // m_e/M
G4double MassRatio; // m_p/M
G4ParticleDefinition* theParticle;
// particles , cuts in kinetic energy ........
const G4Electron* theElectron;
const G4Proton* theProton;
const G4AntiProton* theAntiProton;
const G4double* DeltaCutInKineticEnergy ;
G4double DeltaCutInKineticEnergyNow ;
G4double ProtonMassAMU;
G4double HeMassAMU;
G4double ZieglerFactor; // Factor to convert the Stopping Power
// unit [ev/(10^15 atoms/cm^2]
// into the Geant4 dE/dx unit
/*
static G4double LowerBoundLambda ; // bining for lambda table
static G4double UpperBoundLambda ;
static G4int NbinLambda ;
G4bool theBarkas;
G4double LowestKineticEnergy,HighestKineticEnergy ;
G4int TotBin ;
G4double* deltaCutInKineticEnergy;
G4PhysicsTable* theMeanFreePathTable;
const G4double paramStepLimit; // parameter limits the step at low energy
G4double fdEdx; // computed in GetContraints
G4double fRangeNow ; //
G4double charge; //
G4double chargeSquare; //
protected:
public:
private:
static void SetLowerBoundLambda(G4double val) {LowerBoundLambda = val;};
static void SetUpperBoundLambda(G4double val) {UpperBoundLambda = val;};
static void SetNbinLambda(G4int n) {NbinLambda = n;};
static G4double GetLowerBoundLambda() { return LowerBoundLambda;};
static G4double GetUpperBoundLambda() { return UpperBoundLambda;};
static G4int GetNbinLambda() {return NbinLambda;};
*/
};
#include "G4hLowEnergyIonisation.icc"
@@ -19,53 +19,66 @@
// charged hadrons.
// ************************************************************
// 28 July 1999 V.Ivanchenko cleen up
// 09 Aug 2000 V.Ivanchenko add GetContinuousStepLimit
// 23 Oct 2000 V.Ivanchenko add control on particle mass
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4hLowEnergyIonisation::GetMeanFreePath(
const G4Track& trackData,
G4double previousStepSize,
G4ForceCondition* condition)
const G4Track& trackData,
G4double previousStepSize,
enum G4ForceCondition* condition)
{
const G4DynamicParticle* aParticle ;
G4Material* aMaterial ;
G4double MeanFreePath;
const G4DynamicParticle* aParticle = trackData.GetDynamicParticle() ;
G4Material* aMaterial = trackData.GetMaterial() ;
G4double meanFreePath;
G4bool isOutRange ;
*condition = NotForced ;
aParticle = trackData.GetDynamicParticle() ;
aMaterial = trackData.GetMaterial() ;
G4double kineticEnergy = aParticle->GetKineticEnergy() ;
G4double KineticEnergy = aParticle->GetKineticEnergy() ;
if(kineticEnergy < LowestKineticEnergy) meanFreePath = DBL_MAX;
if(KineticEnergy < LowestKineticEnergy)
MeanFreePath = DBL_MAX;
else {
if(KineticEnergy > HighestKineticEnergy)
KineticEnergy = HighestKineticEnergy;
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue(KineticEnergy,isOutRange) ;
if(kineticEnergy > HighestKineticEnergy)
kineticEnergy = HighestKineticEnergy ;
meanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue(kineticEnergy,isOutRange) ;
}
return MeanFreePath ;
return meanFreePath ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4hLowEnergyIonisation::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
G4double&)
{
G4double Step =
GetConstraints(track.GetDynamicParticle(),track.GetMaterial()) ;
if((Step>0.0)&&(Step<currentMinimumStep))
currentMinimumStep = Step ;
return Step ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4hLowEnergyIonisation::IsApplicable(
const G4ParticleDefinition& particle)
const G4ParticleDefinition& particle)
{
return(particle.GetPDGCharge() != 0.);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4hLowEnergyIonisation::GetFreeElectronGasLoss(G4double paramA, G4double tau)
{
G4double ionl = paramA * sqrt(tau) ;
return ionl ;
return(particle.GetPDGCharge() != 0.0
&& particle.GetPDGMass() > proton_mass_c2*0.1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4hLowEnergyLoss.hh,v 1.2 2000/03/31 15:17:20 vnivanch Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4hLowEnergyLoss.hh,v 1.9 2000/11/03 10:29:51 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -37,8 +37,14 @@
// 7/10/98 some bugs fixed + some cleanup , L.Urban
// 22/10/98 cleanup , L.Urban
// 02/02/99 several bugs fixed, L.Urban
// 31/03/00 : rename to lowenergy subdirectory as G4hLowEnergyLoss.hh V.Ivanchenko
// 31/03/00 V.Ivanchenko rename to lowenergy as G4hLowEnergyLoss.hh
// 09/08/00 V.Ivanchenko remove GetContinuousStepLimit and IsApplicable
//
// Class description:
// Class for Low Energy electromagnetic energy loss of hadrons
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ****************************************************************************
#ifndef G4hLowEnergyLoss_h
#define G4hLowEnergyLoss_h 1
@@ -69,35 +75,18 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
~G4hLowEnergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
G4double GetContinuousStepLimit(
const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety) ;
G4VParticleChange* AlongStepDoIt(const G4Track& track ,const G4Step& Step) ;
virtual G4double GetMeanFreePath(
const G4Track& track,
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
enum G4ForceCondition* condition
) = 0 ;
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step) = 0 ;
const G4Step& Step) = 0 ;
protected:
virtual G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
virtual G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
G4Material *aMaterial,
G4double MeanLoss) ;
private:
// hide assignment operator
@@ -116,14 +105,10 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
protected:
// data members to speed up the fluctuation calculation
G4Material *lastMaterial ;
G4int imat ;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
G4Material *lastMaterial ;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
// ====================================================================
// static part of the class
@@ -199,9 +184,6 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
static void BuildRangeCoeffCTable(
const G4ParticleDefinition& aParticleType);
static const G4Proton* theProton ;
static const G4AntiProton* theAntiProton ;
// ====================================================================
public:
@@ -262,7 +244,6 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
static G4PhysicsTable** RecorderOfProcess;
static G4int CounterOfProcess;
static G4PhysicsTable* thepRangeCoeffATable;
static G4PhysicsTable* thepRangeCoeffBTable;
static G4PhysicsTable* thepRangeCoeffCTable;
@@ -285,9 +266,6 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
G4double MinKineticEnergy ;
G4double fdEdx; // computed in GetContraints
G4double fRangeNow ; // computed in GetContraints
static G4double finalRange ; // last step before stop
static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
@@ -295,8 +273,6 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
static G4bool EnlossFlucFlag ;
};
#include "G4hLowEnergyLoss.icc"
#endif
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4hLowEnergyLoss.icc,v 1.1 2000/03/31 15:15:22 vnivanch Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -0,0 +1,112 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hNuclearStoppingModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Low energy hadrons/ions ionisation parameterisation
// Further documentation available from http://www.ge.infn.it/geant4/lowE//
// -------------------------------------------------------------------
//
#ifndef G4hNuclearStoppingModel_h
#define G4hNuclearStoppingModel_h 1
#include "G4VLowEnergyModel.hh"
#include "G4VhNuclearStoppingPower.hh"
class G4hNuclearStoppingModel : public G4VLowEnergyModel
{
public:
G4hNuclearStoppingModel(const G4String& name);
~G4hNuclearStoppingModel() ;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const
{return highEnergyLimit;};
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const
{return lowEnergyLimit;};
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const
{return highEnergyLimit;};
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const
{return lowEnergyLimit;};
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const
{return true;};
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const
{return true;};
void SetNuclearStoppingFluctuationsOn()
{nStopingPowerTable->SetNuclearStoppingFluctuationsOn();};
void SetNuclearStoppingFluctuationsOff()
{nStopingPowerTable->SetNuclearStoppingFluctuationsOff();};
protected:
private:
// hide assignment operator
G4hNuclearStoppingModel(G4hNuclearStoppingModel &);
G4hNuclearStoppingModel & operator=(const G4hNuclearStoppingModel &right);
void InitializeMe();
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy,
G4double z1,
G4double m1) const;
// Pointer to the parametrisation class
G4VhNuclearStoppingPower* nStopingPowerTable;
G4double factorPDG2AMU; // Factor to convert PDG mass unit
// into AMU
G4double theZieglerFactor; // Factor to convert the Stopping Power
// unit [ev/(10^15 atoms/cm^2]
// into the Geant4 dE/dx unit
G4String modelName;
G4double lowEnergyLimit;
G4double highEnergyLimit;
};
#endif
@@ -0,0 +1,104 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hParametrisedLossModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Low energy hadrons/ions ionisation parameterisation
// Further documentation available from http://www.ge.infn.it/geant4/lowE//
// -------------------------------------------------------------------
//
#ifndef G4hParametrisedLossModel_h
#define G4hParametrisedLossModel_h 1
#include "G4VLowEnergyModel.hh"
#include "G4VhElectronicStoppingPower.hh"
class G4hParametrisedLossModel : public G4VLowEnergyModel
{
public:
G4hParametrisedLossModel(const G4String& name) ;
~G4hParametrisedLossModel() ;
G4double TheValue(const G4DynamicParticle* particle,
const G4Material* material);
G4double TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy);
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
G4double HighEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4double LowEnergyLimit(const G4ParticleDefinition* aParticle) const;
G4bool IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const;
G4bool IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const;
protected:
private:
// hide assignment operator
G4hParametrisedLossModel(G4hParametrisedLossModel &);
G4hParametrisedLossModel & operator=(const G4hParametrisedLossModel &right);
void InitializeMe();
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy);
G4bool MolecIsInZiegler1988(const G4Material* material) ;
void SetExpStopPower125(G4double value) {expStopPower125 = value;};
G4double ChemicalFactor(G4double kineticEnergy, G4double eloss125) const;
// Pointer to the parametrisation class
G4VhElectronicStoppingPower* eStopingPowerTable;
G4double theZieglerFactor; // Factor to convert the Stopping Power
// unit [ev/(10^15 atoms/cm^2]
// into the Geant4 dE/dx unit
G4String modelName;
G4double lowEnergyLimit;
G4double highEnergyLimit;
G4double expStopPower125; // Experimental Stopping power at 125keV
};
#endif
@@ -0,0 +1,65 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1977He
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Electronic stopping power parameterised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
// Further documentation available from http://www.ge.infn.it/geant4/lowE//
// -------------------------------------------------------------------
//
#ifndef G4hZiegler1977He_h
#define G4hZiegler1977He_h 1
#include "G4VhElectronicStoppingPower.hh"
class G4hZiegler1977He : public G4VhElectronicStoppingPower
{
public:
G4hZiegler1977He() ;
~G4hZiegler1977He() ;
G4bool HasMaterial(const G4Material* material);
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy);
G4double ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const;
protected:
private:
G4double rateMass; // HeMassAMU/ProtonMassAMU
};
#endif
@@ -0,0 +1,58 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1977Nuclear
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Nuclear stopping power parametrised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4hZiegler1977Nuclear_h
#define G4hZiegler1977Nuclear_h 1
#include "G4VhNuclearStoppingPower.hh"
class G4hZiegler1977Nuclear : public G4VhNuclearStoppingPower
{
public:
G4hZiegler1977Nuclear();
~G4hZiegler1977Nuclear();
G4double NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const;
protected:
private:
};
#endif
@@ -0,0 +1,63 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1977p
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Electronic stopping power parametrised according to
// H.H.Andersen & J.F.Ziegler, Hydrogen Stopping Powers and
// Ranges in All Elements, Vol.3, Pergamon Press, 1977
// Further documentation available from http://www.ge.infn.it/geant4/lowE//
// -------------------------------------------------------------------
//
#ifndef G4hZiegler1977p_h
#define G4hZiegler1977p_h 1
#include "G4VhElectronicStoppingPower.hh"
class G4hZiegler1977p : public G4VhElectronicStoppingPower
{
public:
G4hZiegler1977p();
~G4hZiegler1977p();
G4bool HasMaterial(const G4Material* material);
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy);
G4double ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const;
protected:
private:
const G4double protonMassAMU;
};
#endif
@@ -0,0 +1,59 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1985Nuclear
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Nuclear stopping power parametrised according to
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// -------------------------------------------------------------------
//
#ifndef G4hZiegler1985Nuclear_h
#define G4hZiegler1985Nuclear_h 1
#include "G4VhNuclearStoppingPower.hh"
class G4hZiegler1985Nuclear : public G4VhNuclearStoppingPower
{
public:
G4hZiegler1985Nuclear();
~G4hZiegler1985Nuclear();
G4double NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const;
protected:
private:
};
#endif
@@ -0,0 +1,63 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1985p
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Electronic stopping power parametrised according to
// J.F.Ziegler, J.P.Biersack, U.Littmark The Stoping and
// Range of Ions in Solids, Vol.1, Pergamon Press, 1985
// Further documentation available from http://www.ge.infn.it/geant4/lowE//
// -------------------------------------------------------------------
//
#ifndef G4hZiegler1985p_h
#define G4hZiegler1985p_h 1
#include "G4VhElectronicStoppingPower.hh"
class G4hZiegler1985p : public G4VhElectronicStoppingPower
{
public:
G4hZiegler1985p();
~G4hZiegler1985p();
G4bool HasMaterial(const G4Material* material);
G4double StoppingPower(const G4Material* material,
G4double kineticEnergy);
G4double ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const;
protected:
private:
const G4double protonMassAMU;
};
#endif
@@ -16,12 +16,14 @@
// by Vladimir Ivanchenko, 6 September 1999
// was made on the base of G4hLowEnergyIonisation class
// ************************************************************
// Class Description:
// It is the extention of the ionisation process for the slow
// charged ions. Physics model is described in CERN-OPEN-99-XXX.
// Class Description - End
// ************************************************************
// 6 September 1999 V.Ivanchenko create
// ************************************************************
//
// Class Description:
// This class is OBSOLETE; the same functionality is now provided by
// G4hLowEnergyIonisation
// Further documentation available from http://www.ge.infn.it/geant4/lowE
// ------------------------------------------------------------
#ifndef G4ionLowEnergyIonisation_h
@@ -0,0 +1,271 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4IonChuFluctuationModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 18 August 2000
//
// Modifications:
// 18/08/2000 V.Ivanchenko First implementation
// 04/09/2000 V.Ivanchenko Rename fluctuations
// 03/10/2000 V.Ivanchenko CodeWizard clean up
//
// -------------------------------------------------------------------
//
// Class Description:
//
// The aproximation of additional ion energy loss fluctuations
// W.K.Chu, In: Ion Beam Handbook for Material Analysis.
// eds. J.W. Mayer and E. Rimini (Academic Press, New York, 1977).
// Q.Yang et al., NIM B61(1991)149-155.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4IonChuFluctuationModel.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4Material.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4IonChuFluctuationModel::G4IonChuFluctuationModel(const G4String& name)
: G4VLowEnergyModel(name)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4IonChuFluctuationModel::~G4IonChuFluctuationModel()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::TheValue(const G4DynamicParticle* particle,
const G4Material* material)
{
G4double energy = particle->GetKineticEnergy() ;
G4double particleMass = particle->GetMass() ;
G4double q = ChuFluctuationModel(material,energy,particleMass) ;
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::TheValue(
const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
G4double particleMass = aParticle->GetPDGMass() ;
G4double q = ChuFluctuationModel(material,kineticEnergy,particleMass);
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 1.0*TeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 0.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 1.0*TeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 0.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4IonChuFluctuationModel::IsInCharge(
const G4DynamicParticle* particle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4IonChuFluctuationModel::IsInCharge(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonChuFluctuationModel::ChuFluctuationModel(
const G4Material* material,
G4double kineticEnergy,
G4double particleMass) const
{
// 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 zeff = (material->GetElectronDensity())/
(material->GetTotNbOfAtomsPerVolume()) ;
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,
-0.5125, -0.4625, 0.5660, -0.5190,
-0.5127, -0.8595, 0.5626, -0.8721,
-0.5174, -1.1930, 0.5565, -1.1980,
-0.5179, -1.1850, 0.5560, -1.2070,
-0.5209, -0.9355, 0.5590, -1.0250,
-0.5255, -0.7766, 0.5720, -0.9412,
-0.5776, -0.6665, 0.6598, -0.8484,
-0.6013, -0.6045, 0.7321, -0.7671,
-0.5781, -0.5518, 0.7605, -0.6919,
-0.5587, -0.4981, 0.7835, -0.6195,
-0.5466, -0.4656, 0.7978, -0.5771,
-0.5406, -0.4690, 0.8031, -0.5718,
-0.5391, -0.5061, 0.8024, -0.5974,
-0.5380, -0.6483, 0.7962, -0.6970,
-0.5355, -0.7722, 0.7962, -0.7839,
-0.5329, -0.7720, 0.7988, -0.7846,
-0.5335, -0.7671, 0.7984, -0.7933,
-0.5324, -0.7612, 0.7998, -0.8031,
-0.5305, -0.7300, 0.8031, -0.7990,
-0.5307, -0.7178, 0.8049, -0.8216,
-0.5248, -0.6621, 0.8165, -0.7919,
-0.5180, -0.6502, 0.8266, -0.7986,
-0.5084, -0.6408, 0.8396, -0.8048,
-0.4967, -0.6331, 0.8549, -0.8093,
-0.4861, -0.6508, 0.8712, -0.8432,
-0.4700, -0.6186, 0.8961, -0.8132,
-0.4545, -0.5720, 0.9227, -0.7710,
-0.4404, -0.5226, 0.9481, -0.7254,
-0.4288, -0.4778, 0.9701, -0.6850,
-0.4199, -0.4425, 0.9874, -0.6539,
-0.4131, -0.4188, 0.9998, -0.6332,
-0.4089, -0.4057, 1.0070, -0.6218,
-0.4039, -0.3913, 1.0150, -0.6107,
-0.3987, -0.3698, 1.0240, -0.5938,
-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.3979, 1.0150, -0.6168,
-0.3968, -0.3990, 1.0160, -0.6195,
-0.3971, -0.4432, 1.0050, -0.6591,
-0.3944, -0.4665, 1.0010, -0.6825,
-0.3924, -0.5109, 0.9921, -0.7235,
-0.3882, -0.5158, 0.9947, -0.7343,
-0.3838, -0.5125, 0.9999, -0.7370,
-0.3786, -0.4976, 1.0090, -0.7310,
-0.3741, -0.4738, 1.0200, -0.7155,
-0.3969, -0.4496, 1.0320, -0.6982,
-0.3663, -0.4297, 1.0430, -0.6828,
-0.3630, -0.4120, 1.0530, -0.6689,
-0.3597, -0.3964, 1.0620, -0.6564,
-0.3555, -0.3809, 1.0720, -0.6454,
-0.3525, -0.3607, 1.0820, -0.6289,
-0.3505, -0.3465, 1.0900, -0.6171,
-0.3397, -0.3570, 1.1020, -0.6384,
-0.3314, -0.3552, 1.1130, -0.6441,
-0.3235, -0.3531, 1.1230, -0.6498,
-0.3150, -0.3483, 1.1360, -0.6539,
-0.3060, -0.3441, 1.1490, -0.6593,
-0.2968, -0.3396, 1.1630, -0.6649,
-0.2935, -0.3225, 1.1760, -0.6527,
-0.2797, -0.3262, 1.1940, -0.6722,
-0.2704, -0.3202, 1.2100, -0.6770,
-0.2815, -0.3227, 1.2480, -0.6775,
-0.2880, -0.3245, 1.2810, -0.6801,
-0.3034, -0.3263, 1.3270, -0.6778,
-0.2936, -0.3215, 1.3430, -0.6835,
-0.3282, -0.3200, 1.3980, -0.6650,
-0.3260, -0.3070, 1.4090, -0.6552,
-0.3511, -0.3074, 1.4470, -0.6442,
-0.3501, -0.3064, 1.4500, -0.6442,
-0.3490, -0.3027, 1.4550, -0.6418,
-0.3487, -0.3048, 1.4570, -0.6447,
-0.3478, -0.3074, 1.4600, -0.6483,
-0.3501, -0.3283, 1.4540, -0.6669,
-0.3494, -0.3373, 1.4550, -0.6765,
-0.3485, -0.3373, 1.4570, -0.6774,
-0.3462, -0.3300, 1.4630, -0.6728,
-0.3462, -0.3225, 1.4690, -0.6662,
-0.3453, -0.3094, 1.4790, -0.6553,
-0.3844, -0.3134, 1.5240, -0.6412,
-0.3848, -0.3018, 1.5310, -0.6303,
-0.3862, -0.2955, 1.5360, -0.6237,
-0.4262, -0.2991, 1.5860, -0.6115,
-0.4278, -0.2910, 1.5900, -0.6029,
-0.4303, -0.2817, 1.5940, -0.5927,
-0.4315, -0.2719, 1.6010, -0.5829,
-0.4359, -0.2914, 1.6050, -0.6010,
-0.4365, -0.2982, 1.6080, -0.6080,
-0.4253, -0.3037, 1.6120, -0.6150,
-0.4335, -0.3245, 1.6160, -0.6377,
-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 ;
G4double q = 1.0 / (1.0 + a[iz][0]*pow(energy,a[iz][1])+
+ a[iz][2]*pow(energy,a[iz][3])) ;
return q ;
}
@@ -0,0 +1,203 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4IonYangFluctuationModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 18 August 2000
//
// Modifications:
// 18/08/2000 V.Ivanchenko First implementation
// 04/09/2000 V.Ivanchenko Rename fluctuations
// 03/10/2000 V.Ivanchenko CodeWizard clean up
//
// -------------------------------------------------------------------
// Class Description:
//
// The aproximation of additional ion energy loss fluctuations
// Q.Yang et al., NIM B61(1991)149-155.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4IonYangFluctuationModel.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4Material.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4IonYangFluctuationModel::G4IonYangFluctuationModel(const G4String& name)
: G4VLowEnergyModel(name)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4IonYangFluctuationModel::~G4IonYangFluctuationModel()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::TheValue(const G4DynamicParticle* particle,
const G4Material* material)
{
G4double energy = particle->GetKineticEnergy() ;
G4double mass = particle->GetMass() ;
G4double charge = (particle->GetCharge())/eplus ;
G4double q = YangFluctuationModel(material,energy,mass,charge) ;
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::TheValue(
const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
G4double mass = aParticle->GetPDGMass() ;
G4double charge = (aParticle->GetPDGCharge())/eplus ;
G4double q = YangFluctuationModel(material,kineticEnergy,mass,charge);
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 1.0*TeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 0.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 1.0*TeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 0.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4IonYangFluctuationModel::IsInCharge(
const G4DynamicParticle* particle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4IonYangFluctuationModel::IsInCharge(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4IonYangFluctuationModel::YangFluctuationModel(
const G4Material* material,
G4double kineticEnergy,
G4double particleMass,
G4double charge) const
{
// 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) ;
G4int i = 0 ;
G4double factor = 1.0 ;
// The index of set of parameters i = 0 for protons(hadrons) in gases
// 1 for protons(hadrons) in solids
// 2 for ions in atomic gases
// 3 for ions in molecular gases
// 4 for ions in solids
static G4double b[5][4] = {
0.1014, 0.3700, 0.9642, 3.987,
0.1955, 0.6941, 2.522, 1.040,
0.05058, 0.08975, 0.1419, 10.80,
0.05009, 0.08660, 0.2751, 3.787,
0.01273, 0.03458, 0.3951, 3.812
} ;
// protons (hadrons)
if(1.5 > charge) {
if( kStateGas != material->GetState() ) i = 1 ;
// ions
} else {
G4double zeff = (material->GetElectronDensity())/
(material->GetTotNbOfAtomsPerVolume()) ;
factor = charge * pow(charge/zeff, 0.3333) ;
if( kStateGas == material->GetState() ) {
energy /= (charge * sqrt(charge)) ;
if(1 == (material->GetNumberOfElements())) {
i = 2 ;
} else {
i = 3 ;
}
} else {
energy /= (charge * sqrt(charge*zeff)) ;
i = 4 ;
}
}
G4double x = b[i][2] * (1.0 - exp( - energy * b[i][3] )) ;
G4double q = factor * x * b[i][0] /
((energy - b[i][1])*(energy - b[i][1]) + x*x) ;
return q ;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyBremsstrahlung.cc,v 1.25 2000/06/22 02:38:12 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyBremsstrahlung.cc,v 1.27 2000/09/20 16:49:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -31,6 +31,7 @@
// Modified PostStepDoIt to insert sampling with with EEDL data A. Forti
// Added SelectRandomAtom A. Forti
// Added map of the elements A. Forti
// 20/09/00 update printout V.Ivanchenko
// --------------------------------------------------------------
#include "G4LowEnergyBremsstrahlung.hh"
@@ -675,6 +676,8 @@ void G4LowEnergyBremsstrahlung::PrintInfoDefinition()
comments += "Implementation of the continuous dE/dx part.";
comments += "\n At present it can be used for electrons ";
comments += " in the energy range [250eV,100GeV]";
comments +=
"\n the process must work with G4LowEnergyIonisation";
G4cout << G4endl << GetProcessName() << ": " << comments<<G4endl;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyCompton.cc,v 1.19 2000/03/13 11:15:13 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyCompton.cc,v 1.20 2000/07/11 18:46:47 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyGammaConversion.cc,v 1.13 2000/05/04 17:54:04 flongo Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyGammaConversion.cc,v 1.15 2000/09/04 18:18:08 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -14,7 +14,7 @@
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// GEANT4 Collaboration
// ------------ G4LowEnergyGammaConversion physics process --------
// by A.Forti 1999/03/02
//
@@ -29,6 +29,8 @@
#include "G4LowEnergyGammaConversion.hh"
// Collaborating Class Headers
#include "globals.hh"
#include "Randomize.hh"
#include "G4EnergyLossTables.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
@@ -221,7 +223,7 @@ G4VParticleChange* G4LowEnergyGammaConversion::PostStepDoIt(const G4Track& aTrac
//
G4double ElectTotEnergy, PositTotEnergy;
if (RandFlat::shootBit()){
if (RandBit::shootBit()){
ElectTotEnergy = (1.-epsil)*GammaEnergy;
PositTotEnergy = epsil*GammaEnergy;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyIonisation.cc,v 1.38 2000/06/22 02:38:12 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyIonisation.cc,v 1.40 2000/09/20 16:49:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// -------------------------------------------------------------
@@ -14,7 +14,7 @@
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ---------- G4LowEnergyIonisation low energy modifications -----------
// --- G4LowEnergyIonisation physics process for electrons
// by Alessandra Forti May 1999
// **************************************************************
// - 11.04.2000 VL
@@ -47,6 +47,7 @@
// Modified PostStepDoIt to insert sampling with EEDL data A. Forti
// Added SelectRandomAtom A. Forti
// Added map of the elements A. Forti
// 20/09/00 update fluctuations V.Ivanchenko
//
// --------------------------------------------------------------
@@ -1761,6 +1762,8 @@ void G4LowEnergyIonisation::PrintInfoDefinition()
comments += "with implementation of the continuous dE/dx part.";
comments += "\n At present it can be used for electrons ";
comments += " in the energy range [250eV,100GeV]";
comments +=
"\n the process must work with G4LowEnergyBremsstrahlung";
G4cout << G4endl << GetProcessName() << ": " << comments << G4endl;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyPhotoElectric.cc,v 1.25 2000/04/10 10:26:56 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyPhotoElectric.cc,v 1.26 2000/07/11 18:46:48 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyRayleigh.cc,v 1.17 2000/03/13 11:15:32 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyRayleigh.cc,v 1.18 2000/07/11 18:46:48 pia Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -5,19 +5,23 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LowEnergyUtilities.cc,v 1.4 2000/01/26 09:50:01 lefebure Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4LowEnergyUtilities.cc,v 1.7 2000/12/14 09:43:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
// CERN Geneva Switzerland
// GEANT 4 class implementation file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ------------ G4LowEnergyUtilities physics process --------
// by A.Forti 1999/03/02
// **************************************************************
// File name: G4LowEnergyUtilitie
//
// Author: A.Forti
//
// Creation date: 2 March 1999
//
// Modifications: 16/11/2000 MG Pia Replaced HepString with G4String
//
// --------------------------------------------------------------
// This Class Header
#include "G4LowEnergyUtilities.hh"
@@ -25,8 +29,9 @@
#include "G4Element.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "CLHEP/String/Strings.h"
#include "g4std/fstream"
#include "g4std/fstream"
#include "g4std/strstream"
G4LowEnergyUtilities::G4LowEnergyUtilities()
{}
@@ -38,32 +43,37 @@ G4SecondLevel* G4LowEnergyUtilities::BuildSecondLevelTables(const G4int TableInd
const G4int ParNum,
const char* prename){
HepString name, prenameStr(prename);
if(TableInd != 0){
G4String prenameStr(prename);
// HepString name, prenameStr(prename);
HepString Znum(TableInd);
name = prenameStr + Znum + ".dat";
char nameChar[100] = {""};
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
if(TableInd != 0){
ost << prenameStr << TableInd << ".dat";
// HepString Znum(TableInd);
// name = prenameStr + Znum + ".dat";
}
else{
name = prenameStr+ ".dat";
ost << prenameStr << ".dat";
// name = prenameStr+ ".dat";
}
G4String name(nameChar);
char* path = getenv("G4LEDATA");
if(!path){
HepString excep = "Error!!! G4LEDATA (Low Energy Electromagnetic processes data directory) environment variable not set";
G4String excep = "Error!!! G4LEDATA (Low Energy Electromagnetic processes data directory) environment variable not set";
G4Exception(excep);
}
HepString path_string(path);
HepString dir_file = path_string + "/" + name;
G4String path_string(path);
G4String dir_file = path_string + "/" + name;
G4std::ifstream file(dir_file);
G4std::filebuf* lsdp = file.rdbuf();
if(!lsdp->is_open()){
HepString excep = "Error!!!! data file: " + dir_file + " NOT found";
G4String excep = "Error!!!! data file: " + dir_file + " NOT found";
G4Exception(excep);
}
@@ -133,32 +143,37 @@ G4FirstLevel* G4LowEnergyUtilities::BuildFirstLevelTables(const G4int TableInd,
const G4int ParNum,
const char* prename){
HepString name, prenameStr(prename);
if(TableInd != 0){
G4String prenameStr(prename);
// HepString name, prenameStr(prename);
HepString Znum(TableInd);
name = prenameStr + Znum + ".dat";
char nameChar[100] = {""};
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
if(TableInd != 0){
ost << prenameStr << TableInd << ".dat";
// HepString Znum(TableInd);
// name = prenameStr + Znum + ".dat";
}
else{
name = prenameStr+ ".dat";
ost << prenameStr << ".dat";
// name = prenameStr+ ".dat";
}
G4String name(nameChar);
char* path = getenv("G4LEDATA");
if(!path){
HepString excep = "Error!!! G4LEDATA (Low Energy Electromagnetic processes data directory) environment variable not set";
G4String excep = "Error!!! G4LEDATA (Low Energy Electromagnetic processes data directory) environment variable not set";
G4Exception(excep);
}
HepString path_string(path);
HepString dir_file = path_string + "/" + name;
G4String path_string(path);
G4String dir_file = path_string + "/" + name;
G4std::ifstream file(dir_file);
G4std::filebuf* lsdp = file.rdbuf();
if(!lsdp->is_open()){
HepString excep = "Error!!!! data file: " + dir_file + " NOT found";
G4String excep = "Error!!!! data file: " + dir_file + " NOT found";
G4Exception(excep);
}
@@ -15,10 +15,15 @@
// ---------- G4QAOLowEnergyLoss physics process -------
// by Stephane Chauvie, 5 May 2000
// Modified:
//
// 16/09/2000 S. Chauvie Oscillator for all materials
// 24/05/2000 MGP Modified to remove compilation warnings on Linux and DEC
// Introduced sizes of L0, L1, L2 arrays
// 23/05/2000 MGP Made compliant to design
//
// 02/08/2000 V.Ivanchenko Clean up according new design
// 03/10/2000 V.Ivanchenko CodeWizard clean up
// 05/11/2000 V.Ivanchenko "Aluminum" - correct name, end of cycle
// over shells, and two bugs from previous edition
//
// ************************************************************
// It is the Quantal Harmonic Oscillator Model for energy loss
@@ -38,7 +43,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4QAOLowEnergyLoss::G4QAOLowEnergyLoss()
G4QAOLowEnergyLoss::G4QAOLowEnergyLoss(const G4String& name)
: G4VLowEnergyModel(name)
{
numberOfMaterials = 6;
sizeL0 = 67;
@@ -49,13 +55,46 @@ G4QAOLowEnergyLoss::G4QAOLowEnergyLoss()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4QAOLowEnergyLoss::~G4QAOLowEnergyLoss()
{
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::HighEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 2.0*MeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4QAOLowEnergyLoss::IsInCharge(G4double energy,
const G4ParticleDefinition* particleDefinition,
G4double G4QAOLowEnergyLoss::LowEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 50.0*keV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::HighEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 2.0*MeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::LowEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 50.0*keV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4QAOLowEnergyLoss::IsInCharge(
const G4DynamicParticle* particle,
const G4Material* material) const
{
G4bool isInCharge = false;
@@ -70,11 +109,33 @@ G4bool G4QAOLowEnergyLoss::IsInCharge(G4double energy,
break;}
}
if (particleDefinition == G4AntiProton::AntiProtonDefinition()
&&
hasMaterial)
//&& energy >= LowEnergyLimit() && energy <= HighEnergyLimit() )
isInCharge = true;
if ((particle->GetDefinition()) == (G4AntiProton::AntiProtonDefinition())
&& hasMaterial) isInCharge = true;
return isInCharge;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4QAOLowEnergyLoss::IsInCharge(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
G4bool isInCharge = false;
G4bool hasMaterial = false;
for (G4int m = 0; m < numberOfMaterials; m++)
{
G4String matName = material->GetName();
if (matName == materialAvailable[m] &&
material->GetNumberOfElements() == 1){
hasMaterial = true;
break;}
}
if (aParticle == (G4AntiProton::AntiProtonDefinition())
&& hasMaterial) isInCharge = true;
return isInCharge;
@@ -82,29 +143,57 @@ G4bool G4QAOLowEnergyLoss::IsInCharge(G4double energy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::EnergyLoss(const G4DynamicParticle* particle,
const G4Material* material) const
G4double G4QAOLowEnergyLoss::TheValue(const G4DynamicParticle* particle,
const G4Material* material)
{
G4double zParticle = (G4int)(particle->GetCharge())/eplus;
G4double energy = particle->GetKineticEnergy() ;
G4double eloss = EnergyLoss(material,energy,zParticle) ;
return eloss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
G4double zParticle = (aParticle->GetPDGCharge())/eplus;
G4double eloss = EnergyLoss(material,kineticEnergy,zParticle) ;
return eloss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::EnergyLoss(const G4Material* material,
G4double kineticEnergy,
G4double zParticle) const
{
G4int nbOfShell = GetNumberOfShell(material);
G4double ionisationEnergy = material->GetIonisation()->GetMeanExcitationEnergy();
G4double kineticEnergy = particle->GetKineticEnergy();
G4int zParticle = (G4int) particle->GetCharge();
G4double ionisationEnergy = material->GetIonisation()
->GetMeanExcitationEnergy();
G4double dedx=0;
G4double v=0;
v= c_light * sqrt( 2 * kineticEnergy / proton_mass_c2 );
G4double coeff=0;
coeff= (twopi * proton_mass_c2 * material-> GetTotNbOfElectPerVolume()) / ( electron_mass_c2);
coeff*= ( fine_structure_const * fine_structure_const * hbarc_squared ) / ( kineticEnergy );
G4double fractionOfBetheVelocity = 0;
fractionOfBetheVelocity = ( fine_structure_const * c_light) / v;
G4double v = c_light * sqrt( 2.0 * kineticEnergy / proton_mass_c2 );
G4double coeff = twopi * proton_mass_c2 *
(material-> GetTotNbOfElectPerVolume()) /
electron_mass_c2 ;
coeff *= fine_structure_const * fine_structure_const * hbarc_squared /
kineticEnergy ;
G4double fBetheVelocity = fine_structure_const * c_light / v;
G4double stoppingNumber = 0, l0Term = 0, l1Term = 0, l2Term = 0;
G4double l0Term = 0, l1Term = 0, l2Term = 0;
for (G4int nos = 0 ; nos < nbOfShell ; nos++){
G4double l0 = 0, l1 = 0, l2 = 0;
G4double NormalizedEnergy = 0;
NormalizedEnergy = ( 2 * electron_mass_c2 * v * v ) / ( c_squared * GetShellEnergy(material,nos) );
G4double NormalizedEnergy = ( 2.0 * electron_mass_c2 * v * v ) /
( c_squared * GetShellEnergy(material,nos) );
l0 = GetL0(NormalizedEnergy);
l0Term += GetShellStrength(material,nos) * l0;
@@ -115,10 +204,10 @@ G4double G4QAOLowEnergyLoss::EnergyLoss(const G4DynamicParticle* particle,
l2Term += GetShellStrength(material,nos) * l2;
}
stoppingNumber = zParticle * zParticle * ( l0Term + zParticle * fractionOfBetheVelocity * l1Term + zParticle * zParticle * fractionOfBetheVelocity * fractionOfBetheVelocity * l2Term);
dedx = ( coeff * stoppingNumber);
dedx = coeff * zParticle * zParticle * (l0Term
+ zParticle * fBetheVelocity * l1Term
+ zParticle * zParticle * fBetheVelocity * fBetheVelocity * l2Term);
return dedx ;
@@ -131,77 +220,122 @@ G4int G4QAOLowEnergyLoss::GetNumberOfShell(const G4Material* material) const
// Set default return value
G4int nShell = nbofShellForMaterial[0];
if(material->GetName() == "Aluminium") nShell = nbofShellForMaterial[0];
else if (material->GetName() == "Silicon" ) nShell = nbofShellForMaterial[1] ;
else if (material->GetName()== "Copper") nShell = nbofShellForMaterial[2];
else if (material->GetName() == "Tantalum") nShell = nbofShellForMaterial[3];
else if (material->GetName() == "Gold" ) nShell = nbofShellForMaterial[4];
else if (material->GetName() == "Platinum") nShell = nbofShellForMaterial[5];
else G4cout << "WARNING - G4QAOLowEnergyLoss::GetNumberOfShell - "
<< "The model is not available for "
<< material->GetName()
<< G4endl;
for(G4int i=0; i<numberOfMaterials; i++) {
if(materialAvailable[i] == material->GetName()) {
nShell = nbofShellForMaterial[i];
return nShell;
}
}
G4cout << "WARNING - G4QAOLowEnergyLoss::GetNumberOfShell - "
<< "The model is not available for "
<< material->GetName() << G4endl;
return nShell;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::GetShellEnergy(const G4Material* material,G4int nbOfTheShell) const
G4double G4QAOLowEnergyLoss::GetShellEnergy(const G4Material* material,
G4int nbOfTheShell) const
{
//
G4double shellEnergy = alShellEnergy[0];
//
G4double shellEnergy = alShellEnergy[0];
if(material->GetName() == "Aluminium") shellEnergy = alShellEnergy[nbOfTheShell];
else if (material->GetName() == "Silicon" ) shellEnergy = siShellEnergy[nbOfTheShell];
else if (material->GetName() == "Copper") shellEnergy = cuShellEnergy[nbOfTheShell];
else if (material->GetName() == "Tantalum") shellEnergy = taShellEnergy[nbOfTheShell];
else if (material->GetName() == "Gold" ) shellEnergy = auShellEnergy[nbOfTheShell];
else if (material->GetName() == "Platinum") shellEnergy = ptShellEnergy[nbOfTheShell];
else G4cout << "WARNING - G4QAOLowEnergyLoss::GetShellEnergy - "
<< "The model is not available for "
<< material->GetName()
<< G4endl;
if(material->GetName() == "Aluminum") shellEnergy = alShellEnergy[nbOfTheShell];
else if (material->GetName() == "Silicon" ) shellEnergy = siShellEnergy[nbOfTheShell];
else if (material->GetName() == "Copper") shellEnergy = cuShellEnergy[nbOfTheShell];
else if (material->GetName() == "Tantalum") shellEnergy = taShellEnergy[nbOfTheShell];
else if (material->GetName() == "Gold" ) shellEnergy = auShellEnergy[nbOfTheShell];
else if (material->GetName() == "Platinum") shellEnergy = ptShellEnergy[nbOfTheShell];
else if (material->GetNumberOfElements() == 1)
shellEnergy = GetOscillatorEnergy(material, nbOfTheShell);
else G4cout << "WARNING - G4QAOLowEnergyLoss::GetShellEnergy - "
<< "The model is not available for "
<< material->GetName()
<< G4endl;
return shellEnergy;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::GetShellStrength(const G4Material* material,G4int nbOfTheShell) const
G4double G4QAOLowEnergyLoss::GetOscillatorEnergy(const G4Material* material,
G4int nbOfTheShell) const
{
const G4Element* element = material->GetElement(0);
G4int Z = (G4int)(element->GetZ());
G4double squaredPlasmonEnergy = 28.16 * 28.16 * 1e-6
* (material->GetDensity()) * (cm3/g)
* Z / (element->GetN()) ;
G4double plasmonTerm = 0.66667 * GetOccupationNumber(Z,nbOfTheShell)
* squaredPlasmonEnergy / (Z*Z) ;
G4double ionTerm = exp(0.5) * (element->GetAtomicShell(nbOfTheShell)) ;
ionTerm = ionTerm*ionTerm ;
G4double oscShellEnergy = sqrt( ionTerm + plasmonTerm );
return oscShellEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::GetShellStrength(const G4Material* material,
G4int nbOfTheShell) const
{
G4double shellStrength = alShellStrength[0];
if(material->GetName() == "Aluminium") shellStrength = alShellStrength[nbOfTheShell];
if(material->GetName() == "Aluminum") shellStrength = alShellStrength[nbOfTheShell];
else if (material->GetName() == "Silicon" ) shellStrength = siShellStrength[nbOfTheShell];
else if (material->GetName() == "Copper") shellStrength = cuShellStrength[nbOfTheShell];
else if (material->GetName() == "Tantalum") shellStrength = taShellStrength[nbOfTheShell];
else if (material->GetName() == "Gold" ) shellStrength = auShellStrength[nbOfTheShell];
else if (material->GetName() == "Platinum") shellStrength = ptShellStrength[nbOfTheShell];
else if (material->GetNumberOfElements() == 1){
G4int Z = (G4int)(material->GetZ());
shellStrength = GetOccupationNumber(Z,nbOfTheShell) / Z ;}
else G4cout << "WARNING - G4QAOLowEnergyLoss::GetShellEnergy - "
<< "The model is not available for "
<< material->GetName()
<< G4endl;
<< "The model is not available for "
<< material->GetName()
<< G4endl;
return shellStrength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::GetOccupationNumber(G4int Z, G4int ShellNb) const
{
G4int indice = ShellNb ;
for (G4int z = 1 ; z < Z ; z++) {indice += fNumberOfShells[z];}
return nbOfElectronPerSubShell[indice];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::GetL0(G4double normEnergy) const
{
G4double l0 = 0, l0p = 0;
G4double bethe = 0;
G4int n = 0;
do{
n++;
if ( n >= sizeL0 ) break;
l0 = L0[n][1];
l0p = L0[n-1][1];
bethe = (l0 - l0p) * ( normEnergy - L0[n-1][0]) / (L0[n][0] - L0[n-1][0]);
bethe+= l0p;
} while( normEnergy >= L0[n][0] );
G4int n;
for(n = 0; n < sizeL0; n++) {
if( normEnergy < L0[n][0] ) break;
}
if(0 == n) n = 1 ;
if(n >= sizeL0) n = sizeL0 - 1 ;
G4double l0 = L0[n][1];
G4double l0p = L0[n-1][1];
G4double bethe = l0p + (l0 - l0p) * ( normEnergy - L0[n-1][0]) /
(L0[n][0] - L0[n-1][0]);
return bethe ;
}
@@ -209,17 +343,18 @@ G4double G4QAOLowEnergyLoss::GetL0(G4double normEnergy) const
G4double G4QAOLowEnergyLoss::GetL1(G4double normEnergy) const
{
G4double l1 = 0, l1p = 0 ;
G4double barkas = 0;
G4int n = 0;
do{
n++;
if ( n >= sizeL1 ) break;
l1 = L1[n][1];
l1p = L1[n-1][1];
barkas = (l1 - l1p) * ( normEnergy - L1[n-1][0]) / (L1[n][0] - L1[n-1][0]);
barkas+= l1p;
} while( normEnergy >= L1[n][0]);
G4int n;
for(n = 0; n < sizeL1; n++) {
if( normEnergy < L1[n][0] ) break;
}
if(0 == n) n = 1 ;
if(n >= sizeL1) n = sizeL1 - 1 ;
G4double l1 = L1[n][1];
G4double l1p = L1[n-1][1];
G4double barkas= l1p + (l1 - l1p) * ( normEnergy - L1[n-1][0]) /
(L1[n][0] - L1[n-1][0]);
return barkas;
@@ -229,17 +364,17 @@ G4double G4QAOLowEnergyLoss::GetL1(G4double normEnergy) const
G4double G4QAOLowEnergyLoss::GetL2(G4double normEnergy) const
{
G4double l2 = 0, l2p = 0;
G4double bloch = 0;
G4int n = 0;
do{
n++;
if ( n >= sizeL2 ) break;
l2 = L2[n][1];
l2p = L2[n-1][1];
bloch = (l2 - l2p) * ( normEnergy - L2[n-1][0]) / (L2[n][0] - L2[n-1][0]);
bloch+= l2p;
} while( normEnergy >= L2[n][0] );
G4int n;
for(n = 0; n < sizeL2; n++) {
if( normEnergy < L2[n][0] ) break;
}
if(0 == n) n = 1 ;
if(n >= sizeL2) n = sizeL2 - 1 ;
G4double l2 = L2[n][1];
G4double l2p = L2[n-1][1];
G4double bloch = l2p + (l2 - l2p) * ( normEnergy - L2[n-1][0]) /
(L2[n][0] - L2[n-1][0]);
return bloch;
}
@@ -247,7 +382,7 @@ G4double G4QAOLowEnergyLoss::GetL2(G4double normEnergy) const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4String G4QAOLowEnergyLoss::materialAvailable[6] = {
"Aluminium",
"Aluminum",
"Silicon",
"Copper",
"Tantalum",
@@ -389,10 +524,141 @@ const G4double G4QAOLowEnergyLoss::L2[14][2] =
40.00, -1.13902
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4QAOLowEnergyLoss::HighEnergyLimit() const
const G4int G4QAOLowEnergyLoss::nbOfElectronPerSubShell[1540] =
{
G4double eMax = 2. * MeV;
return eMax;
}
0, // consistency with G4AtomicShells
1,//------ H
2,//------ He
2, 1,//------ Li
2, 2,//------ Be
2, 2, 1,//------ B
2, 2, 2,//------ C
2, 2, 2, 1,//------ N
2, 2, 2, 2,//------ O
2, 2, 5,//------ F
2, 2, 2, 4,//------ Ne
2, 2, 2, 4, 1,//------ Na
2, 2, 2, 4, 2,//------ Mg
2, 2, 2, 4, 2, 1,//------ Al
2, 2, 2, 4, 2, 2,//------ Si
2, 2, 2, 4, 2, 3,//------ P
2, 2, 2, 4, 2, 4,//------
2, 2, 2, 4, 2, 5,//------
2, 2, 2, 4, 2, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 1,//------
2, 2, 2, 4, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 3, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 5, 2,//------
2, 2, 2, 4, 2, 2, 4, 6, 2,//------
2, 2, 2, 4, 2, 2, 4, 7, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 5, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 3,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 5,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 3, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 5, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 6, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 7, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 5, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 3,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 5,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 2, 4, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 2, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 3, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 4, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 5, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 7, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 7, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 9, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 10, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 11, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 12, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 13, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 3, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 5, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 6, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 7, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 9, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 3,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 3,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 4,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 4, 1,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 4, 2, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 2, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 3, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 4, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 6, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 7, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 7, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 8, 2, 2, 4, 1, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 10, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 11, 2, 2, 4, 2,//------
2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 2, 4, 4, 6, 6, 8, 2, 2, 4, 4, 6, 12, 2, 2, 4, 2 //-----
};
const G4int G4QAOLowEnergyLoss::fNumberOfShells[101] =
{
0 , // nonexisting zero element
1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , 3 , 4 , // 1 - 10
5 , 5 , 6 , 6 , 6 , 6 , 6 , 7 , 8 , 8 , // 11 - 20
9 , 9 , 9 , 9 , 9 , 9 , 9 , 10 , 10 , 10 , // 21 - 30
11 , 11 , 11 , 11 , 11 , 12 , 13 , 13 , 14 , 14 , // 31 - 40
14 , 14 , 14 , 14 , 14 , 15 , 15 , 15 , 16 , 16 , // 41 - 50
// ----------------------------------------------------------
16 , 16 , 16 , 17 , 18 , 18 , 19 , 19 , 19 , 19 , // 51 - 60
19 , 19 , 19 , 20 , 19 , 19 , 19 , 19 , 19 , 20 , // 61 - 70
21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 22 , 22 , // 71 - 80
23 , 23 , 23 , 23 , 24 , 24 , 25 , 25 , 26 , 26 , // 81 - 90
27 , 27 , 27 , 26 , 26 , 27 , 27 , 26 , 26 , 26 // 91 - 100
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,47 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4VLowEnergyModel
//
// Author: Maria Grazia Pia (MariaGrazia.Pia@ge.infn.it)
//
// Creation date: 7 May 2000
//
// Modifications:
// 22/05/2000 MGP Version compliant with design
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Abstract base class for hadron electronic energy loss model
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VLowEnergyModel.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VLowEnergyModel::G4VLowEnergyModel(const G4String& name)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VLowEnergyModel::~G4VLowEnergyModel()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,23 +1,28 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VeLowEnergyLoss.cc,v 1.2 2000/06/22 02:38:12 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4VeLowEnergyLoss.cc,v 1.6 2000/11/22 16:06:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
//
// For information related to this code contact:
// CERN, CN Division, ASD Group
// GEANT4 Collaboration
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// --------------------------------------------------------------
// ------------------------------------------------------------
//
// Modifications:
// 20/09/00 update fluctuations V.Ivanchenko
// 22/11/00 minor fix in fluctuations V.Ivanchenko
//
// --------------------------------------------------------------
#include "G4VeLowEnergyLoss.hh"
@@ -844,7 +849,8 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffCTable(G4PhysicsTable* theRang
G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double MeanLoss)
G4double MeanLoss,
G4double step)
// calculate actual loss from the mean loss
// The model used to get the fluctuation is essentially the same as in Glandz in Geant3.
{
@@ -853,6 +859,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
static const G4double sumaLim = -log(probLim) ;
static const G4double alim=10.;
static const G4double kappa = 10. ;
static const G4double factor = twopi_mc2_rcl2 ;
// check if the material has changed ( cache mechanism)
@@ -903,10 +910,11 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
// Gaussian fluctuation ?
if(MeanLoss >= kappa*Tm)
{
siga = sqrt(MeanLoss*Tm*(1.-0.5*beta2)) ;
loss = RandGauss::shoot(MeanLoss,siga) ;
G4double electronDensity = aMaterial->GetElectronDensity() ;
siga = sqrt(Tm*(1.0-0.5*beta2)*step*
factor*electronDensity/beta2) ;
loss = G4RandGauss::shoot(MeanLoss,siga) ;
if(loss < 0.) loss = 0. ;
// G4cout << "MGP Gaussian: Tm = " << Tm << ", siga = " << siga << ", loss = " << loss << G4endl;
return loss ;
}
@@ -942,7 +950,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,G4int(RandGauss::shoot(a3,siga)+0.5));
p3 = G4std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
}
else p3 = G4Poisson(a3);
@@ -960,7 +968,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
if (Tm <= 0.)
{
loss = MeanLoss;
p3 = 0.;
p3 = 0;
// G4cout << "MGP correction loss = MeanLoss " << loss/keV << G4endl;
}
else
@@ -972,7 +980,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,G4int(RandGauss::shoot(a3,siga)+0.5));
p3 = G4std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
}
else
p3 = G4Poisson(a3);
@@ -1006,7 +1014,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
if(a1>alim)
{
siga=sqrt(a1) ;
p1 = G4std::max(0,int(RandGauss::shoot(a1,siga)+0.5));
p1 = G4std::max(0,int(G4RandGauss::shoot(a1,siga)+0.5));
}
else
p1 = G4Poisson(a1);
@@ -1015,7 +1023,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
if(a2>alim)
{
siga=sqrt(a2) ;
p2 = G4std::max(0,int(RandGauss::shoot(a2,siga)+0.5));
p2 = G4std::max(0,int(G4RandGauss::shoot(a2,siga)+0.5));
}
else
p2 = G4Poisson(a2);
@@ -1034,7 +1042,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,int(RandGauss::shoot(a3,siga)+0.5));
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
}
else
p3 = G4Poisson(a3);
@@ -1050,14 +1058,14 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
rfac = dp3/(G4double(nmaxCont2)+dp3);
namean = G4double(p3)*rfac;
sa = G4double(nmaxCont1)*rfac;
na = RandGauss::shoot(namean,sa);
na = G4RandGauss::shoot(namean,sa);
if (na > 0.)
{
alfa = w1*G4double(nmaxCont2+p3)/(w1*G4double(nmaxCont2)+G4double(p3));
alfa1 = alfa*log(alfa)/(alfa-1.);
ea = na*ipotFluct*alfa1;
sea = ipotFluct*sqrt(na*(alfa-alfa1*alfa1));
lossc += RandGauss::shoot(ea,sea);
lossc += G4RandGauss::shoot(ea,sea);
}
}
@@ -0,0 +1,75 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4VhElectronicStoppingPower
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Low energy hadrons/ions electronic stopping power parametrisation
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VhElectronicStoppingPower.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VhElectronicStoppingPower::G4VhElectronicStoppingPower():
theHeMassAMU(4.0026)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VhElectronicStoppingPower::~G4VhElectronicStoppingPower()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4VhElectronicStoppingPower::HeEffChargeSquare(
const G4double z,
const G4double kineticEnergyHe) const
{
// The aproximation of He effective charge from:
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
static G4double c[6] = {0.2865, 0.1266, -0.001429,
0.02402,-0.01135, 0.001475} ;
G4double e = log( G4std::max( 1.0, kineticEnergyHe/(keV*GetHeMassAMU()))) ;
G4double x = c[0] ;
G4double y = 1.0 ;
for (G4int i=1; i<6; i++) {
y *= e ;
x += y * c[i] ;
}
G4double w = 7.6 - e ;
w = 1.0 + (0.007 + 0.00005*z) * exp( -w*w ) ;
w = 4.0 * (1.0 - exp(-x)) * w * w ;
return w;
}
@@ -0,0 +1,47 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4VhNuclearStoppingPower
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Hadrons/ions nuclear stopping power parametrisation
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VhNuclearStoppingPower.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VhNuclearStoppingPower::G4VhNuclearStoppingPower() :
lossFlucFlag(true)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VhNuclearStoppingPower::~G4VhNuclearStoppingPower()
{;}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eLowEnergyLoss.cc,v 1.5 2000/06/22 02:38:13 pia Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4eLowEnergyLoss.cc,v 1.7 2000/09/20 16:49:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// -----------------------------------------------------------
// GEANT 4 class implementation file
@@ -33,6 +33,8 @@
// 20-01-99: important correction in AlongStepDoIt , L.Urban
// 10/02/00 modifications , new e.m. structure, L.Urban
// 11/04/00: Bug fix in dE/dx fluctuation simulation, Veronique Lefebure
// 19-09-00 change of fluctuation sampling V.Ivanchenko
// 20/09/00 update fluctuations V.Ivanchenko
// --------------------------------------------------------------
#include "G4eLowEnergyLoss.hh"
@@ -359,16 +361,10 @@ G4VParticleChange* G4eLowEnergyLoss::AlongStepDoIt( const G4Track& trackData,
MeanLoss = E-finalT ;
// G4cout << "MGP AlongStepDoIt finalT before fluct = " << finalT/keV << " keV" << G4endl;
G4double fluc = GetLossWithFluct(aParticle,aMaterial,MeanLoss);
// G4cout << "LowerBoundEloss = " << LowerBoundEloss/keV = << " Fluc = " << fluc/keV << G4endl;
//now the loss with fluctuation
if ((EnlossFlucFlag) && (finalT > 0.) && (finalT < E)&&(E > LowerBoundEloss))
{
finalT = E-GetLossWithFluct(aParticle,aMaterial,MeanLoss);
finalT = E-GetLossWithFluct(aParticle,aMaterial,MeanLoss,Step);
if (finalT < 0.) finalT = 0.;
}
@@ -0,0 +1,210 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hBetheBlochModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 03/10/2000 V.Ivanchenko clean up accoding to CodeWizard
//
// Class Description:
//
// Bethe-Bloch ionisation model
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hBetheBlochModel.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4Material.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hBetheBlochModel::G4hBetheBlochModel(const G4String& name)
: G4VLowEnergyModel(name),
twoln10(2.*log(10.)),
bg2lim(0.0169),
taulim(8.4146e-3)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hBetheBlochModel::~G4hBetheBlochModel()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::TheValue(const G4DynamicParticle* particle,
const G4Material* material)
{
G4double energy = particle->GetKineticEnergy() ;
G4double particleMass = particle->GetMass() ;
G4double eloss = BetheBlochFormula(material,energy,particleMass) ;
return eloss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
G4double particleMass = aParticle->GetPDGMass() ;
G4double eloss = BetheBlochFormula(material,kineticEnergy,particleMass) ;
return eloss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return highEnergyLimit ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
G4double taul = (material->GetIonisation()->GetTaul())*
(aParticle->GetPDGMass()) ;
return taul ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return highEnergyLimit ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return lowEnergyLimit ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hBetheBlochModel::IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hBetheBlochModel::IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hBetheBlochModel::BetheBlochFormula(
const G4Material* material,
G4double kineticEnergy,
G4double particleMass) const
{
// This member function is applied normally to proton/antiproton
G4double ionloss ;
G4double rateMass = electron_mass_c2/particleMass ;
G4double taul = material->GetIonisation()->GetTaul() ;
G4double tau = kineticEnergy/particleMass ; // tau is relative energy
// It is not normal case for this function
// for low energy parametrisation have to be applied
if ( tau < taul ) tau = taul ;
// some local variables
G4double gamma,bg2,beta2,tmax,x,delta,sh ;
G4double electronDensity = material->GetElectronDensity();
G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
G4double eexc2 = eexc*eexc ;
G4double cden = material->GetIonisation()->GetCdensity();
G4double mden = material->GetIonisation()->GetMdensity();
G4double aden = material->GetIonisation()->GetAdensity();
G4double x0den = material->GetIonisation()->GetX0density();
G4double x1den = material->GetIonisation()->GetX1density();
G4double* shellCorrectionVector =
material->GetIonisation()->GetShellCorrectionVector();
gamma = tau + 1.0 ;
bg2 = tau*(tau+2.0) ;
beta2 = bg2/(gamma*gamma) ;
tmax = 2.*electron_mass_c2*bg2/(1.+2.*gamma*rateMass+rateMass*rateMass) ;
ionloss = log(2.0*electron_mass_c2*bg2*tmax/eexc2)-2.0*beta2 ;
// density correction
x = log(bg2)/twoln10 ;
if ( x < x0den ) {
delta = 0.0 ;
} else {
delta = twoln10*x - cden ;
if ( x < x1den ) delta += aden*pow((x1den-x),mden) ;
}
// shell correction
sh = 0.0 ;
x = 1.0 ;
if ( bg2 > bg2lim ) {
for (G4int k=0; k<=2; k++) {
x *= bg2 ;
sh += shellCorrectionVector[k]/x;
}
} else {
for (G4int k=0; k<=2; k++) {
x *= bg2lim ;
sh += shellCorrectionVector[k]/x;
}
sh *= log(tau/taul)/log(taulim/taul) ;
}
// now compute the total ionization loss
ionloss -= delta + sh ;
ionloss *= twopi_mc2_rcl2*electronDensity/beta2 ;
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -0,0 +1,325 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hICRU49He
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 18/09/2000 V.Ivanchenko clean up - all variable are the same as in ICRU
// 03/10/2000 V.Ivanchenko clean up accoding to CodeWizard
//
// Class Description:
//
// Electronic stopping power parametrised according to
// ICRU Report N49, 1993. J.F. Ziegler model for He ion.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hICRU49He.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4Material.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hICRU49He::G4hICRU49He():G4VhElectronicStoppingPower(),
rateMass(4.0026/1.007276),
iMolecula(0)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hICRU49He::~G4hICRU49He()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hICRU49He::HasMaterial(const G4Material* material)
{
G4String chFormula = material->GetChemicalFormula() ;
G4String myFormula = G4String(" ");
if (myFormula == chFormula ) {
if(1 == (material->GetNumberOfElements())) {return true;}
return false ;
}
// ICRU Report N49, 1993. Power's model for He.
const size_t numberOfMolecula = 30 ;
static G4String name[numberOfMolecula] = {
"H_2", "Be-Solid", "C-Solid", "Graphite", "N_2",
"O_2", "Al-Solid", "Si-Solid", "Ar-Solid", "Cu-Solid",
"Ge", "W-Solid", "Au-Solid", "Pb-Solid", "C_2H_2",
"CO_2", "Cellulose-Nitrat", "C_2H_4", "LiF",
"CH_4", "Nylon", "Polycarbonate", "(CH_2)_N-Polyetilene", "PMMA",
"(C_8H_8)_N", "SiO_2", "CsI", "H_2O", "H_2O-Gas"} ;
// Special treatment for water in gas state
myFormula = G4String("H_2O") ;
const G4State theState = material->GetState() ;
if( theState == kStateGas && myFormula == chFormula) {
chFormula = G4String("H_2O-Gas");
}
G4int i;
// Search for the material in the table
for (i=0; i<numberOfMolecula; i++) {
if (chFormula == name[i]) {
SetMoleculaNumber(i) ;
return true ;
}
}
return false ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hICRU49He::StoppingPower(const G4Material* material,
G4double kineticEnergy)
{
G4double ionloss = 0.0 ;
// pure material (normally not the case for this function)
if(1 == (material->GetNumberOfElements())) {
G4double z = material->GetZ() ;
ionloss = ElectronicStoppingPower( z, kineticEnergy ) ;
// The data and the fit from:
// ICRU Report N49, 1993. Power's model for He.
} else if ( iMolecula < 30 ) {
// Reduced kinetic energy
// in internal units of parametrisation formula (MeV)
G4double T = kineticEnergy*rateMass/MeV ;
static G4double c[30][7] = {
8.0080, 3.6287, 23.0700, 14.9900, 0.8507, 0.60, 2.0
, 13.3100, 3.7432, 39.4130, 12.1990, 1.0950, 0.38, 1.4
, 22.7240, 3.6040, 47.1810, 17.5490, 0.9040, 0.40, 1.4
, 24.4040, 2.4032, 48.9440, 27.9730, 1.2933, 0.40, 1.6
, 58.4719, 1.5115, 77.6421, 102.490, 1.5811, 0.50, 2.0
, 60.5408, 1.6297, 91.7601, 94.1260, 1.3662, 0.50, 2.0
, 48.4480, 6.4323, 59.2890, 18.3810, 0.4937, 0.48, 1.6
, 59.0346, 5.1305, 47.0866, 30.0857, 0.3500, 0.60, 2.0
, 71.8691, 2.8250, 51.1658, 57.1235, 0.4477, 0.60, 2.0
, 78.3520, 4.0961, 136.731, 28.4470, 1.0621, 0.52, 1.2
, 120.553, 1.5374, 49.8740, 82.2980, 0.8733, 0.45, 1.6
, 249.896, 0.6996, -37.274, 248.592, 1.1052, 0.50, 1.5
, 246.698, 0.6219, -58.391, 292.921, 0.8186, 0.56, 1.8
, 248.563, 0.6235, -36.8968, 306.960, 1.3214, 0.50, 2.0
, 25.5860, 1.7125, 154.723, 118.620, 2.2580, 0.50, 2.0
, 138.294, 25.6413, 231.873, 17.3780, 0.3218, 0.58, 1.3
, 83.2091, 1.1294, 135.7457, 190.865, 2.3461, 0.50, 2.0
, 263.542, 1.4754, 1541.446, 781.898, 1.9209, 0.40, 2.0
, 59.5545, 1.5354, 132.1523, 153.3537, 2.0262, 0.50, 2.0
, 31.7380, 19.820, 125.2100, 6.8910, 0.7242, 0.50, 1.1
, 31.7549, 1.5682, 97.4777, 106.0774, 2.3204, 0.50, 2.0
, 230.465, 4.8967, 1845.320, 358.641, 1.0774, 0.46, 1.2
, 423.444, 5.3761, 1189.114, 319.030, 0.7652, 0.48, 1.5
, 86.3410, 3.3322, 91.0433, 73.1091, 0.4650, 0.50, 2.0
, 146.105, 9.4344, 515.1500, 82.8860, 0.6239, 0.55, 1.5
, 238.050, 5.6901, 372.3575, 146.1835, 0.3992, 0.50, 2.0
, 124.2338, 2.6730, 133.8175, 99.4109, 0.7776, 0.50, 2.0
, 221.723, 1.5415, 87.7315, 192.5266, 1.0742, 0.50, 2.0
, 26.7537, 1.3717, 90.8007, 77.1587, 2.3264, 0.50, 2.0
, 37.6121, 1.8052, 73.0250, 66.2070, 1.4038, 0.50, 2.0 };
G4double a1,a2 ;
// Free electron gas model
if ( T < 0.001 ) {
G4double T0 = 0.001 ;
a1 = 1.0 - exp(-c[iMolecula][1]*pow(T0,-2.0+c[iMolecula][5])) ;
a2 = (c[iMolecula][0]*log(T0)/T0 + c[iMolecula][2]/T0) *
exp(-c[iMolecula][4]*pow(T0,-c[iMolecula][6])) +
c[iMolecula][3]/(T0*T0) ;
ionloss *= sqrt(T/T0) ;
// Main parametrisation
} else {
a1 = 1.0 - exp(-c[iMolecula][1]*pow(T,-2.0+c[iMolecula][5])) ;
a2 = (c[iMolecula][0]*log(T)/T + c[iMolecula][2]/T) *
exp(-c[iMolecula][4]*pow(T,-c[iMolecula][6])) +
c[iMolecula][3]/(T*T) ;
}
// He effective charge
G4double z = (material->GetTotNbOfElectPerVolume()) /
(material->GetTotNbOfAtomsPerVolume()) ;
ionloss = a1*a2 / HeEffChargeSquare(z, T*keV) ;
if ( ionloss < 0.0) ionloss = 0.0 ;
}
return ionloss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hICRU49He::ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const
{
G4double ionloss ;
G4int i = G4int(z)-1 ; // index of atom
if(i < 0) i = 0 ;
if(i > 91) i = 91 ;
// The data and the fit from:
// ICRU Report 49, 1993. Ziegler's type of parametrisations
// Reduced kinetic energy
// He energy in internal units of parametrisation formula (MeV)
G4double T = kineticEnergy*rateMass/MeV ;
static G4double a[92][5] = {
0.35485, 0.6456, 6.01525, 20.8933, 4.3515
, 0.58, 0.59, 6.3, 130.0, 44.07
, 1.42, 0.49, 12.25, 32.0, 9.161
, 2.1895, 0.47183,7.2362, 134.30, 197.96
, 3.691, 0.4128, 18.48, 50.72, 9.0
, 3.83523, 0.42993,12.6125, 227.41, 188.97
, 1.9259, 0.5550, 27.15125, 26.0665, 6.2768
, 2.81015, 0.4759, 50.0253, 10.556, 1.0382
, 1.533, 0.531, 40.44, 18.41, 2.718
, 2.303, 0.4861, 37.01, 37.96, 5.092
, 9.894, 0.3081, 23.65, 0.384, 92.93
, 4.3, 0.47, 34.3, 3.3, 12.74
, 2.5, 0.625, 45.7, 0.1, 4.359
, 2.1, 0.65, 49.34, 1.788, 4.133
, 1.729, 0.6562, 53.41, 2.405, 3.845
, 1.402, 0.6791, 58.98, 3.528, 3.211
, 1.117, 0.7044, 69.69, 3.705, 2.156
, 2.291, 0.6284, 73.88, 4.478, 2.066
, 8.554, 0.3817, 83.61, 11.84, 1.875
, 6.297, 0.4622, 65.39, 10.14, 5.036
, 5.307, 0.4918, 61.74, 12.4, 6.665
, 4.71, 0.5087, 65.28, 8.806, 5.948
, 6.151, 0.4524, 83.0, 18.31, 2.71
, 6.57, 0.4322, 84.76, 15.53, 2.779
, 5.738, 0.4492, 84.6, 14.18, 3.101
, 5.013, 0.4707, 85.8, 16.55, 3.211
, 4.32, 0.4947, 76.14, 10.85, 5.441
, 4.652, 0.4571, 80.73, 22.0, 4.952
, 3.114, 0.5236, 76.67, 7.62, 6.385
, 3.114, 0.5236, 76.67, 7.62, 7.502
, 3.114, 0.5236, 76.67, 7.62, 8.514
, 5.746, 0.4662, 79.24, 1.185, 7.993
, 2.792, 0.6346, 106.1, 0.2986, 2.331
, 4.667, 0.5095, 124.3, 2.102, 1.667
, 2.44, 0.6346, 105.0, 0.83, 2.851
, 1.413, 0.7377, 147.9, 1.466, 1.016
, 11.72, 0.3826, 102.8, 9.231, 4.371
, 7.126, 0.4804, 119.3, 5.784, 2.454
, 11.61, 0.3955, 146.7, 7.031, 1.423
, 10.99, 0.41, 163.9, 7.1, 1.052
, 9.241, 0.4275, 163.1, 7.954, 1.102
, 9.276, 0.418, 157.1, 8.038, 1.29
, 3.999, 0.6152, 97.6, 1.297, 5.792
, 4.306, 0.5658, 97.99, 5.514, 5.754
, 3.615, 0.6197, 86.26, 0.333, 8.689
, 5.8, 0.49, 147.2, 6.903, 1.289
, 5.6, 0.49, 130.0, 10.0, 2.844
, 3.55, 0.6068, 124.7, 1.112, 3.119
, 3.6, 0.62, 105.8, 0.1692, 6.026
, 5.4, 0.53, 103.1, 3.931, 7.767
, 3.97, 0.6459, 131.8, 0.2233, 2.723
, 3.65, 0.64, 126.8, 0.6834, 3.411
, 3.118, 0.6519, 164.9, 1.208, 1.51
, 3.949, 0.6209, 200.5, 1.878, 0.9126
, 14.4, 0.3923, 152.5, 8.354, 2.597
, 10.99, 0.4599, 138.4, 4.811, 3.726
, 16.6, 0.3773, 224.1, 6.28, 0.9121
, 10.54, 0.4533, 159.3, 4.832, 2.529
, 10.33, 0.4502, 162.0, 5.132, 2.444
, 10.15, 0.4471, 165.6, 5.378, 2.328
, 9.976, 0.4439, 168.0, 5.721, 2.258
, 9.804, 0.4408, 176.2, 5.675, 1.997
, 14.22, 0.363, 228.4, 7.024, 1.016
, 9.952, 0.4318, 233.5, 5.065, 0.9244
, 9.272, 0.4345, 210.0, 4.911, 1.258
, 10.13, 0.4146, 225.7, 5.525, 1.055
, 8.949, 0.4304, 213.3, 5.071, 1.221
, 11.94, 0.3783, 247.2, 6.655, 0.849
, 8.472, 0.4405, 195.5, 4.051, 1.604
, 8.301, 0.4399, 203.7, 3.667, 1.459
, 6.567, 0.4858, 193.0, 2.65, 1.66
, 5.951, 0.5016, 196.1, 2.662, 1.589
, 7.495, 0.4523, 251.4, 3.433, 0.8619
, 6.335, 0.4825, 255.1, 2.834, 0.8228
, 4.314, 0.5558, 214.8, 2.354, 1.263
, 4.02, 0.5681, 219.9, 2.402, 1.191
, 3.836, 0.5765, 210.2, 2.742, 1.305
, 4.68, 0.5247, 244.7, 2.749, 0.8962
, 3.223, 0.5883, 232.7, 2.954, 1.05
, 2.892, 0.6204, 208.6, 2.415, 1.416
, 4.728, 0.5522, 217.0, 3.091, 1.386
, 6.18, 0.52, 170.0, 4.0, 3.224
, 9.0, 0.47, 198.0, 3.8, 2.032
, 2.324, 0.6997, 216.0, 1.599, 1.399
, 1.961, 0.7286, 223.0, 1.621, 1.296
, 1.75, 0.7427, 350.1, 0.9789, 0.5507
, 10.31, 0.4613, 261.2, 4.738, 0.9899
, 7.962, 0.519, 235.7, 4.347, 1.313
, 6.227, 0.5645, 231.9, 3.961, 1.379
, 5.246, 0.5947, 228.6, 4.027, 1.432
, 5.408, 0.5811, 235.7, 3.961, 1.358
, 5.218, 0.5828, 245.0, 3.838, 1.25
};
// Free electron gas model
if ( T < 0.001 ) {
G4double slow = a[i][0] ;
G4double shigh = log( 1.0 + a[i][3]*1000.0 + a[i][4]*0.001 )
* a[i][2]*1000.0 ;
ionloss = slow*shigh / (slow + shigh) ;
ionloss *= sqrt(T*1000.0) ;
// Main parametrisation
} else {
G4double slow = a[i][0] * pow((T*1000.0), a[i][1]) ;
G4double shigh = log( 1.0 + a[i][3]/T + a[i][4]*T ) * a[i][2]/T ;
ionloss = slow*shigh / (slow + shigh) ;
}
if ( ionloss < 0.0) ionloss = 0.0 ;
// He effective charge
ionloss /= HeEffChargeSquare(z, T*MeV) ;
return ionloss;
}
@@ -0,0 +1,212 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hICRU49Nuclear
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Nuclear stopping power parametrised according to
// ICRU Report N49, 1993. Moliere model.
// G.Moliere "Theorie der Streuung schneller geladener Teilchen I;
// Einzelstreuungam abbgeschirmten Coulomb-Feld" Z. f. Naturforsch, A2,
// 133 (1947).
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hICRU49Nuclear.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hICRU49Nuclear::G4hICRU49Nuclear():G4VhNuclearStoppingPower()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hICRU49Nuclear::~G4hICRU49Nuclear()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hICRU49Nuclear::NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const
{
G4double energy = kineticEnergy/keV ; // energy in keV
G4double ionloss ;
G4double rm = (m1 + m2) * sqrt( pow(z1, .23) + pow(z2, .23) ) ;
G4double er = 32.536 * m2 * energy / ( z1 * z2 * rm ) ; // reduced energy
static G4double a[104][2] = {
1.0E+8, 5.831E-8,
8.0E+7, 7.288E-8,
6.0E+7, 9.719E-8,
5.0E+7, 1.166E-7,
4.0E+7, 1.457E-7,
3.0E+7, 1.942E-7,
2.0E+7, 2.916E-7,
1.5E+7, 3.887E-7,
1.0E+7, 5.833E-7,
8.0E+6, 7.287E-7,
6.0E+6, 9.712E-7,
5.0E+6, 1.166E-6,
4.0E+6, 1.457E-6,
3.0E+6, 1.941E-6,
2.0E+6, 2.911E-6,
1.5E+6, 3.878E-6,
1.0E+6, 5.810E-6,
8.0E+5, 7.262E-6,
6.0E+5, 9.663E-6,
5.0E+5, 1.157E-5,
4.0E+5, 1.442E-5,
3.0E+5, 1.913E-5,
2.0E+5, 2.845E-5,
1.5E+5, 3.762E-5,
1.0E+5, 5.554E-5,
8.0E+4, 6.866E-5,
6.0E+4, 9.020E-5,
5.0E+4, 1.070E-4,
4.0E+4, 1.319E-4,
3.0E+4, 1.722E-4,
2.0E+4, 2.499E-4,
1.5E+4, 3.248E-4,
1.0E+4, 4.688E-4,
8.0E+3, 5.729E-4,
6.0E+3, 7.411E-4,
5.0E+3, 8.718E-4,
4.0E+3, 1.063E-3,
3.0E+3, 1.370E-3,
2.0E+3, 1.955E-3,
1.5E+3, 2.511E-3,
1.0E+3, 3.563E-3,
8.0E+2, 4.314E-3,
6.0E+2, 5.511E-3,
5.0E+2, 6.430E-3,
4.0E+2, 7.756E-3,
3.0E+2, 9.855E-3,
2.0E+2, 1.375E-2,
1.5E+2, 1.736E-2,
1.0E+2, 2.395E-2,
8.0E+1, 2.850E-2,
6.0E+1, 3.552E-2,
5.0E+1, 4.073E-2,
4.0E+1, 4.802E-2,
3.0E+1, 5.904E-2,
1.5E+1, 9.426E-2,
1.0E+1, 1.210E-1,
8.0E+0, 1.377E-1,
6.0E+0, 1.611E-1,
5.0E+0, 1.768E-1,
4.0E+0, 1.968E-1,
3.0E+0, 2.235E-1,
2.0E+0, 2.613E-1,
1.5E+0, 2.871E-1,
1.0E+0, 3.199E-1,
8.0E-1, 3.354E-1,
6.0E-1, 3.523E-1,
5.0E-1, 3.609E-1,
4.0E-1, 3.693E-1,
3.0E-1, 3.766E-1,
2.0E-1, 3.803E-1,
1.5E-1, 3.788E-1,
1.0E-1, 3.711E-1,
8.0E-2, 3.644E-1,
6.0E-2, 3.530E-1,
5.0E-2, 3.444E-1,
4.0E-2, 3.323E-1,
3.0E-2, 3.144E-1,
2.0E-2, 2.854E-1,
1.5E-2, 2.629E-1,
1.0E-2, 2.298E-1,
8.0E-3, 2.115E-1,
6.0E-3, 1.883E-1,
5.0E-3, 1.741E-1,
4.0E-3, 1.574E-1,
3.0E-3, 1.372E-1,
2.0E-3, 1.116E-1,
1.5E-3, 9.559E-2,
1.0E-3, 7.601E-2,
8.0E-4, 6.668E-2,
6.0E-4, 5.605E-2,
5.0E-4, 5.008E-2,
4.0E-4, 4.352E-2,
3.0E-4, 3.617E-2,
2.0E-4, 2.768E-2,
1.5E-4, 2.279E-2,
1.0E-4, 1.723E-2,
8.0E-5, 1.473E-2,
6.0E-5, 1.200E-2,
5.0E-5, 1.052E-2,
4.0E-5, 8.950E-3,
3.0E-5, 7.246E-3,
2.0E-5, 5.358E-3,
1.5E-5, 4.313E-3,
0.0, 3.166E-3
};
for (G4int i=1; i<104; i++)
{
if (er > a[i][0]) {
ionloss =
(a[i][1]-a[i-1][1])*(er-a[i-1][0])/(a[i][0]-a[i-1][0])+a[i-1][1];
break;
}
}
// Stragling
if(lossFlucFlag) {
G4double sig = 4.0 * m1 * m2 / ((m1 + m2)*(m1 + m2)*
(4.0 + 0.197*pow(er,-1.6991)+6.584*pow(er,-1.0494))) ;
ionloss *= G4RandGauss::shoot(1.0,sig) ;
}
ionloss *= 8.462 * z1 * z2 * m1 / rm ; // Return to [ev/(10^15 atoms/cm^2]
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -0,0 +1,298 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hICRU49p
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 18/09/2000 V.Ivanchenko clean up - all variable are the same as in ICRU
// 03/10/2000 V.Ivanchenko clean up accoding to CodeWizard
//
// Class Description:
//
// Electronic stopping power parametrised according to
// ICRU Report N49, 1993, for protons.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hICRU49p.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4Material.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hICRU49p::G4hICRU49p():G4VhElectronicStoppingPower(),
protonMassAMU(1.007276),
iMolecula(0)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hICRU49p::~G4hICRU49p()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hICRU49p::HasMaterial(const G4Material* material)
{
G4String chFormula = material->GetChemicalFormula() ;
G4String myFormula = G4String(" ") ;
if (myFormula == chFormula ) {
if(1 == (material->GetNumberOfElements())) return true;
return false ;
}
// ICRU Report N49, 1993. Power's model for He.
const size_t numberOfMolecula = 11 ;
static G4String name[numberOfMolecula] = {
"Al_2O_3", "CO_2", "CH_4",
"(C_2H_4)_N-Polyethylene", "(C_2H_4)_N-Polypropylene", "(C_8H_8)_N",
"C_3H_8", "SiO_2", "H_2O",
"H_2O-Gas", "Graphite" } ;
// Special treatment for water in gas state
const G4State theState = material->GetState() ;
myFormula = G4String("H_2O");
if( theState == kStateGas && myFormula == chFormula) {
chFormula = G4String("H_2O-Gas");
}
G4int i;
// Search for the material in the table
for (i=0; i<numberOfMolecula; i++) {
if (chFormula == name[i]) {
SetMoleculaNumber(i) ;
return true ;
}
}
return false ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hICRU49p::StoppingPower(const G4Material* material,
G4double kineticEnergy)
{
G4double ionloss = 0.0 ;
// pure material (normally not the case for this function)
if(1 == (material->GetNumberOfElements())) {
G4double z = material->GetZ() ;
G4double ionloss = ElectronicStoppingPower( z, kineticEnergy ) ;
} else if (iMolecula < 11) {
// The data and the fit from:
// ICRU Report N49, 1993. Ziegler's model for protons.
// Proton kinetic energy for parametrisation (keV/amu)
G4double T = kineticEnergy/(keV*protonMassAMU) ;
static G4double a[11][5] = {
1.187E+1, 1.343E+1, 1.069E+4, 7.723E+2, 2.153E-2,
7.802E+0, 8.814E+0, 8.303E+3, 7.446E+2, 7.966E-3,
7.294E+0, 8.284E+0, 5.010E+3, 4.544E+2, 8.153E-3,
8.646E+0, 9.800E+0, 7.066E+3, 4.581E+2, 9.383E-3,
1.286E+1, 1.462E+1, 5.625E+3, 2.621E+3, 3.512E-2,
3.229E+1, 3.696E+1, 8.918E+3, 3.244E+3, 1.273E-1,
1.604E+1, 1.825E+1, 6.967E+3, 2.307E+3, 3.775E-2,
8.049E+0, 9.099E+0, 9.257E+3, 3.846E+2, 1.007E-2,
4.015E+0, 4.542E+0, 3.955E+3, 4.847E+2, 7.904E-3,
4.571E+0, 5.173E+0, 4.346E+3, 4.779E+2, 8.572E-3,
2.631E+0, 2.601E+0, 1.701E+3, 1.279E+3, 1.638E-2 };
if ( T < 10.0 ) {
ionloss = a[iMolecula][0] * sqrt(T) ;
} else if ( T < 10000.0 ) {
G4double slow = a[iMolecula][1] * pow(T, 0.45) ;
G4double shigh = log( 1.0 + a[iMolecula][3]/T
+ a[iMolecula][4]*T ) * a[iMolecula][2]/T ;
ionloss = slow*shigh / (slow + shigh) ;
}
if ( ionloss < 0.0) ionloss = 0.0 ;
/////////////////////////////////////////////////////////////////
// Graphite may be implemented in a very approximate way (scaling
// amorphous results according to rough fits to ICRU tables of results:
// 1-100 keV: *(1+0.023+0.0066*log10(E))
// 100-700 keV: *(1+0.089-0.0248*log10(E-99.))
// 700-10000 keV: *(1+0.089-0.0248*log10(700.-99.))
// continuity is (should!) be garanteed, but not continuity of the
// first derivative. A better fit is in order!
if ( 10 == iMolecula ) {
if (T < 100.0) {
ionloss *= (1.0+0.023+0.0066*log10(T));
}
else if (T < 700.0) {
ionloss *=(1.0+0.089-0.0248*log10(T-99.));
}
else if (T < 10000.0) {
ionloss *=(1.0+0.089-0.0248*log10(700.-99.));
}
}
}
return ionloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hICRU49p::ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const
{
G4double ionloss ;
G4int i = G4int(z)-1 ; // index of atom
if(i < 0) i = 0 ;
if(i > 91) i = 91 ;
// The data and the fit from:
// ICRU Report 49, 1993. Ziegler's type of parametrisations.
// Proton kinetic energy for parametrisation (keV/amu)
G4double T = kineticEnergy/(keV*protonMassAMU) ;
static G4double a[92][5] = {
1.254E+0, 1.440E+0, 2.426E+2, 1.200E+4, 1.159E-1,
1.229E+0, 1.397E+0, 4.845E+2, 5.873E+3, 5.225E-2,
1.411E+0, 1.600E+0, 7.256E+2, 3.013E+3, 4.578E-2,
2.248E+0, 2.590E+0, 9.660E+2, 1.538E+2, 3.475E-2,
2.474E+0, 2.815E+0, 1.206E+3, 1.060E+3, 2.855E-2,
2.631E+0, 2.601E+0, 1.701E+3, 1.279E+3, 1.638E-2,
2.954E+0, 3.350E+0, 1.683E+3, 1.900E+3, 2.513E-2,
2.652E+0, 3.000E+0, 1.920E+3, 2.000E+3, 2.230E-2,
2.085E+0, 2.352E+0, 2.157E+3, 2.634E+3, 1.816E-2,
1.951E+0, 2.199E+0, 2.393E+3, 2.699E+3, 1.568E-2,
2.542E+0, 2.869E+0, 2.628E+3, 1.854E+3, 1.472E-2,
3.791E+0, 4.293E+0, 2.862E+3, 1.009E+3, 1.397E-2,
4.154E+0, 4.739E+0, 2.766E+3, 1.645E+2, 2.023E-2,
4.914E+0, 5.598E+0, 3.193E+3, 2.327E+2, 1.419E-2,
3.232E+0, 3.647E+0, 3.561E+3, 1.560E+3, 1.267E-2,
3.447E+0, 3.891E+0, 3.792E+3, 1.219E+3, 1.211E-2,
5.301E+0, 6.008E+0, 3.969E+3, 6.451E+2, 1.183E-2,
5.731E+0, 6.500E+0, 4.253E+3, 5.300E+2, 1.123E-2,
5.152E+0, 5.833E+0, 4.482E+3, 5.457E+2, 1.129E-2,
5.521E+0, 6.252E+0, 4.710E+3, 5.533E+2, 1.112E-2,
5.201E+0, 5.884E+0, 4.938E+3, 5.609E+2, 9.995E-3,
4.858E+0, 5.489E+0, 5.260E+3, 6.511E+2, 8.930E-3,
4.479E+0, 5.055E+0, 5.391E+3, 9.523E+2, 9.117E-3,
3.983E+0, 4.489E+0, 5.616E+3, 1.336E+3, 8.413E-3,
3.469E+0, 3.907E+0, 5.725E+3, 1.461E+3, 8.829E-3,
3.519E+0, 3.963E+0, 6.065E+3, 1.243E+3, 7.782E-3,
3.140E+0, 3.535E+0, 6.288E+3, 1.372E+3, 7.361E-3,
3.553E+0, 4.004E+0, 6.205E+3, 5.551E+2, 8.763E-3,
3.696E+0, 4.194E+0, 4.649E+3, 8.113E+1, 2.242E-2,
4.210E+0, 4.750E+0, 6.953E+3, 2.952E+2, 6.809E-3,
5.041E+0, 5.697E+0, 7.173E+3, 2.026E+2, 6.725E-3,
5.554E+0, 6.300E+0, 6.496E+3, 1.100E+2, 9.689E-3,
5.323E+0, 6.012E+0, 7.611E+3, 2.925E+2, 6.447E-3,
5.874E+0, 6.656E+0, 7.395E+3, 1.175E+2, 7.684E-3,
6.658E+0, 7.536E+0, 7.694E+3, 2.223E+2, 6.509E-3,
6.413E+0, 7.240E+0, 1.185E+4, 1.537E+2, 2.880E-3,
5.694E+0, 6.429E+0, 8.478E+3, 2.929E+2, 6.087E-3,
6.339E+0, 7.159E+0, 8.693E+3, 3.303E+2, 6.003E-3,
6.407E+0, 7.234E+0, 8.907E+3, 3.678E+2, 5.889E-3,
6.734E+0, 7.603E+0, 9.120E+3, 4.052E+2, 5.765E-3,
6.901E+0, 7.791E+0, 9.333E+3, 4.427E+2, 5.587E-3,
6.424E+0, 7.248E+0, 9.545E+3, 4.802E+2, 5.376E-3,
6.799E+0, 7.671E+0, 9.756E+3, 5.176E+2, 5.315E-3,
6.109E+0, 6.887E+0, 9.966E+3, 5.551E+2, 5.151E-3,
5.924E+0, 6.677E+0, 1.018E+4, 5.925E+2, 4.919E-3,
5.238E+0, 5.900E+0, 1.038E+4, 6.300E+2, 4.758E-3,
5.345E+0, 6.038E+0, 6.790E+3, 3.978E+2, 1.676E-2,
5.814E+0, 6.554E+0, 1.080E+4, 3.555E+2, 4.626E-3,
6.229E+0, 7.024E+0, 1.101E+4, 3.709E+2, 4.540E-3,
6.409E+0, 7.227E+0, 1.121E+4, 3.864E+2, 4.474E-3,
7.500E+0, 8.480E+0, 8.608E+3, 3.480E+2, 9.074E-3,
6.979E+0, 7.871E+0, 1.162E+4, 3.924E+2, 4.402E-3,
7.725E+0, 8.716E+0, 1.183E+4, 3.948E+2, 4.376E-3,
8.337E+0, 9.425E+0, 1.051E+4, 2.696E+2, 6.206E-3,
7.287E+0, 8.218E+0, 1.223E+4, 3.997E+2, 4.447E-3,
7.899E+0, 8.911E+0, 1.243E+4, 4.021E+2, 4.511E-3,
8.041E+0, 9.071E+0, 1.263E+4, 4.045E+2, 4.540E-3,
7.488E+0, 8.444E+0, 1.283E+4, 4.069E+2, 4.420E-3,
7.291E+0, 8.219E+0, 1.303E+4, 4.093E+2, 4.298E-3,
7.098E+0, 8.000E+0, 1.323E+4, 4.118E+2, 4.182E-3,
6.909E+0, 7.786E+0, 1.343E+4, 4.142E+2, 4.058E-3,
6.728E+0, 7.580E+0, 1.362E+4, 4.166E+2, 3.976E-3,
6.551E+0, 7.380E+0, 1.382E+4, 4.190E+2, 3.877E-3,
6.739E+0, 7.592E+0, 1.402E+4, 4.214E+2, 3.863E-3,
6.212E+0, 6.996E+0, 1.421E+4, 4.239E+2, 3.725E-3,
5.517E+0, 6.210E+0, 1.440E+4, 4.263E+2, 3.632E-3,
5.220E+0, 5.874E+0, 1.460E+4, 4.287E+2, 3.498E-3,
5.071E+0, 5.706E+0, 1.479E+4, 4.330E+2, 3.405E-3,
4.926E+0, 5.542E+0, 1.498E+4, 4.335E+2, 3.342E-3,
4.788E+0, 5.386E+0, 1.517E+4, 4.359E+2, 3.292E-3,
4.893E+0, 5.505E+0, 1.536E+4, 4.384E+2, 3.243E-3,
5.028E+0, 5.657E+0, 1.555E+4, 4.408E+2, 3.195E-3,
4.738E+0, 5.329E+0, 1.574E+4, 4.432E+2, 3.186E-3,
4.587E+0, 5.160E+0, 1.541E+4, 4.153E+2, 3.406E-3,
5.201E+0, 5.851E+0, 1.612E+4, 4.416E+2, 3.122E-3,
5.071E+0, 5.704E+0, 1.630E+4, 4.409E+2, 3.082E-3,
4.946E+0, 5.563E+0, 1.649E+4, 4.401E+2, 2.965E-3,
4.477E+0, 5.034E+0, 1.667E+4, 4.393E+2, 2.871E-3,
4.844E+0, 5.458E+0, 7.852E+3, 9.758E+2, 2.077E-2,
4.307E+0, 4.843E+0, 1.704E+4, 4.878E+2, 2.882E-3,
4.723E+0, 5.311E+0, 1.722E+4, 5.370E+2, 2.913E-3,
5.319E+0, 5.982E+0, 1.740E+4, 5.863E+2, 2.871E-3,
5.956E+0, 6.700E+0, 1.780E+4, 6.770E+2, 2.660E-3,
6.158E+0, 6.928E+0, 1.777E+4, 5.863E+2, 2.812E-3,
6.203E+0, 6.979E+0, 1.795E+4, 5.863E+2, 2.776E-3,
6.181E+0, 6.954E+0, 1.812E+4, 5.863E+2, 2.748E-3,
6.949E+0, 7.820E+0, 1.830E+4, 5.863E+2, 2.737E-3,
7.506E+0, 8.448E+0, 1.848E+4, 5.863E+2, 2.727E-3,
7.648E+0, 8.609E+0, 1.866E+4, 5.863E+2, 2.697E-3,
7.711E+0, 8.679E+0, 1.883E+4, 5.863E+2, 2.641E-3,
7.407E+0, 8.336E+0, 1.901E+4, 5.863E+2, 2.603E-3,
7.290E+0, 8.204E+0, 1.918E+4, 5.863E+2, 2.673E-3
};
G4double fac = 1.0 ;
// Carbon specific case for E < 40 keV
if ( T < 40.0 && 5 == i) {
fac = sqrt(T/40.0) ;
T = 40.0 ;
// Free electron gas model
} else if ( T < 10.0 ) {
fac = sqrt(T*0.1) ;
T =10.0 ;
}
// Main parametrisation
G4double slow = a[i][1] * pow(T, 0.45) ;
G4double shigh = log( 1.0 + a[i][3]/T + a[i][4]*T ) * a[i][2]/T ;
ionloss = slow*shigh*fac / (slow + shigh) ;
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -0,0 +1,268 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hIonEffChargeSquare
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Ion effective charge model
// J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
// Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hIonEffChargeSquare.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4Material.hh"
#include "G4Element.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hIonEffChargeSquare::G4hIonEffChargeSquare(const G4String& name)
: G4VLowEnergyModel(name),
theHeMassAMU(4.0026)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hIonEffChargeSquare::~G4hIonEffChargeSquare()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::TheValue(const G4DynamicParticle* particle,
const G4Material* material)
{
G4double energy = particle->GetKineticEnergy() ;
G4double particleMass = particle->GetMass() ;
G4double charge = (particle->GetCharge())/eplus ;
G4double q = IonEffChargeSquare(material,energy,particleMass,charge) ;
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::TheValue(const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
// SetRateMass(aParticle) ;
G4double particleMass = aParticle->GetPDGMass() ;
G4double charge = (aParticle->GetPDGCharge())/eplus ;
G4double q = IonEffChargeSquare(material,kineticEnergy,particleMass,charge) ;
return q ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::HighEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 1.0*TeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::LowEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return 0.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::HighEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 1.0*TeV ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::LowEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return 0.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hIonEffChargeSquare::IsInCharge(const G4DynamicParticle* particle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hIonEffChargeSquare::IsInCharge(const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return true ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hIonEffChargeSquare::IonEffChargeSquare(
const G4Material* material,
G4double kineticEnergy,
G4double particleMass,
G4double ionCharge) const
{
// The aproximation of ion effective charge from:
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
// Fast ions or hadrons
G4double reducedEnergy = kineticEnergy * proton_mass_c2/particleMass ;
if( (reducedEnergy > ionCharge * 10.0 * MeV) ||
(ionCharge < 1.5) ) return ionCharge*ionCharge ;
static G4double vFermi[92] = {
1.0309, 0.15976, 0.59782, 1.0781, 1.0486, 1.0, 1.058, 0.93942, 0.74562, 0.3424,
0.45259, 0.71074, 0.90519, 0.97411, 0.97184, 0.89852, 0.70827, 0.39816, 0.36552, 0.62712,
0.81707, 0.9943, 1.1423, 1.2381, 1.1222, 0.92705, 1.0047, 1.2, 1.0661, 0.97411,
0.84912, 0.95, 1.0903, 1.0429, 0.49715, 0.37755, 0.35211, 0.57801, 0.77773, 1.0207,
1.029, 1.2542, 1.122, 1.1241, 1.0882, 1.2709, 1.2542, 0.90094, 0.74093, 0.86054,
0.93155, 1.0047, 0.55379, 0.43289, 0.32636, 0.5131, 0.695, 0.72591, 0.71202, 0.67413,
0.71418, 0.71453, 0.5911, 0.70263, 0.68049, 0.68203, 0.68121, 0.68532, 0.68715, 0.61884,
0.71801, 0.83048, 1.1222, 1.2381, 1.045, 1.0733, 1.0953, 1.2381, 1.2879, 0.78654,
0.66401, 0.84912, 0.88433, 0.80746, 0.43357, 0.41923, 0.43638, 0.51464, 0.73087, 0.81065,
1.9578, 1.0257} ;
static G4double lFactor[92] = {
1.0, 1.0, 1.1, 1.06, 1.01, 1.03, 1.04, 0.99, 0.95, 0.9,
0.82, 0.81, 0.83, 0.88, 1.0, 0.95, 0.97, 0.99, 0.98, 0.97,
0.98, 0.97, 0.96, 0.93, 0.91, 0.9, 0.88, 0.9, 0.9, 0.9,
0.9, 0.85, 0.9, 0.9, 0.91, 0.92, 0.9, 0.9, 0.9, 0.9,
0.9, 0.88, 0.9, 0.88, 0.88, 0.9, 0.9, 0.88, 0.9, 0.9,
0.9, 0.9, 0.96, 1.2, 0.9, 0.88, 0.88, 0.85, 0.9, 0.9,
0.92, 0.95, 0.99, 1.03, 1.05, 1.07, 1.08, 1.1, 1.08, 1.08,
1.08, 1.08, 1.09, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15,
1.17, 1.2, 1.18, 1.17, 1.17, 1.16, 1.16, 1.16, 1.16, 1.16,
1.16, 1.16} ;
static G4double c[6] = {0.2865, 0.1266, -0.001429,
0.02402,-0.01135, 0.001475} ;
// get elements in the actual material,
const G4ElementVector* theElementVector = material->GetElementVector() ;
const G4double* theAtomicNumDensityVector =
material->GetAtomicNumDensityVector() ;
const G4int NumberOfElements = material->GetNumberOfElements() ;
// loop for the elements in the material
// to find out average values Z, vF, lF
G4double z = 0.0, vF = 0.0, lF = 0.0, norm = 0.0 ;
if( 1 == NumberOfElements ) {
z = material->GetZ() ;
G4int iz = G4int(z) - 1 ;
if(iz < 0) iz = 0 ;
else if(iz > 91) iz = 91 ;
vF = vFermi[iz] ;
lF = lFactor[iz] ;
} else {
for (G4int iel=0; iel<NumberOfElements; iel++)
{
const G4Element* element = (*theElementVector)(iel) ;
G4double z2 = element->GetZ() ;
const G4double weight = theAtomicNumDensityVector[iel] ;
norm += weight ;
z += z2 * weight ;
G4int iz = G4int(z2) - 1 ;
if(iz < 0) iz = 0 ;
else if(iz > 91) iz =91 ;
vF += vFermi[iz] * weight ;
lF += lFactor[iz] * weight ;
}
z /= norm ;
vF /= norm ;
lF /= norm ;
}
G4double w, q ;
// Helium ion case
if( ionCharge < 2.5 ) {
G4double e = log(G4std::max(1.0, kineticEnergy / (keV*theHeMassAMU) )) ;
G4double x = c[0] ;
G4double y = 1.0 ;
for (G4int i=1; i<6; i++) {
y *= e ;
x += y * c[i] ;
}
q = 7.6 - e ;
q = 1.0 + ( 0.007 + 0.00005 * z ) * exp( -q*q ) ;
return 4.0 * q * q * (1.0 - exp(-x)) ;
// Heavy ion case
} else {
// v1 is ion velocity in vF unit
G4double v1 = sqrt( reducedEnergy / (25.0 * keV) )/ vF ;
G4double y ;
G4double z13 = pow(ionCharge, 0.3333) ;
// Faster than Fermi velocity
if ( v1 > 1.0 ) {
y = vF * v1 * ( 1.0 + 0.2 / (v1*v1) ) / (z13*z13) ;
// Slower than Fermi velocity
} else {
y = 0.75 * vF * (1.0 + 2.0*v1*v1/3.0 + v1*v1*v1*v1/15.0) / (z13*z13) ;
}
G4double y3 = pow(y, 0.3) ;
G4double q = 1.0 - exp( 0.803*y3 - 1.3167*y3*y3 -
0.38157*y - 0.008983*y*y ) ;
if( q < 0.0 ) q = 0.0 ;
G4double s = 7.6 - log(G4std::max(1.0, reducedEnergy/keV)) ;
s = 1.0 + ( 0.18 + 0.0015 * z ) * exp( -s*s )/ (ionCharge*ionCharge) ;
// Screen length according to
// J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
// Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
G4double lambda = 10.0 * vF * pow(1.0-q, 0.6667) / (z13 * (6.0 + q)) ;
G4double qeff = ionCharge * s *
( q + 0.5*(1.0-q) * log(1.0 + lambda*lambda) / (vF*vF) ) ;
if( 1.0 > qeff ) qeff = 1.0 ;
return qeff*qeff ;
}
}
File diff suppressed because it is too large Load Diff
@@ -5,15 +5,14 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4hLowEnergyLoss.cc,v 1.1 2000/03/31 15:15:22 vnivanch Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4hLowEnergyLoss.cc,v 1.8 2000/11/05 12:17:06 vnivanch Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// -----------------------------------------------------------
// GEANT 4 class implementation file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// GEANT4 Collaboration
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4hEnergyLoss physics process -----------
@@ -28,13 +27,17 @@
// 22/10/98 : cleanup , L.Urban
// 07/12/98 : works for ions as well+ bug corrected, L.Urban
// 02/02/99 : several bugs fixed, L.Urban
// 31/03/00 : rename to lowenergy subdirectory as G4hLowEnergyLoss.cc V.Ivanchenko
// 31/03/00 : rename to lowenergy as G4hLowEnergyLoss.cc V.Ivanchenko
// 05/11/00 : new method to calculate particle ranges
// --------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hLowEnergyLoss.hh"
#include "G4EnergyLossTables.hh"
#include "G4Poisson.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Initialisation of static members ******************************************
// contributing processes : ion.loss ->NumberOfProcesses is initialized
// to 1 . YOU DO NOT HAVE TO CHANGE this variable for a 'normal' run.
@@ -87,8 +90,8 @@ G4PhysicsTable* G4hLowEnergyLoss::theRangeCoeffATable = NULL ;
G4PhysicsTable* G4hLowEnergyLoss::theRangeCoeffBTable = NULL ;
G4PhysicsTable* G4hLowEnergyLoss::theRangeCoeffCTable = NULL ;
const G4Proton* G4hLowEnergyLoss::theProton=G4Proton::Proton() ;
const G4AntiProton* G4hLowEnergyLoss::theAntiProton=G4AntiProton::AntiProton() ;
//const G4Proton* G4hLowEnergyLoss::theProton=G4Proton::Proton() ;
//const G4AntiProton* G4hLowEnergyLoss::theAntiProton=G4AntiProton::AntiProton() ;
G4double G4hLowEnergyLoss::ParticleMass;
G4double G4hLowEnergyLoss::ptableElectronCutInRange = 0.0*mm ;
@@ -116,12 +119,14 @@ G4double G4hLowEnergyLoss::LowestKineticEnergy,G4hLowEnergyLoss::HighestKineticE
G4int G4hLowEnergyLoss::TotBin ;
G4double G4hLowEnergyLoss::RTable,G4hLowEnergyLoss::LOGRTable;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// constructor and destructor
G4hLowEnergyLoss::G4hLowEnergyLoss(const G4String& processName)
: G4VContinuousDiscreteProcess (processName),
theLossTable (NULL),
MinKineticEnergy(1.*eV),
MinKineticEnergy(0.0),
linLossLimit(0.05),
lastMaterial (NULL),
MaxExcitationNumber (1.e6),
@@ -129,7 +134,9 @@ G4hLowEnergyLoss::G4hLowEnergyLoss(const G4String& processName)
nmaxDirectFluct (100),
nmaxCont1(4),
nmaxCont2(16)
{ }
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hLowEnergyLoss::~G4hLowEnergyLoss()
{
@@ -138,21 +145,21 @@ G4hLowEnergyLoss::~G4hLowEnergyLoss()
delete theLossTable;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildDEDXTable(
const G4ParticleDefinition& aParticleType)
{
// calculate data members TotBin,LOGRTable,RTable first
G4double binning = dRoverRange;
G4double lrate = log(HighestKineticEnergy/LowestKineticEnergy);
G4int nbin = G4int(lrate/log(1.+binning) + 0.5 );
nbin = (nbin+25)/50;
TotBin =50*nbin ;
if (TotBin<50) TotBin = 50;
if (TotBin>500) TotBin = 500;
LOGRTable=lrate/TotBin;
RTable =exp(LOGRTable);
// create table if there is no table or there is a new cut value
G4bool MakeTable = false ;
@@ -265,6 +272,7 @@ void G4hLowEnergyLoss::BuildDEDXTable(
BuildRangeCoeffCTable( aParticleType);
// invert the range table
BuildInverseRangeTable(aParticleType);
}
}
@@ -285,6 +293,8 @@ void G4hLowEnergyLoss::BuildDEDXTable(
proton_mass_c2/aParticleType.GetPDGMass(),TotBin);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildRangeTable(
const G4ParticleDefinition& aParticleType)
@@ -325,6 +335,8 @@ void G4hLowEnergyLoss::BuildRangeTable(
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildTimeTables(
const G4ParticleDefinition& aParticleType)
{
@@ -381,86 +393,43 @@ void G4hLowEnergyLoss::BuildTimeTables(
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector)
G4PhysicsLogVector* rangeVector)
// create range vector for a material
{
G4int nbin=100;
G4bool isOut;
G4double tlim=2.*MeV,t1=0.1*MeV,t2=0.025*MeV ;
G4double loss1,loss2,ca,cb,cba ;
G4double taulim,rangelim,ltaulim,ltaumax,
LowEdgeEnergy,tau,Value,tau1,sqtau1 ;
G4PhysicsVector* physicsVector= (*theDEDXTable)[materialIndex];
const G4MaterialTable* theMaterialTable =
G4Material::GetMaterialTable() ;
G4double energy1 = rangeVector->GetLowEdgeEnergy(0);
G4double dedx = physicsVector->GetValue(energy1,isOut);
G4double range = 0.5*energy1/dedx;
rangeVector->PutValue(0,range);
G4int n = 100;
G4double del = 1.0/(G4double)n ;
// low energy part first...
loss1 = physicsVector->GetValue(t1,isOut);
loss2 = physicsVector->GetValue(t2,isOut);
tau1 = t1/Mass ;
sqtau1 = sqrt(tau1) ;
ca = (4.*loss2-loss1)/sqtau1 ;
cb = (2.*loss1-4.*loss2)/tau1 ;
cba = cb/ca ;
taulim = tlim/Mass ;
ltaulim = log(taulim) ;
ltaumax = log(HighestKineticEnergy/Mass) ;
for (G4int j=1; j<TotBin; j++) {
G4int i=-1;
G4double oldValue = 0. ;
G4double tauold ;
do
{
i += 1 ;
LowEdgeEnergy = rangeVector->GetLowEdgeEnergy(i);
tau = LowEdgeEnergy/Mass;
if ( tau <= tau1 )
{
Value = 2.*Mass*log(1.+cba*sqrt(tau))/cb ;
G4double energy2 = rangeVector->GetLowEdgeEnergy(j);
G4double de = (energy2 - energy1) * del ;
G4double dedx1 = dedx ;
for (G4int i=1; i<n; i++) {
G4double energy = energy1 + i*de ;
G4double dedx2 = physicsVector->GetValue(energy,isOut);
range += 0.5*de*(1.0/dedx1 + 1.0/dedx2);
dedx1 = dedx2;
}
else
{
Value = 2.*Mass*log(1.+cba*sqtau1)/cb ;
if(tau<=taulim)
{
taulow = tau1 ;
tauhigh = tau ;
Value += RangeIntLin(physicsVector,nbin);
}
else
{
taulow = tau1 ;
tauhigh = taulim ;
Value += RangeIntLin(physicsVector,nbin) ;
ltaulow = ltaulim ;
ltauhigh = log(tau) ;
Value += RangeIntLog(physicsVector,nbin);
}
}
rangeVector->PutValue(i,Value);
oldValue = Value ;
tauold = tau ;
} while (tau<=taulim) ;
i += 1 ;
for (G4int j=i; j<TotBin; j++)
{
LowEdgeEnergy = rangeVector->GetLowEdgeEnergy(j);
tau = LowEdgeEnergy/Mass;
ltaulow = log(tauold);
ltauhigh = log(tau);
Value = oldValue+RangeIntLog(physicsVector,nbin);
rangeVector->PutValue(j,Value);
oldValue = Value ;
tauold = tau ;
rangeVector->PutValue(j,range);
dedx = dedx1 ;
energy1 = energy2 ;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildLabTimeVector(G4int materialIndex,
G4PhysicsLogVector* timeVector)
G4PhysicsLogVector* timeVector)
// create lab time vector for a material
{
@@ -519,8 +488,10 @@ void G4hLowEnergyLoss::BuildLabTimeVector(G4int materialIndex,
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildProperTimeVector(G4int materialIndex,
G4PhysicsLogVector* timeVector)
G4PhysicsLogVector* timeVector)
// create proper time vector for a material
{
G4int nbin=100;
@@ -578,8 +549,10 @@ void G4hLowEnergyLoss::BuildProperTimeVector(G4int materialIndex,
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hLowEnergyLoss::RangeIntLin(G4PhysicsVector* physicsVector,
G4int nbin)
G4int nbin)
// num. integration, linear binning
{
G4double dtau,Value,taui,ti,lossi,ci;
@@ -607,9 +580,10 @@ G4double G4hLowEnergyLoss::RangeIntLin(G4PhysicsVector* physicsVector,
return Value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hLowEnergyLoss::RangeIntLog(G4PhysicsVector* physicsVector,
G4int nbin)
G4int nbin)
// num. integration, logarithmic binning
{
G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
@@ -639,8 +613,10 @@ G4double G4hLowEnergyLoss::RangeIntLog(G4PhysicsVector* physicsVector,
return Value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hLowEnergyLoss::LabTimeIntLog(G4PhysicsVector* physicsVector,
G4int nbin)
G4int nbin)
// num. integration, logarithmic binning
{
G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
@@ -670,8 +646,10 @@ G4double G4hLowEnergyLoss::LabTimeIntLog(G4PhysicsVector* physicsVector,
return Value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hLowEnergyLoss::ProperTimeIntLog(G4PhysicsVector* physicsVector,
G4int nbin)
G4int nbin)
// num. integration, logarithmic binning
{
G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
@@ -701,6 +679,8 @@ G4double G4hLowEnergyLoss::ProperTimeIntLog(G4PhysicsVector* physicsVector,
return Value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildRangeCoeffATable(
const G4ParticleDefinition& aParticleType)
// Build tables of coefficients for the energy loss calculation
@@ -772,6 +752,7 @@ void G4hLowEnergyLoss::BuildRangeCoeffATable(
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildRangeCoeffBTable(
const G4ParticleDefinition& aParticleType)
@@ -843,6 +824,8 @@ void G4hLowEnergyLoss::BuildRangeCoeffBTable(
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildRangeCoeffCTable(
const G4ParticleDefinition& aParticleType)
// Build tables of coefficients for the energy loss calculation
@@ -913,6 +896,8 @@ void G4hLowEnergyLoss::BuildRangeCoeffCTable(
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::BuildInverseRangeTable(
const G4ParticleDefinition& aParticleType)
// Build inverse table of the range table
@@ -967,8 +952,10 @@ void G4hLowEnergyLoss::BuildInverseRangeTable(
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hLowEnergyLoss::InvertRangeVector(G4int materialIndex,
G4PhysicsLogVector* aVector)
G4PhysicsLogVector* aVector)
// invert range vector for a material
{
G4double LowEdgeRange,A,B,C,discr,KineticEnergy ;
@@ -977,10 +964,12 @@ void G4hLowEnergyLoss::InvertRangeVector(G4int materialIndex,
G4int binnumber = -1 ;
G4bool isOut ;
//loop for range values
for( G4int i=0; i<TotBin; i++)
{
LowEdgeRange = aVector->GetLowEdgeEnergy(i) ; //i.e. GetLowEdgeValue(i)
if( rangebin < LowEdgeRange )
{
do
@@ -1015,315 +1004,5 @@ void G4hLowEnergyLoss::InvertRangeVector(G4int materialIndex,
}
}
G4double G4hLowEnergyLoss::GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial)
{
// returns the Step limit
// dRoverRange is the max. allowed relative range loss in one step
// it calculates dEdx and the range as well....
G4double KineticEnergy,StepLimit;
G4bool isOut ;
Charge = aParticle->GetDefinition()->GetPDGCharge()/eplus ;
KineticEnergy = aParticle->GetKineticEnergy();
G4double massratio=proton_mass_c2/
aParticle->GetDefinition()->GetPDGMass() ;
G4double Tscaled= KineticEnergy*massratio ;
G4double ChargeSquare = Charge*Charge ;
if(Charge>0.)
{
fRangeNow = G4EnergyLossTables::GetRange( theProton,
Tscaled,aMaterial) ;
fdEdx = G4EnergyLossTables::GetDEDX( theProton,
Tscaled,aMaterial) ;
}
else
{
fRangeNow = G4EnergyLossTables::GetRange( theAntiProton,
Tscaled,aMaterial) ;
fdEdx = G4EnergyLossTables::GetDEDX( theAntiProton,
Tscaled,aMaterial) ;
}
fdEdx *= ChargeSquare ;
fRangeNow /= (ChargeSquare*massratio) ;
// compute the (random) Step limit ..............
if(fRangeNow > finalRange)
{
StepLimit = (c1lim*fRangeNow+c2lim+c3lim/fRangeNow) ;
// randomise this value
if(rndmStepFlag) StepLimit =
finalRange+(StepLimit-finalRange)*G4UniformRand() ;
if(StepLimit > fRangeNow) StepLimit = fRangeNow ;
}
else StepLimit = fRangeNow ;
return StepLimit ;
}
G4VParticleChange* G4hLowEnergyLoss::AlongStepDoIt(
const G4Track& trackData,const G4Step& stepData)
// compute the energy loss after a step
{
const G4DynamicParticle* aParticle;
G4Material* aMaterial;
G4double E,finalT,Step,ChargeSquare,MeanLoss ;
aParticleChange.Initialize(trackData) ;
aMaterial = trackData.GetMaterial() ;
// get the actual (true) Step length from stepData
Step = stepData.GetStepLength() ;
aParticle = trackData.GetDynamicParticle() ;
ChargeSquare = Charge*Charge ;
G4int index = aMaterial->GetIndex() ;
E = aParticle->GetKineticEnergy() ;
if(E < MinKineticEnergy) MeanLoss = E ;
else
{
if(Step >= fRangeNow ) MeanLoss = E ;
else if(( E > HighestKineticEnergy)||( E <= LowestKineticEnergy))
MeanLoss = Step*fdEdx ;
else
{
if(Step>linLossLimit*fRangeNow)
{
G4double massratio=proton_mass_c2/
aParticle->GetDefinition()->GetPDGMass() ;
G4double rscaled= fRangeNow*massratio*ChargeSquare ;
G4double sscaled= Step *massratio*ChargeSquare ;
if(Charge>0.)
{
MeanLoss = G4EnergyLossTables::GetPreciseEnergyFromRange(
theProton,
rscaled ,aMaterial) -
G4EnergyLossTables::GetPreciseEnergyFromRange(
theProton,
rscaled-sscaled,aMaterial) ;
}
else
{
MeanLoss = G4EnergyLossTables::GetPreciseEnergyFromRange(
theAntiProton,
rscaled ,aMaterial) -
G4EnergyLossTables::GetPreciseEnergyFromRange(
theAntiProton,
rscaled-sscaled,aMaterial) ;
}
MeanLoss /= (massratio*ChargeSquare) ;
}
else MeanLoss = Step*fdEdx ;
}
}
finalT = E - MeanLoss ;
if(finalT < MinKineticEnergy) finalT = 0. ;
// now the loss with fluctuation
if((EnlossFlucFlag) && (finalT > 0.) && (finalT < E)&&(E > LowestKineticEnergy))
{
MeanLoss /= ChargeSquare ;
finalT = E-GetLossWithFluct(aParticle,aMaterial,MeanLoss)*ChargeSquare ;
if (finalT < 0.) finalT = E-MeanLoss ;
}
// kill the particle if the kinetic energy <= 0
if (finalT <= 0. )
{
finalT = 0.;
if(aParticle->GetDefinition()->GetParticleName() == "proton")
aParticleChange.SetStatusChange(fStopAndKill);
else
aParticleChange.SetStatusChange(fStopButAlive);
}
aParticleChange.SetEnergyChange( finalT ) ;
aParticleChange.SetLocalEnergyDeposit(E-finalT) ;
return &aParticleChange ;
}
G4double G4hLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double MeanLoss)
// calculate actual loss from the mean loss
// The model used to get the fluctuation is the same as in Glandz in Geant3.
{
static const G4double Tlow=10.*keV ;
// check if the material has changed ( cache mechanism)
if (aMaterial != lastMaterial)
{
lastMaterial = aMaterial;
imat = aMaterial->GetIndex();
f1Fluct = aMaterial->GetIonisation()->GetF1fluct();
f2Fluct = aMaterial->GetIonisation()->GetF2fluct();
e1Fluct = aMaterial->GetIonisation()->GetEnergy1fluct();
e2Fluct = aMaterial->GetIonisation()->GetEnergy2fluct();
e1LogFluct = aMaterial->GetIonisation()->GetLogEnergy1fluct();
e2LogFluct = aMaterial->GetIonisation()->GetLogEnergy2fluct();
rateFluct = aMaterial->GetIonisation()->GetRateionexcfluct();
ipotFluct = aMaterial->GetIonisation()->GetMeanExcitationEnergy();
ipotLogFluct = aMaterial->GetIonisation()->GetLogMeanExcEnergy();
}
G4double threshold,w1,w2,w3,lnw3,C,prob,
beta2,suma,e0,Em,loss,lossc ,w;
G4double a1,a2,a3;
G4long p1,p2,p3;
G4int nb;
G4double Corrfac, na,alfa,rfac,namean,sa,alfa1,ea,sea;
G4double dp1,dnmaxDirectFluct,dp3,dnmaxCont2;
G4double siga ;
static const G4double alim=10.;
// get particle data
G4double Tkin = aParticle->GetKineticEnergy();
threshold =((*G4Electron::Electron()).GetCutsInEnergy())[imat];
G4double rmass = electron_mass_c2/ParticleMass;
G4double tau = Tkin/ParticleMass, tau1 = tau+1., tau2 = tau*(tau+2.);
G4double Tm = 2.*electron_mass_c2*tau2/(1.+2.*tau1*rmass+rmass*rmass)
-ipotFluct;
if (Tm < 0.) Tm = 0.;
else if (Tm > threshold) Tm = threshold;
w1 = Tm+ipotFluct;
w2 = w1/ipotFluct;
w3 = 2.*electron_mass_c2*tau2;
lnw3 = log(w3);
beta2 = tau2/(tau1*tau1);
C = (1.-rateFluct)*MeanLoss/(lnw3-ipotLogFluct-beta2);
a1 = C*f1Fluct*(lnw3-e1LogFluct-beta2)/e1Fluct;
a2 = C*f2Fluct*(lnw3-e2LogFluct-beta2)/e2Fluct;
if (Tm > 0.) a3 = rateFluct*MeanLoss*Tm/(ipotFluct*w1*log(w2));
else { a1 /= rateFluct; a2 /= rateFluct; a3 = 0.;}
suma = a1+a2+a3;
//no fluctuation if the loss is too big
if (suma > MaxExcitationNumber) return MeanLoss;
suma<50.? prob = exp(-suma) : prob = 0.;
if (prob > probLimFluct) // very small Step
{
e0 = aMaterial->GetIonisation()->GetEnergy0fluct();
if (Tm <= 0.)
{
a1 = MeanLoss/e0;
if(a1>alim)
{
siga=sqrt(a1) ;
p1 = G4std::max(0,int(RandGauss::shoot(a1,siga)+0.5));
}
else
p1 = G4Poisson(a1);
loss = p1*e0 ;
}
else
{
Em = Tm+e0;
a1 = MeanLoss*(Em-e0)/(Em*e0*log(Em/e0));
if(a1>alim)
{
siga=sqrt(a1) ;
p1 = G4std::max(0,int(RandGauss::shoot(a1,siga)+0.5));
}
else
p1 = G4Poisson(a1);
w = (Em-e0)/Em;
// just to save time
if (p1 > nmaxDirectFluct)
{
dp1 = p1;
dnmaxDirectFluct=nmaxDirectFluct;
Corrfac = dp1/dnmaxDirectFluct;
p1 = nmaxDirectFluct;
}
else Corrfac = 1.;
loss = 0.;
for (long i=0; i<p1; i++) loss += 1./(1.-w*G4UniformRand());
loss *= (e0*Corrfac);
}
}
else // not so small Step
{
if(a1>alim)
{
siga=sqrt(a1) ;
p1 = G4std::max(0,int(RandGauss::shoot(a1,siga)+0.5));
}
else
p1 = G4Poisson(a1);
if(a2>alim)
{
siga=sqrt(a2) ;
p2 = G4std::max(0,int(RandGauss::shoot(a2,siga)+0.5));
}
else
p2 = G4Poisson(a2);
loss = p1*e1Fluct+p2*e2Fluct;
if (loss>0.) loss += (1.-2.*G4UniformRand())*e1Fluct;
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,int(RandGauss::shoot(a3,siga)+0.5));
}
else
p3 = G4Poisson(a3);
lossc = 0.; na = 0.; alfa = 1.;
if (p3 > nmaxCont2)
{
dp3 = p3;
dnmaxCont2 = nmaxCont2;
rfac = dp3/(dnmaxCont2+dp3);
namean = p3*rfac;
sa = nmaxCont1*rfac;
na = RandGauss::shoot(namean,sa);
if (na > 0.)
{
alfa = w2*(nmaxCont2+p3)/(w2*nmaxCont2+p3);
alfa1 = alfa*log(alfa)/(alfa-1.);
ea = na*ipotFluct*alfa1;
sea = ipotFluct*sqrt(na*(alfa-alfa1*alfa1));
lossc += RandGauss::shoot(ea,sea);
}
}
nb = G4int(p3-na);
if (nb > 0)
{
w2 = alfa*ipotFluct;
w = (w1-w2)/w1;
for (G4int k=0; k<nb; k++) lossc += w2/(1.-w*G4UniformRand());
}
loss += lossc;
}
return loss ;
}
@@ -0,0 +1,173 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hNuclearStoppingModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 22/08/2000 V.Ivanchenko Bug fixed in call of a model
// 03/10/2000 V.Ivanchenko CodeWizard clean up
//
// Class Description:
//
// Low energy protons/ions nuclear stopping parametrisation
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hNuclearStoppingModel.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4hZiegler1977Nuclear.hh"
#include "G4hZiegler1985Nuclear.hh"
#include "G4hICRU49Nuclear.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4ElementVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hNuclearStoppingModel::G4hNuclearStoppingModel(const G4String& name):
G4VLowEnergyModel(name)
{
modelName = name ;
InitializeMe() ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hNuclearStoppingModel::InitializeMe()
{
// Constants
highEnergyLimit = 100.*MeV ;
lowEnergyLimit = 1.*eV ;
factorPDG2AMU = 1.007276/proton_mass_c2 ;
theZieglerFactor= eV*cm2*1.0e-15 ;
// Registration of parametrisation models of nuclear energy losses
G4String blank = G4String(" ") ;
G4String zi77 = G4String("Ziegler1977") ;
G4String ir49 = G4String("ICRU_R49") ;
G4String zi85 = G4String("Ziegler1985") ;
if(zi77 == modelName) {
nStopingPowerTable = new G4hZiegler1977Nuclear();
} else if(ir49 == modelName || blank == modelName) {
nStopingPowerTable = new G4hICRU49Nuclear();
} else if(zi85 == modelName) {
nStopingPowerTable = new G4hZiegler1985Nuclear();
} else {
G4cout <<
"G4hLowEnergyIonisation warning: There is no table with the modelName <"
<< modelName << ">"
<< " for nuclear stopping, <ICRU_R49> is applied "
<< G4endl;
nStopingPowerTable = new G4hICRU49Nuclear();
}
// Default is nuclear stopping fluctuations On
nStopingPowerTable->SetNuclearStoppingFluctuationsOn();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hNuclearStoppingModel::~G4hNuclearStoppingModel()
{
delete nStopingPowerTable;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hNuclearStoppingModel::TheValue(
const G4DynamicParticle* particle,
const G4Material* material)
{
// Projectile nucleus
G4double energy = particle->GetKineticEnergy() ;
G4double z1 = abs((particle->GetCharge())/eplus) ;
G4double m1 = (particle->GetMass())*factorPDG2AMU ;
G4double nloss = StoppingPower(material, energy, z1, m1) * theZieglerFactor;
return nloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hNuclearStoppingModel::TheValue(
const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
// Projectile nucleus
G4double z1 = abs((aParticle->GetPDGCharge())/eplus) ;
G4double m1 = (aParticle->GetPDGMass())*factorPDG2AMU ;
G4double nloss = StoppingPower(material, kineticEnergy, z1, m1)
* theZieglerFactor;
return nloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hNuclearStoppingModel::StoppingPower(
const G4Material* material,
G4double kineticEnergy,
G4double z1, G4double m1) const
{
// Target nucleus
G4int NumberOfElements = material->GetNumberOfElements() ;
if(0 == NumberOfElements) return 0.0 ;
const G4ElementVector* theElementVector =
material->GetElementVector() ;
const G4double* theAtomicNumDensityVector =
material->GetAtomicNumDensityVector() ;
// loop for the elements in the material
G4double nloss = 0.0;
for (G4int iel=0; iel<NumberOfElements; iel++) {
const G4Element* element = (*theElementVector)(iel) ;
G4double z2 = element->GetZ() ;
G4double m2 = element->GetA()*mole/g ;
nloss += (nStopingPowerTable->
NuclearStoppingPower(kineticEnergy, z1, z2, m1, m2))
* theAtomicNumDensityVector[iel] ;
}
return nloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,384 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hParametrisedLossModel
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 18/08/2000 V.Ivanchenko TRIM85 model is added
// 03/10/2000 V.Ivanchenko CodeWizard clean up
//
// Class Description:
//
// Low energy protons/ions electronic stopping power parametrisation
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hParametrisedLossModel.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4hZiegler1977p.hh"
#include "G4hZiegler1977He.hh"
#include "G4hZiegler1985p.hh"
#include "G4hICRU49p.hh"
#include "G4hICRU49He.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4ElementVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hParametrisedLossModel::G4hParametrisedLossModel(const G4String& name):
G4VLowEnergyModel(name)
{
modelName = name ;
InitializeMe();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hParametrisedLossModel::InitializeMe()
{
theZieglerFactor = eV*cm2*1.0e-15 ;
// Registration of parametrisation models
G4String blank = G4String(" ") ;
G4String zi77p = G4String("Ziegler1977p") ;
G4String zi77He = G4String("Ziegler1977He") ;
G4String ir49p = G4String("ICRU_R49p") ;
G4String ir49He = G4String("ICRU_R49He") ;
G4String zi85p = G4String("Ziegler1985p") ;
if(zi77p == modelName) {
eStopingPowerTable = new G4hZiegler1977p();
highEnergyLimit = 100.0*MeV;
lowEnergyLimit = 1.0*keV;
} else if(zi77He == modelName) {
eStopingPowerTable = new G4hZiegler1977He();
highEnergyLimit = 10.0*MeV/4.0;
lowEnergyLimit = 1.0*keV/4.0;
} else if(zi85p == modelName) {
eStopingPowerTable = new G4hZiegler1985p();
highEnergyLimit = 100.0*MeV;
lowEnergyLimit = 1.0*eV;
} else if(ir49p == modelName || blank == modelName) {
eStopingPowerTable = new G4hICRU49p();
highEnergyLimit = 2.0*MeV;
lowEnergyLimit = 1.0*keV;
} else if(ir49He == modelName) {
eStopingPowerTable = new G4hICRU49He();
highEnergyLimit = 10.0*MeV/4.0;
lowEnergyLimit = 1.0*keV/4.0;
} else {
G4cout <<
"G4hLowEnergyIonisation warning: There is no table with the modelName <"
<< modelName << ">" << "for electronic stopping, <ICRU_R49p> is applied"
<< G4endl;
eStopingPowerTable = new G4hICRU49p();
highEnergyLimit = 2.0*MeV;
lowEnergyLimit = 1.0*keV;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hParametrisedLossModel::~G4hParametrisedLossModel()
{
delete eStopingPowerTable;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::TheValue(
const G4DynamicParticle* particle,
const G4Material* material)
{
G4double scaledEnergy = (particle->GetKineticEnergy())
* proton_mass_c2/(particle->GetMass());
G4double eloss = StoppingPower(material,scaledEnergy) * theZieglerFactor;
return eloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::TheValue(
const G4ParticleDefinition* aParticle,
const G4Material* material,
G4double kineticEnergy)
{
G4double scaledEnergy = kineticEnergy
* proton_mass_c2/(aParticle->GetPDGMass());
G4double eloss = StoppingPower(material,scaledEnergy) * theZieglerFactor;
return eloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return lowEnergyLimit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return highEnergyLimit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::LowEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return lowEnergyLimit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::HighEnergyLimit(
const G4ParticleDefinition* aParticle) const
{
return highEnergyLimit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hParametrisedLossModel::IsInCharge(
const G4DynamicParticle* particle,
const G4Material* material) const
{
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hParametrisedLossModel::IsInCharge(
const G4ParticleDefinition* aParticle,
const G4Material* material) const
{
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::StoppingPower(
const G4Material* material,
G4double kineticEnergy)
{
G4double eloss = 0.0, eloss125 = 0.0;
const G4int numberOfElements = material->GetNumberOfElements() ;
const G4double* theAtomicNumDensityVector =
material->GetAtomicNumDensityVector() ;
// pure material
if(1 == numberOfElements) {
G4double z = material->GetZ();
eloss = (eStopingPowerTable->ElectronicStoppingPower(z, kineticEnergy))
* (material->GetTotNbOfAtomsPerVolume()) ;
// compaund material with parametrisation
} else if( (eStopingPowerTable->HasMaterial(material)) ) {
eloss = eStopingPowerTable->StoppingPower(material, kineticEnergy)
* (material->GetTotNbOfAtomsPerVolume()) ;
G4int nAtoms = 0;
const G4int* theAtomsVector = material->GetAtomsVector() ;
for (G4int iel=0; iel<numberOfElements; iel++) {
nAtoms += theAtomsVector[iel];
}
eloss /= nAtoms;
// Experimental data exist only for kinetic energy 125 keV
} else if( MolecIsInZiegler1988(material) ) {
// Cycle over elements - calculation based on Bragg's rule
G4double eloss125 = 0.0 ;
const G4ElementVector* theElementVector =
material->GetElementVector() ;
// loop for the elements in the material
for (G4int i=0; i<numberOfElements; i++) {
const G4Element* element = (*theElementVector)(i) ;
G4double z = element->GetZ() ;
eloss +=(eStopingPowerTable->ElectronicStoppingPower(z,kineticEnergy))
* theAtomicNumDensityVector[i] ;
eloss125 +=(eStopingPowerTable->ElectronicStoppingPower(z,125.0*keV))
* theAtomicNumDensityVector[i] ;
}
// Chemical factor is taken into account
eloss *= ChemicalFactor(kineticEnergy, eloss125) ;
// Brugg's rule calculation
} else {
const G4ElementVector* theElementVector =
material->GetElementVector() ;
// loop for the elements in the material
for (G4int i=0; i<numberOfElements; i++)
{
const G4Element* element = (*theElementVector)(i) ;
G4double z = element->GetZ() ;
eloss += (eStopingPowerTable->ElectronicStoppingPower(z,kineticEnergy))
* theAtomicNumDensityVector[i];
}
}
return eloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hParametrisedLossModel::MolecIsInZiegler1988(
const G4Material* material)
{
// The list of molecules from
// J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
// Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
G4String myFormula = G4String(" ") ;
const G4String chFormula = material->GetChemicalFormula() ;
if (myFormula == chFormula ) return false ;
// There are no evidence for difference of stopping power depended on
// phase of the compound except for water. The stopping power of the
// water in gas phase can be predicted using Bragg's rule.
//
// No chemical factor for water-gas
myFormula = G4String("H_2O") ;
const G4State theState = material->GetState() ;
if( theState == kStateGas && myFormula == chFormula) return false ;
const size_t numberOfMolecula = 53 ;
// The coffecient from Table.4 of Ziegler & Manoyan
const G4double HeEff = 2.8735 ;
static G4String name[numberOfMolecula] = {
"H_2O", "C_2H_4O", "C_3H_6O", "C_2H_2", "C_H_3OH",
"C_2H_5OH", "C_3H_7OH", "C_3H_4", "NH_3", "C_14H_10",
"C_6H_6", "C_4H_10", "C_4H_6", "C_4H_8O", "CCl_4",
"CF_4", "C_6H_8", "C_6H_12", "C_6H_10O", "C_6H_10",
"C_8H_16", "C_5H_10", "C_5H_8", "C_3H_6-Cyclopropane","C_2H_4F_2",
"C_2H_2F_2", "C_4H_8O_2", "C_2H_6", "C_2F_6", "C_2H_6O",
"C_3H_6O", "C_4H_10O", "C_2H_4", "C_2H_4O", "C_2H_4S",
"SH_2", "CH_4", "CCLF_3", "CCl_2F_2", "CHCl_2F",
"(CH_3)_2S", "N_2O", "C_5H_10O", "C_8H_6", "(CH_2)_N",
"(C_3H_6)_N","(C_8H_8)_N", "C_3H_8", "C_3H_6-Propylene", "C_3H_6O",
"C_3H_6S", "C_4H_4S", "C_7H_8"
} ;
static G4double expStopping[numberOfMolecula] = {
66.1, 190.4, 258.7, 42.2, 141.5,
210.9, 279.6, 198.8, 31.0, 267.5,
122.8, 311.4, 260.3, 328.9, 391.3,
206.6, 374.0, 422.0, 432.0, 398.0,
554.0, 353.0, 326.0, 74.6, 220.5,
197.4, 362.0, 170.0, 330.5, 211.3,
262.3, 349.6, 51.3, 187.0, 236.9,
121.9, 35.8, 247.0, 292.6, 268.0,
262.3, 49.0, 398.9, 444.0, 22.91,
68.0, 155.0, 84.0, 74.2, 254.7,
306.8, 324.4, 420.0
} ;
static G4double expCharge[numberOfMolecula] = {
HeEff, HeEff, HeEff, 1.0, HeEff,
HeEff, HeEff, HeEff, 1.0, 1.0,
1.0, HeEff, HeEff, HeEff, HeEff,
HeEff, HeEff, HeEff, HeEff, HeEff,
HeEff, HeEff, HeEff, 1.0, HeEff,
HeEff, HeEff, HeEff, HeEff, HeEff,
HeEff, HeEff, 1.0, HeEff, HeEff,
HeEff, 1.0, HeEff, HeEff, HeEff,
HeEff, 1.0, HeEff, HeEff, 1.0,
1.0, 1.0, 1.0, 1.0, HeEff,
HeEff, HeEff, HeEff
} ;
static G4double numberOfAtomsPerMolecula[numberOfMolecula] = {
3.0, 7.0, 10.0, 4.0, 6.0,
9.0, 12.0, 7.0, 4.0, 24.0,
12.0, 14.0, 10.0, 13.0, 5.0,
5.0, 14.0, 18.0, 17.0, 17.0,
24.0, 15.0, 13.0, 9.0, 8.0,
6.0, 14.0, 8.0, 8.0, 9.0,
10.0, 15.0, 6.0, 7.0, 7.0,
3.0, 5.0, 5.0, 5.0, 5.0,
9.0, 3.0, 16.0, 14.0, 3.0,
9.0, 16.0, 11.0, 9.0, 10.0,
10.0, 9.0, 15.0
} ;
// Search for the compaund in the table
for (G4int i=0; i<numberOfMolecula; i++)
{
if(chFormula == name[i]) {
G4double exp125 = expStopping[i] *
(material->GetTotNbOfAtomsPerVolume()) /
(expCharge[i] * numberOfAtomsPerMolecula[i]) ;
SetExpStopPower125(exp125) ;
return true ;
}
}
return false ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hParametrisedLossModel::ChemicalFactor(
G4double kineticEnergy, G4double eloss125) const
{
// Approximation of Chemical Factor according to
// J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
// Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
G4double gamma = 1.0 + kineticEnergy/proton_mass_c2 ;
G4double gamma25 = 1.0 + 25.0*keV /proton_mass_c2 ;
G4double gamma125 = 1.0 + 125.0*keV/proton_mass_c2 ;
G4double beta = sqrt(1.0 - 1.0/(gamma*gamma)) ;
G4double beta25 = sqrt(1.0 - 1.0/(gamma25*gamma25)) ;
G4double beta125 = sqrt(1.0 - 1.0/(gamma125*gamma125)) ;
G4double factor = 1.0 + (expStopPower125/eloss125 - 1.0) *
(1.0 + exp( 1.48 * ( beta125/beta25 - 7.0 ) ) ) /
(1.0 + exp( 1.48 * ( beta/beta25 - 7.0 ) ) ) ;
return factor ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,217 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1977He
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Electronic stopping power parametrised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hZiegler1977He.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4Material.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1977He::G4hZiegler1977He():G4VhElectronicStoppingPower(),
rateMass(4.0026/1.007276)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1977He::~G4hZiegler1977He()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hZiegler1977He::HasMaterial(const G4Material* material)
{
if(1 == (material->GetNumberOfElements())) return true;
return false ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1977He::StoppingPower(const G4Material* material,
G4double kineticEnergy)
{
G4double ionloss = 0.0 ;
// pure material (normally not the case for this function)
if(1 == (material->GetNumberOfElements())) {
G4double z = material->GetZ() ;
ionloss = ElectronicStoppingPower( z, kineticEnergy ) ;
}
return ionloss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1977He::ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const
{
G4double ionloss ;
G4int i = G4int(z)-1 ; // index of atom
if(i < 0) i = 0 ;
if(i > 91) i = 91 ;
// The He4 data and the fit from:
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
G4double energy = kineticEnergy*rateMass/keV ; // reduced He energy in keV
static G4double a[92][9] = {
//H-Solid 0.9661,0.4126,6.92,8.831,2.582,2.371,0.5462,-0.07932,-0.006853,
0.39,0.63, 4.17, 85.55, 19.55, 2.371, 0.5462, -0.07932,-0.006853,
//He-Solid 2.027,0.2931,26.34,6.66,0.3409,2.809,0.4847,-0.08756,-0.007281,
0.58, 0.59, 6.3, 130.0, 44.07, 2.809, 0.4847, -0.08756,-0.007281,
1.42, 0.49, 12.25,32., 9.161, 3.095, 0.4434, -0.09259,-0.007459,
2.206, 0.51, 15.32, 0.25, 8.995, 3.28, 0.4188, -0.09564,-0.007604,
3.691, 0.4128, 18.48,50.72, 9., 3.426, 0.4, -0.09796,-0.007715,
4.232, 0.3877, 22.99,35., 7.993, 3.588, 0.3921, -0.09935,-0.007804,
//N-solid 2.51,0.4752,38.26,13.02,1.892,3.759,0.4094,-0.09646,-0.007661,
2.0, 0.548, 29.82,18.11, 4.37, 3.759, 0.4094, -0.09646,-0.007661,
//O-solid 1.766,0.5261,37.11,15.24,2.804,3.782,0.3734,-0.1011,-0.007874,
2.717, 0.4858, 32.88, 25.88, 4.336, 3.782, 0.3734, -0.1011, -0.007874,
1.533, 0.531, 40.44,18.41, 2.718, 3.816, 0.3504, -0.1046, -0.008074,
//Ne-solid 1.183,0.55,39.83,17.49,4.001,3.863,0.3342,-0.1072,-0.008231,
2.303, 0.4861, 37.01, 37.96, 5.092, 3.863, 0.3342,-0.1072, -0.008231,
9.894, 0.3081, 23.65, 0.384, 92.93, 3.898, 0.3191, -0.1086, -0.008271,
4.3, 0.47, 34.3, 3.3, 12.74, 3.961, 0.314, -0.1091, -0.008297,
2.5, 0.625, 45.7, 0.1, 4.359, 4.024, 0.3113, -0.1093, -0.008306,
2.1, 0.65, 49.34, 1.788, 4.133, 4.077, 0.3074, -0.1089, -0.008219,
1.729, 0.6562, 53.41, 2.405, 3.845, 4.124, 0.3023, -0.1094, -0.00824,
1.402, 0.6791, 58.98, 3.528, 3.211, 4.164, 0.2964, -0.1101, -0.008267,
1.117, 0.7044, 69.69, 3.705, 2.156, 4.21, 0.2936, -0.1103, -0.00827,
0.9172,0.724, 79.44, 3.648, 1.646, 4.261, 0.2994, -0.1085, -0.008145,
8.554, 0.3817, 83.61,11.84, 1.875, 4.3, 0.2903, -0.1103, -0.008259,
6.297, 0.4622, 65.39,10.14, 5.036, 4.334, 0.2897, -0.1102, -0.008245,
5.307, 0.4918, 61.74,12.4, 6.665, 4.327, 0.2707, -0.1127, -0.00837,
4.71, 0.5087, 65.28, 8.806, 5.948, 4.34, 0.2618, -0.1138, -0.00842,
6.151, 0.4524, 83., 18.31, 2.71, 4.361, 0.2559, -0.1145, -0.008447,
6.57, 0.4322, 84.76,15.53, 2.779, 4.349, 0.24, -0.1166, -0.00855,
5.738, 0.4492, 84.61,14.18, 3.101, 4.362, 0.2327, -0.1174, -0.008588,
5.013, 0.4707, 85.58,16.55, 3.211, 4.375, 0.2253, -0.1185, -0.008648,
4.32, 0.4947, 76.14,10.85, 5.441, 4.362, 0.2069, -0.1214, -0.008815,
4.652, 0.4571, 80.73,22., 4.952, 4.346, 0.1857, -0.1249, -0.009021,
3.114, 0.5236, 76.67, 7.62, 6.385, 4.355, 0.18, -0.1255, -0.009045,
3.114, 0.5236, 76.67, 7.62, 7.502, 4.389, 0.1806, -0.1253, -0.009028,
3.114, 0.5236, 76.67, 7.62, 8.514, 4.407, 0.1759, -0.1258, -0.009054,
5.746, 0.4662, 79.24, 1.185, 7.993, 4.419, 0.1694, -0.1267, -0.009094,
2.792, 0.6346,106.1, 0.2986, 2.331, 4.412, 0.1545, -0.1289, -0.009202,
4.667, 0.5095,124.3, 2.102, 1.667, 4.419, 0.1448, -0.1303, -0.009269,
2.44, 0.6346,105., 0.83, 2.851, 4.436, 0.1443, -0.1299, -0.009229,
1.491, 0.7118,120.6, 1.101, 1.877, 4.478, 0.1608, -0.1262, -0.008983,
11.72, 0.3826,102.8, 9.231, 4.371, 4.489, 0.1517, -0.1278, -0.009078,
7.126, 0.4804,119.3, 5.784, 2.454, 4.514, 0.1551, -0.1268, -0.009005,
11.61, 0.3955,146.7, 7.031, 1.423, 4.533, 0.1568, -0.1261, -0.008945,
10.99, 0.41, 163.9, 7.1, 1.052, 4.548, 0.1572, -0.1256, -0.008901,
9.241, 0.4275,163.1, 7.954, 1.102, 4.553, 0.1544, -0.1255, -0.008883,
9.276, 0.418, 157.1, 8.038, 1.29, 4.548, 0.1485, -0.1259, -0.008889,
3.999, 0.6152, 97.6, 1.297, 5.792, 4.489, 0.1128, -0.1309, -0.009107,
4.306, 0.5658, 97.99, 5.514, 5.754, 4.402, 0.06656, -0.1375, -0.009421,
3.615, 0.6197, 86.26, 0.333, 8.689, 4.292, 0.01012, -0.1459, -0.009835,
5.8, 0.49, 147.2, 6.903, 1.289, 4.187,-0.04539, -0.1542, -0.01025,
5.6, 0.49, 130., 10., 2.844, 4.577, 0.13, -0.1285, -0.009067,
3.55, 0.6068,124.7, 1.112, 3.119, 4.583, 0.1253, -0.1291, -0.009084,
3.6, 0.62, 105.8, 0.1692, 6.026, 4.58, 0.1174, -0.1301, -0.009129,
5.4, 0.53, 103.1, 3.931, 7.767, 4.581, 0.111, -0.1309, -0.009161,
3.97, 0.6459,131.8, 0.2233, 2.723, 4.582, 0.1046, -0.1317, -0.009193,
3.65, 0.64, 126.8, 0.6834, 3.411, 4.6, 0.1052, -0.1315, -0.009178,
3.118, 0.6519,164.9, 1.208, 1.51, 4.614, 0.1043, -0.1315, -0.009175,
2.031, 0.7181,153.1, 1.362, 1.958, 4.619, 0.09769, -0.1325, -0.009231,
14.4, 0.3923,152.5, 8.354, 2.597, 4.671, 0.1136, -0.1298, -0.009078,
10.99, 0.4599,138.4, 4.811, 3.726, 4.706, 0.1206, -0.1287, -0.009009,
16.6, 0.3773,224.1, 6.28, 0.9121,4.732, 0.1244, -0.128, -0.008968,
10.54, 0.4533,159.3, 4.832, 2.529, 4.722, 0.1156, -0.1292, -0.00903,
10.33, 0.4502,162., 5.132, 2.444, 4.71, 0.106, -0.1305, -0.0091,
10.15, 0.4471,165.6, 5.378, 2.328, 4.698, 0.09647, -0.1319, -0.009169,
9.976, 0.4439,168., 5.721, 2.258, 4.681, 0.08536, -0.1335, -0.009252,
9.804, 0.4408,176.2, 5.675, 1.997, 4.676, 0.07819, -0.1345, -0.009302,
14.22, 0.363, 228.4, 7.024, 1.016, 4.663, 0.06867, -0.1358, -0.009373,
9.952, 0.4318,233.5, 5.065, 0.9244,4.676, 0.06861, -0.1357, -0.009363,
9.272, 0.4345,210., 4.911, 1.258, 4.649, 0.05362, -0.1379, -0.00948,
10.13, 0.4146,225.7, 5.525, 1.055, 4.634, 0.04335, -0.1394, -0.009558,
8.949, 0.4304,213.3, 5.071, 1.221, 4.603, 0.02679, -0.1418, -0.00969,
11.94, 0.3783,247.2, 6.655, 0.849, 4.584, 0.01494, -0.1436, -0.009783,
8.472, 0.4405,195.5, 4.051, 1.604, 4.576, 0.007043, -0.1447, -0.009841,
8.301, 0.4399,203.7, 3.667, 1.459, 4.571, 0.0007046,-0.1456, -0.009886,
6.567, 0.4858,193., 2.65, 1.66, 4.566,-0.005626, -0.1464, -0.00993,
5.951, 0.5016,196.1, 2.662, 1.589, 4.561,-0.01197, -0.1473, -0.009975,
7.495, 0.4523,251.4, 3.433, 0.8619,4.572,-0.012, -0.1472, -0.009965,
6.335, 0.4825,255.1, 2.834, 0.8228,4.569,-0.01755, -0.148, -0.01,
4.314, 0.5558,214.8, 2.354, 1.263, 4.573,-0.01992, -0.1482, -0.01001,
4.02, 0.5681,219.9, 2.402, 1.191, 4.57, -0.02547, -0.149, -0.01005,
3.836, 0.5765,210.2, 2.742, 1.305, 4.528,-0.04613, -0.1521, -0.01022,
4.68, 0.5247,244.7, 2.749, 0.8962,4.494,-0.0637, -0.1548, -0.01037,
3.223, 0.5883,232.7, 2.954, 1.05, 4.564,-0.027, -0.1471, -0.009852,
2.892, 0.6204,208.6, 2.415, 1.416, 4.546,-0.04963, -0.1523, -0.01022,
4.728, 0.5522,217., 3.091, 1.386, 4.594,-0.03339, -0.1496, -0.01006,
6.18, 0.52, 170., 4., 3.224, 4.608,-0.02886, -0.1485, -0.00999,
9., 0.47, 198., 3.8, 2.032, 4.624,-0.02639, -0.1481, -0.009971,
2.324, 0.6997,216., 1.599, 1.399, 4.636,-0.02422, -0.1477, -0.009939,
1.961, 0.7286,223., 1.621, 1.296, 4.648,-0.02172, -0.1471, -0.009903,
1.75, 0.7427,350.1, 0.9789, 0.5507,4.662,-0.1192, -0.1752, -0.01196,
10.31, 0.4613,261.2, 4.738, 0.9899,4.69, -0.009867, -0.1449, -0.009771,
7.962, 0.519, 235.7, 4.347, 1.313, 4.715,-0.002113, -0.1435, -0.009689,
6.227, 0.5645,231.9, 3.961, 1.379, 4.729, 0.001392, -0.1428, -0.009644,
5.246, 0.5947,228.6, 4.027, 1.423, 4.729,-0.0005983,-0.143, -0.009647,
5.408, 0.5811,235.7, 3.961, 1.358, 4.738, 0.001075, -0.1425, -0.009618,
5.218, 0.5828,245., 3.838, 1.25, 4.751, 0.004244, -0.1419, -0.009576
};
if ( energy < 1.0 ) {
G4double slow = a[i][0] ;
G4double shigh = log( 1.0 + a[i][3]*1000.0 + a[i][4]*0.001 )
* a[i][2]*1000.0 ;
ionloss = slow*shigh / (slow + shigh) ;
ionloss *= sqrt(energy) ;
} else if ( energy < 10000.0 ) {
G4double slow = a[i][0] * pow(energy, a[i][1]) ;
G4double e = energy/1000.0 ;
G4double shigh = log( 1.0 + a[i][3]/e + a[i][4]*e ) * a[i][2]/e ;
ionloss = slow*shigh / (slow + shigh) ;
} else {
G4double le = log(1000.0/energy) ;
ionloss = exp( a[i][5] + a[i][6]*le + a[i][7]*le*le + a[i][8]*le*le*le) ;
}
if ( ionloss < 0.0) ionloss = 0.0 ;
ionloss /= HeEffChargeSquare(z, energy*keV) ;
return ionloss;
}
@@ -0,0 +1,93 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1977Nuclear
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Nuclear stopping power parametrised according to
// J.F.Ziegler, Helium Stopping Powers and
// Ranges in All Elemental Matter, Vol.4, Pergamon Press, 1977
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hZiegler1977Nuclear.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1977Nuclear::G4hZiegler1977Nuclear():G4VhNuclearStoppingPower()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1977Nuclear::~G4hZiegler1977Nuclear()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1977Nuclear::NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const
{
G4double energy = kineticEnergy/keV ; // energy in keV
G4double ionloss ;
G4double rm = (m1 + m2) * sqrt( pow(z1, 0.667) + pow(z2, 0.667) ) ;
G4double er = 32.53 * m2 * energy / ( z1 * z2 * rm ) ; // reduced energy
if ( er < 0.01 ) {
ionloss = sqrt(er) * 1.593 ;
} else if ( er < 10.0 ) {
ionloss = 1.7 * sqrt(er) * log(er + exp(1.0)) /
(1.0 + 6.8 * er + 3.4 * pow(er, 1.5)) ;
} else {
ionloss = log(0.47 * er) * 0.5 / er ;
}
// Stragling
if(lossFlucFlag) {
G4double sig = 4.0 * m1 * m2 * sqrt( (pow(z1, 0.23) + pow(z2, 0.23)) /
(pow(z1, 0.667) + pow(z2, 0.667)) )
/ ((m1 +m2)*(m1 + m2)*
(4.0 + 0.197*pow(er,-1.6991)+6.584*pow(er,-1.0494))) ;
ionloss *= G4RandGauss::shoot(1.0,sig) ;
}
ionloss *= 8.462 * z1 * z2 * m1 / rm ; // Return to [ev/(10^15 atoms/cm^2]
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -0,0 +1,210 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1977p
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 18/09/2000 V.Ivanchenko clean up - all variable are the same as in ICRU
//
// Class Description:
//
// Electronic stopping power parametrised according to
// H.H.Andersen & J.F.Ziegler, Hydrogen Stopping Powers and
// Ranges in All Elements, Vol.3, Pergamon Press, 1977
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hZiegler1977p.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4Material.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1977p::G4hZiegler1977p():G4VhElectronicStoppingPower(),
protonMassAMU(1.007276)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1977p::~G4hZiegler1977p()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hZiegler1977p::HasMaterial(const G4Material* material)
{
if(1 == (material->GetNumberOfElements())) return true;
return false ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1977p::StoppingPower(const G4Material* material,
G4double kineticEnergy)
{
G4double ionloss = 0.0 ;
// pure material (normally not the case for this function)
if(1 == (material->GetNumberOfElements())) {
G4double z = material->GetZ() ;
G4double ionloss = ElectronicStoppingPower( z, kineticEnergy ) ;
}
return ionloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1977p::ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const
{
G4double ionloss ;
G4int i = G4int(z)-1 ; // index of atom
if(i < 0) i = 0 ;
if(i > 91) i = 91 ;
// The data and the fit from:
// H.H.Andersen & J.F.Ziegler Hydrogen Stopping Powers and
// Ranges in All Elements, Vol.3, Pergamon Press, 1977
// Proton kinetic energy for parametrisation in Ziegler's units (keV/amu)
G4double T = kineticEnergy/(keV*protonMassAMU) ;
static G4double a[92][12] = {
1.262,1.440, 242.6,12000.,0.115900,0.0005099,54360.0,-5.0520,2.0490,-0.30440,0.019660,-0.0004659,
1.229,1.397, 484.5,5873.0,0.052250,0.0010200,24510.0,-2.1580,0.8278,-0.11720,0.007259,-0.000166,
1.411,1.600, 725.6,3013.0,0.045780,0.0015300,21470.0,-0.5831,0.5620,-0.11830,0.009298,-0.0002498,
2.248,2.590, 966.0, 153.8,0.034750,0.0020390,16300.0, 0.2779,0.1745,-0.05684,0.005155,-0.0001488,
2.474,2.815, 1206.0,1060.0,0.028550,0.0025490,13450.0,-2.4450,1.2830,-0.22050,0.015600,-0.0003930,
2.631,2.989, 1445.0, 957.2,0.028190,0.0030590,13220.0,-4.3800,2.0440,-0.32830,0.022210,-0.0005417,
2.954,3.350, 1683.0,1900.0,0.025130,0.0035690,11790.0,-5.0540,2.3250,-0.37130,0.025060,-0.0006109,
2.652,3.000, 1920.0,2000.0,0.022300,0.0040790,10460.0,-6.7340,3.0190,-0.47480,0.031710,-0.0007669,
2.085,2.352, 2157.0,2634.0,0.018160,0.0045890,8517.0, -5.5710,2.4490,-0.37810,0.024830,-0.0005919,
1.951,2.199, 2393.0,2699.0,0.015680,0.0050990,7353.0, -4.4080,1.8790,-0.28140,0.017960,-0.0004168,
2.542,2.869, 2628.0,1854.0,0.014720,0.0056090,6905.0, -4.9590,2.0730,-0.30540,0.019210,-0.0004403,
3.792,4.293, 2862.0,1009.0,0.013970,0.0061180,6551.0, -5.5100,2.2660,-0.32950,0.020470,-0.0004637,
4.154,4.739, 2766.0, 164.5,0.020230,0.0066280,6309.0, -6.0610,2.4600,-0.35350,0.021730,-0.0004871,
4.150,4.700, 3329.0, 550.0,0.013210,0.0071380,6194.0, -6.2940,2.5380,-0.36280,0.022200,-0.0004956,
3.232,3.647, 3561.0,1560.0,0.012670,0.0076480,5942.0, -6.5270,2.6160,-0.37210,0.022670,-0.0005040,
3.447,3.891, 3792.0,1219.0,0.012110,0.0081580,5678.0, -6.7610,2.6940,-0.38140,0.023140,-0.0005125,
5.047,5.714, 4023.0, 878.6,0.011780,0.0086680,5524.0, -6.9940,2.7730,-0.39070,0.023610,-0.0005209,
5.731,6.500, 4253.0, 530.0,0.011230,0.0091780,5268.0, -7.2270,2.8510,-0.40000,0.024070,-0.0005294,
5.151,5.833, 4482.0, 545.7,0.011290,0.0096870,5295.0, -7.4400,2.9230,-0.40940,0.024620,-0.0005411,
5.521,6.252, 4710.0, 553.3,0.011120,0.0102000,5214.0, -7.6530,2.9950,-0.41870,0.025160,-0.0005529,
5.201,5.884, 4938.0, 560.9,0.009995,0.0107100,4688.0, -8.0120,3.1230,-0.43500,0.026050,-0.0005707,
4.862,5.496, 5165.0, 568.5,0.009474,0.0112200,4443.0, -8.3710,3.2510,-0.45130,0.026940,-0.0005886,
4.480,5.055, 5391.0, 952.3,0.009117,0.0117300,4276.0, -8.7310,3.3790,-0.46760,0.027830,-0.0006064,
3.983,4.489, 5616.0,1336.0,0.008413,0.0122400,3946.0, -9.0900,3.5070,-0.48380,0.028720,-0.0006243,
3.469,3.907, 5725.0,1461.0,0.008829,0.0127500,3785.0, -9.4490,3.6350,-0.50010,0.029610,-0.0006421,
3.519,3.963, 6065.0,1243.0,0.007782,0.0132600,3650.0, -9.8090,3.7630,-0.51640,0.030500,-0.0006600,
3.140,3.535, 6288.0,1372.0,0.007361,0.0137700,3453.0,-10.1700,3.8910,-0.53270,0.031390,-0.0006779,
3.553,4.004, 6205.0, 555.1,0.008763,0.0142800,3297.0,-10.5300,4.0190,-0.54900,0.032290,-0.0006957,
3.696,4.175, 4673.0, 387.8,0.021880,0.0147900,3174.0,-11.1800,4.2520,-0.57910,0.033990,-0.0007314,
4.210,4.750, 6953.0, 295.2,0.006809,0.0153000,3194.0,-11.5700,4.3940,-0.59800,0.035060,-0.0007537,
5.041,5.697, 7173.0, 202.6,0.006725,0.0158100,3154.0,-11.9500,4.5370,-0.61690,0.036130,-0.0007759,
5.554,6.300, 6496.0, 110.0,0.009689,0.0163200,3097.0,-12.3400,4.6800,-0.63580,0.037210,-0.0007981,
5.323,6.012, 7611.0, 292.5,0.006447,0.0168300,3024.0,-12.7200,4.8230,-0.65470,0.038280,-0.0008203,
5.847,6.656, 7395.0, 117.5,0.007684,0.0173400,3006.0,-13.1100,4.9650,-0.67350,0.039350,-0.0008425,
5.611,6.335, 8046.0, 365.2,0.006244,0.0178500,2928.0,-13.4000,5.0830,-0.69060,0.040420,-0.0008675,
6.411,7.250, 8262.0, 220.0,0.006087,0.0183600,2855.0,-13.6900,5.2000,-0.70760,0.041500,-0.0008925,
5.694,6.429, 8478.0, 292.9,0.006087,0.0188600,2855.0,-13.9200,5.2660,-0.71400,0.041730,-0.0008943,
6.339,7.159, 8693.0, 330.3,0.006003,0.0193700,2815.0,-14.1400,5.3310,-0.72050,0.041960,-0.0008962,
6.407,7.234, 8907.0, 367.8,0.005889,0.0198800,2762.0,-14.3600,5.3970,-0.72690,0.042190,-0.0008980,
6.734,7.603, 9120.0, 405.2,0.005765,0.0203900,2704.0,-14.5900,5.4630,-0.73330,0.042420,-0.0008998,
6.902,7.791, 9333.0, 442.7,0.005587,0.0209000,2621.0,-16.2200,6.0940,-0.82250,0.047910,-0.0010240,
6.425,7.248, 9545.0, 480.2,0.005367,0.0214100,2517.0,-17.8500,6.7250,-0.91160,0.053390,-0.0011480,
6.799,7.671, 9756.0, 517.6,0.005315,0.0219200,2493.0,-17.9600,6.7520,-0.91350,0.053410,-0.001147,
6.108,6.887, 9966.0, 555.1,0.005151,0.0224300,2416.0,-18.0700,6.7790,-0.91540,0.053420,-0.0011450,
5.924,6.677,10180.0, 592.5,0.004919,0.0229400,2307.0,-18.1800,6.8060,-0.91730,0.053430,-0.0011430,
5.238,5.900,10380.0, 630.0,0.004758,0.0234500,2231.0,-18.2800,6.8330,-0.91920,0.053450,-0.0011420,
5.623,6.354, 7160.0, 337.6,0.013940,0.0239600,2193.0,-18.3900,6.8600,-0.92110,0.053460,-0.0011400,
5.814,6.554,10800.0, 355.5,0.004626,0.0244700,2170.0,-18.6200,6.9150,-0.92430,0.053400,-0.0011340,
6.230,7.024,11010.0, 370.9,0.004540,0.0249800,2129.0,-18.8500,6.9690,-0.92750,0.053350,-0.0011270,
6.410,7.227,11210.0, 386.4,0.004474,0.0254900,2099.0,-19.0700,7.0240,-0.93080,0.053290,-0.0011210,
7.500,8.480, 8608.0, 348.0,0.009074,0.0260000,2069.0,-19.5700,7.2250,-0.96030,0.055180,-0.0011650,
6.979,7.871,11620.0, 392.4,0.004402,0.0265100,2065.0,-20.0700,7.4260,-0.98990,0.057070,-0.0012090,
7.725,8.716,11830.0, 394.8,0.004376,0.0270200,2052.0,-20.5600,7.6270,-1.01900,0.058960,-0.0012540,
8.231,9.289,12030.0, 397.3,0.004384,0.0275300,2056.0,-21.0600,7.8280,-1.04900,0.060850,-0.0012980,
7.287,8.218,12230.0, 399.7,0.004447,0.0280400,2086.0,-20.4000,7.5400,-1.00400,0.057820,-0.0012240,
7.899,8.911,12430.0, 402.1,0.004511,0.0285500,2116.0,-19.7400,7.2520,-0.95880,0.054790,-0.0011510,
8.041,9.071,12630.0, 404.5,0.004540,0.0290600,2129.0,-19.0800,6.9640,-0.91360,0.051760,-0.0010770,
7.489,8.444,12830.0, 406.9,0.004420,0.0295700,2073.0,-18.4300,6.6770,-0.86840,0.048720,-0.0010030,
7.291,8.219,13030.0, 409.3,0.004298,0.0300800,2016.0,-17.7700,6.3890,-0.82330,0.045690,-0.0009292,
7.098,8.000,13230.0, 411.8,0.004182,0.0305900,1962.0,-17.1100,6.1010,-0.77810,0.042660,-0.0008553,
6.910,7.786,13430.0, 414.2,0.004058,0.0311000,1903.0,-16.4500,5.8130,-0.73300,0.039630,-0.0007815,
6.728,7.580,13620.0, 416.6,0.003976,0.0316100,1865.0,-15.7900,5.5260,-0.68780,0.036600,-0.0007077,
6.551,7.380,13820.0, 419.0,0.003877,0.0321200,1819.0,-15.1300,5.2380,-0.64260,0.033570,-0.0006339,
6.739,7.592,14020.0, 421.4,0.003863,0.0326300,1812.0,-14.4700,4.9500,-0.59750,0.030530,-0.0005601,
6.212,6.996,14210.0, 423.9,0.003725,0.0331400,1747.0,-14.5600,4.9840,-0.60220,0.030820,-0.0005668,
5.517,6.210,14400.0, 426.3,0.003632,0.0336500,1703.0,-14.6500,5.0180,-0.60690,0.031110,-0.0005734,
5.219,5.874,14600.0, 428.7,0.003498,0.0341600,1640.0,-14.7400,5.0510,-0.61170,0.031410,-0.0005801,
5.071,5.706,14790.0, 433.0,0.003405,0.0346700,1597.0,-14.8300,5.0850,-0.61640,0.031700,-0.0005867,
4.926,5.542,14980.0, 433.5,0.003342,0.0351800,1567.0,-14.9100,5.1190,-0.62110,0.031990,-0.0005933,
4.787,5.386,15170.0, 435.9,0.003292,0.0356900,1544.0,-15.0000,5.1530,-0.62580,0.032280,-0.0006000,
4.893,5.505,15360.0, 438.4,0.003243,0.0362000,1521.0,-15.0900,5.1860,-0.63050,0.032570,-0.0006066,
5.028,5.657,15550.0, 440.8,0.003195,0.0367100,1499.0,-15.1800,5.2200,-0.63530,0.032860,-0.0006133,
4.738,5.329,15740.0, 443.2,0.003186,0.0372200,1494.0,-15.2700,5.2540,-0.64000,0.033150,-0.0006199,
4.574,5.144,15930.0, 442.4,0.003144,0.0377300,1475.0,-15.6700,5.3920,-0.65770,0.034180,-0.0006426,
5.200,5.851,16120.0, 441.6,0.003122,0.0382400,1464.0,-16.0700,5.5290,-0.67550,0.035210,-0.0006654,
5.070,5.704,16300.0, 440.9,0.003082,0.0387500,1446.0,-16.4700,5.6670,-0.69320,0.036240,-0.0006881,
4.945,5.563,16490.0, 440.1,0.002965,0.0392600,1390.0,-16.8800,5.8040,-0.71100,0.037270,-0.0007109,
4.476,5.034,16670.0, 439.3,0.002871,0.0397700,1347.0,-17.2800,5.9420,-0.72870,0.038300,-0.0007336,
4.856,5.460,18320.0, 438.5,0.002542,0.0402800,1354.0,-17.0200,5.8460,-0.71490,0.037400,-0.0007114,
4.308,4.843,17040.0, 487.8,0.002882,0.0407900,1352.0,-17.8400,6.1830,-0.76590,0.040760,-0.0007925,
4.723,5.311,17220.0, 537.0,0.002913,0.0413000,1366.0,-18.6600,6.5200,-0.81690,0.044110,-0.0008737,
5.319,5.982,17400.0, 586.3,0.002871,0.0418100,1347.0,-19.4800,6.8570,-0.86780,0.047470,-0.0009548,
5.956,6.700,17800.0, 677.0,0.002660,0.0423200,1336.0,-19.5500,6.8710,-0.86860,0.047480,-0.0009544,
6.158,6.928,17770.0, 586.3,0.002812,0.0428300,1319.0,-19.6200,6.8840,-0.86940,0.047480,-0.0009540,
6.204,6.979,17950.0, 586.3,0.002776,0.0433400,1302.0,-19.6900,6.8980,-0.87020,0.047490,-0.0009536,
6.181,6.954,18120.0, 586.3,0.002748,0.0438500,1289.0,-19.7600,6.9120,-0.87100,0.047490,-0.0009532,
6.949,7.820,18300.0, 586.3,0.002737,0.0443600,1284.0,-19.8300,6.9260,-0.87180,0.047500,-0.0009528,
7.506,8.448,18480.0, 586.3,0.002727,0.0448700,1279.0,-19.9000,6.9400,-0.87260,0.047510,-0.0009524,
7.649,8.609,18660.0, 586.3,0.002697,0.0453800,1265.0,-19.9700,6.9530,-0.87330,0.047510,-0.0009520,
7.710,8.679,18830.0, 586.3,0.002641,0.0458900,1239.0,-20.0400,6.9670,-0.87410,0.047520,-0.0009516,
7.407,8.336,19010.0, 586.3,0.002603,0.0464000,1221.0,-20.1100,6.9810,-0.87490,0.047520,-0.0009512,
7.290,8.204,19180.0, 586.3,0.002573,0.0469100,1207.0,-20.1800,6.9950,-0.87570,0.047530,-0.0009508
};
if ( T < 10.0 ) {
ionloss = a[i][0] * sqrt(T) ;
} else if ( T < 1000.0 ) {
G4double slow = a[i][1] * pow(T, 0.45) ;
G4double shigh = log( 1.0 + a[i][3]/T + a[i][4]*T ) * a[i][2]/T ;
ionloss = slow*shigh / (slow + shigh) ;
} else {
G4double le = log(T) ;
G4double gam = 1.0 + kineticEnergy / proton_mass_c2 ;
G4double beta2 = 1.0 - 1.0/ (gam*gam) ;
ionloss = ( log(a[i][6]*beta2/(1.0 - beta2)) - beta2 -
a[i][7] - a[i][8]*le - a[i][9]*le*le - a[i][10]*le*le*le -
a[i][11]*le*le*le*le ) * a[i][5]/beta2 ;
}
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -0,0 +1,92 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1985Nuclear
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
//
// Class Description:
//
// Nuclear stopping power parametrised according to
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hZiegler1985Nuclear.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1985Nuclear::G4hZiegler1985Nuclear():G4VhNuclearStoppingPower()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1985Nuclear::~G4hZiegler1985Nuclear()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1985Nuclear::NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double m1, G4double m2) const
{
G4double energy = kineticEnergy/keV ; // energy in keV
G4double ionloss ;
G4double rm = (m1 + m2) * sqrt( pow(z1, .23) + pow(z2, .23) ) ;
G4double er = 32.536 * m2 * energy / ( z1 * z2 * rm ) ; // reduced energy
if ( er <= 30 ) {
ionloss = 0.5*log(1+1.1383*er)/
(er+0.01312*pow(er,0.21226)+0.19593*sqrt(er)) ;
} else {
ionloss = 0.5*log(er)/er ;
}
// Stragling
if(lossFlucFlag) {
G4double sig = 4.0 * m1 * m2 / ((m1 + m2)*(m1 + m2)*
(4.0 + 0.197*pow(er,-1.6991)+6.584*pow(er,-1.0494))) ;
ionloss *= G4RandGauss::shoot(1.0,sig) ;
}
ionloss *= 8.462 * z1 * z2 * m1 / rm ; // Return to [ev/(10^15 atoms/cm^2]
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -0,0 +1,222 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
// For information related to this code contact:
// Geant4 Collaboration
//
// File name: G4hZiegler1985p
//
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
//
// Creation date: 20 July 2000
//
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 18/09/2000 V.Ivanchenko clean up - all variable are the same as in ICRU
//
// Class Description:
//
// Electronic stopping power parametrised according to
// J.F.Ziegler, J.P.Biersack, U.Littmark The Stoping and
// Range of Ions in Solids, Vol.1, Pergamon Press, 1985
//
// Class Description: End
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hZiegler1985p.hh"
#include "G4UnitsTable.hh"
#include "globals.hh"
#include "G4Material.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1985p::G4hZiegler1985p():G4VhElectronicStoppingPower(),
protonMassAMU(1.007276)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hZiegler1985p::~G4hZiegler1985p()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4hZiegler1985p::HasMaterial(const G4Material* material)
{
if(1 == (material->GetNumberOfElements())) return true;
return false ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1985p::StoppingPower(const G4Material* material,
G4double kineticEnergy)
{
G4double ionloss = 0.0 ;
// pure material (normally not the case for this function)
if(1 == (material->GetNumberOfElements())) {
G4double z = material->GetZ() ;
G4double ionloss = ElectronicStoppingPower( z, kineticEnergy ) ;
}
return ionloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4hZiegler1985p::ElectronicStoppingPower(G4double z,
G4double kineticEnergy) const
{
G4double ionloss ;
G4int i = G4int(z) - 1 ; // index of atom
if(i < 0) i = 0 ;
if(i > 91) i = 91 ;
// The data and the fit from:
// J.F.Ziegler, J.P.Biersack, U.Littmark The Stoping and
// Range of Ions in Solids, Vol.1, Pergamon Press, 1985
// Proton kinetic energy for parametrisation in Ziegler's units (keV/amu)
G4double T = kineticEnergy/(keV*protonMassAMU) ;
static G4double a[92][8] = {
0.0091827, 0.0053496, 0.69741, 0.48493, 316.07 , 1.0143, 9329.3, 0.053989,
0.11393, 0.0051984, 1.0822, 0.39252, 1081.0 , 1.0645, 4068.5, 0.017699,
0.85837, 0.0050147, 1.6044, 0.38844, 1337.3 , 1.047, 2659.2, 0.01898,
0.8781, 0.0051049, 5.4232, 0.2032 , 1200.6 , 1.0211, 1401.8, 0.038529,
1.4608, 0.0048836, 2.338, 0.44249, 1801.3 , 1.0352, 1784.1, 0.02024,
3.2579, 0.0049148, 2.7156, 0.36473, 2092.2 , 1.0291, 2643.6, 0.018237,
0.59674, 0.0050837, 4.2073, 0.30612, 2394.2 , 1.0255, 4892.1, 0.016006,
0.75253, 0.0050314, 4.0824, 0.30067, 2455.8 , 1.0181, 5069.7, 0.017426,
1.226, 0.0051385, 3.2246, 0.32703, 2525.0 , 1.0142, 7563.6, 0.019469,
1.0332, 0.0051645, 3.004, 0.33889, 2338.6 ,0.99997, 6991.2, 0.021799,
6.0972, 0.0044292, 3.1929, 0.45763, 1363.3 , 0.95182, 2380.6, 0.081835,
14.013, 0.0043646, 2.2641, 0.36326, 2187.4 , 0.99098, 6264.8, 0.0462,
0.039001, 0.0045415, 5.5463, 0.39562, 1589.2 , 0.95316, 816.16, 0.047484,
2.072, 0.0044516, 3.5585, 0.53933, 1515.2 , 0.93161, 1790.3, 0.035189,
17.575, 0.0038346, 0.078694,1.2388, 2806.0 , 0.97284, 1037.6, 0.012879,
16.126, 0.0038315, 0.054164,1.3104, 2813.3 , 0.96587, 1251.4, 0.011847,
3.217, 0.0044579, 3.6696, 0.5091, 2734.6 , 0.96253, 2187.5, 0.016907,
2.0379, 0.0044775, 3.0743, 0.54773, 3505.0 , 0.96575, 1714.0, 0.011701,
0.74171, 0.0043051, 1.1515, 0.95083, 917.21 , 0.8782, 389.93, 0.18926,
9.1316, 0.0043809, 5.4611, 0.31327, 3891.8 , 0.97933, 6267.9, 0.015196,
7.2247, 0.0043718, 6.1017, 0.37511, 2829.2 , 0.95218, 6376.1, 0.020398,
0.147, 0.0048456, 6.3485, 0.41057, 2164.1 , 0.94028, 5292.6, 0.050263,
5.0611, 0.0039867, 2.6174, 0.57957, 2218.9 , 0.92361, 6323.0, 0.025669,
0.53267, 0.0042968, 0.39005, 1.2725, 1872.7 , 0.90776, 64.166, 0.030107,
0.47697, 0.0043038, 0.31452, 1.3289, 1920.5 , 0.90649, 45.576, 0.027469,
0.027426, 0.0035443, 0.031563,2.1755, 1919.5 , 0.90099, 23.902, 0.025363,
0.16383, 0.0043042, 0.073454,1.8592, 1918.4 , 0.89678, 27.61, 0.023184,
4.2562, 0.0043737, 1.5606, 0.72067, 1546.8 , 0.87958, 302.02, 0.040944,
2.3508, 0.0043237, 2.882, 0.50113, 1837.7 , 0.89992, 2377.0, 0.04965,
3.1095, 0.0038455, 0.11477, 1.5037, 2184.7 , 0.89309, 67.306, 0.016588,
15.322, 0.0040306, 0.65391, 0.67668, 3001.7 , 0.92484, 3344.2, 0.016366,
3.6932, 0.0044813, 8.608, 0.27638, 2982.7 , 0.9276, 3166.6, 0.030874,
7.1373, 0.0043134, 9.4247, 0.27937, 2725.8 , 0.91597, 3166.1, 0.025008,
4.8979, 0.0042937, 3.7793, 0.50004, 2824.5 , 0.91028, 1282.4, 0.017061,
1.3683, 0.0043024, 2.5679, 0.60822, 6907.8 , 0.9817, 628.01, 0.0068055,
1.8301, 0.0042983, 2.9057, 0.6038, 4744.6 , 0.94722, 936.64, 0.0092242,
0.42056, 0.0041169, 0.01695, 2.3616, 2252.7 , 0.89192, 39.752, 0.027757,
30.78, 0.0037736, 0.55813, 0.76816, 7113.2 , 0.97697, 1604.4, 0.0065268,
11.576, 0.0042119, 7.0244, 0.37764, 4713.5 , 0.94264, 2493.2, 0.01127,
6.2406, 0.0041916, 5.2701, 0.49453, 4234.6 , 0.93232, 2063.9, 0.011844,
0.33073, 0.0041243, 1.7246, 1.1062, 1930.2 , 0.86907, 27.416, 0.038208,
0.017747, 0.0041715, 0.14586, 1.7305, 1803.6 , 0.86315, 29.669, 0.032123,
3.7229, 0.0041768, 4.6286, 0.56769, 1678.0 , 0.86202, 3094.0, 0.06244,
0.13998, 0.0041329, 0.25573, 1.4241, 1919.3 , 0.86326, 72.797, 0.032235,
0.2859, 0.0041386, 0.31301, 1.3424, 1954.8 , 0.86175, 115.18, 0.029342,
0.76002, 0.0042179, 3.386, 0.76285, 1867.4 , 0.85805, 69.994, 0.036448,
6.3957, 0.0041935, 5.4689, 0.41378, 1712.6 , 0.85397, 18493., 0.056471,
3.4717, 0.0041344, 3.2337, 0.63788, 1116.4 , 0.81959, 4766.0, 0.1179,
2.5265, 0.0042282, 4.532, 0.53562, 1030.8 , 0.81652, 16252., 0.19722,
7.3683, 0.0041007, 4.6791, 0.51428, 1160.0 , 0.82454, 17956., 0.13316,
7.7197, 0.004388, 3.242, 0.68434, 1428.1 , 0.83389, 1786.7, 0.066512,
16.78, 0.0041918, 9.3198, 0.29569, 3370.9 , 0.90298, 7431.7, 0.02616,
4.2132, 0.0042098, 4.6753, 0.57945, 3503.9 , 0.89261, 1468.9, 0.014359,
4.0818, 0.004214, 4.4425, 0.58393, 3945.3 , 0.90281, 1340.5, 0.013414,
0.18517, 0.0036215,0.00058788,3.5315, 2931.3 , 0.88936, 26.18, 0.026393,
4.8248, 0.0041458, 6.0934, 0.57026, 2300.1 , 0.86359, 2980.7, 0.038679,
0.49857, 0.0041054, 1.9775, 0.95877, 786.55 , 0.78509, 806.6, 0.40882,
3.2754, 0.0042177, 5.768, 0.54054, 6631.3 , 0.94282, 744.07, 0.0083026,
2.9978, 0.0040901, 4.5299, 0.62025, 2161.2 , 0.85669, 1268.6, 0.043031,
2.8701, 0.004096, 4.2568, 0.6138, 2130.4 , 0.85235, 1704.1, 0.039385,
10.853, 0.0041149, 5.8906, 0.46834, 2857.2 , 0.87550, 3654.2, 0.029955,
3.6407, 0.0041782, 4.8742, 0.57861, 1267.7 , 0.82211, 3508.2, 0.24174,
17.645, 0.0040992, 6.5855, 0.32734, 3931.3 , 0.90754, 5156.7, 0.036278,
7.5309, 0.0040814, 4.9389, 0.50679, 2519.7 , 0.85819, 3314.6, 0.030514,
5.4742, 0.0040829, 4.897, 0.51113, 2340.1 , 0.85296, 2342.7, 0.035662,
4.2661, 0.0040667, 4.5032, 0.55257, 2076.4 , 0.84151, 1666.6, 0.040801,
6.8313, 0.0040486, 4.3987, 0.51675, 2003.0 , 0.83437, 1410.4, 0.03478,
1.2707, 0.0040553, 4.6295, 0.57428, 1626.3 , 0.81858, 995.68, 0.055319,
5.7561, 0.0040491, 4.357, 0.52496, 2207.3 , 0.83796, 1579.5, 0.027165,
14.127, 0.0040596, 5.8304, 0.37755, 3645.9 , 0.87823, 3411.8, 0.016392,
6.6948, 0.0040603, 4.9361, 0.47961, 2719.0 , 0.85249, 1885.8, 0.019713,
3.0619, 0.0040511, 3.5803, 0.59082, 2346.1 , 0.83713, 1222.0, 0.020072,
10.811, 0.0033008, 1.3767, 0.76512, 2003.7 , 0.82269, 1110.6, 0.024958,
2.7101, 0.0040961, 1.2289, 0.98598, 1232.4 , 0.79066, 155.42, 0.047294,
0.52345, 0.0040244, 1.4038, 0.8551, 1461.4 , 0.79677, 503.34, 0.036789,
0.4616, 0.0040203, 1.3014, 0.87043, 1473.5 , 0.79687, 443.09, 0.036301,
0.97814, 0.0040374, 2.0127, 0.7225, 1890.8 , 0.81747, 930.7, 0.02769,
3.2086, 0.0040510, 3.6658, 0.53618, 3091.2 , 0.85602, 1508.1, 0.015401,
2.0035, 0.0040431, 7.4882, 0.3561, 4464.3 , 0.88836, 3966.5, 0.012839,
15.43, 0.0039432, 1.1237, 0.70703, 4595.7 , 0.88437, 1576.5, 0.0088534,
3.1512, 0.0040524, 4.0996, 0.5425, 3246.3 , 0.85772, 1691.8, 0.015058,
7.1896, 0.0040588, 8.6927, 0.35842, 4760.6 , 0.88833, 2888.3, 0.011029,
9.3209, 0.0040540, 11.543, 0.32027, 4866.2 , 0.89124, 3213.4, 0.011935,
29.242, 0.0036195, 0.16864, 1.1226, 5688.0 , 0.89812, 1033.3, 0.0071303,
1.8522, 0.0039973, 3.1556, 0.65096, 3755.0 , 0.86383, 1602.0, 0.012042,
3.222, 0.0040041, 5.9024, 0.52678, 4040.2 , 0.86804, 1658.4, 0.011747,
9.3412, 0.0039661, 7.921, 0.42977, 5180.9 , 0.88773, 2173.2, 0.0092007,
36.183, 0.0036003, 0.58341, 0.86747, 6990.2 , 0.91082, 1417.1, 0.0062187,
5.9284, 0.0039695, 6.4082, 0.52122, 4619.5 , 0.88083, 2323.5, 0.011627,
5.2454, 0.0039744, 6.7969, 0.48542, 4586.3 , 0.87794, 2481.5, 0.011282,
33.702, 0.0036901, 0.47257, 0.89235, 5295.7 , 0.8893, 2053.3, 0.0091908,
2.7589, 0.0039806, 3.2092, 0.66122, 2505.4 , 0.82863, 2065.1, 0.022816
};
G4double e = T ;
if ( T < 25.0 ) e = 25.0 ;
// universal approximation
G4double slow = a[i][0] * pow(e, a[i][1]) + a[i][2] * pow(e, a[i][3]) ;
G4double shigh = log( a[i][6]/e + a[i][7]*e ) * a[i][4] / pow(e, a[i][5]) ;
ionloss = slow*shigh / (slow + shigh) ;
// low energy region
if ( T < 25.0 ) {
G4double s = 0.45 ;
// light elements
if(6.5 > z) s = 0.25 ;
// semiconductors
if(5 == i || 13 == i || 31 == i) s = 0.375 ;
ionloss *= pow(T/25.0, s) ;
}
if ( ionloss < 0.0) ionloss = 0.0 ;
return ionloss;
}
@@ -1,187 +0,0 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------
// GEANT 4 class implementation file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4ionLowEnergyIonisation physics process -----
// by Vladimir Ivanchenko, 6 September 1999
// was made on the base of G4hLowEnergyIonisation class
// ************************************************************
// It is the extention of the ionisation process for the slow
// charged ions.
// ************************************************************
// 6 September 1999 V.Ivanchenko create
// 30 September 1999 V.Ivanchenko minor upgrade
// 20 January 2000 V.Ivanchenko minor bag fixed
// ------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4ionLowEnergyIonisation.hh"
#include "G4UnitsTable.hh"
#include "G4EnergyLossTables.hh"
#include "G4ParticleDefinition.hh"
#include "G4Proton.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ionLowEnergyIonisation::G4ionLowEnergyIonisation(const G4String& processName)
: G4hLowEnergyIonisation(processName)
{
LowestKineticEnergy = 10.*eV ;
HighestKineticEnergy = 100.*TeV ;
TotBin = 200 ;
MassRatio = 1.0 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ionLowEnergyIonisation::~G4ionLowEnergyIonisation()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionLowEnergyIonisation::SetIonDefinition(G4ParticleDefinition* theIonType)
{
theParticle = theIonType ;
MassRatio = proton_mass_c2/(theParticle->GetPDGMass()) ;
Charge = (theParticle->GetPDGCharge())/eplus ;
G4cout << "New ion with Q = " << Charge << "; MassR = " << MassRatio << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4ionLowEnergyIonisation::GetLowEnergyForParametrisation(const G4Material* material)
{
// The low limit of paramerisation of ionisation energy from:
// J.F.Ziegler, J.P. Biersack, U. Littmark
// The Stopping and Range of Ions in Matter,
// Vol.1, Pergamon Press, 1985
// Below this limit the free electron gas model is used
// hadrons or ions with charge +-1
if(Charge < 1.5) return ParamLowEnergy/MassRatio ;
// helium or ions with charge = +2
if(Charge < 2.5) return ParamLowEnergy ;
// get elements in the actual material,
const G4ElementVector* theElementVector = material->GetElementVector() ;
const G4double* theAtomicNumDensityVector = material->GetAtomicNumDensityVector() ;
const G4int NumberOfElements = material->GetNumberOfElements() ;
G4double Z = 0.0, Norm = 0.0 ;
// only 1 element in the material
if( 1 == NumberOfElements ) {
Z = material->GetZ() ;
// loop for the elements in the material
// to find out average value of Z
} else {
for (G4int iel=0; iel<NumberOfElements; iel++)
{
const G4Element* element = (*theElementVector)(iel) ;
G4double Z2 = element->GetZ() ;
const G4double W2 = theAtomicNumDensityVector[iel] ;
Norm += W2 ;
Z += Z2 * W2 ;
}
Z /= Norm ;
}
G4double E1 = 3.25 * keV ;
G4double E2 = 25.0 * keV / pow(Z, 0.667) ;
E1 = G4std::max (E1, E2) ;
E1 = G4std::max(ParamLowEnergy, E1) / MassRatio ;
return E1 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4ionLowEnergyIonisation::GetIonLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double MeanLoss)
// calculate actual loss from the mean loss
// The model used to get the fluctuation is the same as in Glandz in Geant3.
{
G4double ChargeSquare = Charge*Charge ;
G4double loss = GetLossWithFluct(aParticle, aMaterial, MeanLoss/ChargeSquare) * ChargeSquare ;
return loss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionLowEnergyIonisation::PrintInfoDefinition()
{
G4String comments = " Knock-on electron cross sections . ";
comments += "\n Good description above the mean excitation energy.\n";
comments += " delta ray energy sampled from differential Xsection.";
G4cout << G4endl << GetProcessName() << ": " << comments
<< "\n PhysicsTables from " << G4BestUnit(LowestKineticEnergy,
"Energy")
<< " to " << G4BestUnit(HighestKineticEnergy,"Energy")
<< " in " << TotBin << " bins."
<< "\n Low energy losses approximation is taken from " << DEDXtable
<< "\n from " << G4BestUnit(ParamLowEnergy,"Energy")
<< " to " << G4BestUnit(ParamHighEnergy,"Energy") << "." << G4endl ;
if(nStopping) {
G4cout << " Simulation of nuclear stopping is switched on. \n" << G4endl ;
}
}
+10 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.2 2000/06/07 16:54:26 maire Exp $
$Id: History,v 1.5 2000/11/08 14:29:11 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,15 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
08 nov 00: mma (muons-V02-00-03)
- signature in GetLossWithFluct changed L.Urban 30/10/00
11 aug 00: mma (muons-V02-00-01)
03 aug 00: gc (muons-V02-00-00r)
- G4VIMuEnergyLoss.cc: changed RandGauss to G4RandGauss to fix problem of
events' reproducibility.
07 jun 00: mma (muons-V01-01-03)
- virtual destructor for G4VEnergyLoss
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuBremsstrahlung.hh,v 1.3 2000/04/25 14:18:57 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuBremsstrahlung.icc,v 1.2 1999/12/15 14:51:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuIonisation.hh,v 1.3 2000/04/25 14:18:58 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuIonisation.icc,v 1.2 1999/12/15 14:51:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuPairProduction.hh,v 1.3 2000/04/25 14:18:58 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuPairProduction.icc,v 1.2 1999/12/15 14:51:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuBremsstrahlung.hh,v 1.8 2000/05/23 09:55:37 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuBremsstrahlung.icc,v 1.3 1999/12/15 14:51:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuIonisation.hh,v 1.8 2000/04/25 14:18:58 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuIonisation.icc,v 1.2 1999/12/15 14:51:43 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ---------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuPairProduction.hh,v 1.8 2000/05/23 16:03:25 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuPairProduction.icc,v 1.3 2000/02/10 08:29:13 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VIMuEnergyLoss.hh,v 1.2 2000/06/07 16:50:21 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4VIMuEnergyLoss.hh,v 1.3 2000/08/15 09:40:16 urban Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// -------------------------------------------------------------------
@@ -112,7 +112,10 @@ class G4VIMuEnergyLoss : public G4IVContinuousDiscreteProcess
G4Material *aMaterial);
G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
G4Material *aMaterial) ;
G4Material *aMaterial,
G4double ChargeSquare,
G4double MeanLoss,
G4double Step ) ;
protected:
@@ -263,6 +266,7 @@ class G4VIMuEnergyLoss : public G4IVContinuousDiscreteProcess
// data members to speed up the fluctuation calculation
G4Material *lastMaterial ;
G4int imat ;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VIMuEnergyLoss.icc,v 1.1 2000/04/25 14:18:59 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VMuEnergyLoss.hh,v 1.2 2000/06/07 16:50:21 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
// -------------------------------------------------------------------
// GEANT 4 class header file
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VMuEnergyLoss.icc,v 1.1 2000/04/25 14:18:59 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuBremsstrahlung.cc,v 1.4 2000/04/25 14:19:00 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuIonisation.cc,v 1.4 2000/04/25 14:19:01 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4IMuPairProduction.cc,v 1.5 2000/04/25 14:19:01 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// --------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuBremsstrahlung.cc,v 1.12 2000/05/23 09:58:48 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuIonisation.cc,v 1.11 2000/05/23 09:58:47 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4MuPairProduction.cc,v 1.15 2000/05/23 09:58:49 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
@@ -5,15 +5,15 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VIMuEnergyLoss.cc,v 1.1 2000/04/25 14:19:02 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4VIMuEnergyLoss.cc,v 1.3 2000/08/15 09:40:41 urban Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// $Id:
// --------------------------------------------------------------
// GEANT 4 class implementation file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// GEANT4 Collaboration
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4VIMuEnergyLoss physics process -----------
@@ -1313,7 +1313,7 @@ G4VParticleChange* G4VIMuEnergyLoss::AlongStepDoIt(
fMeanLoss = E-0.5*(discr-RangeCoeffB)/RangeCoeffA ;
// now the loss with fluctuation
finalT = E-GetLossWithFluct(aParticle,aMaterial) ;
finalT = E-GetLossWithFluct(aParticle,aMaterial,1.,fMeanLoss,Step) ;
if (finalT < 0.) finalT = 0. ;
}
}
@@ -1337,191 +1337,234 @@ G4VParticleChange* G4VIMuEnergyLoss::AlongStepDoIt(
}
G4double G4VIMuEnergyLoss::GetLossWithFluct(const G4DynamicParticle *aParticle,
G4Material *aMaterial)
// calculate actual loss from the mean loss
// The model used to get the fluctuation is the same as in
// sr GLANDZ in GEANT3.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4VIMuEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double ChargeSquare,
G4double MeanLoss,
G4double step )
{
// calculate actual loss from the mean loss
// The model used to get the fluctuation is essentially the same as in Glandz in Geant3.
static const G4double minLoss = 1.*eV ;
static const G4double probLim = 0.01 ;
static const G4double sumaLim = -log(probLim) ;
static const G4double alim=10.;
static const G4double kappa = 10. ;
static const G4double factor = twopi_mc2_rcl2 ;
// check if the material has changed ( cache mechanism)
if(aMaterial == lastMaterial)
;
else
{
lastMaterial= aMaterial;
f1Fluct = aMaterial->GetIonisation()->GetF1fluct();
f2Fluct = aMaterial->GetIonisation()->GetF2fluct();
e1Fluct = aMaterial->GetIonisation()->GetEnergy1fluct();
e2Fluct = aMaterial->GetIonisation()->GetEnergy2fluct();
e1LogFluct = aMaterial->GetIonisation()->GetLogEnergy1fluct();
e2LogFluct = aMaterial->GetIonisation()->GetLogEnergy2fluct();
rateFluct = aMaterial->GetIonisation()->GetRateionexcfluct();
ipotFluct = aMaterial->GetIonisation()->GetMeanExcitationEnergy();
ipotLogFluct= aMaterial->GetIonisation()->GetLogMeanExcEnergy();
}
if (aMaterial != lastMaterial)
{
lastMaterial = aMaterial;
imat = aMaterial->GetIndex();
f1Fluct = aMaterial->GetIonisation()->GetF1fluct();
f2Fluct = aMaterial->GetIonisation()->GetF2fluct();
e1Fluct = aMaterial->GetIonisation()->GetEnergy1fluct();
e2Fluct = aMaterial->GetIonisation()->GetEnergy2fluct();
e1LogFluct = aMaterial->GetIonisation()->GetLogEnergy1fluct();
e2LogFluct = aMaterial->GetIonisation()->GetLogEnergy2fluct();
rateFluct = aMaterial->GetIonisation()->GetRateionexcfluct();
ipotFluct = aMaterial->GetIonisation()->GetMeanExcitationEnergy();
ipotLogFluct = aMaterial->GetIonisation()->GetLogMeanExcEnergy();
}
G4double Tkin,rmass,tau,tau1,tau2,Tm,w1,w2,w3,lnw3,C,prob,
beta2,suma,e0,Em,loss,lossc ,w ;
G4double a1,a2,a3 ;
G4long p1,p2,p3 ;
G4int nb ;
G4double Corrfac, na,alfa,rfac,namean,sa,alfa1,ea,sea ;
G4double dp1,dnmaxDirectFluct,dp3,dnmaxCont2 ;
G4double threshold,w1,w2,C,
beta2,suma,e0,loss,lossc ,w,electronDensity;
G4double a1,a2,a3;
G4int p1,p2,p3;
G4int nb;
G4double Corrfac, na,alfa,rfac,namean,sa,alfa1,ea,sea;
G4double dp1,dp3;
G4double siga ;
// shortcut for very very small loss
if(MeanLoss < minLoss) return MeanLoss ;
// get particle data
// get particle data
G4double Tkin = aParticle->GetKineticEnergy();
ParticleMass = aParticle->GetMass() ;
Tkin = aParticle->GetKineticEnergy();
threshold =((*G4Electron::Electron()).GetCutsInEnergy())[imat];
G4double rmass = electron_mass_c2/ParticleMass;
G4double tau = Tkin/ParticleMass, tau1 = tau+1., tau2 = tau*(tau+2.);
G4double Tm = 2.*electron_mass_c2*tau2/(1.+2.*tau1*rmass+rmass*rmass);
rmass=electron_mass_c2/ParticleMass;
tau = Tkin/ParticleMass;
tau1 = tau+1.;
tau2 = tau*(tau+2.);
Tm = 2.*electron_mass_c2*tau2/(1.+2.*tau1*rmass+rmass*rmass)
-ipotFluct;
if (Tm<0.)
Tm = 0.;
else if (Tm>ParticleCutInKineticEnergyNow)
Tm = ParticleCutInKineticEnergyNow ;
if (Tm <= ipotFluct) Tm = ipotFluct ;
w1 = Tm+ipotFluct;
w2 = w1/ipotFluct;
w3 = 2.*electron_mass_c2*tau2;
lnw3 = log(w3);
if(Tm > threshold) Tm = threshold;
beta2 = tau2/(tau1*tau1);
C = (1.-rateFluct)*fMeanLoss/(lnw3-ipotLogFluct-beta2);
a1 = C*f1Fluct*(lnw3-e1LogFluct-beta2)/e1Fluct;
a2 = C*f2Fluct*(lnw3-e2LogFluct-beta2)/e2Fluct;
if(Tm>0.)
a3 = rateFluct*fMeanLoss*Tm/(ipotFluct*w1*log(w2));
else
// Gaussian fluctuation ?
if(MeanLoss >= kappa*Tm)
{
a1 /= rateFluct;
a2 /= rateFluct;
a3 = 0.;
electronDensity = aMaterial->GetElectronDensity() ;
siga = sqrt(MeanLoss*Tm*(0.5-0.25*beta2)*step*
factor*electronDensity*ChargeSquare/beta2) ;
loss = G4RandGauss::shoot(MeanLoss,siga) ;
if(loss < 0.) loss = 0. ;
return loss ;
}
w1 = Tm/ipotFluct;
w2 = log(2.*electron_mass_c2*tau2);
suma = a1+a2+a3 ;
C = MeanLoss*(1.-rateFluct)/(w2-ipotLogFluct-beta2);
if ( suma>MaxExcitationNumber)
// no fluctuation if the loss is too big................
loss = fMeanLoss ;
a1 = C*f1Fluct*(w2-e1LogFluct-beta2)/e1Fluct;
a2 = C*f2Fluct*(w2-e2LogFluct-beta2)/e2Fluct;
if(Tm > ipotFluct)
a3 = rateFluct*MeanLoss*(Tm-ipotFluct)/(ipotFluct*Tm*log(w1));
else
// fluctuation....................................
{
a1 /= 1.-rateFluct ;
a2 /= 1.-rateFluct ;
a3 = 0. ;
}
if(suma<50.)
prob = exp(-suma) ;
else
prob = 0.;
suma = a1+a2+a3;
if( prob>probLimFluct)
// very small Step
{
e0 = aMaterial->GetIonisation()->GetEnergy0fluct();
loss = 0. ;
if( Tm<= 0.)
if(suma < sumaLim) // very small Step
{
a1=fMeanLoss/e0;
p1 = G4Poisson(a1);
loss = p1*e0 ;
}
else
{
Em = Tm+e0;
a1 = fMeanLoss*(Em-e0)/(Em*e0*log(Em/e0));
p1 = G4Poisson(a1);
w = (Em-e0)/Em;
// just to save time .....
if ( p1> nmaxDirectFluct)
e0 = aMaterial->GetIonisation()->GetEnergy0fluct();
if(Tm == ipotFluct)
{
dp1 = p1;
dnmaxDirectFluct=nmaxDirectFluct;
Corrfac = dp1/dnmaxDirectFluct;
p1 = nmaxDirectFluct;
a3 = MeanLoss/e0;
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
}
p3 = G4Poisson(a3);
loss = p3*e0 ;
if(p3 > 0)
loss += (1.-2.*G4UniformRand())*e0 ;
}
else
{
Tm = Tm-ipotFluct+e0 ;
a3 = MeanLoss*(Tm-e0)/(Tm*e0*log(Tm/e0));
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
}
else
p3 = G4Poisson(a3);
if(p3 > 0)
{
w = (Tm-e0)/Tm ;
if(p3 > nmaxCont2)
{
dp3 = G4float(p3) ;
Corrfac = dp3/G4float(nmaxCont2) ;
p3 = nmaxCont2 ;
}
else
Corrfac = 1. ;
for(G4int i=0; i<p3; i++) loss += 1./(1.-w*G4UniformRand()) ;
loss *= e0*Corrfac ;
}
}
}
else // not so small Step
{
// excitation type 1
if(a1>alim)
{
siga=sqrt(a1) ;
p1 = G4std::max(0,int(G4RandGauss::shoot(a1,siga)+0.5));
}
else
Corrfac = 1.;
p1 = G4Poisson(a1);
loss =0.;
for (long i=0; i<p1; i++)
loss += 1./(1.-w*G4UniformRand());
loss *= e0;
// excitation type 2
if(a2>alim)
{
siga=sqrt(a2) ;
p2 = G4std::max(0,int(G4RandGauss::shoot(a2,siga)+0.5));
}
else
p2 = G4Poisson(a2);
loss *= Corrfac ;
loss = p1*e1Fluct+p2*e2Fluct;
// smearing to avoid unphysical peaks
if(p2 > 0)
loss += (1.-2.*G4UniformRand())*e2Fluct;
else if (loss>0.)
loss += (1.-2.*G4UniformRand())*e1Fluct;
}
}
else
// not so small Step ...
{
p1 = G4Poisson(a1);
p2 = G4Poisson(a2);
loss = p1*e1Fluct+p2*e2Fluct;
if(loss>0.)
loss += (1.-2.*G4UniformRand())*e1Fluct;
p3 = G4Poisson(a3);
// direct sampling of the 'ionization' loss
// --------it is slow-------------------
// w = Tm/(Tm+ipotFluct);
// lossc = 0.;
// for (long j=0; j<p3; j++)
// lossc += 1./(1.-G4UniformRand()*w);
// lossc *= ipotFluct;
// loss += lossc ;
// just to save computing time ....
lossc = 0.;
na = 0.;
alfa = 1.;
if( p3>nmaxCont2)
// ionisation .......................................
if(a3 > 0.)
{
dp3= p3 ;
dnmaxCont2 = nmaxCont2;
rfac=dp3/(dnmaxCont2+dp3);
namean=p3*rfac;
sa=nmaxCont1*rfac;
na=RandGauss::shoot(namean,sa);
if(a3>alim)
{
siga=sqrt(a3) ;
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
}
else
if(na>0.)
{
alfa=w2*(nmaxCont2+p3)/(w2*nmaxCont2+p3);
alfa1=alfa*log(alfa)/(alfa-1.);
ea=na*ipotFluct*alfa1;
sea=ipotFluct*sqrt(na*(alfa-alfa1*alfa1));
lossc +=RandGauss::shoot(ea,sea);
p3 = G4Poisson(a3);
}
lossc = 0.;
if(p3 > 0)
{
na = 0.;
alfa = 1.;
if (p3 > nmaxCont2)
{
dp3 = G4float(p3);
rfac = dp3/(G4float(nmaxCont2)+dp3);
namean = G4float(p3)*rfac;
sa = G4float(nmaxCont1)*rfac;
na = G4RandGauss::shoot(namean,sa);
if (na > 0.)
{
alfa = w1*G4float(nmaxCont2+p3)/(w1*G4float(nmaxCont2)+G4float(p3));
alfa1 = alfa*log(alfa)/(alfa-1.);
ea = na*ipotFluct*alfa1;
sea = ipotFluct*sqrt(na*(alfa-alfa1*alfa1));
lossc += G4RandGauss::shoot(ea,sea);
}
}
nb = G4int(G4float(p3)-na);
if (nb > 0)
{
w2 = alfa*ipotFluct;
w = (Tm-w2)/Tm;
for (G4int k=0; k<nb; k++) lossc += w2/(1.-w*G4UniformRand());
}
}
loss += lossc;
}
}
nb = G4int(p3-na);
if(nb>0)
{
w2=alfa*ipotFluct;
w=(w1-w2)/w1;
for (G4int k=0; k<nb; k++)
lossc += w2/(1.-w*G4UniformRand());
}
loss += lossc ;
}
}
return loss ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VMuEnergyLoss.cc,v 1.5 2000/06/13 16:36:25 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4VMuEnergyLoss.cc,v 1.7 2000/10/30 07:17:30 urban Exp $
// GEANT4 tag $Name: geant4-03-00 $
// --------------------------------------------------------------
// GEANT 4 class implementation file
//
@@ -24,6 +24,7 @@
// corrections by L.Urban on 27/05/98 (other corrs come soon!)
// cleanup L.Urban on 23/10/98
// corrections due to new e.m. structure L.Urban 10/02/00
// signature in GetLossWithFluct changed L.Urban 30/10/00
// --------------------------------------------------------------
@@ -432,7 +433,7 @@ G4VParticleChange* G4VMuEnergyLoss::AlongStepDoIt(
if ((EnlossFlucFlag) && (finalT > 0.) && (finalT < E)&&(E > LowerBoundEloss))
{
finalT = E-GetLossWithFluct(aParticle,aMaterial,MeanLoss);
finalT = E-GetLossWithFluct(aParticle,aMaterial,1.,MeanLoss,Step);
if (finalT < 0.) finalT = 0. ;
}

Some files were not shown because too many files have changed in this diff Show More