ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TRT_PAI_gasComponent Class Reference

Gas component (molecule) More...

#include <TRT_PAI_gasComponent.h>

Collaboration diagram for TRT_PAI_gasComponent:

Public Member Functions

 TRT_PAI_gasComponent ()
 Constructor of unnamed component. More...
 
 TRT_PAI_gasComponent (const std::string &nm)
 Constructor of gas component. More...
 
void addElement (TRT_PAI_element *pe, unsigned int n)
 Add element to gas component. More...
 
std::string getName ()
 Get name of gas component (molecule) More...
 
int getNElementTypes ()
 Get number of different elements in this gas component (molecule) More...
 
unsigned int getElementMultiplicity (unsigned int n)
 Get multiplicity of this element in gas component (molecule) More...
 
TRT_PAI_elementgetElement (unsigned int n)
 Get pointer to this element in gas component (molecule) More...
 
double getDensity (double tempK=293.)
 Get density of gas component (molecule) at atmospheric preassure. More...
 

Private Attributes

std::string m_name
 
std::vector< TRT_PAI_element * > m_pelements
 
std::vector< unsigned int > m_elementMultiplicity
 

Detailed Description

Gas component (molecule)

Definition at line 16 of file TRT_PAI_gasComponent.h.

Constructor & Destructor Documentation

◆ TRT_PAI_gasComponent() [1/2]

TRT_PAI_gasComponent::TRT_PAI_gasComponent ( )
inline

Constructor of unnamed component.

Definition at line 22 of file TRT_PAI_gasComponent.h.

22 : m_name("unnamed") {};

◆ TRT_PAI_gasComponent() [2/2]

TRT_PAI_gasComponent::TRT_PAI_gasComponent ( const std::string &  nm)
inline

Constructor of gas component.

Parameters
nmcomponent name

Definition at line 28 of file TRT_PAI_gasComponent.h.

28 : m_name(nm) {};

Member Function Documentation

◆ addElement()

void TRT_PAI_gasComponent::addElement ( TRT_PAI_element pe,
unsigned int  n 
)

Add element to gas component.

Parameters
pepointer to element class
nmultiplicity of this element in molecule

Definition at line 10 of file TRT_PAI_gasComponent.cxx.

11  {
12  m_pelements.push_back(pe);
13  m_elementMultiplicity.push_back(n);
14  return;
15 }

◆ getDensity()

double TRT_PAI_gasComponent::getDensity ( double  tempK = 293.)

Get density of gas component (molecule) at atmospheric preassure.

Parameters
tempKTemperature in Kelvin

Definition at line 19 of file TRT_PAI_gasComponent.cxx.

19  {
20  double mass = 0.;
21  int n = m_pelements.size();
22  for ( int i=0; i<n; ++i ) {
23  mass += m_elementMultiplicity[i] * m_pelements[i]->getAtomicA();
24  }
25  double density = mass/22400.;
26  if ( tempK>0. ) density = density*293./tempK;
27  return density;
28 }

◆ getElement()

TRT_PAI_element* TRT_PAI_gasComponent::getElement ( unsigned int  n)
inline

Get pointer to this element in gas component (molecule)

Parameters
nelement number

Definition at line 59 of file TRT_PAI_gasComponent.h.

59 { return m_pelements[n]; }

◆ getElementMultiplicity()

unsigned int TRT_PAI_gasComponent::getElementMultiplicity ( unsigned int  n)
inline

Get multiplicity of this element in gas component (molecule)

Parameters
nelement number

Definition at line 51 of file TRT_PAI_gasComponent.h.

51  {
52  return m_elementMultiplicity[n];
53  }

◆ getName()

std::string TRT_PAI_gasComponent::getName ( )
inline

Get name of gas component (molecule)

Definition at line 40 of file TRT_PAI_gasComponent.h.

40 { return m_name; };

◆ getNElementTypes()

int TRT_PAI_gasComponent::getNElementTypes ( )
inline

Get number of different elements in this gas component (molecule)

Definition at line 45 of file TRT_PAI_gasComponent.h.

45 {return m_pelements.size();}

Member Data Documentation

◆ m_elementMultiplicity

std::vector<unsigned int> TRT_PAI_gasComponent::m_elementMultiplicity
private

Definition at line 69 of file TRT_PAI_gasComponent.h.

◆ m_name

std::string TRT_PAI_gasComponent::m_name
private

Definition at line 67 of file TRT_PAI_gasComponent.h.

◆ m_pelements

std::vector<TRT_PAI_element*> TRT_PAI_gasComponent::m_pelements
private

Definition at line 68 of file TRT_PAI_gasComponent.h.


The documentation for this class was generated from the following files:
TRT_PAI_gasComponent::m_pelements
std::vector< TRT_PAI_element * > m_pelements
Definition: TRT_PAI_gasComponent.h:68
TRT_PAI_gasComponent::m_elementMultiplicity
std::vector< unsigned int > m_elementMultiplicity
Definition: TRT_PAI_gasComponent.h:69
LArG4AODNtuplePlotter.pe
pe
Definition: LArG4AODNtuplePlotter.py:116
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
TRT_PAI_gasComponent::m_name
std::string m_name
Definition: TRT_PAI_gasComponent.h:67
CalibCoolCompareRT.nm
nm
Definition: CalibCoolCompareRT.py:110