Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Material Class Reference

This class encapsulates the minimum functionality that a material should have for particle transport. More...

#include <Material.h>

List of all members.

Public Types

typedef std::list<AtomicElement*> Element_list

Public Methods

 Material ()
 null constructor. More...

 Material (std::istream&, const char* name)
 See the implementation for notes on the format of this data. More...

 ~Material ()
 destructor. More...

int isVacuum () const
 is this material the standard vacuum. More...

float dedx (float beta, float eta) const
 return nominal dE/dx for particle with given beta = p/E and eta = p/m. More...

AtomicElementaddElementData (char[],float,float,float,float)
 add an element.

AtomicElementaddElement (const char* bufffer)
 add an element: by decoding a line in the PEGS4 format. More...

const char* name () const
 return the name of the material. More...

const char* title () const
 return title from pegs file. More...

float Z () const
 return effective Z, A, density. More...

float A () const
float density () const
float radiationLength () const
 return the nominal radiation length. More...

float interactionLength () const
 return the nominal interaction length. More...

void setRadiationLength (float r)
 sets new nominal radiation lengths. More...

void setInteractionLength (float r)
 set the nominal interaction length. More...

void* getMatData (unsigned index)
 return pointer to the MatData object associated with index. More...

void printOn (std::ostream&)
 print stuff for this one. More...


Public Attributes

Element_list elementList
 list of pointers to AtomicElements. More...

Material* nextMaterial

Static Public Methods

Material* hatch (const char* name)
 The name is used to look up a file in the path given by member data _dataPath, with extension ".dat" appended. More...

void dataPath (const char* path)
 completely set the Material file search path. More...

void addPath (const char* path)
 add more directories to the FRONT of the material file search path. More...

const char* getDataPath ()
 access to the path. More...

unsigned declareMatData (MatData*)
 It will be used to read or analyze material data whenever a new material is defined. More...

void printAll (std::ostream&)
 make table of all defined materials. More...

void deleteAll ()
 remove all defined materials. More...


Static Public Attributes

Material* vacuum = 0
 pointer to default material, which is also used to define the list of MatData objects to be created with each new material. More...

Material* firstMaterial = 0

Protected Types

typedef std::vector<MatData*> MatData_list

Protected Attributes

std::string m_fileName
char materialName [16]
float zeff
float aeff
float rho
float rlc
float lambda
MatData_list matDataList

Static Protected Attributes

std::string* s_dataPath = defaultPath()

Private Methods

float density_correction (float eta) const

Private Attributes

float energyLoss1
float energyLoss2
float energyLoss3
float IP


Detailed Description

This class encapsulates the minimum functionality that a material should have for particle transport.

It allows for mixtures or compounds of elements, has data members for density, effective A and Z, and radiation and interaction lengths.

The latter have to be set by special adjunct classes that inherit from the abstract class MatData. If a MatData descendant is declared (see function member declareMatData), then the basic material-creation function hatch will call a MatData constructor, which can continue reading data from an open data file.

Definition at line 37 of file Material.h.


Member Typedef Documentation

typedef std::list<AtomicElement*> Material::Element_list
 

Definition at line 124 of file Material.h.

typedef std::vector<MatData*> Material::MatData_list [protected]
 

Definition at line 179 of file Material.h.


Constructor & Destructor Documentation

Material::Material ( ) [inline]
 

null constructor.

Definition at line 41 of file Material.h.

Referenced by declareMatData(), and hatch().

Material::Material ( std::istream & fin,
const char * fname )
 

See the implementation for notes on the format of this data.

Definition at line 163 of file Material.cxx.

Material::~Material ( )
 

destructor.

Definition at line 413 of file Material.cxx.


Member Function Documentation

float Material::A ( ) const [inline]
 

Definition at line 206 of file Material.h.

Referenced by dedx(), Interactor::energyLoss(), and printOn().

float Material::Z ( ) const [inline]
 

return effective Z, A, density.

Definition at line 203 of file Material.h.

Referenced by dedx(), Interactor::energyLoss(), and printOn().

Material::AtomicElement * Material::addElement ( const char * buffer )
 

add an element: by decoding a line in the PEGS4 format.

Definition at line 263 of file Material.cxx.

Referenced by Material().

AtomicElement * Material::addElementData ( char[],
float,
float,
float,
float )
 

add an element.

Referenced by addElement().

void Material::addPath ( const char * path ) [static]
 

add more directories to the FRONT of the material file search path.

Definition at line 70 of file Material.cxx.

Referenced by ThisApp::ThisApp(), USEGUI(), Gismo::addMaterialPath(), and ShowerTest::init().

void Material::dataPath ( const char * path ) [static]
 

completely set the Material file search path.

Definition at line 64 of file Material.cxx.

unsigned Material::declareMatData ( MatData * mdnew ) [static]
 

It will be used to read or analyze material data whenever a new material is defined.

