ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDModel
src
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
5
#include "
AGDDModel/AGDDMolecule.h
"
6
#include "
AGDDModel/AGDDElement.h
"
7
#include "
AGDDModel/AGDDSimpleMaterial.h
"
8
#include "
AGDDModel/AGDDMaterialStore.h
"
9
10
#include <iostream>
11
12
std::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
25
AGDDMolecule::AGDDMolecule
(
AGDDMaterialStore
& ms,
const
std::string& n,
double
d):
26
AGDDSimpleMaterial
(ms,n,d)
27
{
28
m_mType
=
Molecule
;
29
}
30
31
void
AGDDMolecule::AddElement
(
AGDDMaterialStore
& ms,
const
std::string& el)
32
{
33
AGDDElement
* element=ms.GetElement(el);
34
m_theElements
.push_back(element);
35
}
36
void
AGDDMolecule::NAtoms
(
int
i)
37
{
38
m_theComposition
.push_back(i);
39
}
AGDDElement.h
AGDDMaterialStore.h
operator<<
std::ostream & operator<<(std::ostream &os, const AGDDMolecule &obj)
Definition
AGDDMolecule.cxx:12
AGDDMolecule.h
AGDDSimpleMaterial.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
Molecule
@ Molecule
Definition
MaterialTypes.h:8
AGDDElement
Definition
AGDDElement.h:11
AGDDMaterialStore
Definition
AGDDMaterialStore.h:23
AGDDMolecule::NAtoms
void NAtoms(int)
Definition
AGDDMolecule.cxx:36
AGDDMolecule::m_theElements
std::vector< AGDDElement * > m_theElements
Definition
AGDDMolecule.h:26
AGDDMolecule::m_theComposition
std::vector< int > m_theComposition
Definition
AGDDMolecule.h:27
AGDDMolecule::AGDDMolecule
AGDDMolecule(AGDDMaterialStore &ms, const std::string &, double)
Definition
AGDDMolecule.cxx:25
AGDDMolecule::AddElement
void AddElement(AGDDMaterialStore &ms, const std::string &)
Definition
AGDDMolecule.cxx:31
AGDDSimpleMaterial::m_mType
material_type m_mType
Definition
AGDDSimpleMaterial.h:38
AGDDSimpleMaterial::AGDDSimpleMaterial
AGDDSimpleMaterial(AGDDMaterialStore &ms, const std::string &n, double d)
Definition
AGDDSimpleMaterial.h:17
Generated on
for ATLAS Offline Software by
1.17.0