ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetSimUtils
TRT_PAI_Process
src
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
"
6
#include "
TRT_PAI_gasComponent.h
"
7
8
//___________________________________________________________________________
9
10
void
TRT_PAI_gasComponent::addElement
(
TRT_PAI_element
* pe,
11
unsigned
int
n) {
12
m_pelements
.push_back(pe);
13
m_elementMultiplicity
.push_back(n);
14
return
;
15
}
16
17
//___________________________________________________________________________
18
19
double
TRT_PAI_gasComponent::getDensity
(
double
tempK) {
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
//___________________________________________________________________________
TRT_PAI_element.h
TRT_PAI_gasComponent.h
TRT_PAI_element
Chemical element.
Definition
TRT_PAI_element.h:14
TRT_PAI_gasComponent::getDensity
double getDensity(double tempK=293.)
Get density of gas component (molecule) at atmospheric preassure.
Definition
TRT_PAI_gasComponent.cxx:19
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
TRT_PAI_gasComponent::addElement
void addElement(TRT_PAI_element *pe, unsigned int n)
Add element to gas component.
Definition
TRT_PAI_gasComponent.cxx:10
Generated on
for ATLAS Offline Software by
1.17.0