12#include "GaudiKernel/SystemOfUnits.h"
25 const std::string& pixelDetectorKey = pixelVersionKey.
tag();
26 const std::string& pixelDetectorNode = pixelVersionKey.
node();
30 const std::string& sctDetectorKey = sctVersionKey.
tag();
31 const std::string& sctDetectorNode = sctVersionKey.
node();
35 const std::string& indetDetectorKey = indetVersionKey.
tag();
36 const std::string& indetDetectorNode = indetVersionKey.
node();
44 ATH_MSG_DEBUG(
"Retrieving Pixel Record Sets from database ...");
45 ATH_MSG_DEBUG(
"Pixel: Key = " << pixelDetectorKey <<
" Node = " << pixelDetectorNode);
46 ATH_MSG_DEBUG(
"SCT: Key = " << sctDetectorKey <<
" Node = " << sctDetectorNode);
47 ATH_MSG_DEBUG(
"InDet: Key = " << indetDetectorKey <<
" Node = " << indetDetectorNode);
96 if(!(*
m_switches)[0]->isFieldNull(
"BUILDSERVICES")) {
97 return (*
m_switches)[0]->getInt(
"BUILDSERVICES");
100 catch(std::runtime_error&) {
101 ATH_MSG_DEBUG(
"The switches table has no BUILDSERVICES column");
110 if(rec->getString(
"NAME")==name)
return i;
133 if (ind >= 0) (*m_InDetSimpleServices)[ind]->getDouble(
"ZMIN");
140 if (ind >= 0) (*m_InDetSimpleServices)[ind]->getDouble(
"ZMAX");
160 return (*
m_PixelLayer)[layer]->getDouble(
"RLAYER") * Gaudi::Units::mm;
166 int staveIndex = (*m_PixelLayer)[layer]->getInt(
"STAVEINDEX");
167 return (*
m_PixelStave)[staveIndex]->getDouble(
"ENVLENGTH") * Gaudi::Units::mm;
179 int staveIndex = (*m_PixelLayer)[layer]->getInt(
"STAVEINDEX");
186 int staveIndex = (*m_PixelLayer)[layer]->getInt(
"STAVEINDEX");
188 if(!(*
m_PixelStave)[staveIndex]->isFieldNull(
"BENTSTAVEANGLE")) {
189 return (*
m_PixelStave)[staveIndex]->getDouble(
"BENTSTAVEANGLE");
192 catch(std::runtime_error&) {
193 ATH_MSG_DEBUG(
"No value for the BENTSTAVEANGLE column in the PixelStave table record " << staveIndex);
200 int staveIndex = (*m_PixelLayer)[layer]->getInt(
"STAVEINDEX");
202 if(!(*
m_PixelStave)[staveIndex]->isFieldNull(
"BENTSTAVENMODULE")) {
203 return (*
m_PixelStave)[staveIndex]->getDouble(
"BENTSTAVENMODULE");
206 catch(std::runtime_error&) {
207 ATH_MSG_DEBUG(
"No value for the BENTSTAVEMODULE column in the PixelStave table record " << staveIndex);
214 int staveIndex = (*m_PixelLayer)[layer]->getInt(
"STAVEINDEX");
215 return (*
m_PixelStave)[staveIndex]->getDouble(
"MODULEDZ");
221 if(!(*
m_PixelDisk)[layer]->isFieldNull(
"NSECTORS")) {
234 int nModulesDisk = 0;
236 int disk = diskRing->getInt(
"DISK");
238 int ring = diskRing->getInt(
"RING");
251 int disk = diskRing->getInt(
"DISK");
253 int ring = diskRing->getInt(
"RING");
254 int moduleType = diskRing->getInt(
"MODULETYPE");
256 sumModules += nModules;
260 if(sumModules==0)
return 0;
261 if (sumChips % sumModules == 0)
return sumChips/sumModules;
262 else return 1 + sumChips/sumModules;
274 return (*
m_PixelDisk)[disk]->getDouble(
"ZDISK") * Gaudi::Units::mm;
281 if(route==
"StdRoute")
282 return (*
m_PixelDisk)[disk]->getDouble(
"RMIN") * Gaudi::Units::mm - 11*Gaudi::Units::mm;
285 return (*
m_PixelDisk)[disk]->getDouble(
"SUP1RMIN") * Gaudi::Units::mm;
293 if(route==
"StdRoute")
294 return (*
m_PixelDisk)[disk]->getDouble(
"RMAX") * Gaudi::Units::mm + 11*Gaudi::Units::mm;
297 return (*
m_PixelDisk)[disk]->getDouble(
"SUP3RMAX") * Gaudi::Units::mm;
311 catch(std::runtime_error&) {
312 ATH_MSG_DEBUG(
"No EOSZOFFSET value for the PixelSvcRoute table record " << disk);
327 catch (std::runtime_error&) {
328 ATH_MSG_DEBUG(
"No SERVICEROUTE value for the PixelSvcRoute table record " << disk);
350 int nChipsEta = (*m_PixelReadout)[moduleType]->getInt(
"NCHIPSETA");
351 int nChipsPhi = (*m_PixelReadout)[moduleType]->getInt(
"NCHIPSPHI");
352 return nChipsEta*nChipsPhi;
364 return (*
m_SctBrlLayer)[layer]->getDouble(
"RADIUS") * Gaudi::Units::mm;
370 return (*
m_SctBrlLayer)[layer]->getDouble(
"CYLLENGTH") * Gaudi::Units::mm;
376 int ladType = (*m_SctBrlLayer)[layer]->getInt(
"LADDERTYPE");
388 int ladType = (*m_SctBrlLayer)[layer]->getInt(
"LADDERTYPE");
407 return (*
m_SctFwdWheel)[disk]->getDouble(
"ZPOSITION") * Gaudi::Units::mm;
Definition of the abstract IRDBAccessSvc interface.
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const std::string & tag() const
Return version tag.
const std::string & node() const
Return the version node.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
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.
Class to hold various Athena components.
IRDBRecordset_ptr m_SctFwdGeneral
IRDBRecordset_ptr m_PixelReadout
int pixelBentStaveNModule(int layer) const
int sctEndcapNumSectorsForLayer(int layer) const
double sctLayerRadius(int layer) const
int sctLayerType(int layer) const
double pixelEnvelopeRMax() const
IRDBRecordset_ptr m_PixelEndcapGeneral
IRDBRecordset_ptr m_PixelSvcRoute
IRDBRecordset_ptr m_InDetWeights
int pixelModulesPerStave(int layer) const
double sctDiskRMax(int disk) const
IRDBRecordset_ptr m_PixelEnvelope
IRDBRecordset_ptr m_PixelWeights
int SupportTubeExists(const std::string &name) const
bool buildServices() const
int SupportTubeIndex(const std::string &name) const
int pixelNumDisks() const
double sctInnerSupport() const
double sctLayerLength(int layer) const
double SupportTubeZMin(const std::string &name) const
IRDBRecordset_ptr m_switches
double pixelLadderModuleDeltaZ(int layer) const
int pixelChipsPerModuleForDisk(int disk) const
IRDBRecordset_ptr m_PixelDiskRing
IRDBRecordset_ptr m_SctFwdWheel
IRDBRecordset_ptr m_SctBrlGeneral
double pixelLayerLength(int layer) const
int pixelModulesPerRing(int ring) const
IRDBRecordset_ptr m_PixelRing
double pixelDiskZ(int disk) const
IRDBRecordset_ptr m_SctWeights
double sctDiskZ(int disk) const
IRDBRecordset_ptr m_InDetSimpleServices
int pixelNumSectorsForLayer(int layer) const
IRDBRecordset_ptr m_PixelDisk
IRDBRecordset_ptr m_SctBrlLayer
IRDBRecordset_ptr m_PixelBarrelGeneral
int sctModulesPerLadder(int layer) const
int pixelEndcapNumSectorsForLayer(int layer) const
InDetMaterialManager * m_matMgr
int pixelDesignType(int moduleType) const
InDetDD::AthenaComps * m_athenaComps
int pixelChipsPerModule(int moduleType) const
double pixelDiskRMax(int disk) const
IRDBRecordset_ptr m_PixelModule
double pixelDiskRMin(int disk) const
IRDBRecordset_ptr m_SctBrlLadder
int pixelModulesPerEndcapSector(int disk) const
double SupportTubeRMax(const std::string &name) const
~InDetServMatGeometryManager()
int pixelBarrelModuleType(int layer) const
int pixelNumLayers() const
IRDBRecordset_ptr m_PixelLayer
double SupportTubeZMax(const std::string &name) const
double pixelDiskEOSZOffset(int disk) const
InDetServMatGeometryManager(InDetDD::AthenaComps *athenaComps)
std::string pixelDiskServiceRoute(int disk) const
IRDBRecordset_ptr m_SctFwdDiscSupport
int sctNumSectorsForLayer(int layer) const
IRDBRecordset_ptr m_scalingTable
double pixelLayerRadius(int layer) const
IRDBRecordset_ptr m_PixelStave
double SupportTubeRMin(const std::string &name) const
double pixelLadderBentStaveAngle(int layer) const
IRDBRecordset_ptr m_SctBrlServPerLayer