23 ATH_MSG_ERROR(
"gasMixture::addComponent: cannot add new gasComponent "
24 "- gas already frozen");
40 for (
int j=0; j<nComp; j++) {
43 "A gasComponent has non-positive fraction");
49 if ( std::abs(wtot-1.) > 1e-5 ) {
51 "Gas fractions do not add to unity but " << wtot
52 <<
". Re-normalizing!!");
55 for (
int j=0; j<nComp; ++j ) {
66 for (
int j=0; j<nComp; j++) {
67 for(
int i=0; i<
m_pcomp[j]->getNElementTypes(); i++) {
71 for (
unsigned int k=0; k<
m_pelem.size(); k++ ) {
92 ATH_MSG_WARNING(
"gasMixture::showStructure: Showing structure of non-frozen gas");
99 <<
m_pcomp[i]->getName() <<
" consisting of: ";
100 for (
int j=0; j<
m_pcomp[i]->getNElementTypes(); j++) {
101 if ( j>0 )
msg(MSG::INFO) <<
",";
102 msg(MSG::INFO) <<
" " <<
m_pcomp[i]->getElementMultiplicity(j)
103 <<
" atoms " <<
m_pcomp[i]->getElement(j)->getName();
139 ATH_MSG_ERROR(
"TRT_PAI_gasMixture::getElement: out of bounds");
151 ATH_MSG_ERROR(
"gasMixture::getElemFraction:Error:out of bounds");
#define ATH_MSG_WARNING(x)
MsgStream & msg() const
The standard message stream.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
std::vector< double > m_elemWeights
TRT_PAI_element * getElement(unsigned int n)
Get element no.
void freezeGas()
Components can be added to gas mixture before freezeGas is called.
double getCompFraction(unsigned int n)
Get fraction of gas component no.
void addComponent(TRT_PAI_gasComponent *pgc, double frac)
Add gas component to gas mixture.
std::vector< TRT_PAI_element * > m_pelem
double getElemWeight(unsigned int n)
Get weight of element no.
void showStructure()
Print out of structure of this gas mixture.
std::vector< TRT_PAI_gasComponent * > m_pcomp
TRT_PAI_gasMixture(const std::string &nm)
Construct gas mixture.
std::vector< double > m_compFracs
TRT_PAI_gasComponent * getComponent(unsigned int n)
Get gas component no.