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

#include <MuonChamberToolTest.h>

Inheritance diagram for MuonGMR4::MuonChamberToolTest:
Collaboration diagram for MuonGMR4::MuonChamberToolTest:

Public Member Functions

 ~MuonChamberToolTest ()=default
 
StatusCode execute (const EventContext &ctx) const override
 
StatusCode initialize () override
 
bool isReEntrant () const override final
 
template<class EnevelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const TgcReadoutElement &tgc, const EnevelopeType &chamber, const Acts::Volume &detVol) const
 
template<class EnevelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const MmReadoutElement &mm, const EnevelopeType &chamber, const Acts::Volume &detVol) const
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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, V, H > &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
 

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::array< Amg::Vector3D, 8 > cornerPoints (const Acts::Volume &volume) const
 
std::array< Amg::Vector3D, 8 > cornerPoints (const Acts::GeometryContext &gctx, const Acts::StrawSurface &surface) const
 
std::array< Amg::Vector3D, 4 > cornerPoints (const Acts::GeometryContext &gctx, const Acts::PlaneSurface &) const
 
template<class EnvelopeType >
StatusCode allReadoutInEnvelope (const ActsGeometryContext &ctx, const EnvelopeType &envelope) const
 Checks whether the readout elements of an enevelope are completely embedded into the envelope. More...
 
template<class EnvelopeType >
StatusCode pointInside (const EnvelopeType &envelope, const Acts::Volume &boundVol, const Amg::Vector3D &point, const std::string &descr, const Identifier &channelId) const
 Checks whether the point is inside of an envelope object, i.e. More...
 
StatusCode pointInside (const Acts::TrackingVolume &volume, const Amg::Vector3D &point, const std::string &descr, const Identifier &chamberId) const
 Checks whether the point is inside a tracking volume. More...
 
template<class EnvelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const MdtReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
 Checks whether all channels of a given readout element are fully covered by the envelope. More...
 
template<class EnvelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const RpcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
 
template<class EnvelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const TgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
 
template<class EnvelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const sTgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
 
