Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -1,4 +1,4 @@
$Id: History,v 1.60 2002/06/10 16:10:32 maire Exp $
$Id: History,v 1.70 2002/12/04 14:58:27 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,10 +17,41 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10 june 02: mma (stand-V04-00-13)
04 dec 02: V.Ivant (stand-V04-01-07)
- fix d-electron spectra for STD
20 nov 02: G.Cosmo (stand-V04-01-06)
- G4PAIonisation[.hh.icc.cc]: patched access to public static data.
Added static accessor to be used in the kernel for inline functions
to allow porting on Windows DLLs.
12 nov 02: V.Ivant (stand-V04-01-05)
- eBremsstrahlung::BuiltLossTable: fix of division by 0 (G4int nn)
28 oct 02: V.Ivant (stand-V04-01-04)
- fix compilation warnings for STD classes
17 oct 02: V.Ivant (stand-V04-01-03)
- few changes in all xSTD processes in connection with LossTableBuilder
15 oct 02: V.Ivant (stand-V04-01-02)
- redesign for a Model approach: files processNameSTD and processNameModel
14 oct 02: mma (stand-V04-01-01)
- G4PAIxSection and G4PAIonisation : put back on the HEAD the versions as they
are in Geant4-04-01-ref-03, namely:
G4PAIxSection hh:1.7 cc:1.10
G4PAIonisation hh:1.12 icc:1.10 cc:1.23
G4PAIxSectionTest.cc:1.7 G4PAIdNdxTest.cc:1.1 GNUmakefile:1.1
07 aug 02: mma (stand-V04-01-00)
- GammaConversionToMuons::DoIt : missprint in OR conditions | instead of ||
10 jun 02: mma (stand-V04-00-13)
- bug fixed for stopping hadrons, V.Ivanchenko
04 june 02: mma (stand-V04-00-12)
04 jun 02: mma (stand-V04-00-12)
- suppress the G4PAIonisation stuff which crash in TestEm8
(back to stand-V04-00-10)
@@ -73,7 +104,6 @@ committal in the CVS repository !
- gammaConversion::ComputeCrossSection(): correction of extrapolation below
EnergyLimit
>>>>>>> 1.49
10 jan 02: mma
- photoEffect: rearrangement in the inlined functions
@@ -22,7 +22,7 @@
//
//
// $Id: G4ComptonScattering.hh,v 1.9 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//------------------ G4ComptonScattering physics process -----------------------
// by Michel Maire, April 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4ComptonScattering.icc,v 1.8 2001/09/21 09:50:53 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//------------------ G4ComptonScattering physics process -----------------------
// by Michel Maire, April 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4GammaConversion.hh,v 1.10 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//------------------ G4GammaConversion physics process -------------------------
// by Michel Maire, 24 May 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4GammaConversion.icc,v 1.7 2001/09/17 17:07:11 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ------------ G4GammaConversion physics process -------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4GammaConversionToMuons.hh,v 1.2 2002/05/06 09:32:41 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------ G4GammaConversionToMuons physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
@@ -22,7 +22,7 @@
//
//
// $Id: G4GammaConversionToMuons.icc,v 1.1 2002/04/19 14:44:33 hbu Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------ G4GammaConversionToMuons physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
@@ -0,0 +1,139 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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 header file
//
//
// File name: G4MollerBhabhaModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 07.01.2002
//
// Modifications:
//
// Class Description:
//
// Implementation of energy loss process and delta-electrons production
// of electrons and positrons
// -------------------------------------------------------------------
//
#ifndef G4MollerBhabhaModel_h
#define G4MollerBhabhaModel_h 1
#include "G4VEmModel.hh"
class G4MollerBhabhaModel : public G4VEmModel
{
public:
G4MollerBhabhaModel(const G4ParticleDefinition* p = 0);
~G4MollerBhabhaModel();
G4double HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
G4double LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
void SetHighEnergyLimit(const G4Material*, G4double e) {highKinEnergy = e;};
void SetLowEnergyLimit(const G4Material*, G4double e) {lowKinEnergy = e;};
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4Material*);
G4bool IsInCharge(const G4ParticleDefinition*,
const G4Material*);
G4double ComputeDEDX(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double CrossSection(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy);
G4std::vector<G4DynamicParticle*>* SampleSecondary(
const G4Material*,
const G4DynamicParticle*,
G4double tmin,
G4double maxEnergy);
G4double MaxSecondaryEnergy(const G4DynamicParticle*);
protected:
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kinEnergy);
private:
void SetParticle(const G4ParticleDefinition* p);
// hide assignment operator
G4MollerBhabhaModel & operator=(const G4MollerBhabhaModel &right);
G4MollerBhabhaModel(const G4MollerBhabhaModel&);
const G4ParticleDefinition* particle;
G4ParticleDefinition* theElectron;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double twoln10;
G4double lowLimit;
G4bool isElectron;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy(
const G4ParticleDefinition* p,
G4double kinEnergy)
{
G4double tmax = kinEnergy;
if(isElectron) tmax *= 0.5;
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy(const G4DynamicParticle* dp)
{
G4double tmax = dp->GetKineticEnergy();
if(isElectron) tmax *= 0.5;
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PAIonisation.hh,v 1.12 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4PAIonisation.hh,v 1.16 2002/11/20 15:41:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ------------------------------------------------------------
@@ -144,7 +144,10 @@ class G4PAIonisation : public G4VPAIenergyLoss
// Compute Sandia photoabsorption coefficient matrix
void ComputeSandiaPhotoAbsCof() ;
private:
G4PhysicsLogVector* GetProtonEnergyVector();
private:
@@ -192,11 +195,3 @@ class G4PAIonisation : public G4VPAIenergyLoss
#include "G4PAIonisation.icc"
#endif
@@ -124,7 +124,7 @@ GetMeanFreePath( const G4Track& trackData,
for(iTkin=0;iTkin<G4PAIonisation::GetBinNumber();iTkin++)
{
if(scaledE < fProtonEnergyVector->GetLowEdgeEnergy(iTkin)) // <= ?
if(scaledE < GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin)) // <= ?
{
break ;
}
@@ -143,8 +143,8 @@ GetMeanFreePath( const G4Track& trackData,
}
else
{
E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ;
E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ;
E1 = GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin - 1) ;
E2 = GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin) ;
W = 1.0/(E2 - E1) ;
W1 = (E2 - scaledE)*W ;
W2 = (scaledE - E1)*W ;
@@ -173,7 +173,7 @@ GetFreePath( G4double scaledTkin, G4double charge2 )
for( iTkin = 0 ; iTkin < G4PAIonisation::GetBinNumber() ; iTkin++ )
{
if(scaledTkin < fProtonEnergyVector->GetLowEdgeEnergy(iTkin)) break ;
if(scaledTkin < GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin)) break ;
}
iPlace = iTkin - 1 ;
@@ -189,8 +189,8 @@ GetFreePath( G4double scaledTkin, G4double charge2 )
}
else
{
E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ;
E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ;
E1 = GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin - 1) ;
E2 = GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin) ;
W = 1.0/(E2 - E1) ;
W1 = (E2 - scaledTkin)*W ;
W2 = (scaledTkin - E1)*W ;
@@ -219,7 +219,7 @@ GetdEdx( G4double scaledTkin, G4double charge2 )
for( iTkin = 0 ; iTkin < G4PAIonisation::GetBinNumber() ; iTkin++ )
{
if(scaledTkin < fProtonEnergyVector->GetLowEdgeEnergy(iTkin)) break ;
if(scaledTkin < GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin)) break ;
}
iPlace = iTkin - 1 ;
@@ -235,8 +235,8 @@ GetdEdx( G4double scaledTkin, G4double charge2 )
}
else
{
E1 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin - 1) ;
E2 = fProtonEnergyVector->GetLowEdgeEnergy(iTkin) ;
E1 = GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin - 1) ;
E2 = GetProtonEnergyVector()->GetLowEdgeEnergy(iTkin) ;
W = 1.0/(E2 - E1) ;
W1 = (E2 - scaledTkin)*W ;
W2 = (scaledTkin - E1)*W ;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PAIxSection.hh,v 1.7 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4PAIxSection.hh,v 1.9 2002/10/14 17:30:10 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// G4PAIxSection.hh -- header file
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhotoElectricEffect.hh,v 1.15 2002/05/02 11:37:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhotoElectricEffect.icc,v 1.10 2002/04/18 10:12:01 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: G4PolarizedComptonScattering.hh,v 1.7 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// --------- G4PolarizedComptonScattering physics process ----------------------
// by Vicente Lara, March 1998
@@ -22,7 +22,7 @@
//
//
// $Id: G4SynchrotronRadiation.hh,v 1.7 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VPAIenergyLoss.hh,v 1.8 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VeEnergyLoss.hh,v 1.11 2002/04/09 17:34:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -----------------------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VeEnergyLoss.icc,v 1.7 2001/11/09 13:56:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VhEnergyLoss.hh,v 1.15 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------- G4VhEnergyLoss physics process --------------------------------
// by Laszlo Urban, 30 May 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4VhEnergyLoss.icc,v 1.5 2002/02/26 18:11:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ---------------- G4VhEnergyLoss physics process -----------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4eBremsstrahlung.hh,v 1.14 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ------------ G4eBremsstrahlung physics process ------
@@ -22,7 +22,7 @@
//
//
// $Id: G4eBremsstrahlung.icc,v 1.6 2001/08/09 17:24:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------ G4eBremsstrahlung physics process ---------
// by Michel Maire, 27 July 1996
@@ -0,0 +1,201 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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 header file
//
//
// File name: G4eBremsstrahlungModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 07.01.2002
//
// Modifications:
//
// Class Description:
//
// Implementation of energy loss for gamma emission by electrons and
// positrons
// -------------------------------------------------------------------
//
#ifndef G4eBremsstrahlungModel_h
#define G4eBremsstrahlungModel_h 1
#include "G4VEmModel.hh"
class G4eBremsstrahlungModel : public G4VEmModel
{
public:
G4eBremsstrahlungModel(const G4ParticleDefinition* p = 0);
~G4eBremsstrahlungModel();
G4double HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
G4double LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
void SetHighEnergyLimit(const G4Material*, G4double e) {highKinEnergy = e;};
void SetLowEnergyLimit(const G4Material*, G4double e) {lowKinEnergy = e;};
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4Material*);
G4bool IsInCharge(const G4ParticleDefinition*,
const G4Material*);
G4double ComputeDEDX(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double CrossSection(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy);
G4std::vector<G4DynamicParticle*>* SampleSecondary(
const G4Material*,
const G4DynamicParticle*,
G4double tmin,
G4double maxEnergy);
void SetLPMflag(G4bool val) {theLPMflag = val;};
G4bool LPMflag() const {return theLPMflag;};
virtual G4double MaxSecondaryEnergy(
const G4DynamicParticle* dynParticle);
protected:
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy);
private:
void SetParticle(const G4ParticleDefinition* p);
G4double ComputeBremLoss(G4double Z, G4double tkin, G4double cut, G4double x);
G4double PositronCorrFactorLoss(G4double Z, G4double tkin, G4double cut);
G4double PositronCorrFactorSigma(G4double Z, G4double tkin, G4double cut);
G4double CrossSectionPerAtom(G4double tkin, G4double Z, G4double cut);
void ComputePartialSumSigma(const G4Material* material, G4double tkin,
G4double cut);
const G4Element* SelectRandomAtom(const G4Material* material) const;
G4double SupressionFunction(const G4Material* material, G4double tkin,
G4double gammaEnergy);
G4double ScreenFunction1(G4double ScreenVariable);
G4double ScreenFunction2(G4double ScreenVariable);
// hide assignment operator
G4eBremsstrahlungModel & operator=(const G4eBremsstrahlungModel &right);
G4eBremsstrahlungModel(const G4eBremsstrahlungModel&);
const G4ParticleDefinition* particle;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double minThreshold;
G4double probsup;
G4double MigdalConstant;
G4double LPMconstant;
G4bool isElectron;
G4bool theLPMflag;
const G4Material* oldMaterial;
G4std::vector<G4DataVector*> partialSumSigma;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungModel::ScreenFunction1(G4double ScreenVariable)
// compute the value of the screening function 3*PHI1 - PHI2
{
G4double screenVal;
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 42.392 - ScreenVariable* (7.796 - 1.961*ScreenVariable);
return screenVal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungModel::ScreenFunction2(G4double ScreenVariable)
// compute the value of the screening function 1.5*PHI1 - 0.5*PHI2
{
G4double screenVal;
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 41.734 - ScreenVariable* (6.484 - 1.250*ScreenVariable);
return screenVal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(
const G4DynamicParticle* dynParticle)
{
return dynParticle->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(
const G4ParticleDefinition*,
G4double kineticEnergy)
{
return kineticEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,103 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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 header file
//
//
// File name: G4eBremsstrahlungSTD
//
// Author: Laszlo Urban
//
// Creation date: 24.06.1996
//
// Modifications:
//
// 01-10-96 new type G4OrderedTable; ComputePartialSumSigma()
// 20-03-97 new energy loss+ionisation+brems scheme, L.Urban
// 01-09-98 new method PrintInfo()
// 10-02-00 modifications , new e.m. structure, L.Urban
// 07-08-00 new cross section/en.loss parametrisation, LPM flag , L.Urban
// 09-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 19-09-01 come back to previous process name "eBrem"
// 29-10-01 all static functions no more inlined (mma)
// 07-01-02 new design of em processes (V.Ivanchenko)
//
//
// Class Description:
//
// This class manages the bremsstrahlung for e-/e+
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLoss.
//
// -------------------------------------------------------------------
//
#ifndef G4eBremsstrahlungSTD_h
#define G4eBremsstrahlungSTD_h 1
#include "G4VEnergyLossSTD.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
class G4Material;
class G4eBremsstrahlungSTD : public G4VEnergyLossSTD
{
public:
G4eBremsstrahlungSTD(const G4String& name = "eBrem");
~G4eBremsstrahlungSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (&p == G4Electron::Electron() || &p == G4Positron::Positron());};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*, G4double cut)
{return cut;};
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{return dynParticle->GetKineticEnergy();};
private:
void InitialiseProcess();
// hide assignment operator
G4eBremsstrahlungSTD & operator=(const G4eBremsstrahlungSTD &right);
G4eBremsstrahlungSTD(const G4eBremsstrahlungSTD&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4eIonisation.hh,v 1.16 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//--------------- G4eIonisation physics process --------------------------------
// by Laszlo Urban, 20 March 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4eIonisation.icc,v 1.10 2001/11/09 13:56:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//----------------- G4eIonisation physics process ------------------------------
@@ -0,0 +1,130 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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 header file
//
//
// File name: G4eIonisationSTD
//
// Author: Laszlo Urban
//
// Creation date: 20.03.1997
//
// Modifications:
//
// 10-02-00 modifications , new e.m. structure, L.Urban
// 03-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 13-08-01 new function ComputeRestrictedMeandEdx() (mma)
// 19-09-01 come back to previous ProcessName "eIoni"
// 29-10-01 all static functions no more inlined (mma)
// 07-01-02 new design of em processes (V.Ivanchenko)
//
//
// Class Description:
//
// This class manages the ionisation process for e-/e+
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLoss.
//
// -------------------------------------------------------------------
//
#ifndef G4eIonisationSTD_h
#define G4eIonisationSTD_h 1
#include "G4VEnergyLossSTD.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
class G4Material;
class G4ParticleDefinition;
class G4eIonisationSTD : public G4VEnergyLossSTD
{
public:
G4eIonisationSTD(const G4String& name = "eIoni");
~G4eIonisationSTD();
G4bool IsApplicable(const G4ParticleDefinition& p);
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*, G4double cut);
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dp);
private:
void InitialiseProcess();
// hide assignment operator
G4eIonisationSTD & operator=(const G4eIonisationSTD &right);
G4eIonisationSTD(const G4eIonisationSTD&);
const G4ParticleDefinition* theElectron;
G4bool isElectron;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eIonisationSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
G4double x = cut;
if(isElectron) x += cut;
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4eIonisationSTD::IsApplicable(const G4ParticleDefinition& p)
{
return (&p == G4Electron::Electron() || &p == G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eIonisationSTD::MaxSecondaryEnergy(const G4DynamicParticle* dp)
{
G4double tmax = dp->GetKineticEnergy();
if(isElectron) tmax *= 0.5;
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4eplusAnnihilation.hh,v 1.10 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: G4eplusAnnihilation.icc,v 1.8 2001/09/17 17:07:11 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: G4hIonisation.hh,v 1.20 2002/03/27 21:43:55 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// --------------- G4hIonisation physics process -------------------------------
// by Laszlo Urban, 30 May 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4hIonisation.icc,v 1.11 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//------------------ G4hIonisation physics process -----------------------------
@@ -0,0 +1,129 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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 header file
//
//
// File name: G4hIonisationSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1997
//
// Modifications:
//
// corrected by L.Urban on 24/09/97
// corrected by L.Urban on 13/01/98
// bugs fixed by L.Urban on 02/02/99
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to previous process name "hIoni"
// 29-10-01 all static functions no more inlined
//
// Class Description:
//
// This class manages the ionisation process for hadrons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLoss.
//
// -------------------------------------------------------------------
//
#ifndef G4hIonisationSTD_h
#define G4hIonisationSTD_h 1
#include "G4VEnergyLossSTD.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
class G4Material;
class G4hIonisationSTD : public G4VEnergyLossSTD
{
public:
G4hIonisationSTD(const G4String& name = "hIoni");
~G4hIonisationSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
virtual const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
private:
void InitialiseProcess();
// hide assignment operator
G4hIonisationSTD & operator=(const G4hIonisationSTD &right);
G4hIonisationSTD(const G4hIonisationSTD&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4double mass;
G4double ratio;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4hIonisationSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double y = electron_mass_c2/mass;
G4double g = x*y + sqrt((1. + x)*(1. + x*y*y));
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4hIonisationSTD::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
G4double gamma= dynParticle->GetKineticEnergy()/mass + 1.0;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,146 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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 header file
//
//
// File name: G4ionIonisation
//
// Author: Vladimir Ivanchenko
//
// Creation date: 07.05.2002
//
// Modifications:
//
//
// Class Description:
//
// This class manages the ionisation process for ions.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLoss.
//
// -------------------------------------------------------------------
//
#ifndef G4ionIonisation_h
#define G4ionIonisation_h 1
#include "G4VEnergyLossSTD.hh"
class G4ParticleDefinition;
class G4Track;
class G4Step;
class G4Material;
class G4VEffectiveChargeModel;
class G4ionIonisation : public G4VEnergyLossSTD
{
public:
G4ionIonisation(const G4String& name = "ionIoni");
~G4ionIonisation();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
private:
void InitialiseProcess();
// hide assignment operator
G4ionIonisation & operator=(const G4ionIonisation &right);
G4ionIonisation(const G4ionIonisation&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4ionIonisation::MinPrimaryEnergy(
const G4ParticleDefinition* p, const G4Material*, G4double cut)
{
G4double mass = p->GetPDGMass();
G4double x = 0.5*cut/electron_mass_c2;
// G4double y = electron_mass_c2/mass;
// G4double g = x*y + sqrt((1. + x)*(1. + x*y*y));
G4double g = sqrt(1. + x);
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4ionIonisation::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
G4double mass = dynParticle->GetMass();
G4double gamma = dynParticle->GetKineticEnergy()/mass + 1.0;
G4double ratio = electron_mass_c2/mass;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4ionIonisation::GetMeanFreePath(const G4Track& track,
G4double step,
G4ForceCondition* cond)
{
const G4DynamicParticle* dp = track.GetDynamicParticle();
G4double mRatio = proton_mass_c2/dp->GetMass();
G4double q = dp->GetCharge()/eplus;
G4double q_2 = q*q;
SetMassRatio(mRatio);
SetReduceFactor(1.0/(q_2*mRatio));
SetChargeSquare(q_2);
SetChargeSquareRatio(q_2);
return G4VEnergyLossSTD::GetMeanFreePath(track, step, cond);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4ComptonScattering.cc,v 1.16 2002/04/18 10:12:01 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//------------ G4ComptonScattering physics process -----------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4GammaConversion.cc,v 1.17 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//------------------ G4GammaConversion physics process -------------------------
// by Michel Maire, 24 May 1996
@@ -21,11 +21,14 @@
// ********************************************************************
//
//
// $Id: G4GammaConversionToMuons.cc,v 1.3 2002/05/06 09:32:41 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4GammaConversionToMuons.cc,v 1.4 2002/08/07 10:53:25 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------ G4GammaConversionToMuons physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
//
//
// 07-08-02: missprint in OR condition in DoIt : f1<0 || f1>f1_max ..etc ...
// ---------------------------------------------------------------------------
#include "G4GammaConversionToMuons.hh"
@@ -78,7 +81,6 @@ G4double G4GammaConversionToMuons::ComputeCrossSectionPerAtom(
// It gives a good description at any energy (from 0 to 10**21 eV)
{ static const G4double Mmuon=G4MuonPlus::MuonPlus()->GetPDGMass();
static const G4double Mele=electron_mass_c2;
static const G4double GammaEnergyLimit=4* Mmuon;
static const G4double Rc=elm_coupling/Mmuon; // classical particle radius
static const G4double sqrte=sqrt(exp(1.));
static const G4double PowSat=-0.88;
@@ -209,7 +211,7 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
do
{ t=G4UniformRand();
f1=(1.-2.*xPM+4.*xPM*t*(1.-t)) / (1.+C1/(t*t));
if(f1<0 | f1> f1_max) // should never happend
if(f1<0 || f1> f1_max) // should never happend
{ G4cout << "outside allowed range f1=" << f1 << G4endl;
exit(1);
}
@@ -223,7 +225,7 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
do
{ psi=2.*pi*G4UniformRand();
f2=1.-2.*xPM+4.*xPM*t*(1.-t)*(1.+cos(2.*psi));
if(f2<0 | f2> f2_max) // should never happend
if(f2<0 || f2> f2_max) // should never happend
{ G4cout << "outside allowed range f2=" << f2 << G4endl;
exit(1);
}
@@ -245,7 +247,7 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
thetaPlus =GammaMuonInv*(u+xiHalf)/xPlus;
thetaMinus=GammaMuonInv*(u-xiHalf)/xMinus;
} while ( abs(thetaPlus)>pi | abs(thetaMinus) >pi);
} while ( abs(thetaPlus)>pi || abs(thetaMinus) >pi);
// now construct the vectors
// azimuthal symmetry, take phi0 at random between 0 and 2 pi
@@ -0,0 +1,352 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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
//
//
// File name: G4MollerBhabhaModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 03.01.2002
//
// Modifications: 13.11.2002 Minor fix - use normalised direction (VI)
// 04.12.2002 Change G4DynamicParticle constructor in PostStepDoIt (VI)
//
//
// Class Description:
//
// Implementation of energy loss and delta-electron production by e+/e-
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4MollerBhabhaModel.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MollerBhabhaModel::G4MollerBhabhaModel(const G4ParticleDefinition* p)
: G4VEmModel(),
particle(0),
highKinEnergy(100.*TeV),
lowKinEnergy(0.1*keV),
twoln10(2.0*log(10.0)),
lowLimit(0.2*keV),
isElectron(true)
{
if(p) SetParticle(p);
theElectron = G4Electron::Electron();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MollerBhabhaModel::~G4MollerBhabhaModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p)
{
particle = p;
if(p != theElectron) isElectron = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MollerBhabhaModel::HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*)
{
return highKinEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MollerBhabhaModel::LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*)
{
return lowKinEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MollerBhabhaModel::MinEnergyCut(const G4ParticleDefinition* p,
const G4Material* material)
{
return material->GetIonisation()->GetMeanExcitationEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4MollerBhabhaModel::IsInCharge(const G4ParticleDefinition* p,
const G4Material*)
{
return (p == theElectron || p == G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MollerBhabhaModel::ComputeDEDX(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy)
{
if(!particle) SetParticle(p);
// calculate the dE/dx due to the ionization by Seltzer-Berger formula
G4double electronDensity = material->GetElectronDensity();
G4double Zeff = electronDensity/material->GetTotNbOfAtomsPerVolume();
G4double th = 0.25*sqrt(Zeff)*keV;
G4double tkin = kineticEnergy;
if (kineticEnergy < th) tkin = th;
G4double tau = tkin/electron_mass_c2;
G4double gam = tau + 1.0;
G4double gamma2= gam*gam;
G4double beta2 = 1. - 1./gamma2;
G4double bg2 = beta2*gamma2;
G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
eexc /= electron_mass_c2;
G4double eexc2 = eexc*eexc;
G4double dedx;
G4double d = G4std::min(cutEnergy, MaxSecondaryEnergy(p, tkin))/electron_mass_c2;
// electron
if (isElectron) {
dedx = log(2.0*(tau + 2.0)/eexc2) - 1.0 - beta2
+ log((tau-d)*d) + tau/(tau-d)
+ (0.5*d*d + (2.0*tau + 1.)*log(1. - d/tau))/gamma2;
//positron
} else {
G4double d2 = d*d*0.5;
G4double d3 = d2*d/1.5;
G4double d4 = d3*d*3.75;
G4double y = 1.0/(1.0 + gam);
dedx = log(2.0*(tau + 2.0)/eexc2) + log(tau*d)
- beta2*(tau + 2.0*d - y*(3.0*d2
+ y*(d - d3 + y*(d2 - tau*d3 + d4))))/tau;
}
//density correction
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 x = log(bg2)/twoln10;
if (x >= x0den) {
dedx -= twoln10*x - cden;
if (x < x1den) dedx -= aden*pow(x1den-x, mden);
}
// now you can compute the total ionization loss
dedx *= twopi_mc2_rcl2*electronDensity/beta2;
if (dedx < 0.0) dedx = 0.0;
// lowenergy extrapolation
if (kineticEnergy < tkin) {
if (kineticEnergy >= lowLimit) dedx *= sqrt(kineticEnergy/tkin);
else dedx *= sqrt(kineticEnergy*tkin)/lowLimit;
}
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MollerBhabhaModel::CrossSection(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy)
{
if(!particle) SetParticle(p);
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
tmax = G4std::min(maxEnergy, tmax);
if(cutEnergy < tmax) {
G4double xmin = cutEnergy/kineticEnergy;
G4double xmax = tmax/kineticEnergy;
G4double gam = kineticEnergy/electron_mass_c2 + 1.0;
G4double gamma2= gam*gam;
G4double beta2 = 1.0 - 1.0/gamma2;
//Moller (e-e-) scattering
if (isElectron) {
G4double g = (2.0*gam - 1.0)/gamma2;
cross = ((xmax - xmin)*(1.0 - g + 1.0/(xmin*xmax)
+ 1.0/((1.0-xmin)*(1.0 - xmax)))
- g*log( xmax*(1.0 - xmin)/(xmin*(1.0 - xmax)) ) ) / beta2;
//Bhabha (e+e-) scattering
} else {
G4double y = 1.0/(1.0 + gam);
G4double y2 = y*y;
G4double y12 = 1.0 - 2.0*y;
G4double b1 = 2.0 - y2;
G4double b2 = y12*(3.0 + y2);
G4double y122= y12*y12;
G4double b4 = y122*y12;
G4double b3 = b4 + y122;
cross = (xmax - xmin)*(1.0/(beta2*xmin*xmax) + b2
- 0.5*b3*(xmin + xmax)
+ b4*(xmin*xmin + xmin*xmax + xmax*xmax)/3.0)
- b1*log(xmax/xmin);
}
cross *= twopi_mc2_rcl2*(material->GetElectronDensity())/kineticEnergy;
}
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4std::vector<G4DynamicParticle*>* G4MollerBhabhaModel::SampleSecondary(
const G4Material* material,
const G4DynamicParticle* dp,
G4double tmin,
G4double maxEnergy)
{
G4double tmax = G4std::min(maxEnergy, MaxSecondaryEnergy(dp));
if(tmin >= tmax) return 0;
G4double kineticEnergy = dp->GetKineticEnergy();
G4double energy = kineticEnergy + electron_mass_c2;
G4double totalMomentum = sqrt(kineticEnergy*(energy + electron_mass_c2));
G4double xmin = tmin/kineticEnergy;
G4double xmax = tmax/kineticEnergy;
G4double gam = energy/electron_mass_c2;
G4double gamma2 = gam*gam;
G4double beta2 = 1.0 - 1.0/gamma2;
G4double x, z, q, grej;
G4ThreeVector momentum = dp->GetMomentumDirection();
//Moller (e-e-) scattering
if (isElectron) {
G4double g = (2.0*gam - 1.0)/gamma2;
G4double y = 1.0 - xmax;
grej = 1.0 - g*xmax + xmax*xmax*(1.0 - g + (1.0 - g*y)/(y*y));
do {
q = G4UniformRand();
x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
y = 1.0 - x;
z = 1.0 - g*x + x*x*(1.0 - g + (1.0 - g*y)/(y*y));
if(z > grej) {
G4cout << "G4MollerBhabhaModel::SampleSecondary Warning! "
<< "Majorant " << grej << " < "
<< z << " for x= " << x
<< " e-e- scattering"
<< G4endl;
}
} while(grej * G4UniformRand() > z);
//Bhabha (e+e-) scattering
} else {
G4double y = 1.0/(1.0 + gam);
G4double y2 = y*y;
G4double y12 = 1.0 - 2.0*y;
G4double b1 = 2.0 - y2;
G4double b2 = y12*(3.0 + y2);
G4double y122= y12*y12;
G4double b4 = y122*y12;
G4double b3 = b4 + y122;
y = xmax*xmax;
grej = -xmin*b1;
grej += y*b2;
grej -= xmin*xmin*xmin*b3;
grej += y*y*b4;
grej *= beta2;
grej += 1.0;
do {
q = G4UniformRand();
x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
z = -x*b1;
y = x*x;
z += y*b2;
y *= x;
z -= y*b3;
y *= x;
z += y*b4;
z *= beta2;
z += 1.0;
if(z > grej) {
G4cout << "G4MollerBhabhaModel::SampleSecondary Warning! "
<< "Majorant " << grej << " < "
<< z << " for x= " << x
<< " e+e- scattering"
<< G4endl;
}
} while(grej * G4UniformRand() > z);
}
G4double deltaKinEnergy = x * kineticEnergy;
G4double deltaMomentum =
sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
(deltaMomentum * totalMomentum);
G4double sint = sqrt(1.0 - cost*cost);
G4double phi = twopi * G4UniformRand() ;
G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
deltaDirection.rotateUz(momentum);
// create G4DynamicParticle object for delta ray
G4DynamicParticle* delta = new G4DynamicParticle();
delta->SetDefinition(theElectron);
delta->SetKineticEnergy(deltaKinEnergy);
delta->SetMomentumDirection(deltaDirection);
G4std::vector<G4DynamicParticle*>* vdp = new G4std::vector<G4DynamicParticle*>;
vdp->push_back(delta);
return vdp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PAIonisation.cc,v 1.23 2002/04/09 17:34:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4PAIonisation.cc,v 1.31 2002/11/20 15:41:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// **************************************************************
@@ -112,8 +112,6 @@ G4PAIonisation::~G4PAIonisation()
delete[] fSandiaPhotoAbsCof[i] ;
}
delete[] fSandiaPhotoAbsCof ;
// if(fProtonEnergyVector) delete fProtonEnergyVector ;
}
/////////////////////////////////////////////////////////////////////////
@@ -816,17 +814,15 @@ G4PAIonisation::GetEnergyTransfer( G4int iPlace, G4double position, G4int iTrans
return result ;
}
///////////////////////////////////////////////////////////////////////
//
// Returns the proton energy vector
G4PhysicsLogVector* G4PAIonisation::GetProtonEnergyVector()
{
return fProtonEnergyVector;
}
//
//
/////////////////////////////////////////////////////////////////////////
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PAIxSection.cc,v 1.10 2002/04/09 17:34:42 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4PAIxSection.cc,v 1.13 2002/10/14 17:34:12 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// G4PAIxSection.cc -- class implementation file
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhotoElectricEffect.cc,v 1.27 2002/05/02 11:37:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: G4PolarizedComptonScattering.cc,v 1.9 2002/04/09 17:34:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//---------- G4PolarizedComptonScattering physics process ----------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4SynchrotronRadiation.cc,v 1.7 2002/04/09 17:34:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VPAIenergyLoss.cc,v 1.6 2002/04/09 17:34:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -----------------------------------------------------------
// GEANT 4 class implementation file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VeEnergyLoss.cc,v 1.25 2002/04/09 17:34:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -----------------------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VhEnergyLoss.cc,v 1.35 2002/06/10 15:38:14 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -----------------------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4eBremsstrahlung.cc,v 1.25 2002/04/09 17:34:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4eBremsstrahlung.cc,v 1.27 2002/11/12 17:04:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ------------ G4eBremsstrahlung physics process --------
@@ -46,6 +46,8 @@
// 21-09-01 completion of RetrievePhysicsTable() (mma)
// 29-10-01 all static functions no more inlined (mma)
// 08-11-01 particleMass becomes a local variable
// 11-11-02 fix of division by 0 (VI)
//
// --------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -275,15 +277,15 @@ void G4eBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aParticleType
G4double floss = 0. ;
G4int nmax = 100 ;
G4int nn ;
G4double vmin=log(kmin);
G4double vmax=log(kmax) ;
nn = int(nmax*(vmax-vmin)/(log(HighestKineticEnergy)-vmin)) ;
G4int nn = (G4int)(nmax*(vmax-vmin)/(log(HighestKineticEnergy)-vmin)) ;
G4double u,fac,c,v,dv ;
dv = (vmax-vmin)/nn ;
v = vmin-dv ;
if(nn > 0)
{
dv = (vmax-vmin)/nn ;
v = vmin-dv ;
for(G4int n=0; n<=nn; n++)
{
v += dv; u = exp(v);
@@ -496,6 +498,7 @@ G4double G4eBremsstrahlung::ComputeMeanFreePath(
(*theElementVector)[i]->GetZ(),
GammaEnergyCut );
}
// now compute the correction due to the supression(s)
G4double kmax = KineticEnergy ;
@@ -512,15 +515,15 @@ G4double G4eBremsstrahlung::ComputeMeanFreePath(
{
G4double fsig = 0.;
G4int nmax = 100 ;
G4int nn ;
G4double vmin=log(kmin);
G4double vmax=log(kmax) ;
nn = int(nmax*(vmax-vmin)/(log(HighestKineticEnergy)-vmin));
G4int nn = (G4int)(nmax*(vmax-vmin)/(log(HighestKineticEnergy)-vmin));
G4double u,fac,c,v,dv,y ;
dv = (vmax-vmin)/nn ;
v = vmin-dv ;
if(nn > 0)
{
dv = (vmax-vmin)/nn ;
v = vmin-dv ;
for(G4int n=0; n<=nn; n++)
{
v += dv; u = exp(v);
@@ -989,7 +992,6 @@ G4double G4eBremsstrahlung::SupressionFunction(const G4Material* aMaterial,
splim = LPMGammaEnergyLimit2/(LPMGammaEnergyLimit2+MigdalConstant*TotalEnergySquare*
(aMaterial->GetElectronDensity())) ;
w = 1.+1./splim ;
Cnorm = 2./(sqrt(w*w+4.)-w) ;
sp = GammaEnergySquare/(GammaEnergySquare+MigdalConstant*TotalEnergySquare*
(aMaterial->GetElectronDensity())) ;
@@ -1000,6 +1002,8 @@ G4double G4eBremsstrahlung::SupressionFunction(const G4Material* aMaterial,
{
if ((1.-sp) < 1.e-6) w = s2lpm*(3.-sp);
else w = s2lpm*(1.+1./sp);
Cnorm = 2./(sqrt(w*w+4.)-w) ;
supr = Cnorm*(sqrt(w*w+4.*s2lpm)-w)/2. ;
}
else supr = sp;
@@ -0,0 +1,871 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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
//
//
// File name: G4eBremsstrahlungModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 03.01.2002
//
// Modifications:
//
// 11-11-02 Fix division by 0 (VI)
// 04-12-02 Change G4DynamicParticle constructor in PostStep (VI)
//
// Class Description:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4eBremsstrahlungModel.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Gamma.hh"
#include "Randomize.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eBremsstrahlungModel::G4eBremsstrahlungModel(const G4ParticleDefinition* p)
: G4VEmModel(),
particle(0),
highKinEnergy(100.*TeV),
lowKinEnergy(1.0*keV),
minThreshold(1.0*keV),
probsup(1.0),
MigdalConstant(classic_electr_radius*electron_Compton_length*electron_Compton_length/pi),
LPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(8.*pi*hbarc)),
isElectron(true),
theLPMflag(true),
oldMaterial(0)
{
if(p) SetParticle(p);
partialSumSigma.clear();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eBremsstrahlungModel::~G4eBremsstrahlungModel()
{
size_t n = partialSumSigma.size();
if(n > 0) {
for(size_t i=0; i<n; i++) {
delete partialSumSigma[i];
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungModel::SetParticle(const G4ParticleDefinition* p)
{
particle = p;
if(p == G4Electron::Electron()) isElectron = true;
else isElectron = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*)
{
return highKinEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*)
{
return lowKinEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition* p,
const G4Material*)
{
return minThreshold;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4eBremsstrahlungModel::IsInCharge(const G4ParticleDefinition* p,
const G4Material*)
{
return (p == G4Electron::Electron() || p == G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::ComputeDEDX(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy)
{
if(!particle) SetParticle(p);
if(kineticEnergy < lowKinEnergy) return 0.0;
const G4double thigh = 100.*GeV;
const G4double xhigh = log(thigh/electron_mass_c2);
G4double cut = G4std::min(cutEnergy, kineticEnergy);
G4double x, rate, loss;
const G4double factorHigh = 36./(1450.*GeV);
const G4double coef1 = -0.5;
const G4double coef2 = 2./9.;
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomicNumDensityVector = material->GetAtomicNumDensityVector();
G4double totalEnergy = kineticEnergy + electron_mass_c2;
G4double dedx = 0.0;
// loop for elements in the material
for (size_t i=0; i<material->GetNumberOfElements(); i++) {
G4double Z = (*theElementVector)[i]->GetZ();
G4double natom = theAtomicNumDensityVector[i];
// loss for MinKinEnergy<KineticEnergy<=100 GeV
if (kineticEnergy <= thigh) {
x = log(totalEnergy/electron_mass_c2);
loss = ComputeBremLoss(Z, kineticEnergy, cut, x) ;
if (!isElectron) loss *= PositronCorrFactorLoss(Z, kineticEnergy, cut);
// extrapolation for KineticEnergy>100 GeV
} else if(cut < thigh) {
loss = ComputeBremLoss(Z, thigh, cut, xhigh) ;
if (!isElectron) loss *= PositronCorrFactorLoss(Z, thigh, cut) ;
rate = cut/kineticEnergy;
loss *= (1. + coef1*rate + coef2*rate*rate);
rate = cut/thigh;
loss /= (1.+coef1*rate+coef2*rate*rate);
} else {
loss = ComputeBremLoss(Z, thigh, 0.5*thigh, xhigh) ;
if (!isElectron) loss *= PositronCorrFactorLoss(Z, thigh, 0.5*thigh) ;
rate = cut/kineticEnergy;
loss *= (1. + coef1*rate + coef2*rate*rate);
loss *= cut*factorHigh;
}
loss *= natom;
G4double kp2 = MigdalConstant*totalEnergy*totalEnergy
* (material->GetElectronDensity()) ;
// now compute the correction due to the supression(s)
G4double kmin = 1.*eV;
G4double kmax = cut;
if (kmax > kmin) {
G4double floss = 0.;
G4int nmax = 100;
G4double vmin=log(kmin);
G4double vmax=log(kmax) ;
G4int nn = (G4int)(nmax*(vmax-vmin)/(log(highKinEnergy)-vmin)) ;
G4double u,fac,c,v,dv ;
if(nn > 0) {
dv = (vmax-vmin)/nn ;
v = vmin-dv ;
for(G4int n=0; n<=nn; n++) {
v += dv;
u = exp(v);
fac = u*SupressionFunction(material,kineticEnergy,u);
fac *= probsup*(u*u/(u*u+kp2))+1.-probsup;
if ((n==0)||(n==nn)) c=0.5;
else c=1. ;
fac *= c ;
floss += fac ;
}
floss *=dv/(kmax-kmin);
} else {
floss = 1.;
}
if(floss > 1.) floss = 1.;
// correct the loss
loss *= floss;
}
dedx += loss;
}
if(dedx < 0.) dedx = 0.;
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::ComputeBremLoss(G4double Z, G4double T,
G4double Cut, G4double x)
// compute loss due to soft brems
{
static const G4double beta=1.0, ksi=2.0;
static const G4double clossh = 0.254 , closslow = 1./3. , alosslow = 1. ;
static const G4double Tlim= 10.*MeV ;
static const G4double xlim = 1.2 ;
static const G4int NZ = 8 ;
static const G4int Nloss = 11 ;
static const G4double ZZ[NZ] =
{2.,4.,6.,14.,26.,50.,82.,92.};
static const G4double coefloss[NZ][Nloss] = {
// Z=2
{ 0.98916, 0.47564, -0.2505, -0.45186, 0.14462,
0.21307, -0.013738, -0.045689, -0.0042914, 0.0034429,
0.00064189},
// Z=4
{ 1.0626, 0.37662, -0.23646, -0.45188, 0.14295,
0.22906, -0.011041, -0.051398, -0.0055123, 0.0039919,
0.00078003},
// Z=6
{ 1.0954, 0.315, -0.24011, -0.43849, 0.15017,
0.23001, -0.012846, -0.052555, -0.0055114, 0.0041283,
0.00080318},
// Z=14
{ 1.1649, 0.18976, -0.24972, -0.30124, 0.1555,
0.13565, -0.024765, -0.027047, -0.00059821, 0.0019373,
0.00027647},
// Z=26
{ 1.2261, 0.14272, -0.25672, -0.28407, 0.13874,
0.13586, -0.020562, -0.026722, -0.00089557, 0.0018665,
0.00026981},
// Z=50
{ 1.3147, 0.020049, -0.35543, -0.13927, 0.17666,
0.073746, -0.036076, -0.013407, 0.0025727, 0.00084005,
-1.4082e-05},
// Z=82
{ 1.3986, -0.10586, -0.49187, -0.0048846, 0.23621,
0.031652, -0.052938, -0.0076639, 0.0048181, 0.00056486,
-0.00011995},
// Z=92
{ 1.4217, -0.116, -0.55497, -0.044075, 0.27506,
0.081364, -0.058143, -0.023402, 0.0031322, 0.0020201,
0.00017519}
} ;
static G4double aaa = 0.414;
static G4double bbb = 0.345;
static G4double ccc = 0.460;
G4int iz = 0;
G4double delz = 1.e6;
for (G4int ii=0; ii<NZ; ii++)
{
G4double dz = abs(Z-ZZ[ii]);
if(dz < delz) {
iz = ii;
delz = dz;
}
}
G4double xx = log10(T);
G4double fl = 1.;
if (xx <= xlim)
{
fl = coefloss[iz][Nloss-1];
for (G4int j=Nloss-2; j>=0; j--) fl = fl*xx+coefloss[iz][j];
if (fl < 0.) fl = 0.;
}
G4double loss;
G4double E = T+electron_mass_c2 ;
loss = Z*(Z+ksi)*E*E/(T+E)*exp(beta*log(Cut/T))*(2.-clossh*exp(log(Z)/4.));
if (T <= Tlim) loss /= exp(closslow*log(Tlim/T));
if( T <= Cut) loss *= exp(alosslow*log(T/Cut));
// correction
loss *= (aaa+bbb*T/Tlim)/(1.+ccc*T/Tlim);
loss *= fl;
loss /= Avogadro;
return loss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::PositronCorrFactorLoss(G4double Z,
G4double kineticEnergy, G4double cut)
//calculates the correction factor for the energy loss due to bremsstrahlung for positrons
//the same correction is in the (discrete) bremsstrahlung
{
static const G4double K = 132.9416*eV ;
static const G4double a1=4.15e-1, a3=2.10e-3, a5=54.0e-5 ;
G4double x = log(kineticEnergy/(K*Z*Z)), x2 = x*x, x3 = x2*x;
G4double eta = 0.5+atan(a1*x+a3*x3+a5*x3*x2)/pi;
G4double e0 = cut/kineticEnergy;
G4double factor = 0.0;
if (e0 < 1.0) {
factor=log(1.-e0)/eta;
factor=exp(factor);
}
factor = eta*(1.-factor)/e0;
return factor;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::CrossSection(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy)
{
if(!particle) SetParticle(p);
G4double cross = 0.0;
G4double tmax = G4std::min(maxEnergy, kineticEnergy);
G4double cut = G4std::max(cutEnergy, minThreshold);
if(cut >= tmax) return cross;
const G4ElementVector* theElementVector = material->GetElementVector() ;
const G4double* theAtomNumDensityVector = material->GetAtomicNumDensityVector();
if(material != oldMaterial) {
oldMaterial = material;
ComputePartialSumSigma(material, 0.5*highKinEnergy,
G4std::min(cutEnergy, 0.25*highKinEnergy));
}
for (size_t i=0; i<material->GetNumberOfElements(); i++) {
cross += theAtomNumDensityVector[i] * CrossSectionPerAtom(kineticEnergy,
(*theElementVector)[i]->GetZ(), cut);
if(tmax < kineticEnergy) {
cross -= theAtomNumDensityVector[i] * CrossSectionPerAtom(kineticEnergy,
(*theElementVector)[i]->GetZ(), tmax);
}
}
// now compute the correction due to the supression(s)
G4double kmax = tmax;
G4double kmin = cut;
G4double totalEnergy = kineticEnergy+electron_mass_c2 ;
G4double kp2 = MigdalConstant*totalEnergy*totalEnergy*(material->GetElectronDensity());
G4double fsig = 0.;
G4int nmax = 100;
G4double vmin=log(kmin);
G4double vmax=log(kmax) ;
G4int nn = (G4int)(nmax*(vmax-vmin)/(log(highKinEnergy)-vmin));
G4double u,fac,c,v,dv,y ;
if(nn > 0) {
dv = (vmax-vmin)/nn ;
v = vmin-dv ;
for(G4int n=0; n<=nn; n++) {
v += dv;
u = exp(v);
fac = SupressionFunction(material, kineticEnergy, u);
y = u/kmax;
fac *= (4.-4.*y+3.*y*y)/3.;
fac *= probsup*(u*u/(u*u+kp2))+1.-probsup;
if ((n==0)||(n==nn)) c=0.5;
else c=1. ;
fac *= c;
fsig += fac;
}
y = kmin/kmax ;
fsig *=dv/(-4.*log(y)/3.-4.*(1.-y)/3.+0.5*(1.-y*y));
} else {
fsig = 1.;
}
if (fsig > 1.) fsig = 1.;
// correct the cross section
cross *= fsig;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::CrossSectionPerAtom(G4double kineticEnergy,
G4double Z, G4double cut)
// Calculates the cross section per atom in GEANT4 internal units.
//
{
G4double cross = 0.0 ;
if ( kineticEnergy < 1*keV || kineticEnergy < cut) return cross;
static const G4double ksi=2.0, alfa=1.00;
static const G4double csigh = 0.127, csiglow = 0.25, asiglow = 0.020*MeV ;
static const G4double Tlim = 10.*MeV ;
static const G4double xlim = 1.2 ;
static const G4int NZ = 8 ;
static const G4int Nsig = 11 ;
static const G4double ZZ[NZ] =
{2.,4.,6.,14.,26.,50.,82.,92.} ;
static const G4double coefsig[NZ][Nsig] = {
// Z=2
{ 0.4638, 0.37748, 0.32249, -0.060362, -0.065004,
-0.033457, -0.004583, 0.011954, 0.0030404, -0.0010077,
-0.00028131},
// Z=4
{ 0.50008, 0.33483, 0.34364, -0.086262, -0.055361,
-0.028168, -0.0056172, 0.011129, 0.0027528, -0.00092265,
-0.00024348},
// Z=6
{ 0.51587, 0.31095, 0.34996, -0.11623, -0.056167,
-0.0087154, 0.00053943, 0.0054092, 0.00077685, -0.00039635,
-6.7818e-05},
// Z=14
{ 0.55058, 0.25629, 0.35854, -0.080656, -0.054308,
-0.049933, -0.00064246, 0.016597, 0.0021789, -0.001327,
-0.00025983},
// Z=26
{ 0.5791, 0.26152, 0.38953, -0.17104, -0.099172,
0.024596, 0.023718, -0.0039205, -0.0036658, 0.00041749,
0.00023408},
// Z=50
{ 0.62085, 0.27045, 0.39073, -0.37916, -0.18878,
0.23905, 0.095028, -0.068744, -0.023809, 0.0062408,
0.0020407},
// Z=82
{ 0.66053, 0.24513, 0.35404, -0.47275, -0.22837,
0.35647, 0.13203, -0.1049, -0.034851, 0.0095046,
0.0030535},
// Z=92
{ 0.67143, 0.23079, 0.32256, -0.46248, -0.20013,
0.3506, 0.11779, -0.1024, -0.032013, 0.0092279,
0.0028592}
} ;
G4int iz = 0 ;
G4double delz = 1.e6 ;
for (G4int ii=0; ii<NZ; ii++)
{
if(abs(Z-ZZ[ii]) < delz)
{
iz = ii ;
delz = abs(Z-ZZ[ii]);
}
}
G4double xx = log10(kineticEnergy) ;
G4double fs = 1. ;
if (xx <= xlim) {
fs = coefsig[iz][Nsig-1] ;
for (G4int j=Nsig-2; j>=0; j--) {
fs = fs*xx+coefsig[iz][j] ;
}
if(fs < 0.) fs = 0.;
}
cross = Z*(Z+ksi)*(1.-csigh*exp(log(Z)/4.))*pow(log(kineticEnergy/cut),alfa);
if (kineticEnergy <= Tlim)
cross *= exp(csiglow*log(Tlim/kineticEnergy))*(1.+asiglow/(sqrt(Z)*kineticEnergy));
if (!isElectron)
cross *= PositronCorrFactorSigma(Z, kineticEnergy, cut);
cross *= fs/Avogadro ;
if (cross < 0.) cross = 0.;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::PositronCorrFactorSigma( G4double Z,
G4double kineticEnergy, G4double cut)
//Calculates the correction factor for the total cross section of the positron bremsstrahl.
// Eta is the ratio of positron to electron energy loss by bremstrahlung.
// A parametrized formula from L. Urban is used to estimate eta. It is a fit to the results
// of L. Kim & al: Phys Rev. A33,3002 (1986)
{
static const G4double K = 132.9416*eV;
static const G4double a1 = 4.15e-1, a3 = 2.10e-3, a5 = 54.0e-5;
G4double x = log(kineticEnergy/(K*Z*Z));
G4double x2 = x*x;
G4double x3 = x2*x;
G4double eta = 0.5 + atan(a1*x + a3*x3 + a5*x3*x2)/pi ;
G4double alfa = (1. - eta)/eta;
return eta*pow((1. - cut/kineticEnergy), alfa);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungModel::ComputePartialSumSigma(const G4Material* material,
G4double kineticEnergy,
G4double cut)
// Build the table of cross section per element. The table is built for MATERIALS.
// This table is used by DoIt to select randomly an element in the material.
{
size_t index = material->GetIndex();
G4int nElements = material->GetNumberOfElements();
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomNumDensityVector = material->GetAtomicNumDensityVector();
G4DataVector* dv;
if (index >= partialSumSigma.size()) {
dv = new G4DataVector();
partialSumSigma.push_back(dv);
} else {
dv = partialSumSigma[index];
dv->clear();
}
G4double cross = 0.0;
for (G4int i=0; i<nElements; i++ ) {
cross += theAtomNumDensityVector[i] * CrossSectionPerAtom(kineticEnergy,
(*theElementVector)[i]->GetZ(), cut);
dv->push_back(cross);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4std::vector<G4DynamicParticle*>* G4eBremsstrahlungModel::SampleSecondary(
const G4Material* material,
const G4DynamicParticle* dp,
G4double tmin,
G4double maxEnergy)
// The emitted gamma energy is sampled using a parametrized formula from L. Urban.
// This parametrization is derived from :
// cross-section values of Seltzer and Berger for electron energies 1 keV - 10 GeV,
// screened Bethe Heilter differential cross section above 10 GeV,
// Migdal corrections in both case.
// Seltzer & Berger: Nim B 12:95 (1985)
// Nelson, Hirayama & Rogers: Technical report 265 SLAC (1985)
// Migdal: Phys Rev 103:1811 (1956); Messel & Crawford: Pergamon Press (1970)
//
// A modified version of the random number techniques of Butcher & Messel is used
// (Nuc Phys 20(1960),15).
{
G4double kineticEnergy = dp->GetKineticEnergy();
G4double tmax = G4std::min(maxEnergy, kineticEnergy);
if(tmin >= tmax) return 0;
//
// GEANT4 internal units.
//
static const G4double
ah10 = 4.67733E+00, ah11 =-6.19012E-01, ah12 = 2.02225E-02,
ah20 =-7.34101E+00, ah21 = 1.00462E+00, ah22 =-3.20985E-02,
ah30 = 2.93119E+00, ah31 =-4.03761E-01, ah32 = 1.25153E-02;
static const G4double
bh10 = 4.23071E+00, bh11 =-6.10995E-01, bh12 = 1.95531E-02,
bh20 =-7.12527E+00, bh21 = 9.69160E-01, bh22 =-2.74255E-02,
bh30 = 2.69925E+00, bh31 =-3.63283E-01, bh32 = 9.55316E-03;
static const G4double
al00 =-2.05398E+00, al01 = 2.38815E-02, al02 = 5.25483E-04,
al10 =-7.69748E-02, al11 =-6.91499E-02, al12 = 2.22453E-03,
al20 = 4.06463E-02, al21 =-1.01281E-02, al22 = 3.40919E-04;
static const G4double
bl00 = 1.04133E+00, bl01 =-9.43291E-03, bl02 =-4.54758E-04,
bl10 = 1.19253E-01, bl11 = 4.07467E-02, bl12 =-1.30718E-03,
bl20 =-1.59391E-02, bl21 = 7.27752E-03, bl22 =-1.94405E-04;
G4double gammaEnergy;
G4bool LPMOK = false;
// select randomly one element constituing the material
const G4Element* anElement = SelectRandomAtom(material);
// Extract Z factors for this Element
G4double lnZ = 3.*(anElement->GetIonisation()->GetlogZ3());
G4double FZ = lnZ* (4.- 0.55*lnZ);
G4double ZZ = anElement->GetIonisation()->GetZZ3();
// limits of the energy sampling
G4double totalEnergy = kineticEnergy + electron_mass_c2;
G4ThreeVector momentum = dp->GetMomentumDirection();
G4double xmin = tmin/kineticEnergy;
G4double xmax = tmax/kineticEnergy;
G4double kappa = log(xmax)/log(xmin);
G4double epsilmin = tmin/totalEnergy;
G4double epsilmax = tmax/totalEnergy;
// Migdal factor
G4double MigdalFactor = (material->GetElectronDensity())*MigdalConstant
/ (epsilmax*epsilmax);
G4double x, epsil, greject, migdal, grejmax, q;
G4double U = log(kineticEnergy/electron_mass_c2);
G4double U2 = U*U;
//
// sample the energy rate of the emitted gamma for electron kinetic energy > 1 MeV
//
do {
if (kineticEnergy > 1.*MeV)
{
// parameters
G4double ah1 = ah10 + ZZ* (ah11 + ZZ* ah12),
ah2 = ah20 + ZZ* (ah21 + ZZ* ah22),
ah3 = ah30 + ZZ* (ah31 + ZZ* ah32);
G4double bh1 = bh10 + ZZ* (bh11 + ZZ* bh12),
bh2 = bh20 + ZZ* (bh21 + ZZ* bh22),
bh3 = bh30 + ZZ* (bh31 + ZZ* bh32);
G4double ah = 1. + (ah1*U2 + ah2*U + ah3) / (U2*U);
G4double bh = 0.75 + (bh1*U2 + bh2*U + bh3) / (U2*U);
// limit of the screening variable
G4double screenfac =
136.*electron_mass_c2/((anElement->GetIonisation()->GetZ3())*totalEnergy);
G4double screenmin = screenfac*epsilmin/(1.-epsilmin);
// Compute the maximum of the rejection function
G4double F1 = G4std::max(ScreenFunction1(screenmin) - FZ ,0.);
G4double F2 = G4std::max(ScreenFunction2(screenmin) - FZ ,0.);
grejmax = (F1 - epsilmin* (F1*ah - bh*epsilmin*F2))/(42.392 - FZ);
// sample the energy rate of the emitted Gamma
G4double screenvar;
do {
q = G4UniformRand();
x = pow(xmin, q + kappa*(1.0 - q));
epsil = x*kineticEnergy/totalEnergy;
screenvar = screenfac*epsil/(1-epsil);
F1 = G4std::max(ScreenFunction1(screenvar) - FZ ,0.);
F2 = G4std::max(ScreenFunction2(screenvar) - FZ ,0.);
migdal = (1. + MigdalFactor)/(1. + MigdalFactor/(x*x));
greject = migdal*(F1 - epsil* (ah*F1 - bh*epsil*F2))/(42.392 - FZ);
} while( greject < G4UniformRand()*grejmax );
}
else
{
// sample the energy rate of the emitted gamma for electron kinetic energy < 1 MeV
//
// parameters
G4double al0 = al00 + ZZ* (al01 + ZZ* al02),
al1 = al10 + ZZ* (al11 + ZZ* al12),
al2 = al20 + ZZ* (al21 + ZZ* al22);
G4double bl0 = bl00 + ZZ* (bl01 + ZZ* bl02),
bl1 = bl10 + ZZ* (bl11 + ZZ* bl12),
bl2 = bl20 + ZZ* (bl21 + ZZ* bl22);
G4double al = al0 + al1*U + al2*U2;
G4double bl = bl0 + bl1*U + bl2*U2;
// Compute the maximum of the rejection function
grejmax = G4std::max(1. + xmin* (al + bl*xmin), 1.+al+bl);
G4double xm = -al/(2.*bl);
if ((xmin < xm)&&(xm < 1.)) grejmax = G4std::max(grejmax, 1.+ xm* (al + bl*xm));
// sample the energy rate of the emitted Gamma
do {
q = G4UniformRand();
x = pow(xmin, q + kappa*(1.0 - q));
migdal = (1. + MigdalFactor)/(1. + MigdalFactor/(x*x));
greject = migdal*(1. + x* (al + bl*x));
} while( greject < G4UniformRand()*grejmax );
}
gammaEnergy = x*kineticEnergy;
if(theLPMflag)
{
// take into account the supression due to the LPM effect
if (G4UniformRand() <= SupressionFunction(material,kineticEnergy,gammaEnergy))
LPMOK = true ;
}
else LPMOK = true ;
} while (!LPMOK) ;
//protection: DO NOT PRODUCE a gamma with energy 0. !
if (gammaEnergy <= 0.) return 0;
//
// angles of the emitted gamma. ( Z - axis along the parent particle)
//
// universal distribution suggested by L. Urban (Geant3 manual (1993) Phys211),
// derived from Tsai distribution (Rev Mod Phys 49,421(1977))
G4double u;
const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ;
if (9./(9.+d) > G4UniformRand()) u = - log(G4UniformRand()*G4UniformRand())/a1 ;
else u = - log(G4UniformRand()*G4UniformRand())/a2 ;
G4double theta = u*electron_mass_c2/totalEnergy;
G4double sint = sin(theta);
G4double phi = twopi * G4UniformRand() ;
G4ThreeVector gammaDirection(sint*cos(phi),sint*sin(phi), cos(theta));
gammaDirection.rotateUz(momentum);
// create G4DynamicParticle object for the Gamma
G4DynamicParticle* g = new G4DynamicParticle();
g->SetDefinition(G4Gamma::Gamma());
g->SetKineticEnergy(gammaEnergy);
g->SetMomentumDirection(gammaDirection);
G4std::vector<G4DynamicParticle*>* vdp = new G4std::vector<G4DynamicParticle*>;
vdp->push_back(g);
return vdp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4Element* G4eBremsstrahlungModel::SelectRandomAtom(
const G4Material* material) const
{
// select randomly 1 element within the material
G4int nElements = material->GetNumberOfElements();
const G4ElementVector* theElementVector = material->GetElementVector();
if(1 == nElements) return (*theElementVector)[0];
else if(1 > nElements) return 0;
G4DataVector* dv = partialSumSigma[material->GetIndex()];
G4double rval = G4UniformRand()*((*dv)[nElements-1]);
for (G4int i=0; i<nElements; i++) {
if (rval <= (*dv)[i]) return (*theElementVector)[i];
}
return (*theElementVector)[nElements-1];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eBremsstrahlungModel::SupressionFunction(const G4Material* material,
G4double kineticEnergy, G4double gammaEnergy)
{
// supression due to the LPM effect+polarisation of the medium/
// supression due to the polarisation alone
G4double totEnergy = kineticEnergy+electron_mass_c2 ;
G4double totEnergySquare = totEnergy*totEnergy ;
G4double LPMEnergy = LPMconstant*(material->GetRadlen()) ;
G4double gammaEnergySquare = gammaEnergy*gammaEnergy ;
G4double electronDensity = material->GetElectronDensity();
G4double sp = gammaEnergySquare/
(gammaEnergySquare+MigdalConstant*totEnergySquare*electronDensity);
G4double supr = 1.0;
if (theLPMflag) {
G4double s2lpm = LPMEnergy*gammaEnergy/totEnergySquare;
if (s2lpm < 1.) {
G4double LPMgEnergyLimit = totEnergySquare/LPMEnergy ;
G4double LPMgEnergyLimit2 = LPMgEnergyLimit*LPMgEnergyLimit;
G4double splim = LPMgEnergyLimit2/
(LPMgEnergyLimit2+MigdalConstant*totEnergySquare*
electronDensity) ;
G4double w = 1.+1./splim ;
G4double cnorm = 2./(sqrt(w*w+4.)-w) ;
if ((1.-sp) < 1.e-6) w = s2lpm*(3.-sp);
else w = s2lpm*(1.+1./sp);
supr = 0.5*cnorm*(sqrt(w*w+4.*s2lpm)-w)/sp ;
}
}
return supr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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
//
//
// File name: G4eBremsstrahlungSTD
//
// Author: Michel Maire
//
// Creation date: 26.06.1996
//
// Modifications:
//
// 26-09-96 extension of the total crosssection above 100 GeV, M.Maire
// 1-10-96 new type G4OrderedTable; ComputePartialSumSigma(), M.Maire
// 16-10-96 DoIt() call to the non static GetEnergyCuts(), L.Urban
// 13-12-96 Sign corrected in grejmax and greject
// error definition of screenvar, L.Urban
// 20-03-97 new energy loss+ionisation+brems scheme, L.Urban
// 07-04-98 remove 'tracking cut' of the diffracted particle, MMa
// 13-08-98 new methods SetBining() PrintInfo()
// 03-03-99 Bug fixed in LPM effect, L.Urban
// 10-02-00 modifications , new e.m. structure, L.Urban
// 07-08-00 new cross section/en.loss parametrisation, LPM flag , L.Urban
// 21-09-00 corrections in the LPM implementation, L.Urban
// 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 09-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 17-09-01 migration of Materials to pure STL (mma)
// 21-09-01 completion of RetrievePhysicsTable() (mma)
// 29-10-01 all static functions no more inlined (mma)
// 08-11-01 particleMass becomes a local variable
// 30-04-02 V.Ivanchenko update to new design
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4eBremsstrahlungSTD.hh"
#include "G4Gamma.hh"
#include "G4eBremsstrahlungModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eBremsstrahlungSTD::G4eBremsstrahlungSTD(const G4String& name)
: G4VEnergyLossSTD(name)
{
InitialiseProcess();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eBremsstrahlungSTD::~G4eBremsstrahlungSTD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungSTD::InitialiseProcess()
{
SetSecondaryParticle(G4Gamma::Gamma());
SetSubCutoffIsDesired(false);
SetDEDXBinning(120);
SetLambdaBinning(120);
SetMinKinEnergy(0.1*keV);
SetMaxKinEnergy(100.0*TeV);
G4VEmModel* em = new G4eBremsstrahlungModel();
em->SetLowEnergyLimit(0, 0.1*keV);
em->SetHighEnergyLimit(0, 100.0*TeV);
AddEmModel(em, 0);
G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
AddEmFluctuationModel(fm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eBremsstrahlungSTD::PrintInfoDefinition() const
{
G4VEnergyLossSTD::PrintInfoDefinition();
G4cout << " Total cross sections from a parametrisation"
<< " based on the EEDL data library. "
<< G4endl
<< " Good description from 1 KeV to 100 GeV, "
<< "log scale extrapolation above 100 GeV."
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -22,7 +22,7 @@
//
//
// $Id: G4eIonisation.cc,v 1.25 2002/04/09 17:34:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//--------------- G4eIonisation physics process --------------------------------
// by Laszlo Urban, 20 March 1997
@@ -0,0 +1,116 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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
//
//
// File name: G4eIonisationSTD
//
// Author: Laszlo Urban
//
// Creation date: 20.03.1997
//
// Modifications:
//
// 07-04-98 remove 'tracking cut' of the ionizing particle, mma
// 04-09-98 new methods SetBining() PrintInfo()
// 07-09-98 Cleanup
// 02-02-99 correction inDoIt , L.Urban
// 10-02-00 modifications , new e.m. structure, L.Urban
// 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 09-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 13-08-01 new function ComputeRestrictedMeandEdx() (mma)
// 17-09-01 migration of Materials to pure STL (mma)
// 21-09-01 completion of RetrievePhysicsTable() (mma)
// 29-10-01 all static functions no more inlined (mma)
// 07-11-01 particleMass and Charge become local variables
// 26-03-02 change access to cuts in BuildLossTables (V.Ivanchenko)
// 30-04-02 V.Ivanchenko update to new design
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4eIonisationSTD.hh"
#include "G4Electron.hh"
#include "G4MollerBhabhaModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eIonisationSTD::G4eIonisationSTD(const G4String& name)
: G4VEnergyLossSTD(name),
theElectron(G4Electron::Electron()),
isElectron(true)
{
InitialiseProcess();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eIonisationSTD::~G4eIonisationSTD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eIonisationSTD::InitialiseProcess()
{
SetSecondaryParticle(theElectron);
SetSubCutoffIsDesired(true);
SetDEDXBinning(120);
SetLambdaBinning(120);
SetMinKinEnergy(0.1*keV);
SetMaxKinEnergy(100.0*TeV);
G4VEmModel* em = new G4MollerBhabhaModel();
em->SetLowEnergyLimit(0, 0.1*keV);
em->SetHighEnergyLimit(0, 100.0*TeV);
AddEmModel(em, 0);
G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
AddEmFluctuationModel(fm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4ParticleDefinition* G4eIonisationSTD::DefineBaseParticle(const G4ParticleDefinition* p)
{
if(p == G4Positron::Positron()) isElectron = false;
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eIonisationSTD::PrintInfoDefinition() const
{
G4VEnergyLossSTD::PrintInfoDefinition();
G4cout << " Delta cross sections from Moller+Bhabha, "
<< "good description from 1 KeV to 100 GeV."
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -22,7 +22,7 @@
//
//
// $Id: G4eplusAnnihilation.cc,v 1.14 2002/04/09 17:34:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4hIonisation.cc,v 1.30 2002/06/10 15:50:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4hIonisation.cc,v 1.31 2002/10/11 16:39:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//---------------- G4hIonisation physics process -------------------------------
// by Laszlo Urban, 30 May 1997
@@ -127,11 +127,6 @@ void G4hIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
<< G4endl;
if(verboseLevel > 1) {
G4ProcessVector* pv = aParticleType.GetProcessManager()->GetProcessList();
G4cout << " 0: " << (*pv)[0]->GetProcessName() << " " << (*pv)[0]
<< " 1: " << (*pv)[1]->GetProcessName() << " " << (*pv)[1]
// << " 2: " << (*pv)[2]->GetProcessName() << " " << (*pv)[2]
<< G4endl;
G4cout << " MFPtable= " << theMeanFreePathTable
<< " DEDXtable= " << theDEDXpTable
<< " iniMass= " << initialMass
@@ -0,0 +1,144 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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
//
//
// File name: G4hIonisationSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1997
//
// Modifications:
//
// corrected by L.Urban on 24/09/97
// several bugs corrected by L.Urban on 13/01/98
// 07-04-98 remove 'tracking cut' of the ionizing particle, mma
// 22-10-98 cleanup L.Urban
// 02-02-99 bugs fixed , L.Urban
// 29-07-99 correction in BuildLossTable for low energy, L.Urban
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-00 V.Ivanchenko change BuildLambdaTable, in order to
// simulate energy losses of ions; correction to
// cross section for particles with spin 1 is inserted as well
// 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 29-08-01 PostStepDoIt: correction for spin 1/2 (instead of 1) (mma)
// 17-09-01 migration of Materials to pure STL (mma)
// 25-09-01 completion of RetrievePhysicsTable() (mma)
// 29-10-01 all static functions no more inlined
// 08-11-01 Charge renamed zparticle; added to the dedx
// 27-03-02 Bug fix in scaling of lambda table (V.Ivanchenko)
// 09-04-02 Update calculation of tables for GenericIons (V.Ivanchenko)
// 30-04-02 V.Ivanchenko update to new design
// 04-12-02 Add verbose level definition (VI)
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hIonisationSTD.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4BraggModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hIonisationSTD::G4hIonisationSTD(const G4String& name)
: G4VEnergyLossSTD(name),
theParticle(0),
theBaseParticle(0)
{
InitialiseProcess();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hIonisationSTD::~G4hIonisationSTD()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hIonisationSTD::InitialiseProcess()
{
SetSecondaryParticle(G4Electron::Electron());
SetSubCutoffIsDesired(true);
SetDEDXBinning(120);
SetLambdaBinning(120);
SetMinKinEnergy(0.1*keV);
SetMaxKinEnergy(100.0*TeV);
G4VEmModel* em = new G4BraggModel();
em->SetLowEnergyLimit(0, 0.1*keV);
em->SetHighEnergyLimit(0, 2.0*MeV);
AddEmModel(em, 0);
G4VEmModel* em1 = new G4BetheBlochModel();
em1->SetLowEnergyLimit(0, 2.0*MeV);
em1->SetHighEnergyLimit(0, 100.0*TeV);
AddEmModel(em1, 1);
G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
AddEmFluctuationModel(fm);
mass = 0.0;
ratio = 0.0;
SetVerboseLevel(0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4ParticleDefinition* G4hIonisationSTD::DefineBaseParticle(
const G4ParticleDefinition* p)
{
if(!theParticle) theParticle = p;
if(!theBaseParticle && p != G4Proton::Proton()) theBaseParticle = G4Proton::Proton();
mass = p->GetPDGMass();
ratio = electron_mass_c2/mass;
return theBaseParticle;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hIonisationSTD::PrintInfoDefinition() const
{
G4VEnergyLossSTD::PrintInfoDefinition();
G4cout << " Bether-Bloch model for Escaled > 2 MeV, "
<< "parametrisation of Bragg peak below."
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,116 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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
//
//
// File name: G4ionIonisation
//
// Author: Vladimir Ivanchenko
//
// Creation date: 07.05.2002
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4ionIonisation.hh"
#include "G4LossTableManager.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4BraggModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4UniversalFluctuation.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ionIonisation::G4ionIonisation(const G4String& name)
: G4VEnergyLossSTD(name),
theParticle(0),
theBaseParticle(G4Proton::Proton())
{
InitialiseProcess();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ionIonisation::~G4ionIonisation()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionIonisation::InitialiseProcess()
{
SetSecondaryParticle(G4Electron::Electron());
SetSubCutoffIsDesired(true);
SetDEDXBinning(120);
SetLambdaBinning(120);
SetMinKinEnergy(0.1*keV);
SetMaxKinEnergy(100.0*TeV);
G4VEmModel* em = new G4BraggModel();
em->SetLowEnergyLimit(0, 0.1*keV);
em->SetHighEnergyLimit(0, 2.0*MeV);
AddEmModel(em, 0);
G4VEmModel* em1 = new G4BetheBlochModel();
em1->SetLowEnergyLimit(0, 2.0*MeV);
em1->SetHighEnergyLimit(0, 100.0*TeV);
AddEmModel(em1, 1);
G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
AddEmFluctuationModel(fm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const G4ParticleDefinition* G4ionIonisation::DefineBaseParticle(
const G4ParticleDefinition* p)
{
if(!theParticle) theParticle = p;
return theBaseParticle;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ionIonisation::PrintInfoDefinition() const
{
G4VEnergyLossSTD::PrintInfoDefinition();
G4cout << " Scaling relation is used to proton dE/dx and range"
<< G4endl
<< " Bether-Bloch model for Escaled > 2 MeV, "
<< "parametrisation of Bragg peak below."
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....