Import Geant4 3.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.7 2000/11/09 09:38:45 grichine Exp $
|
||||
$Id: History,v 1.18 2001/04/03 14:37:36 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,8 +16,44 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
03.04.01 M.Maire - materials-V03-00-07
|
||||
removed warning to cerr in GetIsotope(name), GetElement(name),
|
||||
and GetMaterial(name).
|
||||
fnulcof added as data member in G4SandiaTable.
|
||||
|
||||
22.03.01 M.Maire - materials-V03-00-06
|
||||
revision of destructor, copy constructor, assignement operator in
|
||||
G4IonisParamElm, G4IonisParamMat, G4Isotope, G4Element, G4Material
|
||||
|
||||
22.02.01 M.Maire - materials-V03-00-05
|
||||
G4SandiaTable : protection added in GetSandiaCofForMaterial(energy)
|
||||
|
||||
Feb 16, 01 M.Maire - materials-V03-00-04
|
||||
G4SandiaTable : major bug in GetSandiaCofPerAtom (units!).
|
||||
redesign of ComputeMatSandiaMatrix.
|
||||
Include materials-V03-00-02
|
||||
|
||||
Feb 05, 01 G.Cosmo - materials-V03-00-03
|
||||
STL migration for G4OrderedTable and G4DataVector.
|
||||
Modified files: G4SandiaTable.cc.
|
||||
NOTE: this tag does not include changes in materials-V03-00-02.
|
||||
|
||||
November 09, 00 V.Grichine - materials-V02-00-01
|
||||
Jan 28, 01 M.Maire - materials-V03-00-02
|
||||
new method G4Material::GetNuclearInterLength()
|
||||
|
||||
Jan 16, 01 V.Ivanchenko - materials-V03-00-01
|
||||
IonisParamElm.cc : excitation potential is tabulated
|
||||
according ICRU Report #37.
|
||||
|
||||
Jan 16, 01 L.Urban - materials-V03-00-00
|
||||
bug fixed in IonisParamMat.cc : E100eV instead of E100keV
|
||||
This bug affected the values of the density correction
|
||||
parameters in the energy loss (dE/dx) computation,
|
||||
its effect was quite big (~ 3-5 % error in dE/dx
|
||||
in the energy range 1 MeV - 50 MeV !!!)
|
||||
|
||||
Nov 09, 00 V.Grichine - materials-V02-00-01
|
||||
included test/ directory which was not tagged.
|
||||
|
||||
August 04, 00 V.Grichine - materials-V02-00-00
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4AtomicShells.hh,v 1.3 1999/12/16 18:11:07 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
|
||||
// class description
|
||||
//
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Element.hh,v 1.5 1999/12/16 18:11:08 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Element.hh,v 1.7 2001/03/30 14:43:15 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -44,6 +44,7 @@
|
||||
// 09-07-98, Ionisation parameters removed from the class, M.Maire
|
||||
// 04-08-98, new method GetElement(elementName), M.Maire
|
||||
// 16-11-98, Subshell -> Shell, mma
|
||||
// 30-03-01, suppression of the warning message in GetElement
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -92,7 +93,7 @@ public: // with description
|
||||
G4double RelativeAbundance); //fraction of nb of
|
||||
//atomes per volume
|
||||
|
||||
~G4Element();
|
||||
virtual ~G4Element();
|
||||
|
||||
//
|
||||
// retrieval methods
|
||||
@@ -145,15 +146,15 @@ public: // with description
|
||||
friend G4std::ostream& operator<<(G4std::ostream&, G4ElementTable);
|
||||
|
||||
public: // without description
|
||||
|
||||
|
||||
G4int operator==(const G4Element&) const;
|
||||
G4int operator!=(const G4Element&) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4Element(G4Element &right);
|
||||
const G4Element & operator=(const G4Element &right);
|
||||
|
||||
G4Element(G4Element&);
|
||||
const G4Element & operator=(const G4Element&);
|
||||
|
||||
private:
|
||||
|
||||
void InitializePointers();
|
||||
@@ -205,8 +206,7 @@ G4Element* G4Element::GetElement(G4String elementName)
|
||||
return theElementTable[J];
|
||||
}
|
||||
|
||||
G4cerr << " Warning from GetElement(name). The element: " << elementName
|
||||
<< " does not exist in the ElementTable. Return NULL pointer \n";
|
||||
// the element does not exist in the table
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ElementTable.hh,v 1.2 1999/12/15 14:50:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ElementVector.hh,v 1.2 1999/12/15 14:50:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamElm.hh,v 1.4 1999/12/16 18:11:08 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4IonisParamElm.hh,v 1.5 2001/03/12 17:48:47 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 09-07-98, data moved from G4Element. M.Maire
|
||||
// 09.03.01: copy constructor and assignement operator in public (mma)
|
||||
// 09.07.98: data moved from G4Element (mma)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -34,7 +35,7 @@ class G4IonisParamElm
|
||||
public: // with description
|
||||
|
||||
G4IonisParamElm(G4double Z);
|
||||
~G4IonisParamElm();
|
||||
virtual ~G4IonisParamElm();
|
||||
|
||||
// retrieval methods
|
||||
|
||||
@@ -60,15 +61,12 @@ public: // with description
|
||||
// shell correction coefficients
|
||||
|
||||
public: // without description
|
||||
|
||||
|
||||
G4IonisParamElm(G4IonisParamElm&);
|
||||
const G4IonisParamElm& operator=(const G4IonisParamElm&);
|
||||
G4int operator==(const G4IonisParamElm&) const;
|
||||
G4int operator!=(const G4IonisParamElm&) const;
|
||||
|
||||
private:
|
||||
|
||||
G4IonisParamElm(G4IonisParamElm&);
|
||||
const G4IonisParamElm& operator=(const G4IonisParamElm&);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -86,7 +84,7 @@ private:
|
||||
G4double fTaul ; // 2*MeV/proton mass
|
||||
G4double fBetheBlochLow; // Bethe-Bloch at fTaul*particle mass
|
||||
G4double fAlow,fBlow,fClow; // parameters for the low energy ion.loss
|
||||
G4double fMeanExcitationEnergy; // 16*pow(Z,0.9)*eV
|
||||
G4double fMeanExcitationEnergy; //
|
||||
G4double* fShellCorrectionVector; // shell correction coefficients
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamMat.hh,v 1.4 1999/12/16 18:11:09 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4IonisParamMat.hh,v 1.5 2001/03/12 17:48:47 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 09-07-98, data moved from G4Material, M.Maire
|
||||
// 09.03.01: copy constructor and assignement operator in public (mma)
|
||||
// 09-07-98: data moved from G4Material (mma)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -36,7 +37,7 @@ class G4IonisParamMat // with description
|
||||
public:
|
||||
|
||||
G4IonisParamMat(G4Material*);
|
||||
~G4IonisParamMat();
|
||||
virtual ~G4IonisParamMat();
|
||||
|
||||
//
|
||||
// retrieval methods
|
||||
@@ -66,15 +67,14 @@ public:
|
||||
G4double GetRateionexcfluct() const {return fRateionexcfluct;};
|
||||
|
||||
public: // without description
|
||||
|
||||
|
||||
G4IonisParamMat(const G4IonisParamMat&);
|
||||
const G4IonisParamMat& operator=(const G4IonisParamMat&);
|
||||
G4int operator==(const G4IonisParamMat&) const;
|
||||
G4int operator!=(const G4IonisParamMat&) const;
|
||||
|
||||
private:
|
||||
|
||||
G4IonisParamMat(const G4IonisParamMat&);
|
||||
const G4IonisParamMat& operator=(const G4IonisParamMat&);
|
||||
|
||||
|
||||
// Compute mean parameters : ExcitationEnergy,Shell corretion vector ...
|
||||
void ComputeMeanParameters();
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Isotope.hh,v 1.4 1999/12/16 18:11:09 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Isotope.hh,v 1.6 2001/03/30 14:43:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// class description
|
||||
//
|
||||
@@ -25,8 +25,9 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 17-01-97, aesthetic rearrangement, M.Maire
|
||||
// 04-08-98, new method GetIsotope(isotopeName), M.Maire
|
||||
// 30.03.01: suppression of the warnig message in GetIsotope
|
||||
// 04.08.98: new method GetIsotope(isotopeName) (mma)
|
||||
// 17.01.97: aesthetic rearrangement (mma)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -53,7 +54,7 @@ class G4Isotope
|
||||
G4int n, //number of nucleons
|
||||
G4double a); //mass of mole
|
||||
|
||||
~G4Isotope();
|
||||
virtual ~G4Isotope();
|
||||
|
||||
// Retrieval methods
|
||||
G4String GetName() const {return fName;};
|
||||
@@ -79,14 +80,14 @@ class G4Isotope
|
||||
|
||||
public: // without description
|
||||
|
||||
G4int operator==(const G4Isotope &right) const;
|
||||
G4int operator!=(const G4Isotope &right) const;
|
||||
|
||||
G4int operator==(const G4Isotope&) const;
|
||||
G4int operator!=(const G4Isotope&) const;
|
||||
|
||||
private:
|
||||
|
||||
G4Isotope(G4Isotope &right);
|
||||
G4Isotope & operator=(const G4Isotope &right);
|
||||
|
||||
|
||||
G4Isotope(G4Isotope&);
|
||||
G4Isotope& operator=(const G4Isotope&);
|
||||
|
||||
private:
|
||||
|
||||
G4String fName; // name of the Isotope
|
||||
@@ -111,8 +112,7 @@ G4Isotope* G4Isotope::GetIsotope(G4String isotopeName)
|
||||
return theIsotopeTable[J];
|
||||
}
|
||||
|
||||
G4cerr << " Warning from GetIsotope(name). The isotope: " << isotopeName
|
||||
<< " does not exist in the IsotopeTable. Return NULL pointer \n";
|
||||
// the isotope does not exist in the table
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IsotopeVector.hh,v 1.2 1999/12/15 14:50:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MPVEntry.hh,v 1.4 1999/11/11 15:36:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Material.hh,v 1.7 1999/12/16 18:11:09 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Material.hh,v 1.10 2001/03/30 14:43:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -14,7 +14,7 @@
|
||||
// Materials defined via the G4Material class are used to define the
|
||||
// composition of Geant volumes.
|
||||
// a Material is always made of Elements. It can be defined directly
|
||||
// from scratch (defined by a single element), specifying :
|
||||
// from scratch (defined by an implicit, single element), specifying :
|
||||
// its name,
|
||||
// density,
|
||||
// state informations,
|
||||
@@ -53,6 +53,8 @@
|
||||
// 05-10-98, change name: NumDensity -> NbOfAtomsPerVolume
|
||||
// 18-11-98, SandiaTable interface modified.
|
||||
// 19-07-99, new data member (chemicalFormula) added by V.Ivanchenko
|
||||
// 12-03-01, G4bool fImplicitElement (mma)
|
||||
// 30-03-01, suppression of the warning message in GetMaterial
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -144,7 +146,7 @@ public: // with description
|
||||
G4double fraction); //fraction of mass
|
||||
|
||||
|
||||
~G4Material();
|
||||
virtual ~G4Material();
|
||||
|
||||
//
|
||||
// retrieval methods
|
||||
@@ -190,6 +192,9 @@ public: // with description
|
||||
// Radiation length:
|
||||
G4double GetRadlen() const {return fRadlen;};
|
||||
|
||||
// Nuclear interaction length:
|
||||
G4double GetNuclearInterLength() const {return fNuclInterLen;};
|
||||
|
||||
// ionisation parameters:
|
||||
G4IonisParamMat* GetIonisation() const {return fIonisation;};
|
||||
|
||||
@@ -242,7 +247,10 @@ private:
|
||||
|
||||
// Compute Radiation length
|
||||
void ComputeRadiationLength();
|
||||
|
||||
|
||||
// Compute Nuclear interaction length
|
||||
void ComputeNuclearInterLength();
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
@@ -263,6 +271,7 @@ private:
|
||||
|
||||
size_t fNumberOfElements; // Number of Elements in the material
|
||||
G4ElementVector* theElementVector; // vector of constituent Elements
|
||||
G4bool fImplicitElement; // implicit Element created by this?
|
||||
G4double* fMassFractionVector; // composition by fractional mass
|
||||
G4int* fAtomsVector; // composition by atom count
|
||||
|
||||
@@ -280,7 +289,8 @@ private:
|
||||
G4double* VecNbOfAtomsPerVolume; // vector of nb of atoms per volume
|
||||
G4double TotNbOfAtomsPerVolume; // total nb of atoms per volume
|
||||
G4double TotNbOfElectPerVolume; // total nb of electrons per volume
|
||||
G4double fRadlen; // Radiation length
|
||||
G4double fRadlen; // Radiation length
|
||||
G4double fNuclInterLen; // Nuclear interaction length
|
||||
|
||||
G4IonisParamMat* fIonisation; // ionisation parameters
|
||||
G4SandiaTable* fSandiaTable; // Sandia table
|
||||
@@ -298,8 +308,7 @@ G4Material* G4Material::GetMaterial(G4String materialName)
|
||||
return theMaterialTable[J];
|
||||
}
|
||||
|
||||
G4cerr << " Warning from GetMaterial(name). The material: " << materialName
|
||||
<< " does not exist in the MaterialTable. Return NULL pointer \n";
|
||||
// the material does not exist in the table
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.hh,v 1.9 2000/03/03 10:21:00 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.hh,v 1.4 1999/11/11 15:36:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialTable.hh,v 1.2 1999/12/15 14:50:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpticalSurface.hh,v 1.4 1999/11/05 21:12:05 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SandiaTable.hh,v 1.6 2000/06/15 17:35:25 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4SandiaTable.hh,v 1.8 2001/04/03 12:32:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
|
||||
// class description
|
||||
//
|
||||
@@ -17,6 +17,9 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
// 03.04.01 fnulcof[4] added; returned if energy < emin
|
||||
// 30.01.01 major bug in the computation of AoverAvo and in the units (/g!)
|
||||
// in GetSandiaCofPerAtom(). mma
|
||||
// 18.11.98 simplified public interface; new methods for materials. mma
|
||||
// 10.06.97 created. V. Grichine
|
||||
//
|
||||
@@ -54,12 +57,34 @@ public: // with description
|
||||
G4double GetSandiaCofForMaterial(G4int,G4int);
|
||||
G4double* GetSandiaCofForMaterial(G4double energy);
|
||||
|
||||
public: // without description
|
||||
|
||||
private:
|
||||
|
||||
void ComputeMatSandiaMatrix();
|
||||
|
||||
private:
|
||||
|
||||
static const G4double fSandiaTable[981][5];
|
||||
static const G4int fNbOfIntervals[101];
|
||||
static G4int fCumulInterval[101];
|
||||
static const G4double fZtoAratio[101];
|
||||
static const G4double fIonizationPotentials[101];
|
||||
|
||||
static G4double fSandiaCofPerAtom[4];
|
||||
|
||||
G4Material* fMaterial;
|
||||
G4int fMatNbOfIntervals;
|
||||
G4OrderedTable* fMatSandiaMatrix;
|
||||
|
||||
G4double fnulcof[4];
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Methods for PAI model
|
||||
|
||||
public: // without description
|
||||
|
||||
inline void SandiaSwap( G4double** da,
|
||||
G4int i,
|
||||
G4int j );
|
||||
@@ -81,28 +106,11 @@ public: // without description
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void ComputeMatSandiaMatrix();
|
||||
|
||||
private:
|
||||
|
||||
static const G4double fSandiaTable[981][5];
|
||||
static const G4int fNbOfIntervals[101];
|
||||
static G4int fCumulInterval[101];
|
||||
static const G4double fZtoAratio[101];
|
||||
static const G4double fIonizationPotentials[101];
|
||||
|
||||
static G4double fSandiaCofPerAtom[4];
|
||||
|
||||
G4Material* fMaterial;
|
||||
G4int fMatNbOfIntervals;
|
||||
G4OrderedTable* fMatSandiaMatrix;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// data members for PAI model
|
||||
|
||||
private:
|
||||
static const G4int fNumberOfElements ;
|
||||
static const G4int fIntervalLimit ;
|
||||
static const G4int fNumberOfIntervals ;
|
||||
@@ -114,6 +122,9 @@ private:
|
||||
// G4OrderedTable*
|
||||
G4int fMaxInterval ;
|
||||
|
||||
//
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
};
|
||||
|
||||
@@ -138,8 +149,8 @@ G4double G4SandiaTable::GetSandiaCofPerAtom(G4int Z, G4int interval, G4int j)
|
||||
|
||||
G4int row = fCumulInterval[Z-1] + interval;
|
||||
if (j==0) return fSandiaTable[row][0]*keV;
|
||||
G4double AoverAvo = Z/(fZtoAratio[Z]*Avogadro*mole);
|
||||
return fSandiaTable[row][j]*AoverAvo*cm2*pow(keV,G4double(j));
|
||||
G4double AoverAvo = Z*amu/fZtoAratio[Z];
|
||||
return AoverAvo*(fSandiaTable[row][j]*cm2*pow(keV,G4double(j))/g);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -148,19 +159,24 @@ inline
|
||||
G4double* G4SandiaTable::GetSandiaCofPerAtom(G4int Z, G4double energy)
|
||||
{
|
||||
assert (Z > 0);
|
||||
|
||||
G4double Emin = fSandiaTable[fCumulInterval[Z-1]][0]*keV;
|
||||
G4double Iopot = fIonizationPotentials[Z]*eV;
|
||||
if (Iopot > Emin) Emin = Iopot;
|
||||
|
||||
G4int interval = fNbOfIntervals[Z] - 1;
|
||||
G4int row = fCumulInterval[Z-1] + interval;
|
||||
while ((interval>0) && (energy<fSandiaTable[row][0]*keV))
|
||||
row = fCumulInterval[Z-1] + --interval;
|
||||
|
||||
if (energy >= fIonizationPotentials[Z]*eV)
|
||||
if (energy >= Emin)
|
||||
{
|
||||
G4double AoverAvo = Z/(fZtoAratio[Z]*Avogadro*mole);
|
||||
G4double AoverAvo = Z*amu/fZtoAratio[Z];
|
||||
|
||||
fSandiaCofPerAtom[0]=fSandiaTable[row][1]*AoverAvo*cm2*keV;
|
||||
fSandiaCofPerAtom[1]=fSandiaTable[row][2]*AoverAvo*cm2*keV*keV;
|
||||
fSandiaCofPerAtom[2]=fSandiaTable[row][3]*AoverAvo*cm2*keV*keV*keV;
|
||||
fSandiaCofPerAtom[3]=fSandiaTable[row][4]*AoverAvo*cm2*keV*keV*keV*keV;
|
||||
fSandiaCofPerAtom[0]=AoverAvo*(fSandiaTable[row][1]*cm2*keV/g);
|
||||
fSandiaCofPerAtom[1]=AoverAvo*(fSandiaTable[row][2]*cm2*keV*keV/g);
|
||||
fSandiaCofPerAtom[2]=AoverAvo*(fSandiaTable[row][3]*cm2*keV*keV*keV/g);
|
||||
fSandiaCofPerAtom[3]=AoverAvo*(fSandiaTable[row][4]*cm2*keV*keV*keV*keV/g);
|
||||
}
|
||||
else
|
||||
fSandiaCofPerAtom[0] = fSandiaCofPerAtom[1] = fSandiaCofPerAtom[2] =
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StaticSandiaData.hh,v 1.4 1999/12/16 18:11:09 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4AtomicShells.cc,v 1.2 1999/12/15 14:50:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
|
||||
@@ -5,27 +5,24 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Element.cc,v 1.3 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Element.cc,v 1.4 2001/03/12 17:48:48 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------ class G4Element ------------
|
||||
//
|
||||
// Torre Wenaus, November 1995
|
||||
//
|
||||
//
|
||||
// 26-06-96, Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban
|
||||
// 09-07-96, new data members added by L.Urban
|
||||
// 17-01-97, aesthetic rearrangement, M.Maire
|
||||
// 20-01-97, Compute Tsai's formula for the rad length, M.Maire
|
||||
// 21-01-97, remove mixture flag, M.Maire
|
||||
// 24-01-97, ComputeIonisationParameters().
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 26-06-96: Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban
|
||||
// 09-07-96: new data members added by L.Urban
|
||||
// 17-01-97: aesthetic rearrangement, M.Maire
|
||||
// 20-01-97: Compute Tsai's formula for the rad length, M.Maire
|
||||
// 21-01-97: remove mixture flag, M.Maire
|
||||
// 24-01-97: ComputeIonisationParameters().
|
||||
// new data member: fTaul, M.Maire
|
||||
// 29-01-97, Forbidden to create Element with Z<1 or N<Z, M.Maire
|
||||
// 20-03-97, corrected initialization of pointers, M.Maire
|
||||
// 28-04-98, atomic subshell binding energies stuff, V. Grichine
|
||||
// 09-07-98, Ionisation parameters removed from the class, M.Maire
|
||||
// 16-11-98, name Subshell -> Shell; GetBindingEnergy(), mma
|
||||
// 29-01-97: Forbidden to create Element with Z<1 or N<Z, M.Maire
|
||||
// 20-03-97: corrected initialization of pointers, M.Maire
|
||||
// 28-04-98: atomic subshell binding energies stuff, V. Grichine
|
||||
// 09-07-98: Ionisation parameters removed from the class, M.Maire
|
||||
// 16-11-98: name Subshell -> Shell; GetBindingEnergy() (mma)
|
||||
// 09-03-01: assignement operator revised (mma)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -162,51 +159,6 @@ G4Element::~G4Element()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4Element::G4Element(G4Element &right)
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
const G4Element& G4Element::operator=(const G4Element& right)
|
||||
{
|
||||
if (this != &right)
|
||||
{
|
||||
fName = right.fName;
|
||||
fSymbol = right.fSymbol;
|
||||
fZeff = right.fZeff;
|
||||
fNeff = right.fNeff;
|
||||
fAeff = right.fAeff;
|
||||
fNbOfAtomicShells = right.fNbOfAtomicShells;
|
||||
fAtomicShells = right.fAtomicShells;
|
||||
fNumberOfIsotopes = right.fNumberOfIsotopes;
|
||||
theIsotopeVector = right.theIsotopeVector;
|
||||
fRelativeAbundanceVector = right.fRelativeAbundanceVector;
|
||||
fIndexInTable = right.fIndexInTable;
|
||||
fCoulomb = right.fCoulomb;
|
||||
fRadTsai = right.fRadTsai;
|
||||
fIonisation = right.fIonisation;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4Element::operator==(const G4Element &right) const
|
||||
{
|
||||
return (this == (G4Element *) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4Element::operator!=(const G4Element &right) const
|
||||
{
|
||||
return (this != (G4Element *) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
void G4Element::ComputeDerivedQuantities()
|
||||
{
|
||||
// some basic functions of the atomic number
|
||||
@@ -215,7 +167,8 @@ void G4Element::ComputeDerivedQuantities()
|
||||
ComputeCoulombFactor();
|
||||
ComputeLradTsaiFactor();
|
||||
|
||||
// parameters for energy loss by ionisation
|
||||
// parameters for energy loss by ionisation
|
||||
if (fIonisation) delete fIonisation;
|
||||
fIonisation = new G4IonisParamElm(fZeff);
|
||||
}
|
||||
|
||||
@@ -266,6 +219,70 @@ G4double G4Element::GetAtomicShell(G4int i) const
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4Element::G4Element(G4Element& right)
|
||||
{
|
||||
InitializePointers();
|
||||
*this = right;
|
||||
|
||||
// Store this new element in table and set the index
|
||||
theElementTable.insert(this);
|
||||
fIndexInTable = theElementTable.index(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
const G4Element& G4Element::operator=(const G4Element& right)
|
||||
{
|
||||
if (this != &right)
|
||||
{
|
||||
fName = right.fName;
|
||||
fSymbol = right.fSymbol;
|
||||
fZeff = right.fZeff;
|
||||
fNeff = right.fNeff;
|
||||
fAeff = right.fAeff;
|
||||
|
||||
if (fAtomicShells) delete [] fAtomicShells;
|
||||
fNbOfAtomicShells = right.fNbOfAtomicShells;
|
||||
fAtomicShells = new G4double[fNbOfAtomicShells];
|
||||
for (G4int i=0;i<fNbOfAtomicShells;i++)
|
||||
fAtomicShells[i] = right.fAtomicShells[i];
|
||||
|
||||
if (theIsotopeVector) delete theIsotopeVector;
|
||||
if (fRelativeAbundanceVector) delete [] fRelativeAbundanceVector;
|
||||
|
||||
fNumberOfIsotopes = right.fNumberOfIsotopes;
|
||||
if (fNumberOfIsotopes > 0)
|
||||
{
|
||||
theIsotopeVector = new G4IsotopeVector(fNumberOfIsotopes);
|
||||
fRelativeAbundanceVector = new G4double[fNumberOfIsotopes];
|
||||
for (G4int i=0;i<fNumberOfIsotopes;i++)
|
||||
{
|
||||
(*theIsotopeVector)[i] = (*right.theIsotopeVector)[i];
|
||||
fRelativeAbundanceVector[i] = right.fRelativeAbundanceVector[i];
|
||||
}
|
||||
}
|
||||
ComputeDerivedQuantities();
|
||||
fIndexInTable = right.fIndexInTable;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4Element::operator==(const G4Element& right) const
|
||||
{
|
||||
return (this == (G4Element*) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4Element::operator!=(const G4Element& right) const
|
||||
{
|
||||
return (this != (G4Element*) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4std::ostream& operator<<(G4std::ostream& flux, G4Element* element)
|
||||
{
|
||||
long mode = flux.setf(G4std::ios::fixed,G4std::ios::floatfield);
|
||||
@@ -307,5 +324,6 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4ElementTable ElementTable)
|
||||
<< G4endl << G4endl;
|
||||
|
||||
return flux;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamElm.cc,v 1.3 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4IonisParamElm.cc,v 1.6 2001/03/12 17:48:48 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------ class G4IonisParamElm ------------
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
// 08-03-01, correct handling of fShellCorrectionVector. M.Maire
|
||||
// 22-11-00, tabulation of ionisation potential from
|
||||
// the ICRU Report N#37. V.Ivanchenko
|
||||
// 09-07-98, data moved from G4Element. M.Maire
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -32,8 +33,29 @@ G4IonisParamElm::G4IonisParamElm(G4double Z)
|
||||
fZZ3 = pow(fZ*(fZ+1.), 1./3.);
|
||||
flogZ3 = log(fZ)/3.;
|
||||
|
||||
// parameters for energy loss by ionisation
|
||||
fMeanExcitationEnergy = 16.*pow(fZ,0.9)*eV;
|
||||
// Parameters for energy loss by ionisation
|
||||
|
||||
// Mean excitation energy
|
||||
// from "Stopping Powers for Electrons and Positrons"
|
||||
// ICRU Report N#37, 1984 (energy in eV)
|
||||
static double exc[100] = {
|
||||
21.8, 20.9, 13.3, 15.9, 15.2, 13.0, 11.7, 11.9, 11.5, 13.7,
|
||||
13.6, 13.0, 12.8, 12.4, 11.5, 11.3, 10.2, 10.4, 10.0, 9.6,
|
||||
10.3, 10.6, 10.7, 10.7, 10.9, 11.0, 11.0, 11.1, 11.1, 11.0,
|
||||
10.8, 10.4, 10.5, 10.2, 9.8, 9.8, 9.8, 9.6, 9.7, 9.8,
|
||||
10.2, 10.1, 10.0, 10.0, 10.0, 10.2, 10.0, 9.8, 10.0, 9.8,
|
||||
9.5, 9.3, 9.3, 8.9, 8.9, 8.8, 8.8, 8.8, 9.1, 9.1,
|
||||
9.2, 9.3, 9.2, 9.2, 9.4, 9.5, 9.7, 9.7, 9.8, 9.8,
|
||||
9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 10.1, 10.0, 10.0,
|
||||
10.0, 10.0, 9.9, 9.9, 9.7, 9.2, 9.5, 9.4, 9.4, 9.4,
|
||||
9.6, 9.7, 9.7, 9.8, 9.8, 9.8, 9.8, 9.9, 9.9, 9.9 };
|
||||
|
||||
G4int iz = (G4int)Z - 1 ;
|
||||
if(0 > iz) iz = 0;
|
||||
if(98 < iz) iz = 98 ;
|
||||
fMeanExcitationEnergy =
|
||||
fZ * (exc[iz] + (fZ - (G4double)(iz))*(exc[iz+1] - exc[iz])) * eV ;
|
||||
|
||||
|
||||
fTau0 = 0.1*fZ3*MeV/proton_mass_c2;
|
||||
fTaul = 2.*MeV/proton_mass_c2;
|
||||
@@ -61,13 +83,15 @@ G4IonisParamElm::G4IonisParamElm(G4double Z)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamElm::~G4IonisParamElm()
|
||||
{ }
|
||||
{
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamElm::G4IonisParamElm(G4IonisParamElm& right)
|
||||
{
|
||||
*this = right;
|
||||
*this = right;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -87,21 +111,27 @@ const G4IonisParamElm& G4IonisParamElm::operator=(const G4IonisParamElm& right)
|
||||
fBlow = right.fBlow;
|
||||
fClow = right.fClow;
|
||||
fMeanExcitationEnergy = right.fMeanExcitationEnergy;
|
||||
fShellCorrectionVector = right.fShellCorrectionVector;
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
fShellCorrectionVector = new G4double[3];
|
||||
fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
|
||||
fShellCorrectionVector[1] = right.fShellCorrectionVector[1];
|
||||
fShellCorrectionVector[2] = right.fShellCorrectionVector[2];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4IonisParamElm::operator==(const G4IonisParamElm &right) const
|
||||
G4int G4IonisParamElm::operator==(const G4IonisParamElm& right) const
|
||||
{
|
||||
return (this == (G4IonisParamElm *) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4IonisParamElm::operator!=(const G4IonisParamElm &right) const
|
||||
G4int G4IonisParamElm::operator!=(const G4IonisParamElm& right) const
|
||||
{
|
||||
return (this != (G4IonisParamElm *) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamMat.cc,v 1.3 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4IonisParamMat.cc,v 1.6 2001/03/12 17:48:48 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 08-02-01, fShellCorrectionVector correctly handled (mma)
|
||||
// 16-01-01, bug corrected in ComputeDensityEffect() E100eV (L.Urban)
|
||||
// 18-07-98, bug corrected in ComputeDensityEffect() for gas
|
||||
// 09-07-98, data moved from G4Material, M.Maire
|
||||
|
||||
@@ -46,7 +48,6 @@ void G4IonisParamMat::ComputeMeanParameters()
|
||||
|
||||
fLogMeanExcEnergy /= fMaterial->GetTotNbOfElectPerVolume();
|
||||
fMeanExcitationEnergy = exp(fLogMeanExcEnergy);
|
||||
|
||||
fShellCorrectionVector = new G4double[3];
|
||||
|
||||
for (G4int j=0; j<=2; j++)
|
||||
@@ -84,12 +85,12 @@ void G4IonisParamMat::ComputeDensityEffect()
|
||||
|
||||
if ((State == kStateSolid)||(State == kStateLiquid)) {
|
||||
|
||||
const G4double E100keV = 100.*keV;
|
||||
const G4double E100eV = 100.*eV;
|
||||
const G4double ClimiS[] = {3.681 , 5.215 };
|
||||
const G4double X0valS[] = {1.0 , 1.5 };
|
||||
const G4double X1valS[] = {2.0 , 3.0 };
|
||||
|
||||
if(fMeanExcitationEnergy < E100keV) icase = 0 ;
|
||||
if(fMeanExcitationEnergy < E100eV) icase = 0 ;
|
||||
else icase = 1 ;
|
||||
|
||||
if(fCdensity < ClimiS[icase]) fX0density = 0.2;
|
||||
@@ -176,13 +177,15 @@ void G4IonisParamMat::ComputeFluctModel()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamMat::~G4IonisParamMat()
|
||||
{ }
|
||||
{
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamMat::G4IonisParamMat(const G4IonisParamMat &right)
|
||||
G4IonisParamMat::G4IonisParamMat(const G4IonisParamMat& right)
|
||||
{
|
||||
*this = right;
|
||||
*this = right;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -191,40 +194,44 @@ const G4IonisParamMat& G4IonisParamMat::operator=(const G4IonisParamMat& right)
|
||||
{
|
||||
if (this != &right)
|
||||
{
|
||||
fMaterial = right.fMaterial;
|
||||
fMeanExcitationEnergy = right.fMeanExcitationEnergy;
|
||||
fLogMeanExcEnergy = right.fLogMeanExcEnergy;
|
||||
fShellCorrectionVector = right.fShellCorrectionVector;
|
||||
fTaul = right.fTaul;
|
||||
fCdensity = right.fCdensity;
|
||||
fMdensity = right.fMdensity;
|
||||
fAdensity = right.fAdensity;
|
||||
fX0density = right.fX0density;
|
||||
fX1density = right.fX1density;
|
||||
fF1fluct = right.fF1fluct;
|
||||
fF2fluct = right.fF2fluct;
|
||||
fEnergy1fluct = right.fEnergy1fluct;
|
||||
fLogEnergy1fluct = right.fLogEnergy1fluct;
|
||||
fEnergy2fluct = right.fEnergy2fluct;
|
||||
fLogEnergy2fluct = right.fLogEnergy2fluct;
|
||||
fEnergy0fluct = right.fEnergy0fluct;
|
||||
fRateionexcfluct = right.fRateionexcfluct;
|
||||
fMaterial = right.fMaterial;
|
||||
fMeanExcitationEnergy = right.fMeanExcitationEnergy;
|
||||
fLogMeanExcEnergy = right.fLogMeanExcEnergy;
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
fShellCorrectionVector = new G4double[3];
|
||||
fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
|
||||
fShellCorrectionVector[1] = right.fShellCorrectionVector[1];
|
||||
fShellCorrectionVector[2] = right.fShellCorrectionVector[2];
|
||||
fTaul = right.fTaul;
|
||||
fCdensity = right.fCdensity;
|
||||
fMdensity = right.fMdensity;
|
||||
fAdensity = right.fAdensity;
|
||||
fX0density = right.fX0density;
|
||||
fX1density = right.fX1density;
|
||||
fF1fluct = right.fF1fluct;
|
||||
fF2fluct = right.fF2fluct;
|
||||
fEnergy1fluct = right.fEnergy1fluct;
|
||||
fLogEnergy1fluct = right.fLogEnergy1fluct;
|
||||
fEnergy2fluct = right.fEnergy2fluct;
|
||||
fLogEnergy2fluct = right.fLogEnergy2fluct;
|
||||
fEnergy0fluct = right.fEnergy0fluct;
|
||||
fRateionexcfluct = right.fRateionexcfluct;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4IonisParamMat::operator==(const G4IonisParamMat &right) const
|
||||
G4int G4IonisParamMat::operator==(const G4IonisParamMat& right) const
|
||||
{
|
||||
return (this == (G4IonisParamMat *) &right);
|
||||
return (this == (G4IonisParamMat*) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4int G4IonisParamMat::operator!=(const G4IonisParamMat &right) const
|
||||
G4int G4IonisParamMat::operator!=(const G4IonisParamMat& right) const
|
||||
{
|
||||
return (this != (G4IonisParamMat *) &right);
|
||||
return (this != (G4IonisParamMat*) &right);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -5,24 +5,13 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Isotope.cc,v 1.2 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD Group
|
||||
//
|
||||
// ---------- class G4Isotope ---------
|
||||
//
|
||||
// Torre Wenaus, November 1995
|
||||
// $Id: G4Isotope.cc,v 1.3 2001/03/12 17:48:49 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// 26-06-96, Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban
|
||||
// 29-01-97, Forbidden to create Isotope with Z<1 or N<Z, M.Maire
|
||||
// 29-01-97: Forbidden to create Isotope with Z<1 or N<Z, M.Maire
|
||||
// 26-06-96: Code uses operators (+=, *=, ++, -> etc.) correctly, P. Urban
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -53,14 +42,18 @@ G4Isotope::~G4Isotope() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4Isotope::G4Isotope(G4Isotope &right)
|
||||
G4Isotope::G4Isotope(G4Isotope& right)
|
||||
{
|
||||
*this = right;
|
||||
*this = right;
|
||||
|
||||
//insert this new isotope in table
|
||||
theIsotopeTable.insert(this);
|
||||
fIndexInTable = theIsotopeTable.index(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4Isotope & G4Isotope::operator=(const G4Isotope &right)
|
||||
G4Isotope & G4Isotope::operator=(const G4Isotope& right)
|
||||
{
|
||||
if (this != &right)
|
||||
{
|
||||
@@ -68,8 +61,7 @@ G4Isotope & G4Isotope::operator=(const G4Isotope &right)
|
||||
fZ = right.fZ;
|
||||
fN = right.fZ;
|
||||
fA = right.fA;
|
||||
theIsotopeTable = right.theIsotopeTable;
|
||||
fIndexInTable = right.fIndexInTable;
|
||||
fIndexInTable = theIsotopeTable.index(this);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -125,4 +117,6 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4IsotopeTable IsotopeTable)
|
||||
for (G4int i=0; i<IsotopeTable.length(); i++) flux << IsotopeTable[i] << G4endl;
|
||||
|
||||
return flux;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MPVEntry.cc,v 1.5 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,13 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Material.cc,v 1.6 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ---------- class G4Material ----------
|
||||
//
|
||||
// Torre Wenaus, November 1995
|
||||
// $Id: G4Material.cc,v 1.8 2001/03/12 17:48:49 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
@@ -35,6 +30,9 @@
|
||||
// 18-11-98, new interface to SandiaTable
|
||||
// 19-01-99 enlarge tolerance on test of coherence of gas conditions
|
||||
// 19-07-99, Constructors with chemicalFormula added by V.Ivanchenko
|
||||
// 16-01-01, Nuclear interaction length, M.Maire
|
||||
// 12-03-01, G4bool fImplicitElement;
|
||||
// copy constructor and assignement operator revised (mma)
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -73,7 +71,8 @@ G4Material::G4Material(const G4String& name, G4double z,
|
||||
|
||||
// Initialize theElementVector allocating one
|
||||
// element corresponding to this material
|
||||
maxNbComponents = fNumberOfComponents = fNumberOfElements = 1;
|
||||
maxNbComponents = fNumberOfComponents = fNumberOfElements = 1;
|
||||
fImplicitElement = true;
|
||||
theElementVector = new G4ElementVector(1);
|
||||
theElementVector[0] = new G4Element(name, " ", z, a);
|
||||
fMassFractionVector = new G4double[1];
|
||||
@@ -121,6 +120,7 @@ G4Material::G4Material(const G4String& name, G4double density, G4int nComponents
|
||||
|
||||
maxNbComponents = nComponents;
|
||||
fNumberOfComponents = fNumberOfElements = 0;
|
||||
fImplicitElement = false;
|
||||
theElementVector = new G4ElementVector(maxNbComponents);
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
@@ -157,7 +157,8 @@ G4Material::G4Material(const G4String& name, const G4String& chFormula,
|
||||
|
||||
// Initialize theElementVector allocating one
|
||||
// element corresponding to this material
|
||||
maxNbComponents = fNumberOfComponents = fNumberOfElements = 1;
|
||||
maxNbComponents = fNumberOfComponents = fNumberOfElements = 1;
|
||||
fImplicitElement = true;
|
||||
theElementVector = new G4ElementVector(1);
|
||||
theElementVector[0] = new G4Element(name, " ", z, a);
|
||||
fMassFractionVector = new G4double[1];
|
||||
@@ -206,6 +207,7 @@ G4Material::G4Material(const G4String& name, const G4String& chFormula,
|
||||
|
||||
maxNbComponents = nComponents;
|
||||
fNumberOfComponents = fNumberOfElements = 0;
|
||||
fImplicitElement = false;
|
||||
theElementVector = new G4ElementVector(maxNbComponents);
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
@@ -381,6 +383,7 @@ void G4Material::ComputeDerivedQuantities()
|
||||
// Atoms density vector, Electrons density
|
||||
G4double Zi, Ai;
|
||||
TotNbOfAtomsPerVolume = 0.;
|
||||
if (VecNbOfAtomsPerVolume) delete [] VecNbOfAtomsPerVolume;
|
||||
VecNbOfAtomsPerVolume = new G4double[fNumberOfElements];
|
||||
TotNbOfElectPerVolume = 0.;
|
||||
for (G4int i=0;i<fNumberOfElements;i++) {
|
||||
@@ -407,8 +410,11 @@ void G4Material::ComputeDerivedQuantities()
|
||||
}
|
||||
|
||||
ComputeRadiationLength();
|
||||
ComputeNuclearInterLength();
|
||||
|
||||
if (fIonisation) delete fIonisation;
|
||||
fIonisation = new G4IonisParamMat(this);
|
||||
if (fSandiaTable) delete fSandiaTable;
|
||||
fSandiaTable = new G4SandiaTable(this);
|
||||
}
|
||||
|
||||
@@ -425,6 +431,20 @@ void G4Material::ComputeRadiationLength()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
void G4Material::ComputeNuclearInterLength()
|
||||
{
|
||||
const G4double lambda0 = 35*g/cm2;
|
||||
G4double NILinv = 0.0;
|
||||
for (G4int i=0;i<fNumberOfElements;i++) {
|
||||
NILinv +=
|
||||
VecNbOfAtomsPerVolume[i]*pow(((*theElementVector)[i]->GetN()),2./3.);
|
||||
}
|
||||
NILinv *= amu/lambda0;
|
||||
fNuclInterLen = (NILinv <= 0.0 ? DBL_MAX : 1./NILinv);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
void G4Material::InitializePointers()
|
||||
{
|
||||
theElementVector = NULL;
|
||||
@@ -441,6 +461,7 @@ void G4Material::InitializePointers()
|
||||
|
||||
G4Material::~G4Material()
|
||||
{
|
||||
if (fImplicitElement) delete ((*theElementVector)[0]);
|
||||
if (theElementVector) delete theElementVector;
|
||||
if (fMassFractionVector) delete [] fMassFractionVector;
|
||||
if (fAtomsVector) delete [] fAtomsVector;
|
||||
@@ -453,7 +474,12 @@ G4Material::~G4Material()
|
||||
|
||||
G4Material::G4Material(const G4Material& right)
|
||||
{
|
||||
InitializePointers();
|
||||
*this = right;
|
||||
|
||||
// Store this new material in the table of Materials
|
||||
theMaterialTable.insert(this);
|
||||
fIndexInTable = theMaterialTable.index(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -468,20 +494,43 @@ const G4Material& G4Material::operator=(const G4Material& right)
|
||||
fState = right.fState;
|
||||
fTemp = right.fTemp;
|
||||
fPressure = right.fPressure;
|
||||
|
||||
if (fImplicitElement) delete ((*theElementVector)[0]);
|
||||
if (theElementVector) delete theElementVector;
|
||||
if (fMassFractionVector) delete [] fMassFractionVector;
|
||||
if (fAtomsVector) delete [] fAtomsVector;
|
||||
|
||||
maxNbComponents = right.maxNbComponents;
|
||||
fNumberOfComponents = right.fNumberOfComponents;
|
||||
fNumberOfElements = right.fNumberOfElements;
|
||||
theElementVector = right.theElementVector;
|
||||
fMassFractionVector = right.fMassFractionVector;
|
||||
fAtomsVector = right.fAtomsVector;
|
||||
fNumberOfElements = right.fNumberOfElements;
|
||||
fImplicitElement = right.fImplicitElement;
|
||||
|
||||
if (fImplicitElement) {
|
||||
G4double z = (*right.theElementVector)[0]->GetZ();
|
||||
G4double a = (*right.theElementVector)[0]->GetA();
|
||||
theElementVector = new G4ElementVector(1);
|
||||
theElementVector[0] = new G4Element(fName," ",z,a);
|
||||
fMassFractionVector = new G4double[1];
|
||||
fMassFractionVector[0] = 1.;
|
||||
} else {
|
||||
theElementVector = new G4ElementVector(fNumberOfElements);
|
||||
fMassFractionVector = new G4double[fNumberOfElements];
|
||||
for (G4int i=0; i<fNumberOfElements; i++) {
|
||||
(*theElementVector)[i]= (*right.theElementVector)[i];
|
||||
fMassFractionVector[i]= right.fMassFractionVector[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (right.fAtomsVector) {
|
||||
fAtomsVector = new G4int[fNumberOfElements];
|
||||
for (G4int i=0; i<fNumberOfElements; i++)
|
||||
fAtomsVector[i] = right.fAtomsVector[i];
|
||||
}
|
||||
|
||||
fMaterialPropertiesTable = right.fMaterialPropertiesTable;
|
||||
fIndexInTable = right.fIndexInTable;
|
||||
VecNbOfAtomsPerVolume = right.VecNbOfAtomsPerVolume;
|
||||
TotNbOfAtomsPerVolume = right.TotNbOfAtomsPerVolume;
|
||||
TotNbOfElectPerVolume = right.TotNbOfElectPerVolume;
|
||||
fRadlen = right.fRadlen;
|
||||
fIonisation = right.fIonisation;
|
||||
fSandiaTable = right.fSandiaTable;
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
fIndexInTable = right.fIndexInTable;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -518,7 +567,7 @@ G4std::ostream& operator<<(G4std::ostream& flux, G4Material* material)
|
||||
<< (material->fPressure)/atmosphere << " atm"
|
||||
<< " RadLength: " << G4std::setw(7) << G4std::setprecision(3)
|
||||
<< G4BestUnit(material->fRadlen,"Length");
|
||||
|
||||
|
||||
for (G4int i=0; i<material->fNumberOfElements; i++)
|
||||
flux
|
||||
<< "\n ---> " << (*(material->theElementVector))[i]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.cc,v 1.9 2000/03/03 10:21:02 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.5 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpticalSurface.cc,v 1.4 1999/12/15 14:50:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,11 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SandiaTable.cc,v 1.6 2000/08/03 14:28:31 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4SandiaTable.cc,v 1.10 2001/04/03 12:32:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
// 03.04.01 fnulcof returned if energy < emin
|
||||
// 22.02.01 GetsandiaCofForMaterial(energy) return 0 below lowest interval mma
|
||||
// 16.02.01 adapted for STL. mma
|
||||
// 31.01.01 redesign of ComputeMatSandiaMatrix(). mma
|
||||
// 18.11.98 simplified public interface; new methods for materials. mma
|
||||
// 10.06.97 created. V. Grichine
|
||||
//
|
||||
@@ -31,6 +35,8 @@ G4SandiaTable::G4SandiaTable(G4int matIndex)
|
||||
fPhotoAbsorptionCof = 0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4SandiaTable::G4SandiaTable(G4Material* material)
|
||||
:fMaterial(material)
|
||||
{
|
||||
@@ -41,17 +47,21 @@ G4SandiaTable::G4SandiaTable(G4Material* material)
|
||||
fCumulInterval[Z] = fCumulInterval[Z-1] + fNbOfIntervals[Z];
|
||||
|
||||
//compute macroscopic Sandia coefs for a material
|
||||
ComputeMatSandiaMatrix();
|
||||
ComputeMatSandiaMatrix();
|
||||
|
||||
//initialisation of fnulcof
|
||||
fnulcof[0] = fnulcof[1] = fnulcof[2] = fnulcof[3] = 0.;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4SandiaTable::~G4SandiaTable()
|
||||
{
|
||||
if(fMatSandiaMatrix) delete fMatSandiaMatrix ;
|
||||
if(fMatSandiaMatrix) delete fMatSandiaMatrix;
|
||||
|
||||
if(fPhotoAbsorptionCof)
|
||||
{
|
||||
for(G4int i = 0 ; i < fMaxInterval ; i++) delete[] fPhotoAbsorptionCof[i] ;
|
||||
for(G4int i = 0 ; i < fMaxInterval ; i++) delete[] fPhotoAbsorptionCof[i];
|
||||
delete fPhotoAbsorptionCof ;
|
||||
}
|
||||
}
|
||||
@@ -65,58 +75,85 @@ void G4SandiaTable::ComputeMatSandiaMatrix()
|
||||
const G4ElementVector* ElementVector = fMaterial->GetElementVector();
|
||||
|
||||
G4int* Z = new G4int[NbElm]; //Atomic number
|
||||
|
||||
//determine the total number of energy-intervals for this material
|
||||
fMatNbOfIntervals = 0;
|
||||
|
||||
//
|
||||
//determine the maximum number of energy-intervals for this material
|
||||
//
|
||||
G4int MaxIntervals = 0;
|
||||
G4int elm;
|
||||
for (elm=0; elm<NbElm; elm++)
|
||||
{ Z[elm] = (int)(*ElementVector)(elm)->GetZ();
|
||||
fMatNbOfIntervals += fNbOfIntervals[Z[elm]];
|
||||
MaxIntervals += fNbOfIntervals[Z[elm]];
|
||||
}
|
||||
|
||||
//create the sandia matrix for this material
|
||||
fMatSandiaMatrix = new G4OrderedTable(fMatNbOfIntervals);
|
||||
G4int interval;
|
||||
for (interval=0; interval<fMatNbOfIntervals; interval++)
|
||||
(*fMatSandiaMatrix)(interval) = new G4ValVector(5);
|
||||
|
||||
//copy the Energy bins (take care of the Ionization Potential)
|
||||
G4double Ebin;
|
||||
interval=0;
|
||||
//
|
||||
//copy the Energy bins in a tmp1 array
|
||||
//(take care of the Ionization Potential of each element)
|
||||
//
|
||||
G4double* tmp1 = new G4double[MaxIntervals];
|
||||
G4double IonizationPot;
|
||||
G4int interval1=0;
|
||||
for (elm=0; elm<NbElm; elm++)
|
||||
for (G4int row=fCumulInterval[Z[elm]-1];row<fCumulInterval[Z[elm]];row++)
|
||||
{ Ebin = fSandiaTable[row][0]*keV;
|
||||
if ((row==fCumulInterval[Z[elm]-1])&&(GetIonizationPot(Z[elm])<Ebin))
|
||||
Ebin = GetIonizationPot(Z[elm]);
|
||||
(*(*fMatSandiaMatrix)(interval++))(0) = Ebin;
|
||||
}
|
||||
|
||||
//sort the energies in increasing values
|
||||
G4double tmp;
|
||||
for (G4int i1=0; i1<fMatNbOfIntervals; i1++)
|
||||
for (G4int i2=i1+1; i2<fMatNbOfIntervals; i2++)
|
||||
{if ((*(*fMatSandiaMatrix)(i1))(0) > (*(*fMatSandiaMatrix)(i2))(0))
|
||||
{
|
||||
tmp = (*(*fMatSandiaMatrix)(i1))(0);
|
||||
(*(*fMatSandiaMatrix)(i1))(0) = (*(*fMatSandiaMatrix)(i2))(0);
|
||||
(*(*fMatSandiaMatrix)(i2))(0) = tmp;
|
||||
}
|
||||
}
|
||||
{ IonizationPot = GetIonizationPot(Z[elm]);
|
||||
for (G4int row=fCumulInterval[Z[elm]-1];row<fCumulInterval[Z[elm]];row++)
|
||||
tmp1[interval1++] = G4std::max(fSandiaTable[row][0]*keV,IonizationPot);
|
||||
}
|
||||
|
||||
//
|
||||
//sort the energies in strickly increasing values in a tmp2 array
|
||||
//(eliminate redondances)
|
||||
//
|
||||
G4double* tmp2 = new G4double[MaxIntervals];
|
||||
G4double Emin;
|
||||
G4int interval2 = 0;
|
||||
|
||||
do {
|
||||
Emin = DBL_MAX;
|
||||
for (G4int i1=0; i1<MaxIntervals; i1++)
|
||||
if (tmp1[i1] < Emin) Emin = tmp1[i1]; //find the minimum
|
||||
if (Emin < DBL_MAX) tmp2[interval2++] = Emin; //copy Emin in tmp2
|
||||
for (G4int j1=0; j1<MaxIntervals; j1++)
|
||||
if (tmp1[j1] <= Emin) tmp1[j1] = DBL_MAX; //eliminate from tmp1
|
||||
} while (Emin < DBL_MAX);
|
||||
|
||||
//
|
||||
//create the sandia matrix for this material
|
||||
//
|
||||
fMatSandiaMatrix = new G4OrderedTable();
|
||||
G4int interval;
|
||||
for (interval=0; interval<interval2; interval++)
|
||||
fMatSandiaMatrix->push_back(new G4DataVector(5));
|
||||
|
||||
//
|
||||
//ready to compute the Sandia coefs for the material
|
||||
//
|
||||
const G4double* NbOfAtomsPerVolume = fMaterial->GetVecNbOfAtomsPerVolume();
|
||||
for (interval=0; interval<fMatNbOfIntervals; interval++)
|
||||
|
||||
const G4double prec = 1.e-03*eV;
|
||||
G4double coef, oldsum(0.), newsum(0.);
|
||||
fMatNbOfIntervals = 0;
|
||||
|
||||
for (interval=0; interval<interval2; interval++)
|
||||
{
|
||||
Ebin = (*(*fMatSandiaMatrix)(interval))(0);
|
||||
Emin = (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[0] = tmp2[interval];
|
||||
for (G4int k=1; k<5; k++)(*(*fMatSandiaMatrix)[fMatNbOfIntervals])[k]=0.;
|
||||
newsum = 0.;
|
||||
|
||||
for (elm=0; elm<NbElm; elm++)
|
||||
{
|
||||
GetSandiaCofPerAtom(Z[elm], Ebin);
|
||||
GetSandiaCofPerAtom(Z[elm], Emin+prec);
|
||||
for (G4int j=1; j<5; j++)
|
||||
(*(*fMatSandiaMatrix)(interval))(j) += NbOfAtomsPerVolume[elm]*
|
||||
fSandiaCofPerAtom[j-1];
|
||||
}
|
||||
{
|
||||
coef = NbOfAtomsPerVolume[elm]*fSandiaCofPerAtom[j-1];
|
||||
(*(*fMatSandiaMatrix)[fMatNbOfIntervals])[j] += coef;
|
||||
newsum += abs(coef);
|
||||
}
|
||||
}
|
||||
|
||||
//check for null or redondant intervals
|
||||
if (newsum != oldsum) { oldsum = newsum; fMatNbOfIntervals++;}
|
||||
}
|
||||
delete [] Z;
|
||||
delete Z; delete tmp1; delete tmp2;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -124,16 +161,18 @@ void G4SandiaTable::ComputeMatSandiaMatrix()
|
||||
G4double G4SandiaTable::GetSandiaCofForMaterial(G4int interval, G4int j)
|
||||
{
|
||||
assert (interval>=0 && interval<fMatNbOfIntervals && j>=0 && j<5);
|
||||
return ((*(*fMatSandiaMatrix)(interval))(j));
|
||||
return ((*(*fMatSandiaMatrix)[interval])[j]);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4double* G4SandiaTable::GetSandiaCofForMaterial(G4double energy)
|
||||
{
|
||||
if (energy < (*(*fMatSandiaMatrix)[0])[0]) return fnulcof;
|
||||
|
||||
G4int interval = fMatNbOfIntervals - 1;
|
||||
while ((interval>0)&&(energy<(*(*fMatSandiaMatrix)(interval))(0))) interval--;
|
||||
return &((*(*fMatSandiaMatrix)(interval))(1));
|
||||
while ((interval>0)&&(energy<(*(*fMatSandiaMatrix)[interval])[0])) interval--;
|
||||
return &((*(*fMatSandiaMatrix)[interval])[1]);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
Reference in New Issue
Block a user