Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.1 1999/01/07 16:09:39 gunter Exp $
|
||||
$Id: History,v 1.3 1999/11/16 11:04:04 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,7 +16,20 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
|
||||
Nov 16, 99 G.Cosmo - materials-V00-01-03
|
||||
Removed useless inclusion of RW tphdict.h from
|
||||
G4MaterialPropertiesTable.hh. This tag includes the global
|
||||
migration RWT->G4RWT (still CVS headers are different on the HEAD).
|
||||
|
||||
Nov 09, 99 P.Gumpliger - materials-V00-01-02
|
||||
changes to comments for Software Reference Manual in
|
||||
G4MPVEntry.hh, G4MaterialPropertyVector.hh, G4OpticalSurface.hh.
|
||||
Migrated G4MaterialPropertiesTable from RW dictionary to STL map.
|
||||
|
||||
July 28, 99 M.Maire - materials-V00-01-00
|
||||
new G4Material constructor with chemical formula
|
||||
|
||||
August 13, 98 M.Maire - materials-00-02-01
|
||||
new static method G4Material::GetMaterial(name)
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4AtomicShells.hh,v 1.1 1999/01/07 16:09:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4AtomicShells.hh,v 1.1.10.1 1999/12/07 20:49:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// Class consists of atomic subshell binding energies in eV !!!
|
||||
// for first 100 elements
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Element.hh,v 1.2 1999/04/14 12:48:57 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Element.hh,v 1.2.6.1.2.1 1999/12/07 20:49:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------- class G4Element -------------------
|
||||
@@ -52,17 +52,17 @@
|
||||
#define G4ELEMENT_HH
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <rw/tpvector.h>
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpvector.h"
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "globals.hh"
|
||||
#include "G4Isotope.hh"
|
||||
#include "G4AtomicShells.hh"
|
||||
#include "G4IonisParamElm.hh"
|
||||
|
||||
typedef RWTPtrVector<G4Isotope> G4IsotopeVector;
|
||||
typedef G4RWTPtrVector<G4Isotope> G4IsotopeVector;
|
||||
|
||||
class G4Element; //forward declaration
|
||||
typedef RWTPtrOrderedVector<G4Element> G4ElementTable;
|
||||
typedef G4RWTPtrOrderedVector<G4Element> G4ElementTable;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ElementTable.hh,v 1.1 1999/01/07 16:09:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4ElementTable.hh,v 1.1.10.1 1999/12/07 20:49:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ElementVector.hh,v 1.1 1999/01/07 16:09:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4ElementVector.hh,v 1.1.10.1 1999/12/07 20:49:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamElm.hh,v 1.2 1999/04/14 12:48:58 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IonisParamElm.hh,v 1.2.8.1 1999/12/07 20:49:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------- class G4IonisParamElm -------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamMat.hh,v 1.2 1999/04/14 12:48:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IonisParamMat.hh,v 1.2.8.1 1999/12/07 20:49:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Isotope.hh,v 1.1 1999/01/07 16:09:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Isotope.hh,v 1.1.8.1.2.1 1999/12/07 20:49:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -40,11 +40,11 @@
|
||||
#define G4ISOTOPE_HH
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Isotope;
|
||||
typedef RWTPtrOrderedVector<G4Isotope> G4IsotopeTable;
|
||||
typedef G4RWTPtrOrderedVector<G4Isotope> G4IsotopeTable;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IsotopeVector.hh,v 1.1 1999/01/07 16:09:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IsotopeVector.hh,v 1.1.10.1 1999/12/07 20:49:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MPVEntry.hh,v 1.1 1999/01/07 16:09:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MPVEntry.hh,v 1.3.2.1 1999/11/11 14:30:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -19,7 +19,8 @@
|
||||
// Version: 1.0
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 1997-03-25 by Peter Gumplinger
|
||||
// Updated: 1999-10-29 add method and class descriptors
|
||||
// 1997-03-25 by Peter Gumplinger
|
||||
// > cosmetics (only)
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
@@ -35,20 +36,25 @@
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
// Class Description:
|
||||
// A G4MPVEntry is an MaterialPropertyVector Entry.
|
||||
// One Material Property Vector contains many MPVEntries.
|
||||
// Class Description - End:
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
class G4MPVEntry {
|
||||
|
||||
public:
|
||||
public: // Without description
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
//////////////G4MPVEntry.hh
|
||||
|
||||
// Well defined semantics for these operators
|
||||
// required by RWTPtrSortedVector
|
||||
// required by G4RWTPtrSortedVector
|
||||
|
||||
G4bool operator <(const G4MPVEntry &right) const;
|
||||
G4bool operator ==(const G4MPVEntry &right) const;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Material.hh,v 1.2 1999/04/14 12:48:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Material.hh,v 1.4.6.1.2.1 1999/12/07 20:49:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------- class G4Material ---------------------
|
||||
@@ -51,6 +51,7 @@
|
||||
// 04-08-98, new method GetMaterial(materialName), M.Maire
|
||||
// 05-10-98, change name: NumDensity -> NbOfAtomsPerVolume
|
||||
// 18-11-98, SandiaTable interface modified.
|
||||
// 19-07-99, new data member (chemicalFormula) added by V.Ivanchenko
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -58,18 +59,18 @@
|
||||
#define G4MATERIAL_HH
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <rw/tpvector.h>
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpvector.h"
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "globals.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4IonisParamMat.hh"
|
||||
#include "G4SandiaTable.hh"
|
||||
|
||||
typedef RWTPtrVector<G4Element> G4ElementVector;
|
||||
typedef G4RWTPtrVector<G4Element> G4ElementVector;
|
||||
|
||||
class G4Material; //forward declaration
|
||||
typedef RWTPtrOrderedVector<G4Material> G4MaterialTable;
|
||||
typedef G4RWTPtrOrderedVector<G4Material> G4MaterialTable;
|
||||
|
||||
enum G4State { kStateUndefined, kStateSolid, kStateLiquid, kStateGas };
|
||||
|
||||
@@ -101,6 +102,31 @@ public:
|
||||
G4double temp = STP_Temperature, //temperature
|
||||
G4double pressure = STP_Pressure); //pressure
|
||||
|
||||
//
|
||||
// Constructor to create a material with chemical formula from scratch.
|
||||
//
|
||||
G4Material(const G4String& name, //its name
|
||||
const G4String& chFormula, //chemical formula
|
||||
G4double z, //atomic number
|
||||
G4double a, //mass of mole
|
||||
G4double density, //density
|
||||
G4State state = kStateUndefined, //solid,liqid,gas
|
||||
G4double temp = STP_Temperature, //temperature
|
||||
G4double pressure = STP_Pressure); //pressure
|
||||
|
||||
//
|
||||
// Constructor to create a material with chemical formula from a
|
||||
// combination of elements and/or materials subsequently added via
|
||||
// AddElement and/or AddMaterial
|
||||
//
|
||||
G4Material(const G4String& name, //its name
|
||||
const G4String& chFormula, //chemical formula
|
||||
G4double density, //density
|
||||
G4int nComponents, //nb of components
|
||||
G4State state = kStateUndefined, //solid,liquid,gas
|
||||
G4double temp = STP_Temperature, //temperature
|
||||
G4double pressure = STP_Pressure); //pressure
|
||||
|
||||
//
|
||||
// Add an element, giving number of atoms
|
||||
//
|
||||
@@ -122,8 +148,9 @@ public:
|
||||
//
|
||||
// retrieval methods
|
||||
//
|
||||
G4String GetName() const {return fName;};
|
||||
G4double GetDensity() const {return fDensity;};
|
||||
G4String GetName() const {return fName;};
|
||||
G4String GetChemicalFormula() const {return fChemicalFormula;};
|
||||
G4double GetDensity() const {return fDensity;};
|
||||
|
||||
G4State GetState() const {return fState;};
|
||||
G4double GetTemperature() const {return fTemp;};
|
||||
@@ -202,6 +229,7 @@ private:
|
||||
//
|
||||
|
||||
G4String fName; // Material name
|
||||
G4String fChemicalFormula; // Material chemical formula
|
||||
G4double fDensity; // Material density
|
||||
|
||||
G4State fState; // Material state (defaults to undefined,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.hh,v 1.1 1999/01/07 16:09:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MaterialPropertiesTable.hh,v 1.7 1999/11/16 08:31:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -19,7 +19,10 @@
|
||||
// Version: 1.0
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 1997-03-25 by Peter Gumplinger
|
||||
// Updated: 1999-11-05 Migration from G4RWTPtrHashDictionary to STL
|
||||
// by John Allison
|
||||
// 1999-10-29 add method and class descriptors
|
||||
// 1997-03-25 by Peter Gumplinger
|
||||
// > cosmetics (only)
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
@@ -33,14 +36,16 @@
|
||||
/////////////
|
||||
|
||||
#include <math.h>
|
||||
#include <rw/tphdict.h>
|
||||
#include <rw/cstring.h>
|
||||
#include "g4std/map"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
|
||||
#define RefractionIndex "RINDEX"
|
||||
// Class Description:
|
||||
// An Material properties table is a hash table, with key = property
|
||||
// name, and value = G4MaterialPropertyVector.
|
||||
// Class Description - End:
|
||||
|
||||
// unsigned hashString(const G4String &str);
|
||||
#define RefractionIndex "RINDEX"
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
@@ -48,12 +53,12 @@
|
||||
|
||||
class G4MaterialPropertiesTable {
|
||||
|
||||
public:
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
//////////////
|
||||
|
||||
private:
|
||||
|
||||
G4MaterialPropertiesTable&
|
||||
operator =(const G4MaterialPropertiesTable &right);
|
||||
|
||||
@@ -61,10 +66,16 @@ public:
|
||||
// Constructor
|
||||
////////////////
|
||||
|
||||
public: // Without description
|
||||
|
||||
G4MaterialPropertiesTable();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4MaterialPropertiesTable(const G4MaterialPropertiesTable &right);
|
||||
|
||||
public: // Without description
|
||||
|
||||
///////////////
|
||||
// Destructor
|
||||
///////////////
|
||||
@@ -75,23 +86,33 @@ public:
|
||||
// Methods
|
||||
////////////
|
||||
|
||||
public: // With description
|
||||
|
||||
void AddProperty(char *key,
|
||||
G4double *PhotonMomenta,
|
||||
G4double *PropertyValues,
|
||||
G4int NumEntries);
|
||||
// Add a new property to the table by giving a key-name and the
|
||||
// arrays x and y of size NumEntries.
|
||||
|
||||
void AddProperty(char *key, G4MaterialPropertyVector *opv);
|
||||
// Add a new property to the table by giving a key-name and an
|
||||
// already constructed G4MaterialPropertyVector.
|
||||
|
||||
void RemoveProperty(char *key);
|
||||
// Remove a property from the table.
|
||||
|
||||
G4MaterialPropertyVector* GetProperty(char *key);
|
||||
G4MaterialPropertyVector* GetProperty(char *key);
|
||||
// Get the property from the table corresponding to the key-name.
|
||||
|
||||
void AddEntry(char *key, G4double aPhotonMomentum,
|
||||
G4double aPropertyValue);
|
||||
// Add a new entry (pair of numbers) to the table for a given key.
|
||||
|
||||
void RemoveEntry(char *key, G4double aPhotonMomentum);
|
||||
// Remove an entry from the table for a given key and x-value.
|
||||
|
||||
void DumpTable();
|
||||
void DumpTable();
|
||||
|
||||
private:
|
||||
|
||||
@@ -99,9 +120,9 @@ private:
|
||||
// Private Data members
|
||||
/////////////////////////
|
||||
|
||||
RWTPtrHashDictionary<G4String, G4MaterialPropertyVector> MPT;
|
||||
RWTPtrHashDictionaryIterator<G4String, G4MaterialPropertyVector>
|
||||
MPTiterator;
|
||||
G4std::map<G4String, G4MaterialPropertyVector*, less<G4String> > MPT;
|
||||
typedef G4std::map<G4String, G4MaterialPropertyVector*,
|
||||
less<G4String> >::iterator MPTiterator;
|
||||
};
|
||||
|
||||
#endif /* G4MaterialPropertiesTable_h */
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.hh,v 1.1 1999/01/07 16:09:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MaterialPropertyVector.hh,v 1.3.2.1 1999/11/11 14:30:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -20,7 +20,8 @@
|
||||
// Version: 1.0
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 1997-03-25 by Peter Gumplinger
|
||||
// Updated: 1999-10-29 add method and class descriptors
|
||||
// 1997-03-25 by Peter Gumplinger
|
||||
// > value.h -> templates.hh
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
@@ -33,17 +34,21 @@
|
||||
// Includes
|
||||
/////////////
|
||||
|
||||
#include <rw/tpsrtvec.h>
|
||||
#include <rw/cstring.h>
|
||||
#include "g4rw/tpsrtvec.h"
|
||||
#include "g4rw/cstring.h"
|
||||
#include "G4MPVEntry.hh"
|
||||
|
||||
// Class Description:
|
||||
// A one-to-one mapping from Photon Momentum to some optical property.
|
||||
// Class Description - End:
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
class G4MaterialPropertyVector {
|
||||
|
||||
public:
|
||||
public: // Without description
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
@@ -62,10 +67,15 @@ public:
|
||||
CurrentEntry = -1;
|
||||
NumEntries = 0;
|
||||
};
|
||||
|
||||
public: // With description
|
||||
|
||||
G4MaterialPropertyVector(G4double *PhotonMomenta,
|
||||
G4double *PropertyValues,
|
||||
G4int NumElements);
|
||||
// Constructor of G4MaterialPropertyVector object.
|
||||
|
||||
public: // Without description
|
||||
|
||||
G4MaterialPropertyVector(const G4MaterialPropertyVector &right);
|
||||
|
||||
@@ -79,18 +89,27 @@ public:
|
||||
// Methods
|
||||
////////////
|
||||
|
||||
public: // With description
|
||||
|
||||
void ResetIterator();
|
||||
|
||||
void AddElement(G4double aPhotonMomentum,
|
||||
G4double aPropertyValue);
|
||||
// Add a new element (pair of numbers) to the G4MaterialPropertyVector.
|
||||
void RemoveElement(G4double aPhotonMomentum);
|
||||
// Remove the element with given x-value.
|
||||
|
||||
G4double GetProperty(G4double aPhotonMomentum) const;
|
||||
// Returns the y-value for given x-value (with interpolation).
|
||||
G4double GetPhotonMomentum(G4double aProperty) const;
|
||||
|
||||
// for use with G4MaterialPropertyVector iterator:
|
||||
// return property (or Photon momentum) at current point
|
||||
// of iterator
|
||||
// Returns the x-value for given y-value (with interpolation).
|
||||
// NOTE: Assumes that the y-value is an increasing function of
|
||||
// the x-value. Returns the x-value corresponding to the
|
||||
// y-value passed in. If several x-values correspond to
|
||||
// the y-value passed in, the method returns the first
|
||||
// x-value in the vector that corresponds to that value.
|
||||
// For use with G4MaterialPropertyVector iterator: return
|
||||
// property (or Photon momentum) at current point of iterator.
|
||||
|
||||
G4double GetProperty() const;
|
||||
G4double GetPhotonMomentum() const;
|
||||
@@ -121,7 +140,7 @@ private:
|
||||
// Private Data Members
|
||||
/////////////////////////
|
||||
|
||||
RWTPtrSortedVector<G4MPVEntry> MPV;
|
||||
G4RWTPtrSortedVector<G4MPVEntry> MPV;
|
||||
G4int NumEntries;
|
||||
G4int CurrentEntry;
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialTable.hh,v 1.1 1999/01/07 16:09:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MaterialTable.hh,v 1.1.10.1 1999/12/07 20:49:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpticalSurface.hh,v 1.2 1999/04/14 12:49:00 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4OpticalSurface.hh,v 1.4 1999/11/05 21:12:05 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -18,6 +18,7 @@
|
||||
// Version: 2.0
|
||||
// Created: 1997-06-26
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 1999-10-29 add method and class descriptors
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
// Cvs version:
|
||||
@@ -33,6 +34,12 @@
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
|
||||
// Class Description:
|
||||
// A optical surface class for use in the G4OpBoundaryProcess class.
|
||||
// Contains the enumerations: G4OpticalSurfaceFinish, G4OpticalSurfaceType,
|
||||
// and G4OpticalSurfaceModel.
|
||||
// Class Description - End:
|
||||
|
||||
enum G4OpticalSurfaceFinish
|
||||
{
|
||||
polished, // smooth perfectly polished surface
|
||||
@@ -64,7 +71,7 @@ class G4MaterialPropertiesTable;
|
||||
class G4OpticalSurface
|
||||
{
|
||||
|
||||
public:
|
||||
public: // Without description
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
@@ -76,7 +83,7 @@ public:
|
||||
G4int operator==(const G4OpticalSurface &right) const;
|
||||
G4int operator!=(const G4OpticalSurface &right) const;
|
||||
|
||||
public:
|
||||
public: // With description
|
||||
|
||||
////////////////////////////////
|
||||
// Constructors and Destructor
|
||||
@@ -87,6 +94,9 @@ public:
|
||||
G4OpticalSurfaceFinish finish = polished,
|
||||
G4OpticalSurfaceType type = dielectric_dielectric,
|
||||
G4double value = 1.0);
|
||||
// Constructor of an optical surface object.
|
||||
|
||||
public: // Without description
|
||||
|
||||
~G4OpticalSurface();
|
||||
|
||||
@@ -94,44 +104,54 @@ public:
|
||||
// Methods
|
||||
////////////
|
||||
|
||||
public:
|
||||
|
||||
// public methods
|
||||
|
||||
G4String GetName() const { return theName; };
|
||||
void SetName(const G4String& name){theName = name;};
|
||||
public: // With description
|
||||
|
||||
// set/get the surface type
|
||||
G4String GetName() const { return theName; };
|
||||
// Returns the optical surface name.
|
||||
void SetName(const G4String& name){theName = name;};
|
||||
// Sets the optical surface name.
|
||||
|
||||
G4OpticalSurfaceType GetType() const {return theType;};
|
||||
// Returns the optical surface type.
|
||||
void SetType(const G4OpticalSurfaceType type){theType = type;};
|
||||
|
||||
// set/get the surface finish
|
||||
// Sets the optical surface type.
|
||||
|
||||
G4OpticalSurfaceFinish GetFinish() const {return theFinish;};
|
||||
// Returns the optical surface finish.
|
||||
void SetFinish(const G4OpticalSurfaceFinish finish)
|
||||
{theFinish = finish;};
|
||||
|
||||
// set/get the surface model to be followed (glisur || unified)
|
||||
// Sets the optical surface finish.
|
||||
|
||||
G4OpticalSurfaceModel GetModel() const {return theModel;};
|
||||
// Returns the optical surface model used.
|
||||
void SetModel(const G4OpticalSurfaceModel model)
|
||||
{theModel = model;};
|
||||
// Sets the optical surface model to be followed.
|
||||
|
||||
G4double GetSigmaAlpha() const {return sigma_alpha;};
|
||||
// Returns an unified model surface parameter.
|
||||
void SetSigmaAlpha(const G4double s_a)
|
||||
{sigma_alpha = s_a;};
|
||||
// Sets an unified model surface parameter.
|
||||
|
||||
G4double GetPolish() const {return polish;};
|
||||
// Returns the optical surface polish type.
|
||||
void SetPolish(const G4double plsh) {polish=plsh;};
|
||||
|
||||
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
|
||||
{ theMaterialPropertiesTable = anMPT;};
|
||||
// Sets the optical surface polish type.
|
||||
|
||||
G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
|
||||
{ return theMaterialPropertiesTable;};
|
||||
// Retrieves the pointer of the G4MaterialPropertiesTable
|
||||
// attached to optical surface.
|
||||
|
||||
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
|
||||
{ theMaterialPropertiesTable = anMPT;};
|
||||
// Attaches a G4MaterialPropertiesTable to the optical surface.
|
||||
|
||||
void DumpInfo() const;
|
||||
// Prints information about the optical surface.
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SandiaTable.hh,v 1.2 1999/04/15 14:00:37 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4SandiaTable.hh,v 1.3.8.1 1999/12/07 20:49:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
@@ -49,11 +49,11 @@ public:
|
||||
//
|
||||
// Methods for PAI model
|
||||
|
||||
inline void SandiaSwap( G4double da[][5],
|
||||
inline void SandiaSwap( G4double** da,
|
||||
G4int i,
|
||||
G4int j );
|
||||
|
||||
void SandiaSort( G4double da[][5],
|
||||
void SandiaSort( G4double** da,
|
||||
G4int sz );
|
||||
|
||||
G4int SandiaIntervals( G4int Z[],
|
||||
@@ -90,13 +90,17 @@ private:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// data memebers for PAI model
|
||||
// data members for PAI model
|
||||
|
||||
static const G4int fNumberOfElements ;
|
||||
static const G4int fIntervalLimit ;
|
||||
static const G4int fNumberOfIntervals ;
|
||||
|
||||
G4double fPhotoAbsorptionCof[101][5] ; // SandiaTable for mixture
|
||||
// G4double fPhotoAbsorptionCof[101][5] ; // SandiaTable for mixture
|
||||
|
||||
G4double** fPhotoAbsorptionCof ; // SandiaTable for mixture
|
||||
|
||||
// G4OrderedTable*
|
||||
G4int fMaxInterval ;
|
||||
|
||||
|
||||
@@ -179,7 +183,7 @@ G4double G4SandiaTable::GetZtoA(G4int Z)
|
||||
|
||||
inline
|
||||
void
|
||||
G4SandiaTable::SandiaSwap( G4double da[][5],
|
||||
G4SandiaTable::SandiaSwap( G4double** da ,
|
||||
G4int i,
|
||||
G4int j )
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StaticSandiaData.hh,v 1.2 1999/04/15 14:00:49 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4StaticSandiaData.hh,v 1.2.8.1 1999/12/07 20:49:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// file G4StaticSandiaData.hh
|
||||
// File for static data of PhotoAbsorption cross section coefficients
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4AtomicShells.cc,v 1.1 1999/01/07 16:09:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4AtomicShells.cc,v 1.1.10.1 1999/12/07 20:49:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Element.cc,v 1.2 1999/04/14 12:49:01 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Element.cc,v 1.2.8.1 1999/12/07 20:49:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------ class G4Element ------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamElm.cc,v 1.2 1999/04/14 12:49:01 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IonisParamElm.cc,v 1.2.8.1 1999/12/07 20:49:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------ class G4IonisParamElm ------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IonisParamMat.cc,v 1.2 1999/04/14 12:49:02 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IonisParamMat.cc,v 1.2.8.1 1999/12/07 20:49:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Isotope.cc,v 1.1 1999/01/07 16:09:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Isotope.cc,v 1.1.10.1 1999/12/07 20:49:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MPVEntry.cc,v 1.2 1999/04/14 12:49:02 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MPVEntry.cc,v 1.3.2.1 1999/11/11 14:30:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
// Overload the == operator
|
||||
// ------------------------
|
||||
// Well defined == semantics required by RWTPtrSortedVector
|
||||
// Well defined == semantics required by G4RWTPtrSortedVector
|
||||
//
|
||||
G4bool G4MPVEntry::operator ==(const G4MPVEntry &right) const
|
||||
{
|
||||
@@ -47,7 +47,7 @@ G4bool G4MPVEntry::operator ==(const G4MPVEntry &right) const
|
||||
|
||||
// Overload the < operator
|
||||
// -----------------------
|
||||
// Well defined < semantics required by RWTPtrSortedVector
|
||||
// Well defined < semantics required by G4RWTPtrSortedVector
|
||||
//
|
||||
G4bool G4MPVEntry::operator <(const G4MPVEntry &right) const
|
||||
{
|
||||
@@ -59,7 +59,7 @@ G4bool G4MPVEntry::operator <(const G4MPVEntry &right) const
|
||||
|
||||
// Overload the = operator
|
||||
// -----------------------
|
||||
// Well defined = semantics required by RWTPtrSortedVector
|
||||
// Well defined = semantics required by G4RWTPtrSortedVector
|
||||
//
|
||||
G4MPVEntry& G4MPVEntry::operator =(const G4MPVEntry& right)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Material.cc,v 1.3 1999/04/14 12:49:03 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4Material.cc,v 1.5.8.1 1999/12/07 20:49:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ---------- class G4Material ----------
|
||||
@@ -34,7 +34,8 @@
|
||||
// 05-10-98, change names: NumDensity -> NbOfAtomsPerVolume
|
||||
// 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
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
#include "G4Material.hh"
|
||||
@@ -56,7 +57,7 @@ G4Material::G4Material(const G4String& name, G4double z,
|
||||
InitializePointers();
|
||||
|
||||
if (density < universe_mean_density)
|
||||
{ G4cout << "--- Warning from G4Material::G4Material()"
|
||||
{ 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)
|
||||
@@ -68,6 +69,7 @@ G4Material::G4Material(const G4String& name, G4double z,
|
||||
fState = state;
|
||||
fTemp = temp;
|
||||
fPressure = pressure;
|
||||
fChemicalFormula = " ";
|
||||
|
||||
// Initialize theElementVector allocating one
|
||||
// element corresponding to this material
|
||||
@@ -103,7 +105,93 @@ G4Material::G4Material(const G4String& name, G4double density, G4int nComponents
|
||||
InitializePointers();
|
||||
|
||||
if (density < universe_mean_density)
|
||||
{G4cout << "--- Warning from G4Material::G4Material()"
|
||||
{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" << endl;
|
||||
density = universe_mean_density;
|
||||
}
|
||||
|
||||
fDensity = density;
|
||||
fState = state;
|
||||
fTemp = temp;
|
||||
fPressure = pressure;
|
||||
fChemicalFormula = " ";
|
||||
|
||||
maxNbComponents = nComponents;
|
||||
fNumberOfComponents = fNumberOfElements = 0;
|
||||
theElementVector = new G4ElementVector(maxNbComponents);
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
{
|
||||
if (fDensity > kGasThreshold) fState = kStateSolid;
|
||||
else fState = kStateGas;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// Constructor to create a material with chemical formula from scratch
|
||||
|
||||
G4Material::G4Material(const G4String& name, const G4String& chFormula,
|
||||
G4double z, G4double a, G4double density,
|
||||
G4State state, G4double temp, G4double pressure)
|
||||
:fName(name),fChemicalFormula(chFormula)
|
||||
{
|
||||
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" << endl;
|
||||
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;
|
||||
theElementVector = new G4ElementVector(1);
|
||||
theElementVector[0] = new G4Element(name, " ", z, a);
|
||||
fMassFractionVector = new G4double[1];
|
||||
fMassFractionVector[0] = 1. ;
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
{
|
||||
if (fDensity > kGasThreshold) fState = kStateSolid;
|
||||
else fState = kStateGas;
|
||||
}
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
|
||||
// Store in the table of Materials
|
||||
theMaterialTable.insert(this);
|
||||
fIndexInTable = theMaterialTable.index(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
// Constructor to create a material with chemical formula from a List
|
||||
// of constituents (elements and/or materials) added with AddElement
|
||||
// or AddMaterial
|
||||
|
||||
G4Material::G4Material(const G4String& name, const G4String& chFormula,
|
||||
G4double density, G4int nComponents,
|
||||
G4State state, G4double temp, G4double pressure)
|
||||
:fName(name),fChemicalFormula(chFormula)
|
||||
{
|
||||
|
||||
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)
|
||||
@@ -307,7 +395,7 @@ void G4Material::ComputeDerivedQuantities()
|
||||
if (fState == kStateGas) {
|
||||
G4double ratio = TotNbOfAtomsPerVolume*k_Boltzmann*fTemp/fPressure;
|
||||
if ((ratio<0.1)||(ratio>10.)) {
|
||||
G4cout << "---warning from G4Material-- The state conditions of the gas: "
|
||||
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"
|
||||
@@ -375,6 +463,7 @@ const G4Material& G4Material::operator=(const G4Material& right)
|
||||
if (this != &right)
|
||||
{
|
||||
fName = right.fName;
|
||||
fChemicalFormula = right.fChemicalFormula;
|
||||
fDensity = right.fDensity;
|
||||
fState = right.fState;
|
||||
fTemp = right.fTemp;
|
||||
@@ -420,6 +509,7 @@ ostream& operator<<(ostream& flux, G4Material* material)
|
||||
|
||||
flux
|
||||
<< " Material: " << setw(8) << material->fName
|
||||
<< " " << material->fChemicalFormula << " "
|
||||
<< " density: " << setw(6) << setprecision(3)
|
||||
<< G4BestUnit(material->fDensity,"Volumic Mass")
|
||||
<< " temperature: " << setw(6) << setprecision(2)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.cc,v 1.2 1999/04/14 12:49:03 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MaterialPropertiesTable.cc,v 1.5.2.1 1999/11/11 14:30:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -17,20 +17,22 @@
|
||||
// Version: 1.0
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 1997-03-26 by Peter Gumplinger
|
||||
// Updated: 1999-11-05 Migration from G4RWTPtrHashDictionary to STL
|
||||
// by John Allison
|
||||
// 1997-03-26 by Peter Gumplinger
|
||||
// > cosmetics (only)
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
|
||||
unsigned hashString(const G4String &str) { return str.hash(); }
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
//////////////
|
||||
|
||||
/**************
|
||||
G4MaterialPropertiesTable&
|
||||
G4MaterialPropertiesTable::operator =(const G4MaterialPropertiesTable& right)
|
||||
{
|
||||
@@ -43,28 +45,29 @@ G4MaterialPropertiesTable::operator =(const G4MaterialPropertiesTable& right)
|
||||
// want to make an actual copy -- not a shallow copy which is
|
||||
// the default for RWTPrtHashDictionary's assignment operator
|
||||
|
||||
RWTPtrHashDictionary<G4String, G4MaterialPropertyVector>
|
||||
G4RWTPtrHashDictionary<G4String, G4MaterialPropertyVector>
|
||||
rightMPT(right.MPT);
|
||||
RWTPtrHashDictionaryIterator<G4String, G4MaterialPropertyVector>
|
||||
G4RWTPtrHashDictionaryIterator<G4String, G4MaterialPropertyVector>
|
||||
rightIterator(rightMPT);
|
||||
rightIterator.reset();
|
||||
while (++rightIterator) {
|
||||
G4MaterialPropertyVector *newProp =
|
||||
new G4MaterialPropertyVector(*(rightIterator.value()));
|
||||
RWCString *newKey =
|
||||
new RWCString(*(rightIterator.key()));
|
||||
G4String *newKey =
|
||||
new G4String(*(rightIterator.key()));
|
||||
MPT.insertKeyAndValue(newKey, newProp);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
**********/
|
||||
|
||||
/////////////////
|
||||
// Constructors
|
||||
/////////////////
|
||||
|
||||
G4MaterialPropertiesTable::G4MaterialPropertiesTable() : MPT(hashString),
|
||||
MPTiterator(MPT) {}
|
||||
G4MaterialPropertiesTable::G4MaterialPropertiesTable() {}
|
||||
|
||||
/*********
|
||||
G4MaterialPropertiesTable::G4MaterialPropertiesTable
|
||||
(const G4MaterialPropertiesTable &right) :
|
||||
MPT(hashString), MPTiterator(MPT)
|
||||
@@ -72,9 +75,9 @@ G4MaterialPropertiesTable::G4MaterialPropertiesTable
|
||||
// want to make an actual copy -- not a shallow copy which is
|
||||
// the default for RWTPrtHashDictionary's assignment operator
|
||||
|
||||
RWTPtrHashDictionary<G4String, G4MaterialPropertyVector>
|
||||
G4RWTPtrHashDictionary<G4String, G4MaterialPropertyVector>
|
||||
rightMPT(right.MPT);
|
||||
RWTPtrHashDictionaryIterator<G4String, G4MaterialPropertyVector>
|
||||
G4RWTPtrHashDictionaryIterator<G4String, G4MaterialPropertyVector>
|
||||
rightIterator(rightMPT);
|
||||
|
||||
rightIterator.reset();
|
||||
@@ -82,11 +85,12 @@ G4MaterialPropertiesTable::G4MaterialPropertiesTable
|
||||
while (++rightIterator) {
|
||||
G4MaterialPropertyVector *newProp =
|
||||
new G4MaterialPropertyVector(*(rightIterator.value()));
|
||||
RWCString *newKey =
|
||||
new RWCString(*(rightIterator.key()));
|
||||
G4String *newKey =
|
||||
new G4String(*(rightIterator.key()));
|
||||
MPT.insertKeyAndValue(newKey, newProp);
|
||||
}
|
||||
}
|
||||
*******/
|
||||
|
||||
////////////////
|
||||
// Destructors
|
||||
@@ -94,7 +98,12 @@ G4MaterialPropertiesTable::G4MaterialPropertiesTable
|
||||
|
||||
G4MaterialPropertiesTable::~G4MaterialPropertiesTable()
|
||||
{
|
||||
MPT.clearAndDestroy();
|
||||
// MPT.clearAndDestroy();
|
||||
MPTiterator i;
|
||||
for (i = MPT.begin(); i != MPT.end(); ++i) {
|
||||
delete (*i).second;
|
||||
}
|
||||
MPT.clear();
|
||||
}
|
||||
|
||||
////////////
|
||||
@@ -110,8 +119,7 @@ void G4MaterialPropertiesTable::AddProperty(char *key,
|
||||
new G4MaterialPropertyVector(PhotonMomenta,
|
||||
PropertyValues,
|
||||
NumEntries);
|
||||
G4String *newKey = new G4String(key);
|
||||
MPT.insertKeyAndValue(newKey, mpv);
|
||||
MPT [G4String(key)] = mpv;
|
||||
}
|
||||
|
||||
void G4MaterialPropertiesTable::AddProperty(char *key,
|
||||
@@ -120,29 +128,24 @@ void G4MaterialPropertiesTable::AddProperty(char *key,
|
||||
// Provides a way of adding a property to the Material Properties
|
||||
// Table given an G4MaterialPropertyVector Reference and a key
|
||||
|
||||
G4String *theKey = new G4String(key);
|
||||
MPT.insertKeyAndValue(theKey, mpv);
|
||||
MPT [G4String(key)] = mpv;
|
||||
}
|
||||
|
||||
void G4MaterialPropertiesTable::RemoveProperty(char *key)
|
||||
{
|
||||
G4String target(key);
|
||||
MPT.remove(&target);
|
||||
MPT.erase(G4String(key));
|
||||
}
|
||||
|
||||
G4MaterialPropertyVector* G4MaterialPropertiesTable::GetProperty(char *key)
|
||||
{
|
||||
G4String target(key);
|
||||
|
||||
return MPT.findValue(&target);
|
||||
return MPT [G4String(key)];
|
||||
}
|
||||
|
||||
void G4MaterialPropertiesTable::AddEntry(char *key,
|
||||
G4double aPhotonMomentum,
|
||||
G4double aPropertyValue)
|
||||
{
|
||||
G4String target(key);
|
||||
G4MaterialPropertyVector *targetVector=MPT.findValue(&target);
|
||||
G4MaterialPropertyVector *targetVector=MPT [G4String(key)];
|
||||
if (targetVector != NULL) {
|
||||
targetVector->AddElement(aPhotonMomentum, aPropertyValue);
|
||||
}
|
||||
@@ -152,11 +155,10 @@ void G4MaterialPropertiesTable::AddEntry(char *key,
|
||||
}
|
||||
}
|
||||
|
||||
void G4MaterialPropertiesTable::RemoveEntry(char *key,
|
||||
void G4MaterialPropertiesTable::RemoveEntry(char *key,
|
||||
G4double aPhotonMomentum)
|
||||
{
|
||||
G4String target(key);
|
||||
G4MaterialPropertyVector *targetVector=MPT.findValue(&target);
|
||||
G4MaterialPropertyVector *targetVector=MPT [G4String(key)];
|
||||
if (targetVector) {
|
||||
targetVector->RemoveElement(aPhotonMomentum);
|
||||
}
|
||||
@@ -167,9 +169,9 @@ void G4MaterialPropertiesTable::RemoveEntry(char *key,
|
||||
}
|
||||
void G4MaterialPropertiesTable::DumpTable()
|
||||
{
|
||||
MPTiterator.reset();
|
||||
while(++MPTiterator) {
|
||||
G4cout << *MPTiterator.key() << endl;
|
||||
MPTiterator.value()->DumpVector();
|
||||
}
|
||||
MPTiterator i;
|
||||
for (i = MPT.begin(); i != MPT.end(); ++i) {
|
||||
G4cout << *(*i).first << endl;
|
||||
(*i).second->DumpVector();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.2 1999/04/14 12:49:04 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.3.2.1 1999/11/11 14:30:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -60,7 +60,7 @@ G4MaterialPropertyVector::operator =(const G4MaterialPropertyVector& right)
|
||||
MPV.clearAndDestroy();
|
||||
|
||||
// create an actual copy (instead of the shallow copy that the
|
||||
// assignment operator defaults to for RWTPtrSortedVector)
|
||||
// assignment operator defaults to for G4RWTPtrSortedVector)
|
||||
|
||||
NumEntries = 0;
|
||||
CurrentEntry = -1;
|
||||
@@ -97,7 +97,7 @@ G4MaterialPropertyVector::G4MaterialPropertyVector
|
||||
(const G4MaterialPropertyVector &right)
|
||||
{
|
||||
// create an actual copy (instead of the shallow copy that the
|
||||
// assignment operator defaults to for RWTPtrSortedVector)
|
||||
// assignment operator defaults to for G4RWTPtrSortedVector)
|
||||
|
||||
NumEntries = 0;
|
||||
CurrentEntry = -1;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpticalSurface.cc,v 1.2 1999/04/14 12:49:04 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4OpticalSurface.cc,v 1.3 1999/11/05 21:13:56 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SandiaTable.cc,v 1.2 1999/04/15 14:01:11 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4SandiaTable.cc,v 1.4.4.1 1999/12/07 20:49:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
@@ -25,7 +25,10 @@ G4double G4SandiaTable::fSandiaCofPerAtom[4];
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4SandiaTable::G4SandiaTable(G4int matIndex){ ; }
|
||||
G4SandiaTable::G4SandiaTable(G4int matIndex)
|
||||
{
|
||||
fMatSandiaMatrix = NULL ;
|
||||
}
|
||||
|
||||
G4SandiaTable::G4SandiaTable(G4Material* material)
|
||||
:fMaterial(material)
|
||||
@@ -42,7 +45,10 @@ G4SandiaTable::G4SandiaTable(G4Material* material)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4SandiaTable::~G4SandiaTable()
|
||||
{ delete fMatSandiaMatrix;}
|
||||
{
|
||||
if(fMatSandiaMatrix) delete fMatSandiaMatrix ;
|
||||
if(fPhotoAbsorptionCof) delete fPhotoAbsorptionCof ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -138,7 +144,7 @@ G4double* G4SandiaTable::GetSandiaCofForMaterial(G4double energy)
|
||||
//
|
||||
|
||||
void
|
||||
G4SandiaTable::SandiaSort(G4double da[][5],
|
||||
G4SandiaTable::SandiaSort(G4double** da ,
|
||||
G4int sz )
|
||||
{
|
||||
for(G4int i = 1 ;i < sz ; i++ )
|
||||
@@ -162,8 +168,29 @@ G4int
|
||||
G4SandiaTable::SandiaIntervals(G4int Z[],
|
||||
G4int el )
|
||||
{
|
||||
G4int c,i;
|
||||
for(c = 0 ; c < fIntervalLimit ; c++) // just in case
|
||||
G4int c,i ;
|
||||
|
||||
fMaxInterval = 0 ;
|
||||
|
||||
for(i=0;i<el;i++)
|
||||
{
|
||||
fMaxInterval += fNbOfIntervals[Z[i]] ;
|
||||
}
|
||||
fMaxInterval += 2 ;
|
||||
|
||||
// G4cout<<"fMaxInterval = "<<fMaxInterval<<endl ;
|
||||
|
||||
fPhotoAbsorptionCof = new G4double* [fMaxInterval] ;
|
||||
|
||||
for(i = 0 ; i < fMaxInterval ; i++)
|
||||
{
|
||||
fPhotoAbsorptionCof[i] = new G4double[5] ;
|
||||
}
|
||||
|
||||
|
||||
// for(c = 0 ; c < fIntervalLimit ; c++) // just in case
|
||||
|
||||
for(c = 0 ; c < fMaxInterval ; c++) // just in case
|
||||
{
|
||||
fPhotoAbsorptionCof[c][0] = 0. ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user