ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ActsTrk::MuonDetectorBuilderTool Class Reference

#include <MuonDetectorBuilderTool.h>

Inheritance diagram for ActsTrk::MuonDetectorBuilderTool:
Collaboration diagram for ActsTrk::MuonDetectorBuilderTool:

Public Member Functions

 MuonDetectorBuilderTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard tool constructor. More...
 
virtual ~MuonDetectorBuilderTool ()=default
 
StatusCode initialize () override final
 
Acts::Experimental::DetectorComponent construct (const Acts::GeometryContext &context) const override final
 
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 (IDetectorVolumeBuilderTool, 1, 0)
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::pair< std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume > >, std::vector< std::shared_ptr< Acts::Surface > > > constructElements (const ActsGeometryContext &gctx, const MuonGMR4::MuonChamber &mChamber, std::pair< unsigned int, unsigned int > chId) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
Gaudi::Property< bool > m_dumpVisual {this, "DumpVisualization", true, "If set to true the DetectorVolumes are dumped into a visualization file format"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 13 of file MuonDetectorBuilderTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonDetectorBuilderTool()

ActsTrk::MuonDetectorBuilderTool::MuonDetectorBuilderTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard tool constructor.

Definition at line 40 of file MuonDetectorBuilderTool.cxx.

40  :
42  declareInterface<IDetectorVolumeBuilderTool>(this);
43  }

◆ ~MuonDetectorBuilderTool()

virtual ActsTrk::MuonDetectorBuilderTool::~MuonDetectorBuilderTool ( )
virtualdefault

Member Function Documentation

◆ construct()

Acts::Experimental::DetectorComponent ActsTrk::MuonDetectorBuilderTool::construct ( const Acts::GeometryContext &  context) const
finaloverride

Definition at line 53 of file MuonDetectorBuilderTool.cxx.

53  {
54  ATH_MSG_DEBUG("Building Muon Detector Volume");
55  const MuonChamberSet chambers = m_detMgr->getAllChambers();
56  using ChamberIdKey = std::pair<Muon::MuonStationIndex::ChIndex, unsigned int>;
57  using EnvelopeIdentifierMap = std::map<ChamberIdKey, unsigned int>;
58  using ChamberIdentifierMap = std::map<unsigned int, unsigned int>;
59  EnvelopeIdentifierMap volIds{};
60  ChamberIdentifierMap chamberIds{};
61  const ActsGeometryContext* gctx = context.get<const ActsGeometryContext* >();
62  std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume > > detectorVolumeBoundingVolumes{};
63  detectorVolumeBoundingVolumes.reserve(chambers.size());
64  std::vector<surfacePtr> surfaces = {};
65  std::pair<std::vector<volumePtr>, std::vector<surfacePtr>> readoutElements;
66 
67  auto portalGenerator = Acts::Experimental::defaultPortalGenerator();
68 
69  for(const MuonGMR4::MuonChamber* chamber : chambers){
70  unsigned int volNumb = volIds[std::make_pair(chamber->chamberIndex(), chamber->stationPhi())];
71  if (!volNumb) volNumb = volIds.size();
72 
73  unsigned int chNumb = (++chamberIds[volNumb]);
74 
75  std::shared_ptr<Acts::TrapezoidVolumeBounds> bounds = chamber->bounds();
76  readoutElements = constructElements(*gctx, *chamber, std::make_pair(volNumb,chNumb));
77  volumePtr detectorVolume = Acts::Experimental::DetectorVolumeFactory::construct(
78  portalGenerator, gctx->context(), std::to_string(chamber->stationName())+"_"+std::to_string(chamber->stationEta())+"_"+std::to_string(chamber->stationPhi()), chamber->localToGlobalTrans(*gctx),
79  bounds, readoutElements.second, readoutElements.first, Acts::Experimental::tryAllSubVolumes(), Acts::Experimental::tryAllPortalsAndSurfaces());
80  detectorVolume->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(volNumb).setVolume(chNumb));
81  if(m_dumpVisual){
82  //If we want to view each volume independently
83  const MuonGMR4::MuonChamber::ReadoutSet readOut = chamber->readOutElements();
84 
85  Acts::ObjVisualization3D helper;
86  Acts::GeometryView3D::drawDetectorVolume(helper, *detectorVolume, gctx->context());
87  helper.write(m_idHelperSvc->toStringDetEl(readOut[0]->identify())+".obj");
88  helper.clear();
89  }
90  detectorVolumeBoundingVolumes.push_back(std::move(detectorVolume));
91  readoutElements.first.clear();
92  readoutElements.second.clear();
93  }
94  std::unique_ptr<Acts::CutoutCylinderVolumeBounds> msBounds = std::make_unique<Acts::CutoutCylinderVolumeBounds>(0, 4000, 145000, 220000, 3200);
95  volumePtr msDetectorVolume = Acts::Experimental::DetectorVolumeFactory::construct(
96  portalGenerator, gctx->context(), "Envelope",
97  Acts::Transform3::Identity(), std::move(msBounds), surfaces,
98  detectorVolumeBoundingVolumes, Acts::Experimental::tryAllSubVolumes(),
99  Acts::Experimental::tryAllPortalsAndSurfaces());
100  msDetectorVolume->assignGeometryId(Acts::GeometryIdentifier{}.setVolume(15));
101 
102  if (m_dumpVisual) {
103  ATH_MSG_VERBOSE("Writing detector.obj");
104  Acts::ObjVisualization3D helper;
105  Acts::GeometryView3D::drawDetectorVolume(helper, *msDetectorVolume, gctx->context());
106  helper.write("detector.obj");
107  helper.clear();
108 
109  }
110 
111  Acts::Experimental::DetectorComponent::PortalContainer portalContainer;
112  for (auto [ip, p] : Acts::enumerate(msDetectorVolume->portalPtrs())) {
113  portalContainer[ip] = p;
114  }
115 
116  return Acts::Experimental::DetectorComponent{
117  {msDetectorVolume},
118  portalContainer,
119  {{msDetectorVolume}, Acts::Experimental::tryRootVolumes()}};
120  }

