ATLAS Offline Software
Loading...
Searching...
No Matches
AGDDMolecule.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10#include <iostream>
11
12std::ostream& operator <<(std::ostream& os, const AGDDMolecule &obj)
13{
14 os<<"- Material "<<obj.m_name<<" type=Molecule density="<<obj.m_density<<std::endl;
15 os<<"\tcomponents"<<std::endl;
16 for (unsigned int i=0;i<obj.m_theElements.size();i++)
17 {
18 const std::string ss=obj.m_theElements[i]->GetName();
19 const int ii=obj.m_theComposition[i];
20 os<<"\t\t element "<<ss<<" natoms="<<ii<<std::endl;
21 }
22 return os;
23}
24
25AGDDMolecule::AGDDMolecule(AGDDMaterialStore& ms, const std::string& n, double d):
26 AGDDSimpleMaterial(ms,n,d)
27{
29}
30
31void AGDDMolecule::AddElement(AGDDMaterialStore& ms, const std::string& el)
32{
33 AGDDElement* element=ms.GetElement(el);
34 m_theElements.push_back(element);
35}
37{
38 m_theComposition.push_back(i);
39}
std::ostream & operator<<(std::ostream &os, const AGDDMolecule &obj)
static Double_t ss
@ Molecule
void NAtoms(int)
std::vector< AGDDElement * > m_theElements
std::vector< int > m_theComposition
AGDDMolecule(AGDDMaterialStore &ms, const std::string &, double)
void AddElement(AGDDMaterialStore &ms, const std::string &)
AGDDSimpleMaterial(AGDDMaterialStore &ms, const std::string &n, double d)