![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <MdtReadoutGeomTool.h>
|
using | physNodeMap = std::map< std::string, GeoFullPhysVol * > |
|
|
| MdtReadoutGeomTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
StatusCode | buildReadOutElements (MuonDetectorManager &mgr) override final |
| Retrieves the GeoModel from the GeoModelSvc and append the ReadoutElements of the Given MuonDetectorTechnology to the MuonDetectorManager. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (IMuonReadoutGeomTool, 1, 0) |
| Gaudi interface ID. More...
|
|
Definition at line 18 of file MdtReadoutGeomTool.h.
◆ ParamBookTable
◆ parameterBook
◆ physNodeMap
◆ StoreGateSvc_t
◆ MdtReadoutGeomTool()
MuonGMR4::MdtReadoutGeomTool::MdtReadoutGeomTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ buildReadOutElements()
Retrieves the GeoModel from the GeoModelSvc and append the ReadoutElements of the Given MuonDetectorTechnology to the MuonDetectorManager.
The keys should be formatted like <STATION_NAME>_<MUON_CHAMBERTYPE>_etc. The <MUON_CHAMBERTYPE> also indicates whether we're dealing with a MDT / TGC / CSC / RPC chamber If we are dealing with a MDT chamber, then there are 3 additional properties encoded into the chamber <STATIONETA>_<STATIONPHI>_ML
Skip the endcap chambers
Load first tube etc. from the parameter book table
Chamber dimensions are given from the GeoShape
Implements MuonGMR4::IMuonReadoutGeomTool.
Definition at line 108 of file MdtReadoutGeomTool.cxx.
112 GeoModelIO::ReadGeoModel* sqliteReader =
m_geoDbTagSvc->getSqliteReader();
114 ATH_MSG_FATAL(
"Error, the tool works exclusively from sqlite geometry inputs");
115 return StatusCode::FAILURE;
117 FactoryCache facCache{};
121 physNodeMap mapFPV = sqliteReader->getPublishedNodes<std::string, GeoFullPhysVol*>(
"Muon");
122 #ifndef SIMULATIONBASE
126 for (
auto& [
key,
pv] : mapFPV) {
133 std::vector<std::string> key_tokens =
tokenize(
key,
"_");
134 if (key_tokens.size() != 5 ||
135 key_tokens[1].find(
"MDT") == std::string::npos)
140 define.detElId = idHelper.channelID(key_tokens[0].substr(0, 3),
146 return StatusCode::FAILURE;
151 define.chambDesign = key_tokens[1];
152 define.alignTransform =
m_geoUtilTool->findAlignableTransform(define.physVol);
155 ParamBookTable::const_iterator book_itr = facCache.parBook.find(define.chambDesign);
156 if (book_itr == facCache.parBook.end()) {
157 ATH_MSG_FATAL(
"There is no chamber called "<<define.chambDesign);
158 return StatusCode::FAILURE;
161 #ifndef SIMULATIONBASE
163 define.layerBounds = layerBounds;
167 std::unique_ptr<MdtReadoutElement> mdtDetectorElement = std::make_unique<MdtReadoutElement>(std::move(define));
168 ATH_CHECK(
mgr.addMdtReadoutElement(std::move(mdtDetectorElement)));
170 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ loadDimensions()
Loads the chamber dimensions from GeoModel.
The trapezoid defines the length of the chamber including the extra material stemming from the faraday cache etc.
Loop over the child nodes of the full mdt tube layer volume to pick the ones representing the tubeLayer – their logical volume is callded TubeLayerLog. The node right before the child volume is the associated transform node
Next check all tubes whether they're made up out of air or not. If yes, then there's no tube at this place and add the corresponding has hto the list.
Check for the endplug volumes
Either all tubes have an endplug or none
Definition at line 35 of file MdtReadoutGeomTool.cxx.
39 <<std::endl<<std::endl<<
m_geoUtilTool->dumpVolume(define.physVol));
40 const GeoShape* shape =
m_geoUtilTool->extractShape(define.physVol);
43 return StatusCode::FAILURE;
47 if (shape->typeID() == GeoTrd::getClassTypeID()) {
49 const GeoTrd* trd =
static_cast<const GeoTrd*
>(shape);
56 return StatusCode::FAILURE;
61 for (
unsigned int ch = 1;
ch < define.physVol->getNChildNodes(); ++
ch) {
62 const GeoGraphNode* childNode = (*define.physVol->getChildNode(
ch));
63 const GeoVPhysVol* childVol =
dynamic_cast<const GeoVPhysVol*
>(childNode);
64 if (!childVol || childVol->getLogVol()->getName() !=
"TubeLayerLog") {
67 const GeoTransform* trfNode =
dynamic_cast<const GeoTransform*
>(*define.physVol->getChildNode(
ch-1));
69 ATH_MSG_FATAL(
"Expect a GeoTransform node right before the tubelayer node");
70 return StatusCode::FAILURE;
75 MdtTubeLayerPtr newLay = std::make_unique<MdtTubeLayer>(childVol, trfNode);
76 define.tubeLayers.emplace_back(*facCache.tubeLayers.insert(newLay).first);
78 const MdtTubeLayer& lay{*define.tubeLayers.back()};
81 bool chEndPlug{
false};
82 for (
unsigned int tube = 0 ;
tube < lay.nTubes(); ++
tube) {
83 constexpr std::string_view airTubeName{
"airTube"};
84 PVConstLink tubeVol{lay.getTubeNode(
tube)};
85 if (tubeVol->getLogVol()->getName() == airTubeName) {
87 }
else if (!chEndPlug) {
90 std::vector<physVolWithTrans> endPlugs =
m_geoUtilTool->findAllLeafNodesByName(tubeVol,
"Endplug");
91 if (endPlugs.empty()) {
95 const GeoShape* plugShape =
m_geoUtilTool->extractShape(endPlugs[0].volume);
96 if (plugShape->typeID() != GeoTube::getClassTypeID()){
98 return StatusCode::FAILURE;
100 const GeoTube* plugTube =
static_cast<const GeoTube*
>(plugShape);
101 define.endPlugLength = plugTube->getZHalfLength();
105 define.readoutSide = facCache.readoutOnLeftSide.count(
m_idHelperSvc->chamberId(define.detElId)) ? -1. : 1.;
106 return StatusCode::SUCCESS;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ readParameterBook()
StatusCode MuonGMR4::MdtReadoutGeomTool::readParameterBook |
( |
FactoryCache & |
facCache | ) |
const |
|
private |
Retrieves the auxillary tables from the database.
Load the chamber that have their readout on the negative z-side
Definition at line 172 of file MdtReadoutGeomTool.cxx.
177 if (paramTable->size() == 0) {
179 return StatusCode::FAILURE;
182 << paramTable->tagName() <<
"] table with "
183 << paramTable->size() <<
" records");
190 pars.radLengthX0 = record->getDouble(
"X0");
191 unsigned int nLay = record->getInt(
"LAYMDT");
192 const std::string
key {record->getString(
"WMDT_TYPE")};
193 ATH_MSG_DEBUG(
"Extracted parameters " <<
pars<<
" number of layers: "<<nLay<<
" will be safed under key "<<
key);
194 cache.parBook[
key] = std::move(
pars);
198 paramTable = accessSvc->getRecordsetPtr(
"MdtTubeROSides" ,
"");
199 if (paramTable->size() == 0) {
201 return StatusCode::FAILURE;
204 << paramTable->tagName() <<
"] table with "
205 << paramTable->size() <<
" records");
207 const std::string stName = record->getString(
"stationName");
208 const int stEta = record->getInt(
"stationEta");
209 const int stPhi = record->getInt(
"stationPhi");
210 const int side = record->getInt(
"side");
213 cache.readoutOnLeftSide.insert(idHelper.elementID(stName,stEta,stPhi,
isValid));
215 ATH_MSG_FATAL(
"station "<<stName<<
" eta: "<<stEta<<
" phi: "<<stPhi<<
" is unknown.");
216 return StatusCode::FAILURE;
220 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_geoDbTagSvc
◆ m_geoUtilTool
PublicToolHandle<IMuonGeoUtilityTool> MuonGMR4::MdtReadoutGeomTool::m_geoUtilTool {this,"GeoUtilTool", "" } |
|
private |
◆ m_idHelperSvc
Initial value:{
this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 29 of file MdtReadoutGeomTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
ActsTrk::SurfaceBoundSetPtr< Acts::LineBounds > tubeBounds
Sets of surface bounds which is shared amongst all readout elements used to assign the same bound obj...
GeoModel::TransientConstSharedPtr< MdtTubeLayer > MdtTubeLayerPtr
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::unique_ptr< IRDBRecord > IRDBRecord_ptr
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
std::shared_ptr< SurfaceBoundSet< BoundType > > SurfaceBoundSetPtr
Aberivation to create a new SurfaceBoundSetPtr.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
MuonChamber::defineArgs defineArgs