ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_PAI_element.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 <cmath>
7#include <vector>
8#include <string>
9#include <iostream>
10
11//____________________________________________________________________________
12
13TRT_PAI_element::TRT_PAI_element(const std::string & nm,
14 const float *E,
15 const float *S,
16 int N,
17 double Z,
18 double A) :
19 m_name(nm),
20 m_atomicA(A),
21 m_atomicZ(Z)
22{
23 for ( int i=0; i<N; ++i ) {
24 m_lnEnergyLvls.push_back( std::log(E[i]) );
25 m_lnCrossScts.push_back( std::log(S[i]) );
26 }
27 return;
28}
29
30//____________________________________________________________________________
31
32double TRT_PAI_element::getDensity(double tempK) {
33 double density = m_atomicA/22400.;
34 if ( tempK>0. ) density = density*293./tempK;
35 return density;
36}
37
38//____________________________________________________________________________
std::vector< float > m_lnEnergyLvls
double getDensity(double tempK=293.)
Get density of element at atmospheric preassure.
TRT_PAI_element()
Default constructor for unnamed element.
std::string m_name
std::vector< float > m_lnCrossScts
hold the test vectors and ease the comparison