Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
@@ -16,6 +16,16 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
29 October 2020: V.Ivantchenko (emhighenergy-V10-06-02)
- G4hPairProductionModel, G4hBremsstrahlungModel, G4hPairProduction,
G4hBremsstrahlung - added definition of the energy threshold
for creation of a vertex, when energy transfer is above the
threshold (CMS request)
01 September 2020: G.Amadio (emhighenergy-V10-06-01)
- G4hPairProductionModel - inherit ComputeDMicroscopicCrossSection
from G4MuPairProductionModel to avoid code duplication
30 October 2019: I.Semeniouk (emhighenergy-V10-05-06)
- G4GammaConversionToMuons - initialisation of the 5D model cuts size
@@ -64,23 +64,21 @@ public:
explicit G4hBremsstrahlung(const G4String& processName = "hBrems");
virtual ~G4hBremsstrahlung();
~G4hBremsstrahlung() override;
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
G4bool IsApplicable(const G4ParticleDefinition& p) override;
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) override;
private:
void ProcessDescription(std::ostream&) const override;
G4hBremsstrahlung & operator=(const G4hBremsstrahlung &right) = delete;
G4hBremsstrahlung(const G4hBremsstrahlung&) = delete;
protected:
void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) override;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -36,9 +36,6 @@
// Creation date: 28.02.2008
//
// Modifications:
//
//
//
// Class Description:
//
@@ -58,22 +55,19 @@ class G4hBremsstrahlungModel : public G4MuBremsstrahlungModel
public:
explicit G4hBremsstrahlungModel(const G4ParticleDefinition* p = nullptr,
const G4String& nam = "hBrem");
const G4String& nam = "hBrem");
virtual ~G4hBremsstrahlungModel();
protected:
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double gammaEnergy) override;
private:
~G4hBremsstrahlungModel() override;
// hide assignment operator
G4hBremsstrahlungModel &
operator=(const G4hBremsstrahlungModel &right) = delete;
G4hBremsstrahlungModel(const G4hBremsstrahlungModel&) = delete;
protected:
G4double ComputeDMicroscopicCrossSection(G4double tkin, G4double Z,
G4double gammaEnergy) override;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -61,23 +61,21 @@ public:
explicit G4hPairProduction(const G4String& processName = "hPairProd");
virtual ~G4hPairProduction();
~G4hPairProduction() override;
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
G4bool IsApplicable(const G4ParticleDefinition& p) override;
// print description in html
virtual void ProcessDescription(std::ostream&) const override;
void ProcessDescription(std::ostream&) const override;
G4hPairProduction & operator=(const G4hPairProduction &right) = delete;
G4hPairProduction(const G4hPairProduction&) = delete;
protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) override;
private:
G4hPairProduction & operator=(const G4hPairProduction &right) = delete;
G4hPairProduction(const G4hPairProduction&) = delete;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -60,14 +60,7 @@ public:
explicit G4hPairProductionModel(const G4ParticleDefinition* p = nullptr,
const G4String& nam = "hPairProd");
virtual ~G4hPairProductionModel();
protected:
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double pairEnergy) override;
private:
~G4hPairProductionModel() override;
// hide assignment operator
G4hPairProductionModel &
@@ -4,7 +4,7 @@
# Package: Geant4.src.G4processes.G4electromagnetic.G4emhighenergy
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists the sources and headers of the code explicitly.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
@@ -14,35 +14,9 @@
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/muons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4emhighenergy
HEADERS
G4AnnihiToMuPair.hh
@@ -83,6 +83,7 @@ void G4hBremsstrahlung::InitialiseEnergyLossProcess(
G4EmParameters* param = G4EmParameters::Instance();
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
EmModel()->SetSecondaryThreshold(param->MuHadBremsstrahlungTh());
AddEmModel(1, EmModel(), fm);
}
}
@@ -74,28 +74,26 @@ G4double G4hBremsstrahlungModel::ComputeDMicroscopicCrossSection(
{
G4double dxsection = 0.;
if( gammaEnergy > tkin) return dxsection ;
if(gammaEnergy > tkin) return dxsection;
// G4cout << "G4hBremsstrahlungModel m= " << mass
// << " " << particle->GetParticleName() << G4endl;
G4double E = tkin + mass ;
G4double v = gammaEnergy/E ;
G4double delta = 0.5*mass*mass*v/(E-gammaEnergy) ;
G4double delta = 0.5*mass*mass*v/(E-gammaEnergy);
G4double rab0=delta*sqrte ;
G4int iz = G4int(Z);
if(iz < 1) { iz = 1; }
G4int iz = std::max(G4lrint(Z), 1);
G4double z13 = 1.0/nist->GetZ13(iz);
G4double dn = mass*nist->GetA27(iz)/(70.*MeV);
G4double b = btf;
if(1 == iz) b = bh;
G4double b = (1 == iz) ? bh : btf;
// nucleus contribution logarithm
G4double rab1=b*z13;
G4double fn=G4Log(rab1/(dn*(electron_mass_c2+rab0*rab1))*
(mass+delta*(dn*sqrte-2.))) ;
if(fn <0.) fn = 0. ;
fn = std::max(fn, 0.0);
G4double x = 1.0 - v;
if(particle->GetPDGSpin() != 0) { x += 0.75*v*v; }
@@ -87,6 +87,7 @@ void G4hPairProduction::InitialiseEnergyLossProcess(
G4EmParameters* param = G4EmParameters::Instance();
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
EmModel()->SetSecondaryThreshold(param->MuHadBremsstrahlungTh());
AddEmModel(1, EmModel(), fm);
}
}
@@ -48,11 +48,6 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4hPairProductionModel.hh"
#include "G4PhysicalConstants.hh"
#include "G4Log.hh"
#include "G4Exp.hh"
using namespace std;
G4hPairProductionModel::G4hPairProductionModel(const G4ParticleDefinition* p,
const G4String& nam)
@@ -65,114 +60,3 @@ G4hPairProductionModel::~G4hPairProductionModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4hPairProductionModel::ComputeDMicroscopicCrossSection(
G4double tkin,
G4double Z,
G4double pairEnergy)
// differential cross section
{
static const G4double bbbtf= 183. ;
static const G4double bbbh = 202.4 ;
static const G4double g1tf = 1.95e-5 ;
static const G4double g2tf = 5.3e-5 ;
static const G4double g1h = 4.4e-5 ;
static const G4double g2h = 4.8e-5 ;
G4double totalEnergy = tkin + particleMass;
G4double residEnergy = totalEnergy - pairEnergy;
G4double massratio = particleMass/electron_mass_c2 ;
G4double massratio2 = massratio*massratio ;
G4double cross = 0.;
G4double c3 = 0.75*sqrte*particleMass;
if (residEnergy <= c3*z13) { return cross; }
G4double c7 = 4.*CLHEP::electron_mass_c2;
G4double c8 = 6.*particleMass*particleMass;
G4double alf = c7/pairEnergy;
G4double a3 = 1. - alf;
if (a3 <= 0.) { return cross; }
// zeta calculation
G4double bbb,g1,g2;
if( Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
G4double zeta = 0.;
G4double zeta1 =
0.073*G4Log(totalEnergy/(particleMass+g1*z23*totalEnergy))-0.26;
if ( zeta1 > 0.)
{
G4double zeta2 =
0.058*G4Log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14;
zeta = zeta1/zeta2 ;
}
G4double z2 = Z*(Z+zeta);
G4double screen0 = 2.*electron_mass_c2*sqrte*bbb/(z13*pairEnergy);
G4double a0 = totalEnergy*residEnergy;
G4double a1 = pairEnergy*pairEnergy/a0;
G4double bet = 0.5*a1;
G4double xi0 = 0.25*massratio2*a1;
G4double del = c8/a0;
G4double rta3 = sqrt(a3);
G4double tmnexp = alf/(1. + rta3) + del*rta3;
if(tmnexp >= 1.0) { return cross; }
G4double tmn = G4Log(tmnexp);
G4double sum = 0.;
// Gaussian integration in ln(1-ro) ( with 8 points)
for (G4int i=0; i<8; i++)
{
G4double a4 = G4Exp(tmn*xgi[i]); // a4 = (1.-asymmetry)
G4double a5 = a4*(2.-a4) ;
G4double a6 = 1.-a5 ;
G4double a7 = 1.+a6 ;
G4double a9 = 3.+a6 ;
G4double xi = xi0*a5 ;
G4double xii = 1./xi ;
G4double xi1 = 1.+xi ;
G4double screen = screen0*xi1/a5 ;
G4double yeu = 5.-a6+4.*bet*a7 ;
G4double yed = 2.*(1.+3.*bet)*G4Log(3.+xii)-a6-a1*(2.-a6) ;
G4double ye1 = 1.+yeu/yed ;
G4double ale=G4Log(bbb/z13*sqrt(xi1*ye1)/(1.+screen*ye1)) ;
G4double cre = 0.5*G4Log(1.+2.25*z23*xi1*ye1/massratio2) ;
G4double be;
if (xi <= 1.e3) {
be = ((2.+a6)*(1.+bet)+xi*a9)*G4Log(1.+xii)+(a5-bet)/xi1-a9;
} else {
be = (3.-a6+a1*a7)/(2.*xi);
}
G4double fe = (ale-cre)*be;
if ( fe < 0.) { fe = 0.; }
G4double ymu = 4.+a6 +3.*bet*a7 ;
G4double ymd = a7*(1.5+a1)*G4Log(3.+xi)+1.-1.5*a6 ;
G4double ym1 = 1.+ymu/ymd ;
G4double alm_crm = G4Log(bbb*massratio/(1.5*z23*(1.+screen*ym1)));
G4double a10,bm;
if ( xi >= 1.e-3)
{
a10 = (1.+a1)*a5 ;
bm = (a7*(1.+1.5*bet)-a10*xii)*G4Log(xi1)+xi*(a5-bet)/xi1+a10;
} else {
bm = (5.-a6+bet*a9)*(xi/2.);
}
G4double fm = alm_crm*bm;
if ( fm < 0.) { fm = 0.; }
sum += wgi[i]*a4*(fe+fm/massratio2);
}
cross = -tmn*sum*factorForCross*z2*residEnergy/(totalEnergy*pairEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......