template<class EnvelopeType >
StatusCode testReadoutEle (const ActsGeometryContext &gctx, const MmReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
SG::ReadHandleKey< ActsGeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
 
ServiceHandle< IActsTrackingGeometrySvcm_trackingGeometrySvc {this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"}
 
const MuonDetectorManagerm_detMgr {nullptr}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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 30 of file MuonChamberToolTest.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~MuonChamberToolTest()

MuonGMR4::MuonChamberToolTest::~MuonChamberToolTest ( )
default

Member Function Documentation

◆ allReadoutInEnvelope()

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::allReadoutInEnvelope ( const ActsGeometryContext ctx,
const EnvelopeType &  envelope 
) const
private

Checks whether the readout elements of an enevelope are completely embedded into the envelope.

Definition at line 100 of file MuonChamberToolTest.cxx.

101  {
102  std::shared_ptr<Acts::Volume> boundVol = envelope.boundingVolume(gctx);
103  const Chamber::ReadoutSet reEles = envelope.readoutEles();
104  for(const MuonReadoutElement* readOut : reEles) {
105  if constexpr (std::is_same_v<EnvelopeType, SpectrometerSector>) {
106  if (readOut->msSector() != &envelope) {
107  ATH_MSG_FATAL("Mismatch in the sector association "<<m_idHelperSvc->toStringDetEl(readOut->identify())
108  <<std::endl<<(*readOut->msSector())<<std::endl<<envelope);
109  return StatusCode::FAILURE;
110  }
111  } else if constexpr (std::is_same_v<EnvelopeType, Chamber>) {
112  if (readOut->chamber() != &envelope) {
113  ATH_MSG_FATAL("Mismatch in the chamber association "<<m_idHelperSvc->toStringDetEl(readOut->identify())
114  <<std::endl<<(*readOut->chamber())<<std::endl<<envelope);
115  return StatusCode::FAILURE;
116  }
117  }
118  switch (readOut->detectorType()) {
120  const auto* detEle = static_cast<const TgcReadoutElement*>(readOut);
121  ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
122  break;
124  const auto* detEle = static_cast<const MdtReadoutElement*>(readOut);
125  ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
126  break;
128  const auto* detEle = static_cast<const RpcReadoutElement*>(readOut);
129  ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
130  break;
131  } case ActsTrk::DetectorType::Mm: {
132  const auto* detEle = static_cast<const MmReadoutElement*>(readOut);
133  ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
134  break;
136  const auto* detEle = static_cast<const sTgcReadoutElement*>(readOut);
137  ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
138  break;
139  } default: {
140  ATH_MSG_FATAL("Who came up with putting "<<ActsTrk::to_string(readOut->detectorType())
141  <<" into the MS");
142  return StatusCode::FAILURE;
143  }
144  }
145  }
146  ATH_MSG_DEBUG("All "<<reEles.size()<<" readout elements are embedded in "<<envelope);
147  return StatusCode::SUCCESS;
148  }

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ cornerPoints() [1/3]

std::array< Amg::Vector3D, 4 > MuonGMR4::MuonChamberToolTest::cornerPoints ( const Acts::GeometryContext &  gctx,
const Acts::PlaneSurface &  surface 
) const
private

Definition at line 194 of file MuonChamberToolTest.cxx.

194  {
195  std::array<Amg::Vector3D, 4> edges{make_array<Amg::Vector3D,4>(Amg::Vector3D::Zero())};
196  if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle) { //RPC surfaces are rectangles
197  const Acts::RectangleBounds& bounds = static_cast<const Acts::RectangleBounds&>(surface.bounds());
198  using BoundEnum = Acts::RectangleBounds::BoundValues;
199 
200  unsigned int edgeIdx{0};
201  for(const double signX : {-1., 1.}) {
202  for (const double signY : { -1., 1.}) {
203  const Amg::Vector3D edge{ signX < 0 ? bounds.get(BoundEnum::eMinX) : bounds.get(BoundEnum::eMaxX),
204  signY < 0 ? bounds.get(BoundEnum::eMinY) : bounds.get(BoundEnum::eMaxY),
205  0};
206  edges[edgeIdx] = surface.transform(gctx) * edge;
207  ++edgeIdx;
208  }
209  }
210  return edges;
211 
212  } else if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eTrapezoid) {
213  using BoundEnum = Acts::TrapezoidBounds::BoundValues;
214  const auto& bounds = static_cast<const Acts::TrapezoidBounds&>(surface.bounds());
215  unsigned int edgeIdx{0};
216 
217 
218  ATH_MSG_VERBOSE("Fetch volume bounds "<<Amg::toString(surface.transform(gctx)));
219  for (const double signX : {-1., 1.}) {
220  for (const double signY : { -1., 1.}) {
221  const Amg::Vector3D edge {
222  Amg::getRotateZ3D(-1*bounds.get(BoundEnum::eRotationAngle))*
223 
224  Amg::Vector3D(signX*bounds.get(signY < 0 ? BoundEnum::eHalfLengthXnegY : BoundEnum::eHalfLengthXposY),
225  signY*bounds.get(BoundEnum::eHalfLengthY),
226  0)};
227 
228  edges[edgeIdx] = surface.transform(gctx) * edge;
229  ++edgeIdx;
230  }
231  }
232 
233  return edges;
234  } else {
235  ATH_MSG_FATAL("The surface bounds are neither a rectangle nor a trapezoid, this is not supported yet");
236  return edges;
237  }
238 
239  }

◆ cornerPoints() [2/3]

std::array< Amg::Vector3D, 8 > MuonGMR4::MuonChamberToolTest::cornerPoints ( const Acts::GeometryContext &  gctx,
const Acts::StrawSurface &  surface 
) const
private

Definition at line 172 of file MuonChamberToolTest.cxx.

172  {
173  std::array<Amg::Vector3D, 8> edges{make_array<Amg::Vector3D,8>(Amg::Vector3D::Zero())};
174  using BoundEnum = Acts::LineBounds::BoundValues;
175  const auto& bounds = static_cast<const Acts::LineBounds&>(surface.bounds());
176  unsigned int edgeIdx{0};
177 
178  ATH_MSG_VERBOSE("Fetch volume bounds "<<Amg::toString(surface.transform(gctx)));
179  for (const double signX : {-1., 1.}) {
180  for (const double signY : { -1., 1.}) {
181  for (const double signZ: {-1., 1.}) {
182  const Amg::Vector3D edge{signX*bounds.get(BoundEnum::eR),
183  signY*bounds.get(BoundEnum::eR),
184  signZ*bounds.get(BoundEnum::eHalfLengthZ)};
185  edges[edgeIdx] = surface.transform(gctx) * edge;
186  ++edgeIdx;
187  }
188  }
189  }
190 
191  return edges;
192  }

