ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
InDetMaterialManager::MaterialDef Class Reference

Class to hold information need to create a material. More...

Collaboration diagram for InDetMaterialManager::MaterialDef:

Public Member Functions

 MaterialDef ()
 
 MaterialDef (const std::string &name, double density)
 
void addComponent (const std::string &compName, double fraction)
 
void setCreated ()
 
unsigned int numComponents () const
 
bool isCreated () const
 
const std::string & name () const
 
double density () const
 
const std::string & compName (unsigned int i) const
 
double fraction (unsigned int i) const
 
double totalFraction () const
 

Private Attributes

std::string m_name
 
double m_density
 
std::vector< std::string > m_components
 
std::vector< double > m_fractions
 
bool m_created
 

Detailed Description

Class to hold information need to create a material.

Definition at line 158 of file InDetMaterialManager.h.

Constructor & Destructor Documentation

◆ MaterialDef() [1/2]

InDetMaterialManager::MaterialDef::MaterialDef ( )

Definition at line 915 of file InDetMaterialManager.cxx.

916  : m_density(0),
917  m_created(false)
918 {}

◆ MaterialDef() [2/2]

InDetMaterialManager::MaterialDef::MaterialDef ( const std::string &  name,
double  density 
)

Definition at line 920 of file InDetMaterialManager.cxx.

921  : m_name(name),
923  m_created(false)
924 {}

Member Function Documentation

◆ addComponent()

void InDetMaterialManager::MaterialDef::addComponent ( const std::string &  compName,
double  fraction 
)

Definition at line 927 of file InDetMaterialManager.cxx.

927  {
928  m_components.push_back(compName);
929  m_fractions.push_back(fraction);
930 }

◆ compName()

const std::string& InDetMaterialManager::MaterialDef::compName ( unsigned int  i) const
inline

Definition at line 168 of file InDetMaterialManager.h.

168 {return m_components[i];}

◆ density()

double InDetMaterialManager::MaterialDef::density ( ) const
inline

Definition at line 167 of file InDetMaterialManager.h.

167 {return m_density;}

◆ fraction()

double InDetMaterialManager::MaterialDef::fraction ( unsigned int  i) const
inline

Definition at line 169 of file InDetMaterialManager.h.

169 {return m_fractions[i];}

◆ isCreated()

bool InDetMaterialManager::MaterialDef::isCreated ( ) const
inline

Definition at line 165 of file InDetMaterialManager.h.

165 {return m_created;}

◆ name()

const std::string& InDetMaterialManager::MaterialDef::name ( ) const
inline

Definition at line 166 of file InDetMaterialManager.h.

166 {return m_name;}

◆ numComponents()

unsigned int InDetMaterialManager::MaterialDef::numComponents ( ) const
inline

Definition at line 164 of file InDetMaterialManager.h.

164 {return m_components.size();}

◆ setCreated()

void InDetMaterialManager::MaterialDef::setCreated ( )
inline

Definition at line 163 of file InDetMaterialManager.h.

163 {m_created = true;}

◆ totalFraction()

double InDetMaterialManager::MaterialDef::totalFraction ( ) const

Definition at line 933 of file InDetMaterialManager.cxx.

933  {
934  double sum = 0;
935 
936  for (unsigned int i = 0; i < m_fractions.size(); i++) {
937  sum += m_fractions[i];
938  }
939  return sum;
940 }

Member Data Documentation

◆ m_components

std::vector<std::string> InDetMaterialManager::MaterialDef::m_components
private

Definition at line 175 of file InDetMaterialManager.h.

◆ m_created

bool InDetMaterialManager::MaterialDef::m_created
private

Definition at line 177 of file InDetMaterialManager.h.

◆ m_density

double InDetMaterialManager::MaterialDef::m_density
private

Definition at line 174 of file InDetMaterialManager.h.

◆ m_fractions

std::vector<double> InDetMaterialManager::MaterialDef::m_fractions
private

Definition at line 176 of file InDetMaterialManager.h.

◆ m_name

std::string InDetMaterialManager::MaterialDef::m_name
private

Definition at line 173 of file InDetMaterialManager.h.


The documentation for this class was generated from the following files:
InDetMaterialManager::MaterialDef::fraction
double fraction(unsigned int i) const
Definition: InDetMaterialManager.h:169
InDetMaterialManager::MaterialDef::m_name
std::string m_name
Definition: InDetMaterialManager.h:173
InDetMaterialManager::MaterialDef::compName
const std::string & compName(unsigned int i) const
Definition: InDetMaterialManager.h:168
InDetMaterialManager::MaterialDef::density
double density() const
Definition: InDetMaterialManager.h:167
InDetMaterialManager::MaterialDef::name
const std::string & name() const
Definition: InDetMaterialManager.h:166
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDetMaterialManager::MaterialDef::m_fractions
std::vector< double > m_fractions
Definition: InDetMaterialManager.h:176
InDetMaterialManager::MaterialDef::m_components
std::vector< std::string > m_components
Definition: InDetMaterialManager.h:175
InDetMaterialManager::MaterialDef::m_created
bool m_created
Definition: InDetMaterialManager.h:177
InDetMaterialManager::MaterialDef::m_density
double m_density
Definition: InDetMaterialManager.h:174