![]() |
ATLAS Offline Software
|
#include <InDetMaterialManager.h>
Classes | |
| class | MaterialByWeight |
| class | MaterialComponent |
| class | MaterialDef |
| Class to hold information need to create a material. More... | |
Public Member Functions | |
| InDetMaterialManager (const std::string &managerName, StoreGateSvc *detStore) | |
| InDetMaterialManager (const std::string &managerName, StoreGateSvc *detStore, const IRDBRecordset_ptr &weightTable, const std::string &space="", bool extraFunctionality=false) | |
| InDetMaterialManager (const std::string &managerName, StoreGateSvc *detStore, const IRDBRecordset_ptr &weightTable, const IRDBRecordset_ptr &compositionTable, const std::string &space="") | |
| InDetMaterialManager (const std::string &managerName, InDetDD::AthenaComps *) | |
| ~InDetMaterialManager () | |
| void | addWeightTable (const IRDBRecordset_ptr &weightTable, const std::string &space="") |
| void | addWeightMaterial (const std::string &materialName, const std::string &materialBase, double weight, int linearWeightFlag) |
| void | addCompositionTable (const IRDBRecordset_ptr &compositionTable, const std::string &space="") |
| void | addScalingTable (const IRDBRecordset_ptr &scalingTable) |
| bool | hasMaterial (const std::string &materialName) const |
| const GeoMaterial * | getMaterial (std::string_view materialName) |
| Get material. First looks for locally defined material and if not found looks in GeoModel material manager. | |
| const GeoElement * | getElement (const std::string &elementName) |
| Get element from GeoModel material manager. | |
| const GeoMaterial * | getMaterial (std::string_view origMaterialName, double density, std::string_view newName={}) |
| Create and get material with a specified density based on an existing material. | |
| const GeoMaterial * | getMaterialScaled (const std::string &origMaterialName, double scaleFactor, const std::string &newName="") |
| 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 * | getMaterialForVolumeLength (const std::string &materialName, double volume, double length, const std::string &newName="") |
| const GeoMaterial * | getMaterialForVolumeLength (const std::string &name, const std::vector< std::string > &materialComponents, const std::vector< double > &factors, double volume, double length) |
| const GeoMaterial * | getMaterialForVolumeLength (const std::string &name, const std::string &materialComponent, double factor, double volume, double length) |
| const GeoMaterial * | getCompositeMaterialForVolume (const std::string &newMatName, const double volumeTot, const double volume1, const std::string &matName1, const double volume2, const std::string &matName2) |
| const GeoMaterial * | getMaterial (const std::string &name, const std::vector< std::string > &materialComponents, const std::vector< double > &fractWeights, double density) |
| void | addMaterial (GeoMaterial *material) |
| Add material. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Private Types | |
| using | MaterialStore = std::map<std::string, GeoIntrusivePtr<const GeoMaterial>, std::less<>> |
| typedef std::map< std::string, MaterialByWeight, std::less<> > | MaterialWeightMap |
| typedef std::map< std::string, MaterialComponent, std::less<> > | MaterialCompositionMap |
| typedef std::map< std::string, double, std::less<> > | ExtraScaleFactorMap |
Private Member Functions | |
| StoredMaterialManager * | retrieveManager (const StoreGateSvc *detStore) |
| const GeoMaterial * | getAdditionalMaterial (std::string_view materialName) const |
| bool | compareDensity (double d1, double d2) const |
| const GeoMaterial * | getMaterialInternal (std::string_view materialName) |
| const GeoMaterial * | getMaterialInternal (std::string_view origMaterialName, double density, std::string_view newName={}) |
| const GeoMaterial * | getMaterialScaledInternal (const std::string &origMaterialName, double scaleFactor, const std::string &newName="") |
| const GeoMaterial * | getMaterialInternal (const std::string &name, const std::vector< std::string > &materialComponents, const std::vector< double > &fractWeights, double density) |
| const GeoMaterial * | extraScaledMaterial (std::string_view materialName, std::string_view newName, const GeoMaterial *origMaterial) |
| const GeoMaterial * | extraScaledMaterial (std::string_view materialName, const GeoMaterial *origMaterial) |
| void | createMaterial (const MaterialDef &material) |
| double | getExtraScaleFactor (std::string_view materialName) |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| StoredMaterialManager * | m_materialManager |
| std::string | m_managerName |
| MaterialStore | m_store |
| MaterialWeightMap | m_weightMap |
| MaterialCompositionMap | m_matCompositionMap |
| ExtraScaleFactorMap | m_scalingMap |
| bool | m_extraFunctionality |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
This provides an interface to the GeoModel Material Manager as well as allowing additional materials to be defined or standard ones redefined. It also allows creating new materials based on existing ones but with a different density. It is also possible to specify a weight table and this is used to create materials with a density such that the the total weight is correct.
Definition at line 33 of file InDetMaterialManager.h.
|
private |
Definition at line 221 of file InDetMaterialManager.h.
|
private |
Definition at line 218 of file InDetMaterialManager.h.
|
private |
Definition at line 212 of file InDetMaterialManager.h.
|
private |
Definition at line 215 of file InDetMaterialManager.h.
| InDetMaterialManager::InDetMaterialManager | ( | const std::string & | managerName, |
| StoreGateSvc * | detStore ) |
Definition at line 28 of file InDetMaterialManager.cxx.
| InDetMaterialManager::InDetMaterialManager | ( | const std::string & | managerName, |
| StoreGateSvc * | detStore, | ||
| const IRDBRecordset_ptr & | weightTable, | ||
| const std::string & | space = "", | ||
| bool | extraFunctionality = false ) |
Definition at line 38 of file InDetMaterialManager.cxx.
| InDetMaterialManager::InDetMaterialManager | ( | const std::string & | managerName, |
| StoreGateSvc * | detStore, | ||
| const IRDBRecordset_ptr & | weightTable, | ||
| const IRDBRecordset_ptr & | compositionTable, | ||
| const std::string & | space = "" ) |
Definition at line 58 of file InDetMaterialManager.cxx.
| InDetMaterialManager::InDetMaterialManager | ( | const std::string & | managerName, |
| InDetDD::AthenaComps * | athenaComps ) |
Definition at line 72 of file InDetMaterialManager.cxx.
|
default |
| void InDetMaterialManager::addCompositionTable | ( | const IRDBRecordset_ptr & | compositionTable, |
| const std::string & | space = "" ) |
Definition at line 389 of file InDetMaterialManager.cxx.
| void InDetMaterialManager::addMaterial | ( | GeoMaterial * | material | ) |
Add material.
Definition at line 302 of file InDetMaterialManager.cxx.
| void InDetMaterialManager::addScalingTable | ( | const IRDBRecordset_ptr & | scalingTable | ) |
Definition at line 411 of file InDetMaterialManager.cxx.
| void InDetMaterialManager::addWeightMaterial | ( | const std::string & | materialName, |
| const std::string & | materialBase, | ||
| double | weight, | ||
| int | linearWeightFlag ) |
Definition at line 372 of file InDetMaterialManager.cxx.
| void InDetMaterialManager::addWeightTable | ( | const IRDBRecordset_ptr & | weightTable, |
| const std::string & | space = "" ) |
Definition at line 327 of file InDetMaterialManager.cxx.
|
private |
Definition at line 319 of file InDetMaterialManager.cxx.
|
private |
Definition at line 697 of file InDetMaterialManager.cxx.
|
private |
Definition at line 817 of file InDetMaterialManager.cxx.
|
private |
Definition at line 806 of file InDetMaterialManager.cxx.
|
private |
Definition at line 127 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getCompositeMaterialForVolume | ( | const std::string & | newMatName, |
| const double | volumeTot, | ||
| const double | volume1, | ||
| const std::string & | matName1, | ||
| const double | volume2, | ||
| const std::string & | matName2 ) |
Definition at line 137 of file InDetMaterialManager.cxx.
Get element from GeoModel material manager.
Definition at line 89 of file InDetMaterialManager.cxx.
|
private |
Definition at line 848 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterial | ( | const std::string & | name, |
| const std::vector< std::string > & | materialComponents, | ||
| const std::vector< double > & | fractWeights, | ||
| double | density ) |
Definition at line 658 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterial | ( | std::string_view | materialName | ) |
Get material. First looks for locally defined material and if not found looks in GeoModel material manager.
Definition at line 99 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterial | ( | std::string_view | origMaterialName, |
| double | density, | ||
| std::string_view | newName = {} ) |
Create and get material with a specified density based on an existing material.
If a newName is supplied it creates the new material even if the orginal material has the same density. It however first checks if the material with NewName exists. If no newName is supplied then it checks the density of the existing material. If it is consistent it returns the material. If it is different it creates a material with the string "Modified" added to the name.
Definition at line 209 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::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.
Definition at line 432 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterialForVolumeLength | ( | const std::string & | materialName, |
| double | volume, | ||
| double | length, | ||
| const std::string & | newName = "" ) |
Definition at line 486 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterialForVolumeLength | ( | const std::string & | name, |
| const std::string & | materialComponent, | ||
| double | factor, | ||
| double | volume, | ||
| double | length ) |
Definition at line 550 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterialForVolumeLength | ( | const std::string & | name, |
| const std::vector< std::string > & | materialComponents, | ||
| const std::vector< double > & | factors, | ||
| double | volume, | ||
| double | length ) |
Definition at line 561 of file InDetMaterialManager.cxx.
|
private |
Definition at line 666 of file InDetMaterialManager.cxx.
|
private |
Definition at line 109 of file InDetMaterialManager.cxx.
|
private |
Definition at line 217 of file InDetMaterialManager.cxx.
| const GeoMaterial * InDetMaterialManager::getMaterialScaled | ( | const std::string & | origMaterialName, |
| double | scaleFactor, | ||
| const std::string & | newName = "" ) |
Definition at line 256 of file InDetMaterialManager.cxx.
|
private |
Definition at line 264 of file InDetMaterialManager.cxx.
| bool InDetMaterialManager::hasMaterial | ( | const std::string & | materialName | ) | const |
Definition at line 104 of file InDetMaterialManager.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 167 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 182 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
inlineprivate |
Definition at line 84 of file InDetMaterialManager.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 225 of file InDetMaterialManager.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
private |
Definition at line 210 of file InDetMaterialManager.h.
|
private |
Definition at line 219 of file InDetMaterialManager.h.
|
private |
Definition at line 209 of file InDetMaterialManager.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 222 of file InDetMaterialManager.h.
|
private |
Definition at line 213 of file InDetMaterialManager.h.
|
private |
Definition at line 216 of file InDetMaterialManager.h.