◆ cornerPoints() [3/3]

std::array< Amg::Vector3D, 8 > MuonGMR4::MuonChamberToolTest::cornerPoints ( const Acts::Volume &  volume) const
private

Definition at line 150 of file MuonChamberToolTest.cxx.

150  {
151  std::array<Amg::Vector3D, 8> edges{make_array<Amg::Vector3D,8>(Amg::Vector3D::Zero())};
152  unsigned int edgeIdx{0};
153  using BoundEnum = Acts::TrapezoidVolumeBounds::BoundValues;
154  const auto& bounds = static_cast<const Acts::TrapezoidVolumeBounds&>(volume.volumeBounds());
155  ATH_MSG_VERBOSE("Fetch volume bounds "<<Amg::toString(volume.transform()));
156  for (const double signX : {-1., 1.}) {
157  for (const double signY : { -1., 1.}) {
158  for (const double signZ: {-1., 1.}) {
159  const Amg::Vector3D edge{signX* (signY>0 ? bounds.get(BoundEnum::eHalfLengthXposY) :
160  bounds.get(BoundEnum::eHalfLengthXnegY)),
161  signY*bounds.get(BoundEnum::eHalfLengthY),
162  signZ*bounds.get(BoundEnum::eHalfLengthZ)};
163  edges[edgeIdx] = volume.transform() * edge;
164  ATH_MSG_VERBOSE("Local edge "<<Amg::toString(edge)<<", global edge: "<<Amg::toString(edges[edgeIdx]));
165  ++edgeIdx;
166  }
167  }
168  }
169  return edges;
170  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode MuonGMR4::MuonChamberToolTest::execute ( const EventContext &  ctx) const
override

Check that all chambers covered by their sector envelopes

Definition at line 242 of file MuonChamberToolTest.cxx.

242  {
243  const ActsGeometryContext* gctx{nullptr};
244  ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
245  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry = m_trackingGeometrySvc->trackingGeometry();
247  using SectorSet = MuonDetectorManager::MuonSectorSet;
248  const SectorSet sectors = m_detMgr->getAllSectors();
249  ATH_MSG_INFO("Fetched "<<sectors.size()<<" sectors. ");
250  for (const SpectrometerSector* sector : sectors) {
251  ATH_CHECK(allReadoutInEnvelope(*gctx, *sector));
252  const std::shared_ptr<Acts::Volume> secVolume = sector->boundingVolume(*gctx);
253  for (const SpectrometerSector::ChamberPtr& chamber : sector->chambers()){
254  const std::array<Amg::Vector3D, 8> edges = cornerPoints(*chamber->boundingVolume(*gctx));
255  unsigned int edgeCount{0};
256  for (const Amg::Vector3D& edge : edges) {
257  ATH_CHECK(pointInside(*sector,*secVolume,edge,
258  std::format("Edge {:}", edgeCount++),
259  chamber->readoutEles().front()->identify()));
260  }
261  const Acts::TrackingVolume* trkGeoVol = trackingGeometry->lowestTrackingVolume(gctx->context(), chamber->boundingVolume(*gctx)->center());
262  ATH_MSG_DEBUG("Found "<<trkGeoVol->volumeName()<< " with " << trkGeoVol->volumes().size() <<" sub volumes for chamber "<<m_idHelperSvc->toString(chamber->readoutEles().front()->identify()));
263 
264  if(trkGeoVol->volumes().size() > 2) continue; // temporary workaround for overlaps in the tracking geometry
265 
266  trkGeoVol->visitVolumes([&](const Acts::TrackingVolume* volume) {
267  ATH_MSG_DEBUG("Found sub volume "<<volume->volumeName());
268  });
269 
270 
271  std::map<Identifier, const std::array<Amg::Vector3D, 8>> strawCorners;
272  std::map<Identifier, const std::array<Amg::Vector3D, 4>> trapezoidCorners;
273 
274 
275  trkGeoVol->visitSurfaces([&](const Acts::Surface* surface) {
276  if(surface->type() == Acts::Surface::SurfaceType::Plane){
277  const auto* planeSurface = static_cast<const Acts::PlaneSurface*>(surface);
278  ATH_MSG_DEBUG("Found plane surface with id" << planeSurface->geometryId());
279  if(planeSurface->associatedDetectorElement()){ // skip the material surfaces
280  const ActsTrk::IDetectorElementBase* iDetElement = static_cast<const ActsTrk::IDetectorElementBase*> (planeSurface->associatedDetectorElement());
281  trapezoidCorners.emplace(iDetElement->identify(), cornerPoints(gctx->context(), *planeSurface));
282  }
283  } else if (surface->type() == Acts::Surface::SurfaceType::Straw) {
284  const auto* strawSurface = static_cast<const Acts::StrawSurface*>(surface);
285  if(strawSurface->associatedDetectorElement() ) {
286  const ActsTrk::IDetectorElementBase* iDetElement = static_cast<const ActsTrk::IDetectorElementBase*> (strawSurface->associatedDetectorElement());
287  strawCorners.emplace(iDetElement->identify(), cornerPoints(gctx->context(), *strawSurface));
288  }
289  } else {
290 
291  ATH_MSG_FATAL("Got non muon surface");
292  }
293 
294  }
295  , true);
296 
297  ATH_MSG_DEBUG("Found "<<strawCorners.size()<<" straw corners and "<<trapezoidCorners.size()<<" trapezoid corners in chamber "<<m_idHelperSvc->toString(chamber->readoutEles().front()->identify()));
298 
299  for (const auto& [id, corners] : strawCorners) {
300  edgeCount = 0;
301  for (unsigned int i = 0; i < corners.size(); ++i) {
302  ATH_CHECK(pointInside(*trkGeoVol, corners[i],
303  std::format("Straw corner {:}", i),
304  chamber->readoutEles().front()->identify()));
305  }
306  }
307 
308  unsigned int surfaceCount{0};
309  for (const auto& [id, corners] : trapezoidCorners) {
310  ATH_MSG_DEBUG("Found "<<corners.size()<<" corners for straw chamber "<<m_idHelperSvc->toString(id));
311  if(strawCorners.size() != 0){
312  break; // this is a straw chamber and I dont know were the plane surface comes from
313  }
314 
315  edgeCount = 0;
316  for (unsigned int i = 0; i < corners.size(); ++i) {
317  ATH_CHECK(pointInside(*trkGeoVol, corners[i],
318  std::format("Trapezoid corner {:} of surface {:}", i, ++surfaceCount),
319  id));
320  }
321  }
322 
323 
324  }
325  }
327  const ChamberSet chambers = m_detMgr->getAllChambers();
328  for (const Chamber* chamber : chambers) {
330  }
331  return StatusCode::SUCCESS;
332  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ initialize()

StatusCode MuonGMR4::MuonChamberToolTest::initialize ( )
override

Definition at line 32 of file MuonChamberToolTest.cxx.

32  {
33  ATH_CHECK(m_idHelperSvc.retrieve());
35  ATH_CHECK(m_trackingGeometrySvc.retrieve());
37  return StatusCode::SUCCESS;
38  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ isReEntrant()

bool MuonGMR4::MuonChamberToolTest::isReEntrant ( ) const
inlinefinaloverride

Definition at line 38 of file MuonChamberToolTest.h.

38 {return false;}

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ pointInside() [1/2]

StatusCode MuonGMR4::MuonChamberToolTest::pointInside ( const Acts::TrackingVolume &  volume,
const Amg::Vector3D point,
const std::string &  descr,
const Identifier chamberId 
) const
private

Checks whether the point is inside a tracking volume.

Parameters
volumeReference to the tracking volume to check
pointPoint that needs to be inside the volume
descrDescription of the point
chamberIdIdentifier for more information if the point is outside

Definition at line 83 of file MuonChamberToolTest.cxx.

86  {
87  if (volume.inside(point)) {
88  return StatusCode::SUCCESS;
89  }
90  const auto& volumeCorners = cornerPoints(volume);
91  ATH_MSG_FATAL("In channel "<<m_idHelperSvc->toString(chamberId) <<", the point "
92  << descr <<" "<<Amg::toString(point)<<" is not part of the chamber volume. The corners of the volume are:");
93  for(const auto& corner : volumeCorners) {
94  ATH_MSG_FATAL(" "<<Amg::toString(corner));
95  }
96  return StatusCode::FAILURE;
97  }

◆ pointInside() [2/2]

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::pointInside ( const EnvelopeType &  envelope,
const Acts::Volume &  boundVol,
const Amg::Vector3D point,
const std::string &  descr,
const Identifier channelId 
) const
private

Checks whether the point is inside of an envelope object, i.e.

the spectrometer sector or the chamber

Parameters
envelopeReference to the envelope to check
boundVolReference to the bounding volume representing the envelope
pointPoint that needs to be inside the volume
descrDescription of the point
channelIdIdentifier for more information if the point is outside

Why does the strip design give a different result than the Acts bounds?

Definition at line 48 of file MuonChamberToolTest.cxx.

52  {
53 
54  // Explicitly inline Volume::inside here so that it gets
55  // flattened in debug builds.
56  Acts::Vector3 posInVolFrame((boundVol.transform().inverse()) * point);
57  if (boundVol.volumeBounds().inside(posInVolFrame,tolerance)) {
58  ATH_MSG_VERBOSE("In channel "<<m_idHelperSvc->toString(channelId)
59  <<", point "<<descr <<" is inside of the chamber "<<std::endl<<chamb<<std::endl
60  <<"Local position:" <<Amg::toString(boundVol.itransform() * point));
61  return StatusCode::SUCCESS;
62  }
63  const Amg::Vector3D locPos{boundVol.itransform() * point};
64 
65  StripDesign planeTrapezoid{};
66  planeTrapezoid.defineTrapezoid(chamb.halfXShort(), chamb.halfXLong(), chamb.halfY());
67  planeTrapezoid.setLevel(MSG::VERBOSE);
69  static const Eigen::Rotation2D axisSwap{90. *Gaudi::Units::deg};
70  if (std::abs(locPos.z()) - chamb.halfZ() < -tolerance &&
71  planeTrapezoid.insideTrapezoid(axisSwap*locPos.block<2,1>(0,0))) {
72  return StatusCode::SUCCESS;
73  }
74  planeTrapezoid.defineStripLayout(locPos.y() * Amg::Vector2D::UnitX(), 1, 1, 1);
75  ATH_MSG_FATAL("In channel "<<m_idHelperSvc->toString(channelId) <<", the point "
76  << descr <<" "<<Amg::toString(point)<<" is not part of the chamber volume."
77  <<std::endl<<std::endl<<chamb<<std::endl<<"Local position "<<Amg::toString(locPos)
78  <<", box left edge: "<<Amg::toString(planeTrapezoid.leftEdge(1).value_or(Amg::Vector2D::Zero()))
79  <<", box right edge "<<Amg::toString(planeTrapezoid.rightEdge(1).value_or(Amg::Vector2D::Zero())));
80  return StatusCode::FAILURE;
81  }

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ testReadoutEle() [1/7]

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const MdtReadoutElement readOutEle,
const EnvelopeType &  envelope,
const Acts::Volume &  boundVol 
) const
private

Checks whether all channels of a given readout element are fully covered by the envelope.

Parameters
gctxGeometry context carrying all alignment & global transformations
readOutEleReadout element to test
envelopeReference to the envelope to check
boundVolBounding volume representing the envelope

Definition at line 334 of file MuonChamberToolTest.cxx.

337  {
338  ATH_MSG_VERBOSE("Test whether "<<m_idHelperSvc->toStringDetEl(mdtMl.identify())<<std::endl<<mdtMl.getParameters());
339 
340  for (unsigned int layer = 1; layer <= mdtMl.numLayers(); ++layer) {
341  for (unsigned int tube = 1; tube <= mdtMl.numTubesInLay(); ++tube) {
342  const IdentifierHash idHash = mdtMl.measurementHash(layer, tube);
343  if (!mdtMl.isValid(idHash)){
344  continue;
345  }
346  const Amg::Transform3D& locToGlob{mdtMl.localToGlobalTrans(gctx, idHash)};
347  const Identifier measId{mdtMl.measurementId(idHash)};
348 
349  ATH_CHECK(pointInside(chamber, detVol, mdtMl.globalTubePos(gctx, idHash), "tube center", measId));
350 
351  ATH_CHECK(pointInside(chamber, detVol, mdtMl.readOutPos(gctx, idHash), "tube readout", measId));
352  ATH_CHECK(pointInside(chamber, detVol, mdtMl.highVoltPos(gctx, idHash), "tube HV", measId));
353 
354  ATH_CHECK(pointInside(chamber, detVol, locToGlob*(-mdtMl.innerTubeRadius() * Amg::Vector3D::UnitX()),
355  "bottom of the tube box", measId));
356  ATH_CHECK(pointInside(chamber, detVol, locToGlob*(mdtMl.innerTubeRadius() * Amg::Vector3D::UnitX()),
357  "sealing of the tube box", measId));
358 
359  ATH_CHECK(pointInside(chamber, detVol, locToGlob*(-mdtMl.innerTubeRadius() * Amg::Vector3D::UnitY()),
360  "wall to the previous tube", measId));
361  ATH_CHECK(pointInside(chamber, detVol, locToGlob*(-mdtMl.innerTubeRadius() * Amg::Vector3D::UnitY()),
362  "wall to the next tube", measId));
363  }
364  }
365  return StatusCode::SUCCESS;
366  }

◆ testReadoutEle() [2/7]

template<class EnevelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const MmReadoutElement mm,
const EnevelopeType &  chamber,
const Acts::Volume &  detVol 
) const

Definition at line 410 of file MuonChamberToolTest.cxx.

413  {
414 
415  const MmIdHelper& idHelper{m_idHelperSvc->mmIdHelper()};
416  for(unsigned int gasGap = 1; gasGap <= mm.nGasGaps(); ++gasGap){
418  unsigned int firstStrip = mm.firstStrip(gasGapHash);
419  for(unsigned int strip = firstStrip; strip <= mm.numStrips(gasGapHash); ++strip){
420  const Identifier stripId = idHelper.channelID(mm.identify(), mm.multilayer(), gasGap, strip);
421  ATH_CHECK(pointInside(chamber, detVol, mm.stripPosition(gctx, stripId), "center", stripId));
422  ATH_CHECK(pointInside(chamber, detVol, mm.leftStripEdge(gctx, mm.measurementHash(stripId)), "left edge", stripId));
423  ATH_CHECK(pointInside(chamber, detVol, mm.rightStripEdge(gctx, mm.measurementHash(stripId)), "right edge", stripId));
424  }
425  }
426 
427  return StatusCode::SUCCESS;
428  }

◆ testReadoutEle() [3/7]

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const MmReadoutElement readOutEle,
const EnvelopeType &  envelope,
const Acts::Volume &  boundVol 
) const
private

