Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4Cerenkov.cc,v 1.14 2003/02/12 08:52:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
////////////////////////////////////////////////////////////////////////
// Cerenkov Radiation Class Implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ForwardXrayTR.cc,v 1.9 2003/03/10 11:34:17 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4ForwardXrayTR.cc,v 1.10 2003/06/03 08:11:01 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// G4ForwardXrayTR class -- implementation file
@@ -36,6 +36,7 @@
// 2nd version 17.12.97 V. Grichine
// 17-09-01, migration of Materials to pure STL (mma)
// 10-03-03, migration to "cut per region" (V.Ivanchenko)
// 03.06.03, V.Ivanchenko fix compilation warnings
#include "G4ForwardXrayTR.hh"
@@ -897,7 +898,7 @@ G4ForwardXrayTR::GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const
G4double
G4ForwardXrayTR::GetThetaTR(G4int iMat, G4int jMat, G4int iTkin) const
G4ForwardXrayTR::GetThetaTR(G4int, G4int, G4int) const
{
G4double theta = 0.0 ;
@@ -21,11 +21,11 @@
// ********************************************************************
//
//
// $Id: G4GammaXTRadiator.cc,v 1.1 2002/01/22 15:22:53 grichine Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4GammaXTRadiator.cc,v 1.2 2003/06/16 17:02:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "g4std/complex"
#include <complex>
#include "G4GammaXTRadiator.hh"
#include "Randomize.hh"
@@ -89,19 +89,19 @@ G4GammaXTRadiator::GetStackFactor( G4double energy,
G4complex Ca(1.0+0.5*fPlateThick*Ma/fAlphaPlate,fPlateThick/Za/fAlphaPlate) ;
G4complex Cb(1.0+0.5*fGasThick*Mb/fAlphaGas,fGasThick/Zb/fAlphaGas) ;
G4complex Ha = G4std::pow(Ca,-fAlphaPlate) ;
G4complex Hb = G4std::pow(Cb,-fAlphaGas) ;
G4complex Ha = std::pow(Ca,-fAlphaPlate) ;
G4complex Hb = std::pow(Cb,-fAlphaGas) ;
G4complex H = Ha*Hb ;
G4complex F1 = (1.0 - Ha)*(1.0 - Hb )/(1.0 - H)
* G4double(fPlateNumber) ;
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb/(1.0-H)/(1.0-H)
* (1.0 - G4std::pow(H,fPlateNumber)) ;
* (1.0 - std::pow(H,fPlateNumber)) ;
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
result = 2.0*G4std::real(R) ;
result = 2.0*std::real(R) ;
return result ;
}
@@ -21,11 +21,11 @@
// ********************************************************************
//
//
// $Id: G4RegularXTRadiator.cc,v 1.2 2002/01/18 17:26:21 grichine Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4RegularXTRadiator.cc,v 1.3 2003/06/16 17:02:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "g4std/complex"
#include <complex>
#include "G4RegularXTRadiator.hh"
#include "Randomize.hh"
@@ -91,7 +91,7 @@ G4RegularXTRadiator::GetStackFactor( G4double energy,
G4complex H = Ha*Hb ;
G4complex Hs = G4std::conj(H) ;
G4complex Hs = std::conj(H) ;
D = 1.0 /( (1 - sqrt(Q))*(1 - sqrt(Q)) +
4*sqrt(Q)*sin(0.5*(aZa+bZb))*sin(0.5*(aZa+bZb)) ) ;
@@ -100,11 +100,11 @@ G4RegularXTRadiator::GetStackFactor( G4double energy,
* G4double(fPlateNumber)*D ;
G4complex F2 = (1.0-Ha)*(1.0-Ha)*Hb*(1.0-Hs)*(1.0-Hs)
* (1.0 - G4std::pow(H,fPlateNumber)) * D*D ;
* (1.0 - std::pow(H,fPlateNumber)) * D*D ;
G4complex R = (F1 + F2)*OneInterfaceXTRdEdx(energy,gamma,varAngle) ;
result = 2.0*G4std::real(R) ;
result = 2.0*std::real(R) ;
return result ;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Scintillation.cc,v 1.16 2002/11/26 00:52:13 gum Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4Scintillation.cc,v 1.18 2003/06/16 17:02:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
////////////////////////////////////////////////////////////////////////
// Scintillation Light Class Implementation
@@ -47,6 +47,7 @@
// > change: aSecondaryPosition=x0+rand*aStep.GetDeltaPosition();
// aSecondaryTrack->SetTouchable(0);
// 2001-09-17, migration of Materials to pure STL (mma)
// 2003-06-03, V.Ivanchenko fix compilation warnings
//
// mail: gum@triumf.ca
//
@@ -233,10 +234,10 @@ G4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
G4double YieldRatio = aMaterialPropertiesTable->
GetConstProperty("YIELDRATIO");
if ( ExcitationRatio == 1.0 ) {
Num = G4int (G4std::min(YieldRatio,1.0) * NumPhotons);
Num = G4int (std::min(YieldRatio,1.0) * NumPhotons);
}
else {
Num = G4int (G4std::min(ExcitationRatio,1.0) * NumPhotons);
Num = G4int (std::min(ExcitationRatio,1.0) * NumPhotons);
}
ScintillationTime = aMaterialPropertiesTable->
GetConstProperty("FASTTIMECONSTANT");
@@ -522,7 +523,7 @@ void G4Scintillation::BuildThePhysicsTable()
// will be inserted in the table(s) according to the
// position of the material in the material table.
theFastIntegralTable->insertAt(i,aPhysicsOrderedFreeVector);
theFastIntegralTable->insertAt(i,aPhysicsOrderedFreeVector);
theSlowIntegralTable->insertAt(i,bPhysicsOrderedFreeVector);
}
@@ -532,7 +533,7 @@ void G4Scintillation::BuildThePhysicsTable()
// ---------------
//
G4double G4Scintillation::GetMeanFreePath(const G4Track& aTrack,
G4double G4Scintillation::GetMeanFreePath(const G4Track&,
G4double ,
G4ForceCondition* condition)
{
@@ -546,7 +547,7 @@ G4double G4Scintillation::GetMeanFreePath(const G4Track& aTrack,
// ---------------
//
G4double G4Scintillation::GetMeanLifeTime(const G4Track& aTrack,
G4double G4Scintillation::GetMeanLifeTime(const G4Track&,
G4ForceCondition* condition)
{
*condition = StronglyForced;
@@ -22,7 +22,7 @@
//
//
// $Id: G4TransitionRadiation.cc,v 1.3 2001/07/11 10:03:42 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
// G4TransitionRadiation class -- implementation file
@@ -21,8 +21,15 @@
// ********************************************************************
//
//
// $Id: G4VXTRenergyLoss.cc,v 1.8 2003/03/21 08:01:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VXTRenergyLoss.cc,v 1.11 2003/06/20 15:10:20 grichine Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// History:
// 2001-2002 R&D by V.Grichine
// 19.06.03 V. Grichine, modifications in BuildTable for the integration
// in respect of angle: range is increased, accuracy is
// improved
//
#include "G4Timer.hh"
@@ -65,7 +72,7 @@ G4double G4VXTRenergyLoss::fCofTR = fine_structure_const/pi ;
//
// Constructor, destructor
G4VXTRenergyLoss::G4VXTRenergyLoss(G4LogicalVolume *anEnvelope,
G4VXTRenergyLoss::G4VXTRenergyLoss(G4LogicalVolume *anEnvelope,
G4Material* foilMat,G4Material* gasMat,
G4double a, G4double b,
G4int n,const G4String& processName) :
@@ -84,7 +91,7 @@ G4VXTRenergyLoss::G4VXTRenergyLoss(G4LogicalVolume *anEnvelope,
fPlateThick = a ;
fGasThick = b ;
fTotalDist = fPlateNumber*(fPlateThick+fGasThick) ;
fTotalDist = fPlateNumber*(fPlateThick+fGasThick) ;
G4cout<<"total radiator thickness = "<<fTotalDist/cm<<" cm"<<G4endl ;
// index of plate material
@@ -131,7 +138,7 @@ G4VXTRenergyLoss::~G4VXTRenergyLoss()
{
delete[] fPlatePhotoAbsCof[i] ;
}
delete[] fPlatePhotoAbsCof ;
delete[] fPlatePhotoAbsCof ;
}
///////////////////////////////////////////////////////////////////////////////
@@ -141,7 +148,7 @@ G4VXTRenergyLoss::~G4VXTRenergyLoss()
G4bool G4VXTRenergyLoss::IsApplicable(const G4ParticleDefinition& particle)
{
return ( particle.GetPDGCharge() != 0.0 ) ;
return ( particle.GetPDGCharge() != 0.0 ) ;
}
//////////////////////////////////////////////////////////////////////////////////
@@ -149,8 +156,8 @@ G4bool G4VXTRenergyLoss::IsApplicable(const G4ParticleDefinition& particle)
// GetContinuousStepLimit
//
G4double
G4VXTRenergyLoss::GetContinuousStepLimit(const G4Track& aTrack,
G4double
G4VXTRenergyLoss::GetContinuousStepLimit(const G4Track& ,
G4double ,
G4double ,
G4double& )
@@ -164,7 +171,7 @@ G4VXTRenergyLoss::GetContinuousStepLimit(const G4Track& aTrack,
//
// Build integral energy distribution of XTR photons
void G4VXTRenergyLoss::BuildTable()
void G4VXTRenergyLoss::BuildTable()
{
G4int iTkin, iTR, iPlace ;
G4double radiatorCof = 1.0 ; // for tuning of XTR yield
@@ -196,21 +203,22 @@ void G4VXTRenergyLoss::BuildTable()
fMaxThetaTR = 25.0/(fGamma*fGamma) ; // theta^2
fTheMinAngle = 1.0e-6 ; // was 5.e-6, e-5, e-4
fTheMinAngle = 1.0e-3 ; // was 5.e-6, e-6 !!!, e-5, e-4
if( fMaxThetaTR > fTheMaxAngle ) fMaxThetaTR = fTheMaxAngle ;
else
{
if( fMaxThetaTR < fTheMinAngle ) fMaxThetaTR = fTheMinAngle ;
}
G4PhysicsLinearVector* angleVector = new G4PhysicsLinearVector( 0.0,
fMaxThetaTR,
fBinTR ) ;
G4PhysicsLinearVector* angleVector = new G4PhysicsLinearVector(0.0,
fMaxThetaTR,
fBinTR );
G4double energySum = 0.0 ;
G4double angleSum = 0.0 ;
G4Integrator<G4VXTRenergyLoss,G4double(G4VXTRenergyLoss::*)(G4double)> integral ;
G4Integrator<G4VXTRenergyLoss,G4double(G4VXTRenergyLoss::*)(G4double)> integral;
energyVector->PutValue(fBinTR-1,energySum) ;
angleVector->PutValue(fBinTR-1,angleSum) ;
@@ -499,11 +507,13 @@ G4double G4VXTRenergyLoss::SpectralAngleXTRdEdx(G4double varAngle)
G4double G4VXTRenergyLoss::SpectralXTRdEdx(G4double energy)
{
fEnergy = energy ;
G4Integrator<G4VXTRenergyLoss,G4double(G4VXTRenergyLoss::*)(G4double)> integral ;
G4Integrator<G4VXTRenergyLoss,G4double(G4VXTRenergyLoss::*)(G4double)> integral ;
return integral.Legendre96(this,&G4VXTRenergyLoss::SpectralAngleXTRdEdx,
0.0,0.3*fMaxThetaTR) +
integral.Legendre96(this,&G4VXTRenergyLoss::SpectralAngleXTRdEdx,
0.3*fMaxThetaTR,fMaxThetaTR) ;
0.3*fMaxThetaTR,0.6*fMaxThetaTR) +
integral.Legendre96(this,&G4VXTRenergyLoss::SpectralAngleXTRdEdx,
0.6*fMaxThetaTR,fMaxThetaTR) ;
}
//////////////////////////////////////////////////////////////////////////
@@ -795,8 +805,8 @@ G4double G4VXTRenergyLoss::GetPlateZmuProduct( G4double omega ,
void G4VXTRenergyLoss::GetPlateZmuProduct()
{
G4std::ofstream outPlate("plateZmu.dat", G4std::ios::out ) ;
outPlate.setf( G4std::ios::scientific, G4std::ios::floatfield );
std::ofstream outPlate("plateZmu.dat", std::ios::out ) ;
outPlate.setf( std::ios::scientific, std::ios::floatfield );
G4int i ;
G4double omega, varAngle, gamma ;
@@ -830,8 +840,8 @@ G4double G4VXTRenergyLoss::GetGasZmuProduct( G4double omega ,
void G4VXTRenergyLoss::GetGasZmuProduct()
{
G4std::ofstream outGas("gasZmu.dat", G4std::ios::out ) ;
outGas.setf( G4std::ios::scientific, G4std::ios::floatfield );
std::ofstream outGas("gasZmu.dat", std::ios::out ) ;
outGas.setf( std::ios::scientific, std::ios::floatfield );
G4int i ;
G4double omega, varAngle, gamma ;
gamma = 10000. ;
@@ -933,11 +943,11 @@ void G4VXTRenergyLoss::GetNumberOfPhotons()
G4int iTkin ;
G4double gamma, numberE ;
G4std::ofstream outEn("numberE.dat", G4std::ios::out ) ;
outEn.setf( G4std::ios::scientific, G4std::ios::floatfield );
std::ofstream outEn("numberE.dat", std::ios::out ) ;
outEn.setf( std::ios::scientific, std::ios::floatfield );
G4std::ofstream outAng("numberAng.dat", G4std::ios::out ) ;
outAng.setf( G4std::ios::scientific, G4std::ios::floatfield );
std::ofstream outAng("numberAng.dat", std::ios::out ) ;
outAng.setf( std::ios::scientific, std::ios::floatfield );
for(iTkin=0;iTkin<fTotBin;iTkin++) // Lorentz factor loop
{