|
ATLAS Offline Software
|
#include <PixelDetectorTool.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::PixelDetectorManager * | m_detManager {} |
|
std::unique_ptr< InDetDD::SiCommonItems > | m_commonItems {} |
|
WaferTree | m_moduleTree |
|
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"} |
|
◆ PixelDetectorTool()
PixelDetectorTool::PixelDetectorTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~PixelDetectorTool()
virtual ITk::PixelDetectorTool::~PixelDetectorTool |
( |
| ) |
|
|
virtualdefault |
◆ align()
◆ ATLAS_NOT_THREAD_SAFE()
virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
overridevirtualinherited |
◆ clear()
StatusCode PixelDetectorTool::clear |
( |
| ) |
|
|
finaloverridevirtual |
◆ create()
StatusCode PixelDetectorTool::create |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 30 of file ml/src/PixelDetectorTool.cxx.
37 const PixelID *idHelper =
nullptr;
40 m_commonItems = std::make_unique<InDetDD::SiCommonItems>(idHelper);
46 std::string
node{
"Pixel"};
47 std::string
table{
"PIXXDD"};
52 node =
"InnerDetector";
55 ATH_MSG_ERROR(
"No ITk Pixel geometry found. ITk Pixel can not be built.");
56 return StatusCode::FAILURE;
71 manager->addAlignFolderType(alignFolderType);
107 gmxInterface.buildReadoutGeometryFromSqlite(
m_sqliteReadSvc.operator->(),sqlreader);
110 manager->addTreeTop(topVolume);
115 return StatusCode::FAILURE;
129 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 143 of file ml/src/PixelDetectorTool.cxx.
148 bool barrelDone =
false;
149 for (
int b = -1;
b <= 1; ++
b) {
151 msg(MSG::INFO) <<
" Found barrel with index " <<
b << std::endl;
155 msg(MSG::INFO) <<
" Number of barrel layers = " <<
n.numLayers() << std::endl;
157 n.setNumEtaModulesForLayer(
l->first,
l->second.nEtaModules());
159 n.setNumPhiModulesForLayer(
l->first,
l->second.begin()->second.nPhiModules());
160 msg(MSG::INFO) <<
" layer = " <<
l->first <<
" has " <<
n.numEtaModulesForLayer(
l->first) <<
161 " etaModules each with " <<
n.numPhiModulesForLayer(
l->first) <<
" phi modules" << std::endl;
169 bool endcapDone =
false;
170 for (
int ec = -2; ec <= 2; ec += 4) {
172 msg(MSG::INFO) <<
" Found endcap with index " << ec << std::endl;
176 msg(MSG::INFO) <<
" Number of endcap layers = " <<
n.numDiskLayers() << std::endl;
178 n.setNumDisksForLayer(
l->first,
l->second.nEtaModules());
179 msg(MSG::INFO) <<
" Layer " <<
l->first <<
" has " <<
n.numDisksForLayer(
l->first) <<
" disks" << std::endl;
181 n.setNumPhiModulesForLayerDisk(
l->first,
eta->first,
eta->second.nPhiModules());
183 n.numPhiModulesForLayerDisk(
l->first,
eta->first) <<
" phi modules" << std::endl;
205 ATH_MSG_INFO(
"Total number of wafers added is " << totalWafers);
210 n.setMaxNumEtaCells(1);
211 for (
int d = 0;
d <
manager->numDesigns(); ++
d) {
212 n.setMaxNumPhiCells(
manager->getPixelDesign(
d)->rows());
213 n.setMaxNumEtaCells(
manager->getPixelDesign(
d)->columns());
◆ 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::PixelDetectorTool::m_alignable {this, "Alignable", false, ""} |
|
private |
◆ m_alignmentFolderName
Gaudi::Property<std::string> ITk::PixelDetectorTool::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_moduleTree
WaferTree ITk::PixelDetectorTool::m_moduleTree |
|
private |
◆ m_rdbAccessSvc
◆ m_sqliteReadSvc
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.