◆ testReadoutEle() [4/7]

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const RpcReadoutElement readOutEle,
const EnvelopeType &  envelope,
const Acts::Volume &  boundVol 
) const
private

Definition at line 368 of file MuonChamberToolTest.cxx.

371  {
372 
373  ATH_MSG_VERBOSE("Test whether "<<m_idHelperSvc->toStringDetEl(rpc.identify())<<std::endl<<rpc.getParameters());
374 
375  const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
376  for (unsigned int gasGap = 1 ; gasGap <= rpc.nGasGaps(); ++gasGap) {
377  for (int doubletPhi = rpc.doubletPhi(); doubletPhi <= rpc.doubletPhiMax(); ++doubletPhi){
378  for (bool measPhi : {false, true}) {
379  const int nStrips = measPhi ? rpc.nPhiStrips() : rpc.nEtaStrips();
380  for (int strip = 1; strip <= nStrips; ++strip) {
381  const Identifier stripId = idHelper.channelID(rpc.identify(),rpc.doubletZ(),
382  doubletPhi, gasGap, measPhi, strip);
383  ATH_CHECK(pointInside(chamber, detVol, rpc.stripPosition(gctx, stripId), "center", stripId));
384  ATH_CHECK(pointInside(chamber, detVol, rpc.leftStripEdge(gctx, stripId), "right edge", stripId));
385  ATH_CHECK(pointInside(chamber, detVol, rpc.rightStripEdge(gctx, stripId), "left edge", stripId));
386  }
387  }
388  }
389  }
390  return StatusCode::SUCCESS;
391  }

