ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PixelServMatFactory Class Reference

#include <PixelServMatFactory.h>

Inheritance diagram for PixelServMatFactory:
Collaboration diagram for PixelServMatFactory:

Public Member Functions

 PixelServMatFactory (InDetDD::AthenaComps *athenaComps)
 
 ~PixelServMatFactory ()
 
void create (GeoPhysVol *mother)
 
StoreGateSvcdetStore ()
 
const IGeoDbTagSvcgeoDbTagSvc () const
 
IRDBAccessSvcrdbAccessSvc ()
 
const IGeometryDBSvcgeomDB () const
 
InDetMaterialManagermaterialManager ()
 
MsgStream & msg (MSG::Level lvl) const
 
bool msgLvl (MSG::Level lvl) const
 
InDetDD::AthenaCompsgetAthenaComps ()
 

Protected Attributes

InDetMaterialManagerm_materialManager
 
std::unique_ptr< InDetMaterialManagerm_materialManagerUnique
 

Private Member Functions

const PixelServMatFactoryoperator= (const PixelServMatFactory &right)
 
 PixelServMatFactory (const PixelServMatFactory &right)
 

Private Attributes

InDetDD::AthenaCompsm_athenaComps
 

Detailed Description

Definition at line 13 of file PixelServMatFactory.h.

Constructor & Destructor Documentation

◆ PixelServMatFactory() [1/2]

PixelServMatFactory::PixelServMatFactory ( InDetDD::AthenaComps athenaComps)

Definition at line 33 of file PixelServMatFactory.cxx.

34  : InDetDD::SubDetectorFactoryBase(athenaComps)
35 {}

◆ ~PixelServMatFactory()

PixelServMatFactory::~PixelServMatFactory ( )

Definition at line 38 of file PixelServMatFactory.cxx.

39 {
40 }

◆ PixelServMatFactory() [2/2]

PixelServMatFactory::PixelServMatFactory ( const PixelServMatFactory right)
private

Member Function Documentation

◆ create()

void PixelServMatFactory::create ( GeoPhysVol *  mother)

Definition at line 44 of file PixelServMatFactory.cxx.

45 {
46  msg(MSG::DEBUG) << "Building Pixel Service Material" << endmsg;
47 
48  DecodeVersionKey indetVersionKey(geoDbTagSvc(),"InnerDetector");
49  DecodeVersionKey pixelVersionKey(geoDbTagSvc(),"Pixel");
50 
51  IRDBRecordset_ptr pixelGenServices = rdbAccessSvc()->getRecordsetPtr("PixelGenServices", indetVersionKey.tag(), indetVersionKey.node());
52 
53  // Doesn't exist at time of writing but we include it to keep things general
54  IRDBRecordset_ptr weightTable = rdbAccessSvc()->getRecordsetPtr("PixelWeights", pixelVersionKey.tag(), pixelVersionKey.node());
55 
56  IRDBRecordset_ptr scalingTable = rdbAccessSvc()->getRecordsetPtr("InDetServMatScaling", indetVersionKey.tag(), indetVersionKey.node());
57 
58  // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
59  // with weights table if it exists
60  m_materialManagerUnique = std::make_unique<InDetMaterialManager>("PixelMaterialManager", getAthenaComps());
62  m_materialManager->addWeightTable(weightTable, "pix");
63  m_materialManager->addScalingTable(scalingTable);
64 
65  // Build general services:
66  //
67 
68  for (unsigned int ii =0; ii < pixelGenServices->size(); ii++) {
69 
70  InDetDD::GenericTubeMaker tubeHelper((*pixelGenServices)[ii]);
71  const GeoShape * serviceTubeTmp = tubeHelper.buildShape();
72 
73  std::string logName = tubeHelper.name();
74  if (logName.empty()) {
75  std::ostringstream o; o << ii;
76  logName = "ServMat"+o.str();
77  }
78  logName = "Pix" + logName;
79 
80  const GeoShape* serviceTube = serviceTubeTmp;
81 
82  std::string materialName = tubeHelper.materialName();
83  //const GeoMaterial* material = m_materialManager->getMaterialForVolume(materialName, serviceTube->volume());
84  const GeoMaterial* material = materialManager()->getMaterial(materialName);
85 
86  const GeoLogVol* servLog = new GeoLogVol(logName,serviceTube,material);
87  GeoVPhysVol* servPhys = new GeoPhysVol(servLog);
88 
89  tubeHelper.placeVolume(mother, servPhys);
90 
91  }
92 }

◆ detStore()

StoreGateSvc* InDetDD::SubDetectorFactoryBase::detStore ( )
inlineinherited

Definition at line 39 of file InDetSubDetectorFactoryBase.h.

39 {return m_athenaComps->detStore();}

◆ geoDbTagSvc()

const IGeoDbTagSvc* InDetDD::SubDetectorFactoryBase::geoDbTagSvc ( ) const
inlineinherited

Definition at line 41 of file InDetSubDetectorFactoryBase.h.

