Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpAbsorption.cc 88840 2015-03-12 10:31:04Z gcosmo $
// $Id: G4OpAbsorption.cc 106117 2017-09-13 10:23:20Z gcosmo $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon Absorption Class Implementation
@@ -137,7 +137,7 @@ G4double G4OpAbsorption::GetMeanFreePath(const G4Track& aTrack,
if ( aMaterialPropertyTable ) {
AttenuationLengthVector = aMaterialPropertyTable->
GetProperty("ABSLENGTH");
GetProperty(kABSLENGTH);
if ( AttenuationLengthVector ){
AttenuationLength = AttenuationLengthVector->
Value(thePhotonMomentum);
@@ -280,7 +280,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
aMaterialPropertiesTable = Material1->GetMaterialPropertiesTable();
if (aMaterialPropertiesTable) {
Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");
Rindex = aMaterialPropertiesTable->GetProperty(kRINDEX);
}
else {
theStatus = NoRINDEX;
@@ -354,7 +354,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
if (theFinish == polishedbackpainted ||
theFinish == groundbackpainted ) {
Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");
Rindex = aMaterialPropertiesTable->GetProperty(kRINDEX);
if (Rindex) {
Rindex2 = Rindex->Value(thePhotonMomentum);
}
@@ -368,11 +368,11 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
}
PropertyPointer =
aMaterialPropertiesTable->GetProperty("REFLECTIVITY");
aMaterialPropertiesTable->GetProperty(kREFLECTIVITY);
PropertyPointer1 =
aMaterialPropertiesTable->GetProperty("REALRINDEX");
aMaterialPropertiesTable->GetProperty(kREALRINDEX);
PropertyPointer2 =
aMaterialPropertiesTable->GetProperty("IMAGINARYRINDEX");
aMaterialPropertiesTable->GetProperty(kIMAGINARYRINDEX);
iTE = 1;
iTM = 1;
@@ -389,14 +389,14 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
}
PropertyPointer =
aMaterialPropertiesTable->GetProperty("EFFICIENCY");
aMaterialPropertiesTable->GetProperty(kEFFICIENCY);
if (PropertyPointer) {
theEfficiency =
PropertyPointer->Value(thePhotonMomentum);
}
PropertyPointer =
aMaterialPropertiesTable->GetProperty("TRANSMITTANCE");
aMaterialPropertiesTable->GetProperty(kTRANSMITTANCE);
if (PropertyPointer) {
theTransmittance =
PropertyPointer->Value(thePhotonMomentum);
@@ -405,11 +405,11 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
if (aMaterialPropertiesTable->
ConstPropertyExists("SURFACEROUGHNESS"))
theSurfaceRoughness = aMaterialPropertiesTable->
GetConstProperty("SURFACEROUGHNESS");
GetConstProperty(kSURFACEROUGHNESS);
if ( theModel == unified ) {
PropertyPointer =
aMaterialPropertiesTable->GetProperty("SPECULARLOBECONSTANT");
aMaterialPropertiesTable->GetProperty(kSPECULARLOBECONSTANT);
if (PropertyPointer) {
prob_sl =
PropertyPointer->Value(thePhotonMomentum);
@@ -418,7 +418,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
}
PropertyPointer =
aMaterialPropertiesTable->GetProperty("SPECULARSPIKECONSTANT");
aMaterialPropertiesTable->GetProperty(kSPECULARSPIKECONSTANT);
if (PropertyPointer) {
prob_ss =
PropertyPointer->Value(thePhotonMomentum);
@@ -427,7 +427,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
}
PropertyPointer =
aMaterialPropertiesTable->GetProperty("BACKSCATTERCONSTANT");
aMaterialPropertiesTable->GetProperty(kBACKSCATTERCONSTANT);
if (PropertyPointer) {
prob_bs =
PropertyPointer->Value(thePhotonMomentum);
@@ -455,7 +455,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
aMaterialPropertiesTable =
Material2->GetMaterialPropertiesTable();
if (aMaterialPropertiesTable)
Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");
Rindex = aMaterialPropertiesTable->GetProperty(kRINDEX);
if (Rindex) {
Rindex2 = Rindex->Value(thePhotonMomentum);
}
@@ -541,7 +541,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
if ( theStatus == FresnelRefraction || theStatus == Transmission ) {
G4MaterialPropertyVector* groupvel =
Material2->GetMaterialPropertiesTable()->GetProperty("GROUPVEL");
Material2->GetMaterialPropertiesTable()->GetProperty(kGROUPVEL);
G4double finalVelocity = groupvel->Value(thePhotonMomentum);
aParticleChange.ProposeVelocity(finalVelocity);
}
@@ -926,9 +926,9 @@ void G4OpBoundaryProcess::DielectricLUTDAVIS()
G4ThreeVector vNorm = v/v.mag();
G4ThreeVector u = vNorm.cross(theGlobalNormal);
u = u *= (sin(elevation) * cos(azimuth));
v = vNorm *= (sin(elevation) * sin(azimuth));
G4ThreeVector w = theGlobalNormal *= (cos(elevation));
u = u *= (std::sin(elevation) * std::cos(azimuth));
v = vNorm *= (std::sin(elevation) * std::sin(azimuth));
G4ThreeVector w = theGlobalNormal *= (std::cos(elevation));
NewMomentum = G4ThreeVector(u+v+w);
// Rotate Polarization too:
@@ -960,9 +960,9 @@ void G4OpBoundaryProcess::DielectricLUTDAVIS()
G4ThreeVector vNorm = v/v.mag();
G4ThreeVector u = vNorm.cross(theGlobalNormal);
u = u *= (sin(elevation) * cos(azimuth));
v = vNorm *= (sin(elevation) * sin(azimuth));
G4ThreeVector w = theGlobalNormal*=(cos(elevation));
u = u *= (std::sin(elevation) * std::cos(azimuth));
v = vNorm *= (std::sin(elevation) * std::sin(azimuth));
G4ThreeVector w = theGlobalNormal*=(std::cos(elevation));
NewMomentum = G4ThreeVector(u+v+w);
@@ -1341,9 +1341,9 @@ G4double G4OpBoundaryProcess::GetReflectivity(G4double E1_perp,
G4MaterialPropertiesTable* aMaterialPropertiesTable =
Material1->GetMaterialPropertiesTable();
G4MaterialPropertyVector* aPropertyPointerR =
aMaterialPropertiesTable->GetProperty("REALRINDEX");
aMaterialPropertiesTable->GetProperty(kREALRINDEX);
G4MaterialPropertyVector* aPropertyPointerI =
aMaterialPropertiesTable->GetProperty("IMAGINARYRINDEX");
aMaterialPropertiesTable->GetProperty(kIMAGINARYRINDEX);
if (aPropertyPointerR && aPropertyPointerI) {
G4double RRindex = aPropertyPointerR->Value(thePhotonMomentum);
G4double IRindex = aPropertyPointerI->Value(thePhotonMomentum);
+3 -3
View File
@@ -74,11 +74,11 @@ G4OpMieHG::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
aMaterial->GetMaterialPropertiesTable();
G4double forward_g =
aMaterialPropertyTable->GetConstProperty("MIEHG_FORWARD");
aMaterialPropertyTable->GetConstProperty(kMIEHG_FORWARD);
G4double backward_g =
aMaterialPropertyTable->GetConstProperty("MIEHG_BACKWARD");
aMaterialPropertyTable->GetConstProperty(kMIEHG_BACKWARD);
G4double ForwardRatio =
aMaterialPropertyTable->GetConstProperty("MIEHG_FORWARD_RATIO");
aMaterialPropertyTable->GetConstProperty(kMIEHG_FORWARD_RATIO);
if (verboseLevel>0) {
G4cout << "MIE Scattering Photon!" << G4endl;
+5 -5
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpRayleigh.cc 92045 2015-08-14 07:21:23Z gcosmo $
// $Id: G4OpRayleigh.cc 106117 2017-09-13 10:23:20Z gcosmo $
//
//
////////////////////////////////////////////////////////////////////////
@@ -234,7 +234,7 @@ void G4OpRayleigh::BuildPhysicsTable(const G4ParticleDefinition&)
material->GetMaterialPropertiesTable();
G4PhysicsOrderedFreeVector* rayleigh = NULL;
if ( materialProperties != NULL ) {
rayleigh = materialProperties->GetProperty( "RAYLEIGH" );
rayleigh = materialProperties->GetProperty( kRAYLEIGH );
if ( rayleigh == NULL ) rayleigh =
CalculateRayleighMeanFreePaths( material );
}
@@ -278,18 +278,18 @@ G4OpRayleigh::CalculateRayleighMeanFreePaths( const G4Material* material ) const
if ( material->GetName() == "Water" )
betat = 7.658e-23*m3/MeV;
else if(materialProperties->ConstPropertyExists("ISOTHERMAL_COMPRESSIBILITY"))
betat = materialProperties->GetConstProperty("ISOTHERMAL_COMPRESSIBILITY");
betat = materialProperties->GetConstProperty(kISOTHERMAL_COMPRESSIBILITY);
else
return NULL;
// If the material doesn't have a RINDEX property vector then return
G4MaterialPropertyVector* rIndex = materialProperties->GetProperty("RINDEX");
G4MaterialPropertyVector* rIndex = materialProperties->GetProperty(kRINDEX);
if ( rIndex == NULL ) return NULL;
// Retrieve the optional scale factor, (this just scales the scattering length
G4double scaleFactor = 1.0;
if( materialProperties->ConstPropertyExists( "RS_SCALE_FACTOR" ) )
scaleFactor= materialProperties->GetConstProperty("RS_SCALE_FACTOR" );
scaleFactor= materialProperties->GetConstProperty(kRS_SCALE_FACTOR );
// Retrieve the material temperature. For backwards compatibility use a
// constant if the material is "Water"
+6 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpWLS.cc 86052 2014-11-07 08:31:04Z gcosmo $
// $Id: G4OpWLS.cc 106117 2017-09-13 10:23:20Z gcosmo $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon WaveLength Shifting (WLS) Class Implementation
@@ -119,7 +119,7 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
const G4MaterialPropertyVector* WLS_Intensity =
aMaterialPropertiesTable->GetProperty("WLSCOMPONENT");
aMaterialPropertiesTable->GetProperty(kWLSCOMPONENT);
if (!WLS_Intensity)
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
@@ -129,7 +129,7 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
if (aMaterialPropertiesTable->ConstPropertyExists("WLSMEANNUMBERPHOTONS")) {
G4double MeanNumberOfPhotons = aMaterialPropertiesTable->
GetConstProperty("WLSMEANNUMBERPHOTONS");
GetConstProperty(kWLSMEANNUMBERPHOTONS);
NumPhotons = G4int(G4Poisson(MeanNumberOfPhotons));
@@ -158,7 +158,7 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
G4PhysicsOrderedFreeVector* WLSIntegral = 0;
WLSTime = aMaterialPropertiesTable->
GetConstProperty("WLSTIMECONSTANT");
GetConstProperty(kWLSTIMECONSTANT);
WLSIntegral =
(G4PhysicsOrderedFreeVector*)((*theIntegralTable)(materialIndex));
@@ -318,7 +318,7 @@ void G4OpWLS::BuildPhysicsTable(const G4ParticleDefinition&)
if (aMaterialPropertiesTable) {
G4MaterialPropertyVector* theWLSVector =
aMaterialPropertiesTable->GetProperty("WLSCOMPONENT");
aMaterialPropertiesTable->GetProperty(kWLSCOMPONENT);
if (theWLSVector) {
@@ -398,7 +398,7 @@ G4double G4OpWLS::GetMeanFreePath(const G4Track& aTrack,
if ( aMaterialPropertyTable ) {
AttenuationLengthVector = aMaterialPropertyTable->
GetProperty("WLSABSLENGTH");
GetProperty(kWLSABSLENGTH);
if ( AttenuationLengthVector ){
AttenuationLength = AttenuationLengthVector->
Value(thePhotonEnergy);