◆ constructElements()

std::pair< std::vector< volumePtr >, std::vector< surfacePtr > > ActsTrk::MuonDetectorBuilderTool::constructElements ( const ActsGeometryContext gctx,
const MuonGMR4::MuonChamber mChamber,
std::pair< unsigned int, unsigned int >  chId 
) const
private

Definition at line 122 of file MuonDetectorBuilderTool.cxx.

122  {
123 
124  std::vector<volumePtr> readoutDetectorVolumes = {};
125  std::vector<surfacePtr> readoutSurfaces = {};
126  std::pair<std::vector<volumePtr>, std::vector<surfacePtr>> pairElements;
127  Acts::GeometryIdentifier::Value surfId{1};
128  Acts::GeometryIdentifier::Value mdtId{1};
129 
130  MuonGMR4::MuonChamber::ReadoutSet readoutElements = mChamber.readOutElements();
131 
132  for(const MuonGMR4::MuonReadoutElement* ele : readoutElements){
133 
134  if(ele->detectorType() == DetectorType::Mdt){
135 
136  ATH_MSG_VERBOSE("Building MultiLayer for MDT Detector Volume");
137  const MuonGMR4::MdtReadoutElement* mdtReadoutEle = static_cast<const MuonGMR4::MdtReadoutElement*>(ele);
139  std::vector<surfacePtr> surfaces = {};
140 
141  //loop over the tubes to get the surfaces
142  for(unsigned int lay=1; lay<=mdtReadoutEle->numLayers(); ++lay){
143  for(unsigned int tube=1; tube<=mdtReadoutEle->numTubesInLay(); ++tube){
144  const IdentifierHash measHash{mdtReadoutEle->measurementHash(lay,tube)};
145  if (!mdtReadoutEle->isValid(measHash)) continue;
146  surfacePtr surface = mdtReadoutEle->surfacePtr(measHash);
147  surface->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(chId.first).setVolume(chId.second).setBoundary(mdtId).setSensitive(++surfId));
148  surfaces.push_back(surface);
149 
150  }
151  }
152 
153  //Get the transformation to the chamber's frame
154  const Amg::Vector3D toChamber = mChamber.globalToLocalTrans(gctx)*mdtReadoutEle->center(gctx);
155 
156  const Amg::Vector3D boxCenter = toChamber;
157 
158  const Acts::Transform3 mdtTransform = mChamber.localToGlobalTrans(gctx) * Amg::Translation3D(boxCenter);
159 
160  Acts::Experimental::MultiWireStructureBuilder::Config mlCfg;
161 
162  mlCfg.name = "MDT_MultiLayer" + std::to_string(mdtReadoutEle->multilayer()) + "_" + std::to_string(mdtReadoutEle->stationName())+ "_"+std::to_string(mdtReadoutEle->stationEta())+"_"+std::to_string(mdtReadoutEle->stationPhi());
163  mlCfg.mlSurfaces = surfaces;
164  mlCfg.transform = mdtTransform;
165  std::unique_ptr<Acts::TrapezoidVolumeBounds> mdtBounds = std::make_unique<Acts::TrapezoidVolumeBounds>(parameters.shortHalfX, parameters.longHalfX, parameters.halfY, parameters.halfHeight);
166  mlCfg.mlBounds= mdtBounds->values();
167  mlCfg.mlBinning = {Acts::Experimental::ProtoBinning(Acts::binY, Acts::detail::AxisBoundaryType::Bound,
168  -mdtBounds->values()[1], mdtBounds->values()[1], std::lround(2*mdtBounds->values()[1]/parameters.tubePitch), 0u), Acts::Experimental::ProtoBinning(Acts::binZ, Acts::detail::AxisBoundaryType::Bound,
169  -mdtBounds->values()[2], mdtBounds->values()[2], std::lround(2*mdtBounds->values()[2]/parameters.tubePitch), 0u)};
170 
171  Acts::Experimental::MultiWireStructureBuilder mdtBuilder(mlCfg);
172  volumePtr mdtVolume = mdtBuilder.construct(gctx.context()).volumes[0];
173  mdtVolume->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(chId.first).setVolume(chId.second).setBoundary(mdtId++));
174 
175 
176  readoutDetectorVolumes.push_back(mdtVolume);
177 
178  }else if(ele->detectorType() == DetectorType::Rpc){
179 
180  ATH_MSG_VERBOSE("Building RPC plane surface");
181  const MuonGMR4::RpcReadoutElement* rpcReadoutEle = static_cast<const MuonGMR4::RpcReadoutElement*>(ele);
183  //loop over the layers to get the surfaces
184  for(const StripLayerPtr& layer : parameters.layers){
185  if (!layer) continue;
186  const IdentifierHash layerHash = layer->hash();
187  surfacePtr rpcSurface = rpcReadoutEle->surfacePtr(layerHash);
188  rpcSurface->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(chId.first).setVolume(chId.second).setSensitive(++surfId));
189  readoutSurfaces.push_back(rpcSurface);
190  }
191 
192 
193  }else if(ele->detectorType() == DetectorType::Tgc){
194 
195  ATH_MSG_VERBOSE("Building TGC plane surface ");
196  const MuonGMR4::TgcReadoutElement* tgcReadoutEle = static_cast<const MuonGMR4::TgcReadoutElement*>(ele);
198  //loop over the layers to get the surfaces
199  for(const StripLayerPtr& layerPtr : parameters.sensorLayouts){
200  if (!layerPtr) continue;
201  const IdentifierHash layerHash = layerPtr->hash();
202  surfacePtr tgcSurface = tgcReadoutEle->surfacePtr(layerHash);
203  tgcSurface->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(chId.first).setVolume(chId.second).setSensitive(++surfId));
204 
205  readoutSurfaces.push_back(tgcSurface);
206 
207  }
208 
209  }else if(ele->detectorType() == DetectorType::sTgc){
210 
211  ATH_MSG_VERBOSE("Building Stgc strip layers");
212  const MuonGMR4::sTgcReadoutElement* sTgcReadoutEle = static_cast<const MuonGMR4::sTgcReadoutElement*>(ele);
213  const MuonGMR4::sTgcReadoutElement::parameterBook& paramaters{sTgcReadoutEle->getParameters()};
214  //loop over the layers to get the surfaces
215  for(const MuonGMR4::StripLayer& layer : paramaters.stripLayers){
216  const IdentifierHash layerHash = layer.hash();
217  surfacePtr stgcSurface = sTgcReadoutEle->surfacePtr(layerHash);
218  stgcSurface->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(chId.first).setVolume(chId.second).setSensitive(++surfId));
219 
220  readoutSurfaces.push_back(stgcSurface);
221  }
222  }else if(ele->detectorType() == DetectorType::Mm){
223  ATH_MSG_VERBOSE("Building Mmg layers");
224  const MuonGMR4::MmReadoutElement* mmReadoutEle = static_cast<const MuonGMR4::MmReadoutElement*>(ele);
226  //loop over the layers to get the surfaces
227  for(const StripLayerPtr& layer : parameters.layers){
228  const IdentifierHash layerHash = layer->hash();
229  surfacePtr mmSurface = mmReadoutEle->surfacePtr(layerHash);
230  mmSurface->assignGeometryId(Acts::GeometryIdentifier{}.setLayer(chId.first).setVolume(chId.second).setSensitive(++surfId));
231 
232  readoutSurfaces.push_back(mmSurface);
233  }
234 
235  }else{
236  ATH_MSG_VERBOSE("No detector type supported");
237 
238  }
239 
240  }
241 
242  pairElements = std::make_pair(readoutDetectorVolumes, readoutSurfaces);
243 
244 return pairElements;
245 
246 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

