ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_PAI_gasComponent.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "TRT_PAI_element.h"
7
8//___________________________________________________________________________
9
11 unsigned int n) {
12 m_pelements.push_back(pe);
13 m_elementMultiplicity.push_back(n);
14 return;
15}
16
17//___________________________________________________________________________
18
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}
29
30//___________________________________________________________________________
Chemical element.
double getDensity(double tempK=293.)
Get density of gas component (molecule) at atmospheric preassure.
std::vector< TRT_PAI_element * > m_pelements
std::vector< unsigned int > m_elementMultiplicity
void addElement(TRT_PAI_element *pe, unsigned int n)
Add element to gas component.