ATLAS Offline Software
SCT_MaterialManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "GeoModelKernel/GeoMaterial.h"
7 #include "GeoModelKernel/GeoElement.h"
10 #include "GaudiKernel/SystemOfUnits.h"
11 
12 #include <iostream>
13 
14 // Constructor
16 {
17  // Make my material manager.
18  m_materialManager = std::make_unique<InDetMaterialManager>("SCT_MaterialManager", db->athenaComps());
19  m_materialManager->addWeightTable(db->weightTable(), "sct");
20  m_materialManager->addScalingTable(db->scalingTable());
21 
22  loadMaterials();
23 
24  m_gasMaterial = m_materialManager->getMaterial("std::Air");
25 }
26 
27 // Add materials not yet in the database
28 void
30 {
31 }
32 
33 const GeoElement*
34 SCT_MaterialManager::getElement(const std::string & elementName)
35 {
36  return m_materialManager->getElement(elementName);
37 }
38 
39 const GeoMaterial*
40 SCT_MaterialManager::getMaterial(const std::string & materialName)
41 {
42  return m_materialManager->getMaterial(materialName);
43 }
44 
45 void
46 SCT_MaterialManager::addMaterial(GeoMaterial* material)
47 {
48  return m_materialManager->addMaterial(material);
49 }
50 
51 const GeoMaterial*
52 SCT_MaterialManager::getMaterial(const std::string & originalMaterial,
53  double density,
54  const std::string & newName)
55 {
56 
57  return m_materialManager->getMaterial(originalMaterial, density, newName);
58 }
59 
60 const GeoMaterial *
61 SCT_MaterialManager::getMaterialForVolume(const std::string & materialName, double volume)
62 {
63  return m_materialManager->getMaterialForVolume(materialName, volume);
64 }
65 
66 
67 
68 const GeoMaterial*
70 {
71  return m_gasMaterial;
72 }
SCT_MaterialManager.h
SCT_DataBase.h
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
SCT_MaterialManager::m_gasMaterial
const GeoMaterial * m_gasMaterial
Definition: SCT_MaterialManager.h:43
SCT_MaterialManager::SCT_MaterialManager
SCT_MaterialManager(SCT_DataBase *db)
Definition: SCT_MaterialManager.cxx:15
SCT_MaterialManager::gasMaterial
const GeoMaterial * gasMaterial() const
Definition: SCT_MaterialManager.cxx:69
SCT_DataBase
Definition: SCT_DataBase.h:17
SCT_MaterialManager::getMaterialForVolume
const GeoMaterial * getMaterialForVolume(const std::string &materialName, double volume)
Definition: SCT_MaterialManager.cxx:61
MakeNewFileFromOldAndSubstitution.newName
dictionary newName
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:95
SCT_MaterialManager::getElement
const GeoElement * getElement(const std::string &elementName)
Definition: SCT_MaterialManager.cxx:34
SCT_MaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Definition: SCT_MaterialManager.cxx:40
SCT_MaterialManager::addMaterial
void addMaterial(GeoMaterial *material)
Definition: SCT_MaterialManager.cxx:46
SCT_MaterialManager::m_materialManager
std::unique_ptr< InDetMaterialManager > m_materialManager
Definition: SCT_MaterialManager.h:42
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
SCT_MaterialManager::loadMaterials
void loadMaterials()
Definition: SCT_MaterialManager.cxx:29