Import Geant4 6.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:49:58 +02:00
parent 96686e0c8f
commit 1d812b78b1
4545 changed files with 24433 additions and 175005 deletions
+17
View File
@@ -16,6 +16,23 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
17th March 2004 Peter Gumplinger (op-V06-00-03)
Assign all class members in constructor.
24th February 2004 Gabriele Cosmo (op-V06-00-02)
Added EOL at end of file in G4OpBoundaryProcess.cc to clear
compilation warning in Linux-g++.
19th February 2004 Peter Gumplinger (op-V06-00-01)
Add process status: NotAtBoundary, SameMaterial,
StepTooSmall, NoRINDEX
Allow for a skin-surface between mother and daughter
volumes, with the daughter skin taking precedence.
2nd February 2004 Peter Gumplinger (op-V06-00-00)
Set theStatus = Undefined at start of DoIt
Replace usage of 0 with NULL.
1st December 2003 Peter Gumplinger (op-V05-02-02)
G4OpBoundaryProcess.cc: modified to adopt G4SurfaceProperty.
Requires tag "materials-V05-02-00".
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpAbsorption.hh,v 1.7 2001/08/31 16:43:32 gum Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon Absorption Class Definition
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4OpBoundaryProcess.hh,v 1.8 2002/03/29 01:03:53 gum Exp $
// GEANT4 tag $Name: geant4-06-00 $
// $Id: G4OpBoundaryProcess.hh,v 1.9 2004/02/19 20:41:34 gum Exp $
// GEANT4 tag $Name: geant4-06-01 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -83,7 +83,8 @@ enum G4OpBoundaryProcessStatus { Undefined,
TotalInternalReflection,
LambertianReflection, LobeReflection,
SpikeReflection, BackScattering,
Absorption, Detection };
Absorption, Detection, NotAtBoundary,
SameMaterial, StepTooSmall, NoRINDEX };
class G4OpBoundaryProcess : public G4VDiscreteProcess
{
@@ -364,6 +365,7 @@ void G4OpBoundaryProcess::DoAbsorption()
theStatus = Absorption;
if ( G4BooleanRand(theEfficiency) ) {
// EnergyDeposited =/= 0 means: photon has been detected
theStatus = Detection;
aParticleChange.SetLocalEnergyDeposit(thePhotonMomentum);
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpRayleigh.hh,v 1.6 2001/08/31 16:44:46 gum Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpWLS.hh,v 1.1 2003/09/23 22:23:57 gum Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon WaveLength Shifting (WLS) Class Definition
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpAbsorption.cc,v 1.4 2001/07/11 10:08:22 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon Absorption Class Implementation
@@ -49,6 +49,7 @@
// moved E2_perp, E2_parl and E2_total out of 'if'
// 2003-11-27 - Modified line 168-9 to reflect changes made to
// G4OpticalSurface class ( by Fan Lei)
// 2004-02-02 - Set theStatus = Undefined at start of DoIt
//
// Author: Peter Gumplinger
// adopted from work by Werner Keil - April 2/96
@@ -85,6 +86,13 @@ G4OpBoundaryProcess::G4OpBoundaryProcess(const G4String& processName)
theStatus = Undefined;
theModel = glisur;
theFinish = polished;
theReflectivity = 1.;
theEfficiency = 0.;
prob_sl = 0.;
prob_ss = 0.;
prob_bs = 0.;
}
// G4OpBoundaryProcess::G4OpBoundaryProcess(const G4OpBoundaryProcess &right)
@@ -107,16 +115,22 @@ G4OpBoundaryProcess::~G4OpBoundaryProcess(){}
G4VParticleChange*
G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
{
theStatus = Undefined;
aParticleChange.Initialize(aTrack);
G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
G4StepPoint* pPostStepPoint = aStep.GetPostStepPoint();
if (pPostStepPoint->GetStepStatus() != fGeomBoundary)
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
if (pPostStepPoint->GetStepStatus() != fGeomBoundary){
theStatus = NotAtBoundary;
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
if (aTrack.GetStepLength()<=kCarTolerance/2)
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
if (aTrack.GetStepLength()<=kCarTolerance/2){
theStatus = StepTooSmall;
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
Material1 = pPreStepPoint ->GetPhysicalVolume()->
GetLogicalVolume()->GetMaterial();
@@ -137,6 +151,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");
}
else {
theStatus = NoRINDEX;
aParticleChange.SetStatusChange(fStopAndKill);
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
@@ -145,6 +160,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
Rindex1 = Rindex->GetProperty(thePhotonMomentum);
}
else {
theStatus = NoRINDEX;
aParticleChange.SetStatusChange(fStopAndKill);
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
@@ -154,19 +170,40 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
G4SurfaceType type = dielectric_dielectric;
Rindex = 0;
OpticalSurface = 0;
Rindex = NULL;
OpticalSurface = NULL;
G4LogicalSurface* Surface = G4LogicalBorderSurface::GetSurface
(pPreStepPoint ->GetPhysicalVolume(),
pPostStepPoint->GetPhysicalVolume());
if (Surface == 0) Surface = G4LogicalSkinSurface::GetSurface
(pPreStepPoint->GetPhysicalVolume()->
GetLogicalVolume());
if (Surface == NULL){
G4bool enteredDaughter=(pPostStepPoint->GetPhysicalVolume()
->GetMotherLogical() ==
pPreStepPoint->GetPhysicalVolume()
->GetLogicalVolume());
if(enteredDaughter){
Surface = G4LogicalSkinSurface::GetSurface
(pPostStepPoint->GetPhysicalVolume()->
GetLogicalVolume());
if(Surface == NULL)
Surface = G4LogicalSkinSurface::GetSurface
(pPreStepPoint->GetPhysicalVolume()->
GetLogicalVolume());
}
else{
Surface = G4LogicalSkinSurface::GetSurface
(pPreStepPoint->GetPhysicalVolume()->
GetLogicalVolume());
if(Surface == NULL)
Surface = G4LogicalSkinSurface::GetSurface
(pPostStepPoint->GetPhysicalVolume()->
GetLogicalVolume());
}
}
// if (Surface != 0) OpticalSurface = dynamic_cast <G4OpticalSurface*> (Surface->GetSurfaceProperty());
if (Surface != 0) OpticalSurface = (G4OpticalSurface*) Surface->GetSurfaceProperty();
// if (Surface) OpticalSurface = dynamic_cast <G4OpticalSurface*> (Surface->GetSurfaceProperty());
if (Surface) OpticalSurface = (G4OpticalSurface*) Surface->GetSurfaceProperty();
if (OpticalSurface) {
@@ -181,12 +218,12 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
if (theFinish == polishedbackpainted ||
theFinish == groundbackpainted ) {
Rindex =
aMaterialPropertiesTable->GetProperty("RINDEX");
Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");
if (Rindex) {
Rindex2 = Rindex->GetProperty(thePhotonMomentum);
}
else {
theStatus = NoRINDEX;
aParticleChange.SetStatusChange(fStopAndKill);
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
@@ -231,9 +268,10 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
if (type == dielectric_dielectric ) {
if (theFinish == polished || theFinish == ground ) {
if (Material1 == Material2)
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
if (Material1 == Material2){
theStatus = SameMaterial;
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
aMaterialPropertiesTable =
Material2->GetMaterialPropertiesTable();
if (aMaterialPropertiesTable)
@@ -242,6 +280,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
Rindex2 = Rindex->GetProperty(thePhotonMomentum);
}
else {
theStatus = NoRINDEX;
aParticleChange.SetStatusChange(fStopAndKill);
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
@@ -281,8 +320,6 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
theGlobalNormal = theNavigator->GetLocalToGlobalTransform().
TransformAxis(theLocalNormal);
theStatus = Undefined;
if (type == dielectric_metal) {
DielectricMetal();
@@ -307,7 +344,7 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
}
else {
G4cout << " Error: G4BoundaryProcess: illegal boundary type " << G4endl;
G4cerr << " Error: G4BoundaryProcess: illegal boundary type " << G4endl;
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
@@ -687,3 +724,4 @@ G4double G4OpBoundaryProcess::GetMeanFreePath(const G4Track& ,
return DBL_MAX;
}
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpRayleigh.cc,v 1.9 2003/12/01 15:20:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//
////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpWLS.cc,v 1.2 2003/12/01 15:20:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
////////////////////////////////////////////////////////////////////////
// Optical Photon WaveLength Shifting (WLS) Class Implementation