ATLAS Offline Software
Loading...
Searching...
No Matches
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}
#define endmsg
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
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.
virtual unsigned int size() const =0
const IGeoDbTagSvc * geoDbTagSvc() const
std::unique_ptr< InDetMaterialManager > m_materialManagerUnique
const GeoMaterial * getMaterial(const std::string &materialName)
Get material. First looks for locally defined material and if not found looks in GeoModel material ma...
MsgStream & msg
Definition testRead.cxx:32

◆ 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: