|
ATLAS Offline Software
|
#include <StripDetectorTool.h>
|
Gaudi::Property< std::string > | m_gmxFilename {this, "GmxFilename", "", "The name of the local file to read the geometry from"} |
|
Gaudi::Property< std::string > | m_detectorName {this, "DetectorName", "ITkStrip", ""} |
|
ServiceHandle< IRDBAccessSvc > | m_rdbAccessSvc {this, "RDBAccessSvc", "RDBAccessSvc", ""} |
|
ServiceHandle< IRDBAccessSvc > | m_sqliteReadSvc {this, "SqliteReadSvc", "SqliteReadSvc", ""} |
|
ServiceHandle< IGeoDbTagSvc > | m_geoDbTagSvc {this, "GeoDbTagSvc", "GeoDbTagSvc", ""} |
|
Gaudi::Property< std::string > | m_dtdName {this, "OverrideDtdName", "", "Override standard .dtd file from GeoModelXml"} |
|
Gaudi::Property< bool > | m_deduplicateLogVol |
|
Gaudi::Property< bool > | m_deduplicatePhysVol |
|
Gaudi::Property< bool > | m_deduplicateShape |
|
Gaudi::Property< bool > | m_deduplicateTransf |
|
GeoVDetectorManager * | m_detector |
|
|
const InDetDD::SCT_DetectorManager * | m_detManager {} |
|
std::unique_ptr< InDetDD::SiCommonItems > | m_commonItems {} |
|
WaferTree | m_waferTree |
|
Gaudi::Property< bool > | m_alignable {this, "Alignable", false, ""} |
|
Gaudi::Property< std::string > | m_alignmentFolderName {this, "AlignmentFolderName", "/Indet/Align", ""} |
|
ServiceHandle< IGeometryDBSvc > | m_geometryDBSvc {this,"GeometryDBSvc","InDetGeometryDBSvc",""} |
|
Gaudi::Property< std::string > | m_clobOutputFileName {this, "ClobOutputName", "", "Name of file to dump CLOB content to"} |
|
Definition at line 31 of file StripDetectorTool.h.
◆ StripDetectorTool()
ITk::StripDetectorTool::StripDetectorTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~StripDetectorTool()
virtual ITk::StripDetectorTool::~StripDetectorTool |
( |
| ) |
|
|
virtualdefault |
◆ align()
◆ ATLAS_NOT_THREAD_SAFE()
virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
overridevirtualinherited |
◆ clear()
StatusCode ITk::StripDetectorTool::clear |
( |
| ) |
|
|
finaloverridevirtual |
◆ create()
StatusCode ITk::StripDetectorTool::create |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 28 of file StripDetectorTool.cxx.
35 const SCT_ID *idHelper =
nullptr;
38 m_commonItems = std::make_unique<InDetDD::SiCommonItems>(idHelper);
43 std::string
node{
"SCT"};
44 std::string
table{
"ITKXDD"};
51 node =
"InnerDetector";
54 ATH_MSG_ERROR(
"No ITk Strip geometry found. ITk Strip can not be built.");
55 return StatusCode::FAILURE;
77 gmxInterface.buildReadoutGeometryFromSqlite(
m_sqliteReadSvc.operator->(),sqlreader);
86 return StatusCode::FAILURE;
100 return StatusCode::SUCCESS;
◆ createBaseTool()
StatusCode GeoModelXmlTool::createBaseTool |
( |
| ) |
|
|
protectedinherited |
◆ createTopVolume()
const GeoVPhysVol * GeoModelXmlTool::createTopVolume |
( |
GeoPhysVol * |
worldVol, |
|
|
GmxInterface & |
interface, |
|
|
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode, |
|
|
const std::string & |
containingDetector = "" , |
|
|
const std::string & |
envelopeName = "" , |
|
|
const GeoModelIO::ReadGeoModel * |
sqlreader = nullptr |
|
) |
| const |
|
protectedinherited |
Definition at line 35 of file GeoModelXmlTool.cxx.
39 if(!sqlreader)
createVolume(world, gmxInterface, vNode, tableName);
42 unsigned int nChildren = world->getNChildVols();
44 const GeoVPhysVol * envVol =
nullptr;
45 const GeoVPhysVol * topVol =
nullptr;
47 bool foundEnvelope =
false;
48 bool foundContainingDetector =
false;
54 if(containingDetector!=
"") detectorName = containingDetector;
56 for (
int iChild = nChildren - 1; iChild>=0; --iChild) {
57 if (world->getNameOfChildVol(iChild) == detectorName) {
60 envVol = &*world->getChildVol(iChild);
61 foundContainingDetector =
true;
62 if(envelopeName==
"") {topVol = envVol;
break;}
63 unsigned int nGrandchildren = envVol->getNChildVols();
64 for (
int iGchild = nGrandchildren - 1; iGchild>=0; --iGchild) {
65 if (envVol->getNameOfChildVol(iGchild) == envelopeName) {
66 topVol = &*(envVol->getChildVol(iGchild));
73 if(containingDetector!=
"" && !foundContainingDetector)
ATH_MSG_ERROR(
"Couldn't find the containing detector "<<containingDetector<<
" in the world hierarchy!");
74 else if(envelopeName!=
"" && !foundEnvelope)
ATH_MSG_ERROR(
"Couldn't find the envelope volume "<<envelopeName<<
" in the world hierarchy!");
◆ createVolume()
void GeoModelXmlTool::createVolume |
( |
GeoPhysVol * |
worldVol, |
|
|
GmxInterface & |
interface, |
|
|
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode |
|
) |
| const |
|
privateinherited |
Definition at line 107 of file GeoModelXmlTool.cxx.
109 std::string gmxInput;
115 gmxInput =
getBlob(vNode,tableName);
116 if (gmxInput.empty()) {
117 std::string errMessage(
"GeoModelXmlTool::createTopVolume: Empty response received from the database.");
118 throw std::runtime_error(errMessage);
124 if (gmxInput.empty()) {
125 std::string errMessage(
"GeoModelXmlTool::createTopVolume: Unable to find file " +
m_gmxFilename +
126 " with PathResolver; check filename and DATAPATH environment variable");
127 throw std::runtime_error(errMessage);
133 std::string replacementName =
"GeoModelXml/";
135 std::string startdelim =
"SYSTEM \"";
136 std::string enddelim =
"\" [";
137 unsigned startpos = gmxInput.find(startdelim) + startdelim.length();
138 unsigned endpos = gmxInput.find(enddelim);
139 std::string searchName = gmxInput.substr(startpos,(endpos - startpos));
140 if(searchName==
"geomodel.dtd") replacementName+=
"geomodel_v0.dtd";
141 else replacementName+=searchName;
142 ATH_MSG_DEBUG(
"Searching for "<<searchName<<
" and replacing it with "<<replacementName);
143 size_t chars = searchName.length();
144 size_t index = gmxInput.find(searchName);
146 if (
index != std::string::npos) {
149 gmxInput.replace(
index,chars, dtdFile);
151 throw std::runtime_error(
"GeoModelXmlTool::createTopVolume: Did not find valid .dtd in the gmx input string.");
161 std::ifstream in(gmxInput);
171 Gmx2Geo gmx2Geo(gmxInput, world, gmxInterface,
flags);
◆ doNumerology()
Definition at line 114 of file StripDetectorTool.cxx.
119 bool barrelDone =
false;
120 for (
int b = -1;
b <= 1; ++
b) {
122 msg(MSG::INFO) <<
" Found barrel with index " <<
b << std::endl;
126 msg(MSG::INFO) <<
" Number of barrel layers = " <<
n.numLayers() << std::endl;
128 n.setNumEtaModulesForLayer(
l->first,
l->second.nEtaModules());
130 n.setNumPhiModulesForLayer(
l->first,
l->second.begin()->second.nPhiModules());
131 msg(MSG::INFO) <<
" layer = " <<
l->first <<
" has " <<
n.numEtaModulesForLayer(
l->first)
132 <<
" etaModules each with " <<
n.numPhiModulesForLayer(
l->first) <<
" phi modules" << std::endl;
140 bool endcapDone =
false;
141 for (
int ec = -2; ec <= 2; ec += 4) {
143 msg(MSG::INFO) <<
" Found endcap with index " << ec << std::endl;
147 msg(MSG::INFO) <<
" Number of endcap wheels = " <<
n.numDisks() << std::endl;
149 n.setNumRingsForDisk(
l->first,
l->second.nEtaModules());
150 msg(MSG::INFO) <<
" Wheel " <<
l->first <<
" has " <<
n.numRingsForDisk(
l->first) <<
" rings" << std::endl;
152 n.setNumPhiModulesForDiskRing(
l->first,
eta->first,
eta->second.nPhiModules());
153 msg(MSG::INFO) <<
" Ring " <<
eta->first <<
" has "
154 <<
n.numPhiModulesForDiskRing(
l->first,
eta->first) <<
" phi modules" << std::endl;
176 ATH_MSG_INFO(
"Total number of wafers added is " << totalWafers);
183 n.setMaxNumEtaCells(1);
184 for (
int d = 0;
d <
manager->numDesigns(); ++
d) {
185 n.setMaxNumPhiCells(
manager->getSCT_Design(
d)->cells());
201 const std::string barrelBase(
"/SCTB");
202 const std::string endcapBase(
"/SCTE");
203 std::string baseName(
"");
212 manager->addAlignFolderType(alignFolderType);
214 switch (alignFolderType) {
219 switch (
bec->first) {
221 baseName = topFolder + endcapBase +
"C";
224 baseName = topFolder + barrelBase;
227 baseName = topFolder + endcapBase +
"A";
230 ATH_MSG_FATAL(
"Unknown SCT part with bec-ID " <<
bec->first <<
" encountered.");
231 throw std::runtime_error(
"Unknown ITkStrip part for alignment.");
234 std::ostringstream
layer;
242 ATH_MSG_FATAL(
"Alignment requested for unknown alignment folder type in StripDetectorFactory.");
243 throw std::runtime_error(
"Wrong alignment folder type for StripDetectorFactory in StripGeoModelXml.");
◆ getBlob()
std::string GeoModelXmlTool::getBlob |
( |
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode |
|
) |
| const |
|
protectedinherited |
Definition at line 94 of file GeoModelXmlTool.cxx.
98 if (!recordSet || recordSet->size() == 0) {
100 throw std::runtime_error(
"Unable to obtain recordSet");
103 std::string clobString = record->
getString(
"XMLCLOB");
◆ getSqliteReader()
GeoModelIO::ReadGeoModel * GeoModelXmlTool::getSqliteReader |
( |
| ) |
const |
|
protectedinherited |
◆ isAvailable()
bool GeoModelXmlTool::isAvailable |
( |
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode |
|
) |
| const |
|
protectedinherited |
Definition at line 78 of file GeoModelXmlTool.cxx.
82 const std::string& versionTag = versionKey.tag();
83 const std::string& versionNode = versionKey.node();
◆ manager() [1/2]
GeoVDetectorManager * GeoModelTool::manager |
( |
| ) |
|
|
virtualinherited |
The Detector Node corresponding to this tool.
Definition at line 21 of file GeoModelTool.cxx.
◆ manager() [2/2]
const GeoVDetectorManager * GeoModelTool::manager |
( |
| ) |
const |
|
virtualinherited |
◆ m_alignable
Gaudi::Property<bool> ITk::StripDetectorTool::m_alignable {this, "Alignable", false, ""} |
|
private |
◆ m_alignmentFolderName
Gaudi::Property<std::string> ITk::StripDetectorTool::m_alignmentFolderName {this, "AlignmentFolderName", "/Indet/Align", ""} |
|
private |
◆ m_clobOutputFileName
Gaudi::Property<std::string> GeoModelXmlTool::m_clobOutputFileName {this, "ClobOutputName", "", "Name of file to dump CLOB content to"} |
|
privateinherited |
◆ m_commonItems
◆ m_deduplicateLogVol
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicateLogVol |
|
protectedinherited |
Initial value:{this, "enableLogVolDeduplication", false,
"Remove duplications of equivalent logical volumes"}
Definition at line 48 of file GeoModelXmlTool.h.
◆ m_deduplicatePhysVol
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicatePhysVol |
|
protectedinherited |
Initial value:{this, "enablePhysVolDeduplication", false,
"Remove duplications of equivalent physical volumes"}
Definition at line 50 of file GeoModelXmlTool.h.
◆ m_deduplicateShape
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicateShape |
|
protectedinherited |
Initial value:{this, "enableShapeDeduplication", false,
"Remove duplications of equivalent shapes"}
Definition at line 52 of file GeoModelXmlTool.h.
◆ m_deduplicateTransf
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicateTransf |
|
protectedinherited |
Initial value:{this, "enableTransDeduplication", false,
"Remove duplications of equivalent transform nodes"}
Definition at line 54 of file GeoModelXmlTool.h.
◆ m_detector
GeoVDetectorManager* GeoModelTool::m_detector |
|
protectedinherited |
◆ m_detectorName
Gaudi::Property<std::string> GeoModelXmlTool::m_detectorName {this, "DetectorName", "ITkStrip", ""} |
|
protectedinherited |
◆ m_detManager
◆ m_dtdName
Gaudi::Property<std::string> GeoModelXmlTool::m_dtdName {this, "OverrideDtdName", "", "Override standard .dtd file from GeoModelXml"} |
|
protectedinherited |
◆ m_geoDbTagSvc
◆ m_geometryDBSvc
◆ m_gmxFilename
Gaudi::Property<std::string> GeoModelXmlTool::m_gmxFilename {this, "GmxFilename", "", "The name of the local file to read the geometry from"} |
|
protectedinherited |
◆ m_rdbAccessSvc
◆ m_sqliteReadSvc
◆ m_waferTree
WaferTree ITk::StripDetectorTool::m_waferTree |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
GeoPhysVol * getPhysVol()
Destructor.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Default, invalid implementation of ClassID_traits.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
size_type wafer_hash_max(void) const
void addManager(const GeoVDetectorManager *)
IRDBRecord is one record in the IRDBRecordset object.