5#ifndef INDETMATERIALMANAGER_H
6#define INDETMATERIALMANAGER_H
10#include "GeoModelKernel/GeoIntrusivePtr.h"
11#include "GeoModelKernel/GeoMaterial.h"
41 const std::string & space =
"",
42 bool extraFunctionality =
false);
46 const std::string & space =
"");
52 void addWeightMaterial(
const std::string& materialName,
const std::string& materialBase,
double weight,
int linearWeightFlag);
57 bool hasMaterial(
const std::string &materialName)
const;
60 const GeoMaterial*
getMaterial(std::string_view materialName);
63 const GeoElement*
getElement(
const std::string & elementName);
72 const GeoMaterial*
getMaterial(std::string_view origMaterialName,
74 std::string_view newName = {});
84 const std::string & newName =
"");
89 std::string_view newName = {});
97 const std::string & newName =
"");
102 const std::vector<std::string> & materialComponents,
103 const std::vector<double>& factors,
109 const std::string & materialComponent,
117 const double volumeTot,
118 const double volume1,
const std::string & matName1,
119 const double volume2,
const std::string & matName2
123 const GeoMaterial *
getMaterial(
const std::string & name,
124 const std::vector<std::string> & materialComponents,
125 const std::vector<double> & fractWeights,
189 std::string_view newName = {});
192 const std::string & newName =
"");
194 const std::vector<std::string> & materialComponents,
195 const std::vector<double> & fractWeights,
200 std::string_view newName,
201 const GeoMaterial * origMaterial);
204 const GeoMaterial * origMaterial);
212 using MaterialStore = std::map<std::string, GeoIntrusivePtr<const GeoMaterial>, std::less<>>;
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Class to hold various Athena components.
MaterialByWeight(double weight_in)
MaterialByWeight(const std::string &name_in, double weight_in, bool linearWeightFlag_in)
MaterialComponent(const std::string &name_in, double factor_in=1, bool actualLength_in=-1)
void addComponent(const std::string &compName, double fraction)
std::vector< double > m_fractions
unsigned int numComponents() const
const std::string & compName(unsigned int i) const
std::vector< std::string > m_components
double totalFraction() const
double fraction(unsigned int i) const
const std::string & name() const
ExtraScaleFactorMap m_scalingMap
const GeoMaterial * extraScaledMaterial(std::string_view materialName, std::string_view newName, const GeoMaterial *origMaterial)
const GeoElement * getElement(const std::string &elementName)
Get element from GeoModel material manager.
const GeoMaterial * getAdditionalMaterial(std::string_view materialName) const
std::map< std::string, MaterialByWeight, std::less<> > MaterialWeightMap
MaterialWeightMap m_weightMap
bool compareDensity(double d1, double d2) const
bool m_extraFunctionality
void addMaterial(GeoMaterial *material)
Add material.
void createMaterial(const MaterialDef &material)
MaterialCompositionMap m_matCompositionMap
const GeoMaterial * getMaterialScaledInternal(const std::string &origMaterialName, double scaleFactor, const std::string &newName="")
void addCompositionTable(const IRDBRecordset_ptr &compositionTable, const std::string &space="")
std::map< std::string, double, std::less<> > ExtraScaleFactorMap
std::string m_managerName
const GeoMaterial * getCompositeMaterialForVolume(const std::string &newMatName, const double volumeTot, const double volume1, const std::string &matName1, const double volume2, const std::string &matName2)
std::map< std::string, MaterialComponent, std::less<> > MaterialCompositionMap
StoredMaterialManager * retrieveManager(const StoreGateSvc *detStore)
const GeoMaterial * getMaterialScaled(const std::string &origMaterialName, double scaleFactor, const std::string &newName="")
void addScalingTable(const IRDBRecordset_ptr &scalingTable)
double getExtraScaleFactor(std::string_view materialName)
const GeoMaterial * getMaterialForVolume(std::string_view materialName, double volume, std::string_view newName={})
Create and get material with a density calculated to give weight in predefined weight table.
const GeoMaterial * getMaterial(std::string_view materialName)
Get material. First looks for locally defined material and if not found looks in GeoModel material ma...
void addWeightTable(const IRDBRecordset_ptr &weightTable, const std::string &space="")
StoredMaterialManager * m_materialManager
const GeoMaterial * getMaterialInternal(std::string_view materialName)
void addWeightMaterial(const std::string &materialName, const std::string &materialBase, double weight, int linearWeightFlag)
bool hasMaterial(const std::string &materialName) const
InDetMaterialManager(const std::string &managerName, StoreGateSvc *detStore)
std::map< std::string, GeoIntrusivePtr< const GeoMaterial >, std::less<> > MaterialStore
const GeoMaterial * getMaterialForVolumeLength(const std::string &materialName, double volume, double length, const std::string &newName="")
The Athena Transient Store API.
This class holds one or more material managers and makes them storeable, under StoreGate.