◆ testReadoutEle() [5/7]

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const sTgcReadoutElement readOutEle,
const EnvelopeType &  envelope,
const Acts::Volume &  boundVol 
) const
private

Definition at line 430 of file MuonChamberToolTest.cxx.

433  {
434 
435  const sTgcIdHelper& idHelper{m_idHelperSvc->stgcIdHelper()};
436  for(unsigned int gasGap = 1; gasGap <= stgc.numLayers(); ++gasGap){
437 
438  for(unsigned int nch = 1; nch <= stgc.nChTypes(); ++nch){
439  IdentifierHash gasGapHash = sTgcReadoutElement::createHash(gasGap, nch, 0, 0);
440  const unsigned int nStrips = stgc.numChannels(gasGapHash);
442 
443  for(unsigned int strip = 1; strip <= nStrips; ++strip){
444  const Identifier stripId = idHelper.channelID(stgc.identify(), stgc.multilayer(), gasGap, nch, strip);
445  ATH_CHECK(pointInside(chamber, detVol, stgc.globalChannelPosition(gctx, stripId), "channel position", stripId));
446 
447  if(channelType == sTgcReadoutElement::ReadoutChannelType::Wire || channelType == sTgcReadoutElement::ReadoutChannelType::Strip){
448 
449  ATH_CHECK(pointInside(chamber, detVol, stgc.rightStripEdge(gctx, stgc.measurementHash(stripId)), "channel position", stripId));
450  ATH_CHECK(pointInside(chamber, detVol, stgc.leftStripEdge(gctx, stgc.measurementHash(stripId)), "channel position", stripId));
451 
452  }
453 
454  }
455 
456  }
457 
458  }
459 
460  return StatusCode::SUCCESS;
461 
462  }

