Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.3 2001/03/05 10:52:05 maire Exp $
|
||||
# $Id: GNUmakefile,v 1.4 2001/10/05 14:04:38 maire Exp $
|
||||
# ------------------------------------------------------------------
|
||||
# GNUmakefile for electromagnetic library. Gabriele Cosmo, 18/9/96.
|
||||
# ------------------------------------------------------------------
|
||||
@@ -7,8 +7,8 @@ MAKEFLAGS= --no-print-directory
|
||||
|
||||
name := G4electromagnetic
|
||||
|
||||
SUBDIRS = muons standard utils xrays lowenergy integral
|
||||
SUBLIBS = G4muons G4emstandard G4emutils G4xrays G4emlowenergy G4integral
|
||||
SUBDIRS = muons standard utils xrays lowenergy
|
||||
SUBLIBS = G4muons G4emstandard G4emutils G4xrays G4emlowenergy
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.7 2001/03/05 10:52:05 maire Exp $
|
||||
$Id: History,v 1.9 2001/10/11 16:21:31 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,14 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
11 oct 01 mma (em-V03-02-01)
|
||||
- Global tag including: emlowen-V03-02-22 muons-V03-02-06 stand-V03-02-08
|
||||
utils-V03-02-07 xrays-V03-02-00
|
||||
|
||||
05 oct 01 mma (em-V03-02-00)
|
||||
- the code in subdirectory integral is deleted.
|
||||
the GNUmakefile is updated in accord with.
|
||||
|
||||
05 mar 01 mma (em-V03-00-04)
|
||||
- new subdirectory: integral
|
||||
migration of all G4I.. processes from muons, standard, utils into integral
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# $Id: GNUmakefile,v 1.1 2001/03/05 10:55:19 maire Exp $
|
||||
# --------------------------------------------------------------------
|
||||
# GNUmakefile for electromagnetic sub-library. John Allison, 25/6/98.
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
name := G4integral
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/magneticfield/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/utils/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/standard/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/intercoms/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
|
||||
CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
$Id: History,v 1.1 2001/03/05 10:55:19 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
This file should be used by G4 developers and category coordinators
|
||||
to briefly summarize all major modifications introduced in the code
|
||||
and keep track of all category-tags.
|
||||
It DOES NOT substitute the CVS log-message one should put at every
|
||||
committal in the CVS repository !
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
05 mar 01: mma (integral-V03-00-04)
|
||||
- creation of this subdirectory:
|
||||
migration of all G4I.. processes from muons, standard, utils
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.hh,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4IMuBremsstrahlung physics process ---------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4IMuBremsstrahlung_h
|
||||
#define G4IMuBremsstrahlung_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VIMuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4IMuBremsstrahlung : public G4VIMuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMuBremsstrahlung(const G4String& processName = "IMuBremsstrahlung");
|
||||
|
||||
~G4IMuBremsstrahlung();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
G4IMuBremsstrahlung & operator=(const G4IMuBremsstrahlung &right);
|
||||
G4IMuBremsstrahlung(const G4IMuBremsstrahlung&);
|
||||
|
||||
public:
|
||||
// post Step functions .......................................
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
protected:
|
||||
|
||||
inline G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double GammaEnergyCut);
|
||||
|
||||
private:
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
G4double ComputeBremLoss(G4double Z,G4double T,
|
||||
G4double Cut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
const G4double LowestKineticEnergy; // low energy limit of the crossection formula
|
||||
const G4double HighestKineticEnergy; // high energy limit of the crossection formula
|
||||
G4int TotBin; // number of bins in the tables
|
||||
|
||||
G4double MinKineticEnergy; //process is ignored if T<MinKineticEnergy
|
||||
G4double MinCutValue; //protection against divergencies
|
||||
|
||||
// 1 = 2/(3.*Z**(1/3)) , 2= exp(-0.128*(1.18*A**(1/3)-0.48)
|
||||
G4int NuclearFormFactor ;
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Gamma* theGamma;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* GammaCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double GammaCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4IMuBremsstrahlung.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,185 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.icc,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4IMuBremsstrahlung physics process ---------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ***************************************************************
|
||||
inline G4double G4IMuBremsstrahlung::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double eps=1.e-2 ;
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuBremsstrahlung PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << G4endl
|
||||
;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = BIGSTEP ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IhIonisation PostStepGPIL: Step < 0.!, Step=" << value << G4endl
|
||||
;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IMuBremsstrahlung::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
|
||||
G4double GammaEnergyCut = (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
const G4double BigPath= DBL_MAX;
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
GammaEnergyCut );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? BigPath : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4IMuBremsstrahlung::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMuIonisation.hh,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IMuIonisation physics process ------------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ------------------------------------------------------------
|
||||
// It is the implementation of the NEW IONISATION
|
||||
// PROCESS. ( delta rays + continuous energy loss)
|
||||
// It calculates the ionisation for muons.
|
||||
// ************************************************************
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4IMuIonisation_h
|
||||
#define G4IMuIonisation_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VIMuEnergyLoss.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
|
||||
class G4IMuIonisation : public G4VIMuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMuIonisation(const G4String& processName = "IMuIonisation");
|
||||
|
||||
~G4IMuIonisation();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4IMuIonisation & operator=(const G4IMuIonisation &right);
|
||||
G4IMuIonisation(const G4IMuIonisation&);
|
||||
|
||||
public:
|
||||
|
||||
// post Step functions .......................................
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber);
|
||||
|
||||
private:
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
|
||||
// private data members ...............................
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
|
||||
// LowestKineticEnergy = lower limit of particle kinetic energy
|
||||
// HighestKineticEnergy = upper limit of particle kinetic energy
|
||||
// TotBin = number of bins
|
||||
// ---------in the energy ionisation loss table-------------------
|
||||
const G4double LowestKineticEnergy;
|
||||
const G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particles , cuts in kinetic energy ........
|
||||
const G4Electron* theElectron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
const G4double* DeltaCutInKineticEnergy ;
|
||||
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
G4double DeltaCutInKineticEnergyNow ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4IMuIonisation.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,165 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMuIonisation.icc,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IMuIonisation physics process -------------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ---------------------------------------------------------------
|
||||
// It is the implementation of the NEW IONISATION PROCESS.
|
||||
// It calculates the ionisation of muons.
|
||||
// ***************************************************************
|
||||
// 24/11/97: correction on MeanFreePath for KinEnergy > HighestLimit
|
||||
// ---------------------------------------------------------------
|
||||
inline G4double G4IMuIonisation::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double eps=1.e-2 ;
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuIonisation PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << G4endl
|
||||
;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = BIGSTEP ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuIonisation PostStepGPIL: Step < 0.!, Step=" << value << G4endl
|
||||
;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4bool G4IMuIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
);
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMuPairProduction.hh,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4IMuPairProduction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4IMuPairproduction_h
|
||||
#define G4IMuPairproduction_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VIMuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4IMuPairProduction : public G4VIMuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMuPairProduction(const G4String& processName = "IMuPairProduction");
|
||||
|
||||
~G4IMuPairProduction();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
G4IMuPairProduction & operator=(const G4IMuPairProduction &right);
|
||||
G4IMuPairProduction(const G4IMuPairProduction&);
|
||||
|
||||
public:
|
||||
// post Step functions .......................................
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
protected:
|
||||
|
||||
inline G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double ElectronEnergyCut,
|
||||
G4double PositronEnergyCut);
|
||||
|
||||
G4double ComputeDDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double PairEnergy,
|
||||
G4double asymmetry);
|
||||
|
||||
|
||||
G4double ComputeDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double PairEnergy);
|
||||
|
||||
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
|
||||
|
||||
private:
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
G4double ComputePairLoss( const G4ParticleDefinition* ParticleType,
|
||||
G4double Z,G4double T,G4double ElectronCut,
|
||||
G4double PositronCut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
static G4PhysicsTable* themuplusLambdaTable ;
|
||||
static G4PhysicsTable* themuminusLambdaTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
const G4double LowestKineticEnergy; // low energy limit of the crossection formula
|
||||
const G4double HighestKineticEnergy; // high energy limit of the crossection formula
|
||||
G4int TotBin; // number of bins in the tables
|
||||
|
||||
G4double MinKineticEnergy; //process is ignored if T<MinKineticEnergy
|
||||
G4double MinCutValue; //protection against divergencies
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* ElectronCutInKineticEnergy;
|
||||
const G4double* PositronCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double ElectronCutInKineticEnergyNow;
|
||||
G4double PositronCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
static G4double zdat[5],tdat[8] ;
|
||||
static G4double ya[1000],proba[5][8][1000] ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#include "G4IMuPairProduction.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,194 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMuPairProduction.icc,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4IMuPairProduction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ***************************************************************
|
||||
inline G4double G4IMuPairProduction::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double eps=1.e-2 ;
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
|
||||
// if ( nl == 0.)
|
||||
// {
|
||||
// value = BIGSTEP ;
|
||||
// return value ;
|
||||
// }
|
||||
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuPairProduction PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << G4endl
|
||||
;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = BIGSTEP ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuPairProduction PostStepGPIL: Step < 0.!, Step=" << value << G4endl
|
||||
;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IMuPairProduction::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
|
||||
G4double ElectronEnergyCut = (G4Electron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double PositronEnergyCut = (G4Positron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
const G4double BigPath= DBL_MAX;
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
ElectronEnergyCut,PositronEnergyCut );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? BigPath : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4IMuPairProduction::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMultipleScattering.hh,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// --------- G4IMultipleScattering physics process --------
|
||||
// by Laszlo Urban, October 1997
|
||||
// **************************************************************
|
||||
// UNIVERSAL: for arbitrary single charged particle
|
||||
// 09/12/98: charge can be != +- 1 !!!! L.Urban
|
||||
// --------------------------------------------------------------
|
||||
// *****************************************************************
|
||||
// It is the first implementation of the multiple scattering process
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// *****************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// -----------------------------------------------------------------
|
||||
// 27/10/98: cleanup , L.Urban
|
||||
|
||||
#ifndef G4IMultipleScattering_h
|
||||
#define G4IMultipleScattering_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/iomanip"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4GPILSelection.hh"
|
||||
#include "G4VContinuousDiscreteProcess.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4ElementVector.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
class G4IMultipleScattering : public G4VContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMultipleScattering(const G4String& processName="Imsc") ;
|
||||
|
||||
~G4IMultipleScattering() ;
|
||||
|
||||
G4bool IsApplicable ( const G4ParticleDefinition& ) ;
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE,G4double highE,G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void BuildIntegralITable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildIntegralJTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
G4double GetIntegralI(const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,G4Material* aMaterial) ;
|
||||
G4double GetIntegralJ(const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,G4Material* aMaterial) ;
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
G4double GetContinuousStepLimit(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety) ;
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition) ;
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,const G4Step& aStep) ;
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,const G4Step& aStep) ;
|
||||
|
||||
protected:
|
||||
|
||||
G4double ComputeTransportCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber) ;
|
||||
|
||||
G4double TrueToGeomTransformation(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial,
|
||||
G4double truePathLength) ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator as private
|
||||
G4IMultipleScattering & operator = (const G4IMultipleScattering &right) ;
|
||||
G4IMultipleScattering ( const G4IMultipleScattering &) ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// data members ...................................................
|
||||
G4PhysicsTable* theTransportMeanFreePathTable;
|
||||
G4PhysicsTable* theIntegralITable ;
|
||||
G4PhysicsTable* theIntegralJTable ;
|
||||
|
||||
G4double fTransportMeanFreePath ;
|
||||
|
||||
G4double fMeanLateralDisplacement ;
|
||||
|
||||
G4double LowestKineticEnergy ;
|
||||
G4double HighestKineticEnergy ;
|
||||
G4int TotBin ;
|
||||
|
||||
const G4Electron* theElectron ;
|
||||
const G4Positron* thePositron ;
|
||||
|
||||
G4Material* lastMaterial;
|
||||
G4double lastKineticEnergy;
|
||||
|
||||
// GeomStepFinal is the geom.steplength at the end of the AlongStep loop
|
||||
// the others are some 'cache' variables
|
||||
G4double GeomStepFinal ;
|
||||
G4double tLast,zLast,CosTheta ;
|
||||
|
||||
G4double biglambda ;
|
||||
|
||||
//parameters for low energy extrapolation of dE/dx and lambda
|
||||
const G4double plowloss,plowlambda ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
G4double tuning ;
|
||||
};
|
||||
|
||||
#include "G4IMultipleScattering.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMultipleScattering.icc,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------- G4IMultipleScattering physics process ------
|
||||
// by Laszlo Urban, October 1997
|
||||
// **************************************************************
|
||||
// 25/11/97: mods for KinEnergy > HighestLimit
|
||||
//---------------------------------------------------------------
|
||||
// *****************************************************************
|
||||
// It is the first implementation of the multiple scattering process
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// *****************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// -----------------------------------------------------------------
|
||||
// 27/10/98: cleanup , L.Urban
|
||||
|
||||
inline G4double G4IMultipleScattering::TrueToGeomTransformation(
|
||||
const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial,
|
||||
G4double truePathLength)
|
||||
|
||||
// it sets the data member fTransportMeanFreePath and
|
||||
// performs the true path length -> geometrical path length
|
||||
// transformation
|
||||
|
||||
{
|
||||
const G4double factt=1.-1.e-6,tausmall=5.e-5,taubig=50.,
|
||||
minim=1.e-6,smalldroverr=1.e-2,smalldToverT=2.e-2 ;
|
||||
|
||||
G4double KineticEnergy,Tfinal,tau,etau,geomPathLength,range,w1,w2,ww1,ww2 ;
|
||||
G4int materialIndex ;
|
||||
G4bool isOut ;
|
||||
|
||||
KineticEnergy = aParticle->GetKineticEnergy() ;
|
||||
|
||||
if((lastMaterial == aMaterial) && (lastKineticEnergy == KineticEnergy))
|
||||
{ ; }
|
||||
else
|
||||
{
|
||||
lastMaterial=aMaterial;
|
||||
lastKineticEnergy=KineticEnergy;
|
||||
materialIndex = aMaterial->GetIndex() ;
|
||||
|
||||
if(KineticEnergy<LowestKineticEnergy)
|
||||
{
|
||||
fTransportMeanFreePath =
|
||||
exp(plowlambda*log((KineticEnergy/LowestKineticEnergy)))*
|
||||
(*theTransportMeanFreePathTable)
|
||||
(materialIndex)->GetValue(LowestKineticEnergy,isOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(KineticEnergy>HighestKineticEnergy)
|
||||
KineticEnergy=HighestKineticEnergy;
|
||||
fTransportMeanFreePath = (*theTransportMeanFreePathTable)
|
||||
(materialIndex)->GetValue(KineticEnergy,isOut);
|
||||
}
|
||||
}
|
||||
|
||||
// do the true -> geom transformation
|
||||
if( fTransportMeanFreePath > biglambda )
|
||||
{
|
||||
geomPathLength = truePathLength ;
|
||||
CosTheta = 1. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
const G4ParticleDefinition *theParticle = aParticle->GetDefinition() ;
|
||||
G4double range = G4EnergyLossTables::GetPreciseRangeFromEnergy(
|
||||
theParticle,KineticEnergy,aMaterial) ;
|
||||
if(truePathLength > factt*range)
|
||||
{
|
||||
geomPathLength = GetIntegralJ(theParticle,
|
||||
KineticEnergy,aMaterial) ;
|
||||
CosTheta = 0. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(truePathLength/range < smalldroverr)
|
||||
{
|
||||
Tfinal = KineticEnergy - truePathLength*
|
||||
G4EnergyLossTables::GetPreciseDEDX(
|
||||
theParticle,KineticEnergy,aMaterial) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tfinal = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
theParticle,range-truePathLength,
|
||||
aMaterial) ;
|
||||
}
|
||||
|
||||
if((KineticEnergy-Tfinal)> smalldToverT)
|
||||
{
|
||||
w1 = GetIntegralI(theParticle,KineticEnergy,aMaterial) ;
|
||||
w2 = GetIntegralI(theParticle,Tfinal ,aMaterial) ;
|
||||
CosTheta = exp(w2-w1) ;
|
||||
if( CosTheta < minim)
|
||||
CosTheta = 0. ;
|
||||
|
||||
ww1 = GetIntegralJ(theParticle,KineticEnergy,aMaterial) ;
|
||||
ww2 = GetIntegralJ(theParticle,Tfinal ,aMaterial) ;
|
||||
|
||||
geomPathLength = ww1 - ww2*CosTheta ;
|
||||
}
|
||||
else
|
||||
{
|
||||
tau = truePathLength/fTransportMeanFreePath ;
|
||||
|
||||
if(tau<tausmall)
|
||||
etau = tau ;
|
||||
else
|
||||
{
|
||||
if(tau>taubig)
|
||||
etau = 1. ;
|
||||
else
|
||||
etau = 1.-exp(-tau) ;
|
||||
}
|
||||
|
||||
geomPathLength = fTransportMeanFreePath*etau ;
|
||||
|
||||
CosTheta = exp(-truePathLength/fTransportMeanFreePath) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(geomPathLength>truePathLength)
|
||||
geomPathLength = truePathLength ;
|
||||
|
||||
tLast = truePathLength ;
|
||||
zLast = geomPathLength ;
|
||||
|
||||
return geomPathLength ;
|
||||
}
|
||||
|
||||
inline G4double G4IMultipleScattering::GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
G4double zPathLength,tPathLength ;
|
||||
const G4DynamicParticle* aParticle ;
|
||||
// this process is not a candidate for selection!!!!!!!!!
|
||||
SetGPILSelection(NotCandidateForSelection) ;
|
||||
|
||||
tPathLength = currentMinimumStep ;
|
||||
aParticle = track.GetDynamicParticle() ;
|
||||
|
||||
zPathLength = TrueToGeomTransformation(aParticle,
|
||||
track.GetMaterial(),tPathLength);
|
||||
return zPathLength ;
|
||||
}
|
||||
|
||||
inline G4double G4IMultipleScattering::GetMeanFreePath(const G4Track&,
|
||||
G4double,
|
||||
G4ForceCondition* condition)
|
||||
// it does not limit the Step size , but it sets condition to
|
||||
// Forced , because the PostStepDoIt always has to be called
|
||||
{
|
||||
*condition = Forced ;
|
||||
|
||||
return DBL_MAX ;
|
||||
}
|
||||
|
||||
inline G4VParticleChange* G4IMultipleScattering::AlongStepDoIt(
|
||||
const G4Track& track,const G4Step& Step)
|
||||
// only a geom path->true path transformation is performed
|
||||
{
|
||||
const G4double Tlowlimit=100.*keV ;
|
||||
const G4double fact = 1.-1.e-10 ;
|
||||
//!! const G4double tausmall=5.e-5,taubig=0.9999,trueBig=5. ;
|
||||
const G4double tausmall=5.e-5,taubig=0.9999,trueBig=9.21034 ;
|
||||
G4double tau ,geomPathLength, truePathLength ;
|
||||
|
||||
aParticleChange.Initialize(track);
|
||||
|
||||
geomPathLength = track.GetStepLength() ;
|
||||
|
||||
//Store this value for later use in PostStepDoIt
|
||||
GeomStepFinal = geomPathLength ;
|
||||
|
||||
if(geomPathLength == zLast)
|
||||
{
|
||||
truePathLength = tLast ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( fTransportMeanFreePath > biglambda )
|
||||
{
|
||||
truePathLength = track.GetStepLength() ;
|
||||
CosTheta = 1. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double T = track.GetDynamicParticle()->GetKineticEnergy() ;
|
||||
if(T < Tlowlimit)
|
||||
{ // spec. low energy msc code
|
||||
G4double range = G4EnergyLossTables::GetPreciseRangeFromEnergy(
|
||||
track.GetDynamicParticle()->GetDefinition(),
|
||||
T,track.GetMaterial()) ;
|
||||
G4double alfa = 1.+range/fTransportMeanFreePath ;
|
||||
G4double z = geomPathLength ;
|
||||
//protection: z can not be greater than zmax !!!!!!!
|
||||
G4double zmax = fact*range/alfa ;
|
||||
if(z > zmax)
|
||||
z = zmax ;
|
||||
|
||||
if(z == zmax)
|
||||
{
|
||||
truePathLength = range ;
|
||||
CosTheta = 0. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
truePathLength = range*
|
||||
(1.-exp(log(1.-alfa*z/range)/alfa)) ;
|
||||
CosTheta = (1.-alfa*z/range)/(1.-truePathLength/range) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tau = geomPathLength/fTransportMeanFreePath ;
|
||||
|
||||
if(tau<tausmall)
|
||||
truePathLength = fTransportMeanFreePath*tau*(1.+0.5*tau) ;
|
||||
else
|
||||
{
|
||||
if(tau<taubig)
|
||||
truePathLength = -fTransportMeanFreePath*log(1.-tau) ;
|
||||
else
|
||||
truePathLength = fTransportMeanFreePath*trueBig ;
|
||||
}
|
||||
CosTheta = exp(-truePathLength/fTransportMeanFreePath) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(truePathLength<geomPathLength)
|
||||
truePathLength = geomPathLength ;
|
||||
|
||||
aParticleChange.SetTrueStepLength(truePathLength) ;
|
||||
|
||||
return &aParticleChange ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4IMultipleScattering::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return(particle.GetPDGCharge() != 0.);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeBremsstrahlung.hh,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IeBremsstrahlung physics process ------
|
||||
// by Michel Maire, 24 July 1996
|
||||
// ************************************************************
|
||||
// 1-10-96 : new type G4OrderedTable; ComputePartialSumSigma()
|
||||
// 20/03/97: new energy loss+ionisation+brems scheme, L.Urban
|
||||
// ------------------------------------------------------------
|
||||
// ************************************************************
|
||||
// It is the first implementation of the BREMSSTRAHLUNG
|
||||
// PROCESS. ( photons + continuous energy loss)
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ------------------------------------------------------------
|
||||
// 28/10/98: small changes, cleanup L.Urban
|
||||
|
||||
#ifndef G4IeBremsstrahlung_h
|
||||
#define G4IeBremsstrahlung_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VIeEnergyLoss.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4IeBremsstrahlung : public G4VIeEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IeBremsstrahlung(const G4String& processName = "IeBrems");
|
||||
|
||||
~G4IeBremsstrahlung();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition );
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step);
|
||||
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
G4double GetNlambda(
|
||||
G4double KineticEnergy,G4Material* material);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
inline G4double ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double GammaEnergyCut);
|
||||
|
||||
private:
|
||||
|
||||
G4IeBremsstrahlung & operator=(const G4IeBremsstrahlung &right);
|
||||
G4IeBremsstrahlung(const G4IeBremsstrahlung&);
|
||||
|
||||
G4double ComputeBremLoss(G4double Z,G4double natom,G4double T,
|
||||
G4double Cut,G4double x);
|
||||
|
||||
G4double ComputeXYPolynomial(G4double x,G4double y,G4int xSize,
|
||||
G4int ySize,const G4double coeff[]);
|
||||
|
||||
G4double ComputePositronCorrFactorLoss( G4double AtomicNumber,
|
||||
G4double KineticEnergy, G4double GammaEnergyCut);
|
||||
|
||||
G4double ComputePositronCorrFactorSigma( G4double AtomicNumber,
|
||||
G4double KineticEnergy, G4double GammaEnergyCut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
G4double ScreenFunction1(G4double ScreenVariable);
|
||||
|
||||
G4double ScreenFunction2(G4double ScreenVariable);
|
||||
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
G4OrderedTable PartialSumSigma;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
G4double RTable ;
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Gamma* theGamma;
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
|
||||
const G4double* GammaCutInKineticEnergy;
|
||||
|
||||
G4double GammaCutInKineticEnergyNow;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
};
|
||||
|
||||
#include "G4IeBremsstrahlung.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeBremsstrahlung.icc,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IeBremsstrahlung physics process ---------
|
||||
// by Michel Maire, 27 July 1996
|
||||
// ***************************************************************
|
||||
// It is the first implementation of the BREMSSTRAHLUNG
|
||||
// PROCESS. ( photons + continuous energy loss)
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ----------------------------------------------------------------
|
||||
// 28/10/98: small changes, cleanup L.Urban
|
||||
|
||||
inline G4double G4IeBremsstrahlung::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac,eps=1.e-2 ;
|
||||
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IeBremsstrahlung PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)"
|
||||
<< G4endl;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = DBL_MAX ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1
|
||||
*KineticEnergy/(dEdx*(nl-nll)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IeBremsstrahlung PostStepGPIL: Step < 0.!, Step=" <<
|
||||
value << G4endl;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4double G4IeBremsstrahlung::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;
|
||||
}
|
||||
|
||||
inline G4double G4IeBremsstrahlung::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;
|
||||
}
|
||||
|
||||
inline G4double G4IeBremsstrahlung::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector =
|
||||
aMaterial->GetAtomicNumDensityVector();
|
||||
G4double GammaEnergyCut = (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
GammaEnergyCut );
|
||||
}
|
||||
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
|
||||
}
|
||||
|
||||
inline G4bool G4IeBremsstrahlung::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theElectron)
|
||||
||(&particle == (const G4ParticleDefinition *)thePositron)
|
||||
) ;
|
||||
}
|
||||
|
||||
inline G4double G4IeBremsstrahlung::GetNlambda(
|
||||
G4double KineticEnergy,
|
||||
G4Material* material)
|
||||
{
|
||||
G4bool isOut;
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable() ;
|
||||
|
||||
G4double lambda = (*theNlambdaTable)
|
||||
[material->GetIndex()]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
return lambda;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeIonisation.hh,v 1.1.2.2 2001/06/28 20:19:18 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4IeIonisation physics process -----------
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ************************************************************
|
||||
// It is the first implementation of the IONISATION
|
||||
// PROCESS. ( delta rays + continuous energy loss)
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// 27/10/98 : minor changes+cleanup , L.Urban
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4IeIonisation_h
|
||||
#define G4IeIonisation_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/iomanip"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VIeEnergyLoss.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
class G4IeIonisation : public G4VIeEnergyLoss
|
||||
{
|
||||
public:
|
||||
|
||||
G4IeIonisation(const G4String& processName = "IeIoni");
|
||||
|
||||
~G4IeIonisation();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
G4double GetNlambda(
|
||||
G4double KineticEnergy,G4Material* material);
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4IeIonisation & operator=(const G4IeIonisation &right);
|
||||
G4IeIonisation(const G4IeIonisation&);
|
||||
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
private:
|
||||
// private data members ...............................
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
G4double RTable ;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
|
||||
// particles , cuts in kinetic energy ........
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
const G4double* DeltaCutInKineticEnergy ;
|
||||
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
G4double DeltaKineticEnergyCutNow ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
};
|
||||
|
||||
#include "G4IeIonisation.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeIonisation.icc,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4IeIonisation physics process ------------
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ************************************************************
|
||||
// It is the first implementation of the IONISATION
|
||||
// PROCESS. ( delta rays + continuous energy loss)
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// 27/10/98: minor changes , cleanup , L.Urban
|
||||
// ------------------------------------------------------------
|
||||
|
||||
inline G4double G4IeIonisation::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
const G4double eps=1.e-2,Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IeIonisation PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)"
|
||||
<< G4endl;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = DBL_MAX ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*
|
||||
KineticEnergy/(dEdx*(nl-nll)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
value = range - rangenext ;
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IeIonisation PostStepGPIL: Step < 0.!, Step="
|
||||
<< value << G4endl;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4bool G4IeIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theElectron)
|
||||
||(&particle == (const G4ParticleDefinition *)thePositron)
|
||||
) ;
|
||||
}
|
||||
|
||||
inline G4double G4IeIonisation::GetNlambda(
|
||||
G4double KineticEnergy,
|
||||
G4Material* material)
|
||||
{
|
||||
G4bool isOut;
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable() ;
|
||||
|
||||
G4double lambda = (*theNlambdaTable)
|
||||
[material->GetIndex()]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
return lambda;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeplusAnnihilation.hh,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IeplusAnnihilation process ------
|
||||
// by Michel Maire, 7 july 1996
|
||||
// ************************************************************
|
||||
// ************************************************************
|
||||
// It is the first implementation of the
|
||||
// eplusANNIHILATION PROCESS
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ----------------------------------------------------------
|
||||
// 28/10/98: cleanup L. Urban
|
||||
|
||||
|
||||
#ifndef G4IeplusAnnihilation_h
|
||||
#define G4IeplusAnnihilation_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IVRestDiscreteProcess.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
class G4IeplusAnnihilation : public G4IVRestDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IeplusAnnihilation(const G4String& processName ="Iannihil");
|
||||
|
||||
~G4IeplusAnnihilation();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& PositronType);
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition) ;
|
||||
|
||||
G4double GetMicroscopicCrossSection(G4DynamicParticle* aDynamicPositron,
|
||||
G4Element* anElement);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
|
||||
G4double GetMeanLifeTime(const G4Track& aTrack,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(G4double PositKinEnergy,
|
||||
G4double AtomicNumber);
|
||||
|
||||
virtual G4double ComputeMeanFreePath(G4double PositKinEnergy,
|
||||
G4Material* aMaterial);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator as private
|
||||
G4IeplusAnnihilation& operator=(const G4IeplusAnnihilation &right);
|
||||
G4IeplusAnnihilation(const G4IeplusAnnihilation& );
|
||||
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theCrossSectionTable; // table for crossection
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
G4double LowestEnergyLimit ; // low energy limit of the crossection formula
|
||||
G4double HighestEnergyLimit ; // high energy limit of the crossection formula
|
||||
G4int NumbBinTable ; // number of bins in the crossection table
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
G4double LowestKineticEnergy ;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin ;
|
||||
|
||||
G4double RTable ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4IeplusAnnihilation.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,211 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeplusAnnihilation.icc,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IeplusAnnihilation process ---------
|
||||
// by Michel Maire, 7 July 1996
|
||||
// ***************************************************************
|
||||
// ************************************************************
|
||||
// It is the first implementation of the
|
||||
// eplusANNIHILATION PROCESS
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ---------------------------------------------------------
|
||||
// 28/10/98: some cleanup , L.Urban
|
||||
|
||||
inline G4bool G4IeplusAnnihilation::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( &particle == G4Positron::Positron() );
|
||||
}
|
||||
inline G4double G4IeplusAnnihilation::GetMicroscopicCrossSection(
|
||||
G4DynamicParticle* aDynamicPositron,
|
||||
G4Element* anElement)
|
||||
|
||||
// gives the microscopic total cross section in GEANT4 internal units
|
||||
|
||||
{
|
||||
G4double crossSection;
|
||||
G4double PositronEnergy = aDynamicPositron->GetKineticEnergy();
|
||||
G4bool isOutRange ;
|
||||
|
||||
if (PositronEnergy > HighestEnergyLimit)
|
||||
crossSection = 0. ;
|
||||
else {
|
||||
if (PositronEnergy < LowestEnergyLimit) PositronEnergy = 1.01*LowestEnergyLimit;
|
||||
crossSection = (*theCrossSectionTable)(anElement->GetIndex())->
|
||||
GetValue( PositronEnergy, isOutRange );
|
||||
}
|
||||
|
||||
return crossSection;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IeplusAnnihilation::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac,eps=1.e-2 ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IeplusAnnihilation PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << G4endl;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = DBL_MAX ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IeplusAnnihilation PostStepGPIL: Step < 0.!, Step=" <<
|
||||
value << G4endl;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4double G4IeplusAnnihilation::ComputeMeanFreePath(G4double PositKinEnergy,
|
||||
G4Material* aMaterial)
|
||||
|
||||
// returns the positron mean free path in GEANT4 internal units
|
||||
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( PositKinEnergy,
|
||||
(*theElementVector)(i)->GetZ() );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
|
||||
}
|
||||
|
||||
inline G4double G4IeplusAnnihilation::GetMeanLifeTime(const G4Track&,
|
||||
G4ForceCondition*)
|
||||
// returns the annihilation mean life time in GEANT4 internal units
|
||||
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IhIonisation.hh,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4IhIonisation physics process -----------
|
||||
// by Laszlo Urban, 30 May 1997
|
||||
// ************************************************************
|
||||
// It is the first implementation of the NEW IONISATION
|
||||
// PROCESS. ( delta rays + continuous energy loss)
|
||||
// It calculates the ionisation for charged hadrons.
|
||||
// ************************************************************
|
||||
// corrected by L.Urban on 24/09/97
|
||||
// corrected by L.Urban on 13/01/98
|
||||
// 28/10/98: some cleanup , L.Urban
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4IhIonisation_h
|
||||
#define G4IhIonisation_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VIhEnergyLoss.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
|
||||
class G4IhIonisation : public G4VIhEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IhIonisation(const G4String& processName = "IhIoni");
|
||||
|
||||
~G4IhIonisation();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4IhIonisation & operator=(const G4IhIonisation &right);
|
||||
G4IhIonisation(const G4IhIonisation&);
|
||||
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
private:
|
||||
// private data members ...............................
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Proton* theProton;
|
||||
const G4AntiProton* theAntiProton;
|
||||
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
const G4double* DeltaCutInKineticEnergy ;
|
||||
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
G4double DeltaCutInKineticEnergyNow ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4IhIonisation.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IhIonisation.icc,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4IhIonisation physics process ------------
|
||||
// by Laszlo Urban, 30 May 1997
|
||||
// ***************************************************************
|
||||
// It is the first implementation of the NEW IONISATION PROCESS.
|
||||
// It calculates the ionisation of charged hadrons.
|
||||
// ***************************************************************
|
||||
// 24/09/97: corrected by L.Urban
|
||||
// 20/11/97: correction on MeanFreePath for KineticEnergy > HighestLimit
|
||||
// 29/10/98: some cleanup + small changes , L.Urban
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
inline G4double G4IhIonisation::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac,eps=1.e-2 ;
|
||||
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IhIonisation PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << G4endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)"
|
||||
<< G4endl;
|
||||
G4cout << " correction : Nlambda old=new ........." << G4endl;
|
||||
}
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = DBL_MAX ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/
|
||||
(dEdx*(nl-nll));
|
||||
}
|
||||
else
|
||||
{
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IhIonisation PostStepGPIL: Step < 0.!, Step="
|
||||
<< value << G4endl;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << G4endl ;
|
||||
G4cout << "correction : rangenext=range ....." << G4endl;
|
||||
}
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4bool G4IhIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return(particle.GetPDGCharge() != 0.);
|
||||
}
|
||||
|
||||
@@ -1,294 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIMuEnergyLoss.hh,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4VIMuEnergyLoss physics process -----------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ********************************************************************
|
||||
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the continuous energy loss for muons.
|
||||
// Processes giving contribution to the continuous loss :
|
||||
// ionisation (= cont.ion.loss + delta ray production)
|
||||
// bremsstrahlung
|
||||
// e+e- pair production
|
||||
// can be added more easily ..........
|
||||
// This class creates static muplus/muminus dE/dx and range tables ,
|
||||
// which tables can be used by other processes.
|
||||
// ************************************************************
|
||||
// some corrections by L.Urban on 27/05/98 , (but other corrections come soon!)
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4VIMuEnergyLoss_h
|
||||
#define G4VIMuEnergyLoss_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/iomanip"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IVContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
|
||||
class G4VIMuEnergyLoss : public G4IVContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
G4VIMuEnergyLoss(const G4String& );
|
||||
G4VIMuEnergyLoss(G4VIMuEnergyLoss &);
|
||||
|
||||
virtual ~G4VIMuEnergyLoss();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4VIMuEnergyLoss & operator=(const G4VIMuEnergyLoss &right);
|
||||
|
||||
public:
|
||||
|
||||
G4double GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety) ;
|
||||
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& track ,const G4Step& Step) ;
|
||||
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,const G4Step& Step) = 0 ;
|
||||
|
||||
// Build energy loss table (total continuous energy loss)
|
||||
|
||||
void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
//----------------------------------------------
|
||||
// public functions .........................
|
||||
// get the number of processes contributing to the cont.energy loss
|
||||
static G4int GetNUMBEROFPROCESSES() { return NUMBEROFPROCESSES; };
|
||||
// set the number of processes contributing to the cont.energy loss
|
||||
static void SetNUMBEROFPROCESSES(G4int number)
|
||||
{ NUMBEROFPROCESSES=number ; };
|
||||
// Increment the number of processes contributing to the cont.energy loss
|
||||
static void PlusNUMBEROFPROCESSES()
|
||||
{ NUMBEROFPROCESSES++ ; };
|
||||
// decrement the number of processes contributing to the cont.energy loss
|
||||
static void MinusNUMBEROFPROCESSES()
|
||||
{ NUMBEROFPROCESSES-- ; };
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
|
||||
G4double GetConstraints(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial);
|
||||
|
||||
G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial,
|
||||
G4double ChargeSquare,
|
||||
G4double MeanLoss,
|
||||
G4double Step ) ;
|
||||
|
||||
protected:
|
||||
|
||||
G4PhysicsTable* theLossTable ;
|
||||
|
||||
static G4PhysicsTable* theDEDXmuplusTable ;
|
||||
static G4PhysicsTable* theDEDXmuminusTable ;
|
||||
static G4PhysicsTable* theRangemuplusTable ;
|
||||
static G4PhysicsTable* theRangemuminusTable ;
|
||||
static G4PhysicsTable* theInverseRangemuplusTable ;
|
||||
static G4PhysicsTable* theInverseRangemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theLabTimemuplusTable ;
|
||||
static G4PhysicsTable* theLabTimemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theProperTimemuplusTable ;
|
||||
static G4PhysicsTable* theProperTimemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* themuplusRangeCoeffATable;
|
||||
static G4PhysicsTable* themuplusRangeCoeffBTable;
|
||||
static G4PhysicsTable* themuplusRangeCoeffCTable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffATable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffBTable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffCTable;
|
||||
|
||||
static G4double CutInmupluslossTable;
|
||||
static G4double CutInmuminuslossTable;
|
||||
|
||||
// processes inherited from G4VIMuEnergyLoss
|
||||
// register themselves in the static array Recorder
|
||||
// nb of contributing processes = NUMBEROFPROCESSES
|
||||
static G4int NUMBEROFPROCESSES ;
|
||||
static G4PhysicsTable** RecorderOfmuplusProcess;
|
||||
static G4PhysicsTable** RecorderOfmuminusProcess;
|
||||
static G4int CounterOfmuplusProcess ;
|
||||
static G4int CounterOfmuminusProcess ;
|
||||
|
||||
G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
|
||||
// /LowestKineticEnergy)/TotBin
|
||||
// RTable = exp(LOGRTable)
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
// last cut in range
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particle mass
|
||||
G4double ParticleMass;
|
||||
|
||||
G4double BIGSTEP ;
|
||||
|
||||
private:
|
||||
// private functions ..................................
|
||||
|
||||
void BuildRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildInverseRangeTable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildTimeTables(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLabTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void BuildProperTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void InvertRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
|
||||
void BuildRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
void BuildRangeCoeffATable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildRangeCoeffBTable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theDEDXTable;
|
||||
|
||||
G4PhysicsTable* theRangeTable;
|
||||
G4PhysicsTable* theInverseRangeTable;
|
||||
|
||||
G4PhysicsTable* theLabTimeTable;
|
||||
G4PhysicsTable* theProperTimeTable;
|
||||
|
||||
G4PhysicsTable** RecorderOfProcess;
|
||||
G4int CounterOfProcess;
|
||||
|
||||
// private data members ...............................
|
||||
|
||||
// fdEdx=(-dE/dx)
|
||||
// computed in GetConstraints at every call;
|
||||
G4double fdEdx;
|
||||
|
||||
// fRangeNow is the actual range of the particle
|
||||
// computed in GetConstraints
|
||||
G4double fRangeNow ;
|
||||
|
||||
// fMeanLoss is the energyloss without fluctuation
|
||||
// computed in AlongStepDoIt ;
|
||||
G4double fMeanLoss ;
|
||||
|
||||
// EnergyBinNumber,RangeCoeffA,... are needed to compute range
|
||||
G4int EnergyBinNumber ;
|
||||
G4double RangeCoeffA,RangeCoeffB,RangeCoeffC ;
|
||||
|
||||
//................................................................
|
||||
G4PhysicsTable* theRangeCoeffATable;
|
||||
G4PhysicsTable* theRangeCoeffBTable;
|
||||
G4PhysicsTable* theRangeCoeffCTable;
|
||||
|
||||
// dToverTini is the maximum allowed deltarange/range in one Step
|
||||
// ( set in this class for the moment)
|
||||
const G4double dToverTini;
|
||||
|
||||
// LowestKineticEnergy = lower limit of particle kinetic energy
|
||||
// HighestKineticEnergy = upper limit of particle kinetic energy
|
||||
// TotBin = number of bins
|
||||
// ---------in the energy loss/range tables-------------------
|
||||
const G4double LowestKineticEnergy;
|
||||
const G4double HighestKineticEnergy;
|
||||
G4int TotBin;// number of bins in table, calculated in BuildPhysicsTable
|
||||
// from LowestKineticEnergy,HighestKineticEnergy and
|
||||
// dToverTini
|
||||
|
||||
// variables for the integration routines
|
||||
G4double taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// cuts in kinetic energy ........
|
||||
G4double* ParticleCutInKineticEnergy ;
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
|
||||
// ...............
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
// data members to speed up the fluctuation calculation
|
||||
G4Material *lastMaterial ;
|
||||
G4int imat ;
|
||||
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
|
||||
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
|
||||
const G4double MaxExcitationNumber ;
|
||||
const G4double probLimFluct ;
|
||||
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4VIMuEnergyLoss.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,160 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIMuEnergyLoss.icc,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4VIMuEnergyLoss physics process ------------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ***************************************************************
|
||||
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the energy loss of muons.
|
||||
// ***************************************************************
|
||||
// correction for KineticEnergy< LowestKineticEnergy by L.Urban on 27/11/97
|
||||
// corrections by L. Urban on 27/05/98 ( other corrs come soon!)
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
inline G4double G4VIMuEnergyLoss::GetConstraints(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial)
|
||||
{
|
||||
|
||||
// returns the Step limit
|
||||
// dToverTini is the max. allowed relative range loss in one Step
|
||||
// it calculates dEdx and the range as well....
|
||||
|
||||
G4double KineticEnergy,StepLimit;
|
||||
const G4double BigStep = DBL_MAX ;
|
||||
G4bool isOutRange ;
|
||||
G4int index,bin ;
|
||||
|
||||
if(aParticle->GetDefinition()->GetPDGCharge()>0.)
|
||||
{
|
||||
theDEDXTable = theDEDXmuplusTable ;
|
||||
theRangeTable = theRangemuplusTable ;
|
||||
theRangeCoeffATable=themuplusRangeCoeffATable ;
|
||||
theRangeCoeffBTable=themuplusRangeCoeffBTable ;
|
||||
theRangeCoeffCTable=themuplusRangeCoeffCTable ;
|
||||
}
|
||||
else
|
||||
{
|
||||
theDEDXTable = theDEDXmuminusTable ;
|
||||
theRangeTable = theRangemuminusTable ;
|
||||
theRangeCoeffATable=themuminusRangeCoeffATable ;
|
||||
theRangeCoeffBTable=themuminusRangeCoeffBTable ;
|
||||
theRangeCoeffCTable=themuminusRangeCoeffCTable ;
|
||||
}
|
||||
|
||||
|
||||
// min.stepsize = p*CutInRange at energy , where range=p*CutInRange
|
||||
// random steplimit.........................
|
||||
const G4double p=1. , cc=p*CutInRange ;
|
||||
const G4double c1=dToverTini , c2=(1.-2.*dToverTini)*cc ,
|
||||
c3=dToverTini*cc*cc ;
|
||||
const G4double rangelim=1.5*cc ;
|
||||
const G4double Thigh = 0.9*HighestKineticEnergy ;
|
||||
const G4double alfa = 0.05 , alfa1 = 1.-alfa , alfa2 = 2.*alfa ;
|
||||
KineticEnergy = aParticle->GetKineticEnergy();
|
||||
bin = G4int(log(KineticEnergy/LowestKineticEnergy)/LOGRTable) ;
|
||||
EnergyBinNumber = bin ;
|
||||
index = aMaterial->GetIndex() ;
|
||||
|
||||
if( KineticEnergy < LowestKineticEnergy )
|
||||
{
|
||||
fdEdx = sqrt(KineticEnergy/LowestKineticEnergy)*
|
||||
(*theDEDXTable)(index)->GetValue(LowestKineticEnergy,isOutRange) ;
|
||||
fRangeNow = sqrt(KineticEnergy/LowestKineticEnergy)*
|
||||
(*theRangeTable)(index)->GetValue(LowestKineticEnergy,isOutRange) ;
|
||||
StepLimit = fRangeNow ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( KineticEnergy > HighestKineticEnergy )
|
||||
StepLimit = BigStep ;
|
||||
else
|
||||
{
|
||||
|
||||
fdEdx = (*theDEDXTable)(index)->
|
||||
GetValue(KineticEnergy,isOutRange) ;
|
||||
|
||||
|
||||
RangeCoeffA = (*(*theRangeCoeffATable)(index))(EnergyBinNumber) ;
|
||||
RangeCoeffB = (*(*theRangeCoeffBTable)(index))(EnergyBinNumber) ;
|
||||
RangeCoeffC = (*(*theRangeCoeffCTable)(index))(EnergyBinNumber) ;
|
||||
|
||||
fRangeNow = (RangeCoeffA*KineticEnergy+RangeCoeffB)
|
||||
*KineticEnergy+RangeCoeffC ;
|
||||
|
||||
// vacuum ?
|
||||
if(fRangeNow>=BigStep)
|
||||
StepLimit = BigStep ;
|
||||
else
|
||||
{
|
||||
// new method to compute the (random) Step limit ..............
|
||||
if(fRangeNow>cc)
|
||||
{
|
||||
StepLimit = c1*fRangeNow+c2+c3/fRangeNow ;
|
||||
|
||||
// randomise this value
|
||||
StepLimit = cc + (StepLimit-cc)*G4UniformRand() ;
|
||||
if(StepLimit > fRangeNow) StepLimit = fRangeNow ;
|
||||
}
|
||||
else
|
||||
StepLimit = fRangeNow ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return StepLimit ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4VIMuEnergyLoss::GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
|
||||
G4double Step =
|
||||
GetConstraints(track.GetDynamicParticle(),track.GetMaterial()) ;
|
||||
|
||||
if((Step>0.0)&&(Step<currentMinimumStep))
|
||||
currentMinimumStep = Step ;
|
||||
|
||||
return Step ;
|
||||
}
|
||||
|
||||
inline G4bool G4VIMuEnergyLoss::IsApplicable(const G4ParticleDefinition&
|
||||
particle)
|
||||
{
|
||||
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
);
|
||||
}
|
||||
@@ -1,257 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIeEnergyLoss.hh,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4VIeEnergyLoss physics process -----------
|
||||
// by Laszlo Urban, 20 March 1997
|
||||
// ************************************************************
|
||||
// It is the first implementation of the new unified Energy Loss process.
|
||||
// It calculates the continuous energy loss for e+/e-.
|
||||
// Processes giving contribution to the continuous loss :
|
||||
// ionisation (= cont.ion.loss + delta ray production)
|
||||
// bremsstrahlung (= cont.loss due to sooft brems+discrete bremsstrahlung)
|
||||
// can be added more easily ..........
|
||||
// This class creates static dE/dx and range tables for e+ and e-,
|
||||
// which tables can be used by other processes.
|
||||
// ------------------------------------------------------------
|
||||
//
|
||||
// 27.05.98 OldGetRange removed + other corrs , L.Urban
|
||||
// 26.10.98 revision , L.Urban
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4VIeEnergyLoss_h
|
||||
#define G4VIeEnergyLoss_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IVContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
class G4EnergyLossMessenger;
|
||||
|
||||
|
||||
class G4VIeEnergyLoss : public G4IVContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4VIeEnergyLoss(const G4String& );
|
||||
|
||||
virtual ~G4VIeEnergyLoss();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
G4double GetContinuousStepLimit(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety);
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& track,
|
||||
const G4Step& Step) ;
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step) = 0;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void BuildRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildInverseRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildTimeTables(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void BuildLabTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void BuildProperTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void InvertRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
void BuildRangeCoeffATable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildRangeCoeffBTable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
G4double GetConstraints(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial);
|
||||
|
||||
G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial,
|
||||
G4double ChargeSquare,
|
||||
G4double MeanLoss,
|
||||
G4double step) ;
|
||||
|
||||
// hide assignment operator
|
||||
G4VIeEnergyLoss (G4VIeEnergyLoss &);
|
||||
G4VIeEnergyLoss & operator=(const G4VIeEnergyLoss &right);
|
||||
|
||||
protected:
|
||||
|
||||
G4PhysicsTable* theLossTable;
|
||||
|
||||
G4double ParticleMass; // heavily used
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theDEDXTable;
|
||||
|
||||
G4PhysicsTable* theRangeTable;
|
||||
G4PhysicsTable* theInverseRangeTable;
|
||||
|
||||
G4PhysicsTable* theLabTimeTable ;
|
||||
G4PhysicsTable* theProperTimeTable ;
|
||||
|
||||
G4int CounterOfProcess;
|
||||
G4PhysicsTable** RecorderOfProcess;
|
||||
|
||||
G4double fdEdx; // computed in GetConstraints
|
||||
G4double fRangeNow; // computed in GetConstraints
|
||||
|
||||
G4int EnergyBinNumber; // computed in GetConstraints
|
||||
// (needed to compute range)
|
||||
G4int TotBin; // number of bins in table,
|
||||
// calculated in BuildPhysicTable
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy-
|
||||
// LowestKineticEnergy)/TotBin
|
||||
// RTable = exp(LOGRTable)
|
||||
|
||||
G4PhysicsTable* theRangeCoeffATable;
|
||||
G4PhysicsTable* theRangeCoeffBTable;
|
||||
G4PhysicsTable* theRangeCoeffCTable;
|
||||
|
||||
// variables for the integration routines
|
||||
G4double taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// data members to speed up the fluctuation calculation
|
||||
G4Material* lastMaterial;
|
||||
G4int imat;
|
||||
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
|
||||
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
|
||||
const G4double MaxExcitationNumber ;
|
||||
const G4double probLimFluct ;
|
||||
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
|
||||
|
||||
//
|
||||
// static part of the class
|
||||
//
|
||||
|
||||
protected:
|
||||
|
||||
//basic DEDX and Range tables
|
||||
static G4PhysicsTable* theDEDXElectronTable ;
|
||||
static G4PhysicsTable* theDEDXPositronTable ;
|
||||
static G4PhysicsTable* theRangeElectronTable ;
|
||||
static G4PhysicsTable* theRangePositronTable ;
|
||||
|
||||
//inverse tables of the range tables
|
||||
static G4PhysicsTable* theInverseRangeElectronTable;
|
||||
static G4PhysicsTable* theInverseRangePositronTable;
|
||||
|
||||
// lab and proper time tables
|
||||
static G4PhysicsTable* theLabTimeElectronTable ;
|
||||
static G4PhysicsTable* theLabTimePositronTable ;
|
||||
static G4PhysicsTable* theProperTimeElectronTable ;
|
||||
static G4PhysicsTable* theProperTimePositronTable ;
|
||||
|
||||
//processes inherited from G4VIeEnergyLoss
|
||||
//register themselves in the static array Recorder
|
||||
//for electrons/positrons separately
|
||||
//nb of contributing processes = NbOfProcesses
|
||||
static G4int NbOfProcesses;
|
||||
static G4int CounterOfElectronProcess;
|
||||
static G4int CounterOfPositronProcess ;
|
||||
static G4PhysicsTable** RecorderOfElectronProcess;
|
||||
static G4PhysicsTable** RecorderOfPositronProcess;
|
||||
|
||||
private:
|
||||
|
||||
//for interpolation within the tables
|
||||
static G4PhysicsTable* theeRangeCoeffATable;
|
||||
static G4PhysicsTable* theeRangeCoeffBTable;
|
||||
static G4PhysicsTable* theeRangeCoeffCTable;
|
||||
static G4PhysicsTable* thepRangeCoeffATable;
|
||||
static G4PhysicsTable* thepRangeCoeffBTable;
|
||||
static G4PhysicsTable* thepRangeCoeffCTable;
|
||||
|
||||
static G4double dRoverRange; // dRoverRange is the maximum allowed
|
||||
// deltarange/range in one Step
|
||||
static G4double finalRange; // final step before stopping
|
||||
|
||||
static G4bool rndmStepFlag; // control the randomization of the step
|
||||
static G4bool EnlossFlucFlag; // control the energy loss fluctuation
|
||||
|
||||
static G4EnergyLossMessenger* eLossMessenger;
|
||||
|
||||
public:
|
||||
|
||||
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
|
||||
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
|
||||
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
|
||||
static G4int GetNbOfProcesses() {return NbOfProcesses;};
|
||||
|
||||
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
|
||||
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
|
||||
static void SetStepFunction (G4double c1, G4double c2)
|
||||
{dRoverRange = c1; finalRange = c2;}
|
||||
};
|
||||
|
||||
#include "G4VIeEnergyLoss.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,309 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIhEnergyLoss.hh,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4VIhEnergyLoss physics process -----------
|
||||
// by Laszlo Urban, 30 May 1997
|
||||
//
|
||||
// ************************************************************
|
||||
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the continuous energy loss for charged hadrons.
|
||||
// Processes giving contribution to the continuous loss :
|
||||
// ionisation (= cont.ion.loss + delta ray production)
|
||||
// can be added more easily ..........
|
||||
// This class creates static proton/antiproton dE/dx and range tables ,
|
||||
// which tables can be used by other processes.
|
||||
// The energy loss for other charged hadrons is calculated from the p/pbar
|
||||
// tables with scaled kinetic energy.
|
||||
//
|
||||
// ****************************************************************************
|
||||
// It is assumed that the cut in range is the same for all the charged hadrons!
|
||||
// ****************************************************************************
|
||||
//
|
||||
// 7/10/98 some bugs fixed + some cleanup , L.Urban
|
||||
// 26/10/98 cleanup , L.Urban
|
||||
//
|
||||
|
||||
#ifndef G4VIhEnergyLoss_h
|
||||
#define G4VIhEnergyLoss_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IVContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
class G4EnergyLossMessenger;
|
||||
|
||||
class G4VIhEnergyLoss : public G4IVContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4VIhEnergyLoss(const G4String& );
|
||||
|
||||
virtual ~G4VIhEnergyLoss();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
G4double GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety) ;
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& track ,const G4Step& Step) ;
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step) = 0 ;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
|
||||
G4VIhEnergyLoss(G4VIhEnergyLoss &);
|
||||
G4VIhEnergyLoss & operator=(const G4VIhEnergyLoss &right);
|
||||
|
||||
G4double GetConstraints(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial);
|
||||
|
||||
G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial,
|
||||
G4double ChargeSquare,
|
||||
G4double MeanLoss,
|
||||
G4double Step) ;
|
||||
|
||||
// =====================================================================
|
||||
|
||||
public:
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
G4PhysicsTable* theLossTable ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4double fdEdx; // computed in GetContraints
|
||||
|
||||
G4double fRangeNow ; // computed in GetContraints
|
||||
|
||||
G4int EnergyBinNumber ;
|
||||
G4double RangeCoeffA,RangeCoeffB,RangeCoeffC ;
|
||||
|
||||
// variables for the integration routines
|
||||
static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// data members to speed up the fluctuation calculation
|
||||
G4Material *lastMaterial ;
|
||||
G4int imat ;
|
||||
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
|
||||
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
|
||||
const G4double MaxExcitationNumber ;
|
||||
const G4double probLimFluct ;
|
||||
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
|
||||
|
||||
// ====================================================================
|
||||
// static part of the class
|
||||
|
||||
public:
|
||||
|
||||
// get the number of processes contributing to the cont.energy loss
|
||||
static G4int GetNumberOfProcesses() { return NumberOfProcesses; };
|
||||
|
||||
// set the number of processes contributing to the cont.energy loss
|
||||
static void SetNumberOfProcesses(G4int number)
|
||||
{NumberOfProcesses=number ; };
|
||||
|
||||
// Increment the number of processes contributing to the cont.energy loss
|
||||
static void PlusNumberOfProcesses()
|
||||
{ NumberOfProcesses++ ; };
|
||||
|
||||
// decrement the number of processes contributing to the cont.energy loss
|
||||
static void MinusNumberOfProcesses()
|
||||
{ NumberOfProcesses-- ; };
|
||||
|
||||
static void SetdRoverRange(G4double value) {dRoverRange = value;}
|
||||
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
|
||||
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
|
||||
static void SetStepFunction (G4double c1, G4double c2)
|
||||
{dRoverRange = c1; finalRange = c2;}
|
||||
|
||||
protected:
|
||||
|
||||
static void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
private:
|
||||
|
||||
static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
static void BuildInverseRangeTable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
|
||||
static void BuildTimeTables(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
static void BuildLabTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static void BuildProperTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static void InvertRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static void BuildRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
|
||||
,G4int nbin);
|
||||
|
||||
static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
|
||||
G4int nbin);
|
||||
|
||||
static G4double RangeIntLin(G4PhysicsVector* physicsVector
|
||||
,G4int nbin);
|
||||
|
||||
static G4double RangeIntLog(G4PhysicsVector* physicsVector
|
||||
,G4int nbin);
|
||||
|
||||
static void BuildRangeCoeffATable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
static void BuildRangeCoeffBTable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
static void BuildRangeCoeffCTable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
|
||||
|
||||
|
||||
// ====================================================================
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
static G4PhysicsTable* theDEDXpTable ;
|
||||
static G4PhysicsTable* theDEDXpbarTable ;
|
||||
static G4PhysicsTable* theRangepTable ;
|
||||
static G4PhysicsTable* theRangepbarTable ;
|
||||
|
||||
//inverse of the range tables
|
||||
static G4PhysicsTable* theInverseRangepTable ;
|
||||
static G4PhysicsTable* theInverseRangepbarTable ;
|
||||
|
||||
//lab and proper time tables
|
||||
static G4PhysicsTable* theLabTimepTable ;
|
||||
static G4PhysicsTable* theLabTimepbarTable ;
|
||||
|
||||
static G4PhysicsTable* theProperTimepTable ;
|
||||
static G4PhysicsTable* theProperTimepbarTable ;
|
||||
|
||||
// processes inherited from G4VIhEnergyLoss
|
||||
// register themselves in the static array Recorder
|
||||
static G4PhysicsTable** RecorderOfpProcess;
|
||||
static G4PhysicsTable** RecorderOfpbarProcess;
|
||||
static G4int CounterOfpProcess ;
|
||||
static G4int CounterOfpbarProcess ;
|
||||
|
||||
// particle mass
|
||||
static G4double ParticleMass ;
|
||||
|
||||
static const G4Proton* theProton ;
|
||||
static const G4AntiProton* theAntiProton ;
|
||||
|
||||
// cut in range
|
||||
static G4double CutInRange;
|
||||
|
||||
static G4double LowestKineticEnergy;
|
||||
static G4double HighestKineticEnergy;
|
||||
static G4int TotBin; // number of bins in table,
|
||||
// calculated in BuildPhysicsTable
|
||||
static G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
|
||||
// /LowestKineticEnergy)/TotBin
|
||||
// RTable = exp(LOGRTable)
|
||||
|
||||
private:
|
||||
|
||||
static G4PhysicsTable* theDEDXTable;
|
||||
|
||||
static G4PhysicsTable* theRangeTable;
|
||||
static G4PhysicsTable* theInverseRangeTable;
|
||||
|
||||
static G4PhysicsTable* theLabTimeTable;
|
||||
static G4PhysicsTable* theProperTimeTable;
|
||||
|
||||
static G4PhysicsTable** RecorderOfProcess;
|
||||
static G4int CounterOfProcess;
|
||||
|
||||
|
||||
static G4PhysicsTable* thepRangeCoeffATable;
|
||||
static G4PhysicsTable* thepRangeCoeffBTable;
|
||||
static G4PhysicsTable* thepRangeCoeffCTable;
|
||||
static G4PhysicsTable* thepbarRangeCoeffATable;
|
||||
static G4PhysicsTable* thepbarRangeCoeffBTable;
|
||||
static G4PhysicsTable* thepbarRangeCoeffCTable;
|
||||
|
||||
static G4PhysicsTable* theRangeCoeffATable;
|
||||
static G4PhysicsTable* theRangeCoeffBTable;
|
||||
static G4PhysicsTable* theRangeCoeffCTable;
|
||||
|
||||
static G4double dRoverRange ; // maximum allowed deltarange/range
|
||||
// in one step
|
||||
|
||||
static G4double finalRange ; // last step before stop
|
||||
|
||||
static G4bool rndmStepFlag ;
|
||||
static G4bool EnlossFlucFlag ;
|
||||
|
||||
static G4int NumberOfProcesses ;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#include "G4VIhEnergyLoss.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIhEnergyLoss.icc,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4VIhEnergyLoss physics process ------------
|
||||
// by Laszlo Urban, 30 May 1997
|
||||
// ***************************************************************
|
||||
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the energy loss of charged hadrons.
|
||||
// ***************************************************************
|
||||
// 26/10/98: cleanup , L.Urban
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
inline G4bool G4VIhEnergyLoss::IsApplicable(const G4ParticleDefinition&
|
||||
particle)
|
||||
{
|
||||
return(particle.GetPDGCharge()!= 0.);
|
||||
}
|
||||
|
||||
inline G4double G4VIhEnergyLoss::GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
|
||||
G4double Step =
|
||||
GetConstraints(track.GetDynamicParticle(),track.GetMaterial()) ;
|
||||
|
||||
if((Step>0.0)&&(Step<currentMinimumStep))
|
||||
currentMinimumStep = Step ;
|
||||
|
||||
return Step ;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,834 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IMultipleScattering.cc,v 1.1.2.2 2001/06/28 20:19:20 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4IMultipleScattering physics process ------------
|
||||
// by Laszlo Urban, October 1997
|
||||
// **************************************************************
|
||||
// 09/12/98: charge can be != +- 1 !!!! L.Urban
|
||||
// ************************************************************
|
||||
// It is the first implementation of the
|
||||
// MULTIPLESCATTERING PROCESS
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ---------------------------------------------------------------
|
||||
// 27/10/98: cleanup , L. Urban
|
||||
|
||||
#include "G4IMultipleScattering.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
G4IMultipleScattering::G4IMultipleScattering(const G4String& processName)
|
||||
: G4VContinuousDiscreteProcess(processName),
|
||||
theTransportMeanFreePathTable(NULL),
|
||||
theIntegralITable(NULL),
|
||||
theIntegralJTable(NULL),
|
||||
lastMaterial(NULL),
|
||||
lastKineticEnergy(-1.*MeV),
|
||||
fTransportMeanFreePath(1.e12),
|
||||
LowestKineticEnergy(0.1*keV),
|
||||
HighestKineticEnergy(100.*TeV),
|
||||
TotBin(100),
|
||||
NumberOfBuildPhysicsTableCalls(0),
|
||||
theElectron(G4Electron::Electron()),
|
||||
thePositron(G4Positron::Positron()),
|
||||
plowloss ( 0.5 ),
|
||||
plowlambda ( 0.4 ),
|
||||
tLast (0.0),
|
||||
zLast (0.0),
|
||||
CosTheta (1.0),
|
||||
biglambda ( 1.e10*mm),
|
||||
tuning(1.0)
|
||||
{ }
|
||||
|
||||
G4IMultipleScattering::~G4IMultipleScattering()
|
||||
{
|
||||
if(theTransportMeanFreePathTable)
|
||||
{
|
||||
theTransportMeanFreePathTable->clearAndDestroy() ;
|
||||
delete theTransportMeanFreePathTable ;
|
||||
}
|
||||
if(theIntegralITable)
|
||||
{
|
||||
theIntegralITable->clearAndDestroy() ;
|
||||
delete theIntegralITable ;
|
||||
}
|
||||
if(theIntegralJTable)
|
||||
{
|
||||
theIntegralJTable->clearAndDestroy() ;
|
||||
delete theIntegralJTable ;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IMultipleScattering::BuildPhysicsTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
|
||||
{
|
||||
NumberOfBuildPhysicsTableCalls += 1 ;
|
||||
if(NumberOfBuildPhysicsTableCalls == 1)
|
||||
{ ; }
|
||||
else
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable() ;
|
||||
const G4double sigmafactor = twopi*classic_electr_radius*
|
||||
classic_electr_radius ;
|
||||
G4double KineticEnergy,AtomicNumber,sigma,lambda ;
|
||||
G4double density ;
|
||||
|
||||
if(theTransportMeanFreePathTable)
|
||||
{
|
||||
theTransportMeanFreePathTable->clearAndDestroy() ;
|
||||
delete theTransportMeanFreePathTable ;
|
||||
}
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
theTransportMeanFreePathTable = new G4PhysicsTable(numOfMaterials) ;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(
|
||||
LowestKineticEnergy,HighestKineticEnergy,TotBin) ;
|
||||
|
||||
const G4Material* material = (*theMaterialTable)(J) ;
|
||||
const G4ElementVector* theElementVector =
|
||||
material->GetElementVector() ;
|
||||
const G4double* theAtomicNumDensityVector =
|
||||
material->GetAtomicNumDensityVector() ;
|
||||
const G4int NumberOfElements =
|
||||
material->GetNumberOfElements() ;
|
||||
density = material->GetDensity() ;
|
||||
|
||||
for (G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
KineticEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
|
||||
sigma = 0. ;
|
||||
|
||||
for (G4int iel=0; iel<NumberOfElements; iel++)
|
||||
{
|
||||
AtomicNumber = (*theElementVector)(iel)->GetZ() ;
|
||||
sigma += theAtomicNumDensityVector[iel]*
|
||||
ComputeTransportCrossSection(aParticleType,
|
||||
KineticEnergy,AtomicNumber) ;
|
||||
}
|
||||
|
||||
sigma *= sigmafactor ;
|
||||
|
||||
lambda = 1./sigma ;
|
||||
|
||||
aVector->PutValue(i,lambda) ;
|
||||
|
||||
}
|
||||
|
||||
theTransportMeanFreePathTable->insert(aVector) ;
|
||||
|
||||
}
|
||||
|
||||
BuildIntegralITable(aParticleType) ;
|
||||
BuildIntegralJTable(aParticleType) ;
|
||||
|
||||
NumberOfBuildPhysicsTableCalls = 0 ;
|
||||
|
||||
if( (&aParticleType == G4Electron::Electron()) ||
|
||||
(&aParticleType == G4MuonPlus::MuonPlus()) ||
|
||||
(&aParticleType == G4Proton::Proton()) )
|
||||
{
|
||||
PrintInfoDefinition() ;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void G4IMultipleScattering::BuildIntegralITable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable() ;
|
||||
G4Material* aMaterial ;
|
||||
G4double fmin,lmin,Value,KineticEnergy,lambda,Tlast,Vlast ;
|
||||
G4double u,umax,du,t,coeff,dEdx ;
|
||||
G4int n,nmax ;
|
||||
G4bool isOut ;
|
||||
const G4int nb = 100 ;
|
||||
G4double rmin ;
|
||||
|
||||
if(theIntegralITable)
|
||||
{
|
||||
theIntegralITable->clearAndDestroy() ;
|
||||
delete theIntegralITable ;
|
||||
}
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
theIntegralITable = new G4PhysicsTable(numOfMaterials) ;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(
|
||||
LowestKineticEnergy,HighestKineticEnergy,TotBin) ;
|
||||
|
||||
aMaterial = (*theMaterialTable)(J) ;
|
||||
|
||||
rmin = G4EnergyLossTables::GetPreciseRangeFromEnergy(
|
||||
&aParticleType,
|
||||
LowestKineticEnergy,
|
||||
aMaterial) ;
|
||||
|
||||
lmin = (*theTransportMeanFreePathTable)(J)->
|
||||
GetValue(LowestKineticEnergy,isOut) ;
|
||||
|
||||
// this value comes from z=r*l/(r+l) = exp(-I) !!!
|
||||
Value = -log(rmin*lmin/(rmin+lmin)) ;
|
||||
|
||||
aVector->PutValue(0,Value) ;
|
||||
Tlast = LowestKineticEnergy ;
|
||||
Vlast = Value ;
|
||||
for (G4int i=1; i<TotBin; i++)
|
||||
{
|
||||
KineticEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
umax = log(KineticEnergy/Tlast) ;
|
||||
nmax = int(nb*umax + 0.5) ;
|
||||
if(nmax<1)
|
||||
nmax = 1 ;
|
||||
du = umax/nmax ;
|
||||
Value = 0. ;
|
||||
u = -du ;
|
||||
for(n=0; n<=nmax; n++)
|
||||
{
|
||||
u += du ;
|
||||
t = Tlast*exp(u) ;
|
||||
lambda = (*theTransportMeanFreePathTable)(J)->
|
||||
GetValue(t,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(&aParticleType,
|
||||
t,aMaterial) ;
|
||||
if((n == 0) || (n == nmax))
|
||||
coeff = 0.5 ;
|
||||
else
|
||||
coeff = 1. ;
|
||||
Value += coeff*t/(dEdx*lambda) ;
|
||||
}
|
||||
Value *= du ;
|
||||
Value += Vlast ;
|
||||
aVector->PutValue(i,Value) ;
|
||||
Tlast = KineticEnergy ;
|
||||
Vlast = Value ;
|
||||
}
|
||||
theIntegralITable->insert(aVector) ;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IMultipleScattering::BuildIntegralJTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable() ;
|
||||
G4Material* aMaterial ;
|
||||
G4double rmin,lmin,Value,KineticEnergy,lambda,Tlast,Vlast ;
|
||||
G4double u,umax,du,t,coeff,dEdx,w,ww ;
|
||||
G4double cmin,lndu ;
|
||||
G4int n,nmax ;
|
||||
G4bool isOut ;
|
||||
const G4int nb = 100 ;
|
||||
|
||||
if(theIntegralJTable)
|
||||
{
|
||||
theIntegralJTable->clearAndDestroy() ;
|
||||
delete theIntegralJTable ;
|
||||
}
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
theIntegralJTable = new G4PhysicsTable(numOfMaterials) ;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(
|
||||
LowestKineticEnergy,HighestKineticEnergy,TotBin) ;
|
||||
aMaterial = (*theMaterialTable)(J) ;
|
||||
|
||||
rmin = G4EnergyLossTables::GetPreciseRangeFromEnergy(
|
||||
&aParticleType,
|
||||
LowestKineticEnergy,
|
||||
aMaterial) ;
|
||||
lmin = (*theTransportMeanFreePathTable)(J)->
|
||||
GetValue(LowestKineticEnergy,isOut) ;
|
||||
Value = rmin*lmin/(rmin+lmin) ;
|
||||
aVector->PutValue(0,Value) ;
|
||||
Tlast = LowestKineticEnergy ;
|
||||
Vlast = Value ;
|
||||
for (G4int i=1; i<TotBin; i++)
|
||||
{
|
||||
KineticEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
umax = log(KineticEnergy/Tlast) ;
|
||||
nmax =int(nb*umax + 0.5) ;
|
||||
if(nmax<1)
|
||||
nmax = 1 ;
|
||||
du = umax/nmax ;
|
||||
Value = 0. ;
|
||||
u = -du ;
|
||||
for(n=0; n<=nmax; n++)
|
||||
{
|
||||
u += du ;
|
||||
t = Tlast*exp(u) ;
|
||||
w = (*theIntegralITable)(J)->
|
||||
GetValue(t,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(&aParticleType,
|
||||
t,aMaterial) ;
|
||||
if((n == 0) || (n == nmax))
|
||||
coeff = 0.5 ;
|
||||
else
|
||||
coeff = 1. ;
|
||||
Value += coeff*t*exp(w)/dEdx ;
|
||||
}
|
||||
Value *= du ;
|
||||
w = (*theIntegralITable)(J)->
|
||||
GetValue(Tlast,isOut) ;
|
||||
ww = (*theIntegralITable)(J)->
|
||||
GetValue(KineticEnergy,isOut) ;
|
||||
Value *= exp(-ww) ;
|
||||
Value += exp(w-ww)*Vlast ;
|
||||
aVector->PutValue(i,Value) ;
|
||||
Tlast = KineticEnergy ;
|
||||
Vlast = Value ;
|
||||
}
|
||||
theIntegralJTable->insert(aVector) ;
|
||||
}
|
||||
}
|
||||
|
||||
G4double G4IMultipleScattering::GetIntegralI(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material* aMaterial)
|
||||
{
|
||||
G4double intI ;
|
||||
G4bool isOut ;
|
||||
if(KineticEnergy < LowestKineticEnergy)
|
||||
{
|
||||
intI = (*theIntegralITable)(aMaterial->GetIndex())->
|
||||
GetValue(LowestKineticEnergy,isOut) ;
|
||||
intI *= exp((1.-plowloss-plowlambda)*
|
||||
log(KineticEnergy/LowestKineticEnergy)) ;
|
||||
}
|
||||
else if(KineticEnergy <= HighestKineticEnergy)
|
||||
{
|
||||
intI = (*theIntegralITable)(aMaterial->GetIndex())->
|
||||
GetValue(KineticEnergy,isOut) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
intI = (*theIntegralITable)(aMaterial->GetIndex())->
|
||||
GetValue(HighestKineticEnergy,isOut) ;
|
||||
intI += (KineticEnergy-HighestKineticEnergy)/
|
||||
((*theTransportMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue(HighestKineticEnergy,isOut)
|
||||
*
|
||||
G4EnergyLossTables::GetPreciseDEDX(aParticle,
|
||||
HighestKineticEnergy,aMaterial)) ;
|
||||
}
|
||||
return intI ;
|
||||
}
|
||||
|
||||
G4double G4IMultipleScattering::GetIntegralJ(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material* aMaterial)
|
||||
{
|
||||
G4double intJ,lmin,lmax,fmax,Imin,Imin2,t ;
|
||||
G4bool isOut ;
|
||||
|
||||
if(KineticEnergy < LowestKineticEnergy)
|
||||
{
|
||||
lmin = (*theTransportMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue(KineticEnergy,isOut) ;
|
||||
Imin = (*theIntegralITable)(aMaterial->GetIndex())->
|
||||
GetValue(LowestKineticEnergy,isOut) ;
|
||||
Imin2= Imin*Imin ;
|
||||
t = exp(0.1*log(KineticEnergy/LowestKineticEnergy)) ;
|
||||
|
||||
intJ = (((t-4./Imin)*t+12./Imin2)*t-24./(Imin*Imin2))*t+24./(Imin2*Imin2);
|
||||
intJ -= 24.*exp(-Imin*t)/(Imin2*Imin2) ;
|
||||
intJ *= lmin ;
|
||||
}
|
||||
else if(KineticEnergy <= HighestKineticEnergy)
|
||||
{
|
||||
intJ = (*theIntegralJTable)(aMaterial->GetIndex())->
|
||||
GetValue(KineticEnergy,isOut) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lmax = (*theTransportMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue(HighestKineticEnergy,isOut) ;
|
||||
fmax = G4EnergyLossTables::GetPreciseDEDX(aParticle,
|
||||
HighestKineticEnergy,aMaterial) ;
|
||||
intJ = lmax - (lmax-(*theIntegralJTable)(aMaterial->GetIndex())->
|
||||
GetValue(HighestKineticEnergy,isOut))*
|
||||
exp((HighestKineticEnergy-KineticEnergy)/(fmax*lmax)) ;
|
||||
}
|
||||
|
||||
return intJ ;
|
||||
}
|
||||
|
||||
G4double G4IMultipleScattering::ComputeTransportCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber)
|
||||
{
|
||||
const G4double epsfactor = 2.*electron_mass_c2*electron_mass_c2*
|
||||
Bohr_radius*Bohr_radius/(hbarc*hbarc) ;
|
||||
const G4double epsmin = 1.e-4 , epsmax = 1.e10 ;
|
||||
|
||||
const G4double cpar=1.50 ;
|
||||
|
||||
const G4double Zdat[15] = {4.,6.,13.,20.,26.,29.,32.,38.,47.,
|
||||
50.,56.,64.,74.,79.,82. } ;
|
||||
|
||||
const G4double Tdat[22] =
|
||||
{ 0.0001*MeV,0.0002*MeV,0.0004*MeV,0.0007*MeV,
|
||||
0.001*MeV,0.002*MeV,0.004*MeV,0.007*MeV,0.01*MeV,
|
||||
0.02*MeV,0.04*MeV,0.07*MeV,0.1*MeV,0.2*MeV,
|
||||
0.4*MeV,0.7*MeV,1.*MeV,2.*MeV,4.*MeV,
|
||||
7.*MeV,10.*MeV,20.*MeV} ;
|
||||
|
||||
// corr. factors for e-/e+ lambda
|
||||
|
||||
const G4double celectron[15][22] =
|
||||
{{1.125,1.072,1.051,1.047,1.047,1.050,1.052,1.054,
|
||||
1.054,1.057,1.062,1.069,1.075,1.090,1.105,1.111,
|
||||
1.112,1.108,1.100,1.093,1.089,1.087 },
|
||||
{1.408,1.246,1.143,1.096,1.077,1.059,1.053,1.051,
|
||||
1.052,1.053,1.058,1.065,1.072,1.087,1.101,1.108,
|
||||
1.109,1.105,1.097,1.090,1.086,1.082 },
|
||||
{2.833,2.268,1.861,1.612,1.486,1.309,1.204,1.156,
|
||||
1.136,1.114,1.106,1.106,1.109,1.119,1.129,1.132,
|
||||
1.131,1.124,1.113,1.104,1.099,1.098 },
|
||||
{3.879,3.016,2.380,2.007,1.818,1.535,1.340,1.236,
|
||||
1.190,1.133,1.107,1.099,1.098,1.103,1.110,1.113,
|
||||
1.112,1.105,1.096,1.089,1.085,1.098 },
|
||||
{6.937,4.330,2.886,2.256,1.987,1.628,1.395,1.265,
|
||||
1.203,1.122,1.080,1.065,1.061,1.063,1.070,1.073,
|
||||
1.073,1.070,1.064,1.059,1.056,1.056 },
|
||||
{9.616,5.708,3.424,2.551,2.204,1.762,1.485,1.330,
|
||||
1.256,1.155,1.099,1.077,1.070,1.068,1.072,1.074,
|
||||
1.074,1.070,1.063,1.059,1.056,1.052 },
|
||||
{11.72,6.364,3.811,2.806,2.401,1.884,1.564,1.386,
|
||||
1.300,1.180,1.112,1.082,1.073,1.066,1.068,1.069,
|
||||
1.068,1.064,1.059,1.054,1.051,1.050 },
|
||||
{18.08,8.601,4.569,3.183,2.662,2.025,1.646,1.439,
|
||||
1.339,1.195,1.108,1.068,1.053,1.040,1.039,1.039,
|
||||
1.039,1.037,1.034,1.031,1.030,1.036 },
|
||||
{18.22,10.48,5.333,3.713,3.115,2.367,1.898,1.631,
|
||||
1.498,1.301,1.171,1.105,1.077,1.048,1.036,1.033,
|
||||
1.031,1.028,1.024,1.022,1.021,1.024 },
|
||||
{14.14,10.65,5.710,3.929,3.266,2.453,1.951,1.669,
|
||||
1.528,1.319,1.178,1.106,1.075,1.040,1.027,1.022,
|
||||
1.020,1.017,1.015,1.013,1.013,1.020 },
|
||||
{14.11,11.73,6.312,4.240,3.478,2.566,2.022,1.720,
|
||||
1.569,1.342,1.186,1.102,1.065,1.022,1.003,0.997,
|
||||
0.995,0.993,0.993,0.993,0.993,1.011 },
|
||||
{22.76,20.01,8.835,5.287,4.144,2.901,2.219,1.855,
|
||||
1.677,1.410,1.224,1.121,1.073,1.014,0.986,0.976,
|
||||
0.974,0.972,0.973,0.974,0.975,0.987 },
|
||||
{50.77,40.85,14.13,7.184,5.284,3.435,2.520,2.059,
|
||||
1.837,1.512,1.283,1.153,1.091,1.010,0.969,0.954,
|
||||
0.950,0.947,0.949,0.952,0.954,0.963 },
|
||||
{65.87,59.06,15.87,7.570,5.567,3.650,2.682,2.182,
|
||||
1.939,1.579,1.325,1.178,1.108,1.014,0.965,0.947,
|
||||
0.941,0.938,0.940,0.944,0.946,0.954 },
|
||||
// {45.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239, misprint?
|
||||
{55.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239,
|
||||
1.985,1.609,1.343,1.188,1.113,1.013,0.960,0.939,
|
||||
0.933,0.930,0.933,0.936,0.939,0.949 }};
|
||||
|
||||
const G4double cpositron[15][22] = {
|
||||
{2.589,2.044,1.658,1.446,1.347,1.217,1.144,1.110,
|
||||
1.097,1.083,1.080,1.086,1.092,1.108,1.123,1.131,
|
||||
1.131,1.126,1.117,1.108,1.103,1.100 },
|
||||
{3.904,2.794,2.079,1.710,1.543,1.325,1.202,1.145,
|
||||
1.122,1.096,1.089,1.092,1.098,1.114,1.130,1.137,
|
||||
1.138,1.132,1.122,1.113,1.108,1.102 },
|
||||
{7.970,6.080,4.442,3.398,2.872,2.127,1.672,1.451,
|
||||
1.357,1.246,1.194,1.179,1.178,1.188,1.201,1.205,
|
||||
1.203,1.190,1.173,1.159,1.151,1.145 },
|
||||
{9.714,7.607,5.747,4.493,3.815,2.777,2.079,1.715,
|
||||
1.553,1.353,1.253,1.219,1.211,1.214,1.225,1.228,
|
||||
1.225,1.210,1.191,1.175,1.166,1.174 },
|
||||
{17.97,12.95,8.628,6.065,4.849,3.222,2.275,1.820,
|
||||
1.624,1.382,1.259,1.214,1.202,1.202,1.214,1.219,
|
||||
1.217,1.203,1.184,1.169,1.160,1.151 },
|
||||
{24.83,17.06,10.84,7.355,5.767,3.707,2.546,1.996,
|
||||
1.759,1.465,1.311,1.252,1.234,1.228,1.238,1.241,
|
||||
1.237,1.222,1.201,1.184,1.174,1.159 },
|
||||
{23.26,17.15,11.52,8.049,6.375,4.114,2.792,2.155,
|
||||
1.880,1.535,1.353,1.281,1.258,1.247,1.254,1.256,
|
||||
1.252,1.234,1.212,1.194,1.183,1.170 },
|
||||
{22.33,18.01,12.86,9.212,7.336,4.702,3.117,2.348,
|
||||
2.015,1.602,1.385,1.297,1.268,1.251,1.256,1.258,
|
||||
1.254,1.237,1.214,1.195,1.185,1.179 },
|
||||
{33.91,24.13,15.71,10.80,8.507,5.467,3.692,2.808,
|
||||
2.407,1.873,1.564,1.425,1.374,1.330,1.324,1.320,
|
||||
1.312,1.288,1.258,1.235,1.221,1.205 },
|
||||
{32.14,24.11,16.30,11.40,9.015,5.782,3.868,2.917,
|
||||
2.490,1.925,1.596,1.447,1.391,1.342,1.332,1.327,
|
||||
1.320,1.294,1.264,1.240,1.226,1.214 },
|
||||
{29.51,24.07,17.19,12.28,9.766,6.238,4.112,3.066,
|
||||
2.602,1.995,1.641,1.477,1.414,1.356,1.342,1.336,
|
||||
1.328,1.302,1.270,1.245,1.231,1.233 },
|
||||
{38.19,30.85,21.76,15.35,12.07,7.521,4.812,3.498,
|
||||
2.926,2.188,1.763,1.563,1.484,1.405,1.382,1.371,
|
||||
1.361,1.330,1.294,1.267,1.251,1.239 },
|
||||
{49.71,39.80,27.96,19.63,15.36,9.407,5.863,4.155,
|
||||
3.417,2.478,1.944,1.692,1.589,1.480,1.441,1.423,
|
||||
1.409,1.372,1.330,1.298,1.280,1.258 },
|
||||
{59.25,45.08,30.36,20.83,16.15,9.834,6.166,4.407,
|
||||
3.641,2.648,2.064,1.779,1.661,1.531,1.482,1.459,
|
||||
1.442,1.400,1.354,1.319,1.299,1.272 },
|
||||
{56.38,44.29,30.50,21.18,16.51,10.11,6.354,4.542,
|
||||
3.752,2.724,2.116,1.817,1.692,1.554,1.499,1.474,
|
||||
1.456,1.412,1.364,1.328,1.307,1.282 }};
|
||||
G4double Z23,ParticleMass,rat2,Charge,TotalEnergy,beta2,bg2,
|
||||
eps,Z1,Z2,ratZ,T,E,b2small,b2big,ratb2,c1,c2,cc1,cc2,
|
||||
corr,sigma,corrfactor,ChargeSquare ;
|
||||
G4int iZ,iT ;
|
||||
|
||||
Z23 = 2.*log(AtomicNumber)/3. ;
|
||||
Z23 = exp(Z23) ;
|
||||
|
||||
ParticleMass = aParticleType.GetPDGMass() ;
|
||||
|
||||
rat2 = ParticleMass/electron_mass_c2 ;
|
||||
rat2 = rat2*rat2 ;
|
||||
|
||||
Charge = aParticleType.GetPDGCharge() ;
|
||||
ChargeSquare = Charge*Charge/(eplus*eplus) ;
|
||||
|
||||
TotalEnergy = KineticEnergy + ParticleMass ;
|
||||
|
||||
beta2 = KineticEnergy*(TotalEnergy+ParticleMass)/
|
||||
(TotalEnergy*TotalEnergy) ;
|
||||
bg2 = KineticEnergy*(TotalEnergy+ParticleMass)/
|
||||
(ParticleMass*ParticleMass) ;
|
||||
|
||||
eps = rat2*epsfactor*bg2/Z23 ;
|
||||
|
||||
if(eps<epsmin)
|
||||
sigma = 2.*eps*eps*eps/3. ;
|
||||
else if(eps<epsmax)
|
||||
sigma = log(1.+2.*eps)-2.*eps/(1.+eps) ;
|
||||
else
|
||||
sigma = log(2.*eps)-2.+2.5/eps ;
|
||||
|
||||
sigma *= ChargeSquare*AtomicNumber*AtomicNumber/rat2 ;
|
||||
sigma /= beta2*bg2 ;
|
||||
|
||||
// correct this value using the corrections computed for e+/e-
|
||||
KineticEnergy *= electron_mass_c2/ParticleMass ;
|
||||
|
||||
// interpolate in AtomicNumber and beta2
|
||||
|
||||
// get bin number in Z
|
||||
iZ = 14 ;
|
||||
|
||||
while ((iZ>=0)&&(Zdat[iZ]>=AtomicNumber))
|
||||
{
|
||||
iZ -= 1 ;
|
||||
}
|
||||
if(iZ==14)
|
||||
{
|
||||
iZ = 13 ;
|
||||
}
|
||||
if(iZ==-1)
|
||||
{
|
||||
iZ = 0 ;
|
||||
}
|
||||
|
||||
Z1 = Zdat[iZ] ;
|
||||
Z2 = Zdat[iZ+1] ;
|
||||
ratZ = (AtomicNumber-Z1)/(Z2-Z1) ;
|
||||
|
||||
// get bin number in T (beta2)
|
||||
iT = 21 ;
|
||||
while ((iT>=0)&&(Tdat[iT]>=KineticEnergy))
|
||||
iT -= 1 ;
|
||||
if(iT==21)
|
||||
iT = 20 ;
|
||||
if(iT==-1)
|
||||
iT = 0 ;
|
||||
|
||||
// calculate betasquare values
|
||||
T = Tdat[iT] ;
|
||||
E = T + electron_mass_c2 ;
|
||||
b2small = T*(E+electron_mass_c2)/(E*E) ;
|
||||
T = Tdat[iT+1] ;
|
||||
E = T + electron_mass_c2 ;
|
||||
b2big = T*(E+electron_mass_c2)/(E*E) ;
|
||||
ratb2 = (beta2-b2small)/(b2big-b2small) ;
|
||||
|
||||
corrfactor = tuning*(1.+cpar)/(1.+cpar*beta2) ;
|
||||
|
||||
if(Charge < 0.)
|
||||
{
|
||||
c1 = celectron[iZ][iT] ;
|
||||
c2 = celectron[iZ+1][iT] ;
|
||||
cc1 = c1+ratZ*(c2-c1) ;
|
||||
|
||||
c1 = celectron[iZ][iT+1] ;
|
||||
c2 = celectron[iZ+1][iT+1] ;
|
||||
cc2 = c1+ratZ*(c2-c1) ;
|
||||
|
||||
corr = cc1+ratb2*(cc2-cc1) ;
|
||||
|
||||
sigma /= corr ;
|
||||
|
||||
}
|
||||
|
||||
if(Charge > 0.)
|
||||
{
|
||||
c1 = cpositron[iZ][iT] ;
|
||||
c2 = cpositron[iZ+1][iT] ;
|
||||
cc1 = c1+ratZ*(c2-c1) ;
|
||||
|
||||
c1 = cpositron[iZ][iT+1] ;
|
||||
c2 = cpositron[iZ+1][iT+1] ;
|
||||
cc2 = c1+ratZ*(c2-c1) ;
|
||||
|
||||
corr = cc1+ratb2*(cc2-cc1) ;
|
||||
|
||||
sigma /= corr ;
|
||||
}
|
||||
|
||||
sigma *= corrfactor ;
|
||||
|
||||
return sigma ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4VParticleChange* G4IMultipleScattering::PostStepDoIt(
|
||||
const G4Track& trackData,
|
||||
const G4Step& stepData)
|
||||
{
|
||||
G4double lambdasave ;
|
||||
const G4double taulim = 1.e-10 , randlim = 0.25*taulim*taulim ;
|
||||
const G4double tausmall = 5.e-5,taubig =50.;
|
||||
|
||||
const G4double scatteringparameter=1.00 ,
|
||||
kappa = 2.5, kappapl1 = kappa+1., kappami1 = kappa-1. ;
|
||||
|
||||
const G4DynamicParticle* aParticle ;
|
||||
G4Material* aMaterial ;
|
||||
G4int materialIndex ;
|
||||
G4double KineticEnergy,truestep,tau,prob,cth,sth,phi,
|
||||
dirx,diry,dirz,w,w1,etau,rmean,safetyminustolerance,
|
||||
xnew,ynew,znew ;
|
||||
G4double rand,rmax2 ;
|
||||
G4bool isOut;
|
||||
|
||||
aParticleChange.Initialize(trackData) ;
|
||||
|
||||
aMaterial = stepData.GetPreStepPoint()->GetMaterial() ;
|
||||
|
||||
|
||||
truestep = stepData.GetStepLength() ;
|
||||
|
||||
// there is no scattering for truestep=0. !
|
||||
if(truestep == 0.)
|
||||
return &aParticleChange ;
|
||||
|
||||
aParticle = trackData.GetDynamicParticle() ;
|
||||
|
||||
materialIndex = aMaterial->GetIndex() ;
|
||||
KineticEnergy = aParticle->GetKineticEnergy() ;
|
||||
|
||||
// shortcut if the particle is not Alive (e.g. stopped in energy loss)
|
||||
if(trackData.GetTrackStatus() != fAlive)
|
||||
return &aParticleChange ;
|
||||
|
||||
if ((lastMaterial == aMaterial) && (lastKineticEnergy == KineticEnergy))
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastMaterial=aMaterial;
|
||||
lastKineticEnergy=KineticEnergy;
|
||||
if(KineticEnergy<LowestKineticEnergy)
|
||||
{
|
||||
fTransportMeanFreePath =
|
||||
exp(plowlambda*log(KineticEnergy/LowestKineticEnergy))*
|
||||
(*theTransportMeanFreePathTable)
|
||||
(materialIndex)->GetValue(LowestKineticEnergy,isOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TransportMeanFreePath taken at kin.energy after the energy loss!
|
||||
if(KineticEnergy>HighestKineticEnergy)
|
||||
KineticEnergy = HighestKineticEnergy ;
|
||||
fTransportMeanFreePath = (*theTransportMeanFreePathTable)
|
||||
(materialIndex)->GetValue(KineticEnergy,isOut);
|
||||
}
|
||||
}
|
||||
|
||||
// effective lambda used in scattering .....................
|
||||
lambdasave = fTransportMeanFreePath ;
|
||||
|
||||
if(CosTheta == 1.)
|
||||
{
|
||||
fTransportMeanFreePath = biglambda ;
|
||||
tau = 0.;
|
||||
cth = 1. ;
|
||||
}
|
||||
else if(CosTheta == 0.)
|
||||
{
|
||||
fTransportMeanFreePath = 0. ;
|
||||
tau = biglambda ;
|
||||
cth = -1.+2.*G4UniformRand() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
fTransportMeanFreePath = -truestep/log(CosTheta) ;
|
||||
tau = truestep/fTransportMeanFreePath ;
|
||||
prob = exp(-tau)*(1.+scatteringparameter*tau) ;
|
||||
|
||||
if(G4UniformRand()<prob)
|
||||
{
|
||||
if(tau<taulim)
|
||||
{
|
||||
rand = G4UniformRand() ;
|
||||
if(rand > randlim)
|
||||
cth = 1.-tau*(1./sqrt(rand)-1.) ;
|
||||
else
|
||||
cth = -1. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
w = 1.+scatteringparameter*tau ;
|
||||
w1 = w-1. ;
|
||||
cth = w-w1*(w+1.)/sqrt(w1*w1+4.*w*G4UniformRand()) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
cth = -1.+2.*G4UniformRand() ;
|
||||
}
|
||||
|
||||
sth = sqrt(1.-cth*cth) ;
|
||||
phi = twopi*G4UniformRand() ;
|
||||
|
||||
dirx = sth*cos(phi) ;
|
||||
diry = sth*sin(phi) ;
|
||||
dirz = cth ;
|
||||
|
||||
G4ParticleMomentum ParticleDirection = aParticle->GetMomentumDirection();
|
||||
G4ThreeVector newDirection(dirx,diry,dirz) ;
|
||||
newDirection.rotateUz(ParticleDirection) ;
|
||||
aParticleChange.SetNumberOfSecondaries(0) ;
|
||||
aParticleChange.SetEnergyChange( KineticEnergy ) ;
|
||||
aParticleChange.SetMomentumChange(newDirection.x(),
|
||||
newDirection.y(),
|
||||
newDirection.z()) ;
|
||||
|
||||
// compute lateral displacement
|
||||
// only for safety > tolerance !!!!!
|
||||
safetyminustolerance = stepData.GetPostStepPoint()->GetSafety()
|
||||
-kCarTolerance ;
|
||||
if(safetyminustolerance > 0.)
|
||||
{
|
||||
if(truestep == GeomStepFinal)
|
||||
{ ; }
|
||||
else
|
||||
{
|
||||
rmax2 = (truestep+GeomStepFinal)*(truestep-GeomStepFinal) ;
|
||||
if(tau<tausmall)
|
||||
rmean = 5.*tau*tau*tau/12. ;
|
||||
else
|
||||
{
|
||||
if(tau<taubig)
|
||||
etau = exp(-tau) ;
|
||||
else
|
||||
etau = 0. ;
|
||||
rmean = -kappa*tau ;
|
||||
rmean = -exp(rmean)/(kappa*kappami1) ;
|
||||
rmean += tau-kappapl1/kappa+kappa*etau/kappami1 ;
|
||||
}
|
||||
rmean *= 4.*fTransportMeanFreePath*fTransportMeanFreePath/3.;
|
||||
if(rmean>rmax2)
|
||||
rmean = rmax2 ;
|
||||
|
||||
if(rmean>0.)
|
||||
{
|
||||
rmean = sqrt(rmean) ;
|
||||
|
||||
if(rmean>safetyminustolerance)
|
||||
rmean = safetyminustolerance ;
|
||||
|
||||
fMeanLateralDisplacement = rmean ;
|
||||
|
||||
// sample direction of lateral displacement
|
||||
phi = twopi*G4UniformRand() ;
|
||||
dirx = cos(phi) ;
|
||||
diry = sin(phi) ;
|
||||
dirz = 0. ;
|
||||
G4ThreeVector latDirection(dirx,diry,dirz);
|
||||
latDirection.rotateUz(ParticleDirection) ;
|
||||
|
||||
// compute new endpoint of the Step
|
||||
xnew = stepData.GetPostStepPoint()->GetPosition().x()+
|
||||
rmean*latDirection.x() ;
|
||||
ynew = stepData.GetPostStepPoint()->GetPosition().y()+
|
||||
rmean*latDirection.y() ;
|
||||
znew = stepData.GetPostStepPoint()->GetPosition().z()+
|
||||
rmean*latDirection.z() ;
|
||||
|
||||
aParticleChange.SetPositionChange(xnew,ynew,znew) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fTransportMeanFreePath = lambdasave ;
|
||||
|
||||
return &aParticleChange ;
|
||||
|
||||
}
|
||||
|
||||
void G4IMultipleScattering::PrintInfoDefinition()
|
||||
{
|
||||
G4String comments = " Tables of transport mean free paths.";
|
||||
comments += "\n New model of MSC , computes the lateral \n";
|
||||
comments += " displacement of the particle , too.";
|
||||
|
||||
G4cout << G4endl << GetProcessName() << ": " << comments
|
||||
<< "\n PhysicsTables from " << G4BestUnit(LowestKineticEnergy,
|
||||
"Energy")
|
||||
<< " to " << G4BestUnit(HighestKineticEnergy,"Energy")
|
||||
<< " in " << TotBin << " bins. \n";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,977 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeIonisation.cc,v 1.1.2.2 2001/06/28 20:19:21 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ---------- G4IeIonisation physics process -----------
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// ************************************************************
|
||||
// It is the first implementation of the IONISATION
|
||||
// PROCESS. ( delta rays + continuous energy loss)
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// 27/10/98: minor changes + cleanup, L.Urban
|
||||
// --------------------------------------------------------------
|
||||
|
||||
|
||||
#include "G4IeIonisation.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
|
||||
G4IeIonisation::G4IeIonisation(const G4String& processName)
|
||||
: G4VIeEnergyLoss(processName),
|
||||
theMeanFreePathTable(NULL),
|
||||
theNlambdaTable(NULL),
|
||||
theInverseNlambdaTable(NULL),
|
||||
theCoeffATable(NULL),
|
||||
theCoeffBTable(NULL),
|
||||
theCoeffCTable(NULL),
|
||||
LowestKineticEnergy(1.00*keV),
|
||||
HighestKineticEnergy(100.*TeV),
|
||||
TotBin(100),
|
||||
NumberOfBuildPhysicsTableCalls(0),
|
||||
theElectron ( G4Electron::Electron() ),
|
||||
thePositron ( G4Positron::Positron() )
|
||||
{ }
|
||||
|
||||
G4IeIonisation::~G4IeIonisation()
|
||||
{
|
||||
if (theMeanFreePathTable) {
|
||||
theMeanFreePathTable->clearAndDestroy();
|
||||
delete theMeanFreePathTable;
|
||||
}
|
||||
if (theNlambdaTable) {
|
||||
theNlambdaTable->clearAndDestroy();
|
||||
delete theNlambdaTable;
|
||||
}
|
||||
if (theInverseNlambdaTable) {
|
||||
theInverseNlambdaTable->clearAndDestroy();
|
||||
delete theInverseNlambdaTable;
|
||||
}
|
||||
if(theCoeffATable) {
|
||||
theCoeffATable->clearAndDestroy();
|
||||
delete theCoeffATable;
|
||||
}
|
||||
if(theCoeffBTable) {
|
||||
theCoeffBTable->clearAndDestroy();
|
||||
delete theCoeffBTable;
|
||||
}
|
||||
if(theCoeffCTable) {
|
||||
theCoeffCTable->clearAndDestroy();
|
||||
delete theCoeffCTable;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::SetPhysicsTableBining(
|
||||
G4double lowE,G4double highE,G4int nBins)
|
||||
{
|
||||
LowestKineticEnergy=lowE; HighestKineticEnergy=highE; TotBin=nBins;
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildPhysicsTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
RTable = exp(log(HighestKineticEnergy/LowestKineticEnergy)/TotBin) ;
|
||||
NumberOfBuildPhysicsTableCalls += 1 ;
|
||||
if(NumberOfBuildPhysicsTableCalls == 1)
|
||||
{
|
||||
BuildLossTable(aParticleType) ;
|
||||
|
||||
if(&aParticleType==theElectron)
|
||||
{
|
||||
RecorderOfElectronProcess[CounterOfElectronProcess] =
|
||||
(*this).theLossTable ;
|
||||
CounterOfElectronProcess++;
|
||||
}
|
||||
else
|
||||
{
|
||||
RecorderOfPositronProcess[CounterOfPositronProcess] =
|
||||
(*this).theLossTable ;
|
||||
CounterOfPositronProcess++;
|
||||
}
|
||||
|
||||
BuildLambdaTable(aParticleType) ;
|
||||
|
||||
BuildDEDXTable(aParticleType) ;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
BuildNlambdaTable(aParticleType) ;
|
||||
|
||||
BuildCoeffATable(aParticleType) ;
|
||||
BuildCoeffBTable(aParticleType) ;
|
||||
BuildCoeffCTable(aParticleType) ;
|
||||
|
||||
BuildInverseNlambdaTable(aParticleType) ;
|
||||
|
||||
G4int printflag = 0 ;
|
||||
if(printflag>0)
|
||||
TestOfInversion(aParticleType,printflag) ;
|
||||
|
||||
NumberOfBuildPhysicsTableCalls = 0 ;
|
||||
|
||||
if(&aParticleType==G4Electron::Electron())
|
||||
PrintInfoDefinition();
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::TestOfInversion(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag)
|
||||
{
|
||||
G4double T,Nlambda,Tprime,delta,del,sum,delmean,Tdelta ;
|
||||
G4bool isOut ;
|
||||
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
G4cout.setf(G4std::ios::scientific, G4std::ios::floatfield) ;
|
||||
if(printflag>1)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << " particle=" << aParticleType.GetParticleName() << G4endl;
|
||||
G4cout << "----------------------" << G4endl;
|
||||
}
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
if(printflag>1)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << " material = " << (*theMaterialTable)[J]->GetName() << G4endl;
|
||||
G4cout << " mat.ind.=" << J << " T Nlambda Tprime"
|
||||
<< " (Tprime-T)/T(%)" << G4endl ;
|
||||
}
|
||||
|
||||
G4PhysicsLogVector* aVector ;
|
||||
|
||||
aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
HighestKineticEnergy,TotBin) ;
|
||||
delta = 0. ;
|
||||
delmean = 0.;
|
||||
sum = 0.;
|
||||
Tdelta = 0. ;
|
||||
for (G4int i=0; i<TotBin-2; i++)
|
||||
{
|
||||
T = aVector->GetLowEdgeEnergy(i) ;
|
||||
|
||||
Nlambda = (*theNlambdaTable)[J]->GetValue(T,isOut) ;
|
||||
|
||||
if(Nlambda>0.)
|
||||
{
|
||||
Tprime = (*theInverseNlambdaTable)[J]->GetValue(Nlambda,isOut) ;
|
||||
|
||||
if((Nlambda>0.)&&(i<(TotBin-1)))
|
||||
{
|
||||
del = 100.*(Tprime-T)/T ;
|
||||
sum += 1.;
|
||||
delmean += abs(del);
|
||||
if(abs(del)>abs(delta))
|
||||
{
|
||||
delta = del ;
|
||||
Tdelta = T ;
|
||||
}
|
||||
}
|
||||
if(printflag>1)
|
||||
{
|
||||
G4cout << G4std::setw(18) << G4std::setprecision(6) << T << " " <<
|
||||
G4std::setw(14)<< G4std::setprecision(6) << Nlambda << " " <<
|
||||
G4std::setw(14) << G4std::setprecision(6) << Tprime << " " <<
|
||||
G4std::setw(12) << G4std::setprecision(3) << del << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(printflag>0)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << "G4IeIonisation::TestOfInversion (T->Nlambda->Tprime) " << G4endl ;
|
||||
G4cout << "particle= " << aParticleType.GetParticleName() <<
|
||||
" material= " << (*theMaterialTable)[J]->GetName() << G4endl ;
|
||||
G4cout << "max (Tprime-T)/T in % =" << G4std::setw(10) << G4std::setprecision(3) <<
|
||||
delta ;
|
||||
G4cout << " at a kinetic energy " << G4std::setw(10) << G4std::setprecision(3) <<
|
||||
Tdelta/MeV << " MeV" << G4endl;
|
||||
delmean /= sum ;
|
||||
G4cout << "mean rel.diff. (Tprime-T)/T=" << G4std::setw(10) <<
|
||||
G4std::setprecision(3) << delmean <<
|
||||
" % (mean is calculated in abs. value)" << G4endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
if(theNlambdaTable)
|
||||
{ theNlambdaTable->clearAndDestroy();
|
||||
delete theNlambdaTable ; }
|
||||
|
||||
theNlambdaTable = new G4PhysicsTable(numOfMaterials) ;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector ;
|
||||
aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
HighestKineticEnergy,TotBin) ;
|
||||
BuildNlambdaVector(aParticleType,J,aVector) ;
|
||||
theNlambdaTable->insert(aVector) ;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildNlambdaVector(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector)
|
||||
{
|
||||
G4double LowEdgeEnergy,T,Tlast,dEdx,Value,Vlast,u,du,coeff,l ;
|
||||
G4double thresholdEnergy ;
|
||||
const G4int nbin = 20 ;
|
||||
G4bool isOut ;
|
||||
const G4double small = 1.e-100;
|
||||
const G4double lmin=1.e-100,lmax=1.e100;
|
||||
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
if(&aParticleType == theElectron)
|
||||
thresholdEnergy = 2.*DeltaCutInKineticEnergy[materialIndex];
|
||||
else
|
||||
thresholdEnergy = DeltaCutInKineticEnergy[materialIndex];
|
||||
|
||||
// here assumed that the threshold energy for the process >=
|
||||
// LowestKineticEnergy (temporarily )
|
||||
if(thresholdEnergy >= LowestKineticEnergy)
|
||||
{
|
||||
Value = 0. ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// extrapolation needed ..................
|
||||
//first integral from thresholdEnergy to LowestKineticEnergy
|
||||
Value = 0. ;
|
||||
}
|
||||
nlambdaVector->PutValue(0,Value) ;
|
||||
Tlast = LowestKineticEnergy ;
|
||||
Vlast = Value ;
|
||||
|
||||
for (G4int i=1; i<TotBin; i++)
|
||||
{
|
||||
LowEdgeEnergy = nlambdaVector->GetLowEdgeEnergy(i) ;
|
||||
Value = 0. ;
|
||||
if(LowEdgeEnergy > thresholdEnergy)
|
||||
{
|
||||
u = log(LowEdgeEnergy/Tlast) ;
|
||||
du = u/nbin ;
|
||||
u = -du ;
|
||||
for(G4int n=0; n<=nbin; n++)
|
||||
{
|
||||
u += du ;
|
||||
T = Tlast*exp(u) ;
|
||||
if((n==0)||(n==nbin))
|
||||
coeff=0.5 ;
|
||||
else
|
||||
coeff=1.0 ;
|
||||
|
||||
l = (*theMeanFreePathTable)[materialIndex]->GetValue(T,isOut);
|
||||
if((l>lmin) && (l<lmax))
|
||||
Value += coeff*T/(G4EnergyLossTables::GetPreciseDEDX(&aParticleType,
|
||||
T,(*theMaterialTable)[materialIndex])*l);
|
||||
}
|
||||
|
||||
Value *= du ;
|
||||
Value += Vlast ;
|
||||
|
||||
if(Value<small)
|
||||
Value = 0. ;
|
||||
}
|
||||
|
||||
nlambdaVector->PutValue(i,Value) ;
|
||||
Tlast = LowEdgeEnergy ;
|
||||
Vlast = Value ;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildCoeffATable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
// create table for coefficients "A"
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theCoeffATable)
|
||||
{ theCoeffATable->clearAndDestroy();
|
||||
delete theCoeffATable; }
|
||||
|
||||
theCoeffATable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
G4double R2 = RTable*RTable ;
|
||||
G4double R1 = RTable+1.;
|
||||
G4double w = R1*(RTable-1.)*(RTable-1.);
|
||||
G4double w1 = RTable/w , w2 = -RTable*R1/w , w3 = R2/w ;
|
||||
G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
|
||||
G4bool isOut;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4int binmax=TotBin ;
|
||||
G4PhysicsLinearVector* aVector =
|
||||
new G4PhysicsLinearVector(0.,binmax, TotBin);
|
||||
|
||||
Ti = LowestKineticEnergy ;
|
||||
|
||||
G4PhysicsVector* lVector= (*theNlambdaTable)[J];
|
||||
|
||||
for ( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
Ri = lVector->GetValue(Ti,isOut) ;
|
||||
|
||||
if ( i==0 )
|
||||
Rim = Ri/sqrt(RTable) ;
|
||||
else
|
||||
{
|
||||
Tim = Ti/RTable ;
|
||||
Rim = lVector->GetValue(Tim,isOut);
|
||||
}
|
||||
|
||||
Tip = Ti*RTable ;
|
||||
Rip = lVector->GetValue(Tip,isOut);
|
||||
|
||||
if( i < (TotBin-1))
|
||||
Value = (w1*Rip + w2*Ri + w3*Rim)/(Ti*Ti) ;
|
||||
else
|
||||
Value = 0. ;
|
||||
|
||||
aVector->PutValue(i,Value);
|
||||
|
||||
Ti = RTable*Ti ;
|
||||
|
||||
}
|
||||
|
||||
theCoeffATable->insert(aVector);
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildCoeffBTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
// create table for coefficients "B"
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theCoeffBTable)
|
||||
{ theCoeffBTable->clearAndDestroy();
|
||||
delete theCoeffBTable; }
|
||||
|
||||
theCoeffBTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
G4double R2 = RTable*RTable ;
|
||||
G4double R1 = RTable+1.;
|
||||
G4double w = R1*(RTable-1.)*(RTable-1.);
|
||||
G4double w1 = -R1/w , w2 = R1*(R2+1.)/w , w3 = -R2*R1/w ;
|
||||
G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
|
||||
G4bool isOut;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4int binmax=TotBin ;
|
||||
G4PhysicsLinearVector* aVector =
|
||||
new G4PhysicsLinearVector(0.,binmax, TotBin);
|
||||
|
||||
Ti = LowestKineticEnergy ;
|
||||
|
||||
G4PhysicsVector* lVector= (*theNlambdaTable)[J];
|
||||
|
||||
for ( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
Ri = lVector->GetValue(Ti,isOut) ;
|
||||
|
||||
if ( i==0 )
|
||||
Rim = Ri/sqrt(RTable) ;
|
||||
else
|
||||
{
|
||||
Tim = Ti/RTable ;
|
||||
Rim = lVector->GetValue(Tim,isOut);
|
||||
}
|
||||
|
||||
Tip = Ti*RTable ;
|
||||
Rip = lVector->GetValue(Tip,isOut);
|
||||
|
||||
if(i < (TotBin-1))
|
||||
Value = (w1*Rip + w2*Ri + w3*Rim)/Ti;
|
||||
else
|
||||
Value = RTable*(Ri-Rim)/((RTable-1.)*Ti) ;
|
||||
|
||||
aVector->PutValue(i,Value);
|
||||
|
||||
Ti = RTable*Ti ;
|
||||
|
||||
}
|
||||
|
||||
theCoeffBTable->insert(aVector);
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildCoeffCTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
// create table for coefficients "C"
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theCoeffCTable)
|
||||
{ theCoeffCTable->clearAndDestroy();
|
||||
delete theCoeffCTable; }
|
||||
|
||||
theCoeffCTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
G4double R2 = RTable*RTable ;
|
||||
G4double R1 = RTable+1.;
|
||||
G4double w = R1*(RTable-1.)*(RTable-1.);
|
||||
G4double w1 = 1./w , w2 = -RTable*R1/w , w3 = RTable*R2/w ;
|
||||
G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
|
||||
G4bool isOut;
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
|
||||
G4int binmax=TotBin ;
|
||||
G4PhysicsLinearVector* aVector =
|
||||
new G4PhysicsLinearVector(0.,binmax, TotBin);
|
||||
|
||||
|
||||
Ti = LowestKineticEnergy ;
|
||||
|
||||
G4PhysicsVector* lVector= (*theNlambdaTable)[J];
|
||||
|
||||
for ( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
Ri = lVector->GetValue(Ti,isOut) ;
|
||||
|
||||
if ( i==0 )
|
||||
Rim = Ri/sqrt(RTable) ;
|
||||
else
|
||||
{
|
||||
Tim = Ti/RTable ;
|
||||
Rim = lVector->GetValue(Tim,isOut);
|
||||
}
|
||||
|
||||
Tip = Ti*RTable ;
|
||||
Rip = lVector->GetValue(Tip,isOut);
|
||||
|
||||
if(i < (TotBin-1))
|
||||
Value = w1*Rip + w2*Ri + w3*Rim ;
|
||||
else
|
||||
Value = (-Ri+RTable*Rim)/(RTable-1.) ;
|
||||
|
||||
|
||||
aVector->PutValue(i,Value);
|
||||
|
||||
Ti = RTable*Ti ;
|
||||
|
||||
}
|
||||
|
||||
theCoeffCTable->insert(aVector);
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
G4double T,Smallest,Biggest ;
|
||||
const G4double small = 1.e-100;
|
||||
G4bool isOut ;
|
||||
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theInverseNlambdaTable)
|
||||
{ theInverseNlambdaTable->clearAndDestroy();
|
||||
delete theInverseNlambdaTable; }
|
||||
|
||||
theInverseNlambdaTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
T = LowestKineticEnergy ;
|
||||
do
|
||||
{
|
||||
Smallest = (*theNlambdaTable)[J]->
|
||||
GetValue(T,isOut) ;
|
||||
T *= RTable ;
|
||||
} while ((Smallest <= small)&&(T<HighestKineticEnergy)) ;
|
||||
|
||||
Biggest = (*theNlambdaTable)[J]->
|
||||
GetValue(HighestKineticEnergy,isOut) ;
|
||||
|
||||
// inverse can be built for "meaningful" cut value only!
|
||||
if(Smallest >= Biggest)
|
||||
{
|
||||
G4Exception(
|
||||
"Cut value is too big , smaller value should be used !");
|
||||
}
|
||||
|
||||
G4PhysicsLogVector* aVector;
|
||||
|
||||
aVector = new G4PhysicsLogVector(Smallest,
|
||||
Biggest,TotBin);
|
||||
|
||||
InvertNlambdaVector(aParticleType,J, aVector);
|
||||
|
||||
theInverseNlambdaTable->insert(aVector);
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::InvertNlambdaVector(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector)
|
||||
{
|
||||
G4double LowEdge,A,B,C,discr,KineticEnergy ;
|
||||
G4double Tbin = LowestKineticEnergy/RTable ;
|
||||
G4double bin = 0.0 ;
|
||||
G4int binnumber = -1 ;
|
||||
G4bool isOut ;
|
||||
|
||||
//loop for Nlambda values
|
||||
for( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
LowEdge = nlambdaVector->GetLowEdgeEnergy(i) ; //i.e. GetLowEdgeValue(i)
|
||||
|
||||
if( bin < LowEdge )
|
||||
{
|
||||
do
|
||||
{
|
||||
binnumber += 1 ;
|
||||
Tbin *= RTable ;
|
||||
bin = (*theNlambdaTable)[materialIndex]->GetValue(Tbin,isOut) ;
|
||||
}
|
||||
while ((bin < LowEdge) && (binnumber < TotBin-2 )) ;
|
||||
}
|
||||
|
||||
if(binnumber == 0)
|
||||
KineticEnergy = LowestKineticEnergy ;
|
||||
else if(binnumber == TotBin-1)
|
||||
KineticEnergy = HighestKineticEnergy/RTable ;
|
||||
else
|
||||
{
|
||||
A = (*(*theCoeffATable)(materialIndex))(binnumber-1) ;
|
||||
B = (*(*theCoeffBTable)(materialIndex))(binnumber-1) ;
|
||||
C = (*(*theCoeffCTable)(materialIndex))(binnumber-1) ;
|
||||
if(A==0.)
|
||||
KineticEnergy = (LowEdge -C )/B ;
|
||||
else
|
||||
{
|
||||
discr = B*B - 4.*A*(C-LowEdge);
|
||||
discr = discr>0. ? sqrt(discr) : 0.;
|
||||
KineticEnergy = 0.5*(discr-B)/A ;
|
||||
}
|
||||
}
|
||||
|
||||
nlambdaVector->PutValue(i,KineticEnergy) ;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
G4double LowEdgeEnergy , ionloss ;
|
||||
G4bool isOutRange ;
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
const G4double twoln10 = 2.*log(10.) ;
|
||||
const G4double Factor = twopi_mc2_rcl2 ;
|
||||
|
||||
ParticleMass = aParticleType.GetPDGMass();
|
||||
|
||||
ParticleCutInKineticEnergy = aParticleType.GetEnergyCuts() ;
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if (theLossTable) {
|
||||
theLossTable->clearAndDestroy();
|
||||
delete theLossTable;
|
||||
}
|
||||
|
||||
theLossTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(
|
||||
LowestKineticEnergy, HighestKineticEnergy, TotBin);
|
||||
|
||||
G4double ElectronDensity,Eexc,Eexcm2,Cden,Mden,Aden,X0den,X1den ;
|
||||
const G4Material* material= (*theMaterialTable)[J];
|
||||
ElectronDensity = material->GetElectronDensity();
|
||||
Eexc = material->GetIonisation()->GetMeanExcitationEnergy();
|
||||
Eexcm2 = Eexc/ParticleMass ;
|
||||
Eexcm2 *= Eexcm2 ;
|
||||
Cden = material->GetIonisation()->GetCdensity();
|
||||
Mden = material->GetIonisation()->GetMdensity();
|
||||
Aden = material->GetIonisation()->GetAdensity();
|
||||
X0den = material->GetIonisation()->GetX0density();
|
||||
X1den = material->GetIonisation()->GetX1density();
|
||||
|
||||
ParticleCutInKineticEnergyNow = ParticleCutInKineticEnergy[J] ;
|
||||
|
||||
// some local variables -------------------
|
||||
G4double tau,Tmax,gamma,gamma2,bg2,beta2,d,d2,d3,d4,delta,x,y ;
|
||||
|
||||
for (G4int i = 0 ; i < TotBin ; i++)
|
||||
{
|
||||
LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
tau = LowEdgeEnergy/ParticleMass ;
|
||||
|
||||
// Seltzer-Berger formula
|
||||
gamma = tau +1. ;
|
||||
bg2 = tau*(tau+2.) ;
|
||||
gamma2 = gamma*gamma ;
|
||||
beta2 = bg2/gamma2 ;
|
||||
|
||||
// electron .................................
|
||||
if(&aParticleType==theElectron)
|
||||
{
|
||||
Tmax = LowEdgeEnergy/2. ;
|
||||
|
||||
d = G4std::min(ParticleCutInKineticEnergyNow, Tmax)/ParticleMass;
|
||||
|
||||
ionloss = log(2.*(tau+2.)/Eexcm2)-1.-beta2 ;
|
||||
ionloss += log((tau-d)*d)+tau/(tau-d) ;
|
||||
ionloss += (0.5*d*d+(2.*tau+1.)*log(1.-d/tau))/gamma2 ;
|
||||
}
|
||||
//positron ...............................
|
||||
else
|
||||
{
|
||||
Tmax = LowEdgeEnergy ;
|
||||
|
||||
d = G4std::min(ParticleCutInKineticEnergyNow, Tmax)/ParticleMass;
|
||||
|
||||
d2=d*d/2. ;
|
||||
d3=d*d*d/3. ;
|
||||
d4=d*d*d*d/4. ;
|
||||
|
||||
y=1./(1.+gamma) ;
|
||||
|
||||
ionloss = log(2.*(tau+2.)/Eexcm2)+log(tau*d) ;
|
||||
ionloss-= beta2*(tau+2.*d-y*(3.*d2+y*(d-d3+y*(d2-tau*d3+d4))))/tau;
|
||||
|
||||
}
|
||||
|
||||
// density correction ................................
|
||||
x = log(bg2)/twoln10 ;
|
||||
if ( x < X0den )
|
||||
delta = 0. ;
|
||||
else
|
||||
{
|
||||
delta = twoln10*x - Cden ;
|
||||
if ( x < X1den )
|
||||
delta += Aden*pow((X1den-x),Mden) ;
|
||||
}
|
||||
|
||||
// now you can compute the total ionization loss
|
||||
ionloss -= delta ;
|
||||
ionloss *= Factor*ElectronDensity/beta2 ;
|
||||
if ( ionloss <= 0.)
|
||||
ionloss = 0. ;
|
||||
|
||||
aVector->PutValue(i,ionloss) ;
|
||||
}
|
||||
theLossTable->insert(aVector);
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeIonisation::BuildLambdaTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
G4double LowEdgeEnergy , Value ,sigma ;
|
||||
G4bool isOutRange ;
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if (theMeanFreePathTable) {
|
||||
theMeanFreePathTable->clearAndDestroy();
|
||||
delete theMeanFreePathTable;
|
||||
}
|
||||
|
||||
theMeanFreePathTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
DeltaCutInKineticEnergy = theElectron->GetCutsInEnergy() ;
|
||||
ParticleCutInKineticEnergy = aParticleType.GetEnergyCuts() ;
|
||||
|
||||
for (G4int J=0 ; J < numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(
|
||||
LowestKineticEnergy, HighestKineticEnergy, TotBin);
|
||||
|
||||
const G4Material* material= (*theMaterialTable)[J];
|
||||
|
||||
const G4ElementVector* theElementVector=
|
||||
material->GetElementVector() ;
|
||||
const G4double* theAtomicNumDensityVector =
|
||||
material->GetAtomicNumDensityVector();
|
||||
const G4int NumberOfElements=
|
||||
material->GetNumberOfElements() ;
|
||||
|
||||
DeltaKineticEnergyCutNow = DeltaCutInKineticEnergy[J] ;
|
||||
|
||||
for ( G4int i = 0 ; i < TotBin ; i++ )
|
||||
{
|
||||
LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
sigma = 0. ;
|
||||
for (G4int iel=0; iel<NumberOfElements; iel++ )
|
||||
{
|
||||
sigma += theAtomicNumDensityVector[iel]*
|
||||
ComputeMicroscopicCrossSection(aParticleType,
|
||||
LowEdgeEnergy,
|
||||
(*theElementVector)(iel)->GetZ() ) ;
|
||||
}
|
||||
Value = sigma<=0 ? DBL_MAX : 1./sigma ;
|
||||
aVector->PutValue(i, Value) ;
|
||||
}
|
||||
theMeanFreePathTable->insert(aVector);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4double G4IeIonisation::ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber)
|
||||
{
|
||||
// calculates the microscopic cross section in GEANT4 internal units
|
||||
// ( it is called for elements , AtomicNumber = Z )
|
||||
G4double TotalEnergy,MaxKineticEnergyTransfer,
|
||||
betasquare,gamma,gamma2,x,x2,y,y2,y12,b1,b2,b3,b4,
|
||||
TotalCrossSection;
|
||||
|
||||
TotalEnergy=KineticEnergy + ParticleMass;
|
||||
betasquare = KineticEnergy*(TotalEnergy+ParticleMass)
|
||||
/(TotalEnergy*TotalEnergy);
|
||||
gamma = TotalEnergy/ParticleMass ;
|
||||
x=DeltaKineticEnergyCutNow/KineticEnergy ;
|
||||
|
||||
if(&aParticleType==theElectron)
|
||||
MaxKineticEnergyTransfer = 0.5*KineticEnergy ;
|
||||
else
|
||||
MaxKineticEnergyTransfer = KineticEnergy ;
|
||||
|
||||
if( MaxKineticEnergyTransfer > DeltaKineticEnergyCutNow )
|
||||
{
|
||||
//Moller (e-e-) scattering
|
||||
if(&aParticleType==theElectron)
|
||||
{
|
||||
gamma2 = gamma*gamma ;
|
||||
TotalCrossSection = (gamma-1.)*(gamma-1.)*(0.5-x)/gamma2 + 1./x -
|
||||
1./(1.-x)-(2.*gamma-1.)*log((1.-x)/x)/gamma2 ;
|
||||
TotalCrossSection /= betasquare ;
|
||||
}
|
||||
//Bhabha (e+e-) scattering
|
||||
else
|
||||
{
|
||||
x2=x*x ;
|
||||
y=1./(1.+gamma) ;
|
||||
y2=y*y ;
|
||||
y12=1.-2.*y ;
|
||||
b1=2.-y2 ;
|
||||
b2=y12*(3.+y2) ;
|
||||
b4=y12*y12*y12 ;
|
||||
b3=b4+y12*y12 ;
|
||||
TotalCrossSection = (1./x-1.)/betasquare+b1*log(x)+b2*(1.-x)-
|
||||
b3*(1.-x2)/2.+b4*(1.-x2*x)/3. ;
|
||||
}
|
||||
|
||||
TotalCrossSection = twopi_mc2_rcl2 * AtomicNumber
|
||||
*TotalCrossSection/KineticEnergy ;
|
||||
}
|
||||
else
|
||||
TotalCrossSection = 0. ;
|
||||
|
||||
return TotalCrossSection ;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4IeIonisation::PostStepDoIt(
|
||||
const G4Track& trackData,
|
||||
const G4Step& stepData)
|
||||
{
|
||||
aParticleChange.Initialize(trackData) ;
|
||||
|
||||
G4Material* aMaterial = trackData.GetMaterial() ;
|
||||
const G4DynamicParticle* aParticle = trackData.GetDynamicParticle() ;
|
||||
|
||||
G4double Charge = aParticle->GetDefinition()->GetPDGCharge();
|
||||
ParticleMass = aParticle->GetDefinition()->GetPDGMass();
|
||||
G4double KineticEnergy = aParticle->GetKineticEnergy();
|
||||
G4double TotalEnergy = KineticEnergy + ParticleMass;
|
||||
G4double Psquare = KineticEnergy*(TotalEnergy+ParticleMass);
|
||||
G4double TotalMomentum = sqrt(Psquare);
|
||||
G4double Esquare=TotalEnergy*TotalEnergy;
|
||||
G4ParticleMomentum ParticleDirection = aParticle->GetMomentumDirection();
|
||||
|
||||
// get kinetic energy cut for the electron
|
||||
DeltaCutInKineticEnergy = G4Electron::Electron()->GetCutsInEnergy();
|
||||
G4double DeltaThreshold = DeltaCutInKineticEnergy[aMaterial->GetIndex()];
|
||||
|
||||
// some kinematics
|
||||
G4double MaxKineticEnergyTransfer;
|
||||
if (Charge < 0.) MaxKineticEnergyTransfer = 0.5*KineticEnergy;
|
||||
else MaxKineticEnergyTransfer = KineticEnergy;
|
||||
|
||||
// sampling kinetic energy of the delta ray
|
||||
|
||||
if (MaxKineticEnergyTransfer <= DeltaThreshold)
|
||||
return G4IVContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
|
||||
// normal case
|
||||
G4double cc,y,y2,c2,b0,b1,b2,b3,b4,x,x1,grej,grejc;
|
||||
|
||||
G4double tau = KineticEnergy/ParticleMass;
|
||||
G4double gamma = tau+1., gamma2=gamma*gamma;
|
||||
G4double xc = DeltaThreshold/KineticEnergy, xc1=1.-xc;
|
||||
|
||||
if (Charge < 0.) // Moller (e-e-) scattering
|
||||
{
|
||||
b1=4./(9.*gamma2-10.*gamma+5.);
|
||||
b2=tau*tau*b1; b3=(2.*gamma2+2.*gamma-1.)*b1;
|
||||
cc=1.-2.*xc;
|
||||
do {
|
||||
x = xc/(1.-cc*G4UniformRand()); x1 = 1.-x;
|
||||
grej = b2*x*x-b3*x/x1+b1*gamma2/(x1*x1);
|
||||
} while (G4UniformRand()>grej) ;
|
||||
}
|
||||
else // Bhabha (e+e-) scattering
|
||||
{
|
||||
y=1./(gamma+1.); y2=y*y; cc=1.-2.*y;
|
||||
b1=2.-y2; b2=cc*(3.+y2);
|
||||
c2=cc*cc; b4=c2*cc; b3=c2+b4;
|
||||
b0=gamma2/(gamma2-1.);
|
||||
grejc=(((b4*xc-b3)*xc+b2)*xc-b1)*xc+b0;
|
||||
do {
|
||||
x = xc/(1.-xc1*G4UniformRand());
|
||||
grej = ((((b4*x-b3)*x+b2)*x-b1)*x+b0)/grejc;
|
||||
} while (G4UniformRand()>grej);
|
||||
}
|
||||
|
||||
G4double DeltaKineticEnergy = x * KineticEnergy;
|
||||
|
||||
// protection :do not produce a secondary with 0. kinetic energy !
|
||||
if (DeltaKineticEnergy <= 0.)
|
||||
return G4IVContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
|
||||
G4double DeltaTotalMomentum = sqrt(DeltaKineticEnergy * (DeltaKineticEnergy +
|
||||
2. * electron_mass_c2 ));
|
||||
|
||||
G4double costheta = DeltaKineticEnergy * (TotalEnergy + electron_mass_c2)
|
||||
/(DeltaTotalMomentum * TotalMomentum);
|
||||
|
||||
if (costheta < -1.) costheta = -1.;
|
||||
if (costheta > +1.) costheta = +1.;
|
||||
|
||||
// direction of the delta electron
|
||||
|
||||
G4double phi = twopi * G4UniformRand();
|
||||
G4double sintheta = sqrt((1.+costheta)*(1.-costheta));
|
||||
G4double dirx = sintheta * cos(phi), diry = sintheta * sin(phi),
|
||||
dirz = costheta;
|
||||
|
||||
G4ThreeVector DeltaDirection(dirx,diry,dirz);
|
||||
DeltaDirection.rotateUz(ParticleDirection);
|
||||
|
||||
// create G4DynamicParticle object for delta ray
|
||||
|
||||
G4DynamicParticle* theDeltaRay = new G4DynamicParticle;
|
||||
theDeltaRay->SetKineticEnergy( DeltaKineticEnergy );
|
||||
theDeltaRay->SetMomentumDirection(
|
||||
DeltaDirection.x(),DeltaDirection.y(),DeltaDirection.z());
|
||||
theDeltaRay->SetDefinition(G4Electron::Electron());
|
||||
|
||||
// fill aParticleChange
|
||||
// changed energy and momentum of the actual particle
|
||||
G4double finalKineticEnergy = KineticEnergy - DeltaKineticEnergy;
|
||||
|
||||
if (finalKineticEnergy > 0.)
|
||||
{
|
||||
G4double finalPx = TotalMomentum*ParticleDirection.x()
|
||||
- DeltaTotalMomentum*DeltaDirection.x();
|
||||
G4double finalPy = TotalMomentum*ParticleDirection.y()
|
||||
- DeltaTotalMomentum*DeltaDirection.y();
|
||||
G4double finalPz = TotalMomentum*ParticleDirection.z()
|
||||
- DeltaTotalMomentum*DeltaDirection.z();
|
||||
G4double finalMomentum =
|
||||
sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz) ;
|
||||
finalPx /= finalMomentum ;
|
||||
finalPy /= finalMomentum ;
|
||||
finalPz /= finalMomentum ;
|
||||
|
||||
aParticleChange.SetMomentumChange( finalPx,finalPy,finalPz );
|
||||
}
|
||||
else
|
||||
{
|
||||
finalKineticEnergy = 0.;
|
||||
if (Charge < 0.) aParticleChange.SetStatusChange(fStopAndKill);
|
||||
else aParticleChange.SetStatusChange(fStopButAlive);
|
||||
}
|
||||
|
||||
aParticleChange.SetEnergyChange( finalKineticEnergy );
|
||||
aParticleChange.SetNumberOfSecondaries(1);
|
||||
aParticleChange.AddSecondary( theDeltaRay );
|
||||
aParticleChange.SetLocalEnergyDeposit (0.);
|
||||
|
||||
return G4IVContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
}
|
||||
|
||||
void G4IeIonisation::PrintInfoDefinition()
|
||||
{
|
||||
G4String comments = "delta cross sections from Moller+Bhabha. ";
|
||||
comments += "Good description from 1 KeV to 100 GeV.\n";
|
||||
comments += " delta ray energy sampled from differential Xsection.";
|
||||
|
||||
G4cout << G4endl << GetProcessName() << ": " << comments
|
||||
<< "\n PhysicsTables from " << G4BestUnit(LowestKineticEnergy,"Energy")
|
||||
<< " to " << G4BestUnit(HighestKineticEnergy,"Energy")
|
||||
<< " in " << TotBin << " bins. \n";
|
||||
}
|
||||
|
||||
@@ -1,907 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IeplusAnnihilation.cc,v 1.1.2.2 2001/06/28 20:19:21 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4IeplusAnnihilation process --------
|
||||
// by Michel Maire, 7 July 1996
|
||||
// **************************************************************
|
||||
// --------------------------------------------------------------
|
||||
// ************************************************************
|
||||
// It is the first implementation of the
|
||||
// eplusANNIHILATION PROCESS
|
||||
// using an INTEGRAL APPROACH instead of the differential
|
||||
// one used in the standard implementation .
|
||||
// ************************************************************
|
||||
// by Laszlo Urban, 23 June 1998
|
||||
// -----------------------------------------------------------
|
||||
// 28/10/28: some cleanup , L.Urban
|
||||
|
||||
#include "G4IeplusAnnihilation.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
// constructor
|
||||
G4IeplusAnnihilation::G4IeplusAnnihilation(const G4String& processName)
|
||||
: G4IVRestDiscreteProcess (processName),
|
||||
LowestEnergyLimit ( 10*keV), // initialization
|
||||
HighestEnergyLimit( 10*TeV),
|
||||
NumberOfBuildPhysicsTableCalls(0),
|
||||
NumbBinTable(100)
|
||||
{
|
||||
if (verboseLevel>0) {
|
||||
G4cout << GetProcessName() << " is created "<< G4endl;
|
||||
G4cout << "LowestEnergy: " << LowestEnergyLimit/keV << "keV ";
|
||||
G4cout << "HighestEnergy: " << HighestEnergyLimit/TeV << "TeV " << G4endl;
|
||||
}
|
||||
theCrossSectionTable = NULL;
|
||||
theMeanFreePathTable = NULL;
|
||||
theMeanFreePathTable = NULL ;
|
||||
theNlambdaTable = NULL;
|
||||
theInverseNlambdaTable = NULL;
|
||||
theCoeffATable = NULL ;
|
||||
theCoeffBTable = NULL ;
|
||||
theCoeffCTable = NULL ;
|
||||
|
||||
LowestKineticEnergy = LowestEnergyLimit ;
|
||||
HighestKineticEnergy= HighestEnergyLimit;
|
||||
TotBin = NumbBinTable ;
|
||||
RTable = exp(log(HighestKineticEnergy/LowestKineticEnergy)/TotBin) ;
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
G4IeplusAnnihilation::~G4IeplusAnnihilation()
|
||||
{
|
||||
if (theCrossSectionTable) {
|
||||
theCrossSectionTable->clearAndDestroy();
|
||||
delete theCrossSectionTable;
|
||||
}
|
||||
|
||||
if (theMeanFreePathTable) {
|
||||
theMeanFreePathTable->clearAndDestroy();
|
||||
delete theMeanFreePathTable;
|
||||
}
|
||||
if (theNlambdaTable) {
|
||||
theNlambdaTable->clearAndDestroy();
|
||||
delete theNlambdaTable;
|
||||
}
|
||||
if (theInverseNlambdaTable) {
|
||||
theInverseNlambdaTable->clearAndDestroy();
|
||||
delete theInverseNlambdaTable;
|
||||
}
|
||||
if (theCoeffATable) {
|
||||
theCoeffATable->clearAndDestroy();
|
||||
delete theCoeffATable;
|
||||
}
|
||||
if (theCoeffBTable) {
|
||||
theCoeffBTable->clearAndDestroy();
|
||||
delete theCoeffBTable;
|
||||
}
|
||||
if (theCoeffCTable) {
|
||||
theCoeffCTable->clearAndDestroy();
|
||||
delete theCoeffCTable;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::SetPhysicsTableBining(G4double lowE,
|
||||
G4double highE, G4int nBins)
|
||||
{
|
||||
LowestEnergyLimit = lowE; HighestEnergyLimit = highE; NumbBinTable = nBins;
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::BuildPhysicsTable(const G4ParticleDefinition& PositronType)
|
||||
|
||||
// Build microscopic total cross section tables and mean free path table
|
||||
{
|
||||
NumberOfBuildPhysicsTableCalls += 1 ;
|
||||
if(NumberOfBuildPhysicsTableCalls == 1)
|
||||
{ ; }
|
||||
else
|
||||
{
|
||||
|
||||
G4double LowEdgeEnergy, Value;
|
||||
G4PhysicsLogVector* ptrVector;
|
||||
|
||||
// Build microscopic cross section tables for the e+e- annihilation
|
||||
|
||||
if (theCrossSectionTable) {
|
||||
theCrossSectionTable->clearAndDestroy(); delete theCrossSectionTable; }
|
||||
|
||||
theCrossSectionTable = new G4PhysicsTable( G4Element::GetNumberOfElements()) ;
|
||||
const G4ElementTable* theElementTable = G4Element::GetElementTable() ;
|
||||
G4double AtomicNumber;
|
||||
G4int J;
|
||||
|
||||
for ( J=0 ; J < G4Element::GetNumberOfElements(); J++ )
|
||||
{
|
||||
//create physics vector then fill it ....
|
||||
ptrVector = new G4PhysicsLogVector(LowestEnergyLimit, HighestEnergyLimit,
|
||||
NumbBinTable ) ;
|
||||
AtomicNumber = (*theElementTable)(J)->GetZ();
|
||||
|
||||
for ( G4int i = 0 ; i < NumbBinTable ; i++ )
|
||||
{
|
||||
LowEdgeEnergy = ptrVector->GetLowEdgeEnergy( i ) ;
|
||||
Value = ComputeMicroscopicCrossSection( LowEdgeEnergy, AtomicNumber);
|
||||
ptrVector->PutValue( i , Value ) ;
|
||||
}
|
||||
|
||||
theCrossSectionTable->insertAt( J , ptrVector ) ;
|
||||
|
||||
}
|
||||
|
||||
// Build mean free path table for the e+e- annihilation
|
||||
|
||||
if (theMeanFreePathTable) {
|
||||
theMeanFreePathTable->clearAndDestroy(); delete theMeanFreePathTable; }
|
||||
|
||||
theMeanFreePathTable = new G4PhysicsTable( G4Material::GetNumberOfMaterials() );
|
||||
|
||||
//*******************!!!!!!!!!!!!!!!!!!!!!!********************
|
||||
theMeanFreePathTable = theMeanFreePathTable ;
|
||||
//*******************!!!!!!!!!!!!!!!!!!!!!!********************
|
||||
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ;
|
||||
G4Material* material;
|
||||
|
||||
for ( J=0 ; J < G4Material::GetNumberOfMaterials(); J++ )
|
||||
{
|
||||
//create physics vector then fill it ....
|
||||
ptrVector = new G4PhysicsLogVector(LowestEnergyLimit, HighestEnergyLimit,
|
||||
NumbBinTable ) ;
|
||||
material = (*theMaterialTable)(J);
|
||||
|
||||
for ( G4int i = 0 ; i < NumbBinTable ; i++ )
|
||||
{
|
||||
LowEdgeEnergy = ptrVector->GetLowEdgeEnergy( i ) ;
|
||||
Value = ComputeMeanFreePath( LowEdgeEnergy, material);
|
||||
ptrVector->PutValue( i , Value ) ;
|
||||
|
||||
theMeanFreePathTable->insertAt( J , ptrVector ) ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const G4ParticleDefinition& aParticleType = PositronType ;
|
||||
|
||||
BuildNlambdaTable(aParticleType) ;
|
||||
|
||||
BuildCoeffATable(aParticleType) ;
|
||||
BuildCoeffBTable(aParticleType) ;
|
||||
BuildCoeffCTable(aParticleType) ;
|
||||
|
||||
BuildInverseNlambdaTable(aParticleType) ;
|
||||
|
||||
G4int printflag = 0 ;
|
||||
if(printflag>0)
|
||||
TestOfInversion(aParticleType,printflag) ;
|
||||
|
||||
NumberOfBuildPhysicsTableCalls = 0 ;
|
||||
|
||||
PrintInfoDefinition() ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::TestOfInversion(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag)
|
||||
{
|
||||
G4double T,Nlambda,Tprime,delta,del,sum,delmean,Tdelta ;
|
||||
G4bool isOut ;
|
||||
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
G4cout.setf(G4std::ios::scientific, G4std::ios::floatfield) ;
|
||||
if(printflag>1)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << " particle=" << aParticleType.GetParticleName() << G4endl;
|
||||
G4cout << "----------------------" << G4endl;
|
||||
}
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
if(printflag>1)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << " material = " << (*theMaterialTable)[J]->GetName() << G4endl;
|
||||
G4cout << " mat.ind.=" << J << " T Nlambda Tprime"
|
||||
<< " (Tprime-T)/T(%)" << G4endl ;
|
||||
}
|
||||
|
||||
G4PhysicsLogVector* aVector ;
|
||||
|
||||
aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
HighestKineticEnergy,TotBin) ;
|
||||
delta = 0. ;
|
||||
delmean = 0.;
|
||||
sum = 0.;
|
||||
Tdelta = 0. ;
|
||||
for (G4int i=0; i<TotBin-1; i++)
|
||||
{
|
||||
T = aVector->GetLowEdgeEnergy(i) ;
|
||||
|
||||
Nlambda = (*theNlambdaTable)[J]->GetValue(T,isOut) ;
|
||||
|
||||
if(Nlambda>0.)
|
||||
{
|
||||
Tprime = (*theInverseNlambdaTable)[J]->GetValue(Nlambda,isOut) ;
|
||||
|
||||
if((Nlambda>0.)&&(i<(TotBin-1)))
|
||||
{
|
||||
del = 100.*(Tprime-T)/T ;
|
||||
sum += 1.;
|
||||
delmean += abs(del);
|
||||
if(abs(del)>abs(delta))
|
||||
{
|
||||
delta = del ;
|
||||
Tdelta = T ;
|
||||
}
|
||||
}
|
||||
if(printflag>1)
|
||||
{
|
||||
G4cout << G4std::setw(18) << G4std::setprecision(6) << T << " " <<
|
||||
G4std::setw(14)<< G4std::setprecision(6) << Nlambda << " " <<
|
||||
G4std::setw(14) << G4std::setprecision(6) << Tprime << " " <<
|
||||
G4std::setw(12) << G4std::setprecision(3) << del << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(printflag>0)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << "G4IeplusAnnihilation::TestOfInversion (T->Nlambda->Tprime) " << G4endl
|
||||
;
|
||||
G4cout << "particle= " << aParticleType.GetParticleName() <<
|
||||
" material= " << (*theMaterialTable)[J]->GetName() << G4endl ;
|
||||
G4cout << "max (Tprime-T)/T in % =" << G4std::setw(10) << G4std::setprecision(3) << delta ;
|
||||
G4cout << " at a kinetic energy " << G4std::setw(10) << G4std::setprecision(3) <<
|
||||
Tdelta/MeV << " MeV" << G4endl;
|
||||
delmean /= sum ;
|
||||
G4cout << "mean rel.diff. (Tprime-T)/T=" << G4std::setw(10) <<
|
||||
G4std::setprecision(3) << delmean <<
|
||||
" % (mean is calculated in abs. value)" << G4endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::BuildNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
if(theNlambdaTable)
|
||||
{ theNlambdaTable->clearAndDestroy();
|
||||
delete theNlambdaTable ; }
|
||||
|
||||
theNlambdaTable = new G4PhysicsTable(numOfMaterials) ;
|
||||
|
||||
// loop for materials
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
G4PhysicsLogVector* aVector ;
|
||||
|
||||
aVector = new G4PhysicsLogVector(LowestKineticEnergy,
|
||||
HighestKineticEnergy,TotBin) ;
|
||||
|
||||
BuildNlambdaVector(aParticleType,J,aVector) ;
|
||||
|
||||
theNlambdaTable->insert(aVector) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::BuildNlambdaVector(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector)
|
||||
{
|
||||
G4double LowEdgeEnergy,T,Tlast,dEdx,Value,Vlast,u,du,coeff,l ;
|
||||
const G4int nbin = 20 ;
|
||||
G4bool isOut ;
|
||||
const G4double small = 1.e-100;
|
||||
const G4double plowloss = 0.5 ; //this should be a data member of en.loss!
|
||||
const G4double lmin=1.e-100,lmax=1.e100;
|
||||
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
//first integral from 0. to LowestKineticEnergy
|
||||
// here assumed that the threshold energy for the process >=
|
||||
// LowestKineticEnergy
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(&aParticleType,
|
||||
LowestKineticEnergy,
|
||||
(*theMaterialTable)[materialIndex]);
|
||||
Value = LowestKineticEnergy/(dEdx*BIGSTEP*(1.-plowloss)) ;
|
||||
if(Value<small)
|
||||
Value = 0. ;
|
||||
|
||||
nlambdaVector->PutValue(0,Value) ;
|
||||
|
||||
Tlast = LowestKineticEnergy ;
|
||||
Vlast = Value ;
|
||||
|
||||
// loop for kinetic energy
|
||||
|
||||
for (G4int i=1; i<TotBin; i++)
|
||||
{
|
||||
LowEdgeEnergy = nlambdaVector->GetLowEdgeEnergy(i) ;
|
||||
|
||||
u = log(LowEdgeEnergy/Tlast) ;
|
||||
du = u/nbin ;
|
||||
|
||||
u = -du ;
|
||||
Value = 0. ;
|
||||
for(G4int n=0; n<=nbin; n++)
|
||||
{
|
||||
u += du ;
|
||||
T = Tlast*exp(u) ;
|
||||
|
||||
if((n==0)||(n==nbin))
|
||||
coeff=0.5 ;
|
||||
else
|
||||
coeff=1.0 ;
|
||||
|
||||
l = (*theMeanFreePathTable)[materialIndex]->GetValue(T,isOut);
|
||||
if((l>lmin) && (l<lmax))
|
||||
Value += coeff*T/(G4EnergyLossTables::GetPreciseDEDX(&aParticleType,
|
||||
T,(*theMaterialTable)[materialIndex])*l);
|
||||
}
|
||||
|
||||
Value *= du ;
|
||||
Value += Vlast ;
|
||||
if(Value<small)
|
||||
Value = 0. ;
|
||||
nlambdaVector->PutValue(i,Value) ;
|
||||
|
||||
Tlast = LowEdgeEnergy ;
|
||||
Vlast = Value ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::BuildCoeffATable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
// create table for coefficients "A"
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theCoeffATable)
|
||||
|
||||
{ theCoeffATable->clearAndDestroy();
|
||||
delete theCoeffATable; }
|
||||
theCoeffATable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
G4double R2 = RTable*RTable ;
|
||||
G4double R1 = RTable+1.;
|
||||
G4double w = R1*(RTable-1.)*(RTable-1.);
|
||||
G4double w1 = RTable/w , w2 = -RTable*R1/w , w3 = R2/w ;
|
||||
G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
|
||||
G4bool isOut;
|
||||
|
||||
// loop for materials
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
|
||||
// create vector
|
||||
G4int binmax=TotBin ;
|
||||
G4PhysicsLinearVector* aVector =
|
||||
new G4PhysicsLinearVector(0.,binmax, TotBin);
|
||||
|
||||
// loop for kinetic energy
|
||||
|
||||
Ti = LowestKineticEnergy ;
|
||||
|
||||
G4PhysicsVector* lVector= (*theNlambdaTable)[J];
|
||||
|
||||
for ( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
Ri = lVector->GetValue(Ti,isOut) ;
|
||||
|
||||
|
||||
if ( i==0 )
|
||||
Rim = Ri/sqrt(RTable) ;
|
||||
else
|
||||
{
|
||||
Tim = Ti/RTable ;
|
||||
Rim = lVector->GetValue(Tim,isOut);
|
||||
}
|
||||
|
||||
Tip = Ti*RTable ;
|
||||
Rip = lVector->GetValue(Tip,isOut);
|
||||
|
||||
if( i < (TotBin-1))
|
||||
Value = (w1*Rip + w2*Ri + w3*Rim)/(Ti*Ti) ;
|
||||
else
|
||||
{
|
||||
Rip = Rip*Rip/Rim ;
|
||||
Value = (w1*Rip + w2*Ri + w3*Rim)/(Ti*Ti) ;
|
||||
}
|
||||
|
||||
aVector->PutValue(i,Value);
|
||||
|
||||
|
||||
Ti = RTable*Ti ;
|
||||
|
||||
}
|
||||
|
||||
theCoeffATable->insert(aVector);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::BuildCoeffBTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
// create table for coefficients "B"
|
||||
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theCoeffBTable)
|
||||
{ theCoeffBTable->clearAndDestroy();
|
||||
delete theCoeffBTable; }
|
||||
theCoeffBTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
G4double R2 = RTable*RTable ;
|
||||
G4double R1 = RTable+1.;
|
||||
G4double w = R1*(RTable-1.)*(RTable-1.);
|
||||
G4double w1 = -R1/w , w2 = R1*(R2+1.)/w , w3 = -R2*R1/w ;
|
||||
G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
|
||||
G4bool isOut;
|
||||
|
||||
// loop for materials
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
|
||||
// create vector
|
||||
G4int binmax=TotBin ;
|
||||
G4PhysicsLinearVector* aVector =
|
||||
new G4PhysicsLinearVector(0.,binmax, TotBin);
|
||||
|
||||
// loop for kinetic energy
|
||||
|
||||
Ti = LowestKineticEnergy ;
|
||||
|
||||
G4PhysicsVector* lVector= (*theNlambdaTable)[J];
|
||||
|
||||
for ( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
Ri = lVector->GetValue(Ti,isOut) ;
|
||||
|
||||
if ( i==0 )
|
||||
Rim = Ri/sqrt(RTable) ;
|
||||
else
|
||||
{
|
||||
Tim = Ti/RTable ;
|
||||
Rim = lVector->GetValue(Tim,isOut);
|
||||
}
|
||||
|
||||
Tip = Ti*RTable ;
|
||||
Rip = lVector->GetValue(Tip,isOut);
|
||||
|
||||
if(i < (TotBin-1))
|
||||
Value = (w1*Rip + w2*Ri + w3*Rim)/Ti;
|
||||
else
|
||||
{
|
||||
Rip = Rip*Rip/Rim ;
|
||||
Value = (w1*Rip + w2*Ri + w3*Rim)/Ti ;
|
||||
}
|
||||
|
||||
aVector->PutValue(i,Value);
|
||||
|
||||
Ti = RTable*Ti ;
|
||||
|
||||
}
|
||||
|
||||
theCoeffBTable->insert(aVector);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::BuildCoeffCTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
// create table for coefficients "C"
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theCoeffCTable)
|
||||
{ theCoeffCTable->clearAndDestroy();
|
||||
delete theCoeffCTable; }
|
||||
theCoeffCTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
G4double R2 = RTable*RTable ;
|
||||
G4double R1 = RTable+1.;
|
||||
G4double w = R1*(RTable-1.)*(RTable-1.);
|
||||
G4double w1 = 1./w , w2 = -RTable*R1/w , w3 = RTable*R2/w ;
|
||||
G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
|
||||
G4bool isOut;
|
||||
|
||||
// loop for materials
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
|
||||
// create vector
|
||||
G4int binmax=TotBin ;
|
||||
G4PhysicsLinearVector* aVector =
|
||||
new G4PhysicsLinearVector(0.,binmax, TotBin);
|
||||
|
||||
// loop for kinetic energy
|
||||
|
||||
Ti = LowestKineticEnergy ;
|
||||
|
||||
G4PhysicsVector* lVector= (*theNlambdaTable)[J];
|
||||
|
||||
for ( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
Ri = lVector->GetValue(Ti,isOut) ;
|
||||
|
||||
if ( i==0 )
|
||||
Rim = Ri/sqrt(RTable) ;
|
||||
else
|
||||
{
|
||||
Tim = Ti/RTable ;
|
||||
Rim = lVector->GetValue(Tim,isOut);
|
||||
}
|
||||
|
||||
Tip = Ti*RTable ;
|
||||
Rip = lVector->GetValue(Tip,isOut);
|
||||
|
||||
if(i < (TotBin-1))
|
||||
Value = w1*Rip + w2*Ri + w3*Rim ;
|
||||
else
|
||||
{
|
||||
Rip = Rip*Rip/Rim ;
|
||||
Value = w1*Rip + w2*Ri + w3*Rim ;
|
||||
}
|
||||
|
||||
|
||||
aVector->PutValue(i,Value);
|
||||
|
||||
Ti = RTable*Ti ;
|
||||
|
||||
}
|
||||
|
||||
theCoeffCTable->insert(aVector);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void G4IeplusAnnihilation::BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
G4double T,Smallest,Biggest,TT ;
|
||||
const G4double small = 1.e-10;
|
||||
G4bool isOut ;
|
||||
|
||||
// create table
|
||||
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
G4Material::GetMaterialTable();
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length();
|
||||
|
||||
if(theInverseNlambdaTable)
|
||||
{ theInverseNlambdaTable->clearAndDestroy();
|
||||
delete theInverseNlambdaTable; }
|
||||
theInverseNlambdaTable = new G4PhysicsTable(numOfMaterials);
|
||||
|
||||
// loop for materials
|
||||
|
||||
for (G4int J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
T = LowestKineticEnergy ;
|
||||
do
|
||||
{
|
||||
Smallest = (*theNlambdaTable)[J]->
|
||||
GetValue(T,isOut) ;
|
||||
T *= RTable ;
|
||||
} while (Smallest <= small) ;
|
||||
|
||||
Biggest = (*theNlambdaTable)[J]->
|
||||
GetValue(HighestKineticEnergy,isOut) ;
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
Biggest *= 1.25 ;
|
||||
|
||||
// create vector
|
||||
G4PhysicsLogVector* aVector;
|
||||
|
||||
aVector = new G4PhysicsLogVector(Smallest,
|
||||
Biggest,TotBin);
|
||||
|
||||
// fill the vector
|
||||
|
||||
InvertNlambdaVector(aParticleType,J, aVector);
|
||||
|
||||
// insert vector to the table
|
||||
|
||||
theInverseNlambdaTable->insert(aVector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::InvertNlambdaVector(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector)
|
||||
{
|
||||
G4double LowEdge,A,B,C,discr,KineticEnergy ;
|
||||
G4double Tbin = LowestKineticEnergy/RTable ;
|
||||
G4double bin = 0.0 ;
|
||||
G4int binnumber = -1 ;
|
||||
G4bool isOut ;
|
||||
|
||||
//loop for Nlambda values
|
||||
for( G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
LowEdge = nlambdaVector->GetLowEdgeEnergy(i) ; //i.e. GetLowEdgeValue(i)
|
||||
|
||||
if( bin < LowEdge )
|
||||
{
|
||||
do
|
||||
{
|
||||
binnumber += 1 ;
|
||||
Tbin *= RTable ;
|
||||
bin = (*theNlambdaTable)[materialIndex]->GetValue(Tbin,isOut) ;
|
||||
}
|
||||
while ((bin < LowEdge) && (binnumber < TotBin-2 )) ;
|
||||
}
|
||||
|
||||
if(binnumber == 0)
|
||||
KineticEnergy = LowestKineticEnergy ;
|
||||
else if(binnumber == TotBin-1)
|
||||
KineticEnergy = HighestKineticEnergy ;
|
||||
else
|
||||
{
|
||||
A = (*(*theCoeffATable)(materialIndex))(binnumber-1) ;
|
||||
B = (*(*theCoeffBTable)(materialIndex))(binnumber-1) ;
|
||||
C = (*(*theCoeffCTable)(materialIndex))(binnumber-1) ;
|
||||
if(A==0.)
|
||||
KineticEnergy = (LowEdge -C )/B ;
|
||||
else
|
||||
{
|
||||
discr = B*B - 4.*A*(C-LowEdge);
|
||||
discr = discr>0. ? sqrt(discr) : 0.;
|
||||
KineticEnergy = 0.5*(discr-B)/A ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nlambdaVector->PutValue(i,KineticEnergy) ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
G4double G4IeplusAnnihilation::ComputeMicroscopicCrossSection
|
||||
(G4double PositKinEnergy, G4double AtomicNumber)
|
||||
|
||||
// Calculates the microscopic cross section of annihilation into two photons
|
||||
// from the Heilter formula.
|
||||
// GEANT4 internal units.
|
||||
|
||||
{
|
||||
static const G4double pi_rcl2 = pi*classic_electr_radius*classic_electr_radius;
|
||||
|
||||
G4double gama = 1. + PositKinEnergy/electron_mass_c2;
|
||||
G4double gama2 = gama*gama, sqgama2 = sqrt(gama2-1.);
|
||||
|
||||
return pi_rcl2*AtomicNumber*((gama2+4*gama+1.)*log(gama+sqgama2) - (gama+3.)*sqgama2)
|
||||
/((gama2-1.)*(gama+1.));
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4IeplusAnnihilation::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep)
|
||||
//
|
||||
// The secondaries Gamma energies are sampled using the Heitler cross section.
|
||||
//
|
||||
// A modified version of the random number techniques of Butcher & Messel is used
|
||||
// (Nuc Phys 20(1960),15).
|
||||
//
|
||||
// GEANT4 internal units.
|
||||
//
|
||||
// Note 1 : The initial electron is assumed free and at rest.
|
||||
//
|
||||
// Note 2 : The annihilation processes producing one or more than two photons are
|
||||
// ignored, as negligible compared to the two photons process.
|
||||
|
||||
{
|
||||
aParticleChange.Initialize(aTrack);
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
|
||||
const G4DynamicParticle* aDynamicPositron = aTrack.GetDynamicParticle();
|
||||
G4double PositKinEnergy = aDynamicPositron->GetKineticEnergy();
|
||||
G4ParticleMomentum PositDirection = aDynamicPositron->GetMomentumDirection();
|
||||
|
||||
aParticleChange.Initialize(aTrack);
|
||||
|
||||
// Do not make anything if PositKinEnergy=0. , the annihilation then
|
||||
// should be performed by the AtRestDoIt!
|
||||
if(PositKinEnergy == 0.)
|
||||
return &aParticleChange ;
|
||||
|
||||
G4double gama = 1. + PositKinEnergy/electron_mass_c2;
|
||||
G4double gamap1 = gama+1. , gamam1 = gama-1. , sqgrate = sqrt(gamam1/gamap1)/2. ,
|
||||
sqg2m1 = sqrt(gamam1*gamap1);
|
||||
|
||||
// limits of the energy sampling
|
||||
G4double epsil1 = 0.5 - sqgrate , epsil2 = 0.5 + sqgrate;
|
||||
G4double epsilqot = epsil2/epsil1;
|
||||
|
||||
//
|
||||
// sample the energy rate of the created gammas
|
||||
//
|
||||
G4double epsil, greject ;
|
||||
|
||||
do {
|
||||
epsil = epsil1*pow(epsilqot,G4UniformRand());
|
||||
greject = 1. - epsil + (2*gama*epsil-1.)/(epsil*gamap1*gamap1);
|
||||
} while( greject < G4UniformRand() );
|
||||
|
||||
//
|
||||
// scattered Gamma angles. ( Z - axis along the parent positron)
|
||||
//
|
||||
|
||||
G4double cost = (epsil*gamap1-1.)/(epsil*sqg2m1) , sint = sqrt((1.+cost)*(1.-cost));
|
||||
|
||||
|
||||
G4double phi = twopi * G4UniformRand() ;
|
||||
G4double dirx = sint*cos(phi) , diry = sint*sin(phi) , dirz = cost;
|
||||
|
||||
//
|
||||
// kinematic of the created pair
|
||||
//
|
||||
|
||||
G4double LocalEnerDeposit = 0. ;
|
||||
aParticleChange.SetNumberOfSecondaries(2) ;
|
||||
|
||||
G4double TotalAvailableEnergy = PositKinEnergy + 2*electron_mass_c2;
|
||||
G4double Phot1Energy = epsil*TotalAvailableEnergy;
|
||||
|
||||
G4double GammaCut= (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
if (Phot1Energy > GammaCut)
|
||||
{
|
||||
G4ThreeVector Phot1Direction ( dirx, diry, dirz );
|
||||
Phot1Direction.rotateUz(PositDirection);
|
||||
|
||||
// create G4DynamicParticle object for the particle1
|
||||
G4DynamicParticle* aParticle1= new G4DynamicParticle (G4Gamma::Gamma(),
|
||||
Phot1Direction, Phot1Energy);
|
||||
aParticleChange.AddSecondary( aParticle1 ) ;
|
||||
}
|
||||
else
|
||||
{ LocalEnerDeposit += Phot1Energy; }
|
||||
|
||||
G4double Phot2Energy =(1.-epsil)*TotalAvailableEnergy;
|
||||
|
||||
if (Phot2Energy > GammaCut)
|
||||
{
|
||||
G4double Eratio = Phot1Energy/Phot2Energy;
|
||||
G4double PositP = sqrt(PositKinEnergy*(PositKinEnergy+2.*electron_mass_c2));
|
||||
G4ThreeVector Phot2Direction (-dirx*Eratio, -diry*Eratio,
|
||||
(PositP-dirz*Phot1Energy)/Phot2Energy);
|
||||
Phot2Direction.rotateUz(PositDirection);
|
||||
|
||||
// create G4DynamicParticle object for the particle2
|
||||
G4DynamicParticle* aParticle2= new G4DynamicParticle (G4Gamma::Gamma(),
|
||||
Phot2Direction, Phot2Energy);
|
||||
aParticleChange.AddSecondary( aParticle2 ) ;
|
||||
}
|
||||
else
|
||||
{ LocalEnerDeposit += Phot2Energy; }
|
||||
|
||||
aParticleChange.SetLocalEnergyDeposit( LocalEnerDeposit ) ;
|
||||
|
||||
//
|
||||
// Kill the incident positron
|
||||
//
|
||||
|
||||
aParticleChange.SetMomentumChange( 0., 0., 0. ) ;
|
||||
aParticleChange.SetEnergyChange( 0. ) ;
|
||||
aParticleChange.SetStatusChange( fStopAndKill ) ;
|
||||
|
||||
return &aParticleChange;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange* G4IeplusAnnihilation::AtRestDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep)
|
||||
//
|
||||
// Performs the e+ e- annihilation when both particles are assumed at rest.
|
||||
// It generates two back to back photons with energy = electron_mass.
|
||||
// The angular distribution is isotropic.
|
||||
// GEANT4 internal units
|
||||
//
|
||||
// Note : Effects due to binding of atomic electrons are negliged.
|
||||
|
||||
{
|
||||
aParticleChange.Initialize(aTrack);
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(2) ;
|
||||
|
||||
if (electron_mass_c2 > (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()])
|
||||
{
|
||||
G4double cosTeta = 2*G4UniformRand()-1. , sinTeta = sqrt(1.-cosTeta*cosTeta);
|
||||
G4double Phi = twopi * G4UniformRand() ;
|
||||
G4ThreeVector Direction (sinTeta*cos(Phi), sinTeta*sin(Phi), cosTeta);
|
||||
|
||||
aParticleChange.AddSecondary( new G4DynamicParticle (G4Gamma::Gamma(),
|
||||
Direction, electron_mass_c2) );
|
||||
aParticleChange.AddSecondary( new G4DynamicParticle (G4Gamma::Gamma(),
|
||||
-Direction, electron_mass_c2) );
|
||||
|
||||
aParticleChange.SetLocalEnergyDeposit(0.);
|
||||
}
|
||||
else
|
||||
{ aParticleChange.SetLocalEnergyDeposit( 2*electron_mass_c2 ); }
|
||||
|
||||
// Kill the incident positron
|
||||
//
|
||||
aParticleChange.SetStatusChange( fStopAndKill );
|
||||
|
||||
return &aParticleChange;
|
||||
}
|
||||
|
||||
void G4IeplusAnnihilation::PrintInfoDefinition()
|
||||
{
|
||||
G4String comments="Total cross section from Heitler formula (2 photon annihilation).\n";
|
||||
comments += " gamma energies sampled according Heitler";
|
||||
|
||||
G4cout << G4endl << GetProcessName() << ": " << comments
|
||||
<< "\n PhysicsTables from " << G4BestUnit(LowestEnergyLimit,"Energy")
|
||||
<< " to " << G4BestUnit(HighestEnergyLimit,"Energy")
|
||||
<< " in " << NumbBinTable << " bins. \n";
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.80 2001/06/18 12:58:43 pia Exp $
|
||||
$Id: History,v 1.127 2001/11/15 15:56:21 pia Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,236 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
15.11.2001 - MGP, tag emlowen-V03-02-45
|
||||
Bug fix in G4FluoData
|
||||
Physics improvement in Bremsstrahlung
|
||||
Modified warning message in G4hLowEnergyIonisation
|
||||
Goes with new database version G4EMLOW0.4
|
||||
|
||||
09.11.2001 - MGP, tag emlowen-V03-02-44
|
||||
Example for using analysis in test/LowEnTest, based on
|
||||
Ramon's XrayTel
|
||||
|
||||
09.11.2001 - MGP, tag emlowen-V03-02-43
|
||||
Fixed name in test/processTest/GNUmakefile causing
|
||||
problems with library map
|
||||
|
||||
08.11.2001 - MGP, tag emlowen-V03-02-42
|
||||
Modifications to be compliant with the unsupported,
|
||||
deprecated "cuts per material"
|
||||
Added G4CutsPerMaterialWarning functor to warn users
|
||||
WARNING: LowE processes are not supported if using different
|
||||
cuts for different materials
|
||||
|
||||
06.11.2001 - MGP, tag emlowen-V03-02-41
|
||||
Identical to emlowen-V03-02-40
|
||||
Redone because the tag aborted before completion
|
||||
|
||||
06.11.2001 - MGP, tag emlowen-V03-02-40
|
||||
Performance improvement in electron processes
|
||||
Some clean up of code (include/forward class declarations,
|
||||
coding style guidelines etc.)
|
||||
First implementation of a generic unit test, with AIDA/Lizard
|
||||
analysis in test/processTest
|
||||
|
||||
01.11.2001 - MGP, tag emlowen-V03-02-39
|
||||
PIXE introduced in G4hLowEnergyIonisation
|
||||
|
||||
29.10.2001 - MGP, tag emlowen-V03-02-38
|
||||
Bug fixes in new code
|
||||
Generic unit test for e/photon processes in test/processTest
|
||||
(analysis still to be added)
|
||||
|
||||
28.10.2001 - MGP, tag emlowen-V03-02-37
|
||||
Fixed compilation warnings on Linux and HP
|
||||
Improved code style
|
||||
|
||||
26.10.2001 - MGP, tag emlowen-V03-02-36
|
||||
Bug and memory leak fixes in the new electron classes
|
||||
|
||||
26.10.2001 - MGP, tag emlowen-V03-02-35
|
||||
Swapped old/new electron processes
|
||||
|
||||
25.10.2001 - MGP, tag emlowen-V03-02-34
|
||||
Bug fixes in the new classes related to Bremsstrahlung and
|
||||
e/h Ionisation
|
||||
|
||||
25.10.2001 - MGP, tag emlowen-V03-02-33
|
||||
G4LowEnergyPolarizedCompton moved to new design
|
||||
Many bug fixes in G4eIonisationParameters and G4BremsstrahlungParameters
|
||||
New classes for shell cross sections for proton-induced fluorescence
|
||||
Fluorescence introduced in temporary class G4hLowEnergyIonisation
|
||||
Fluorescence introduced in the continuous part of electron
|
||||
ionisation in G4eLowEnergyLoss and temporary G4LowEnergyIonisationVI
|
||||
|
||||
18.10.2001 - MGP, tag emlowen-V03-02-32
|
||||
Same as previous one, with on top fixes to G4BremsstrahlungParameters.cc
|
||||
and G4eIonisationParameters.cc by G. Cosmo for compatibility with
|
||||
geant4-03-02-ref-06 in view of STL migration
|
||||
|
||||
18.10.2001 - MGP, tag emlowen-V03-02-31
|
||||
Added member function in G4eLowEnergyLoss and G4VLowEnergyIonisationVI
|
||||
for generation of atomic deexcitation products in the continuous part
|
||||
|
||||
18.10.2001 - MGP, tag emlowen-V03-02-30
|
||||
Electron processes: contributions to the implementation by V.I.
|
||||
revision of code quality and consistency
|
||||
with design by MGP
|
||||
|
||||
18.10.2001 - MGP, tag emlowen-V03-02-29
|
||||
Modification of G4hNuclearStoppingModel and
|
||||
G4hParametrisedLossModel by G. Cosmo required for
|
||||
compatibility with materials-V03-02-04
|
||||
|
||||
12.10.2001 - MGP, tag emlowen-V03-02-28
|
||||
Cosmetics in the source code (FALSE/TRUE moved to false/true)
|
||||
and update of all tests to new materials migrated to STL
|
||||
|
||||
11.10.2001 - MGP, tag emlowen-V03-02-27
|
||||
Further revision of the new code in the previous tag
|
||||
Restored G4LowEnergyIonisation and G4LowEnergyBremsstrahlung
|
||||
as in emlowen-V03-02-25; new versions as in emlowen-V03-02-26
|
||||
renamed temporarily to allow for parallel development
|
||||
Removed references to Rogue Wave and STL interface from
|
||||
test/LowEnTest/ and test/fluoTest/
|
||||
|
||||
10.10.2001 - MGP, tag emlowen-V03-02-26
|
||||
Code for implementation of design iteration for electrons
|
||||
by V. Ivanchenko
|
||||
Major revision of new code to improve code quality and consistency
|
||||
with design by MGP
|
||||
Since the new code does not respect the design and broke system
|
||||
test and user code, this tag is only for internal debugging
|
||||
purpose and should not be used by developers
|
||||
|
||||
09.10.2001 - MGP, tag emlowen-V03-02-25
|
||||
Identical to the previous one, but restored G4VDataSetAlgorithm
|
||||
(corrupted in cvs update?)
|
||||
|
||||
08.10.2001 - MGP, tag emlowen-V03-02-24
|
||||
Modified G4CrossSectionHandler to inherit from base class
|
||||
Minor design iteration in G4VEMDataSet and G4VDataSetAlgorithm
|
||||
Encapsulated range test to generate secondaries into a
|
||||
strategy pattern; implemented in photon processes
|
||||
|
||||
04.10.2001 - MGP, tag emlowen-V03-02-23
|
||||
Fluorescence according to the new design introduced
|
||||
into e- ionisation (contribution to PostStepDoIt)
|
||||
by E. Guardincerri
|
||||
|
||||
26.09.2001 - MGP, tag emlowen-V03-02-22
|
||||
Workaround to support deficiencies of ObjectSpace in
|
||||
implementation of STL pair
|
||||
|
||||
25.09.2001 - MGP, tag emlowen-V03-02-21
|
||||
Workaround to support deficiencies of ObjectSpace in
|
||||
implementation of STL pair (wrongly tagged)
|
||||
|
||||
24.09.2001 - MGP, tag emlowen-V03-02-20
|
||||
Minor modifications to make the lowenergy category co-work
|
||||
with both materials-V03-02-03 and materials as
|
||||
in geant4-03-02-ref-03
|
||||
|
||||
23.09.2001 - MGP, tag emlowen-V03-02-19
|
||||
Same as previous one + migration to materials-V03-02-03 (STL)
|
||||
|
||||
23.09.2001 - MGP, tag emlowen-V03-02-18
|
||||
New class to generate shell vacancies in continuous part
|
||||
of processes by E. Guardincerri
|
||||
Renamed old photon processes (pre-design iteration) to
|
||||
G4LowEnergyOld; to be kept for a limited period for convenience
|
||||
of regression testing
|
||||
Fixed various STL problems found with HP compiler
|
||||
Added protection in G4LowEnergyPhotoElectric to avoid
|
||||
generating photons causing negative energy balance
|
||||
|
||||
21.09.2001 - MGP, tag emlowen-V03-02-17
|
||||
G4LowEnergyPhotoElectric moved to the implementation
|
||||
according to the new fluo+data design
|
||||
[Test version G4LowEnergyPhotoElectricMG removed]
|
||||
Fixed warning for energy outside allowed range in G4EMDataSet
|
||||
Update to test/GNUmakefile, G4ComptonTest.cc by A. Pfeiffer
|
||||
Minor cosmetics
|
||||
|
||||
19.09.2001 - MGP, tag emlowen-V03-02-16
|
||||
Same as previous one, but test/GNUmakefile, G4ComptonTest.cc
|
||||
and G4ComptonTest.py for histograms and ntuples with Lizard
|
||||
(by A. Pfeiffer)
|
||||
|
||||
19.09.2001 - MGP, tag emlowen-V03-02-15
|
||||
Same as previous one, but test/fluoTest with Particle gun
|
||||
|
||||
19.09.2001 - MGP, tag emlowen-V03-02-14
|
||||
Minor cosmetics w.r.t. the previous one (removed compilation
|
||||
warnings)
|
||||
test/fluoTest with GPS
|
||||
|
||||
16.09.2001 - MGP, tag emlowen-V03-02-13
|
||||
Update to the fluorescence domain consistent with the
|
||||
new design (development by E. Guardincerri)
|
||||
Update to test/fluoTest (development by E. Guardincerri)
|
||||
|
||||
13.09.2001 - MGP, tag emlowen-V03-02-12
|
||||
Fix in G4CrossSectionHandler::Clear to remove an infinite loop
|
||||
occurring in test14
|
||||
|
||||
10.09.2001 - MGP, tag emlowen-V03-02-11
|
||||
Identical to emlowen-V03-02-10
|
||||
Restored a clean situation in the cvs head, removing all
|
||||
the code inconsistent with the design present in
|
||||
emlowen-after-chep2001, resulting from a fault in the
|
||||
software process by a developer.
|
||||
|
||||
10.09.2001 - MGP, tag emlowen-after-chep2001
|
||||
Junk found in the repository
|
||||
Tagged as an aid in the procedure of restoring a reasonable
|
||||
situation in the cvs head for future developments
|
||||
|
||||
29.08.2001 - MGP, tag emlowen-V03-02-10
|
||||
Major revision of G4LowEnergyCompton, G4LowEnergyRayleigh and
|
||||
G4LowEnergyGammaConversion: re-implementation according to
|
||||
the design iteration in the data domain
|
||||
Temporary re-implementation of G4LowEnergyPhotoElectricMG,
|
||||
without fluorescence yet
|
||||
|
||||
29.08.2001 - MGP, tag emlowen-V03-02-09
|
||||
Bug fix in G4CrossSectionHandler
|
||||
|
||||
29.08.2001 - MGP, tag emlowen-V03-02-08
|
||||
Cleared compilation warnings in G4AtomicTransitionManager
|
||||
|
||||
28.08.2001 - G.Cosmo, tag emlowen-V03-02-07
|
||||
Fixed mess with tag names
|
||||
|
||||
27.08.2001 - STT, tag emlowen-V03-02-06
|
||||
|
||||
20.08.2001 - MGP, tag emlowen-V03-02-05
|
||||
Added files resulting from design iteration in the data domain
|
||||
|
||||
20.08.2001 - MGP, tag emlowen-V03-02-04
|
||||
Same as emlowen-V03-02-02 + bug fix by V.I. described below
|
||||
|
||||
18.08.2001 - V.Ivanchenko fix energy conservation bugs for small
|
||||
range cuts in G4LowEnergyIonisation.cc
|
||||
|
||||
30.07.2001 - MGP, tag emlowen-V03-02-03
|
||||
First step of design iteration in fluorescence (files
|
||||
contributed by E. Guardincerri, G4AtomicShell and
|
||||
G4AtomicTransitionManager) + related unit test
|
||||
|
||||
30.07.2001 - MGP, tag emlowen-V03-02-02
|
||||
Fix to GammaConversion by F. Longo
|
||||
|
||||
30.07.2001 - MGP, tag emlowen-V03-02-01
|
||||
Added modifications by V.I. listed below (13.07.2001),
|
||||
on top of previous tag
|
||||
|
||||
30.07.2001 - MGP, tag emlowen-V03-02-00
|
||||
Same as emlowen-V03-01-19, with liability disclaimer added
|
||||
|
||||
13.07.2001 - V.Ivanchenko remove comments with Rogue Wave
|
||||
fix a problem of continuity of ion effective charge
|
||||
|
||||
18.06.2001 - MGP, tag emlowen-V03-01-19
|
||||
Same as emlowen-V03-01-18, with corrections by S. Chauvie
|
||||
to recover from modifications listed below
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransitionManager.hh,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
//
|
||||
// 16 Sept 2001 First committed to cvs
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics, management of atomic deexcitation
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4AtomicDeexcitation_h
|
||||
#define G4AtomicDeexcitation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "G4AtomicTransitionManager.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
|
||||
class G4AtomicDeexcitation {
|
||||
|
||||
public:
|
||||
|
||||
G4AtomicDeexcitation();
|
||||
~G4AtomicDeexcitation();
|
||||
|
||||
// Returns a vector contains the photons generated by radiative transitions
|
||||
// (non zero particles) or by non radiative transitions (zero particles)
|
||||
G4std::vector<G4DynamicParticle*>* GenerateParticles(G4int Z, G4int shellId);
|
||||
|
||||
private:
|
||||
|
||||
// Decides wether a radiative transition is possible and, if it is,
|
||||
// returns the identity of the starting shell for the transition
|
||||
const G4int SelectTypeOfTransition(G4int Z, G4int shellId);
|
||||
|
||||
// Generates a particle from a radiative transition and returns it
|
||||
G4DynamicParticle* GenerateFluorescence(G4int Z, G4int shellId,G4int provShellId);
|
||||
|
||||
// Dummy function: when invowed returns a null pointer
|
||||
G4DynamicParticle* GenerateAuger(G4int Z, G4int shellId);
|
||||
|
||||
// Data member which stores the shells to be filled by
|
||||
// the radiative transition
|
||||
G4int newShellId;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicShell.hh,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
//
|
||||
// 16 Sept 2001 Modofied according to a design iteration in the
|
||||
// LowEnergy category
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics, a data container
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef G4AtomicShell_h
|
||||
#define G4AtomicShell_h 1
|
||||
#include "globals.hh"
|
||||
|
||||
class G4AtomicShell {
|
||||
|
||||
public:
|
||||
|
||||
// The data and the methods of this class are relative to
|
||||
// a given shell
|
||||
|
||||
G4AtomicShell(G4int,G4double);
|
||||
|
||||
~G4AtomicShell();
|
||||
|
||||
// Returns the binding energy of the shell
|
||||
G4double BindingEnergy() const;
|
||||
|
||||
// Returns the id of the shell
|
||||
G4int ShellId() const;
|
||||
|
||||
private:
|
||||
|
||||
G4int identifier;
|
||||
G4double bindingEnergy;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransition.hh,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 16 Sept 2001 Modofied according to a design iteration in the
|
||||
// LowEnergy category
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics, a data container
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef G4AtomicTransition_h
|
||||
#define G4AtomicTransition_h 1
|
||||
|
||||
#include "G4DataVector.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4AtomicTransition {
|
||||
|
||||
public:
|
||||
|
||||
G4AtomicTransition(G4int,const G4std::vector<G4int>&,const G4DataVector&,
|
||||
const G4DataVector&);
|
||||
~G4AtomicTransition();
|
||||
|
||||
// All the data stored and provided by this class are relative to a
|
||||
// given vacancy, whose identity is provided by the FinalShellId() method,
|
||||
// in an atom of a given material
|
||||
|
||||
// Returns the identities of the originating shells for the transitions
|
||||
const G4std::vector<G4int>& OriginatingShellIds() const;
|
||||
|
||||
// Return the energies of the transitions
|
||||
const G4DataVector& TransitionEnergies() const;
|
||||
|
||||
// Return the probabilities of the transitions
|
||||
const G4DataVector& TransitionProbabilities() const;
|
||||
|
||||
// Return the identity if the vacancy
|
||||
const G4int FinalShellId() const;
|
||||
|
||||
// Given the index of the originating shells returns its identity
|
||||
G4int OriginatingShellId(G4int index) const;
|
||||
|
||||
// Given the index of the originating shells returns the energy
|
||||
// of the transition starting from it
|
||||
G4double TransitionEnergy(G4int index) const;
|
||||
|
||||
// Given the index of the originating shells returns the probability
|
||||
// of the transition starting from it
|
||||
G4double TransitionProbability(G4int index) const;
|
||||
|
||||
private:
|
||||
|
||||
G4int finalShellId;
|
||||
G4std::vector<G4int> originatingShellIds;
|
||||
G4DataVector transitionEnergies;
|
||||
G4DataVector transitionProbabilities;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransitionManager.hh,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
//
|
||||
// 16 Sept 2001 EG Modified according to a design iteration in the
|
||||
// LowEnergy category
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics, fills and manages G4AtomicShell
|
||||
// and G4AtomicTransition objects
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4AtomicTransitionManager_h
|
||||
#define G4AtomicTransitionManager_h 1
|
||||
|
||||
#include "G4ShellData.hh"
|
||||
#include "G4FluoData.hh"
|
||||
#include "G4AtomicTransition.hh"
|
||||
#include "G4AtomicShell.hh"
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
#include "globals.hh"
|
||||
|
||||
// This class is a singleton
|
||||
class G4AtomicTransitionManager {
|
||||
|
||||
public:
|
||||
|
||||
// The only way to get an instance of this class is to call the
|
||||
// function Instance()
|
||||
static G4AtomicTransitionManager* Instance();
|
||||
|
||||
// Z is the atomic number of the element, shellIndex is the
|
||||
// index (in EADL) of the shell
|
||||
const G4AtomicShell* Shell(G4int Z, size_t shellIndex);
|
||||
|
||||
// Z is the atomic number of the element, shellIndex is the
|
||||
// index (in EADL) of the final shell for the transition
|
||||
const G4AtomicTransition* ReachableShell(G4int Z, size_t shellIndex);
|
||||
|
||||
// This function returns the number of shells of the element
|
||||
// whose atomic number is Z
|
||||
G4int NumberOfShells(G4int Z);
|
||||
|
||||
// This function returns the number of those shells of the element
|
||||
// whose atomic number is Z which are reachable through a radiative
|
||||
// transition
|
||||
G4int NumberOfReachableShells(G4int Z);
|
||||
|
||||
// Gives the sum of the probabilities of radiative transition towards the
|
||||
// shell whose index is shellIndex
|
||||
G4double TotalRadiativeTransitionProbability(G4int Z, size_t shellIndex);
|
||||
|
||||
// Gives the sum of the probabilities of non radiative transition from the
|
||||
// shell whose index is shellIndex
|
||||
G4double TotalNonRadiativeTransitionProbability(G4int Z, size_t shellIndex);
|
||||
|
||||
protected:
|
||||
|
||||
G4AtomicTransitionManager(G4int minZ = 1, G4int maxZ = 99,
|
||||
G4int limitInfTable = 6, G4int limitSupTable=100 );
|
||||
~G4AtomicTransitionManager();
|
||||
|
||||
private:
|
||||
|
||||
static G4AtomicTransitionManager* instance;
|
||||
|
||||
// the first element of the map is the atomic number Z.
|
||||
// the second element is a vector of G4AtomicShell*.
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> > shellTable;
|
||||
|
||||
// the first element of the map is the atomic number Z.
|
||||
// the second element is a vector of G4AtomicTransition*.
|
||||
G4std::map<G4int,G4std::vector<G4AtomicTransition*>,G4std::less<G4int> > transitionTable;
|
||||
|
||||
// Minimum and maximum Z in EADL table containing identities and binding
|
||||
// energies of shells
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
|
||||
// Minimum and maximum Z in EADL table containing identities, transition
|
||||
// energies and transition probabilities of shells
|
||||
G4int infTableLimit;
|
||||
G4int supTableLimit;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4BremsstrahlungCrossSectionHandler
|
||||
//
|
||||
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
|
||||
//
|
||||
// Creation date: 17 September 2001
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// Provides build cross sections with cut for LowEnergyBremsstrahlung
|
||||
//
|
||||
// Class Description: End
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4BremsstrahlungCrossSectionHandler_h
|
||||
#define G4BremsstrahlungCrossSectionHandler_h 1
|
||||
|
||||
#include "G4VCrossSectionHandler.hh"
|
||||
#include "G4VEnergySpectrum.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4DataVector;
|
||||
class G4VEMDataSet;
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4BremsstrahlungCrossSectionHandler : public G4VCrossSectionHandler
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4BremsstrahlungCrossSectionHandler(const G4VEnergySpectrum* spectrum,
|
||||
G4VDataSetAlgorithm* interpolation);
|
||||
|
||||
~G4BremsstrahlungCrossSectionHandler();
|
||||
|
||||
protected:
|
||||
|
||||
G4std::vector<G4VEMDataSet*>* BuildCrossSectionsForMaterials(const G4DataVector& energyVector,
|
||||
const G4DataVector* energyCuts);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
const G4VEnergySpectrum* theBR;
|
||||
|
||||
G4VDataSetAlgorithm* interp;
|
||||
};
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BremsstrahlungParameters.hh,v 1.6 2001/11/29 19:01:44 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
// V. Ivanchenko (Vladimir.Ivantchenko@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
// Values of the parameters from A. Forti's fit
|
||||
// 12.09.01 V.Ivanchenko Add activeZ and paramA
|
||||
// 25.09.01 V.Ivanchenko Add parameter C and change interface to B
|
||||
// 29.11.01 V.Ivanchenko Parametrisation is updated
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Load and access to parameters for LowEnergyBremsstrahlung from EEDL
|
||||
// database. Parametrisation is described in Physics Reference Manual
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4BREMSSTRAHLUNGPARAMETERS_HH
|
||||
#define G4BREMSSTRAHLUNGPARAMETERS_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "g4std/map"
|
||||
|
||||
class G4VEMDataSet;
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4BremsstrahlungParameters {
|
||||
|
||||
public:
|
||||
|
||||
G4BremsstrahlungParameters(G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
~G4BremsstrahlungParameters();
|
||||
|
||||
G4double Parameter(G4int parameterIndex, G4int Z, G4double energy) const;
|
||||
|
||||
G4double ParameterC(G4int index) const;
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4BremsstrahlungParameters(const G4BremsstrahlungParameters&);
|
||||
G4BremsstrahlungParameters & operator=(const G4BremsstrahlungParameters &right);
|
||||
|
||||
void LoadData();
|
||||
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> > param;
|
||||
|
||||
G4DataVector paramC;
|
||||
G4DataVector activeZ;
|
||||
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
|
||||
size_t length;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CompositeEMDataSet.hh,v 1.3 2001/10/08 15:27:01 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Composite data set for an electromagnetic physics process
|
||||
// A strategy pattern is used to encapsulate algorithms for data interpolation
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4COMPOSITEEMDATASET_HH
|
||||
#define G4COMPOSITEEMDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4VEMDataSet.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4EMDataSet;
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4CompositeEMDataSet : public G4VEMDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4CompositeEMDataSet(G4VDataSetAlgorithm* interpolation,
|
||||
G4double unitE = MeV, G4double unitData = barn,
|
||||
G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
G4CompositeEMDataSet(const G4String& dataFile,
|
||||
G4VDataSetAlgorithm* interpolation,
|
||||
G4double unitE = MeV, G4double unitData = barn,
|
||||
G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
~G4CompositeEMDataSet();
|
||||
|
||||
G4double FindValue(G4double e, G4int Z = 0) const;
|
||||
|
||||
const G4VEMDataSet* GetComponent(G4int i) const { return components[i]; }
|
||||
|
||||
void AddComponent(G4VEMDataSet* component);
|
||||
|
||||
size_t NumberOfComponents() const { return nComponents; }
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
const G4DataVector& GetEnergies(G4int i) const;
|
||||
const G4DataVector& GetData(G4int i) const;
|
||||
|
||||
private:
|
||||
|
||||
void LoadData(const G4String& fileName);
|
||||
|
||||
G4VDataSetAlgorithm* algorithm;
|
||||
|
||||
G4std::vector<G4VEMDataSet*> components;
|
||||
size_t nComponents;
|
||||
|
||||
G4double unit1;
|
||||
G4double unit2;
|
||||
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CrossSectionHandler.hh,v 1.6 2001/10/05 18:25:19 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 1 Aug 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Data set manager for an electromagnetic physics process
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CROSSSECTIONHANDLER_HH
|
||||
#define G4CROSSSECTIONHANDLER_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
#include "G4VCrossSectionHandler.hh"
|
||||
|
||||
class G4VDataSetAlgorithm;
|
||||
class G4VEMDataSet;
|
||||
class G4Material;
|
||||
class G4Element;
|
||||
|
||||
class G4CrossSectionHandler : public G4VCrossSectionHandler {
|
||||
|
||||
public:
|
||||
|
||||
G4CrossSectionHandler();
|
||||
|
||||
~G4CrossSectionHandler();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4std::vector<G4VEMDataSet*>* BuildCrossSectionsForMaterials(const G4DataVector& energyVector,
|
||||
const G4DataVector* energyCuts = 0);
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4CrossSectionHandler(const G4CrossSectionHandler&);
|
||||
G4CrossSectionHandler & operator=(const G4CrossSectionHandler &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CutsPerMaterialWarning.hh,v 1.1 2001/11/07 22:38:47 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 7 Nov 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Functor class to print a warning if the deprecated, unsupported feature
|
||||
// of having different range cuts for different materials is used
|
||||
// Will be removed when properly designed "range cuts by region"
|
||||
// will be available in Geant4
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CUTSPERMATERIALWARNING_HH
|
||||
#define G4CUTSPERMATERIALWARNING_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
class G4Material;
|
||||
|
||||
class G4CutsPerMaterialWarning
|
||||
{
|
||||
public:
|
||||
|
||||
G4CutsPerMaterialWarning() { }
|
||||
|
||||
~G4CutsPerMaterialWarning() { }
|
||||
|
||||
void PrintWarning(const G4ParticleDefinition* particle) const;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EMDataSet.hh,v 1.2 2001/10/08 07:45:32 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Data set for an electromagnetic physics process
|
||||
// A strategy pattern is used to encapsulate algorithms for data interpolation
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4EMDATASET_HH
|
||||
#define G4EMDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4VEMDataSet.hh"
|
||||
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4EMDataSet : public G4VEMDataSet {
|
||||
|
||||
public:
|
||||
|
||||
G4EMDataSet(G4int Z,
|
||||
G4DataVector* points,
|
||||
G4DataVector* values,
|
||||
G4VDataSetAlgorithm* interpolation,
|
||||
G4double unitE = MeV, G4double unitData = barn);
|
||||
|
||||
G4EMDataSet(G4int Z,
|
||||
const G4String& dataFile,
|
||||
G4VDataSetAlgorithm* interpolation,
|
||||
G4double unitE = MeV, G4double unitData = barn);
|
||||
|
||||
~G4EMDataSet();
|
||||
|
||||
G4double FindValue(G4double e, G4int id = 0) const;
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
const G4DataVector& GetEnergies(G4int i) const { return *energies; }
|
||||
const G4DataVector& GetData(G4int i) const { return *data; }
|
||||
|
||||
private:
|
||||
|
||||
void LoadData(const G4String& dataFile);
|
||||
|
||||
G4int FindBinLocation(G4double energy) const;
|
||||
|
||||
G4int z;
|
||||
|
||||
G4DataVector* energies; // Owned pointer
|
||||
G4DataVector* data; // Owned pointer
|
||||
|
||||
G4VDataSetAlgorithm* algorithm; // Owned pointer
|
||||
|
||||
G4double unit1;
|
||||
G4double unit2;
|
||||
|
||||
size_t numberOfBins;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
//
|
||||
// $Id: G4FluoData.hh,v 1.1 ?????
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 16 Sept 2001 First committed to cvs
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Fluorescence data set: shell identifiers, transition probabilities,
|
||||
// transition energies
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4FLUODATA_HH
|
||||
#define G4FLUODATA_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "g4std/map"
|
||||
|
||||
|
||||
class G4DataVector;
|
||||
|
||||
class G4FluoData
|
||||
{
|
||||
public:
|
||||
|
||||
G4FluoData();
|
||||
|
||||
~G4FluoData();
|
||||
|
||||
// The method returns the number of shells in wich a
|
||||
// vacancy can be filled by a radiative transition
|
||||
size_t NumberOfVacancies() const;
|
||||
|
||||
// Given the index of the vacancy returns its identity
|
||||
G4int VacancyId(G4int vacancyIndex) const;
|
||||
|
||||
// Given the index of a vacancy returns the number of
|
||||
//shells starting from wich an electrons can fill the vacancy
|
||||
size_t NumberOfTransitions(G4int vacancyIndex) const;
|
||||
|
||||
// Given the indexes of the starting and final shells for the
|
||||
// transition, returns the identity of the starting one
|
||||
G4int StartShellId(G4int initIndex,G4int vacancyIndex);
|
||||
|
||||
// Given the indexes of the starting and final shells for the
|
||||
// transition, returns the transition energy
|
||||
G4double StartShellEnergy(G4int initIndex,G4int vacancyIndex);
|
||||
|
||||
// Given the indexes of the starting and final shells for the
|
||||
// transition, returns the probability of this transition
|
||||
G4double StartShellProb(G4int initIndex,G4int vacancyIndex);
|
||||
|
||||
void LoadData( G4int Z);
|
||||
|
||||
void PrintData();
|
||||
|
||||
private:
|
||||
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> > idMap;
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> > energyMap;
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> > probabilityMap;
|
||||
G4std::vector<G4int> nInitShells;
|
||||
G4int numberOfVacancies;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LinInterpolation.hh,v 1.1 2001/11/29 19:01:44 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Log-Log interpolation of a data set
|
||||
// Part of a strategy pattern to encapsulate algorithms for interpolation of data sets
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LININTERPOLATION_HH
|
||||
#define G4LININTERPOLATION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4LinInterpolation : public G4VDataSetAlgorithm {
|
||||
|
||||
public:
|
||||
|
||||
G4LinInterpolation();
|
||||
|
||||
~G4LinInterpolation();
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const;
|
||||
|
||||
virtual G4VDataSetAlgorithm* Clone() const { return new G4LinInterpolation; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogLogInterpolation.hh,v 1.2 2001/10/08 07:45:33 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Log-Log interpolation of a data set
|
||||
// Part of a strategy pattern to encapsulate algorithms for interpolation of data sets
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LOGLOGINTERPOLATION_HH
|
||||
#define G4LOGLOGINTERPOLATION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4LogLogInterpolation : public G4VDataSetAlgorithm {
|
||||
|
||||
public:
|
||||
|
||||
G4LogLogInterpolation();
|
||||
|
||||
~G4LogLogInterpolation();
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const;
|
||||
|
||||
virtual G4VDataSetAlgorithm* Clone() const { return new G4LogLogInterpolation; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,36 +20,48 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyBremsstrahlung.hh,v 1.16.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
// -------------------------------------------------------------------
|
||||
// $Id: G4LowEnergyBremsstrahlung.hh,v 1.28 2001/11/29 22:47:27 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ------------ G4LowEnergyBremsstrahlung physics process ------
|
||||
// by A.Forti 1999/03/27 19:18:13
|
||||
//
|
||||
// 18.04.2000 V.Lefebure
|
||||
// - First implementation of continuous energy loss.
|
||||
// Author: A. Forti
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 02 Mar 1999 A. Forti 1st implementation
|
||||
// 27 Sep 2001 V. Ivanchenko Major revision according to a design iteration
|
||||
// 10 Oct 2001 M.G. Pia Revision to improve code quality
|
||||
// and consistency with design
|
||||
// 29 Nov 2001 V.Ivanchenko New parametrisation of EEDL data
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy electromagnetic process, Bremsstrahlung
|
||||
// Low Energy electromagnetic process, electron Bremsstrahlung
|
||||
// based on the data of the EEDL database. Details are described
|
||||
// in the Physics Reference Manual.
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ************************************************************
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#ifndef G4LowEnergyBremsstrahlung_h
|
||||
#define G4LowEnergyBremsstrahlung_h 1
|
||||
|
||||
#ifndef G4LOWENERGYBREMSSTRAHLUNG_HH
|
||||
#define G4LOWENERGYBREMSSTRAHLUNG_HH 1
|
||||
|
||||
#include "G4eLowEnergyLoss.hh"
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4LowEnergyBremsstrahlung : public G4eLowEnergyLoss{
|
||||
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VEMDataSet;
|
||||
class G4VEnergySpectrum;
|
||||
class G4VCrossSectionHandler;
|
||||
|
||||
class G4LowEnergyBremsstrahlung : public G4eLowEnergyLoss
|
||||
{
|
||||
public:
|
||||
|
||||
G4LowEnergyBremsstrahlung(const G4String& processName = "LowEnBrem");
|
||||
@@ -57,80 +69,40 @@ public:
|
||||
~G4LowEnergyBremsstrahlung();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetCutForLowEnSecPhotons(G4double);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& particleType);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step);
|
||||
|
||||
void SetCutForLowEnSecPhotons(G4double cut);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition );
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step);
|
||||
|
||||
|
||||
G4double GetEnergyLossWithCut(const G4double AtomicNumber,
|
||||
const G4double KineticEnergy,
|
||||
const G4double Tcut) ;
|
||||
|
||||
private:
|
||||
|
||||
void BuildCrossSectionTable();
|
||||
void BuildMeanFreePathTable();
|
||||
void BuildATable();
|
||||
void BuildBTable();
|
||||
void BuildZVec();
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void ComputepartialSumSigma(const G4double KineticEnergy,
|
||||
const G4Material* aMaterial,
|
||||
const G4double threshold);
|
||||
// Hide copy constructor and assignment operator as private
|
||||
G4LowEnergyBremsstrahlung(const G4LowEnergyBremsstrahlung& );
|
||||
G4LowEnergyBremsstrahlung& operator = (const G4LowEnergyBremsstrahlung& right);
|
||||
|
||||
private:
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
G4double ComputeA(const G4int Z,const G4double ElectKinEnergy); // interpolation
|
||||
G4double ComputeB(const G4int Z,const G4double ElectKinEnergy); // parametrized formula
|
||||
G4double GetCrossSection(const G4double AtomicNumber,
|
||||
const G4double KineticEnergy) ;
|
||||
G4double GetCrossSectionWithCut(const G4double AtomIndex,
|
||||
const G4double IncEnergy,
|
||||
const G4double CutEnergy);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
|
||||
G4LowEnergyBremsstrahlung & operator=(const G4LowEnergyBremsstrahlung &right);
|
||||
|
||||
G4LowEnergyBremsstrahlung(const G4LowEnergyBremsstrahlung&);
|
||||
|
||||
private:
|
||||
|
||||
G4SecondLevel* theCrossSectionTable ;
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4SecondLevel* ATable;
|
||||
G4FirstLevel* BTable;
|
||||
G4DataVector* ZNumVec;
|
||||
|
||||
G4LowEnergyUtilities util;
|
||||
// partial sum of total crosssection
|
||||
G4OrderedTable partialSumSigma;
|
||||
|
||||
G4double lowestKineticEnergy;
|
||||
G4double highestKineticEnergy;
|
||||
|
||||
G4double lowEnergyCut; // lower limit of the energy sampling formula
|
||||
G4int totBin; // number of bins in the tables
|
||||
G4double cutForLowEnergySecondaryPhotons;
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
G4VEMDataSet* theMeanFreePath;
|
||||
G4VEnergySpectrum* energySpectrum;
|
||||
|
||||
// Lower limit for generation of gamma in this model
|
||||
G4DataVector cutForSecondaryPhotons;
|
||||
G4double cutForPhotons;
|
||||
};
|
||||
|
||||
#include "G4LowEnergyBremsstrahlung.icc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyBremsstrahlung.icc,v 1.18.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4LowEnergyBremsstrahlung physics process ---------
|
||||
// by A.Forti 1999/03/27
|
||||
//
|
||||
// 18.04.2000 V.Lefebure
|
||||
// - First implementation of continuous energy loss.
|
||||
// - Return an infinite MeanfreePath when cross-section = 0.
|
||||
// ***************************************************************
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
//
|
||||
|
||||
inline G4bool G4LowEnergyBremsstrahlung::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == G4Electron::Electron())
|
||||
/////////////||(&particle == G4Positron::Positron())
|
||||
);
|
||||
}
|
||||
|
||||
inline G4double G4LowEnergyBremsstrahlung::GetMeanFreePath(const G4Track& track,
|
||||
G4double,
|
||||
G4ForceCondition*)
|
||||
|
||||
// gives the MeanFreePath in GEANT4 internal units
|
||||
|
||||
{
|
||||
|
||||
const G4DynamicParticle* aDynamicParticle = track.GetDynamicParticle();
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
G4Material* aMaterial = track.GetMaterial();
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
|
||||
const G4double* theAtomicNumDensityVector = aMaterial->GetAtomicNumDensityVector();
|
||||
const G4int NumberOfElements = aMaterial->GetNumberOfElements() ;
|
||||
G4double* CutInKineticEnergy = G4Gamma::Gamma()->GetCutsInEnergy() ;
|
||||
G4double Threshold = CutInKineticEnergy[aMaterial->GetIndex()] ;
|
||||
G4double MeanFreePath;
|
||||
// G4bool isOutRange ;
|
||||
|
||||
if (KineticEnergy < lowestKineticEnergy)
|
||||
|
||||
////MeanFreePath = DBL_MIN;
|
||||
MeanFreePath = DBL_MAX;
|
||||
|
||||
else {
|
||||
|
||||
if (KineticEnergy > highestKineticEnergy) KineticEnergy = 0.99*highestKineticEnergy ;
|
||||
|
||||
///MeanFreePath = util.DataLogInterpolation(KineticEnergy, aMaterial->GetIndex(), theMeanFreePathTable);
|
||||
/// MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
//// GetValue( KineticEnergy, isOutRange );
|
||||
G4double SIGMA = 0.;
|
||||
G4int iel;
|
||||
for (iel=0; iel<NumberOfElements; iel++ ){
|
||||
SIGMA += theAtomicNumDensityVector[iel]*
|
||||
GetCrossSectionWithCut( (*theElementVector)(iel)->GetZ(),
|
||||
KineticEnergy,
|
||||
Threshold);
|
||||
}
|
||||
MeanFreePath = SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
|
||||
}
|
||||
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4LowEnergyBremsstrahlung::ComputeA(const G4int AtomicNumber,const G4double ElectronKinEnergy){
|
||||
|
||||
G4double aVal;
|
||||
G4FirstLevel* oneAtomCoeff = (*ATable)[AtomicNumber-1];
|
||||
G4DataVector* ElectEnVec = (*oneAtomCoeff)[0];
|
||||
G4DataVector* AValueVec = (*oneAtomCoeff)[1];
|
||||
|
||||
aVal = util.DataLogInterpolation(ElectronKinEnergy, (*ElectEnVec), (*AValueVec));
|
||||
|
||||
if(AtomicNumber > 99){
|
||||
|
||||
aVal = 0;
|
||||
}
|
||||
|
||||
return aVal;
|
||||
}
|
||||
|
||||
inline G4double G4LowEnergyBremsstrahlung::ComputeB(const G4int AtomicNumber,const G4double ElectronKinEnergy){
|
||||
|
||||
G4double bVal;
|
||||
G4double constTerm = (*(*BTable)[0])[AtomicNumber-1];
|
||||
G4double linearTerm = (*(*BTable)[1])[AtomicNumber-1];
|
||||
G4double logElectEn = log10(ElectronKinEnergy);
|
||||
if(logElectEn > -5 && logElectEn < (-constTerm/linearTerm)){
|
||||
|
||||
bVal = linearTerm*logElectEn+constTerm;
|
||||
}
|
||||
else{
|
||||
|
||||
bVal = 0;
|
||||
}
|
||||
|
||||
if(AtomicNumber > 99){
|
||||
bVal = 0;
|
||||
}
|
||||
|
||||
return bVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,85 +19,86 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
|
||||
// $Id: G4LowEnergyCompton.hh,v 1.19 2001/12/13 12:04:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// $Id: G4LowEnergyCompton.hh,v 1.11.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file --- Copyright CERN 1995
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// ------------ G4LowEnergyCompton physics process ------
|
||||
// by A.Forti 1999/03/02
|
||||
// History:
|
||||
// -----------
|
||||
// 02 Mar 1999 A. Forti 1st implementation
|
||||
// 1 Aug 2001 MGP Major revision according to a design iteration
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy electromagnetic process, Compton
|
||||
// Low Energy Electromagnetic Physics, Compton Scattering
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ************************************************************
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LowEnergyCompton_h
|
||||
#define G4LowEnergyCompton_h
|
||||
#ifndef G4LOWENERGYCOMPTON_HH
|
||||
#define G4LOWENERGYCOMPTON_HH 1
|
||||
|
||||
// Base Class Headers
|
||||
#include "globals.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
|
||||
// Contained Variables Headers
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
#include "G4Gamma.hh"
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VEMDataSet;
|
||||
class G4VCrossSectionHandler;
|
||||
class G4VRangeTest;
|
||||
|
||||
class G4LowEnergyCompton : public G4VDiscreteProcess{
|
||||
class G4LowEnergyCompton : public G4VDiscreteProcess {
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator as private
|
||||
G4LowEnergyCompton& operator=(const G4LowEnergyCompton &right);
|
||||
G4LowEnergyCompton(const G4LowEnergyCompton& );
|
||||
|
||||
public:
|
||||
|
||||
G4LowEnergyCompton(const G4String& processName ="LowEnCompton");
|
||||
|
||||
~G4LowEnergyCompton();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
G4bool IsApplicable(const G4ParticleDefinition& definition);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& photon);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
// For testing purpose only
|
||||
G4double DumpMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{ return GetMeanFreePath(aTrack, previousStepSize, condition); }
|
||||
|
||||
protected:
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
void BuildScatteringFunctionTable();
|
||||
void BuildCrossSectionTable();
|
||||
void BuildMeanFreePathTable();
|
||||
void BuildZVec();
|
||||
// Hide copy constructor and assignment operator as private
|
||||
G4LowEnergyCompton& operator=(const G4LowEnergyCompton& right);
|
||||
G4LowEnergyCompton(const G4LowEnergyCompton& );
|
||||
|
||||
private:
|
||||
G4double lowEnergyLimit; // low energy limit applied to the process
|
||||
G4double highEnergyLimit; // high energy limit applied to the process
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
|
||||
|
||||
G4SecondLevel* theCrossSectionTable;
|
||||
G4SecondLevel* theScatteringFunctionTable;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
G4DataVector* ZNumVec;
|
||||
G4VEMDataSet* meanFreePathTable;
|
||||
G4VEMDataSet* scatterFunctionData;
|
||||
|
||||
G4double lowestEnergyLimit; // low energy limit of the crosssection data
|
||||
G4double highestEnergyLimit; // high energy limit of the crosssection data
|
||||
G4int numbBinTable; // number of bins in the data tables
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
|
||||
G4LowEnergyUtilities util;
|
||||
G4VRangeTest* rangeTest;
|
||||
|
||||
const G4double intrinsicLowEnergyLimit; // intrinsic validity range
|
||||
const G4double intrinsicHighEnergyLimit;
|
||||
|
||||
G4double meanFreePath; // actual Mean Free Path (current medium)
|
||||
};
|
||||
|
||||
#include "G4LowEnergyCompton.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyCompton.icc,v 1.13.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4LowEnergyCompton physics process ---------
|
||||
// by A.Forti 1999/03/02
|
||||
// ***************************************************************
|
||||
|
||||
inline G4bool
|
||||
G4LowEnergyCompton::IsApplicable(const G4ParticleDefinition& particle){
|
||||
|
||||
return ( &particle == G4Gamma::Gamma() );
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4LowEnergyCompton::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
|
||||
|
||||
// returns the gamma mean free path in GEANT4 internal units
|
||||
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
// G4bool isOutRange ;
|
||||
|
||||
|
||||
if (GammaEnergy > highestEnergyLimit){
|
||||
meanFreePath = DBL_MAX;
|
||||
}
|
||||
else if(GammaEnergy < lowestEnergyLimit){
|
||||
|
||||
meanFreePath = DBL_MIN;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
meanFreePath = util.DataLogInterpolation(GammaEnergy,
|
||||
aMaterial->GetIndex(),
|
||||
theMeanFreePathTable);
|
||||
|
||||
}
|
||||
|
||||
return meanFreePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,86 +21,92 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyGammaConversion.hh,v 1.9.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4LowEnergyGammaConversion.hh,v 1.14 2001/10/08 07:45:33 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// ------------ G4LowEnergyGammaConversion physics process ------
|
||||
// by A.Forti 1999/03/02
|
||||
// History:
|
||||
// -----------
|
||||
// 02 Mar 1999 A. Forti 1st implementation
|
||||
// 14 Aug 2001 MGP Major revision according to a design iteration
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy process, Photon conversion
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ************************************************************
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LOWENERGYGAMMACONVERSION_HH
|
||||
#define G4LOWENERGYGAMMACONVERSION_HH 1
|
||||
|
||||
#ifndef G4LowEnergyGammaConversion_h
|
||||
#define G4LowEnergyGammaConversion_h 1
|
||||
|
||||
// Base Class Headers
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
|
||||
// Contained Variables Headers
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VEMDataSet;
|
||||
class G4VCrossSectionHandler;
|
||||
class G4VRangeTest;
|
||||
|
||||
class G4LowEnergyGammaConversion : public G4VDiscreteProcess {
|
||||
|
||||
class G4LowEnergyGammaConversion : public G4VDiscreteProcess
|
||||
|
||||
{
|
||||
private:
|
||||
// hide assignment operator as private
|
||||
G4LowEnergyGammaConversion& operator=(const G4LowEnergyGammaConversion &right);
|
||||
G4LowEnergyGammaConversion(const G4LowEnergyGammaConversion& );
|
||||
|
||||
public:
|
||||
|
||||
G4LowEnergyGammaConversion(const G4String& processName ="LowEnConversion");
|
||||
|
||||
~G4LowEnergyGammaConversion();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
G4bool IsApplicable(const G4ParticleDefinition& photon);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& photon);
|
||||
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
// For testing purpose only
|
||||
G4double DumpMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{ return GetMeanFreePath(aTrack, previousStepSize, condition); }
|
||||
|
||||
protected:
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
|
||||
void BuildCrossSectionTable();
|
||||
void BuildMeanFreePathTable();
|
||||
void BuildZVec();
|
||||
|
||||
private:
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
|
||||
|
||||
static G4double ScreenFunction1(G4double ScreenVariable);
|
||||
static G4double ScreenFunction2(G4double ScreenVariable);
|
||||
|
||||
private:
|
||||
|
||||
G4SecondLevel* theCrossSectionTable;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
// Hide copy constructor and assignment operator as private
|
||||
G4LowEnergyGammaConversion& operator=(const G4LowEnergyGammaConversion &right);
|
||||
G4LowEnergyGammaConversion(const G4LowEnergyGammaConversion& );
|
||||
|
||||
G4DataVector* ZNumVec;
|
||||
G4double ScreenFunction1(G4double screenVariable);
|
||||
G4double ScreenFunction2(G4double screenVariable);
|
||||
|
||||
G4double lowEnergyLimit; // low energy limit applied to the process
|
||||
G4double highEnergyLimit; // high energy limit applied to the process
|
||||
|
||||
G4double lowestEnergyLimit;
|
||||
G4double highestEnergyLimit;
|
||||
G4int NumbBinTable;
|
||||
G4VEMDataSet* meanFreePathTable;
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
|
||||
G4VRangeTest* rangeTest;
|
||||
|
||||
const G4double intrinsicLowEnergyLimit; // intrinsic validity range
|
||||
const G4double intrinsicHighEnergyLimit;
|
||||
|
||||
const G4double smallEnergy;
|
||||
|
||||
G4double MeanFreePath; // actual Mean Free Path (current medium)
|
||||
G4LowEnergyUtilities util;
|
||||
};
|
||||
|
||||
#include "G4LowEnergyGammaConversion.icc"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyGammaConversion.icc,v 1.11.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4LowEnergyGammaConversion physics process ---------
|
||||
// by A.Forti 1999/03/02
|
||||
// ***************************************************************
|
||||
|
||||
inline G4bool G4LowEnergyGammaConversion::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( &particle == G4Gamma::Gamma() );
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4LowEnergyGammaConversion::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
|
||||
|
||||
// returns the gamma mean free path in GEANT4 internal units
|
||||
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
// G4bool isOutRange ;
|
||||
|
||||
if (GammaEnergy < lowestEnergyLimit){
|
||||
MeanFreePath = DBL_MAX;
|
||||
|
||||
}
|
||||
else {
|
||||
if(GammaEnergy > highestEnergyLimit) GammaEnergy = 0.99*highestEnergyLimit;
|
||||
MeanFreePath = util.DataLogInterpolation(GammaEnergy, aMaterial->GetIndex(), theMeanFreePathTable);
|
||||
|
||||
}
|
||||
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4LowEnergyGammaConversion::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;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4LowEnergyGammaConversion::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.405 - ScreenVariable* (5.828 - 0.8945*ScreenVariable);
|
||||
|
||||
return screenVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,154 +20,101 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// $Id: G4LowEnergyIonisation.hh,v 1.34 2001/11/29 22:47:27 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// $Id: G4LowEnergyIonisation.hh,v 1.20.2.2 2001/06/28 20:19:23 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// Author: A. Forti
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// --- G4LowEnergyIonisation physics process for electrons
|
||||
// by Alessandra Forti July 1999
|
||||
// ************************************************************
|
||||
//
|
||||
// 07.04.2000 Veronique Lefebure + Laszlo Urban
|
||||
// - First implemention of continuous energy loss
|
||||
// 14/07/99: corrections , L.Urban
|
||||
// 20/09/00 update fluctuations V.Ivanchenko
|
||||
// History:
|
||||
// -----------
|
||||
// 02 Mar 1999 A. Forti 1st implementation
|
||||
// 27 Sep 2001 V. Ivanchenko Major revision according to a design iteration
|
||||
// 10 Oct 2001 M.G. Pia Revision to improve code quality and
|
||||
// consistency with design
|
||||
// 18 Oct 2001 M.G. Pia Revision to improve code quality and
|
||||
// consistency with design
|
||||
// 29 Nov 2001 V.Ivanchenko New parametrisation of EEDL data
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic process, electron Ionisation
|
||||
// Low Energy electromagnetic process, electron Ionisation
|
||||
// based on the data of the EEDL database. Details are described
|
||||
// in the Physics Reference Manual.
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4LowEnergyIonisation_h
|
||||
#define G4LowEnergyIonisation_h 1
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#ifndef G4lOWENERGYIONISATION_HH
|
||||
#define G4LOWENERGYIONISATION_HH 1
|
||||
|
||||
// Base Class Headers
|
||||
#include "G4eLowEnergyLoss.hh"
|
||||
#include "G4AtomicDeexcitation.hh"
|
||||
|
||||
// Contained Variables Headers
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
|
||||
typedef G4FirstLevel oneShellTable;
|
||||
typedef G4SecondLevel oneAtomTable;
|
||||
typedef G4ThirdLevel allAtomTable;
|
||||
|
||||
class G4LowEnergyIonisation : public G4eLowEnergyLoss{
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VDataSetAlgorithm;
|
||||
class G4ParticleChange;
|
||||
class G4VEnergySpectrum;
|
||||
class G4VCrossSectionHandler;
|
||||
class G4ShellVacancy;
|
||||
class G4VEMDataSet;
|
||||
|
||||
class G4LowEnergyIonisation : public G4eLowEnergyLoss
|
||||
{
|
||||
public:
|
||||
|
||||
G4LowEnergyIonisation(const G4String& processName = "LowEnergyIoni");
|
||||
|
||||
G4LowEnergyIonisation(const G4String& processName = "LowEnergyIoni");
|
||||
|
||||
~G4LowEnergyIonisation();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetCutForLowEnSecPhotons(G4double);
|
||||
|
||||
void SetCutForLowEnSecElectrons(G4double);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition ) ;
|
||||
|
||||
inline G4double GetTransitionShell(G4int k){return(thePrimShVec[k]);};
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step);
|
||||
|
||||
void SetCutForLowEnSecPhotons(G4double cut);
|
||||
|
||||
G4double GetShellCrossSection(const G4double AtomicNumber,
|
||||
const G4int subshellindex,
|
||||
const G4double KineticEnergy) ;
|
||||
G4double GetShellCrossSectionwithCut(const G4double AtomicNumber,
|
||||
const G4int subshellindex,
|
||||
const G4double KineticEnergy,
|
||||
const G4double Tcut) ;
|
||||
G4double GetShellEnergyLosswithCut(const G4double AtomicNumber,
|
||||
const G4int subshellindex,
|
||||
const G4double KineticEnergy,
|
||||
const G4double Tcut) ;
|
||||
void SetLowEnergyLimit(G4double val) {if(val > 0.0) lEnergyLimit = val;};
|
||||
|
||||
private:
|
||||
|
||||
virtual G4double ComputeCrossSection(const G4double AtomicNumber,
|
||||
const G4double IncEnergy);
|
||||
G4double ComputeCrossSectionWithCut(const G4double AtomIndex,
|
||||
const G4double IncEnergy,
|
||||
const G4double CutEnergy);
|
||||
G4double ComputeMicroscopicCrossSection(const G4double AtomIndex,
|
||||
const G4double IncEnergy,
|
||||
const G4double CutEnergy);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildShellCrossSectionTable();
|
||||
void BuildBindingEnergyTable();
|
||||
void BuildFluorTransitionTable();
|
||||
void BuildSamplingCoeffTable();
|
||||
void BuildZVec();
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
void SetCutForLowEnSecElectrons(G4double cut);
|
||||
|
||||
protected:
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition );
|
||||
|
||||
virtual G4std::vector<G4DynamicParticle*>* DeexciteAtom(const G4Material* material,
|
||||
G4double incidentEnergy,
|
||||
G4double eLoss);
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator as private
|
||||
G4LowEnergyIonisation(const G4LowEnergyIonisation& );
|
||||
G4LowEnergyIonisation& operator = (const G4LowEnergyIonisation& right);
|
||||
|
||||
// hide assignment operator
|
||||
G4LowEnergyIonisation & operator=(const G4LowEnergyIonisation &right);
|
||||
G4LowEnergyIonisation(const G4LowEnergyIonisation&);
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
private:
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
G4VEMDataSet* theMeanFreePath;
|
||||
G4VEnergySpectrum* energySpectrum;
|
||||
|
||||
// Lower limit for generation of gamma in this model
|
||||
G4DataVector cutForDelta;
|
||||
G4double cutForPhotons;
|
||||
G4double cutForElectrons;
|
||||
G4AtomicDeexcitation deexcitationManager;
|
||||
G4ShellVacancy* shellVacancy;
|
||||
|
||||
G4int SelectRandomShell(const G4int AtomIndex
|
||||
, const G4double IncEnergy
|
||||
, const G4double CutEnergy);
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicPhoton,
|
||||
G4Material* aMaterial);
|
||||
|
||||
G4bool SelectRandomTransition(G4int, G4double*,
|
||||
const oneAtomTable*);
|
||||
|
||||
|
||||
|
||||
G4double EnergySampling(const G4int AtomicNumber
|
||||
, const G4int ShellIndex
|
||||
, const G4double KinEn
|
||||
, const G4double deltaRayMinE = 0.1*eV);
|
||||
|
||||
allAtomTable* allAtomShellCrossSec;
|
||||
allAtomTable* theFluorTransitionTable;
|
||||
allAtomTable* theSamplingCoeffTable;
|
||||
G4SecondLevel* theBindingEnergyTable;
|
||||
G4DataVector* ZNumVec;
|
||||
G4DataVector* ZNumVecFluor;
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
G4double CutForLowEnergySecondaryPhotons;
|
||||
G4double CutForLowEnergySecondaryElectrons;
|
||||
G4double MeanFreePath;
|
||||
|
||||
G4double lowestKineticEnergy;
|
||||
G4double highestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
G4LowEnergyUtilities util;
|
||||
|
||||
G4DataVector thePrimShVec;
|
||||
G4double lEnergyLimit;
|
||||
};
|
||||
|
||||
#include "G4LowEnergyIonisation.icc"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -180,7 +127,3 @@ private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyIonisation.icc,v 1.16.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4LowEnergyIonisation physics process ------------
|
||||
//
|
||||
// by Alessandra Forti , July 1999
|
||||
// ***************************************************************
|
||||
//
|
||||
// 07.04.2000 Veronique Lefebure + Laszlo Urban
|
||||
// - First implemention of continuous energy loss
|
||||
// 14/07/99 corrections by L. Urban
|
||||
// 16/05/01 V.Ivanchenko: cross section is taken from the table.
|
||||
// 17/05/01 V.Ivanchenko: warning print out.
|
||||
// 22/05/01 V.Ivanchenko: switch on using tables of cross sections.
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
//
|
||||
|
||||
inline G4bool G4LowEnergyIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
if(&particle == G4Positron::Positron()) {
|
||||
G4cout << "WARNING: G4LowEnergyIonisation is not applicable"
|
||||
<< " for positron yet!" << G4endl;
|
||||
}
|
||||
return( (&particle == G4Electron::Electron())
|
||||
/////////////////||(&particle == G4Positron::Positron())
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
inline G4double G4LowEnergyIonisation::GetMeanFreePath(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4ForceCondition*){
|
||||
|
||||
const G4DynamicParticle* aParticle = track.GetDynamicParticle();
|
||||
G4double KineticEnergy = aParticle->GetKineticEnergy();
|
||||
const G4Material* aMaterial = track.GetMaterial();
|
||||
|
||||
G4bool isOutRange = false;
|
||||
|
||||
if( KineticEnergy < lowestKineticEnergy ) MeanFreePath = DBL_MAX;
|
||||
else {
|
||||
if(KineticEnergy > highestKineticEnergy)
|
||||
KineticEnergy = highestKineticEnergy;
|
||||
|
||||
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
|
||||
GetValue( KineticEnergy, isOutRange);
|
||||
}
|
||||
return MeanFreePath ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,124 +21,93 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyPhotoElectric.hh,v 1.18.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4LowEnergyPhotoElectric.hh,v 1.23 2001/10/08 07:45:34 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// ------------ G4LowEnergyPhotoElectric physics process ------
|
||||
// by A.Forti 1999/03/02
|
||||
// History:
|
||||
// -----------
|
||||
// 02 Mar 1999 A. Forti 1st implementation
|
||||
// 12 Aug 2001 MGP Major revision according to a design iteration
|
||||
// 16 Sept 2001 E. Guardincerri Added fluorescence generation
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic process, Photoelectric effect
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ************************************************************
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LowEnergyPhotoElectric_h
|
||||
#define G4LowEnergyPhotoElectric_h 1
|
||||
#ifndef G4LOWENERGYPHOTOELECTRIC_HH
|
||||
#define G4LOWENERGYPHOTOELECTRIC_HH 1
|
||||
|
||||
// Base Class Headers
|
||||
#include "globals.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4AtomicDeexcitation.hh"
|
||||
|
||||
// Contained Variables Headers
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
#include "G4Gamma.hh"
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VEMDataSet;
|
||||
class G4VCrossSectionHandler;
|
||||
class G4VRangeTest;
|
||||
|
||||
// ..
|
||||
|
||||
typedef G4FirstLevel oneShellTable;
|
||||
typedef G4SecondLevel oneAtomTable;
|
||||
typedef G4ThirdLevel allAtomTable;
|
||||
|
||||
// ..
|
||||
|
||||
class G4LowEnergyPhotoElectric : public G4VDiscreteProcess
|
||||
|
||||
{
|
||||
class G4LowEnergyPhotoElectric : public G4VDiscreteProcess {
|
||||
|
||||
public:
|
||||
|
||||
G4LowEnergyPhotoElectric(const G4String& processName ="LowEnPhotoElec");
|
||||
|
||||
~G4LowEnergyPhotoElectric();
|
||||
~G4LowEnergyPhotoElectric();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& photon);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
void SetCutForLowEnSecPhotons(G4double);
|
||||
|
||||
// void SetCutForLowEnSecElectrons(G4double);
|
||||
// For testing purpose only
|
||||
G4double DumpMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{ return GetMeanFreePath(aTrack, previousStepSize, condition); }
|
||||
|
||||
protected:
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& PhotonType);
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4double GetCrossSection(G4DynamicParticle* aDynamicGamma,
|
||||
G4Element* anElement);
|
||||
|
||||
inline G4double GetTransitionShell(G4int k){return(thePrimShVec[k]);};
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4double ComputeCrossSection(const G4double AtomicNumber,
|
||||
const G4double IncEnergy);
|
||||
void BuildCrossSectionTable();
|
||||
void BuildShellCrossSectionTable();
|
||||
void BuildBindingEnergyTable();
|
||||
void BuildFluorTransitionTable();
|
||||
void BuildMeanFreePathTable();
|
||||
void BuildZVec();
|
||||
|
||||
private:
|
||||
|
||||
G4int SelectRandomShell(const G4int AtomIndex, const G4double IncEnergy);
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicPhoton,
|
||||
G4Material* aMaterial);
|
||||
|
||||
G4bool SelectRandomTransition(G4int, G4double*, const oneAtomTable*);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator as private
|
||||
G4LowEnergyPhotoElectric& operator=(const G4LowEnergyPhotoElectric &right);
|
||||
// Hide copy constructor and assignment operator as private
|
||||
G4LowEnergyPhotoElectric& operator=(const G4LowEnergyPhotoElectric& right);
|
||||
G4LowEnergyPhotoElectric(const G4LowEnergyPhotoElectric& );
|
||||
|
||||
private:
|
||||
|
||||
G4double lowestEnergyLimit;
|
||||
G4double highestEnergyLimit;
|
||||
G4double lowEnergyLimit; // low energy limit applied to the process
|
||||
G4double highEnergyLimit; // high energy limit applied to the process
|
||||
|
||||
G4int NumbBinTable;
|
||||
G4VEMDataSet* meanFreePathTable;
|
||||
|
||||
G4double CutForLowEnergySecondaryPhotons;
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
G4VCrossSectionHandler* shellCrossSectionHandler;
|
||||
|
||||
G4SecondLevel* theCrossSectionTable;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
G4VRangeTest* rangeTest;
|
||||
|
||||
allAtomTable* allAtomShellCrossSec;
|
||||
allAtomTable* theFluorTransitionTable;
|
||||
G4SecondLevel* theBindingEnergyTable;
|
||||
G4DataVector* ZNumVec;
|
||||
G4DataVector* ZNumVecFluor;
|
||||
const G4double intrinsicLowEnergyLimit; // intrinsic validity range
|
||||
const G4double intrinsicHighEnergyLimit;
|
||||
|
||||
G4DataVector thePrimShVec;
|
||||
G4LowEnergyUtilities util;
|
||||
G4double cutForLowEnergySecondaryPhotons;
|
||||
|
||||
G4double MeanFreePath;
|
||||
G4AtomicDeexcitation deexcitationManager;
|
||||
};
|
||||
|
||||
// ..
|
||||
|
||||
#include "G4LowEnergyPhotoElectric.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyPhotoElectric.icc,v 1.18.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4LowEnergyPhotoElectric physics process ---------
|
||||
// by A.Forti 1999/03/02
|
||||
//
|
||||
// 10/05/2001 V.Ivanchenko Clean up againist Linux compilation with -Wall
|
||||
//
|
||||
// ***************************************************************
|
||||
|
||||
// ..
|
||||
|
||||
inline G4bool G4LowEnergyPhotoElectric::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( &particle == G4Gamma::Gamma() );
|
||||
}
|
||||
|
||||
// ..
|
||||
|
||||
inline G4double
|
||||
G4LowEnergyPhotoElectric::GetMeanFreePath(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
// returns the gamma mean free path in GEANT4 internal units
|
||||
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
// G4bool isOutRange ;
|
||||
if (GammaEnergy > highestEnergyLimit){
|
||||
MeanFreePath = DBL_MAX;
|
||||
}
|
||||
else if(GammaEnergy < lowestEnergyLimit){
|
||||
|
||||
MeanFreePath = DBL_MIN;
|
||||
}
|
||||
else {
|
||||
|
||||
MeanFreePath = util.DataLogInterpolation(GammaEnergy,
|
||||
aMaterial->GetIndex(),
|
||||
theMeanFreePathTable);
|
||||
}
|
||||
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
// ..
|
||||
|
||||
inline G4double G4LowEnergyPhotoElectric::GetCrossSection(G4DynamicParticle* aDynamicGamma,
|
||||
G4Element* anElement)
|
||||
|
||||
// gives the microscopic total cross section in GEANT4 internal units
|
||||
|
||||
{
|
||||
G4double crossSection;
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
|
||||
if (GammaEnergy < lowestEnergyLimit || GammaEnergy > highestEnergyLimit)
|
||||
crossSection = 0.;
|
||||
else{
|
||||
|
||||
G4int elemZ = (G4int) anElement->GetZ();
|
||||
const G4FirstLevel* oneAtomCS
|
||||
= (*theCrossSectionTable)[ZNumVec->index(elemZ)];
|
||||
|
||||
crossSection = util.DataLogInterpolation(GammaEnergy,
|
||||
(*(*oneAtomCS)[0]), (*(*oneAtomCS)[1]))*barn;
|
||||
|
||||
}
|
||||
return crossSection;
|
||||
}
|
||||
|
||||
// ..
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyPolarizedCompton.hh,v 1.4.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4LowEnergyPolarizedCompton.hh,v 1.7 2001/10/24 09:07:20 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
@@ -35,26 +35,27 @@
|
||||
// 24 May 2001 - MGP Modified to inherit from G4VDiscreteProcess
|
||||
// 25 May 2001 - MGP Added protections to avoid crashes
|
||||
//
|
||||
// 17 October 2001 - F.Longo Major revision according to design iteration
|
||||
//
|
||||
// Class description:
|
||||
// Low Energy electromagnetic process, Polarised Compton scattering
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4LowEnergyPolarizedCompton_h
|
||||
#define G4LowEnergyPolarizedCompton_h 1
|
||||
#ifndef G4LOWENERGYPOLARIZEDCOMPTON_H
|
||||
#define G4LOWENERGYPOLARIZEDCOMPTON_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
//#include "G4VParticleChange.hh"
|
||||
|
||||
class G4SecondLevel;
|
||||
class G4PhysicsTable;
|
||||
class G4DataVector;
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
|
||||
class G4VEMDataSet;
|
||||
class G4VCrossSectionHandler;
|
||||
class G4VRangeTest;
|
||||
|
||||
class G4LowEnergyPolarizedCompton : public G4VDiscreteProcess
|
||||
{
|
||||
@@ -64,53 +65,60 @@ public:
|
||||
|
||||
~G4LowEnergyPolarizedCompton();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
G4bool IsApplicable(const G4ParticleDefinition& definition);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& photon);
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
|
||||
// For testing purpose only
|
||||
G4double DumpMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{ return GetMeanFreePath(aTrack, previousStepSize, condition); }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
|
||||
void BuildScatteringFunctionTable();
|
||||
void BuildCrossSectionTable();
|
||||
void BuildMeanFreePathTable();
|
||||
void BuildZVec();
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator as private
|
||||
|
||||
G4LowEnergyPolarizedCompton& operator=(const G4LowEnergyPolarizedCompton&
|
||||
right);
|
||||
G4LowEnergyPolarizedCompton(const G4LowEnergyPolarizedCompton& );
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
|
||||
G4double lowEnergyLimit; // low energy limit applied to the process
|
||||
G4double highEnergyLimit; // high energy limit applied to the process
|
||||
|
||||
G4SecondLevel* theCrossSectionTable;
|
||||
G4SecondLevel* theScatteringFunctionTable;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
G4DataVector* ZNumVec;
|
||||
G4VEMDataSet* meanFreePathTable;
|
||||
G4VEMDataSet* scatterFunctionData;
|
||||
|
||||
G4double lowestEnergyLimit; // low energy limit of the crosssection data
|
||||
G4double highestEnergyLimit; // high energy limit of the crosssection data
|
||||
G4int numbBinTable; // number of bins in the data tables
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
G4VRangeTest* rangeTest;
|
||||
|
||||
G4LowEnergyUtilities util;
|
||||
|
||||
G4double meanFreePath; // actual Mean Free Path (current medium)
|
||||
|
||||
|
||||
const G4double intrinsicLowEnergyLimit; // intrinsic validity range
|
||||
const G4double intrinsicHighEnergyLimit;
|
||||
|
||||
// specific methods for polarization
|
||||
|
||||
G4ThreeVector SetRandomPolarization(G4ThreeVector& direction0); // Random Polarization
|
||||
|
||||
G4ThreeVector SetPerpendicularVector(G4ThreeVector& a); // temporary
|
||||
|
||||
G4ThreeVector SetNewPolarization(G4double epsilon, G4double sinSqrTheta,
|
||||
G4double phi, G4double cosTheta);
|
||||
|
||||
G4double SetPhi(G4double, G4double);
|
||||
|
||||
void SystemOfRefChange(G4ThreeVector& direction0, G4ThreeVector& direction1,
|
||||
G4ThreeVector& polarization0, G4ThreeVector& polarization1);
|
||||
|
||||
// hide assignment operator as private
|
||||
G4LowEnergyPolarizedCompton& operator=(const G4LowEnergyPolarizedCompton &right);
|
||||
G4LowEnergyPolarizedCompton(const G4LowEnergyPolarizedCompton& );
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,41 +21,41 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyRayleigh.hh,v 1.10.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4LowEnergyRayleigh.hh,v 1.15 2001/10/08 07:45:35 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file --- Copyright CERN 1995
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// ------------ G4LowEnergyRayleigh physics process ------
|
||||
// by A.Forti 1999/03/02
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 02 Mar 1999 A. Forti 1st implementation
|
||||
// 11 Aug 2001 MGP Major revision according to a design iteration
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic process, Rayleigh effect
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ************************************************************
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4LowEnergyRayleigh_h
|
||||
#define G4LowEnergyRayleigh_h
|
||||
#ifndef G4LOWENERGYRAYLEIGH_HH
|
||||
#define G4LOWENERGYRAYLEIGH_HH 1
|
||||
|
||||
// Base Class Headers
|
||||
#include "globals.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
|
||||
// Contained Variables Headers
|
||||
#include "G4LowEnergyUtilities.hh"
|
||||
#include "G4Gamma.hh"
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
class G4ParticleDefinition;
|
||||
class G4VParticleChange;
|
||||
class G4VEMDataSet;
|
||||
class G4VCrossSectionHandler;
|
||||
|
||||
class G4LowEnergyRayleigh : public G4VDiscreteProcess {
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator as private
|
||||
G4LowEnergyRayleigh& operator=(const G4LowEnergyRayleigh &right);
|
||||
G4LowEnergyRayleigh(const G4LowEnergyRayleigh& );
|
||||
|
||||
public:
|
||||
|
||||
G4LowEnergyRayleigh(const G4String& processName ="LowEnRayleigh");
|
||||
@@ -64,42 +64,43 @@ public:
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& photon);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
|
||||
|
||||
// For testing purpose only
|
||||
G4double DumpMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{ return GetMeanFreePath(aTrack, previousStepSize, condition); }
|
||||
|
||||
protected:
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition);
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& aStep);
|
||||
|
||||
protected:
|
||||
|
||||
void BuildFormFactorTable();
|
||||
void BuildCrossSectionTable();
|
||||
void BuildMeanFreePathTable();
|
||||
void BuildZVec();
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator as private
|
||||
G4LowEnergyRayleigh& operator=(const G4LowEnergyRayleigh &right);
|
||||
G4LowEnergyRayleigh(const G4LowEnergyRayleigh& );
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle*, G4Material*);
|
||||
G4double lowEnergyLimit; // low energy limit applied to the process
|
||||
G4double highEnergyLimit; // high energy limit applied to the process
|
||||
|
||||
G4SecondLevel* theCrossSectionTable;
|
||||
G4SecondLevel* theFormFactorTable;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
G4DataVector* ZNumVec;
|
||||
G4VEMDataSet* meanFreePathTable;
|
||||
G4VEMDataSet* formFactorData;
|
||||
|
||||
G4double lowestEnergyLimit; // low energy limit of the crosssection formula
|
||||
G4double highestEnergyLimit; // high energy limit of the crosssection formula
|
||||
G4int NumbBinTable; // number of bins in the crossection table
|
||||
G4VCrossSectionHandler* crossSectionHandler;
|
||||
|
||||
const G4double intrinsicLowEnergyLimit; // intrinsic validity range
|
||||
const G4double intrinsicHighEnergyLimit;
|
||||
|
||||
G4LowEnergyUtilities util;
|
||||
|
||||
G4double MeanFreePath; // actual Mean Free Path (current medium)
|
||||
};
|
||||
|
||||
#include "G4LowEnergyRayleigh.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -113,6 +114,3 @@ private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyRayleigh.icc,v 1.12.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4LowEnergyRayleigh physics process ---------
|
||||
// by A.Forti 1999/03/02
|
||||
// ***************************************************************
|
||||
|
||||
inline G4bool G4LowEnergyRayleigh::IsApplicable(const G4ParticleDefinition& particle){
|
||||
return ( &particle == G4Gamma::Gamma() );
|
||||
}
|
||||
|
||||
inline G4double G4LowEnergyRayleigh::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
|
||||
|
||||
// returns the gamma mean free path in GEANT4 internal units
|
||||
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
// G4bool isOutRange ;
|
||||
|
||||
if (GammaEnergy > highestEnergyLimit){
|
||||
MeanFreePath = DBL_MAX;
|
||||
}
|
||||
else if(GammaEnergy < lowestEnergyLimit){
|
||||
|
||||
MeanFreePath = DBL_MIN;
|
||||
}
|
||||
else {
|
||||
|
||||
MeanFreePath = util.DataLogInterpolation(GammaEnergy,
|
||||
aMaterial->GetIndex(),
|
||||
theMeanFreePathTable);
|
||||
}
|
||||
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyUtilities.hh,v 1.8.2.2 2001/06/28 20:19:24 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
//
|
||||
// ------------ G4LowEnergyPhotoElectric physics process ------
|
||||
// by A.Forti 1999/06/28
|
||||
//
|
||||
// Class description:
|
||||
// Class for the handling of the data libraries
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4LowEnergyUtilities_h
|
||||
#define G4LowEnergyUtilities_h 1
|
||||
|
||||
//#include "G4FirstLevel.hh"
|
||||
//#include "G4SecondLevel.hh"
|
||||
#include "G4ThirdLevel.hh"
|
||||
#include "G4PhysicsVector.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
|
||||
typedef G4FirstLevel oneShellTable;
|
||||
typedef G4SecondLevel oneAtomTable;
|
||||
typedef G4ThirdLevel allAtomTable;
|
||||
|
||||
class G4LowEnergyUtilities
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4LowEnergyUtilities();
|
||||
|
||||
~G4LowEnergyUtilities();
|
||||
|
||||
G4FirstLevel* BuildFirstLevelTables(const G4int, const G4int, const char*);
|
||||
G4SecondLevel* BuildSecondLevelTables(const G4int, const G4int, const char*);
|
||||
|
||||
//inline functions
|
||||
G4int FindBinLocation(const G4double BinValue, const G4DataVector& arg);
|
||||
G4int FindBinLocation(const G4double, const G4PhysicsVector*);
|
||||
|
||||
G4double DataLogInterpolation(const G4double,
|
||||
const G4DataVector&,
|
||||
const G4DataVector&);
|
||||
|
||||
G4double DataLogInterpolation(const G4double Argument,
|
||||
const G4double AtomicNumber,
|
||||
const G4PhysicsTable* Table);
|
||||
|
||||
G4double DataSemiLogInterpolation(const G4double,
|
||||
const G4DataVector&,
|
||||
const G4DataVector&);
|
||||
|
||||
};
|
||||
|
||||
inline G4int G4LowEnergyUtilities::FindBinLocation(const G4double arg, const G4DataVector& vec){
|
||||
|
||||
G4int numberOfBin = vec.size();
|
||||
G4int lowerBound = 0;
|
||||
G4int upperBound = numberOfBin-1;
|
||||
|
||||
do {
|
||||
|
||||
G4int midBin = (lowerBound + upperBound)/2;
|
||||
|
||||
if( arg < vec[midBin] )
|
||||
|
||||
upperBound = midBin-1;
|
||||
else
|
||||
|
||||
lowerBound = midBin+1;
|
||||
|
||||
} while (lowerBound <= upperBound);
|
||||
|
||||
return upperBound;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4LowEnergyUtilities::DataLogInterpolation(const G4double Argument,
|
||||
const G4DataVector& argVec,
|
||||
const G4DataVector& valVec){
|
||||
|
||||
G4int theLoc = FindBinLocation(Argument, argVec);
|
||||
G4int size = argVec.size()-1;
|
||||
|
||||
if(theLoc == size){
|
||||
return valVec[theLoc];
|
||||
}
|
||||
|
||||
G4double val1 = valVec[theLoc], val2 = valVec[theLoc+1];
|
||||
G4double arg1 = argVec[theLoc], arg2 = argVec[theLoc+1];
|
||||
|
||||
if(arg1 == 0.0) arg1 = 1e-17; if(val1 == 0.0) val1 = 1e-17;
|
||||
|
||||
G4double theVal = (log10(val1)*log10(arg2/Argument)
|
||||
+log10(val2)*log10(Argument/arg1))/log10(arg2/arg1);
|
||||
|
||||
theVal = pow(10,theVal);
|
||||
|
||||
return theVal;
|
||||
}
|
||||
|
||||
inline G4int G4LowEnergyUtilities::FindBinLocation(const G4double arg,
|
||||
const G4PhysicsVector* vec){
|
||||
|
||||
if(!vec){
|
||||
|
||||
G4Exception("G4LowEnergy: FindBinLocation: Vector Empty "
|
||||
"probably the program hasn't found data files or data files are empty");
|
||||
}
|
||||
|
||||
G4int numberOfBin = vec->GetVectorLength();
|
||||
G4int lowerBound = 0;
|
||||
G4int upperBound = numberOfBin-1;
|
||||
do {
|
||||
|
||||
G4int midBin = (lowerBound + upperBound)/2;
|
||||
|
||||
if( arg < vec->GetLowEdgeEnergy(midBin) )
|
||||
|
||||
upperBound = midBin-1;
|
||||
|
||||
else
|
||||
|
||||
lowerBound = midBin+1;
|
||||
|
||||
} while (lowerBound <= upperBound);
|
||||
|
||||
return upperBound;
|
||||
}
|
||||
|
||||
inline G4double G4LowEnergyUtilities::DataLogInterpolation(const G4double Argument,
|
||||
const G4double TableIndex,
|
||||
const G4PhysicsTable* Table){
|
||||
|
||||
G4PhysicsVector* theVec = 0;
|
||||
theVec = (*Table)(TableIndex);
|
||||
|
||||
G4int theLoc = FindBinLocation(Argument, theVec);
|
||||
|
||||
G4double val1 = (*theVec)(theLoc), val2 = (*theVec)(theLoc+1);
|
||||
G4double arg1 = theVec->GetLowEdgeEnergy(theLoc), arg2 = theVec->GetLowEdgeEnergy(theLoc+1);
|
||||
|
||||
G4double theVal = (log10(val1)*log10(arg2/Argument)
|
||||
+log10(val2)*log10(Argument/arg1))/log10(arg2/arg1);
|
||||
|
||||
theVal = pow(10,theVal);
|
||||
return theVal;
|
||||
}
|
||||
|
||||
inline G4double G4LowEnergyUtilities::DataSemiLogInterpolation(const G4double Argument,
|
||||
const G4DataVector& argVec,
|
||||
const G4DataVector& valVec){
|
||||
|
||||
G4int theLoc = FindBinLocation(Argument, argVec);
|
||||
G4int size = argVec.size()-1;
|
||||
|
||||
if (theLoc == size){
|
||||
return valVec[theLoc];
|
||||
}
|
||||
|
||||
G4double val1 = valVec[theLoc], val2 = valVec[theLoc+1];
|
||||
G4double arg1 = argVec[theLoc], arg2 = argVec[theLoc+1];
|
||||
|
||||
G4double theVal = (val1*log10(arg2/Argument)
|
||||
+val2*log10(Argument/arg1))/log10(arg2/arg1);
|
||||
|
||||
return theVal;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+34
-28
@@ -21,49 +21,55 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RangeNoTest.hh,v 1.1 2001/10/08 07:51:41 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 5 Oct 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4SecondLevel.hh
|
||||
//
|
||||
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
|
||||
//
|
||||
// Creation date: 1 Giugno 1999
|
||||
//
|
||||
// Modifications: 24.04.01 V.Ivanchenko remove RogueWave
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Utility for Low Energy electromagnetic e/photon processes
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
// Class for a strategy pattern encapsulating algorithms to test the range
|
||||
// of a particle: no test is performed
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SECONDLEVEL_HH
|
||||
#define G4SECONDLEVEL_HH
|
||||
#ifndef G4RANGENOTEST_HH
|
||||
#define G4RANGENOTEST_HH 1
|
||||
|
||||
#include "G4FirstLevel.hh"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "globals.hh"
|
||||
#include "G4VRangeTest.hh"
|
||||
|
||||
//class G4SecondLevel : public G4RWTPtrOrderedVector< G4FirstLevel >{
|
||||
class G4SecondLevel : public G4std::vector< G4FirstLevel* >
|
||||
|
||||
{
|
||||
class G4ParticleDefinition;
|
||||
class G4Material;
|
||||
|
||||
class G4RangeNoTest : public G4VRangeTest {
|
||||
|
||||
public:
|
||||
|
||||
~G4SecondLevel();
|
||||
G4RangeNoTest() { }
|
||||
|
||||
G4bool operator == (const G4SecondLevel& ) const;
|
||||
virtual ~G4RangeNoTest() { }
|
||||
|
||||
virtual G4bool Escape(const G4ParticleDefinition* particle,
|
||||
const G4Material* material,
|
||||
G4double energy,
|
||||
G4double safety) const { return true; }
|
||||
|
||||
G4bool operator < (const G4SecondLevel&) const;
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+34
-27
@@ -21,48 +21,55 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RangeTest.hh,v 1.1 2001/10/08 07:51:42 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 5 Oct 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4ThirdLevel.hh
|
||||
//
|
||||
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
|
||||
//
|
||||
// Creation date: 1 Giugno 1999
|
||||
//
|
||||
// Modifications: 24.04.01 V.Ivanchenko remove RogueWave
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Utility for Low Energy electromagnetic e/photon processes
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
// Class for a strategy pattern encapsulating algorithms to test the range
|
||||
// of a perticle: test range against cut and safety
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4THIRDLEVEL_HH
|
||||
#define G4THIRDLEVEL_HH
|
||||
#ifndef G4RANGETEST_HH
|
||||
#define G4RANGETEST_HH 1
|
||||
|
||||
#include "G4SecondLevel.hh"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "globals.hh"
|
||||
#include "G4VRangeTest.hh"
|
||||
|
||||
//class G4ThirdLevel : public G4RWTPtrOrderedVector< G4SecondLevel >{
|
||||
class G4ThirdLevel : public G4std::vector< G4SecondLevel* >
|
||||
{
|
||||
class G4ParticleDefinition;
|
||||
class G4Material;
|
||||
|
||||
class G4RangeTest : public G4VRangeTest {
|
||||
|
||||
public:
|
||||
|
||||
virtual ~G4ThirdLevel();
|
||||
G4RangeTest() { }
|
||||
|
||||
G4bool operator == (const G4ThirdLevel& ) const;
|
||||
virtual ~G4RangeTest() { }
|
||||
|
||||
virtual G4bool Escape(const G4ParticleDefinition* particle,
|
||||
const G4Material* material,
|
||||
G4double energy,
|
||||
G4double safety) const;
|
||||
|
||||
G4bool operator < (const G4ThirdLevel&) const;
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SemiLogInterpolation.hh,v 1.2 2001/10/08 07:45:35 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Log-Log interpolation of a data set
|
||||
// Part of a strategy pattern to encapsulate algorithms for interpolation of data sets
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SEMILOGINTERPOLATION_HH
|
||||
#define G4SEMILOGINTERPOLATION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4SemiLogInterpolation : public G4VDataSetAlgorithm {
|
||||
|
||||
public:
|
||||
|
||||
G4SemiLogInterpolation();
|
||||
|
||||
~G4SemiLogInterpolation();
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const;
|
||||
|
||||
virtual G4VDataSetAlgorithm* Clone() const { return new G4SemiLogInterpolation; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ShellData.hh,v 1.1 2001/08/20 16:36:01 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 6 Aug 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Shell data set: shell identifiers and binding energies
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SHELLDATA_HH
|
||||
#define G4SHELLDATA_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "g4std/map"
|
||||
|
||||
class G4DataVector;
|
||||
|
||||
class G4ShellData
|
||||
{
|
||||
public:
|
||||
|
||||
G4ShellData(G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
~G4ShellData();
|
||||
|
||||
size_t NumberOfShells(G4int Z) const;
|
||||
|
||||
G4int ShellId(G4int Z, G4int shellIndex) const;
|
||||
|
||||
const G4DataVector& ShellIdVector(G4int Z) const;
|
||||
|
||||
G4double BindingEnergy(G4int Z, G4int shellIndex) const;
|
||||
|
||||
void LoadData(const G4String& fileName);
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
private:
|
||||
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> > idMap;
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> > bindingMap;
|
||||
G4std::vector<G4int> nShells;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ShellEMDataSet.hh,v 1.3 2001/09/10 18:05:16 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Data set for an electromagnetic physics process
|
||||
// A strategy pattern is used to encapsulate algorithms for data interpolation
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SHELLEMDATASET_HH
|
||||
#define G4SHELLEMDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4VEMDataSet.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4EMDataSet;
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4ShellEMDataSet : public G4VEMDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4ShellEMDataSet(G4int Z,
|
||||
const G4VDataSetAlgorithm* interpolation,
|
||||
G4double unitE = MeV, G4double unitData = barn);
|
||||
|
||||
G4ShellEMDataSet(G4int Z,
|
||||
const G4String& dataFile,
|
||||
const G4VDataSetAlgorithm* interpolation,
|
||||
G4double unitE = MeV, G4double unitData = barn);
|
||||
|
||||
~G4ShellEMDataSet();
|
||||
|
||||
G4double FindValue(G4double e, G4int id = 0) const;
|
||||
|
||||
const G4VEMDataSet* GetComponent(G4int i) const { return components[i]; }
|
||||
|
||||
void AddComponent(G4VEMDataSet* component);
|
||||
|
||||
size_t NumberOfComponents() const { return nComponents; }
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
const G4DataVector& GetEnergies(G4int i) const;
|
||||
const G4DataVector& GetData(G4int i) const;
|
||||
|
||||
private:
|
||||
|
||||
void LoadData(const G4String& fileName);
|
||||
|
||||
G4int z;
|
||||
|
||||
const G4VDataSetAlgorithm* algorithm; // Not owned pointer
|
||||
|
||||
// G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> > componentsMap;
|
||||
G4std::vector<G4VEMDataSet*> components;
|
||||
size_t nComponents;
|
||||
|
||||
G4double unit1;
|
||||
G4double unit2;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ShellVacancy.hh
|
||||
// GEANT4 tag $Name:
|
||||
//
|
||||
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 21 Sept 2001 Elena Guardincerri Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Fluorescence in along step do it: determinates the number of ionizations
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SHELLVACANCY_HH
|
||||
#define G4SHELLVACANCY_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
//#include "g4std/map"
|
||||
|
||||
class G4VEMDataSet;
|
||||
class G4Material;
|
||||
class G4Element;
|
||||
class G4ShellVacancy
|
||||
{
|
||||
public:
|
||||
|
||||
G4ShellVacancy();
|
||||
|
||||
~G4ShellVacancy();
|
||||
|
||||
G4std::vector<G4int> GenerateNumberOfIonisations(const G4Material* material,
|
||||
G4double incidentEnergy,
|
||||
G4double eLoss) const;
|
||||
|
||||
void AddXsiTable(G4VEMDataSet* set);
|
||||
|
||||
private:
|
||||
|
||||
G4int AverageNOfIonisations(const G4Material* material,
|
||||
const G4Element* element,
|
||||
G4double energy,
|
||||
G4double eLoss) const;
|
||||
|
||||
G4std::vector<G4VEMDataSet*> xsis;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VCrossSectionHandler.hh,v 1.9 2001/10/10 09:49:29 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 16 Sep 2001 MGP Created
|
||||
// 26 Sep 2001 V.Ivanchenko Hide copy constructor and assignement operator
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Base class for cross section manager for an electromagnetic physics process
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4VCROSSSECTIONHANDLER_HH
|
||||
#define G4VCROSSSECTIONHANDLER_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4VDataSetAlgorithm;
|
||||
class G4VEMDataSet;
|
||||
class G4Material;
|
||||
class G4Element;
|
||||
|
||||
class G4VCrossSectionHandler {
|
||||
|
||||
public:
|
||||
|
||||
G4VCrossSectionHandler();
|
||||
|
||||
G4VCrossSectionHandler(G4VDataSetAlgorithm* interpolation,
|
||||
G4double minE = 250*eV, G4double maxE = 100*GeV,
|
||||
G4int nBins = 200,
|
||||
G4double unitE = MeV, G4double unitData = barn,
|
||||
G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
virtual ~G4VCrossSectionHandler();
|
||||
|
||||
void Initialise(G4VDataSetAlgorithm* interpolation = 0,
|
||||
G4double minE = 250*eV, G4double maxE = 100*GeV,
|
||||
G4int numberOfBins = 200,
|
||||
G4double unitE = MeV, G4double unitData = barn,
|
||||
G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
G4int SelectRandomAtom(const G4Material* material, G4double e) const;
|
||||
|
||||
const G4Element* SelectRandomElement(const G4Material* material,
|
||||
G4double e) const;
|
||||
|
||||
G4int SelectRandomShell(G4int Z, G4double e) const;
|
||||
|
||||
G4VEMDataSet* BuildMeanFreePathForMaterials(const G4DataVector* energyCuts = 0);
|
||||
|
||||
G4double FindValue(G4int Z, G4double e) const;
|
||||
|
||||
G4double FindValue(G4int Z, G4double e, G4int shellIndex) const;
|
||||
|
||||
void LoadData(const G4String& dataFile);
|
||||
|
||||
void LoadShellData(const G4String& dataFile);
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
void Clear();
|
||||
|
||||
protected:
|
||||
|
||||
G4int NumberOfComponents(G4int Z) const;
|
||||
|
||||
G4double ValueForMaterial(const G4Material* material, G4double e) const;
|
||||
|
||||
void ActiveElements();
|
||||
|
||||
// Factory method
|
||||
virtual G4std::vector<G4VEMDataSet*>* BuildCrossSectionsForMaterials(
|
||||
const G4DataVector& energyVector,
|
||||
const G4DataVector* energyCuts = 0) = 0;
|
||||
|
||||
// Factory method
|
||||
virtual G4VDataSetAlgorithm* CreateInterpolation();
|
||||
|
||||
G4VDataSetAlgorithm* GetInterpolation() const { return interpolation; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4VCrossSectionHandler(const G4VCrossSectionHandler&);
|
||||
G4VCrossSectionHandler & operator=(const G4VCrossSectionHandler &right);
|
||||
|
||||
G4VDataSetAlgorithm* interpolation;
|
||||
|
||||
G4double eMin;
|
||||
G4double eMax;
|
||||
G4int nBins;
|
||||
|
||||
G4double unit1;
|
||||
G4double unit2;
|
||||
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
|
||||
G4DataVector activeZ;
|
||||
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> > dataMap;
|
||||
|
||||
G4std::vector<G4VEMDataSet*>* crossSections;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDataSetAlgorithm.hh,v 1.5 2001/10/09 12:13:48 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Base class for a strategy pattern to encapsulate algorithms for interpolation of a data set
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4VDATASETALGORITHM_HH
|
||||
#define G4VDATASETALGORITHM_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4VDataSetAlgorithm {
|
||||
|
||||
public:
|
||||
|
||||
G4VDataSetAlgorithm() { }
|
||||
|
||||
virtual ~G4VDataSetAlgorithm() { }
|
||||
|
||||
|
||||
virtual G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const = 0;
|
||||
|
||||
virtual G4VDataSetAlgorithm* Clone() const = 0;
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4VDataSetAlgorithm(const G4VDataSetAlgorithm&);
|
||||
G4VDataSetAlgorithm & operator=(const G4VDataSetAlgorithm &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VEMDataSet.hh,v 1.5 2001/10/04 14:03:57 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Data set for an electromagnetic physics process
|
||||
// A strategy pattern is used to encapsulate algorithms for data interpolation
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4VEMDATASET_HH
|
||||
#define G4VEMDATASET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4VEMDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4VEMDataSet() { }
|
||||
|
||||
virtual ~G4VEMDataSet() { }
|
||||
|
||||
virtual G4double FindValue(G4double e, G4int id = 0) const = 0;
|
||||
|
||||
virtual void PrintData() const = 0;
|
||||
|
||||
virtual const G4VEMDataSet* GetComponent(G4int i) const { return 0; }
|
||||
|
||||
virtual void AddComponent(G4VEMDataSet* dataSet) { }
|
||||
|
||||
virtual size_t NumberOfComponents() const { return 0; }
|
||||
|
||||
virtual const G4DataVector& GetEnergies(G4int i) const = 0;
|
||||
virtual const G4DataVector& GetData(G4int i) const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4VEMDataSet(const G4VEMDataSet&);
|
||||
G4VEMDataSet & operator=(const G4VEMDataSet &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VEnergySpectrum
|
||||
//
|
||||
// Author: V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
|
||||
//
|
||||
// Creation date: 29 September 2001
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// Abstract interface for the energy spectrum of secondary particles in
|
||||
// electromagnetic processes.
|
||||
//
|
||||
// Class Description: End
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4VENERGYSPECTRUM_HH
|
||||
#define G4VENERGYSPECTRUM_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
class G4VEnergySpectrum
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4VEnergySpectrum() {};
|
||||
|
||||
virtual ~G4VEnergySpectrum() {};
|
||||
|
||||
virtual G4double Probability(G4int Z,
|
||||
G4double minKineticEnergy,
|
||||
G4double maxKineticEnergy,
|
||||
G4double kineticEnergy,
|
||||
G4int shell = 0,
|
||||
const G4ParticleDefinition* pd = 0) const = 0;
|
||||
|
||||
virtual G4double AverageEnergy(G4int Z,
|
||||
G4double minKineticEnergy,
|
||||
G4double maxKineticEnergy,
|
||||
G4double kineticEnergy,
|
||||
G4int shell = 0,
|
||||
const G4ParticleDefinition* pd = 0) const = 0;
|
||||
|
||||
virtual G4double SampleEnergy(G4int Z,
|
||||
G4double minKineticEnergy,
|
||||
G4double maxKineticEnergy,
|
||||
G4double kineticEnergy,
|
||||
G4int shell = 0,
|
||||
const G4ParticleDefinition* pd = 0) const = 0;
|
||||
|
||||
virtual G4double MaxEnergyOfSecondaries(G4double kineticEnergy,
|
||||
G4int Z = 0,
|
||||
const G4ParticleDefinition* pd = 0) const = 0;
|
||||
|
||||
virtual G4double Excitation(G4int Z, G4double kineticEnergy) const
|
||||
{return 0.0;};
|
||||
|
||||
virtual void PrintData() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4VEnergySpectrum(const G4VEnergySpectrum&);
|
||||
G4VEnergySpectrum & operator=(const G4VEnergySpectrum &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+33
-30
@@ -21,50 +21,53 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRangeTest.hh,v 1.1 2001/10/08 07:51:42 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 5 Oct 2001 MGP Created
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class file
|
||||
//
|
||||
// CERN, Geneva, Switzerland
|
||||
//
|
||||
// File name: G4FirstLevel.hh
|
||||
//
|
||||
// Author: Alessandra Forti (Alessandra.Forti@cern.ch)
|
||||
//
|
||||
// Creation date: 1 Giugno 1999
|
||||
//
|
||||
// Modifications: 24.04.01 V.Ivanchenko remove RogueWave
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Utility for Low Energy e.m. e/photon processes
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
// Base class for a strategy pattern encapsulating algorithms to test the range
|
||||
// of a particle
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE/index.html
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4FIRSTLEVEL_HH
|
||||
#define G4FIRSTLEVEL_HH
|
||||
#ifndef G4VRANGETEST_HH
|
||||
#define G4VRANGETEST_HH 1
|
||||
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4FirstLevel : public G4std::vector< G4DataVector* >
|
||||
|
||||
{
|
||||
#include "globals.hh"
|
||||
class G4ParticleDefinition;
|
||||
class G4Material;
|
||||
|
||||
class G4VRangeTest {
|
||||
|
||||
public:
|
||||
|
||||
// G4FirstLevel( G4FirstLevel& )
|
||||
G4VRangeTest() { }
|
||||
|
||||
~G4FirstLevel();
|
||||
virtual ~G4VRangeTest() { }
|
||||
|
||||
virtual G4bool Escape(const G4ParticleDefinition* particle,
|
||||
const G4Material* material,
|
||||
G4double energy,
|
||||
G4double safety) const = 0;
|
||||
|
||||
|
||||
G4bool operator == (const G4FirstLevel& ) const;
|
||||
|
||||
G4bool operator < (const G4FirstLevel&) const;
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VeLowEnergyLoss.hh,v 1.4.2.2 2001/06/28 20:19:25 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VeLowEnergyLoss.hh,v 1.7 2001/11/23 11:45:20 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// 3.4.2000 Veronique Lefebure:
|
||||
// Move utils/include/G4VEnergyLoss.hh to
|
||||
@@ -49,7 +49,8 @@
|
||||
// -----------------------------------------------------------
|
||||
//
|
||||
// Modifications:
|
||||
// 20/09/00 update fluctuations V.Ivanchenko
|
||||
// 20/09/00 V.Ivanchenko update fluctuations
|
||||
// 23/11/01 V.Ivanchenko Move static member-functions from header to source
|
||||
//
|
||||
// Class description:
|
||||
// Abstract class for Low Energy Electromagnetic electron energy loss
|
||||
@@ -127,20 +128,15 @@ class G4VeLowEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
|
||||
public: // With description
|
||||
|
||||
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
|
||||
static void SetRndmStep (G4bool value);
|
||||
// use / do not use randomisation in energy loss steplimit
|
||||
// ( default = no randomisation)
|
||||
|
||||
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
|
||||
static void SetEnlossFluc (G4bool value);
|
||||
// compute energy loss with/without fluctuation
|
||||
// ( default : with fluctuation)
|
||||
|
||||
static void SetStepFunction (G4double c1, G4double c2)
|
||||
{dRoverRange = c1; finalRange = c2;
|
||||
c1lim=dRoverRange ;
|
||||
c2lim=2.*(1-dRoverRange)*finalRange;
|
||||
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
|
||||
}
|
||||
static void SetStepFunction (G4double c1, G4double c2);
|
||||
// sets values for data members used to compute the step limit:
|
||||
// dRoverRange : max. relative range change in one step,
|
||||
// finalRange : if range <= finalRange --> last step for the particle.
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VhShellCrossSection
|
||||
//
|
||||
// Author: S. Dussoni and A. Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 23 Oct 2001 A. Mantero 1st implementation
|
||||
// 24 Oct 2001 MGP Cleaned up
|
||||
// 29 Oct 2001 VI Add delta energy
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// Abstract class for models of shell cross sections in proton ionisation
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4VHSHELLCROSSSECTION_HH
|
||||
#define G4VHSHELLCROSSSECTION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4VhShellCrossSection
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4VhShellCrossSection();
|
||||
|
||||
virtual ~G4VhShellCrossSection();
|
||||
|
||||
G4int SelectRandomShell(G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double mass,
|
||||
G4double deltaEnergy) const;
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4std::vector<G4double> Probabilities(G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double mass,
|
||||
G4double deltaEnergy) const = 0;
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4VhShellCrossSection(const G4VhShellCrossSection&);
|
||||
G4VhShellCrossSection & operator=(const G4VhShellCrossSection &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eBremsstrahlungSpectrum.hh,v 1.2 2001/11/29 19:01:45 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4EBremsstrahlungSpectrum
|
||||
//
|
||||
// Author: V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
|
||||
//
|
||||
// Creation date: 27 September 2001
|
||||
//
|
||||
// Modifications:
|
||||
// 10.10.01 MGP Revision to improve code quality and consistency with design
|
||||
// 29.11.01 V.Ivanchenko Parametrisation is updated
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// Provides various integration over gamma spectrum of e- Bremsstrahlung.
|
||||
// Parametrisation is described in Physics Reference Manual based on
|
||||
// data from EEDL database.
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4EBREMSSTRAHLUNGSPECTRUM_HH
|
||||
#define G4EBREMSSTRAHLUNGSPECTRUM_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4VEnergySpectrum.hh"
|
||||
|
||||
class G4BremsstrahlungParameters;
|
||||
|
||||
class G4eBremsstrahlungSpectrum : public G4VEnergySpectrum
|
||||
{
|
||||
public:
|
||||
|
||||
G4eBremsstrahlungSpectrum();
|
||||
|
||||
~G4eBremsstrahlungSpectrum();
|
||||
|
||||
G4double Probability(G4int Z,
|
||||
G4double tMin,
|
||||
G4double tMax,
|
||||
G4double kineticEnergy,
|
||||
G4int shell=0,
|
||||
const G4ParticleDefinition* pd=0) const;
|
||||
|
||||
G4double AverageEnergy(G4int Z,
|
||||
G4double tMin,
|
||||
G4double tMax,
|
||||
G4double kineticEnergy,
|
||||
G4int shell=0,
|
||||
const G4ParticleDefinition* pd=0) const;
|
||||
|
||||
G4double SampleEnergy(G4int Z,
|
||||
G4double tMin,
|
||||
G4double tMax,
|
||||
G4double kineticEnergy,
|
||||
G4int shell=0,
|
||||
const G4ParticleDefinition* pd=0) const;
|
||||
|
||||
G4double MaxEnergyOfSecondaries(G4double kineticEnergy,
|
||||
G4int Z = 0,
|
||||
const G4ParticleDefinition* pd=0) const
|
||||
{ return kineticEnergy; }
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
private:
|
||||
|
||||
G4double IntSpectrum(G4double xMin, G4double xMax,
|
||||
const G4DataVector& p) const;
|
||||
|
||||
G4double AverageValue(G4double xMin, G4double xMax,
|
||||
const G4DataVector& p) const;
|
||||
|
||||
G4double Function(G4double x, const G4DataVector& p) const;
|
||||
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4eBremsstrahlungSpectrum(const G4eBremsstrahlungSpectrum&);
|
||||
G4eBremsstrahlungSpectrum & operator = (const G4eBremsstrahlungSpectrum &right);
|
||||
|
||||
G4BremsstrahlungParameters* theBRparam;
|
||||
G4double lowestE;
|
||||
size_t length;
|
||||
G4int verbose;
|
||||
G4DataVector xp;
|
||||
};
|
||||
|
||||
#endif
|
||||
+53
-35
@@ -20,50 +20,68 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eIonisationCrossSectionHandler.hh,v 1.2 2001/10/10 17:37:27 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// $Id: G4VIeEnergyLoss.icc,v 1.1.2.2 2001/06/28 20:19:19 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
// GEANT4 Class file
|
||||
//
|
||||
// History: based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// ------------ G4VIeEnergyLoss physics process ------------
|
||||
// by Laszlo Urban, 20 March 1997
|
||||
// ***************************************************************
|
||||
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the energy loss of e+/e-.
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// 27-05-98: new randomization of the Step limit , new extrapolations for
|
||||
// high/low energies. L.Urban
|
||||
// 26-10-98: cleanup , L.Urban
|
||||
// ---------------------------------------------------------------
|
||||
// File name: G4eIonisationCrossSectionHandler
|
||||
//
|
||||
// Author: V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
|
||||
//
|
||||
// Creation date: 17 September 2001
|
||||
//
|
||||
// Modified:
|
||||
// 10 Oct 2001 M.G. Pia Revision to improve code quality and consistency with design
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
inline G4bool G4VIeEnergyLoss::IsApplicable(const G4ParticleDefinition&
|
||||
particle)
|
||||
// Class description:
|
||||
// Provides cross sections with cut for LowEnergyIonisation
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4EIONISATIONCROSSSECTIONHANDLER_HH
|
||||
#define GG4EIONISATIONCROSSSECTIONHANDLER_HH 1
|
||||
|
||||
#include "G4VCrossSectionHandler.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VEnergySpectrum;
|
||||
class G4DataVector;
|
||||
class G4VEMDataSet;
|
||||
class G4VDataSetAlgorithm;
|
||||
|
||||
class G4eIonisationCrossSectionHandler : public G4VCrossSectionHandler
|
||||
{
|
||||
return( (&particle == G4Electron::Electron())
|
||||
||(&particle == G4Positron::Positron()) );
|
||||
}
|
||||
public:
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
G4eIonisationCrossSectionHandler(const G4VEnergySpectrum* spec,
|
||||
G4VDataSetAlgorithm* alg,
|
||||
G4double emin,
|
||||
G4double emax,
|
||||
G4int nbin);
|
||||
|
||||
inline G4double G4VIeEnergyLoss::GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
~G4eIonisationCrossSectionHandler();
|
||||
|
||||
G4double Step =
|
||||
GetConstraints(track.GetDynamicParticle(),track.GetMaterial());
|
||||
protected:
|
||||
|
||||
if ((Step>0.0)&&(Step<currentMinimumStep)) currentMinimumStep = Step;
|
||||
G4std::vector<G4VEMDataSet*>* BuildCrossSectionsForMaterials(
|
||||
const G4DataVector& energyVector,
|
||||
const G4DataVector* energyCuts);
|
||||
|
||||
return Step ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
private:
|
||||
|
||||
const G4VEnergySpectrum* theParam;
|
||||
|
||||
G4VDataSetAlgorithm* interp;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4eIonisationParameters.hh,v 1.6 2001/11/29 19:01:45 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
// V. Ivanchenko
|
||||
// Values of the parameters from A. Forti's fit
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 31 Jul 2001 MGP Created
|
||||
// 12.09.01 V.Ivanchenko Add param and interpolation of parametersVI
|
||||
// 10.10.2001 MGP Revision to improve code quality and
|
||||
// consistency with design
|
||||
// 29.11.01 V.Ivanchenko Parametrisation is updated
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics
|
||||
// Set of parameters for LowEnergyIonisation described spectrum
|
||||
// of delta-electrons retrieved from EEDL database.
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4IONISATIONPARAMETERS_HH
|
||||
#define G4IONISATIONPARAMETERS_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "g4std/map"
|
||||
|
||||
class G4VDataSetAlgorithm;
|
||||
class G4VEMDataSet;
|
||||
|
||||
class G4eIonisationParameters {
|
||||
|
||||
public:
|
||||
|
||||
G4eIonisationParameters(G4int minZ = 1, G4int maxZ = 99);
|
||||
|
||||
~G4eIonisationParameters();
|
||||
|
||||
G4double Parameter(G4int Z, G4int shellIndex,
|
||||
G4int parameterIndex, G4double e) const;
|
||||
|
||||
G4double Excitation(G4int Z, G4double e) const;
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4eIonisationParameters(const G4eIonisationParameters&);
|
||||
G4eIonisationParameters & operator=(const G4eIonisationParameters &right);
|
||||
|
||||
void LoadData();
|
||||
|
||||
G4int zMin;
|
||||
G4int zMax;
|
||||
|
||||
G4DataVector activeZ;
|
||||
|
||||
// Parameters of the energy spectra
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> > param;
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> > excit;
|
||||
|
||||
size_t length;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eIonisationSpectrum.hh,v 1.3 2001/11/29 19:01:45 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4eIonisationSpectrum
|
||||
//
|
||||
// Author: V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
|
||||
//
|
||||
// Creation date: 27 September 2001
|
||||
//
|
||||
// Modifications:
|
||||
// 10.10.01 MGP Revision to improve code quality and
|
||||
// consistency with design
|
||||
// 29.11.01 V.Ivanchenko Parametrisation is updated
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// Provides various integration over delta-electron spectrum for e-
|
||||
// ionisation process. Spectrum is parametrised accourding to
|
||||
// EEDL database, details are described in the Physics Reference Manual
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4EIONISATIONSPECTRUM_HH
|
||||
#define GG4EIONISATIONSPECTRUM_HH 1
|
||||
|
||||
#include "G4VEnergySpectrum.hh"
|
||||
|
||||
class G4eIonisationParameters;
|
||||
class G4DataVector;
|
||||
|
||||
class G4eIonisationSpectrum : public G4VEnergySpectrum
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4eIonisationSpectrum();
|
||||
|
||||
~G4eIonisationSpectrum();
|
||||
|
||||
G4double Probability(G4int Z, G4double tMin, G4double tMax,
|
||||
G4double kineticEnergy, G4int shell,
|
||||
const G4ParticleDefinition* pd=0) const;
|
||||
|
||||
G4double AverageEnergy(G4int Z, G4double tMin, G4double tMax,
|
||||
G4double kineticEnergy, G4int shell,
|
||||
const G4ParticleDefinition* pd=0) const;
|
||||
|
||||
G4double SampleEnergy(G4int Z, G4double tMin, G4double tMax,
|
||||
G4double kineticEnergy, G4int shell,
|
||||
const G4ParticleDefinition* pd=0) const;
|
||||
|
||||
G4double MaxEnergyOfSecondaries(G4double kineticEnergy,
|
||||
G4int Z = 0,
|
||||
const G4ParticleDefinition* pd=0) const
|
||||
{ return 0.5*kineticEnergy; };
|
||||
|
||||
G4double Excitation(G4int Z, G4double e) const;
|
||||
|
||||
void PrintData() const;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
G4double IntSpectrum(G4double xMin, G4double xMax,
|
||||
const G4DataVector& p) const;
|
||||
|
||||
G4double AverageValue(G4double xMin, G4double xMax,
|
||||
const G4DataVector& p) const;
|
||||
|
||||
G4double Function(G4double x, const G4DataVector& p) const;
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4eIonisationSpectrum(const G4eIonisationSpectrum&);
|
||||
G4eIonisationSpectrum & operator = (const G4eIonisationSpectrum &right);
|
||||
|
||||
private:
|
||||
|
||||
G4eIonisationParameters* theParam;
|
||||
G4double lowestE;
|
||||
G4double factor;
|
||||
G4int verbose;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -21,11 +21,28 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4eLowEnergyLoss.hh,v 1.1.4.2 2001/06/28 20:19:25 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4eLowEnergyLoss.hh,v 1.7 2001/11/23 11:45:20 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class description:
|
||||
// Low Energy electromagnetic process, electron energy loss
|
||||
// Further documentation available from http://www.ge.infn.it/geant4/lowE
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// This class is the implementation of the unified Energy Loss process.
|
||||
// It calculates the continuous energy loss for e+/e-.
|
||||
// The following processes give contributions to the continuous
|
||||
// energy loss (by default) :
|
||||
// --- ionisation (= cont.ion.loss + delta ray production)
|
||||
// --- bremsstrahlung (= cont.loss due to soft brems+discrete bremsstrahlung)
|
||||
// more can be added ..........
|
||||
// This class creates static dE/dx and range tables for e+ and e-,
|
||||
// which tables can be used by other processes , too.
|
||||
// G4eLowEnergyLoss is the base class for the processes giving contribution
|
||||
// to the (continuous) energy loss of e+/e- .
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
@@ -37,6 +54,8 @@
|
||||
// 16.10.98 public method SetStepFunction() + messenger class
|
||||
// 20.01.99 new data members , L.Urban
|
||||
// 10.02.00 modifications, new e.m. structure , L.Urban
|
||||
// 18.10.01 Revision to improve code quality and consistency with design
|
||||
// 23.11.01 V.Ivanchenko Move static member-functions from header to source
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4eLowEnergyLoss_h
|
||||
@@ -58,20 +77,6 @@
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
|
||||
// Class description:
|
||||
// This class is the implementation of the unified Energy Loss process.
|
||||
// It calculates the continuous energy loss for e+/e-.
|
||||
// The following processes give contributions to the continuous
|
||||
// energy loss (by default) :
|
||||
// --- ionisation (= cont.ion.loss + delta ray production)
|
||||
// --- bremsstrahlung (= cont.loss due to soft brems+discrete bremsstrahlung)
|
||||
// more can be added ..........
|
||||
// This class creates static dE/dx and range tables for e+ and e-,
|
||||
// which tables can be used by other processes , too.
|
||||
// G4eLowEnergyLoss is the base class for the processes giving contribution
|
||||
// to the (continuous) energy loss of e+/e- .
|
||||
// Class description - end
|
||||
|
||||
class G4EnergyLossMessenger;
|
||||
|
||||
class G4eLowEnergyLoss : public G4VeLowEnergyLoss
|
||||
@@ -83,8 +88,6 @@ class G4eLowEnergyLoss : public G4VeLowEnergyLoss
|
||||
|
||||
~G4eLowEnergyLoss();
|
||||
|
||||
public: // With description
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
// true for e+/e- , false otherwise
|
||||
|
||||
@@ -110,22 +113,38 @@ class G4eLowEnergyLoss : public G4VeLowEnergyLoss
|
||||
// ( ionisation and bremsstrahlung) .
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step) = 0;
|
||||
const G4Step& step) = 0;
|
||||
// Virtual function to be overridden in the derived classes
|
||||
// ( ionisation and bremsstrahlung) .
|
||||
|
||||
static void SetNbOfProcesses(G4int nb);
|
||||
// Sets number of processes giving contribution to the energy loss
|
||||
|
||||
static void PlusNbOfProcesses();
|
||||
// Increases number of processes giving contribution to the energy loss
|
||||
|
||||
static void MinusNbOfProcesses();
|
||||
// Decreases number of processes giving contribution to the energy loss
|
||||
|
||||
static G4int GetNbOfProcesses();
|
||||
// Gets number of processes giving contribution to the energy loss
|
||||
// ( default value = 2)
|
||||
|
||||
static void SetLowerBoundEloss(G4double val);
|
||||
static void SetUpperBoundEloss(G4double val);
|
||||
static void SetNbinEloss(G4int nb);
|
||||
|
||||
static G4double GetLowerBoundEloss();
|
||||
static G4double GetUpperBoundEloss();
|
||||
static G4int GetNbinEloss();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4double GetConstraints(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial);
|
||||
|
||||
// hide assignment operator
|
||||
G4eLowEnergyLoss (G4eLowEnergyLoss &);
|
||||
G4eLowEnergyLoss & operator=(const G4eLowEnergyLoss &right);
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4std::vector<G4DynamicParticle*>* DeexciteAtom(const G4Material* material,
|
||||
G4double incidentEnergy,
|
||||
G4double eLoss) { return 0; }
|
||||
|
||||
G4PhysicsTable* theLossTable;
|
||||
|
||||
G4double MinKineticEnergy ; // particle with kinetic energy
|
||||
@@ -134,51 +153,6 @@ class G4eLowEnergyLoss : public G4VeLowEnergyLoss
|
||||
|
||||
G4double Charge,lastCharge ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theDEDXTable;
|
||||
|
||||
G4int CounterOfProcess;
|
||||
G4PhysicsTable** RecorderOfProcess;
|
||||
|
||||
G4double fdEdx; // computed in GetConstraints
|
||||
G4double fRangeNow; // computed in GetConstraints
|
||||
|
||||
G4double linLossLimit ; // used in AlongStepDoIt
|
||||
|
||||
|
||||
//New ParticleChange
|
||||
G4ParticleChangeForLoss fParticleChange ;
|
||||
|
||||
//
|
||||
// static part of the class
|
||||
//
|
||||
public: // With description
|
||||
|
||||
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
|
||||
// Sets number of processes giving contribution to the energy loss
|
||||
|
||||
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
|
||||
// Increases number of processes giving contribution to the energy loss
|
||||
|
||||
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
|
||||
// Decreases number of processes giving contribution to the energy loss
|
||||
|
||||
static G4int GetNbOfProcesses() {return NbOfProcesses;};
|
||||
// Gets number of processes giving contribution to the energy loss
|
||||
// ( default value = 2)
|
||||
|
||||
static void SetLowerBoundEloss(G4double val) {LowerBoundEloss=val;};
|
||||
static void SetUpperBoundEloss(G4double val) {UpperBoundEloss=val;};
|
||||
static void SetNbinEloss(G4int nb) {NbinEloss=nb;};
|
||||
|
||||
static G4double GetLowerBoundEloss() {return LowerBoundEloss;};
|
||||
static G4double GetUpperBoundEloss() {return UpperBoundEloss;};
|
||||
static G4int GetNbinEloss() {return NbinEloss;};
|
||||
|
||||
protected:
|
||||
|
||||
//basic DEDX and Range tables
|
||||
static G4PhysicsTable* theDEDXElectronTable ;
|
||||
static G4PhysicsTable* theDEDXPositronTable ;
|
||||
@@ -205,7 +179,34 @@ class G4eLowEnergyLoss : public G4VeLowEnergyLoss
|
||||
static G4PhysicsTable** RecorderOfElectronProcess;
|
||||
static G4PhysicsTable** RecorderOfPositronProcess;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4double GetConstraints(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial);
|
||||
|
||||
// hide assignment operator
|
||||
G4eLowEnergyLoss (G4eLowEnergyLoss &);
|
||||
G4eLowEnergyLoss & operator=(const G4eLowEnergyLoss &right);
|
||||
|
||||
|
||||
G4PhysicsTable* theDEDXTable;
|
||||
|
||||
G4int CounterOfProcess;
|
||||
G4PhysicsTable** RecorderOfProcess;
|
||||
|
||||
G4double fdEdx; // computed in GetConstraints
|
||||
G4double fRangeNow; // computed in GetConstraints
|
||||
|
||||
G4double linLossLimit ; // used in AlongStepDoIt
|
||||
|
||||
|
||||
//New ParticleChange
|
||||
G4ParticleChangeForLoss fParticleChange ;
|
||||
|
||||
//
|
||||
// static part of the class
|
||||
//
|
||||
|
||||
static G4int NbinEloss; // number of bins in table,
|
||||
// calculated in BuildPhysicTable
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4eLowEnergyLoss.icc,v 1.2.2.2 2001/06/28 20:19:25 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4eLowEnergyLoss.icc,v 1.3 2001/07/11 10:02:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
|
||||
@@ -46,8 +46,13 @@
|
||||
#ifndef G4hBetheBlochModel_h
|
||||
#define G4hBetheBlochModel_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VLowEnergyModel.hh"
|
||||
|
||||
class G4Material;
|
||||
class G4ParticleDefinition;
|
||||
class G4DynamicParticle;
|
||||
|
||||
class G4hBetheBlochModel : public G4VLowEnergyModel
|
||||
{
|
||||
|
||||
|
||||
@@ -47,8 +47,11 @@
|
||||
#ifndef G4hICRU49He_h
|
||||
#define G4hICRU49He_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhElectronicStoppingPower.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class G4hICRU49He : public G4VhElectronicStoppingPower
|
||||
{
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#ifndef G4hICRU49Nuclear_h
|
||||
#define G4hICRU49Nuclear_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhNuclearStoppingPower.hh"
|
||||
|
||||
class G4hICRU49Nuclear : public G4VhNuclearStoppingPower
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
#ifndef G4hICRU49p_h
|
||||
#define G4hICRU49p_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhElectronicStoppingPower.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class G4hICRU49p : public G4VhElectronicStoppingPower
|
||||
{
|
||||
|
||||
|
||||
@@ -48,8 +48,13 @@
|
||||
#ifndef G4hIonEffChargeSquare_h
|
||||
#define G4hIonEffChargeSquare_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VLowEnergyModel.hh"
|
||||
|
||||
class G4Material;
|
||||
class G4ParticleDefinition;
|
||||
class G4DynamicParticle;
|
||||
|
||||
class G4hIonEffChargeSquare : public G4VLowEnergyModel
|
||||
{
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
// 09 August 2000 V.Ivanchenko Add GetContinuousStepLimit
|
||||
// 17 August 2000 V.Ivanchenko Add IonFluctuationModel
|
||||
// 23 Oct 2000 V.Ivanchenko Renew comments
|
||||
// 30 Oct 2001 V.Ivanchenko Add minGammaEnergy and minElectronEnergy
|
||||
// 07 Dec 2001 V.Ivanchenko Add SetFluorescence method
|
||||
// ------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
@@ -64,6 +66,7 @@
|
||||
#ifndef G4hLowEnergyIonisation_h
|
||||
#define G4hLowEnergyIonisation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4hLowEnergyLoss.hh"
|
||||
#include "G4VLowEnergyModel.hh"
|
||||
#include "G4Track.hh"
|
||||
@@ -78,6 +81,11 @@
|
||||
#include "G4hIonEffChargeSquare.hh"
|
||||
#include "G4IonChuFluctuationModel.hh"
|
||||
#include "G4IonYangFluctuationModel.hh"
|
||||
#include "G4AtomicDeexcitation.hh"
|
||||
|
||||
class G4VEMDataSet;
|
||||
class G4ShellVacancy;
|
||||
class G4VhShellCrossSection;
|
||||
|
||||
class G4hLowEnergyIonisation : public G4hLowEnergyLoss
|
||||
{
|
||||
@@ -155,7 +163,10 @@ public: // With description
|
||||
|
||||
void SetBarkasOff() {theBarkas = false;};
|
||||
// This method switch off calculation of the Barkas and Bloch effects.
|
||||
|
||||
|
||||
void SetFluorescence(const G4bool val) {theFluo = val;};
|
||||
// This method switch on/off simulation of the fluorescence of the media.
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& trackData ,
|
||||
const G4Step& stepData ) ;
|
||||
// Function to determine total energy deposition on the step
|
||||
@@ -169,6 +180,13 @@ public: // With description
|
||||
G4double kineticEnergy);
|
||||
// This method returns electronic dE/dx for protons or antiproton.
|
||||
|
||||
void SetCutForSecondaryPhotons(G4double cut);
|
||||
// Set threshold energy for fluorescence
|
||||
|
||||
void SetCutForAugerElectrons(G4double cut);
|
||||
// Set threshold energy for Auger electron production
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
@@ -177,9 +195,11 @@ private:
|
||||
|
||||
void InitializeParametrisation();
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildDataForFluorescence(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void SetProtonElectronicStoppingPowerModel(const G4String& dedxTable)
|
||||
{theProtonTable = dedxTable ;};
|
||||
@@ -224,6 +244,14 @@ private:
|
||||
G4double meanLoss,
|
||||
G4double step) const;
|
||||
// Function to sample electronic losses
|
||||
|
||||
G4std::vector<G4DynamicParticle*>* DeexciteAtom(const G4Material* material,
|
||||
G4double incidentEnergy,
|
||||
G4double hMass,
|
||||
G4double eLoss);
|
||||
|
||||
G4int SelectRandomAtom(const G4Material* material,
|
||||
G4double kineticEnergy) const;
|
||||
|
||||
// hide assignment operator
|
||||
G4hLowEnergyIonisation & operator=(const G4hLowEnergyIonisation &right);
|
||||
@@ -254,7 +282,10 @@ private:
|
||||
G4bool nStopping;
|
||||
G4bool theBarkas;
|
||||
|
||||
G4double* deltaCutInKineticEnergy;
|
||||
G4DataVector cutForDelta;
|
||||
G4DataVector cutForGamma;
|
||||
G4double minGammaEnergy;
|
||||
G4double minElectronEnergy;
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
const G4double paramStepLimit; // parameter limits the step at low energy
|
||||
@@ -264,13 +295,41 @@ private:
|
||||
G4double charge; //
|
||||
G4double chargeSquare; //
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
G4AtomicDeexcitation deexcitationManager;
|
||||
G4ShellVacancy* shellVacancy;
|
||||
G4VhShellCrossSection* shellCS;
|
||||
G4std::vector<G4VEMDataSet*> zFluoDataVector;
|
||||
G4bool theFluo;
|
||||
|
||||
};
|
||||
|
||||
#include "G4hLowEnergyIonisation.icc"
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4hLowEnergyIonisation::GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
G4double Step =
|
||||
GetConstraints(track.GetDynamicParticle(),track.GetMaterial()) ;
|
||||
|
||||
if((Step>0.0)&&(Step<currentMinimumStep))
|
||||
currentMinimumStep = Step ;
|
||||
|
||||
return Step ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4bool G4hLowEnergyIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return(particle.GetPDGCharge() != 0.0
|
||||
&& particle.GetPDGMass() > proton_mass_c2*0.1);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// ------------ G4hLowEnergyIonisation physics process ------
|
||||
// by Vladimir Ivanchenko, 27 July 1999
|
||||
// was made on the base of G4hIonisation class
|
||||
// developed by Laszlo Urban
|
||||
// ************************************************************
|
||||
// It is the extention of the ionisation process for the slow
|
||||
// charged hadrons.
|
||||
// ************************************************************
|
||||
// 28 July 1999 V.Ivanchenko cleen up
|
||||
// 09 Aug 2000 V.Ivanchenko add GetContinuousStepLimit
|
||||
// 23 Oct 2000 V.Ivanchenko add control on particle mass
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4hLowEnergyIonisation::GetMeanFreePath(
|
||||
const G4Track& trackData,
|
||||
G4double previousStepSize,
|
||||
enum G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aParticle = trackData.GetDynamicParticle() ;
|
||||
G4Material* aMaterial = trackData.GetMaterial() ;
|
||||
G4double meanFreePath;
|
||||
G4bool isOutRange ;
|
||||
|
||||
*condition = NotForced ;
|
||||
|
||||
G4double kineticEnergy = aParticle->GetKineticEnergy() ;
|
||||
|
||||
if(kineticEnergy < LowestKineticEnergy) meanFreePath = DBL_MAX;
|
||||
|
||||
else {
|
||||
if(kineticEnergy > HighestKineticEnergy)
|
||||
kineticEnergy = HighestKineticEnergy ;
|
||||
meanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
|
||||
GetValue(kineticEnergy,isOutRange) ;
|
||||
}
|
||||
|
||||
return meanFreePath ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4hLowEnergyIonisation::GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double,
|
||||
G4double currentMinimumStep,
|
||||
G4double&)
|
||||
{
|
||||
G4double Step =
|
||||
GetConstraints(track.GetDynamicParticle(),track.GetMaterial()) ;
|
||||
|
||||
if((Step>0.0)&&(Step<currentMinimumStep))
|
||||
currentMinimumStep = Step ;
|
||||
|
||||
return Step ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4bool G4hLowEnergyIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return(particle.GetPDGCharge() != 0.0
|
||||
&& particle.GetPDGMass() > proton_mass_c2*0.1);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4hLowEnergyLoss.hh,v 1.10.2.2 2001/06/28 20:19:27 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4hLowEnergyLoss.hh,v 1.13 2001/11/23 11:45:20 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
@@ -49,6 +49,7 @@
|
||||
// 02/02/99 L.Urban several bugs fixed
|
||||
// 31/03/00 V.Ivanchenko rename to lowenergy as G4hLowEnergyLoss.hh
|
||||
// 09/08/00 V.Ivanchenko remove GetContinuousStepLimit and IsApplicable
|
||||
// 23/11/01 V.Ivanchenko Move static member-functions from header to source
|
||||
//
|
||||
// Class description:
|
||||
// Class for Low Energy electromagnetic energy loss of hadrons
|
||||
@@ -126,29 +127,21 @@ class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
public:
|
||||
|
||||
// get the number of processes contributing to the cont.energy loss
|
||||
static G4int GetNumberOfProcesses() { return NumberOfProcesses; };
|
||||
static G4int GetNumberOfProcesses();
|
||||
|
||||
// set the number of processes contributing to the cont.energy loss
|
||||
static void SetNumberOfProcesses(G4int number)
|
||||
{NumberOfProcesses=number ; };
|
||||
static void SetNumberOfProcesses(G4int number);
|
||||
|
||||
// Increment the number of processes contributing to the cont.energy loss
|
||||
static void PlusNumberOfProcesses()
|
||||
{ NumberOfProcesses++ ; };
|
||||
static void PlusNumberOfProcesses();
|
||||
|
||||
// decrement the number of processes contributing to the cont.energy loss
|
||||
static void MinusNumberOfProcesses()
|
||||
{ NumberOfProcesses-- ; };
|
||||
static void MinusNumberOfProcesses();
|
||||
|
||||
static void SetdRoverRange(G4double value) {dRoverRange = value;}
|
||||
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
|
||||
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
|
||||
static void SetStepFunction (G4double c1, G4double c2)
|
||||
{dRoverRange = c1; finalRange = c2;
|
||||
c1lim=dRoverRange ;
|
||||
c2lim=2.*(1-dRoverRange)*finalRange;
|
||||
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
|
||||
}
|
||||
static void SetdRoverRange(G4double value);
|
||||
static void SetRndmStep (G4bool value);
|
||||
static void SetEnlossFluc (G4bool value);
|
||||
static void SetStepFunction (G4double c1, G4double c2);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4hLowEnergyLoss.icc,v 1.1.4.2 2001/06/28 20:19:27 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4hLowEnergyLoss.icc,v 1.2 2001/07/11 10:02:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -46,9 +46,14 @@
|
||||
#ifndef G4hNuclearStoppingModel_h
|
||||
#define G4hNuclearStoppingModel_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VLowEnergyModel.hh"
|
||||
#include "G4VhNuclearStoppingPower.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
class G4Material;
|
||||
class G4DynamicParticle;
|
||||
|
||||
class G4hNuclearStoppingModel : public G4VLowEnergyModel
|
||||
{
|
||||
|
||||
|
||||
@@ -46,9 +46,14 @@
|
||||
#ifndef G4hParametrisedLossModel_h
|
||||
#define G4hParametrisedLossModel_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VLowEnergyModel.hh"
|
||||
#include "G4VhElectronicStoppingPower.hh"
|
||||
|
||||
class G4DynamicParticle;
|
||||
class G4ParticleDefinition;
|
||||
class G4Material;
|
||||
|
||||
class G4hParametrisedLossModel : public G4VLowEnergyModel
|
||||
{
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4hShellCrossSection
|
||||
//
|
||||
// Author: S. Dussoni and A. Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 23 Oct 2001 A. Mantero 1st implementation
|
||||
// 24 Oct 2001 MGP Cleaned up
|
||||
// 29 Oct 2001 VI Add delta energy
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Class Description:
|
||||
// Model for shell cross sections in proton ionisation
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4HSHELLCROSSSECTION_HH
|
||||
#define G4HSHELLCROSSSECTION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhShellCrossSection.hh"
|
||||
|
||||
class G4hShellCrossSection : public G4VhShellCrossSection
|
||||
{
|
||||
public:
|
||||
|
||||
G4hShellCrossSection();
|
||||
|
||||
virtual ~G4hShellCrossSection();
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4std::vector<G4double> Probabilities(G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double mass,
|
||||
G4double deltaEnergy) const;
|
||||
|
||||
private:
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4hShellCrossSection(const G4hShellCrossSection&);
|
||||
G4hShellCrossSection & operator = (const G4hShellCrossSection &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -48,8 +48,11 @@
|
||||
#ifndef G4hZiegler1977He_h
|
||||
#define G4hZiegler1977He_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhElectronicStoppingPower.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class G4hZiegler1977He : public G4VhElectronicStoppingPower
|
||||
{
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#ifndef G4hZiegler1977Nuclear_h
|
||||
#define G4hZiegler1977Nuclear_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhNuclearStoppingPower.hh"
|
||||
|
||||
class G4hZiegler1977Nuclear : public G4VhNuclearStoppingPower
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
#ifndef G4hZiegler1977p_h
|
||||
#define G4hZiegler1977p_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhElectronicStoppingPower.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class G4hZiegler1977p : public G4VhElectronicStoppingPower
|
||||
{
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#ifndef G4hZiegler1985Nuclear_h
|
||||
#define G4hZiegler1985Nuclear_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhNuclearStoppingPower.hh"
|
||||
|
||||
class G4hZiegler1985Nuclear : public G4VhNuclearStoppingPower
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
#ifndef G4hZiegler1985p_h
|
||||
#define G4hZiegler1985p_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VhElectronicStoppingPower.hh"
|
||||
|
||||
class G4Material;
|
||||
|
||||
class G4hZiegler1985p : public G4VhElectronicStoppingPower
|
||||
{
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user