14#include "GaudiKernel/SystemOfUnits.h"
177 catch(std::runtime_error&) {
191 catch(std::runtime_error&) {
222 catch(std::runtime_error&) {
230 std::vector<double> layerShift;
236 const std::string& detectorKey = versionKey.
tag();
237 const std::string& detectorNode = versionKey.
node();
242 int numLayers = (*PixelBarrelGeneral)[0]->getInt(
"NLAYER");
243 layerShift.reserve(numLayers);
244 for(
const auto& rec : *PixelLayer) {
247 if(!rec->isFieldNull(
"GBLSHIFT")) {
248 shift = rec->getDouble(
"GBLSHIFT");
251 catch(std::runtime_error&) {
253 layerShift.push_back(shift);
268 for (
unsigned int i = 0; i <
m_services.size(); i++) {
274 const std::vector<const ServiceVolume*>&
276 for (
unsigned int ii = 0; ii <
numElements(); ++ii) {
284 return m_mgr->numElements();
306 int volId =
m_mgr->volId(ii);
307 if (volId == 0) volId = ii + 1;
309 bool needsRotation =
false;
312 std::string shapeType =
m_mgr->shapeType(ii);
313 if (!
m_mgr->schema().simple() && !shapeType.empty() && shapeType !=
"TUBE") {
314 double rmin2 =
m_mgr->rmin2(ii);
315 double rmax2 =
m_mgr->rmax2(ii);
317 if (rmin2 <= 0) rmin2 = param->
rmin();
318 if (rmax2 <= 0) rmax2 = param->
rmax();
320 int radialDiv =
m_mgr->radialDiv(ii);
322 double phiDelta =
m_mgr->phiDelta(ii);
324 bool fullPhiSector =
false;
325 if (phiDelta == 0 || phiDelta >= 359.9 * Gaudi::Units::degree) {
326 phiDelta = 360 * Gaudi::Units::degree;
327 fullPhiSector =
true;
334 if (shapeType ==
"UNKNOWN") {
336 shapeType =
"RADIAL";
337 }
else if (param->
rmin() == rmin2 && param->
rmax() == rmax2) {
349 int repeat =
m_mgr->repeat(ii);
350 if (repeat == 0) repeat = 1;
352 double phiStart =
m_mgr->phiStart(ii);
353 double phiWidth = phiDelta;
355 if (shapeType ==
"CONS" || shapeType ==
"TUBS") {
356 const double phiepsilon = 0.001 * Gaudi::Units::degree;
357 phiWidth -= 2 * phiepsilon;
358 phiStart += phiepsilon;
363 if (shapeType ==
"BOX" || shapeType ==
"ROD" || shapeType ==
"ROD2" || shapeType ==
"TRAP") {
364 phiWidth =
m_mgr->width(ii);
367 if (shapeType ==
"PGON" || shapeType ==
"PGON2" ||
368 shapeType ==
"CONE" || shapeType ==
"CONS" ||
369 shapeType ==
"PGON3" || shapeType ==
"PGON4") {
370 if ((rmin2 != param->
rmin()) || (rmax2 != param->
rmax())) {
371 needsRotation =
true;
377 if (shapeType ==
"PGON" || shapeType ==
"PGON2" ||
378 shapeType ==
"PGON3" || shapeType ==
"PGON4") {
385 if (shapeType.empty() || shapeType ==
"TUBE" || shapeType ==
"CONE") {
407 if (std::abs(param->
zmin()) < 0.000001) {
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecordset interface.
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.
std::vector< double > readLayerShift()
int volId(int index) const
double width(int index) const
double phiStep(int index) const
double phiStart(int index) const
double rmin2(int index) const
ServiceVolumeSchema m_schema
const ServiceVolumeSchema & schema() const
double phiDelta(int index) const
double rmax(int index) const
bool zsymm(int index) const
int repeat(int index) const
ServiceVolumeMakerMgr(IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *athenaComps)
double rmin(int index) const
InDetDD::AthenaComps * m_athenaComps
unsigned int numElements() const
double rmax2(int index) const
std::string volName(int index) const
double zmax(int index) const
std::string shapeType(int index) const
std::string materialName(int index) const
int radialDiv(int index) const
IRDBRecordset_ptr m_table
int shiftFlag(int index) const
double zmin(int index) const
std::vector< const ServiceVolume * > m_services
std::vector< double > m_layerShift
ServiceVolumeMakerMgr * m_mgr
ServiceVolumeMaker(const std::string &label, IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *)
unsigned int numElements() const
const std::vector< const ServiceVolume * > & makeAll()
ServiceVolume * make(int index)
std::string m_materialName
void setVolName(const std::string &name)
void setZShift(double shift)
void setRmax(double rmax)
void setZmin(double zmin)
void setMaterial(const std::string &mat)
void setNeedsRotation(bool flag)
void setPhiWidth(double phiWidth)
void setRmax2(double rmax2)
void setLabel(const std::string &name, int volId)
void setZmax(double zmax)
void setZsymm(bool zsymm)
void setRmin(double rmin)
void setPhiLoc(double phiLoc)
void setRmin2(double rmin2)
void setShapeType(const std::string &shapeType)
std::string label(const std::string &format, int i)