◆ testReadoutEle() [6/7]

template<class EnvelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const TgcReadoutElement readOutEle,
const EnvelopeType &  envelope,
const Acts::Volume &  boundVol 
) const
private

◆ testReadoutEle() [7/7]

template<class EnevelopeType >
StatusCode MuonGMR4::MuonChamberToolTest::testReadoutEle ( const ActsGeometryContext gctx,
const TgcReadoutElement tgc,
const EnevelopeType &  chamber,
const Acts::Volume &  detVol 
) const

Definition at line 393 of file MuonChamberToolTest.cxx.

396  {
397  for (unsigned int gasGap = 1; gasGap <= tgc.nGasGaps(); ++gasGap){
398  for (bool isStrip : {false}) {
399  const IdentifierHash layHash = tgc.constructHash(0, gasGap, isStrip);
400  const unsigned int nChannel = tgc.numChannels(layHash);
401  for (unsigned int channel = 1; channel <= nChannel ; ++channel) {
402  const IdentifierHash measHash = tgc.constructHash(channel, gasGap, isStrip);
403  ATH_CHECK(pointInside(chamber, detVol, tgc.channelPosition(gctx, measHash), "center", tgc.measurementId(measHash)));
404  }
405  }
406  }
407  return StatusCode::SUCCESS;
408  }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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 MuonDetectorManager* MuonGMR4::MuonChamberToolTest::m_detMgr {nullptr}
private

