Import Geant4 4.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:39:52 +02:00
parent 921d3b1cda
commit 330b82b769
4524 changed files with 178689 additions and 43575 deletions
+19 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.32 2001/11/29 16:33:55 gcosmo Exp $
$Id: History,v 1.36 2002/05/06 15:37:54 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,24 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
06.05.02 M.Maire - materials-V04-00-03
Remove the check of the ideal gas state equation
16.04.02 M.Maire - materials-V04-00-02
G4StaticSandiaData: bug fixed in Pb: comma after 15.861
G4Exception put in constructor with chemical formula
22.02.02 M.Maire - materials-V04-00-01
fIndexTable renewed in G4Material, G4Element, G4Isotope.
22.01.02 M.Verderi - materials-V04-00-00
Fixed G4MaterialPropertyVector::AddElement() which wasn't make use
of G4MPVEntry ordering in the G4std::vector<G4MPVEntry*> MPV vector.
This happens since the STL migration (while method "insert" of Rogue-Wave
was taking care about.)
Changes in G4MaterialPropertyVector.hh, G4MaterialPropertyVector.cc
and test/testMaterialPropertyVector.cc
29.11.01 G.Cosmo - materials-V03-02-07
Fixed declaration of ostream attributes to use standard 'fmtflags'
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicShells.hh,v 1.4 2001/07/11 10:01:24 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
// class description
//
+6 -19
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Element.hh,v 1.15 2001/10/17 14:02:15 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4Element.hh,v 1.16 2002/02/26 17:34:34 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// class description
@@ -63,7 +63,8 @@
// 30-03-01, suppression of the warning message in GetElement
// 17-07-01, migration to STL, M. Verderi
// 13-09-01, stl migration. Suppression of the data member fIndexInTable
// 14-09-01, fCountUse: nb of materials which use this element
// 14-09-01, fCountUse: nb of materials which use this element
// 26-02-02, fIndexInTable renewed
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -151,7 +152,7 @@ public: // with description
//the index of this element in the Table:
//
size_t GetIndex() const;
size_t GetIndex() const {return fIndexInTable;};
//return pointer to an element, given its name:
//
@@ -222,6 +223,7 @@ private:
// Set up the static Table of Elements
static G4ElementTable theElementTable;
size_t fIndexInTable;
//
// Derived data members (computed from the basic data members)
@@ -233,19 +235,4 @@ private:
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
size_t G4Element::GetIndex() const
{
// return the index of this Element in theElementTable
//
size_t J=0, Jmax=theElementTable.size();
while ((J<Jmax)&&(theElementTable[J] != this)) J++;
if (J==Jmax) G4Exception("G4Element::GetIndex() Element not in ElementTable");
return J;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4ElementTable.hh,v 1.4 2001/10/17 14:02:15 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4ElementVector.hh,v 1.4 2001/10/17 07:59:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4IonisParamElm.hh,v 1.6 2001/07/11 10:01:25 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
// class description
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4IonisParamMat.hh,v 1.6 2001/07/11 10:01:25 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
// class description
+6 -17
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Isotope.hh,v 1.13 2001/10/17 07:59:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4Isotope.hh,v 1.14 2002/02/26 17:34:34 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,6 +41,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 26.02.02: fIndexInTable renewed
// 14.09.01: fCountUse: nb of elements which use this isotope
// 13.09.01: stl migration. Suppression of the data member fIndexInTable
// 30.03.01: suppression of the warning message in GetIsotope
@@ -92,7 +93,7 @@ class G4Isotope
static
size_t GetNumberOfIsotopes();
size_t GetIndex() const;
size_t GetIndex() const {return fIndexInTable;};
friend
G4std::ostream& operator<<(G4std::ostream&, G4Isotope*);
@@ -124,23 +125,11 @@ class G4Isotope
static
G4IsotopeTable theIsotopeTable;
size_t fIndexInTable; // index in the Isotope table
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
size_t G4Isotope::GetIndex() const
{
// return the index of this isotope in theIsotopeTable
//
size_t J=0, Jmax=theIsotopeTable.size();
while ((J<Jmax)&&(theIsotopeTable[J] != this)) J++;
if (J==Jmax) G4Exception("G4Isotope::GetIndex() Isotope not in IsotopeTable");
return J;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4IsotopeVector.hh,v 1.4 2001/10/17 07:59:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4MPVEntry.hh,v 1.5 2001/07/11 10:01:26 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
////////////////////////////////////////////////////////////////////////
+5 -18
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Material.hh,v 1.19 2001/10/31 12:56:12 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4Material.hh,v 1.20 2002/02/26 17:34:34 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// class description
@@ -74,6 +74,7 @@
// 17-07-01, migration to STL. M. Verderi.
// 14-09-01, Suppression of the data member fIndexInTable
// 31-10-01, new function SetChemicalFormula() (mma)
// 26-02-02, fIndexInTable renewed
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -238,7 +239,7 @@ public: // with description
size_t GetNumberOfMaterials();
//the index of this material in the Table:
size_t GetIndex() const;
size_t GetIndex() const {return fIndexInTable;};
//return pointer to a material, given its name:
static G4Material* GetMaterial(G4String name);
@@ -299,6 +300,7 @@ private:
static
G4MaterialTable theMaterialTable; // the material table
size_t fIndexInTable; // the position in the table
//
// Derived data members (computed from the basic data members)
@@ -343,19 +345,4 @@ G4double G4Material::GetA() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
size_t G4Material::GetIndex() const
{
// return the index of this Material in theMaterialTable
//
size_t J=0, Jmax=theMaterialTable.size();
while ((J<Jmax)&&(theMaterialTable[J] != this)) J++;
if (J==Jmax) G4Exception("G4Material::GetIndex() not in MaterialTable");
return J;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4MaterialPropertiesTable.hh,v 1.10 2001/07/11 10:01:26 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MaterialPropertyVector.hh,v 1.6 2001/07/17 15:54:39 verderi Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4MaterialPropertyVector.hh,v 1.8 2002/01/22 15:23:57 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
////////////////////////////////////////////////////////////////////////
@@ -52,6 +52,7 @@
#include "G4MPVEntry.hh"
#include "g4std/vector"
#include "g4std/functional"
// Class Description:
// A one-to-one mapping from Photon Momentum to some optical property.
@@ -63,6 +64,12 @@
class G4MaterialPropertyVector {
struct MPVEntry_less
: public G4std::binary_function<G4MPVEntry*, G4MPVEntry*, G4bool>
{
G4bool operator()(G4MPVEntry* x, G4MPVEntry* y) { return *x < *y; }
};
public: // Without description
//////////////
@@ -155,7 +162,6 @@ private:
// Private Data Members
/////////////////////////
//G4RWTPtrSortedVector<G4MPVEntry> MPV;
G4std::vector<G4MPVEntry*> MPV;
G4int NumEntries;
G4int CurrentEntry;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4MaterialTable.hh,v 1.4 2001/10/17 14:02:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpticalSurface.hh,v 1.5 2001/07/11 10:01:26 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SandiaTable.hh,v 1.10 2001/10/17 07:59:52 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
// class description
//
@@ -21,12 +21,13 @@
// ********************************************************************
//
//
// $Id: G4StaticSandiaData.hh,v 1.5 2001/07/11 10:01:26 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4StaticSandiaData.hh,v 1.6 2002/04/15 16:50:36 grichine Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
//
// 15.04.02 V.Grichine, bug fixed in Pb: comma after 15.861,
// 09.11.98 simplified public interface; removed mixting stuf. MMA
// 10.06.97 created. V. Grichine
//
@@ -1140,7 +1141,7 @@ const G4double G4SandiaTable::fSandiaTable[981][5] =
{ 3.066, 0.6749E+02, 0.6789E+03, 0.1401E+06, -0.2437E+06 } ,
{ 13.035, -0.7125E+02, 0.7126E+04, 0.2931E+06, -0.2779E+06 } ,
{ 15.2, -0.1363E+03, 0.1992E+05, 0.2721E+06, -0.4887E+06 } ,
{ 15.861 -0.8206E+01, 0.4058E+04, 0.7950E+06, -0.4115E+07 } ,
{ 15.861, -0.8206E+01, 0.4058E+04, 0.7950E+06, -0.4115E+07 } ,
{ 88.004, 0.7595E+01, 0.4692E+04, 0.6429E+07, -0.1747E+09 } ,
{ 500.0, 0.4240E+01, 0.8883E+04, 0.4754E+07, 0.3448E+08 } ,
+1 -1
View File
@@ -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....
+8 -6
View File
@@ -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......
+1 -1
View File
@@ -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....
+1 -1
View File
@@ -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....
+8 -5
View File
@@ -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......
+1 -1
View File
@@ -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 $
//
//
////////////////////////////////////////////////////////////////////////
+44 -95
View File
@@ -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++;
}
+1 -1
View File
@@ -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 $
//
//
////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -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....
//