ActsTrk::IDetectorVolumeBuilderTool::DeclareInterfaceID ( IDetectorVolumeBuilderTool  ,
,
 
)
inherited

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ initialize()

StatusCode ActsTrk::MuonDetectorBuilderTool::initialize ( )
finaloverride

Definition at line 45 of file MuonDetectorBuilderTool.cxx.

45  {
47  ATH_CHECK(m_idHelperSvc.retrieve());
48  ATH_MSG_DEBUG("ACTS version is: v"<< Acts::VersionMajor << "." << Acts::VersionMinor << "." << Acts::VersionPatch << " [" << Acts::CommitHash << "]");
49 
50  return StatusCode::SUCCESS;
51  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detMgr

const MuonGMR4::MuonDetectorManager* ActsTrk::MuonDetectorBuilderTool::m_detMgr {nullptr}
private

Definition at line 28 of file MuonDetectorBuilderTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dumpVisual

Gaudi::Property<bool> ActsTrk::MuonDetectorBuilderTool::m_dumpVisual {this, "DumpVisualization", true, "If set to true the DetectorVolumes are dumped into a visualization file format"}
private

Definition at line 31 of file MuonDetectorBuilderTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> ActsTrk::MuonDetectorBuilderTool::m_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 29 of file MuonDetectorBuilderTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonGMR4::MmReadoutElement
Definition: MmReadoutElement.h:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MuonGMR4::MdtReadoutElement::numTubesInLay
unsigned int numTubesInLay() const
Returns the number of tubes per layer.
MuonGMR4::MmReadoutElement::parameterBook
Set of parameters to describe a RPC chamber.
Definition: MmReadoutElement.h:23
Trk::binZ
@ binZ
Definition: BinningType.h:49
calibdata.chamber
chamber
Definition: calibdata.py:32
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
MuonGMR4::MdtReadoutElement::measurementHash
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
ActsTrk::DetectorType::Tgc
@ Tgc
Resitive Plate Chambers.
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ActsTrk::StripLayerPtr
GeoModel::TransientConstSharedPtr< MuonGMR4::StripLayer > StripLayerPtr
Definition: MuonDetectorBuilderTool.cxx:38
MuonGMR4::MuonChamber::ReadoutSet
std::vector< const MuonReadoutElement * > ReadoutSet
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:41
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonGMR4::MuonChamber
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:39
ActsTrk::surfacePtr
std::shared_ptr< Acts::Surface > surfacePtr
Definition: MuonDetectorBuilderTool.cxx:37
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ActsTrk::DetectorType::sTgc
@ sTgc
Micromegas (NSW)
MuonGMR4::RpcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:14
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
MuonGMR4::RpcReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/RpcReadoutElement.cxx:30
MuonGMR4::RpcReadoutElement::parameterBook
Set of parameters to describe a RPC chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:18
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
ActsGeometryContext::context
Acts::GeometryContext context() const
Definition: ActsGeometryContext.h:46
MuonGMR4::MdtReadoutElement::multilayer
unsigned int multilayer() const
Returns the multi layer of the MdtReadoutElement.
Trk::binY
@ binY
Definition: BinningType.h:48
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonGMR4::TgcReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/TgcReadoutElement.cxx:27
ActsTrk::DetectorType::Mm
@ Mm
Maybe not needed in the migration.
MuonGMR4::MuonChamber::readOutElements
const ReadoutSet & readOutElements() const
Returns the list of all associated readout elements.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:67
MuonGMR4::MdtReadoutElement::parameterBook
Set of parameters to describe a MDT chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:20
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGMR4::sTgcReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:26
MuonGMR4::MdtReadoutElement::numLayers
unsigned int numLayers() const
Returns the number of tube layer.
MuonGMR4::TgcReadoutElement::parameterBook
Set of parameters to describe a Tgc chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/TgcReadoutElement.h:21
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonGMR4::MuonReadoutElement::center
Amg::Vector3D center(const ActsGeometryContext &ctx) const
Returns the detector center (Which is the same as the detector center of the first measurement layer)
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:28
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
MuonChamberSet
MuonGMR4::MuonDetectorManager::MuonChamberSet MuonChamberSet
Definition: MuonDetectorBuilderTool.cxx:33
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
ActsTrk::DetectorType::Mdt
@ Mdt
MuonSpectrometer.
MuonGMR4::MmReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MmReadoutElement.cxx:30
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MuonGMR4::MdtReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ActsTrk::volumePtr
std::shared_ptr< Acts::Experimental::DetectorVolume > volumePtr
Definition: MuonDetectorBuilderTool.cxx:36
MuonGMR4::sTgcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:19
ActsTrk::MuonDetectorBuilderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetectorBuilderTool.h:29
MuonGMR4::MuonChamber::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &gctx) const
Returns the transformation of the MuonChamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:68
MuonGMR4::StripLayer
Definition: StripLayer.h:10
MuonGMR4::MuonReadoutElement::stationName
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
ActsTrk::MuonDetectorBuilderTool::m_dumpVisual
Gaudi::Property< bool > m_dumpVisual
Definition: MuonDetectorBuilderTool.h:31
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MuonGMR4::MuonDetectorManager::getAllChambers
MuonChamberSet getAllChambers() const
: Returns all MuonChambers associated with the readout geometry
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:150
MuonGMR4::MuonReadoutElement::surfacePtr
std::shared_ptr< Acts::Surface > surfacePtr(const IdentifierHash &hash) const
Returns the pointer associated to a certain wire / plane.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:84
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
ActsTrk::DetectorType::Rpc
@ Rpc
Monitored Drift Tubes.
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
MuonGMR4::sTgcReadoutElement::parameterBook
Set of parameters to describe an sTGC chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:38
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
MuonGMR4::MuonReadoutElement::stationEta
int stationEta() const
Returns the stationEta (positive A site, negative O site)
MuonGMR4::MdtReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MdtReadoutElement.cxx:34
ActsTrk::MuonDetectorBuilderTool::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: MuonDetectorBuilderTool.h:28
IdentifierHash
Definition: IdentifierHash.h:38
ActsTrk::MuonDetectorBuilderTool::constructElements
std::pair< std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume > >, std::vector< std::shared_ptr< Acts::Surface > > > constructElements(const ActsGeometryContext &gctx, const MuonGMR4::MuonChamber &mChamber, std::pair< unsigned int, unsigned int > chId) const
Definition: MuonDetectorBuilderTool.cxx:122
MuonGMR4::MuonChamber::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:71
MuonGMR4::MdtReadoutElement::isValid
bool isValid(const IdentifierHash &measHash) const
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonGMR4::MuonReadoutElement::stationPhi
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))
MuonGMR4::TgcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/TgcReadoutElement.h:16
calibdata.tube
tube
Definition: calibdata.py:31
fitman.k
k
Definition: fitman.py:528