41 {return std::as_const(*m_athenaComps).geoDbTagSvc();}

◆ geomDB()

const IGeometryDBSvc* InDetDD::SubDetectorFactoryBase::geomDB ( ) const
inlineinherited

Definition at line 45 of file InDetSubDetectorFactoryBase.h.

45 {return m_athenaComps->geomDB();}

◆ getAthenaComps()

InDetDD::AthenaComps* InDetDD::SubDetectorFactoryBase::getAthenaComps ( )
inlineinherited

Definition at line 55 of file InDetSubDetectorFactoryBase.h.

55 {return m_athenaComps;}

◆ materialManager()

InDetMaterialManager* InDetDD::SubDetectorFactoryBase::materialManager ( )
inlineinherited

Definition at line 47 of file InDetSubDetectorFactoryBase.h.

47 {return m_materialManager;}

◆ msg()

MsgStream& InDetDD::SubDetectorFactoryBase::msg ( MSG::Level  lvl) const
inlineinherited

Definition at line 50 of file InDetSubDetectorFactoryBase.h.

50 { return m_athenaComps->msg(lvl); }

◆ msgLvl()

bool InDetDD::SubDetectorFactoryBase::msgLvl ( MSG::Level  lvl) const
inlineinherited

Definition at line 53 of file InDetSubDetectorFactoryBase.h.

53 { return m_athenaComps->msgLvl(lvl); }

◆ operator=()

const PixelServMatFactory& PixelServMatFactory::operator= ( const PixelServMatFactory right)
private

◆ rdbAccessSvc()

IRDBAccessSvc* InDetDD::SubDetectorFactoryBase::rdbAccessSvc ( )
inlineinherited

Definition at line 43 of file InDetSubDetectorFactoryBase.h.

43 {return m_athenaComps->rdbAccessSvc();}

Member Data Documentation

◆ m_athenaComps

InDetDD::AthenaComps* InDetDD::SubDetectorFactoryBase::m_athenaComps
privateinherited

Definition at line 58 of file InDetSubDetectorFactoryBase.h.

◆ m_materialManager

InDetMaterialManager* InDetDD::SubDetectorFactoryBase::m_materialManager
protectedinherited

Definition at line 61 of file InDetSubDetectorFactoryBase.h.

◆ m_materialManagerUnique

std::unique_ptr<InDetMaterialManager> InDetDD::SubDetectorFactoryBase::m_materialManagerUnique
protectedinherited

Definition at line 63 of file InDetSubDetectorFactoryBase.h.


The documentation for this class was generated from the following files:
InDetMaterialManager::addWeightTable
void addWeightTable(const IRDBRecordset_ptr &weightTable, const std::string &space="")
Definition: InDetMaterialManager.cxx:321
InDetDD::GenericTubeMaker
Definition: GenericTubeMaker.h:29
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
InDetDD::SubDetectorFactoryBase::getAthenaComps
InDetDD::AthenaComps * getAthenaComps()
Definition: InDetSubDetectorFactoryBase.h:55
InDetDD::SubDetectorFactoryBase::m_materialManager
InDetMaterialManager * m_materialManager
Definition: InDetSubDetectorFactoryBase.h:61
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
InDetDD::SubDetectorFactoryBase::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetSubDetectorFactoryBase.h:43
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
InDetDD::SubDetectorFactoryBase::geoDbTagSvc
const IGeoDbTagSvc * geoDbTagSvc() const
Definition: InDetSubDetectorFactoryBase.h:41
InDetDD::SubDetectorFactoryBase::m_materialManagerUnique
std::unique_ptr< InDetMaterialManager > m_materialManagerUnique
Definition: InDetSubDetectorFactoryBase.h:63
InDetMaterialManager::addScalingTable
void addScalingTable(const IRDBRecordset_ptr &scalingTable)
Definition: InDetMaterialManager.cxx:431
InDetDD::SubDetectorFactoryBase
Definition: InDetSubDetectorFactoryBase.h:25
InDetDD::SubDetectorFactoryBase::msg
MsgStream & msg(MSG::Level lvl) const
Definition: InDetSubDetectorFactoryBase.h:50
InDetDD::AthenaComps::geomDB
const IGeometryDBSvc * geomDB() const
Definition: InDetDDAthenaComps.h:63
InDetDD::SubDetectorFactoryBase::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: InDetSubDetectorFactoryBase.h:58
DEBUG
#define DEBUG
Definition: page_access.h:11
InDetDD::SubDetectorFactoryBase::materialManager
InDetMaterialManager * materialManager()
Definition: InDetSubDetectorFactoryBase.h:47
InDetDD::AthenaComps::detStore
const StoreGateSvc * detStore() const
Definition: InDetDDAthenaComps.h:53
InDetMaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Get material. First looks for locally defined material and if not found looks in GeoModel material ma...
Definition: InDetMaterialManager.cxx:96
InDetDD::AthenaComps::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDDAthenaComps.h:74