Definition at line 115 of file MuonChamberToolTest.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsGeometryContext> MuonGMR4::MuonChamberToolTest::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Definition at line 111 of file MuonChamberToolTest.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonGMR4::MuonChamberToolTest::m_idHelperSvc
private
Initial value:
{this, "IdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

Definition at line 108 of file MuonChamberToolTest.h.

◆ m_trackingGeometrySvc

ServiceHandle<IActsTrackingGeometrySvc> MuonGMR4::MuonChamberToolTest::m_trackingGeometrySvc {this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"}
private

Definition at line 113 of file MuonChamberToolTest.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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::MuonChamberToolTest::m_trackingGeometrySvc
ServiceHandle< IActsTrackingGeometrySvc > m_trackingGeometrySvc
Definition: MuonChamberToolTest.h:113
MuonGMR4::MuonChamberToolTest::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonChamberToolTest.h:108
MuonGMR4::SpectrometerSector::ChamberPtr
GeoModel::TransientConstSharedPtr< Chamber > ChamberPtr
Definition: SpectrometerSector.h:42
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGMR4::MmReadoutElement::createHash
static IdentifierHash createHash(const int gasGap, const int strip)
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
MuonGMR4::MuonDetectorManager::MuonSectorSet
std::set< const SpectrometerSector *, MSEnvelopeSorter > MuonSectorSet
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:123
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ActsTrk::IDetectorElementBase::identify
virtual Identifier identify() const =0
Return the ATLAS identifier.
calibdata.chamber
chamber
Definition: calibdata.py:31
CaloCondBlobAlgs_fillNoiseFromASCII.nChannel
nChannel
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:90
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
ActsTrk::DetectorType::Tgc
@ Tgc
Resitive Plate Chambers.
MuonGMR4::MuonChamberToolTest::m_detMgr
const MuonDetectorManager * m_detMgr
Definition: MuonChamberToolTest.h:115
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonGMR4::sTgcReadoutElement::ReadoutChannelType
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:30
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ActsTrk::DetectorType::sTgc
@ sTgc
Micromegas (NSW)
RpcIdHelper
Definition: RpcIdHelper.h:51
keylayer_zslicemap.strip
strip
Definition: keylayer_zslicemap.py:151
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonGMR4::ChamberSet
SpectrometerSector::ChamberSet ChamberSet
Definition: SpectrometerSector.cxx:35
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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
MuonGMR4::MuonChamberToolTest::testReadoutEle
StatusCode testReadoutEle(const ActsGeometryContext &gctx, const MdtReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
Checks whether all channels of a given readout element are fully covered by the envelope.
Definition: MuonChamberToolTest.cxx:334
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
MuonGMR4::sTgcReadoutElement::createHash
static IdentifierHash createHash(const unsigned int gasGap, const unsigned int channelType, const unsigned int channel, const unsigned int wireInGrp=0)
Create a measurement hash from the Identifier fields.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrk::IDetectorElementBase
base class interface providing the bare minimal interface extension.
Definition: IDetectorElement.h:32
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ActsTrk::DetectorType::Mm
@ Mm
Maybe not needed in the migration.
SCT_CalibAlgs::firstStrip
@ firstStrip
Definition: SCT_CalibNumbers.h:10
lumiFormat.i
int i
Definition: lumiFormat.py:85
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGMR4::MuonDetectorManager::MuonChamberSet
std::set< const Chamber *, MSEnvelopeSorter > MuonChamberSet
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:124
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGMR4::Chamber::ReadoutSet
std::vector< const MuonReadoutElement * > ReadoutSet
Define the list of read out elements of the chamber.
Definition: Chamber.h:26
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.TransformConfig.descr
descr
print "%s.properties()" % self.__name__
Definition: TransformConfig.py:359
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MuonGMR4::MuonChamberToolTest::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: MuonChamberToolTest.h:111
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:121
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
tolerance
Definition: suep_shower.h:17
MuonGM::nStrips
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:46
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
ActsTrk::DetectorType::Mdt
@ Mdt
MuonSpectrometer.
xAOD::Straw
@ Straw
Definition: TrackingPrimitives.h:558
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
sTgcIdHelper
Definition: sTgcIdHelper.h:55
MuonGMR4::MuonChamberToolTest::pointInside
StatusCode pointInside(const EnvelopeType &envelope, const Acts::Volume &boundVol, const Amg::Vector3D &point, const std::string &descr, const Identifier &channelId) const
Checks whether the point is inside of an envelope object, i.e.
Definition: MuonChamberToolTest.cxx:48
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGMR4::MuonDetectorManager::getAllSectors
MuonSectorSet getAllSectors() const
: Returns all MuonChambers associated with the readout geometry
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:207
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MuonGMR4::MuonChamberToolTest::cornerPoints
std::array< Amg::Vector3D, 8 > cornerPoints(const Acts::Volume &volume) const
Definition: MuonChamberToolTest.cxx:150
MmIdHelper
Definition: MmIdHelper.h:54
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
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:629
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
createCablingJSON.doubletPhi
int doubletPhi
Definition: createCablingJSON.py:16
MuonGMR4::MuonChamberToolTest::allReadoutInEnvelope
StatusCode allReadoutInEnvelope(const ActsGeometryContext &ctx, const EnvelopeType &envelope) const
Checks whether the readout elements of an enevelope are completely embedded into the envelope.
Definition: MuonChamberToolTest.cxx:100
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
xAOD::Plane
@ Plane
Definition: TrackingPrimitives.h:557
MuonGMR4::MuonDetectorManager::getAllChambers
MuonChamberSet getAllChambers() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:215
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
calibdata.tube
tube
Definition: calibdata.py:30
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14