ATLAS Offline Software
Loading...
Searching...
No Matches
AGDDMixture.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 AGDDMixture &obj)
13{
14 os<<"- Material "<<obj.m_name<<" type=Mixture density="<<obj.m_density<<std::endl;
15 os<<"\tcomponents"<<std::endl;
16 for (unsigned int i=0;i<obj.m_theMaterials.size();i++)
17 {
18 const std::string ss=obj.m_theMaterials[i]->GetName();
19 const double ii=obj.m_theComposition[i];
20 os<<"\t\t material "<<ss<<" fraction="<<ii<<std::endl;
21 }
22 return os;
23}
24
25AGDDMixture::AGDDMixture(AGDDMaterialStore& ms, const std::string& n, double d):
26 AGDDSimpleMaterial(ms,n,d)
27{
29}
30
31void AGDDMixture::AddMaterial(AGDDMaterialStore& ms, const std::string& el)
32{
33 AGDDSimpleMaterial* material=ms.GetMaterial(el);
34 m_theMaterials.push_back(material);
35}
37{
38 m_theComposition.push_back(d);
39}
std::ostream & operator<<(std::ostream &os, const AGDDMixture &obj)
static Double_t ss
@ Mixture
void AddMaterial(AGDDMaterialStore &ms, const std::string &)
std::vector< double > m_theComposition
Definition AGDDMixture.h:27
std::vector< AGDDSimpleMaterial * > m_theMaterials
Definition AGDDMixture.h:26
AGDDMixture(AGDDMaterialStore &ms, const std::string &, double)
void Fraction(double)
AGDDSimpleMaterial(AGDDMaterialStore &ms, const std::string &n, double d)