Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicShells.cc,v 1.3 2001/07/11 10:01:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Element.cc,v 1.14 2001/11/29 15:19:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Element.cc,v 1.15 2002/02/26 17:34:34 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -40,9 +40,10 @@
|
||||
// 16-11-98: name Subshell -> Shell; GetBindingEnergy() (mma)
|
||||
// 09-03-01: assignement operator revised (mma)
|
||||
// 02-05-01: check identical Z in AddIsotope (marc)
|
||||
// 03-05-01; flux.precision(prec) at begin/end of operator<<
|
||||
// 03-05-01: flux.precision(prec) at begin/end of operator<<
|
||||
// 13-09-01: suppression of the data member fIndexInTable
|
||||
// 14-09-01: fCountUse: nb of materials which use this element
|
||||
// 26-02-02: fIndexInTable renewed
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -87,6 +88,7 @@ G4Element::G4Element(const G4String& name, const G4String& symbol,
|
||||
|
||||
// Store in ElementTable
|
||||
theElementTable.push_back(this);
|
||||
fIndexInTable = theElementTable.size() - 1;
|
||||
|
||||
fCountUse = 0; //nb of materials which use this element
|
||||
}
|
||||
@@ -160,6 +162,7 @@ void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance)
|
||||
|
||||
// Store in table
|
||||
theElementTable.push_back(this);
|
||||
fIndexInTable = theElementTable.size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,9 +195,7 @@ G4Element::~G4Element()
|
||||
if (fIonisation) delete fIonisation;
|
||||
|
||||
//remove this element from theElementTable
|
||||
G4ElementTable::iterator iter = theElementTable.begin();
|
||||
while ((iter != theElementTable.end())&&(*iter != this)) iter++;
|
||||
if (iter != theElementTable.end()) theElementTable.erase(iter);
|
||||
theElementTable[fIndexInTable] = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -295,6 +296,7 @@ G4Element::G4Element(G4Element& right)
|
||||
|
||||
// Store this new element in table and set the index
|
||||
theElementTable.push_back(this);
|
||||
fIndexInTable = theElementTable.size() - 1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamElm.cc,v 1.7 2001/07/11 10:01:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamMat.cc,v 1.9 2001/09/13 08:57:46 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Isotope.cc,v 1.11 2001/11/29 15:19:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Isotope.cc,v 1.12 2002/02/26 17:34:34 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// 26.02.02: fIndexInTable renewed
|
||||
// 14.09.01: fCountUse: nb of elements which use this isotope
|
||||
// 13.09.01: suppression of the data member fIndexInTable
|
||||
// 17.07.01: migration to STL. M. Verderi.
|
||||
@@ -56,6 +57,7 @@ G4Isotope::G4Isotope(const G4String& Name, G4int Z, G4int N, G4double A)
|
||||
(" ERROR! Attempt to create an Isotope with N < Z !!!" );
|
||||
|
||||
theIsotopeTable.push_back(this);
|
||||
fIndexInTable = theIsotopeTable.size() - 1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -68,9 +70,7 @@ G4Isotope::~G4Isotope()
|
||||
<< G4endl;
|
||||
|
||||
//remove this isotope from theIsotopeTable
|
||||
G4IsotopeTable::iterator iter = theIsotopeTable.begin();
|
||||
while ((iter != theIsotopeTable.end())&&(*iter != this)) iter++;
|
||||
if (iter != theIsotopeTable.end()) theIsotopeTable.erase(iter);
|
||||
theIsotopeTable[fIndexInTable] = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -81,6 +81,7 @@ G4Isotope::G4Isotope(G4Isotope& right)
|
||||
|
||||
//insert this new isotope in table
|
||||
theIsotopeTable.push_back(this);
|
||||
fIndexInTable = theIsotopeTable.size() - 1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -186,3 +187,5 @@ G4Isotope* G4Isotope::GetIsotope(G4String isotopeName)
|
||||
// the isotope does not exist in the table
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MPVEntry.cc,v 1.6 2001/07/11 10:01:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Material.cc,v 1.18 2001/11/29 15:19:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4Material.cc,v 1.21 2002/05/06 15:37:55 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
@@ -52,6 +52,9 @@
|
||||
// 03-05-01, flux.precision(prec) at begin/end of operator<<
|
||||
// 17-07-01, migration to STL. M. Verderi.
|
||||
// 14-09-01, Suppression of the data member fIndexInTable
|
||||
// 26-02-02, fIndexInTable renewed
|
||||
// 16-04-02, G4Exception put in constructor with chemical formula
|
||||
// 06-05-02, remove the check of the ideal gas state equation
|
||||
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -110,6 +113,7 @@ G4Material::G4Material(const G4String& name, G4double z,
|
||||
|
||||
// Store in the table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
fIndexInTable = theMaterialTable.size() - 1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -159,49 +163,11 @@ G4Material::G4Material(const G4String& name, const G4String& chFormula,
|
||||
G4double z, G4double a, G4double density,
|
||||
G4State state, G4double temp, G4double pressure)
|
||||
:fName(name),fChemicalFormula(chFormula)
|
||||
{
|
||||
G4cout
|
||||
<< "---> warning from G4Material constructor with chemical formula."
|
||||
" This constructor is going to be depreciated.\n"
|
||||
" Use material->SetChemicalFormula(const G4String&)" << G4endl;
|
||||
|
||||
InitializePointers();
|
||||
|
||||
if (density < universe_mean_density)
|
||||
{ G4cerr << "--- Warning from G4Material::G4Material()"
|
||||
<< " define a material with density=0 is not allowed. \n"
|
||||
<< " The material " << name << " will be constructed with the"
|
||||
<< " default minimal density: " << universe_mean_density/(g/cm3)
|
||||
<< "g/cm3" << G4endl;
|
||||
density = universe_mean_density;
|
||||
}
|
||||
|
||||
fDensity = density;
|
||||
fState = state;
|
||||
fTemp = temp;
|
||||
fPressure = pressure;
|
||||
|
||||
// Initialize theElementVector allocating one
|
||||
// element corresponding to this material
|
||||
maxNbComponents = fNumberOfComponents = fNumberOfElements = 1;
|
||||
fImplicitElement = true;
|
||||
theElementVector = new G4ElementVector(1,(G4Element*)0);
|
||||
(*theElementVector)[0] = new G4Element(name, " ", z, a);
|
||||
fMassFractionVector = new G4double[1];
|
||||
fMassFractionVector[0] = 1. ;
|
||||
|
||||
(*theElementVector)[0] -> increaseCountUse();
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
{
|
||||
if (fDensity > kGasThreshold) fState = kStateSolid;
|
||||
else fState = kStateGas;
|
||||
}
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
|
||||
// Store in the table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
{
|
||||
G4Exception
|
||||
("---> from G4Material constructor with chemical formula."
|
||||
" This constructor is depreciated.\n"
|
||||
" Use material->SetChemicalFormula(const G4String&)");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -215,37 +181,10 @@ G4Material::G4Material(const G4String& name, const G4String& chFormula,
|
||||
G4State state, G4double temp, G4double pressure)
|
||||
:fName(name),fChemicalFormula(chFormula)
|
||||
{
|
||||
G4cout
|
||||
<< "---> warning from G4Material constructor with chemical formula."
|
||||
" This constructor is going to be depreciated.\n"
|
||||
" Use material->SetChemicalFormula(const G4String&)" << G4endl;
|
||||
|
||||
InitializePointers();
|
||||
|
||||
if (density < universe_mean_density)
|
||||
{G4cerr << "--- Warning from G4Material::G4Material()"
|
||||
<< " define a material with density=0 is not allowed. \n"
|
||||
<< " The material " << name << " will be constructed with the"
|
||||
<< " default minimal density: " << universe_mean_density/(g/cm3)
|
||||
<< "g/cm3" << G4endl;
|
||||
density = universe_mean_density;
|
||||
}
|
||||
|
||||
fDensity = density;
|
||||
fState = state;
|
||||
fTemp = temp;
|
||||
fPressure = pressure;
|
||||
|
||||
maxNbComponents = nComponents;
|
||||
fNumberOfComponents = fNumberOfElements = 0;
|
||||
fImplicitElement = false;
|
||||
theElementVector = new G4ElementVector(maxNbComponents,(G4Element*)0);
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
{
|
||||
if (fDensity > kGasThreshold) fState = kStateSolid;
|
||||
else fState = kStateGas;
|
||||
}
|
||||
G4Exception
|
||||
("---> from G4Material constructor with chemical formula."
|
||||
" This constructor is depreciated.\n"
|
||||
" Use material->SetChemicalFormula(const G4String&)");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -289,6 +228,7 @@ void G4Material::AddElement(G4Element* element, G4int nAtoms)
|
||||
|
||||
// Store in the static Table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
fIndexInTable = theMaterialTable.size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,6 +284,7 @@ void G4Material::AddElement(G4Element* element, G4double fraction)
|
||||
|
||||
// Store in the static Table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
fIndexInTable = theMaterialTable.size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,6 +347,7 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
|
||||
|
||||
// Store in the static Table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
fIndexInTable = theMaterialTable.size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,22 +372,30 @@ void G4Material::ComputeDerivedQuantities()
|
||||
TotNbOfElectPerVolume += VecNbOfAtomsPerVolume[i]*Zi;
|
||||
}
|
||||
|
||||
//for gas, check coherence of the state conditions
|
||||
if (fState == kStateGas) {
|
||||
G4double ratio = TotNbOfAtomsPerVolume*k_Boltzmann*fTemp/fPressure;
|
||||
if ((ratio<0.1)||(ratio>10.)) {
|
||||
G4cerr << "--warning from G4Material-- The state conditions of the gas: "
|
||||
<< fName << " are not consistent."
|
||||
<< "\n density = " << fDensity/(mg/cm3) << " mg/cm3"
|
||||
<< "\t pressure = " << fPressure/atmosphere << " atmosphere"
|
||||
<< "\t temperature = " << fTemp/kelvin << " kelvin"
|
||||
<< "\n rho*(T/P) would be of the order of: "
|
||||
<< (fDensity/(TotNbOfAtomsPerVolume*k_Boltzmann))
|
||||
/((mg/cm3)*(kelvin/atmosphere))
|
||||
<< " (mg/cm3)*(kelvin/atmosphere)."
|
||||
" The energy loss calculation maybe be affected \n";
|
||||
}
|
||||
}
|
||||
/// //for gas, check coherence of the state conditions
|
||||
/// if (fState == kStateGas) {
|
||||
/// G4int nbAtomsPerMolecule = 1;
|
||||
/// if (fAtomsVector) {
|
||||
/// nbAtomsPerMolecule = 0;
|
||||
/// for (size_t j=0;j<fNumberOfElements;j++)
|
||||
/// nbAtomsPerMolecule += fAtomsVector[j];
|
||||
/// }
|
||||
/// G4double NbOfMoleculesPerVolume = TotNbOfAtomsPerVolume/nbAtomsPerMolecule;
|
||||
///
|
||||
/// G4double ratio = NbOfMoleculesPerVolume*k_Boltzmann*fTemp/fPressure;
|
||||
/// if ((ratio<0.1)||(ratio>10.)) {
|
||||
/// G4cerr << "--warning from G4Material-- The state conditions of the gas: "
|
||||
/// << fName << " are not consistent."
|
||||
/// << "\n density = " << fDensity/(mg/cm3) << " mg/cm3"
|
||||
/// << "\t pressure = " << fPressure/atmosphere << " atmosphere"
|
||||
/// << "\t temperature = " << fTemp/kelvin << " kelvin"
|
||||
/// << "\n rho*(T/P) would be of the order of: "
|
||||
/// << (fDensity/(NbOfMoleculesPerVolume*k_Boltzmann))
|
||||
/// /((mg/cm3)*(kelvin/atmosphere))
|
||||
/// << " (mg/cm3)*(kelvin/atmosphere)."
|
||||
/// " The energy loss calculation maybe be affected \n";
|
||||
/// }
|
||||
/// }
|
||||
|
||||
ComputeRadiationLength();
|
||||
ComputeNuclearInterLength();
|
||||
@@ -533,6 +483,7 @@ G4Material::G4Material(const G4Material& right)
|
||||
|
||||
// Store this new material in the table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
fIndexInTable = theMaterialTable.size() - 1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -551,9 +502,7 @@ G4Material::~G4Material()
|
||||
if (fSandiaTable) delete fSandiaTable;
|
||||
|
||||
//remove this material from theMaterialTable
|
||||
G4MaterialTable::iterator iter = theMaterialTable.begin();
|
||||
while ((iter != theMaterialTable.end())&&(*iter != this)) iter++;
|
||||
if (iter != theMaterialTable.end()) theMaterialTable.erase(iter);
|
||||
theMaterialTable[fIndexInTable] = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.cc,v 1.12 2001/10/17 07:59:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.11 2001/11/28 15:42:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.13 2002/01/22 15:23:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -144,6 +144,7 @@ void G4MaterialPropertyVector::AddElement(G4double aPhotonMomentum,
|
||||
|
||||
newElement = new G4MPVEntry(aPhotonMomentum, aPropertyValue);
|
||||
MPV.push_back(newElement);
|
||||
G4std::sort(MPV.begin(), MPV.end(), MPVEntry_less());
|
||||
NumEntries++;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpticalSurface.cc,v 1.7 2001/10/17 07:59:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SandiaTable.cc,v 1.14 2001/10/17 07:59:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user