ATLAS Offline Software
Loading...
Searching...
No Matches
AGDDMolecule Class Reference

#include <AGDDMolecule.h>

Inheritance diagram for AGDDMolecule:
Collaboration diagram for AGDDMolecule:

Public Member Functions

 AGDDMolecule (AGDDMaterialStore &ms, const std::string &, double)
void AddElement (AGDDMaterialStore &ms, const std::string &)
void NAtoms (int)
int NComponents () const
AGDDElementElement (int i)
int Composition (int i) const
void RegisterToStore (AGDDMaterialStore &ms, AGDDSimpleMaterial *)
const std::string & GetName () const
double GetDensity () const
material_type GetMaterialType () const
void Created (bool b)
bool Extant () const
void * GetMaterial ()
void SetMaterial (void *mat)

Protected Attributes

std::string m_name
double m_density
bool m_created
material_type m_mType
void * m_theMaterial

Private Attributes

std::vector< AGDDElement * > m_theElements
std::vector< int > m_theComposition

Friends

std::ostream & operator<< (std::ostream &os, const AGDDMolecule &obj)

Detailed Description

Definition at line 16 of file AGDDMolecule.h.

Constructor & Destructor Documentation

◆ AGDDMolecule()

AGDDMolecule::AGDDMolecule ( AGDDMaterialStore & ms,
const std::string & n,
double d )

Definition at line 25 of file AGDDMolecule.cxx.

25 :
26 AGDDSimpleMaterial(ms,n,d)
27{
29}
@ Molecule
AGDDSimpleMaterial(AGDDMaterialStore &ms, const std::string &n, double d)

Member Function Documentation

◆ AddElement()

void AGDDMolecule::AddElement ( AGDDMaterialStore & ms,
const std::string & el )

Definition at line 31 of file AGDDMolecule.cxx.

32{
33 AGDDElement* element=ms.GetElement(el);
34 m_theElements.push_back(element);
35}
std::vector< AGDDElement * > m_theElements

◆ Composition()

int AGDDMolecule::Composition ( int i) const
inline

Definition at line 24 of file AGDDMolecule.h.

24{return m_theComposition[i];}
std::vector< int > m_theComposition

◆ Created()

void AGDDSimpleMaterial::Created ( bool b)
inlineinherited

◆ Element()

AGDDElement * AGDDMolecule::Element ( int i)
inline

Definition at line 23 of file AGDDMolecule.h.

23{return m_theElements[i];}

◆ Extant()

bool AGDDSimpleMaterial::Extant ( ) const
inlineinherited

Definition at line 30 of file AGDDSimpleMaterial.h.

30{return m_created;}

◆ GetDensity()

double AGDDSimpleMaterial::GetDensity ( ) const
inlineinherited

Definition at line 27 of file AGDDSimpleMaterial.h.

27{return m_density;}

◆ GetMaterial()

void * AGDDSimpleMaterial::GetMaterial ( )
inlineinherited

Definition at line 31 of file AGDDSimpleMaterial.h.

31{return m_theMaterial;}

◆ GetMaterialType()

material_type AGDDSimpleMaterial::GetMaterialType ( ) const
inlineinherited

Definition at line 28 of file AGDDSimpleMaterial.h.

28{return m_mType;}

◆ GetName()

const std::string & AGDDSimpleMaterial::GetName ( ) const
inherited

Definition at line 23 of file AGDDSimpleMaterial.cxx.

24{
25 return m_name;
26}

◆ NAtoms()

void AGDDMolecule::NAtoms ( int i)

Definition at line 36 of file AGDDMolecule.cxx.

37{
38 m_theComposition.push_back(i);
39}

◆ NComponents()

int AGDDMolecule::NComponents ( ) const
inline

Definition at line 22 of file AGDDMolecule.h.

22{return m_theElements.size();}

◆ RegisterToStore()

void AGDDSimpleMaterial::RegisterToStore ( AGDDMaterialStore & ms,
AGDDSimpleMaterial * e )
inherited

Definition at line 17 of file AGDDSimpleMaterial.cxx.

19{
20 ms.RegisterMaterial(e);
21}

◆ SetMaterial()

void AGDDSimpleMaterial::SetMaterial ( void * mat)
inlineinherited

Definition at line 32 of file AGDDSimpleMaterial.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const AGDDMolecule & obj )
friend

Definition at line 12 of file AGDDMolecule.cxx.

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}
static Double_t ss

Member Data Documentation

◆ m_created

bool AGDDSimpleMaterial::m_created
protectedinherited

Definition at line 36 of file AGDDSimpleMaterial.h.

◆ m_density

double AGDDSimpleMaterial::m_density
protectedinherited

Definition at line 35 of file AGDDSimpleMaterial.h.

◆ m_mType

material_type AGDDSimpleMaterial::m_mType
protectedinherited

Definition at line 38 of file AGDDSimpleMaterial.h.

◆ m_name

std::string AGDDSimpleMaterial::m_name
protectedinherited

Definition at line 34 of file AGDDSimpleMaterial.h.

◆ m_theComposition

std::vector<int> AGDDMolecule::m_theComposition
private

Definition at line 27 of file AGDDMolecule.h.

◆ m_theElements

std::vector<AGDDElement*> AGDDMolecule::m_theElements
private

Definition at line 26 of file AGDDMolecule.h.

◆ m_theMaterial

void* AGDDSimpleMaterial::m_theMaterial
protectedinherited

Definition at line 39 of file AGDDSimpleMaterial.h.


The documentation for this class was generated from the following files: