59 std::string gasType =
"NotSet";
77 <<
"'. Must be one of 'Auto', 'Xenon', 'Argon' or 'Krypton'." );
78 return StatusCode::FAILURE;
81 ATH_MSG_INFO ( name() <<
" will use gas type = " << gasType );
89 const double tempK = 289.;
92 using element_type = std::map<std::string, TRT_PAI_element, std::less<std::string>>;
94 element_type elements;
104 for (element_type::iterator ei=elements.begin(); ei!=elements.end(); ++ei) {
106 <<
", A= " << (*ei).second.getAtomicA()
107 <<
", Z= " << (*ei).second.getAtomicZ()
108 <<
", rho=" << (*ei).second.getDensity(tempK)
109 <<
" (" << tempK <<
" Kelvin)"
116 using component_type = std::map<std::string, TRT_PAI_gasComponent, std::less<std::string>>;
118 component_type components;
121 components[
"Xe"].addElement(&elements[
"Xe"],1);
124 components[
"CO2"].addElement(&elements[
"C"],1);
125 components[
"CO2"].addElement(&elements[
"O"],2);
128 components[
"CF4"].addElement(&elements[
"C"],1);
129 components[
"CF4"].addElement(&elements[
"F"],4);
132 components[
"O2"].addElement(&elements[
"O"],2);
135 components[
"Ar"].addElement(&elements[
"Ar"],1);
138 components[
"Kr"].addElement(&elements[
"Kr"],1);
143 std::vector<std::string> cnam(6);
144 cnam[0] =
"Xe"; cnam[1] =
"CO2"; cnam[2] =
"CF4"; cnam[3] =
"CO2"; cnam[4] =
"Ar"; cnam[5] =
"Kr";
147 for (
int ic=0; ic<6; ++ic ) {
148 n = components[cnam[ic]].getNElementTypes();
149 ATH_MSG_DEBUG (
". Gas component " << components[cnam[ic]].getName() <<
" contains");
150 for (
int ie=0; ie<n; ++ie ) {
151 ATH_MSG_DEBUG (
" - " << components[cnam[ic]].getElementMultiplicity(ie)
152 <<
" atoms " << (components[cnam[ic]].getElement(ie))->getName()
153 <<
" with Z= " << (components[cnam[ic]].getElement(ie))->getAtomicZ()
154 <<
" and A= " << (components[cnam[ic]].getElement(ie))->getAtomicA()
157 ATH_MSG_DEBUG (
" > density: " << components[cnam[ic]].getDensity(tempK) <<
" (" << tempK <<
" Kelvin)" );
162 std::string mixtureName=
"TRT Gas Mixture";
163 mixtureName.insert(4, gasType);
166 if ( gasType ==
"Xenon" ) {
167 ATH_MSG_DEBUG (
"Using new Xenon gas mixture (Xe/CO2/O2 - 70/27/3)." );
168 m_trtgas->addComponent( &components[
"Xe"] , 0.70);
169 m_trtgas->addComponent( &components[
"CO2"], 0.27);
170 m_trtgas->addComponent( &components[
"O2"] , 0.03);
173 if (( gasType ==
"XenonOld" )){
174 ATH_MSG_DEBUG (
"Using old Xenon gas mixture (Xe/CO2/CF4 - 70/10/20)." );
175 m_trtgas->addComponent( &components[
"Xe"] , 0.70);
176 m_trtgas->addComponent( &components[
"CO2"], 0.10);
177 m_trtgas->addComponent( &components[
"CF4"], 0.20);
180 if ( gasType ==
"Argon" ) {
181 ATH_MSG_DEBUG (
"Using Argon gas mixture (Ar/CO2/O2 - 70/27/3)." );
182 m_trtgas->addComponent( &components[
"Ar"] , 0.70);
183 m_trtgas->addComponent( &components[
"CO2"], 0.27);
184 m_trtgas->addComponent( &components[
"O2"] , 0.03);
187 if ( gasType ==
"Krypton" ) {
188 ATH_MSG_DEBUG (
"Using Krypton gas mixture (Kr/CO2/O2 - 70/27/3)." );
189 m_trtgas->addComponent( &components[
"Kr"] , 0.70);
190 m_trtgas->addComponent( &components[
"CO2"], 0.27);
191 m_trtgas->addComponent( &components[
"O2"] , 0.03);
203 const double Emin = 12.0;
204 const double Emax = 1e+07;
207 const double eps = 0.01;
213 ATH_MSG_DEBUG (
"Making tables for various gamma factors." );
216 std::vector<float> lnE;
221 gamvec[ig] = 1. + pow(10.,gamvar);
230 return StatusCode::SUCCESS;
void GasTab(const std::vector< float > &gamvec, std::vector< float > &EArray, std::vector< std::vector< float > > &fnArray, std::vector< float > &dndx)
Tabulate double differential distribution.