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
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4OpAbsorption.cc,v 1.7 2006/06/29 21:08:50 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4OpAbsorption.cc,v 1.9 2008/10/24 19:52:28 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon Absorption Class Implementation
@@ -51,6 +51,8 @@
////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include "G4OpProcessSubType.hh"
#include "G4OpAbsorption.hh"
/////////////////////////
@@ -75,6 +77,8 @@ G4OpAbsorption::G4OpAbsorption(const G4String& processName, G4ProcessType type)
if (verboseLevel>0) {
G4cout << GetProcessName() << " is created " << G4endl;
}
SetProcessSubType(fOpAbsorption);
}
// G4OpAbsorption::G4OpAbsorption(const G4OpAbsorpton &right)
@@ -66,6 +66,8 @@
////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include "G4OpProcessSubType.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4GeometryTolerance.hh"
@@ -93,6 +95,8 @@ G4OpBoundaryProcess::G4OpBoundaryProcess(const G4String& processName,
G4cout << GetProcessName() << " is created " << G4endl;
}
SetProcessSubType(fOpBoundary);
theStatus = Undefined;
theModel = glisur;
theFinish = polished;
@@ -219,9 +223,11 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
Rindex = NULL;
OpticalSurface = NULL;
G4LogicalSurface* Surface = G4LogicalBorderSurface::GetSurface
(pPreStepPoint ->GetPhysicalVolume(),
pPostStepPoint->GetPhysicalVolume());
G4LogicalSurface* Surface = NULL;
Surface = G4LogicalBorderSurface::GetSurface
(pPreStepPoint ->GetPhysicalVolume(),
pPostStepPoint->GetPhysicalVolume());
if (Surface == NULL){
G4bool enteredDaughter=(pPostStepPoint->GetPhysicalVolume()
@@ -248,8 +254,8 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
}
}
// if (Surface) OpticalSurface = dynamic_cast <G4OpticalSurface*> (Surface->GetSurfaceProperty());
if (Surface) OpticalSurface = (G4OpticalSurface*) Surface->GetSurfaceProperty();
if (Surface) OpticalSurface =
dynamic_cast <G4OpticalSurface*> (Surface->GetSurfaceProperty());
if (OpticalSurface) {
@@ -429,6 +435,12 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
DielectricMetal();
// Uncomment the following lines if you wish to have
// Transmission instead of Absorption
// if (theStatus == Absorption) {
// return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
// }
}
else if (type == dielectric_dielectric) {
@@ -578,7 +590,11 @@ void G4OpBoundaryProcess::DielectricMetal()
if( !G4BooleanRand(theReflectivity) && n == 1 ) {
// Comment out DoAbsorption if you wish to have
// Transmission instead of Absorption
DoAbsorption();
theStatus = Absorption;
break;
}
@@ -656,8 +672,8 @@ void G4OpBoundaryProcess::DielectricDielectric()
Swap = !Swap;
Through = false;
theGlobalNormal = -theGlobalNormal;
G4Swap(Material1,Material2);
G4Swap(&Rindex1,&Rindex2);
G4SwapPtr(Material1,Material2);
G4SwapObj(&Rindex1,&Rindex2);
}
if ( theFinish == ground || theFinish == groundbackpainted ) {
@@ -863,8 +879,8 @@ void G4OpBoundaryProcess::DielectricDielectric()
}
else {
Swap = !Swap;
G4Swap(Material1,Material2);
G4Swap(&Rindex1,&Rindex2);
G4SwapPtr(Material1,Material2);
G4SwapObj(&Rindex1,&Rindex2);
}
if ( theFinish == groundbackpainted )
theStatus = LambertianReflection;
+12 -9
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4OpRayleigh.cc,v 1.14 2006/06/29 21:08:54 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4OpRayleigh.cc,v 1.17 2008/10/24 19:51:12 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -56,6 +56,8 @@
////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include "G4OpProcessSubType.hh"
#include "G4OpRayleigh.hh"
/////////////////////////
@@ -77,6 +79,7 @@
G4OpRayleigh::G4OpRayleigh(const G4String& processName, G4ProcessType type)
: G4VDiscreteProcess(processName, type)
{
SetProcessSubType(fOpRayleigh);
thePhysicsTable = 0;
@@ -247,7 +250,7 @@ G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack,
const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
const G4Material* aMaterial = aTrack.GetMaterial();
G4double thePhotonMomentum = aParticle->GetTotalMomentum();
G4double thePhotonEnergy = aParticle->GetTotalEnergy();
G4double AttenuationLength = DBL_MAX;
@@ -257,7 +260,7 @@ G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack,
AttenuationLength =
(*thePhysicsTable)(aMaterial->GetIndex())->
GetValue(thePhotonMomentum, isOutRange);
GetValue(thePhotonEnergy, isOutRange);
}
else {
@@ -269,7 +272,7 @@ G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack,
aMaterialPropertyTable->GetProperty("RAYLEIGH");
if(AttenuationLengthVector){
AttenuationLength = AttenuationLengthVector ->
GetProperty(thePhotonMomentum);
GetProperty(thePhotonEnergy);
}
else{
// G4cout << "No Rayleigh scattering length specified" << G4endl;
@@ -304,7 +307,7 @@ G4OpRayleigh::RayleighAttenuationLengthGenerator(G4MaterialPropertiesTable *aMPT
G4double temp = 283.15*kelvin;
// Retrieve vectors for refraction index
// and photon momentum from the material properties table
// and photon energy from the material properties table
G4MaterialPropertyVector* Rindex = aMPT->GetProperty("RINDEX");
@@ -324,14 +327,14 @@ G4OpRayleigh::RayleighAttenuationLengthGenerator(G4MaterialPropertiesTable *aMPT
while (++(*Rindex)) {
e = (Rindex->GetPhotonMomentum());
e = (Rindex->GetPhotonEnergy());
refraction_index = Rindex->GetProperty();
refsq = refraction_index*refraction_index;
xlambda = h_Planck*c_light/e;
if (verboseLevel>0) {
G4cout << Rindex->GetPhotonMomentum() << " MeV\t";
G4cout << Rindex->GetPhotonEnergy() << " MeV\t";
G4cout << xlambda << " mm\t";
}
@@ -346,7 +349,7 @@ G4OpRayleigh::RayleighAttenuationLengthGenerator(G4MaterialPropertiesTable *aMPT
G4cout << Dist << " mm" << G4endl;
}
RayleighScatteringLengths->
InsertValues(Rindex->GetPhotonMomentum(), Dist);
InsertValues(Rindex->GetPhotonEnergy(), Dist);
}
}
+20 -15
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4OpWLS.cc,v 1.9 2007/10/30 03:53:36 gum Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4OpWLS.cc,v 1.13 2008/10/24 19:50:50 gum Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon WaveLength Shifting (WLS) Class Implementation
@@ -45,6 +45,8 @@
////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include "G4OpProcessSubType.hh"
#include "G4OpWLS.hh"
#include "G4WLSTimeGeneratorProfileDelta.hh"
#include "G4WLSTimeGeneratorProfileExponential.hh"
@@ -60,6 +62,8 @@
G4OpWLS::G4OpWLS(const G4String& processName, G4ProcessType type)
: G4VDiscreteProcess(processName, type)
{
SetProcessSubType(fOpWLS);
theIntegralTable = 0;
if (verboseLevel>0) {
@@ -160,14 +164,14 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
for (G4int i = 0; i < NumPhotons; i++) {
// Determine photon momentum
// Determine photon energy
G4double CIIvalue = G4UniformRand()*CIImax;
G4double sampledMomentum =
G4double sampledEnergy =
WLSIntegral->GetEnergy(CIIvalue);
if (verboseLevel>1) {
G4cout << "sampledMomentum = " << sampledMomentum << G4endl;
G4cout << "sampledEnergy = " << sampledEnergy << G4endl;
G4cout << "CIIvalue = " << CIIvalue << G4endl;
}
@@ -216,7 +220,7 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
photonPolarization.y(),
photonPolarization.z());
aWLSPhoton->SetKineticEnergy(sampledMomentum);
aWLSPhoton->SetKineticEnergy(sampledEnergy);
// Generate new G4Track object:
@@ -229,8 +233,9 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
G4Track* aSecondaryTrack =
new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition);
aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0);
aSecondaryTrack->SetTouchableHandle(aTrack.GetTouchableHandle());
// aSecondaryTrack->SetTouchableHandle((G4VTouchable*)0);
aSecondaryTrack->SetParentID(aTrack.GetTrackID());
@@ -284,7 +289,7 @@ void G4OpWLS::BuildThePhysicsTable()
if (theWLSVector) {
// Retrieve the first intensity point in vector
// of (photon momentum, intensity) pairs
// of (photon energy, intensity) pairs
theWLSVector->ResetIterator();
++(*theWLSVector); // advance to 1st entry
@@ -294,10 +299,10 @@ void G4OpWLS::BuildThePhysicsTable()
if (currentIN >= 0.0) {
// Create first (photon momentum)
// Create first (photon energy)
G4double currentPM = theWLSVector->
GetPhotonMomentum();
GetPhotonEnergy();
G4double currentCII = 0.0;
@@ -310,13 +315,13 @@ void G4OpWLS::BuildThePhysicsTable()
G4double prevCII = currentCII;
G4double prevIN = currentIN;
// loop over all (photon momentum, intensity)
// loop over all (photon energy, intensity)
// pairs stored for this material
while(++(*theWLSVector))
{
currentPM = theWLSVector->
GetPhotonMomentum();
GetPhotonEnergy();
currentIN=theWLSVector->
GetProperty();
@@ -354,7 +359,7 @@ G4double G4OpWLS::GetMeanFreePath(const G4Track& aTrack,
const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
const G4Material* aMaterial = aTrack.GetMaterial();
G4double thePhotonMomentum = aParticle->GetTotalMomentum();
G4double thePhotonEnergy = aParticle->GetTotalEnergy();
G4MaterialPropertiesTable* aMaterialPropertyTable;
G4MaterialPropertyVector* AttenuationLengthVector;
@@ -368,7 +373,7 @@ G4double G4OpWLS::GetMeanFreePath(const G4Track& aTrack,
GetProperty("WLSABSLENGTH");
if ( AttenuationLengthVector ){
AttenuationLength = AttenuationLengthVector->
GetProperty (thePhotonMomentum);
GetProperty (thePhotonEnergy);
}
else {
// G4cout << "No WLS absorption length specified" << G4endl;