Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -16,6 +16,16 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
26th April 2004 Peter Gumplinger (op-V06-01-01)
|
||||
Protect against NULL pointers in G4OpRayleigh.
|
||||
Do not overwrite Rayleigh scattering length
|
||||
for the material named 'Water' if it has been
|
||||
specified by the user through a call to
|
||||
AddProperty("RAYLEIGH"
|
||||
|
||||
21st April 2004 Peter Gumplinger (op-V06-01-00)
|
||||
Assign class members to defaults in DoIt.
|
||||
|
||||
17th March 2004 Peter Gumplinger (op-V06-00-03)
|
||||
Assign all class members in constructor.
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpRayleigh.hh,v 1.6 2001/08/31 16:44:46 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4OpRayleigh.hh,v 1.7 2004/04/27 00:26:34 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -140,6 +140,10 @@ protected:
|
||||
// an energy table (or can be used for other specific
|
||||
// purposes).
|
||||
|
||||
private:
|
||||
|
||||
G4bool DefaultWater;
|
||||
|
||||
};
|
||||
|
||||
////////////////////
|
||||
|
||||
@@ -233,29 +233,49 @@ G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
PropertyPointer =
|
||||
aMaterialPropertiesTable->GetProperty("REFLECTIVITY");
|
||||
if (PropertyPointer) theReflectivity =
|
||||
if (PropertyPointer) {
|
||||
theReflectivity =
|
||||
PropertyPointer->GetProperty(thePhotonMomentum);
|
||||
} else {
|
||||
theReflectivity = 1.0;
|
||||
}
|
||||
|
||||
PropertyPointer =
|
||||
aMaterialPropertiesTable->GetProperty("EFFICIENCY");
|
||||
if (PropertyPointer) theEfficiency =
|
||||
if (PropertyPointer) {
|
||||
theEfficiency =
|
||||
PropertyPointer->GetProperty(thePhotonMomentum);
|
||||
} else {
|
||||
theEfficiency = 0.0;
|
||||
}
|
||||
|
||||
if ( theModel == unified ) {
|
||||
PropertyPointer =
|
||||
aMaterialPropertiesTable->GetProperty("SPECULARLOBECONSTANT");
|
||||
if (PropertyPointer) prob_sl =
|
||||
if (PropertyPointer) {
|
||||
prob_sl =
|
||||
PropertyPointer->GetProperty(thePhotonMomentum);
|
||||
} else {
|
||||
prob_sl = 0.0;
|
||||
}
|
||||
|
||||
PropertyPointer =
|
||||
aMaterialPropertiesTable->GetProperty("SPECULARSPIKECONSTANT");
|
||||
if (PropertyPointer) prob_ss =
|
||||
if (PropertyPointer) {
|
||||
prob_ss =
|
||||
PropertyPointer->GetProperty(thePhotonMomentum);
|
||||
} else {
|
||||
prob_ss = 0.0;
|
||||
}
|
||||
|
||||
PropertyPointer =
|
||||
aMaterialPropertiesTable->GetProperty("BACKSCATTERCONSTANT");
|
||||
if (PropertyPointer) prob_bs =
|
||||
if (PropertyPointer) {
|
||||
prob_bs =
|
||||
PropertyPointer->GetProperty(thePhotonMomentum);
|
||||
} else {
|
||||
prob_bs = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (theFinish == polishedbackpainted ||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpRayleigh.cc,v 1.9 2003/12/01 15:20:05 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4OpRayleigh.cc,v 1.10 2004/04/27 00:27:30 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -76,6 +76,8 @@ G4OpRayleigh::G4OpRayleigh(const G4String& processName)
|
||||
|
||||
thePhysicsTable = 0;
|
||||
|
||||
DefaultWater = false;
|
||||
|
||||
if (verboseLevel>0) {
|
||||
G4cout << GetProcessName() << " is created " << G4endl;
|
||||
}
|
||||
@@ -201,21 +203,34 @@ void G4OpRayleigh::BuildThePhysicsTable()
|
||||
|
||||
for (G4int i=0 ; i < numOfMaterials; i++)
|
||||
{
|
||||
G4PhysicsOrderedFreeVector* ScatteringLengths =
|
||||
G4PhysicsOrderedFreeVector* ScatteringLengths =
|
||||
new G4PhysicsOrderedFreeVector();
|
||||
|
||||
G4MaterialPropertiesTable *aMaterialPropertiesTable =
|
||||
(*theMaterialTable)[i]->GetMaterialPropertiesTable();
|
||||
|
||||
if(aMaterialPropertiesTable){
|
||||
|
||||
G4MaterialPropertyVector* AttenuationLengthVector =
|
||||
aMaterialPropertiesTable->GetProperty("RAYLEIGH");
|
||||
|
||||
if(!AttenuationLengthVector){
|
||||
|
||||
if ((*theMaterialTable)[i]->GetName() == "Water")
|
||||
{
|
||||
G4MaterialPropertiesTable *MaterialPT =
|
||||
(*theMaterialTable)[i]->GetMaterialPropertiesTable();
|
||||
// Call utility routine to Generate
|
||||
// Rayleigh Scattering Lengths
|
||||
ScatteringLengths =
|
||||
RayleighAttenuationLengthGenerator(MaterialPT);
|
||||
}
|
||||
// Call utility routine to Generate
|
||||
// Rayleigh Scattering Lengths
|
||||
|
||||
thePhysicsTable->insertAt(i,ScatteringLengths);
|
||||
}
|
||||
DefaultWater = true;
|
||||
|
||||
ScatteringLengths =
|
||||
RayleighAttenuationLengthGenerator(aMaterialPropertiesTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thePhysicsTable->insertAt(i,ScatteringLengths);
|
||||
}
|
||||
}
|
||||
|
||||
// GetMeanFreePath()
|
||||
@@ -232,7 +247,7 @@ G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack,
|
||||
|
||||
G4double AttenuationLength = DBL_MAX;
|
||||
|
||||
if (aMaterial->GetName() == "Water") {
|
||||
if (aMaterial->GetName() == "Water" && DefaultWater){
|
||||
|
||||
G4bool isOutRange;
|
||||
|
||||
@@ -298,9 +313,12 @@ G4OpRayleigh::RayleighAttenuationLengthGenerator(G4MaterialPropertiesTable *aMPT
|
||||
|
||||
G4PhysicsOrderedFreeVector *RayleighScatteringLengths =
|
||||
new G4PhysicsOrderedFreeVector();
|
||||
Rindex->ResetIterator();
|
||||
|
||||
while (++(*Rindex)) {
|
||||
if (Rindex ) {
|
||||
|
||||
Rindex->ResetIterator();
|
||||
|
||||
while (++(*Rindex)) {
|
||||
|
||||
e = (Rindex->GetPhotonMomentum());
|
||||
|
||||
@@ -325,6 +343,8 @@ G4OpRayleigh::RayleighAttenuationLengthGenerator(G4MaterialPropertiesTable *aMPT
|
||||
}
|
||||
RayleighScatteringLengths->
|
||||
InsertValues(Rindex->GetPhotonMomentum(), Dist);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return RayleighScatteringLengths;
|
||||
|
||||
Reference in New Issue
Block a user