Returns an index to be used to retrieve the data in a particular material

      unsigned index = Material::declareMatData(new EGSData);
      ...
      EGSData* egd = (EGSData*) material->getMatData(index);
    

Definition at line 345 of file Material.cxx.

Referenced by EGSInteractor::EGSInteractor(), and GheishaInteractor::GheishaInteractor().

float Material::dedx ( float beta,
float eta ) const
 

return nominal dE/dx for particle with given beta = p/E and eta = p/m.

Definition at line 278 of file Material.cxx.

Referenced by Interactor::eloss(), TestApp::init(), and Interactor::maxStepSize().

void Material::deleteAll ( ) [static]
 

remove all defined materials.

Definition at line 429 of file Material.cxx.

Referenced by main(), and Gismo::~Gismo().

float Material::density ( ) const [inline]
 

Definition at line 209 of file Material.h.

Referenced by dedx(), density_correction(), Interactor::energyLoss(), TestApp::init(), printOn(), and GheishaData::read().

float Material::density_correction ( float eta ) const [private]
 

Definition at line 302 of file Material.cxx.

Referenced by dedx().

const char * Material::getDataPath ( ) [static]
 

access to the path.

Definition at line 75 of file Material.cxx.

void * Material::getMatData ( unsigned index ) [inline]
 

return pointer to the MatData object associated with index.

Definition at line 198 of file Material.h.

Referenced by GheishaInteractor::data(), and EGSInteractor::pegs().

Material * Material::hatch ( const char * name ) [static]
 

The name is used to look up a file in the path given by member data _dataPath, with extension ".dat" appended.

Definition at line 127 of file Material.cxx.

Referenced by TestApp::init(), and Medium::set_defaults().

float Material::interactionLength ( ) const [inline]
 

return the nominal interaction length.

Definition at line 89 of file Material.h.

int Material::isVacuum ( ) const [inline]
 

is this material the standard vacuum.

Definition at line 61 of file Material.h.

Referenced by Interactor::afterStep(), EGSInteractor::afterStep(), and name().

const char * Material::name ( ) const [inline]
 

return the name of the material.

Definition at line 76 of file Material.h.

Referenced by Medium::printOn(), MCParticle::propagate(), PEGSData::read(), and GheishaData::read().

void Material::printAll ( std::ostream & out ) [static]
 

make table of all defined materials.

Definition at line 369 of file Material.cxx.

Referenced by Gismo::PrintMaterials::execute(), and ShowerTest::init().

void Material::printOn ( std::ostream & out )
 

print stuff for this one.

Definition at line 401 of file Material.cxx.

Referenced by printAll().

float Material::radiationLength ( ) const [inline]
 

return the nominal radiation length.

Definition at line 87 of file Material.h.

Referenced by ShowerTest::init(), TestApp::init(), MuonInteractor::interactionLength(), Interactor::multipleScatter(), PEGSData::read(), GheishaData::read(), and RCParticle::stepBy().

void Material::setInteractionLength ( float r ) [inline]
 

set the nominal interaction length.

Definition at line 94 of file Material.h.

void Material::setRadiationLength ( float r ) [inline]
 

sets new nominal radiation lengths.

Definition at line 92 of file Material.h.

const char * Material::title ( ) const [inline]
 

return title from pegs file.

Definition at line 79 of file Material.h.


Member Data Documentation

float Material::IP [private]
 

Definition at line 190 of file Material.h.

float Material::aeff [protected]
 

Definition at line 167 of file Material.h.

Element_list Material::elementList
 

list of pointers to AtomicElements.

Definition at line 126 of file Material.h.

float Material::energyLoss1 [private]
 

Definition at line 190 of file Material.h.

float Material::energyLoss2 [private]
 

Definition at line 190 of file Material.h.

float Material::energyLoss3 [private]
 

Definition at line 190 of file Material.h.

Material * Material::firstMaterial = 0 [static]
 

Definition at line 35 of file Material.cxx.

float Material::lambda [protected]
 

Definition at line 176 of file Material.h.

std::string Material::m_fileName [protected]
 

Definition at line 158 of file Material.h.

MatData_list Material::matDataList [protected]
 

Definition at line 181 of file Material.h.

char Material::materialName[16] [protected]
 

Definition at line 161 of file Material.h.

Material * Material::nextMaterial
 

Definition at line 185 of file Material.h.

float Material::rho [protected]
 

Definition at line 170 of file Material.h.

float Material::rlc [protected]
 

Definition at line 173 of file Material.h.

std::string * Material::s_dataPath = defaultPath() [static, protected]
 

Definition at line 61 of file Material.cxx.

Material * Material::vacuum = 0 [static]
 

pointer to default material, which is also used to define the list of MatData objects to be created with each new material.

Definition at line 36 of file Material.cxx.

float Material::zeff [protected]
 

Definition at line 164 of file Material.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:30 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000