Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ASTARStopping.hh,v 1.5 2006/06/29 19:49:58 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ASTARStopping.hh,v 1.6 2008/11/13 12:04:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4ASTARStopping_h
#define G4ASTARStopping_h 1
@@ -85,7 +85,6 @@ private:
G4double currentE, res;
G4double e[74][78], kinE[78];
G4double effZ[74];
G4int Znum[74];
};
inline G4double G4ASTARStopping::GetElectronicDEDX(const G4Material* mat,
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BetheBlochModel.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BetheBlochModel.hh,v 1.16 2008/10/22 16:00:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,9 +44,11 @@
// 13-02-03 Add name (V.Ivanchenko)
// 12-11-03 Fix for GenericIons (V.Ivanchenko)
// 24-03-05 Add G4EmCorrections (V.Ivanchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
// 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
@@ -64,6 +66,8 @@
class G4EmCorrections;
class G4ParticleChangeForLoss;
class G4NistManager;
class G4BetheBlochModel : public G4VEmModel
{
@@ -104,6 +108,20 @@ public:
G4double kineticEnergy,
G4double cutEnergy);
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& niel,
G4double length);
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
@@ -124,19 +142,25 @@ private:
G4BetheBlochModel(const G4BetheBlochModel&);
const G4ParticleDefinition* particle;
const G4Material* currentMaterial;
G4ParticleDefinition* theElectron;
G4EmCorrections* corr;
G4ParticleChangeForLoss* fParticleChange;
G4NistManager* nist;
G4double mass;
G4double tlimit;
G4double spin;
G4double magMoment2;
G4double chargeSquare;
G4double ratio;
G4double formfact;
G4double twoln10;
G4double bg2lim;
G4double taulim;
G4double corrFactor;
G4bool isIon;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -154,19 +178,4 @@ inline G4double G4BetheBlochModel::MaxSecondaryEnergy(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
{
if(particle != p) {
particle = p;
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
ratio = electron_mass_c2/mass;
if(mass > 120.*MeV) tlimit = 51.2*GeV*std::pow(proton_mass_c2/mass,0.66667);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BetheHeitlerModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BohrFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggIonModel.hh,v 1.8 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BraggIonModel.hh,v 1.11 2008/10/22 16:00:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -42,12 +42,15 @@
// 11-05-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 25-04-06 Add stopping data from ASTAR (V.Ivanchenko)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
//
// Implementation of energy loss and delta-electron production
// by heavy slow charged particles using eveluated data
// by heavy slow charged particles using ICRU'49 and NIST evaluated data
// for He4 ions
// -------------------------------------------------------------------
//
@@ -59,6 +62,7 @@
#include "G4ASTARStopping.hh"
class G4ParticleChangeForLoss;
class G4EmCorrections;
class G4BraggIonModel : public G4VEmModel
{
@@ -105,6 +109,22 @@ public:
G4double tmin,
G4double maxEnergy);
// Compute ion charge
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
const G4Material*,
G4double kineticEnergy);
virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
// add correction to energy loss and ompute non-ionizing energy loss
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& niel,
G4double length);
protected:
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
@@ -132,6 +152,8 @@ private:
G4double DEDX(const G4Material* material, G4double kineticEnergy);
G4EmCorrections* corr;
const G4ParticleDefinition* particle;
G4ParticleDefinition* theElectron;
G4ParticleChangeForLoss* fParticleChange;
@@ -143,16 +165,16 @@ private:
G4double chargeSquare;
G4double massRate;
G4double ratio;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double lowestKinEnergy;
G4double HeMass;
G4double massFactor;
G4double corrFactor;
G4double rateMassHe2p;
G4double theZieglerFactor;
G4int iMolecula; // index in the molecula's table
G4bool isIon;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BraggModel.hh,v 1.10 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BraggModel.hh,v 1.12 2008/09/14 17:11:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,13 +44,16 @@
// 12-11-03 Fix for GenericIons (V.Ivanchenko)
// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
// 25-04-06 Add stopping data from PSTAR (V.Ivanchenko)
// 25-04-06 Added stopping data from PSTAR (V.Ivanchenko)
// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
// CorrectionsAlongStep needed for ions(V.Ivanchenko)
//
// Class Description:
//
// Implementation of energy loss and delta-electron production
// by heavy slow charged particles using eveluated data
// by heavy slow charged particles using ICRU'49 and NIST evaluated data
// for protons
// -------------------------------------------------------------------
//
@@ -62,6 +65,7 @@
#include "G4PSTARStopping.hh"
class G4ParticleChangeForLoss;
class G4EmCorrections;
class G4BraggModel : public G4VEmModel
{
@@ -108,6 +112,22 @@ public:
G4double tmin,
G4double maxEnergy);
// Compute ion charge
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
const G4Material*,
G4double kineticEnergy);
virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
const G4Material* mat,
G4double kineticEnergy);
// add correction to energy loss and compute non-ionizing energy loss
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& niel,
G4double length);
protected:
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
@@ -139,6 +159,9 @@ private:
G4BraggModel & operator=(const G4BraggModel &right);
G4BraggModel(const G4BraggModel&);
G4EmCorrections* corr;
const G4ParticleDefinition* particle;
G4ParticleDefinition* theElectron;
G4ParticleChangeForLoss* fParticleChange;
@@ -149,8 +172,6 @@ private:
G4double chargeSquare;
G4double massRate;
G4double ratio;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double lowestKinEnergy;
G4double protonMassAMU;
G4double theZieglerFactor;
@@ -158,6 +179,7 @@ private:
G4int iMolecula; // index in the molecula's table
G4bool isIon;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -25,7 +25,7 @@
//
//
// $Id: G4ComptonScattering.hh,v 1.20 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//------------------ G4ComptonScattering physics process -----------------------
// by Michel Maire, April 1996
@@ -25,7 +25,7 @@
//
//
// $Id: G4ComptonScattering52.hh,v 1.4 2007/05/16 14:00:56 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//------------------ G4ComptonScattering52 physics process -----------------------
// by Michel Maire, April 1996
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScattering.hh,v 1.8 2007/07/31 17:24:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4CoulombScattering.hh,v 1.11 2008/06/13 08:19:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -64,14 +64,17 @@ public:
virtual G4bool IsApplicable(const G4ParticleDefinition& p);
void SetThetaMin(G4double);
inline void SetThetaMin(G4double);
void SetThetaMax(G4double);
inline void SetThetaMax(G4double);
void SetQ2Max(G4double);
inline void SetQ2Max(G4double);
// Set energy above which high energy model will be used
inline void SetHEModelLimit(G4double);
// obsolete method to be removed
void SetBuildTableFlag(G4bool);
inline void SetBuildTableFlag(G4bool);
// Print out of the class parameters
virtual void PrintInfo();
@@ -131,6 +134,14 @@ inline void G4CoulombScattering::SetQ2Max(G4double val)
inline void G4CoulombScattering::SetBuildTableFlag(G4bool)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4CoulombScattering::SetHEModelLimit(G4double val)
{
thEnergy = val;
thEnergyElec = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CoulombScatteringModel.hh,v 1.11 2007/10/09 08:16:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4CoulombScatteringModel.hh,v 1.15 2008/07/31 13:11:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -43,6 +43,7 @@
// 08.08.06 V.Ivanchenko build internal table in ekin scale, introduce faclim
// 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
//
// Class Description:
//
@@ -63,17 +64,12 @@
#include "G4eCoulombScatteringModel.hh"
#include "globals.hh"
class G4ParticleTable;
class G4NistManager;
class G4CoulombScatteringModel : public G4eCoulombScatteringModel
{
public:
G4CoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi,
G4bool build = false, G4double tlim = TeV*TeV,
const G4String& nam = "CoulombScattering");
G4CoulombScatteringModel(const G4String& nam = "CoulombScattering");
virtual ~G4CoulombScatteringModel();
@@ -93,14 +89,10 @@ public:
private:
G4double SelectIsotope(const G4Element*);
// hide assignment operator
G4CoulombScatteringModel & operator=(const G4CoulombScatteringModel &right);
G4CoulombScatteringModel(const G4CoulombScatteringModel&);
G4ParticleTable* theParticleTable;
const G4NistManager* theMatManager;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -25,7 +25,7 @@
//
//
// $Id: G4GammaConversion.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------------ G4GammaConversion physics process------------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4InitXscPAI.hh,v 1.8 2006/06/29 19:50:22 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4InitXscPAI.hh -- header file
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4IonFluctuations.hh,v 1.8 2008/10/22 16:04:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -40,6 +40,7 @@
// Modifications:
//
// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
// 01-06-08 Added initialisation of effective charge prestep (V.Ivanchenko)
//
// Class Description:
//
@@ -53,6 +54,8 @@
#include "G4VEmFluctuationModel.hh"
#include "G4ParticleDefinition.hh"
#include "G4UniversalFluctuation.hh"
class G4IonFluctuations : public G4VEmFluctuationModel
{
@@ -63,37 +66,44 @@ public:
virtual ~G4IonFluctuations();
// Sample fluctuations
G4double SampleFluctuations(const G4Material*,
const G4DynamicParticle*,
G4double&,
G4double&,
G4double&);
G4double& tmax,
G4double& length,
G4double& meanLoss);
G4double Dispersion( const G4Material*,
const G4DynamicParticle*,
G4double&,
G4double&);
// Compute dispertion
G4double Dispersion(const G4Material*,
const G4DynamicParticle*,
G4double& tmax,
G4double& length);
// Initialisation prerun
void InitialiseMe(const G4ParticleDefinition*);
// Initialisation prestep
inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
private:
G4double CoeffitientA(G4double&);
G4double CoeffitientB(const G4Material*, G4double&);
G4double RelativisticFactor(const G4Material*, G4double&);
G4double Factor(const G4Material*, G4double Zeff);
G4double RelativisticFactor(const G4Material*, G4double Zeff);
// hide assignment operator
G4IonFluctuations & operator=(const G4IonFluctuations &right);
G4IonFluctuations(const G4IonFluctuations&);
G4UniversalFluctuation uniFluct;
const G4ParticleDefinition* particle;
G4double particleMass;
G4double charge;
G4double chargeSquare;
G4double chargeSqRatio;
G4double effChargeSquare;
// data members to speed up the fluctuation calculation
G4double parameter;
G4double minNumberInteractionsBohr;
G4double theBohrBeta2;
G4double minFraction;
@@ -106,5 +116,21 @@ private:
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4IonFluctuations::SetParticleAndCharge(const G4ParticleDefinition* part,
G4double q2)
{
if(part != particle) {
particle = part;
particleMass = part->GetPDGMass();
charge = part->GetPDGCharge()/eplus;
chargeSquare = charge*charge;
}
effChargeSquare = q2;
uniFluct.SetParticleAndCharge(part, q2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4KleinNishinaCompton.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4MollerBhabhaModel.hh,v 1.19 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4MscModel71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering.hh,v 1.35 2007/05/18 18:43:32 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering.hh,v 1.36 2008/03/10 10:39:21 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
@@ -99,7 +99,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel;
class G4VMscModel;
class G4MultipleScattering : public G4VMultipleScattering
@@ -132,7 +132,7 @@ protected:
private: // data members
G4UrbanMscModel* mscUrban;
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MultipleScattering71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------- G4MultipleScattering71 physics process --------------------------
@@ -57,8 +57,8 @@
//
//------------------------------------------------------------------------------
//
// $Id: G4MultipleScattering71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// class description
//
@@ -179,33 +179,6 @@ inline G4bool G4MultipleScattering71::IsApplicable (const G4ParticleDefinition&
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MultipleScattering71::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimalStep,
G4double&)
{
DefineMaterial(track.GetMaterialCutsCouple());
const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple();
G4double e = track.GetKineticEnergy();
model = dynamic_cast<G4MscModel71*>(SelectModel(e));
const G4ParticleDefinition* p = track.GetDefinition();
G4double lambda0 = GetLambda(p, e);
range = G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple);
if(range < currentMinimalStep) currentMinimalStep = range;
truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep);
// G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= "
// << lambda0 << " range= " << currentRange
// << " currentMinStep= " << currentMinimalStep << G4endl;
if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;
geomPathLength = model->GeomPathLength(LambdaTable(),couple,
p,e,lambda0,range,truePathLength);
if(geomPathLength > lambda0) geomPathLength = lambda0;
return geomPathLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4VParticleChange* G4MultipleScattering71::AlongStepDoIt(
const G4Track&,
const G4Step& step)
@@ -67,7 +67,7 @@ class G4PAIPhotonModel : public G4VEmModel, public G4VEmFluctuationModel
public:
G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAIPhoton");
virtual ~G4PAIPhotonModel();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PAIxSection.hh,v 1.12 2006/06/29 19:50:44 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PAIxSection.hh,v 1.15 2008/05/30 16:04:40 grichine Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4PAIxSection.hh -- header file
@@ -73,111 +73,142 @@ public:
G4PAIxSection( G4MaterialCutsCouple* matCC);
G4PAIxSection( G4int materialIndex,
G4double maxEnergyTransfer ) ;
G4double maxEnergyTransfer );
G4PAIxSection( G4int materialIndex, // for proton loss table
G4double maxEnergyTransfer,
G4double betaGammaSq ,
G4double** photoAbsCof, G4int intNumber ) ;
G4double** photoAbsCof, G4int intNumber );
G4PAIxSection( G4int materialIndex, // test constructor
G4double maxEnergyTransfer,
G4double betaGammaSq ) ;
G4double betaGammaSq );
// G4PAIxSection(const G4PAIxSection& right) ;
// G4PAIxSection(const G4PAIxSection& right);
// Destructor
~G4PAIxSection() ;
~G4PAIxSection();
// Operators
// G4PAIxSection& operator=(const G4PAIxSection& right) ;
// G4int operator==(const G4PAIxSection& right)const ;
// G4int operator!=(const G4PAIxSection& right)const ;
// G4PAIxSection& operator=(const G4PAIxSection& right);
// G4int operator==(const G4PAIxSection& right)const;
// G4int operator!=(const G4PAIxSection& right)const;
// Methods
// General control functions
void InitPAI() ;
void InitPAI();
void NormShift( G4double betaGammaSq ) ;
void NormShift( G4double betaGammaSq );
void SplainPAI( G4double betaGammaSq ) ;
void SplainPAI( G4double betaGammaSq );
// Physical methods
G4double RutherfordIntegral( G4int intervalNumber,
G4double limitLow,
G4double limitHigh ) ;
G4double limitHigh );
G4double ImPartDielectricConst( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double RePartDielectricConst(G4double energy) ;
G4double GetPhotonRange( G4double energy );
G4double GetElectronRange( G4double energy );
G4double RePartDielectricConst(G4double energy);
G4double DifPAIxSection( G4int intervalNumber,
G4double betaGammaSq ) ;
G4double betaGammaSq );
G4double PAIdNdxCerenkov( G4int intervalNumber,
G4double betaGammaSq ) ;
G4double betaGammaSq );
G4double PAIdNdxMM( G4int intervalNumber,
G4double betaGammaSq );
G4double PAIdNdxPlasmon( G4int intervalNumber,
G4double betaGammaSq ) ;
G4double betaGammaSq );
void IntegralPAIxSection() ;
void IntegralCerenkov() ;
void IntegralPlasmon() ;
G4double PAIdNdxResonance( G4int intervalNumber,
G4double betaGammaSq );
G4double SumOverInterval(G4int intervalNumber) ;
G4double SumOverIntervaldEdx(G4int intervalNumber) ;
G4double SumOverInterCerenkov(G4int intervalNumber) ;
G4double SumOverInterPlasmon(G4int intervalNumber) ;
void IntegralPAIxSection();
void IntegralCerenkov();
void IntegralMM();
void IntegralPlasmon();
void IntegralResonance();
G4double SumOverInterval(G4int intervalNumber);
G4double SumOverIntervaldEdx(G4int intervalNumber);
G4double SumOverInterCerenkov(G4int intervalNumber);
G4double SumOverInterMM(G4int intervalNumber);
G4double SumOverInterPlasmon(G4int intervalNumber);
G4double SumOverInterResonance(G4int intervalNumber);
G4double SumOverBorder( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBorderdEdx( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBordCerenkov( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBordMM( G4int intervalNumber,
G4double energy );
G4double SumOverBordPlasmon( G4int intervalNumber,
G4double energy ) ;
G4double energy );
G4double SumOverBordResonance( G4int intervalNumber,
G4double energy );
G4double GetStepEnergyLoss( G4double step ) ;
G4double GetStepCerenkovLoss( G4double step ) ;
G4double GetStepPlasmonLoss( G4double step ) ;
G4double GetStepEnergyLoss( G4double step );
G4double GetStepCerenkovLoss( G4double step );
G4double GetStepMMLoss( G4double step );
G4double GetStepPlasmonLoss( G4double step );
G4double GetStepResonanceLoss( G4double step );
G4double GetEnergyTransfer();
G4double GetCerenkovEnergyTransfer();
G4double GetMMEnergyTransfer();
G4double GetPlasmonEnergyTransfer();
G4double GetResonanceEnergyTransfer();
G4double GetRutherfordEnergyTransfer();
// Inline access functions
G4int GetNumberOfGammas() const { return fNumberOfGammas ; }
G4int GetNumberOfGammas() const { return fNumberOfGammas; }
G4int GetSplineSize() const { return fSplineNumber ; }
G4int GetSplineSize() const { return fSplineNumber; }
G4int GetIntervalNumber() const { return fIntervalNumber ; }
G4int GetIntervalNumber() const { return fIntervalNumber; }
G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i] ; }
G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; }
G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i] ; }
G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i] ; }
G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i] ; }
G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i]; }
G4double GetPAIdNdxCerenkov(G4int i){ return fdNdxCerenkov[i]; }
G4double GetPAIdNdxMM(G4int i){ return fdNdxMM[i]; }
G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; }
G4double GetPAIdNdxResonance(G4int i){ return fdNdxResonance[i]; }
G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0] ; }
G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0] ; }
G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0] ; }
G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0]; }
G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; }
G4double GetMeanMMLoss() const {return fIntegralMM[0]; }
G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; }
G4double GetMeanResonanceLoss() const {return fIntegralResonance[0]; }
G4double GetNormalizationCof() const { return fNormalizationCof ; }
G4double GetNormalizationCof() const { return fNormalizationCof; }
inline G4double GetPAItable(G4int i,G4int j) const ;
inline G4double GetPAItable(G4int i,G4int j) const;
inline G4double GetLorentzFactor(G4int i) const ;
inline G4double GetLorentzFactor(G4int i) const;
inline G4double GetSplineEnergy(G4int i) const ;
inline G4double GetSplineEnergy(G4int i) const;
inline G4double GetIntegralPAIxSection(G4int i) const ;
inline G4double GetIntegralPAIdEdx(G4int i) const ;
inline G4double GetIntegralCerenkov(G4int i) const ;
inline G4double GetIntegralPlasmon(G4int i) const ;
inline G4double GetIntegralPAIxSection(G4int i) const;
inline G4double GetIntegralPAIdEdx(G4int i) const;
inline G4double GetIntegralCerenkov(G4int i) const;
inline G4double GetIntegralMM(G4int i) const;
inline G4double GetIntegralPlasmon(G4int i) const;
inline G4double GetIntegralResonance(G4int i) const;
protected :
@@ -185,64 +216,69 @@ private :
// Local class constants
static const G4double fDelta ; // energy shift from interval border = 0.001
static const G4double fError ; // error in lin-log approximation = 0.005
static const G4double fDelta; // energy shift from interval border = 0.001
static const G4double fError; // error in lin-log approximation = 0.005
static G4int fNumberOfGammas ; // = 111 ;
static const G4double fLorentzFactor[112] ; // static gamma array
static G4int fNumberOfGammas; // = 111;
static const G4double fLorentzFactor[112]; // static gamma array
static
const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
G4int fIntervalNumber ; // The number of energy intervals
G4double fNormalizationCof ; // Normalization cof for PhotoAbsorptionXsection
G4int fIntervalNumber ; // The number of energy intervals
G4double fNormalizationCof; // Normalization cof for PhotoAbsorptionXsection
// G4double fBetaGammaSq ; // (beta*gamma)^2
// G4double fBetaGammaSq; // (beta*gamma)^2
G4double fDensity ; // Current density
G4double fElectronDensity ; // Current electron (number) density
G4int fSplineNumber ; // Current size of spline
G4int fMaterialIndex; // current material index
G4double fDensity; // Current density
G4double fElectronDensity; // Current electron (number) density
G4int fSplineNumber; // Current size of spline
// Arrays of Sandia coefficients
G4OrderedTable* fMatSandiaMatrix;
G4SandiaTable* fSandia;
G4double* fEnergyInterval ;
G4double* fA1 ;
G4double* fA2 ;
G4double* fA3 ;
G4double* fA4 ;
G4double* fEnergyInterval;
G4double* fA1;
G4double* fA2;
G4double* fA3;
G4double* fA4;
static
const G4int fMaxSplineSize ; // Max size of output splain arrays = 500
const G4int fMaxSplineSize ; // Max size of output splain arrays = 500
/* ******************
G4double* fSplineEnergy ; // energy points of splain
G4double* fRePartDielectricConst ; // Real part of dielectric const
G4double* fImPartDielectricConst ; // Imaginary part of dielectric const
G4double* fIntegralTerm ; // Integral term in PAI cross section
G4double* fDifPAIxSection ; // Differential PAI cross section
G4double* fIntegralPAIxSection ; // Integral PAI cross section ?
G4double* fSplineEnergy; // energy points of splain
G4double* fRePartDielectricConst; // Real part of dielectric const
G4double* fImPartDielectricConst; // Imaginary part of dielectric const
G4double* fIntegralTerm; // Integral term in PAI cross section
G4double* fDifPAIxSection; // Differential PAI cross section
G4double* fIntegralPAIxSection; // Integral PAI cross section ?
*/ ///////////////
G4double fSplineEnergy[500] ; // energy points of splain
G4double fRePartDielectricConst[500] ; // Real part of dielectric const
G4double fImPartDielectricConst[500] ; // Imaginary part of dielectric const
G4double fIntegralTerm[500] ; // Integral term in PAI cross section
G4double fDifPAIxSection[500] ; // Differential PAI cross section
G4double fdNdxCerenkov[500] ; // dNdx of Cerenkov collisions
G4double fdNdxPlasmon[500] ; // dNdx of Plasmon collisions
G4double fSplineEnergy[500]; // energy points of splain
G4double fRePartDielectricConst[500]; // Real part of dielectric const
G4double fImPartDielectricConst[500]; // Imaginary part of dielectric const
G4double fIntegralTerm[500]; // Integral term in PAI cross section
G4double fDifPAIxSection[500]; // Differential PAI cross section
G4double fdNdxCerenkov[500]; // dNdx of Cerenkov collisions
G4double fdNdxMM[500]; // dNdx of MM-Cerenkov collisions
G4double fdNdxPlasmon[500]; // dNdx of Plasmon collisions
G4double fdNdxResonance[500]; // dNdx of resonance collisions
G4double fIntegralPAIxSection[500] ; // Integral PAI cross section ?
G4double fIntegralPAIdEdx[500] ; // Integral PAI dEdx ?
G4double fIntegralCerenkov[500] ; // Integral Cerenkov N>omega ?
G4double fIntegralPlasmon[500] ; // Integral Plasmon N>omega ?
G4double fIntegralPAIxSection[500]; // Integral PAI cross section ?
G4double fIntegralPAIdEdx[500]; // Integral PAI dEdx ?
G4double fIntegralCerenkov[500]; // Integral Cerenkov N>omega ?
G4double fIntegralMM[500]; // Integral MM-Cerenkov N>omega ?
G4double fIntegralPlasmon[500]; // Integral Plasmon N>omega ?
G4double fIntegralResonance[500]; // Integral resonance N>omega ?
G4double fPAItable[500][112] ; // Output array
G4double fPAItable[500][112]; // Output array
} ;
};
//////////////// Inline methods //////////////////////////////////
//
@@ -250,12 +286,12 @@ G4double fPAItable[500][112] ; // Output array
inline G4double G4PAIxSection::GetPAItable(G4int i, G4int j) const
{
return fPAItable[i][j] ;
return fPAItable[i][j];
}
inline G4double G4PAIxSection::GetLorentzFactor(G4int j) const
{
return fLorentzFactor[j] ;
return fLorentzFactor[j];
}
inline G4double G4PAIxSection::GetSplineEnergy(G4int i) const
@@ -264,7 +300,7 @@ inline G4double G4PAIxSection::GetSplineEnergy(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetSplineEnergy");
}
return fSplineEnergy[i] ;
return fSplineEnergy[i];
}
inline G4double G4PAIxSection::GetIntegralPAIxSection(G4int i) const
@@ -273,7 +309,7 @@ inline G4double G4PAIxSection::GetIntegralPAIxSection(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection");
}
return fIntegralPAIxSection[i] ;
return fIntegralPAIxSection[i];
}
inline G4double G4PAIxSection::GetIntegralPAIdEdx(G4int i) const
@@ -282,7 +318,7 @@ inline G4double G4PAIxSection::GetIntegralPAIdEdx(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection");
}
return fIntegralPAIdEdx[i] ;
return fIntegralPAIdEdx[i];
}
inline G4double G4PAIxSection::GetIntegralCerenkov(G4int i) const
@@ -291,7 +327,16 @@ inline G4double G4PAIxSection::GetIntegralCerenkov(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralCerenkov");
}
return fIntegralCerenkov[i] ;
return fIntegralCerenkov[i];
}
inline G4double G4PAIxSection::GetIntegralMM(G4int i) const
{
if(i < 1 || i > fSplineNumber)
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralMM");
}
return fIntegralMM[i];
}
inline G4double G4PAIxSection::GetIntegralPlasmon(G4int i) const
@@ -300,7 +345,16 @@ inline G4double G4PAIxSection::GetIntegralPlasmon(G4int i) const
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralPlasmon");
}
return fIntegralPlasmon[i] ;
return fIntegralPlasmon[i];
}
inline G4double G4PAIxSection::GetIntegralResonance(G4int i) const
{
if(i < 1 || i > fSplineNumber)
{
G4Exception("Invalid argument in G4PAIxSection::GetIntegralResonance");
}
return fIntegralResonance[i];
}
#endif
@@ -25,7 +25,7 @@
//
//
// $Id: G4PAIySection.hh,v 1.1 2007/10/01 17:45:14 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// G4PAIySection.hh -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PSTARStopping.hh,v 1.4 2006/06/29 19:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4PSTARStopping.hh,v 1.5 2008/11/13 12:04:37 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4PSTARStopping_h
#define G4PSTARStopping_h 1
@@ -84,7 +84,6 @@ private:
G4String name[74];
G4double currentE, res;
G4double e[74][60], kinE[60];
G4int Znum[74];
};
inline G4double G4PSTARStopping::GetElectronicDEDX(const G4Material* mat,
@@ -25,7 +25,7 @@
//
//
// $Id: G4PhotoElectricEffect.hh,v 1.24 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
//------------------ G4PhotoElectricEffect physics process ------------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4PolarizedComptonScattering.hh,v 1.9 2006/06/29 19:51:14 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// --------- G4PolarizedComptonScattering physics process ----------------------
// by Vicente Lara, March 1998
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UniversalFluctuation.hh,v 1.5 2007/04/03 11:08:36 urban Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UniversalFluctuation.hh,v 1.6 2008/10/22 16:04:33 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -58,6 +58,7 @@
#include "G4VEmFluctuationModel.hh"
#include "G4ParticleDefinition.hh"
class G4UniversalFluctuation : public G4VEmFluctuationModel
{
@@ -81,6 +82,9 @@ public:
void InitialiseMe(const G4ParticleDefinition*);
// Initialisation prestep
inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
protected:
private:
@@ -121,6 +125,19 @@ private:
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void
G4UniversalFluctuation::SetParticleAndCharge(const G4ParticleDefinition* part,
G4double q2)
{
if(part != particle) {
particle = part;
particleMass = part->GetPDGMass();
}
chargeSquare = q2;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel.hh,v 1.31 2007/10/29 08:42:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UrbanMscModel.hh,v 1.33 2008/03/10 10:39:21 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -90,7 +90,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VEmModel.hh"
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
@@ -100,20 +100,17 @@ class G4LossTableManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel : public G4VEmModel
class G4UrbanMscModel : public G4VMscModel
{
public:
G4UrbanMscModel(G4double facrange, G4double dtrl, G4double lambdalimit,
G4double facgeom,G4double skin,
G4bool samplez, G4MscStepLimitType stepAlg,
const G4String& nam = "UrbanMscUni");
G4UrbanMscModel(const G4String& nam = "UrbanMscUni");
virtual ~G4UrbanMscModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
G4double KineticEnergy,
G4double AtomicNumber,
@@ -141,16 +138,6 @@ public:
G4double ComputeTheta0(G4double truePathLength,
G4double KineticEnergy);
void SetStepLimitType(G4MscStepLimitType);
void SetLateralDisplasmentFlag(G4bool val);
void SetRangeFactor(G4double);
void SetGeomFactor(G4double);
void SetSkin(G4double);
private:
G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
@@ -159,11 +146,11 @@ private:
G4double LatCorrelation();
G4double GetLambda(G4double kinEnergy);
void GeomLimit(const G4Track& track);
void SetParticle(const G4ParticleDefinition* p);
inline G4double GetLambda(G4double kinEnergy);
inline void SetParticle(const G4ParticleDefinition*);
// hide assignment operator
G4UrbanMscModel & operator=(const G4UrbanMscModel &right);
@@ -177,7 +164,6 @@ private:
const G4MaterialCutsCouple* couple;
G4LossTableManager* theManager;
G4double mass;
G4double charge;
@@ -187,10 +173,6 @@ private:
G4double tausmall;
G4double taulim;
G4double currentTau;
G4double dtrl;
G4double lambdalimit;
G4double facrange;
G4double frscaling1,frscaling2;
G4double tlimit;
G4double tlimitmin;
@@ -200,21 +182,18 @@ private:
G4double geombig;
G4double geommin;
G4double geomlimit;
G4double facgeom;
G4double skin;
G4double skindepth;
G4double smallstep;
G4double presafety;
G4double facsafety;
G4double lambda0;
G4double lambdaeff;
G4double tPathLength;
G4double zPathLength;
G4double par1,par2,par3 ;
G4double par1,par2,par3;
G4double stepmin ;
G4double stepmin;
G4double currentKinEnergy;
G4double currentRange;
@@ -224,60 +203,12 @@ private:
G4int currentMaterialIndex;
G4MscStepLimitType steppingAlgorithm;
G4bool samplez;
G4bool latDisplasment;
G4bool isInitialized;
G4bool inside;
G4bool insideskin;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetLateralDisplasmentFlag(G4bool val)
{
latDisplasment = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetSkin(G4double val)
{
skin = val;
stepmin = tlimitminfix;
skindepth = skin*stepmin;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetRangeFactor(G4double val)
{
facrange = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetGeomFactor(G4double val)
{
facgeom = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel::SetStepLimitType(G4MscStepLimitType val)
{
steppingAlgorithm = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
@@ -0,0 +1,238 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel2.hh,v 1.11 2008/12/18 13:01:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
//
// GEANT4 Class header file
//
//
// File name: G4UrbanMscModel2
//
// Author: Laszlo Urban
//
// Creation date: 06.03.2008
//
// Modifications:
//
//
//
// Class Description:
//
// Implementation of the model of multiple scattering based on
// H.W.Lewis Phys Rev 78 (1950) 526 and L.Urban model
// -------------------------------------------------------------------
//
#ifndef G4UrbanMscModel2_h
#define G4UrbanMscModel2_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
class G4ParticleChangeForMSC;
class G4SafetyHelper;
class G4LossTableManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel2 : public G4VMscModel
{
public:
G4UrbanMscModel2(const G4String& nam = "UrbanMscUni2");
virtual ~G4UrbanMscModel2();
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicWeight=0.,
G4double cut =0.,
G4double emax=DBL_MAX);
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double,
G4double);
void SampleScattering(const G4DynamicParticle*,
G4double safety);
G4double ComputeTruePathLengthLimit(const G4Track& track,
G4PhysicsTable* theLambdaTable,
G4double currentMinimalStep);
G4double ComputeGeomPathLength(G4double truePathLength);
G4double ComputeTrueStepLength(G4double geomStepLength);
G4double ComputeTheta0(G4double truePathLength,
G4double KineticEnergy);
private:
G4double SimpleScattering(G4double xmeanth, G4double x2meanth);
G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
G4double SampleDisplacement();
G4double LatCorrelation();
void GeomLimit(const G4Track& track);
inline G4double GetLambda(G4double kinEnergy);
inline void SetParticle(const G4ParticleDefinition*);
inline void UpdateCache();
// hide assignment operator
G4UrbanMscModel2 & operator=(const G4UrbanMscModel2 &right);
G4UrbanMscModel2(const G4UrbanMscModel2&);
const G4ParticleDefinition* particle;
G4ParticleChangeForMSC* fParticleChange;
G4SafetyHelper* safetyHelper;
G4PhysicsTable* theLambdaTable;
const G4MaterialCutsCouple* couple;
G4LossTableManager* theManager;
G4double mass;
G4double charge,ChargeSquare;
G4double masslimite,lambdalimit,fr;
G4double taubig;
G4double tausmall;
G4double taulim;
G4double currentTau;
G4double tlimit;
G4double tlimitmin;
G4double tlimitminfix;
G4double tgeom;
G4double geombig;
G4double geommin;
G4double geomlimit;
G4double skindepth;
G4double smallstep;
G4double presafety;
G4double lambda0;
G4double lambdaeff;
G4double tPathLength;
G4double zPathLength;
G4double par1,par2,par3;
G4double stepmin;
G4double currentKinEnergy;
G4double currentRange;
G4double rangeinit;
G4double currentRadLength;
G4double theta0max,rellossmax;
G4double third;
G4int currentMaterialIndex;
G4double y;
G4double Zold;
G4double Zeff,Z2,Z23,lnZ;
G4double coeffth1,coeffth2;
G4double coeffc1,coeffc2;
G4double scr1ini,scr2ini,scr1,scr2;
G4bool isInitialized;
G4bool inside;
G4bool insideskin;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4UrbanMscModel2::GetLambda(G4double e)
{
G4double x;
if(theLambdaTable) {
G4bool b;
x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
} else {
x = CrossSection(couple,particle,e);
}
if(x > DBL_MIN) x = 1./x;
else x = DBL_MAX;
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel2::SetParticle(const G4ParticleDefinition* p)
{
if (p != particle) {
particle = p;
mass = p->GetPDGMass();
charge = p->GetPDGCharge()/eplus;
ChargeSquare = charge*charge;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel2::UpdateCache()
{
lnZ = std::log(Zeff);
coeffth1 = 0.885+lnZ*(0.104-0.0170*lnZ);
coeffth2 = 0.028+lnZ*(0.012-0.00125*lnZ);
coeffc1 = 2.134-lnZ*(0.1045-0.00602*lnZ);
coeffc2 = 0.001126-lnZ*(0.0001089+0.0000247*lnZ);
Z2 = Zeff*Zeff;
Z23 = std::exp(2.*lnZ/3.);
scr1 = scr1ini*Z23;
scr2 = scr2ini*Z2*ChargeSquare;
// lastMaterial = couple->GetMaterial();
Zold = Zeff;
}
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4UrbanMscModel90.hh,v 1.1 2007/12/07 17:35:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4UrbanMscModel90.hh,v 1.4 2008/10/29 14:15:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -54,7 +54,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VEmModel.hh"
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
@@ -64,19 +64,16 @@ class G4LossTableManager;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel90 : public G4VEmModel
class G4UrbanMscModel90 : public G4VMscModel
{
public:
G4UrbanMscModel90(G4double facrange, G4double dtrl, G4double lambdalimit,
G4double facgeom,G4double skin,
G4bool samplez, G4MscStepLimitType stepAlg,
const G4String& nam = "UrbanMscUni");
G4UrbanMscModel90(const G4String& nam = "UrbanMscUni90");
virtual ~G4UrbanMscModel90();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
G4double KineticEnergy,
@@ -105,16 +102,6 @@ public:
G4double ComputeTheta0(G4double truePathLength,
G4double KineticEnergy);
void SetStepLimitType(G4MscStepLimitType);
void SetLateralDisplasmentFlag(G4bool val);
void SetRangeFactor(G4double);
void SetGeomFactor(G4double);
void SetSkin(G4double);
private:
G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
@@ -123,11 +110,11 @@ private:
G4double LatCorrelation();
G4double GetLambda(G4double kinEnergy);
void GeomLimit(const G4Track& track);
void SetParticle(const G4ParticleDefinition* p);
inline G4double GetLambda(G4double kinEnergy);
inline void SetParticle(const G4ParticleDefinition*);
// hide assignment operator
G4UrbanMscModel90 & operator=(const G4UrbanMscModel90 &right);
@@ -141,7 +128,6 @@ private:
const G4MaterialCutsCouple* couple;
G4LossTableManager* theManager;
G4double mass;
G4double charge;
@@ -151,10 +137,6 @@ private:
G4double tausmall;
G4double taulim;
G4double currentTau;
G4double dtrl;
G4double lambdalimit;
G4double facrange;
G4double frscaling1,frscaling2;
G4double tlimit;
G4double tlimitmin;
@@ -164,21 +146,18 @@ private:
G4double geombig;
G4double geommin;
G4double geomlimit;
G4double facgeom;
G4double skin;
G4double skindepth;
G4double smallstep;
G4double presafety;
G4double facsafety;
G4double lambda0;
G4double lambdaeff;
G4double tPathLength;
G4double zPathLength;
G4double par1,par2,par3 ;
G4double par1,par2,par3;
G4double stepmin ;
G4double stepmin;
G4double currentKinEnergy;
G4double currentRange;
@@ -188,60 +167,12 @@ private:
G4int currentMaterialIndex;
G4MscStepLimitType steppingAlgorithm;
G4bool samplez;
G4bool latDisplasment;
G4bool isInitialized;
G4bool inside;
G4bool insideskin;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetLateralDisplasmentFlag(G4bool val)
{
latDisplasment = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetSkin(G4double val)
{
skin = val;
stepmin = tlimitminfix;
skindepth = skin*stepmin;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetRangeFactor(G4double val)
{
facrange = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetGeomFactor(G4double val)
{
facgeom = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4UrbanMscModel90::SetStepLimitType(G4MscStepLimitType val)
{
steppingAlgorithm = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WaterStopping.hh,v 1.2 2006/06/29 19:51:56 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4WaterStopping.hh,v 1.6 2008/09/09 09:30:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
#ifndef G4WaterStopping_h
#define G4WaterStopping_h 1
@@ -59,7 +59,7 @@ class G4WaterStopping
{
public:
G4WaterStopping(G4EmCorrections* corr = 0);
G4WaterStopping(G4EmCorrections* corr = 0, G4bool splineFlag = true);
~G4WaterStopping();
@@ -69,12 +69,15 @@ private:
void Initialise(G4EmCorrections*);
void AddData(G4double* energy, G4double* stoppower, G4double factor);
// hide assignment operator
G4WaterStopping & operator=(const G4WaterStopping &right);
G4WaterStopping(const G4WaterStopping&);
G4int Z[8];
G4int A[8];
G4bool spline;
G4int Z[16];
G4double A[16];
std::vector<G4LPhysicsFreeVector*> dedx;
};
@@ -0,0 +1,309 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4WentzelVIModel.hh,v 1.7 2008/08/04 08:49:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
//
// GEANT4 Class header file
//
//
// File name: G4WentzelVIModel
//
// Author: V.Ivanchenko
//
// Creation date: 09.04.2008 from G4MuMscModel
//
// Modifications:
//
//
// Class Description:
//
// Implementation of the model of multiple scattering based on
// G.Wentzel, Z. Phys. 40 (1927) 590.
// H.W.Lewis, Phys Rev 78 (1950) 526.
// J.M. Fernandez-Varea et al., NIM B73 (1993) 447.
// L.Urban, CERN-OPEN-2006-077.
// -------------------------------------------------------------------
//
#ifndef G4WentzelVIModel_h
#define G4WentzelVIModel_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4VMscModel.hh"
#include "G4PhysicsTable.hh"
#include "G4MscStepLimitType.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4NistManager.hh"
class G4LossTableManager;
class G4ParticleChangeForMSC;
class G4SafetyHelper;
class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4WentzelVIModel : public G4VMscModel
{
public:
G4WentzelVIModel(const G4String& nam = "WentzelVIUni");
virtual ~G4WentzelVIModel();
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicWeight=0.,
G4double cut = DBL_MAX,
G4double emax= DBL_MAX);
void SampleScattering(const G4DynamicParticle*, G4double safety);
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double,
G4double);
G4double ComputeTruePathLengthLimit(const G4Track& track,
G4PhysicsTable* theLambdaTable,
G4double currentMinimalStep);
G4double ComputeGeomPathLength(G4double truePathLength);
G4double ComputeTrueStepLength(G4double geomStepLength);
private:
G4double ComputeTransportXSectionPerVolume();
G4double ComputeXSectionPerVolume();
void ComputeMaxElectronScattering(G4double cut);
inline G4double GetLambda(G4double kinEnergy);
inline void SetupParticle(const G4ParticleDefinition*);
inline void SetupKinematic(G4double kinEnergy, G4double cut);
inline void SetupTarget(G4double Z, G4double kinEnergy);
inline void DefineMaterial(const G4MaterialCutsCouple*);
// hide assignment operator
G4WentzelVIModel & operator=(const G4WentzelVIModel &right);
G4WentzelVIModel(const G4WentzelVIModel&);
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* thePositron;
G4ParticleChangeForMSC* fParticleChange;
G4SafetyHelper* safetyHelper;
G4PhysicsTable* theLambdaTable;
G4PhysicsTable* theLambda2Table;
G4LossTableManager* theManager;
const G4DataVector* currentCuts;
G4NistManager* fNistManager;
G4double numlimit;
G4double tlimitminfix;
G4double invsqrt12;
// cash
G4double preKinEnergy;
G4double ecut;
G4double lambda0;
G4double tPathLength;
G4double zPathLength;
G4double lambdaeff;
G4double currentRange;
G4double par1;
G4double par2;
G4double par3;
G4double xtsec;
std::vector<G4double> xsecn;
std::vector<G4double> prob;
G4int nelments;
G4int nbins;
G4int nwarnings;
G4int nwarnlimit;
G4int currentMaterialIndex;
const G4MaterialCutsCouple* currentCouple;
const G4Material* currentMaterial;
// single scattering parameters
G4double coeff;
G4double constn;
G4double cosThetaMin;
G4double cosThetaMax;
G4double cosTetMaxNuc;
G4double cosTetMaxNuc2;
G4double cosTetMaxElec;
G4double cosTetMaxElec2;
G4double q2Limit;
G4double alpha2;
G4double a0;
// projectile
const G4ParticleDefinition* particle;
G4double chargeSquare;
G4double spin;
G4double mass;
G4double tkin;
G4double mom2;
G4double invbeta2;
G4double etag;
G4double lowEnergyLimit;
// target
G4double targetZ;
G4double screenZ;
G4double formfactA;
G4double FF[100];
// flags
G4bool isInitialized;
G4bool inside;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void G4WentzelVIModel::DefineMaterial(const G4MaterialCutsCouple* cup)
{
if(cup != currentCouple) {
currentCouple = cup;
currentMaterial = cup->GetMaterial();
currentMaterialIndex = currentCouple->GetIndex();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4WentzelVIModel::GetLambda(G4double e)
{
G4double x;
if(theLambdaTable) {
G4bool b;
x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
} else {
x = CrossSection(currentCouple,particle,e,
(*currentCuts)[currentMaterialIndex]);
}
if(x > DBL_MIN) x = 1./x;
else x = DBL_MAX;
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4WentzelVIModel::SetupParticle(const G4ParticleDefinition* p)
{
// Initialise mass and charge
if(p != particle) {
particle = p;
mass = particle->GetPDGMass();
spin = particle->GetPDGSpin();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
tkin = 0.0;
lowEnergyLimit = keV*mass/electron_mass_c2;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4WentzelVIModel::SetupKinematic(G4double ekin, G4double cut)
{
if(ekin != tkin || ecut != cut) {
tkin = ekin;
mom2 = tkin*(tkin + 2.0*mass);
invbeta2 = 1.0 + mass*mass/mom2;
cosTetMaxNuc = cosThetaMax;
if(ekin <= 10.*cut && mass < MeV) {
cosTetMaxNuc = ekin*(cosThetaMax + 1.0)/(10.*cut) - 1.0;
}
ComputeMaxElectronScattering(cut);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4WentzelVIModel::SetupTarget(G4double Z, G4double e)
{
if(Z != targetZ || e != etag) {
etag = e;
targetZ = Z;
G4int iz= G4int(Z);
if(iz > 99) iz = 99;
G4double x = fNistManager->GetZ13(iz);
screenZ = a0*x*x/mom2;
if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2);
// screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2;
// A.V. Butkevich et al., NIM A 488 (2002) 282
formfactA = FF[iz];
if(formfactA == 0.0) {
x = fNistManager->GetA27(iz);
formfactA = constn*x*x;
FF[iz] = formfactA;
}
formfactA *= mom2;
cosTetMaxNuc2 = cosTetMaxNuc;
/*
G4double ee = 10.*eV*Z;
if(1 == iz) ee *= 2.0;
G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2
*fNistManager->GetAtomicMassAmu(iz)/mom2);
cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);
*/
cosTetMaxElec2 = cosTetMaxElec;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eBremsstrahlung.hh,v 1.36 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungModel.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eBremsstrahlungModel.hh,v 1.25 2008/11/13 19:28:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -68,7 +68,7 @@ class G4eBremsstrahlungModel : public G4VEmModel
public:
G4eBremsstrahlungModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "StandBrem");
const G4String& nam = "eBrem");
virtual ~G4eBremsstrahlungModel();
@@ -100,12 +100,6 @@ public:
G4double tmin,
G4double maxEnergy);
inline void SetLPMflag(G4bool val);
inline G4bool LPMflag() const;
inline void SetEnergyThreshold(G4double val);
inline G4double EnergyThreshold() const;
protected:
inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
@@ -153,8 +147,6 @@ private:
G4double probsup;
G4double MigdalConstant;
G4double LPMconstant;
G4double highEnergyTh;
G4bool theLPMflag;
G4bool isInitialised;
std::vector<G4DataVector*> partialSumSigma;
@@ -208,36 +200,4 @@ G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eBremsstrahlungModel::SetLPMflag(G4bool val)
{
theLPMflag = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4bool G4eBremsstrahlungModel::LPMflag() const
{
return theLPMflag;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eBremsstrahlungModel::SetEnergyThreshold(G4double val)
{
highEnergyTh = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungModel::EnergyThreshold() const
{
return highEnergyTh;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,265 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eBremsstrahlungRelModel.hh,v 1.10 2008/11/14 09:25:19 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4eBremsstrahlungRelModel
// extention of standard G4eBremsstrahlungModel
//
// Author: Andreas Schaelicke
//
// Creation date: 28.03.2008
//
// Modifications:
//
//
// Class Description:
//
// Implementation of energy loss for gamma emission by electrons and
// positrons including an improved version of the LPM effect
// -------------------------------------------------------------------
//
#ifndef G4eBremsstrahlungRelModel_h
#define G4eBremsstrahlungRelModel_h 1
#include "G4VEmModel.hh"
#include "G4NistManager.hh"
class G4ParticleChangeForLoss;
class G4PhysicsVector;
class G4eBremsstrahlungRelModel : public G4VEmModel
{
public:
G4eBremsstrahlungRelModel(const G4ParticleDefinition* p = 0,
const G4String& nam = "eBremRel");
virtual ~G4eBremsstrahlungRelModel();
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple*);
virtual G4double ComputeDEDXPerVolume(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double tkin,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy = DBL_MAX);
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double cutEnergy,
G4double maxEnergy);
virtual void SetupForMaterial(const G4ParticleDefinition*,
const G4Material*,G4double);
inline void SetLPMconstant(G4double val);
inline G4double LPMconstant() const;
protected:
inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy);
private:
void InitialiseConstants();
void CalcLPMFunctions(G4double gammaEnergy);
G4double ComputeBremLoss(G4double cutEnergy);
G4double ComputeXSectionPerAtom(G4double cutEnergy);
G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
G4double ComputeRelDXSectionPerAtom(G4double gammaEnergy);
void SetParticle(const G4ParticleDefinition* p);
// * fast inline functions *
inline void SetCurrentElement(const G4double);
inline G4double Phi1(G4double,G4double);
inline G4double Phi1M2(G4double,G4double);
inline G4double Psi1(G4double,G4double);
inline G4double Psi1M2(G4double,G4double);
// hide assignment operator
G4eBremsstrahlungRelModel & operator=(const G4eBremsstrahlungRelModel &right);
G4eBremsstrahlungRelModel(const G4eBremsstrahlungRelModel&);
protected:
G4NistManager* nist;
const G4ParticleDefinition* particle;
G4ParticleDefinition* theGamma;
G4ParticleChangeForLoss* fParticleChange;
static const G4double xgi[8], wgi[8];
static const G4double Fel_light[5];
static const G4double Finel_light[5];
G4double minThreshold;
// cash
G4double particleMass;
G4double kinEnergy;
G4double totalEnergy;
G4double currentZ;
G4double z13, z23, lnZ;
G4double Fel, Finel, fCoulomb, fMax;
G4double densityFactor;
G4double densityCorr;
// LPM effect
G4double lpmEnergy;
G4PhysicsVector *fXiLPM, *fPhiLPM, *fGLPM;
G4double xiLPM, phiLPM, gLPM;
// critical gamma energies
G4double klpm, kp;
G4bool isElectron;
private:
// consts
G4double highKinEnergy;
G4double lowKinEnergy;
G4double fMigdalConstant;
G4double fLPMconstant;
G4double bremFactor;
G4double energyThresholdLPM;
G4double facFel, facFinel;
G4double preS1,logTwo;
G4bool use_completescreening;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4eBremsstrahlungRelModel::SetCurrentElement(const G4double Z)
{
if(Z != currentZ) {
currentZ = Z;
G4int iz = G4int(Z);
z13 = nist->GetZ13(iz);
z23 = z13*z13;
lnZ = nist->GetLOGZ(iz);
if (iz <= 4) {
Fel = Fel_light[iz];
Finel = Finel_light[iz] ;
}
else {
Fel = facFel - lnZ/3. ;
Finel = facFinel - 2.*lnZ/3. ;
}
fCoulomb=GetCurrentElement()->GetfCoulomb();
fMax = Fel-fCoulomb + Finel/currentZ + (1.+1./currentZ)/12.;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4eBremsstrahlungRelModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy)
{
return kineticEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungRelModel::Phi1(G4double gg, G4double)
{
// Thomas-Fermi FF from Tsai, eq.(3.38) for Z>=5
return 20.863 - 2.*std::log(1. + sqr(0.55846*gg) )
- 4.*( 1. - 0.6*std::exp(-0.9*gg) - 0.4*std::exp(-1.5*gg) );
}
inline G4double G4eBremsstrahlungRelModel::Phi1M2(G4double gg, G4double)
{
// Thomas-Fermi FF from Tsai, eq. (3.39) for Z>=5
// return Phi1(gg,Z) -
return 2./(3.*(1. + 6.5*gg +6.*gg*gg) );
}
inline G4double G4eBremsstrahlungRelModel::Psi1(G4double eps, G4double)
{
// Thomas-Fermi FF from Tsai, eq.(3.40) for Z>=5
return 28.340 - 2.*std::log(1. + sqr(3.621*eps) )
- 4.*( 1. - 0.7*std::exp(-8*eps) - 0.3*std::exp(-29.*eps) );
}
inline G4double G4eBremsstrahlungRelModel::Psi1M2(G4double eps, G4double)
{
// Thomas-Fermi FF from Tsai, eq. (3.41) for Z>=5
return 2./(3.*(1. + 40.*eps +400.*eps*eps) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eBremsstrahlungRelModel::SetLPMconstant(G4double val)
{
fLPMconstant = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4eBremsstrahlungRelModel::LPMconstant() const
{
return fLPMconstant;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eCoulombScatteringModel.hh,v 1.20 2007/10/24 10:42:05 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eCoulombScatteringModel.hh,v 1.36 2008/08/04 08:49:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -44,6 +44,7 @@
// 19.08.06 V.Ivanchenko add inline function ScreeningParameter and
// make some members protected
// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
// 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion
//
// Class Description:
//
@@ -74,9 +75,7 @@ class G4eCoulombScatteringModel : public G4VEmModel
public:
G4eCoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi,
G4bool build = false, G4double tlim = TeV*TeV,
const G4String& nam = "eCoulombScattering");
G4eCoulombScatteringModel(const G4String& nam = "eCoulombScattering");
virtual ~G4eCoulombScatteringModel();
@@ -96,48 +95,57 @@ public:
G4double tmin,
G4double maxEnergy);
inline void SetRecoilThreshold(G4double eth);
protected:
G4double ComputeElectronXSectionPerAtom(
const G4ParticleDefinition*,
G4double kinEnergy,
G4double Z,
G4double A,
G4double cut);
G4double CrossSectionPerAtom();
virtual G4double CalculateCrossSectionPerAtom(
const G4ParticleDefinition*,
G4double kinEnergy,
G4double Z, G4double A);
G4double SampleCosineTheta();
inline void DefineMaterial(const G4MaterialCutsCouple*);
inline void SetupParticle(const G4ParticleDefinition*);
inline void SetupKinematic(G4double kinEnergy);
inline void SetupKinematic(G4double kinEnergy, G4double cut);
inline void SetupTarget(G4double Z, G4double A, G4double kinEnergy);
inline void SetupTarget(G4double Z, G4double kinEnergy);
private:
void ComputeMaxElectronScattering(G4double cut);
// hide assignment operator
G4eCoulombScatteringModel & operator=(const G4eCoulombScatteringModel &right);
G4eCoulombScatteringModel(const G4eCoulombScatteringModel&);
protected:
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* thePositron;
G4ParticleTable* theParticleTable;
G4ParticleChangeForGamma* fParticleChange;
G4NistManager* fNistManager;
const G4DataVector* currentCuts;
const G4MaterialCutsCouple* currentCouple;
const G4Material* currentMaterial;
const G4Element* currentElement;
G4int currentMaterialIndex;
G4double coeff;
G4double constn;
G4double cosThetaMin;
G4double cosThetaMax;
G4double cosTetMinNuc;
G4double cosTetMaxNuc;
G4double cosTetMaxNuc2;
G4double cosTetMaxElec;
G4double cosTetMaxElec2;
G4double q2Limit;
G4double recoilThreshold;
G4double elecXSection;
G4double nucXSection;
G4double ecut;
@@ -151,33 +159,39 @@ protected:
G4double tkin;
G4double mom2;
G4double invbeta2;
G4double etag;
G4double lowEnergyLimit;
// target
G4double targetZ;
G4double targetA;
G4double screenZ;
G4double formfactA;
G4int idxelm;
private:
G4PhysicsTable* theCrossSectionTable;
G4double a0;
G4double lowKEnergy;
G4double highKEnergy;
G4double alpha2;
G4double faclim;
G4double FF[100];
G4int nbins;
G4int nmax;
G4int index[100];
G4bool buildTable;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eCoulombScatteringModel::DefineMaterial(const G4MaterialCutsCouple* cup)
{
if(cup != currentCouple) {
currentCouple = cup;
currentMaterial = cup->GetMaterial();
currentMaterialIndex = currentCouple->GetIndex();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4eCoulombScatteringModel::SetupParticle(const G4ParticleDefinition* p)
{
@@ -189,40 +203,71 @@ void G4eCoulombScatteringModel::SetupParticle(const G4ParticleDefinition* p)
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
tkin = 0.0;
lowEnergyLimit = keV*mass/electron_mass_c2;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin)
inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin,
G4double cut)
{
if(ekin != tkin) {
tkin = ekin;
mom2 = tkin*(tkin + 2.0*mass);
if(ekin != tkin || ecut != cut) {
tkin = ekin;
mom2 = tkin*(tkin + 2.0*mass);
invbeta2 = 1.0 + mass*mass/mom2;
}
cosTetMinNuc = cosThetaMin;
cosTetMaxNuc = cosThetaMax;
if(ekin <= 10.*cut && mass < MeV && cosThetaMin < 1.0) {
cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0;
}
ComputeMaxElectronScattering(cut);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double A,
G4double e)
inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e)
{
if(e != tkin || Z != targetZ || A != targetA) {
if(Z != targetZ || e != etag) {
etag = e;
targetZ = Z;
targetA = A;
SetupKinematic(e);
cosTetMaxNuc = std::max(cosThetaMax, 1.0 - 0.5*q2Limit/mom2);
G4double x = fNistManager->GetZ13(Z);
screenZ = a0*x*x*(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2)/mom2;
if(particle == theProton && A < 1.5 && cosTetMaxNuc < 0.0)
cosTetMaxNuc = 0.0;
G4int iz= G4int(Z);
if(iz > 99) iz = 99;
G4double x = fNistManager->GetZ13(iz);
screenZ = a0*x*x/mom2;
if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2);
//screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2;
// A.V. Butkevich et al., NIM A 488 (2002) 282
x = fNistManager->GetLOGA(A);
formfactA = mom2*constn*std::exp(0.54*x);
formfactA = FF[iz];
if(formfactA == 0.0) {
x = fNistManager->GetA27(iz);
formfactA = constn*x*x;
FF[iz] = formfactA;
}
formfactA *= mom2;
cosTetMaxNuc2 = cosTetMaxNuc;
if(particle == theProton && 1 == iz && cosTetMaxNuc2 < 0.0) {
cosTetMaxNuc2 = 0.0;
}
/*
G4double ee = 10.*eV*Z;
if(1 == iz) ee *= 2.0;
G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2
*fNistManager->GetAtomicMassAmu(iz)/mom2);
cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);
*/
cosTetMaxElec2 = cosTetMaxElec;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4eCoulombScatteringModel::SetRecoilThreshold(G4double eth)
{
recoilThreshold = eth;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eIonisation.hh,v 1.35 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eMultipleScattering.hh,v 1.2 2008/03/11 12:03:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
// GEANT4 Class header file
//
// File name: G4eMultipleScattering
//
// Author: Vladimir Ivanchenko
//
// Creation date: 10 March 2001
//
// Modifications:
//
//
//------------------------------------------------------------------------------
//
// class description
//
// The class simulates the multiple scattering for e+ and e-
//
// class description - end
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4eMultipleScattering_h
#define G4eMultipleScattering_h 1
#include "G4VMultipleScattering.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4VMscModel;
class G4eMultipleScattering : public G4VMultipleScattering
{
public: // with description
G4eMultipleScattering(const G4String& processName="msc");
virtual ~G4eMultipleScattering();
// returns true for charged particles, false otherwise
G4bool IsApplicable (const G4ParticleDefinition& p);
// Print few lines of informations about the process: validity range,
void PrintInfo();
// geom. step length distribution should be sampled or not
void Setsamplez(G4bool value) { samplez = value;};
// to reduce the energy/step dependence
void Setdtrl(G4double value) { dtrl = value;};
// 'soften' step limitation above lambdalimit
void SetLambdalimit(G4double value) { lambdalimit = value;};
protected:
// This function initialise models
void InitialiseProcess(const G4ParticleDefinition*);
private: // data members
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
G4bool samplez;
G4bool isInitialized;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eeToTwoGammaModel.hh,v 1.14 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4eplusAnnihilation.hh,v 1.23 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hIonisation.hh,v 1.37 2007/05/23 08:47:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hIonisation.hh,v 1.41 2008/09/14 17:11:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -62,6 +62,7 @@
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
// 12-09-08 Removed CorrectionsAlongStep (VI)
//
// Class Description:
//
@@ -79,8 +80,6 @@
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
#include "G4VEmModel.hh"
#include "G4EmCorrections.hh"
class G4Material;
@@ -101,13 +100,9 @@ public:
// Print out of the class parameters
virtual void PrintInfo();
protected:
void ActivateNuclearStopping(G4bool);
void CorrectionsAlongStep(
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& length);
protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*);
@@ -118,18 +113,12 @@ private:
G4hIonisation & operator=(const G4hIonisation &right);
G4hIonisation(const G4hIonisation&);
G4bool isInitialised;
G4bool nuclearStopping;
G4double mass;
G4double ratio;
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4EmCorrections* corr;
G4bool isInitialised;
G4double eth;
G4double massratio;
G4double eth;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -148,23 +137,15 @@ inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double y = electron_mass_c2/mass;
G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y));
G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4hIonisation::CorrectionsAlongStep(
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& eloss,
G4double& s)
inline void G4hIonisation::ActivateNuclearStopping(G4bool val)
{
G4double kinEnergy = dp->GetKineticEnergy();
if(eloss < kinEnergy && kinEnergy*massratio < eth)
eloss += s*corr->NuclearDEDX(theParticle,couple->GetMaterial(),
kinEnergy - eloss*0.5);
nuclearStopping = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hMultipleScattering.hh,v 1.4 2007/12/07 17:35:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hMultipleScattering.hh,v 1.6 2008/05/09 08:23:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
//
@@ -59,7 +59,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4UrbanMscModel90;
class G4VMscModel;
class G4hMultipleScattering : public G4VMultipleScattering
@@ -85,6 +85,16 @@ public: // with description
// 'soften' step limitation above lambdalimit
void SetLambdalimit(G4double value) { lambdalimit = value;};
// The function overloads the corresponding function of the base
// class.It limits the step near to boundaries only
// and invokes the method GetMscContinuousStepLimit at every step.
G4double AlongStepGetPhysicalInteractionLength(
const G4Track&,
G4double previousStepSize,
G4double currentMinimalStep,
G4double& currentSafety,
G4GPILSelection* selection);
protected:
// This function initialise models
@@ -92,13 +102,14 @@ protected:
private: // data members
G4UrbanMscModel90* mscUrban;
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
G4bool samplez;
G4bool isInitialized;
G4bool isIon;
};
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionGasIonisation.hh,v 1.2 2007/08/13 06:13:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ionGasIonisation.hh,v 1.4 2008/09/12 16:26:34 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -54,8 +54,6 @@
#include "G4ionIonisation.hh"
class G4Material;
class G4ionGasIonisation : public G4ionIonisation
{
public:
@@ -64,47 +62,11 @@ public:
virtual ~G4ionGasIonisation();
virtual void PrintInfo();
protected:
// Initialise process before run
virtual void InitialiseEnergyLossProcess(
const G4ParticleDefinition*,
const G4ParticleDefinition*);
// Initialise dynamic charge before step
virtual void InitialiseMassCharge(const G4Track&);
// Apply correction after step and modify dynamic charge
virtual void CorrectionsAlongStep(
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& length);
private:
// Sample change of charge of the projectile ion
G4double SampleChargeAfterStep(G4double qeff, G4double xeff);
// hide assignment operator
G4ionGasIonisation & operator=(const G4ionGasIonisation &right);
G4ionGasIonisation(const G4ionGasIonisation&);
const G4ParticleDefinition* currParticle;
const G4ParticleDefinition* baseParticle;
G4double basePartMass;
G4double currMassRatio;
G4double atomXS;
G4double preStepKinEnergy;
G4int currentIonZ;
G4int ionZ;
G4bool initialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionIonisation.hh,v 1.50 2007/11/09 11:45:45 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ionIonisation.hh,v 1.56 2008/09/14 17:11:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -56,6 +56,7 @@
// 10-05-06 Add a possibility to download user data (V.Ivantchenko)
// 22-07-06 Remove obsolete method (V.Ivantchenko)
// 07-11-07 Moved CorrectionsAlongStep to cc (V.Ivantchenko)
// 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI)
//
// Class Description:
//
@@ -71,13 +72,9 @@
#define G4ionIonisation_h 1
#include "G4VEnergyLossProcess.hh"
#include "G4ionEffectiveCharge.hh"
#include "G4VEmModel.hh"
#include "G4EmCorrections.hh"
class G4Material;
class G4PhysicsVector;
class G4BraggIonModel;
class G4EmCorrections;
class G4ionIonisation : public G4VEnergyLossProcess
{
@@ -93,7 +90,7 @@ public:
virtual void PrintInfo();
void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
G4PhysicsVector& dVector);
G4PhysicsVector* dVector);
void ActivateStoppingData(G4bool);
@@ -104,13 +101,6 @@ protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*);
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double& eloss,
G4double& length);
inline void InitialiseMassCharge(const G4Track&);
inline G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
@@ -118,33 +108,21 @@ protected:
inline G4bool NuclearStoppingFlag();
// protected pointers
G4ionEffectiveCharge* effCharge;
G4EmCorrections* corr;
private:
// hide assignment operator
G4ionIonisation & operator=(const G4ionIonisation &right);
G4ionIonisation(const G4ionIonisation&);
// cash
const G4Material* curMaterial;
const G4ParticleDefinition* curParticle;
G4EmCorrections* corr;
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4double preKinEnergy;
G4double eth;
G4double eth;
G4double baseMass;
G4double massRatio;
G4double massFactor;
G4double charge2;
G4bool isInitialised;
G4bool stopDataActive;
G4bool nuclearStopping;
G4bool isInitialised;
G4bool stopDataActive;
G4bool nuclearStopping;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -159,23 +137,10 @@ inline G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4ionIonisation::MinPrimaryEnergy(
const G4ParticleDefinition*, const G4Material*, G4double cut)
const G4ParticleDefinition* p, const G4Material*, G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double g = std::sqrt(1. + x);
return proton_mass_c2*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4ionIonisation::InitialiseMassCharge(const G4Track& track)
{
preKinEnergy = track.GetKineticEnergy();
massRatio = baseMass/track.GetDynamicParticle()->GetMass();
charge2 = effCharge->EffectiveChargeSquareRatio(track.GetDefinition(),
track.GetMaterial(),
preKinEnergy);
SetDynamicMassCharge(massRatio, charge2);
return
p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....