ATLAS Offline Software
Loading...
Searching...
No Matches
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 ActsTrk::GeometryContext &gctx, const TgcReadoutElement &tgc, const EnevelopeType &chamber, const Acts::Volume &detVol) const
template<class EnevelopeType>
StatusCode testReadoutEle (const ActsTrk::GeometryContext &gctx, const MmReadoutElement &mm, const EnevelopeType &chamber, const Acts::Volume &detVol) const
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::vector< Amg::Vector3DcornerPoints (const ActsTrk::GeometryContext &gctx, const Acts::Volume &volume) const
 Returns the edge points from a trapezoidal / cuboid /diamond volume.
std::array< Amg::Vector3D, 8 > cornerPoints (const ActsTrk::GeometryContext &gctx, const Acts::StrawSurface &surface) const
std::array< Amg::Vector3D, 4 > cornerPoints (const ActsTrk::GeometryContext &gctx, const Acts::PlaneSurface &surface) const
void saveEnvelope (const ActsTrk::GeometryContext &gctx, const std::string &envName, const Acts::Volume &envelopeVol, const std::vector< const Acts::Surface * > &assocSurfaces, const std::vector< const Acts::Volume * > &subVolumes={}) const
StatusCode checkPortals (const ActsTrk::GeometryContext &gctx, const Acts::TrackingVolume &volume) const
StatusCode checkChambers (const ActsTrk::GeometryContext &gctx) const
 Check whether the chamber envelopes are consistent.
StatusCode checkEnvelopes (const ActsTrk::GeometryContext &gctx) const
 Check envelopes.
StatusCode checkTrackingGeometry (const ActsTrk::GeometryContext &gctx, const Acts::TrackingGeometry &trackingGeometry) const
 Check tracking geometry volumes.
template<class EnvelopeType>
StatusCode allReadoutInEnvelope (const ActsTrk::GeometryContext &ctx, const EnvelopeType &envelope) const
 Checks whether the readout elements of an enevelope are completely embedded into the envelope.
template<class EnvelopeType>
StatusCode pointInside (const ActsTrk::GeometryContext &gctx, 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.
StatusCode pointInside (const ActsTrk::GeometryContext &gctx, 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.
bool hasOverlap (const ActsTrk::GeometryContext &gctx, const std::vector< Amg::Vector3D > &chamberEdges, const Acts::Volume &volume) const
 Checks whether the edge points from a trapezoid/cuboid/diamond form a volume overlapping with the given volume.
template<class EnvelopeType>
StatusCode testReadoutEle (const ActsTrk::GeometryContext &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.
template<class EnvelopeType>
StatusCode testReadoutEle (const ActsTrk::GeometryContext &gctx, const RpcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
template<class EnvelopeType>
StatusCode testReadoutEle (const ActsTrk::GeometryContext &gctx, const TgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
template<class EnvelopeType>
StatusCode testReadoutEle (const ActsTrk::GeometryContext &gctx, const sTgcReadoutElement &readOutEle, const EnvelopeType &envelope, const Acts::Volume &boundVol) const
template<class EnvelopeType>
StatusCode testReadoutEle (const ActsTrk::GeometryContext &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>

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
SG::ReadHandleKey< ActsTrk::GeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
ServiceHandle< ActsTrk::ITrackingGeometrySvcm_trackingGeometrySvc {this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"}
Gaudi::Property< unsigned > m_overlapSamples {this, "overlapSamples", 50}
 Number of points to scan along the lines between two volume corners to check whether they belong to an another volume.
Gaudi::Property< std::string > m_overlapChambObj {this, "chamberOverlapFile", "OverlapingChambers.obj"}
 Name of the chamber output obj file.
Gaudi::Property< bool > m_ignoreOverlapCh {this, "ignoreChamberOverlap", true}
 The overlap of chamber volumes does not lead to a failure.
Gaudi::Property< bool > m_ignoreOutsideSurf {this, "ignoreOutsideSurface", true}
 The exceeding surfaces does not lead to a failure.
Gaudi::Property< bool > m_dumpObjs {this, "dumpVolumes" , false}
 Dump the chambers & sectors as separate obj files.
const MuonDetectorManagerm_detMgr {nullptr}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
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 ActsTrk::GeometryContext & ctx,
const EnvelopeType & envelope ) const
private

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

Definition at line 164 of file MuonChamberToolTest.cxx.

165 {
166 std::shared_ptr<Acts::Volume> boundVol = envelope.boundingVolume(gctx);
167 const Chamber::ReadoutSet reEles = envelope.readoutEles();
168 for(const MuonReadoutElement* readOut : reEles) {
169 if constexpr (std::is_same_v<EnvelopeType, SpectrometerSector>) {
170 if (readOut->msSector() != &envelope) {
171 ATH_MSG_ERROR("Mismatch in the sector association "<<m_idHelperSvc->toStringDetEl(readOut->identify())
172 <<std::endl<<(*readOut->msSector())<<std::endl<<envelope);
173 return StatusCode::FAILURE;
174 }
175 } else if constexpr (std::is_same_v<EnvelopeType, Chamber>) {
176 if (readOut->chamber() != &envelope) {
177 ATH_MSG_ERROR("Mismatch in the chamber association "<<m_idHelperSvc->toStringDetEl(readOut->identify())
178 <<std::endl<<(*readOut->chamber())<<std::endl<<envelope);
179 return StatusCode::FAILURE;
180 }
181 }
182 switch (readOut->detectorType()) {
184 const auto* detEle = static_cast<const TgcReadoutElement*>(readOut);
185 ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
186 break;
188 const auto* detEle = static_cast<const MdtReadoutElement*>(readOut);
189 ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
190 break;
192 const auto* detEle = static_cast<const RpcReadoutElement*>(readOut);
193 ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
194 break;
196 const auto* detEle = static_cast<const MmReadoutElement*>(readOut);
197 ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
198 break;
200 const auto* detEle = static_cast<const sTgcReadoutElement*>(readOut);
201 ATH_CHECK(testReadoutEle(gctx, *detEle, envelope, *boundVol));
202 break;
203 } default: {
204 ATH_MSG_ERROR("Who came up with putting "<<ActsTrk::to_string(readOut->detectorType())
205 <<" into the MS");
206 return StatusCode::FAILURE;
207 }
208 }
209 }
210 ATH_MSG_DEBUG("All "<<reEles.size()<<" readout elements are embedded in "<<envelope);
211 return StatusCode::SUCCESS;
212 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
std::vector< const MuonReadoutElement * > ReadoutSet
Define the list of read out elements of the chamber.
Definition Chamber.h:32
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode testReadoutEle(const ActsTrk::GeometryContext &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.
@ Mm
Maybe not needed in the migration.
@ Tgc
Resitive Plate Chambers.
@ sTgc
Micromegas (NSW).
@ Rpc
Monitored Drift Tubes.
@ Mdt
MuonSpectrometer.
std::string to_string(const DetectorType &type)

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
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.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

62{
63 return 0;
64}

◆ checkChambers()

StatusCode MuonGMR4::MuonChamberToolTest::checkChambers ( const ActsTrk::GeometryContext & gctx) const
private

Check whether the chamber envelopes are consistent.

Check the overlap with other chambers

Definition at line 374 of file MuonChamberToolTest.cxx.

374 {
375
376 std::vector<const MuonReadoutElement*> allRE = m_detMgr->getAllReadoutElements();
378 const ChamberSet chambers = m_detMgr->getAllChambers();
379 ATH_MSG_INFO("Fetched "<<chambers.size()<<" chambers.");
380 std::vector<const Chamber*> chamberVec{chambers.begin(), chambers.end()};
381
382 const auto missChamb = std::ranges::find_if(allRE, [&chamberVec](const MuonGMR4::MuonReadoutElement* re){
383 return std::ranges::find(chamberVec, re->chamber()) == chamberVec.end();
384 });
385 if (missChamb != allRE.end()) {
386 ATH_MSG_ERROR("The chamber "<<(*(*missChamb)->chamber())<<" is not in the chamber set");
387 return StatusCode::FAILURE;
388 }
389
390 // Retrieve bounds here rather than inside the loop below,
391 // so we only need to do it O(N) rather than O(N^2) times.
392 std::vector<std::shared_ptr<Acts::Volume> > chamberBoundsVec;
393 chamberBoundsVec.reserve (chamberVec.size());
394 for (const Chamber* ch : chamberVec)
395 chamberBoundsVec.push_back (ch->boundingVolume(gctx));
396
397 std::set<const Chamber*> overlapChambers{};
398 std::stringstream overlapstream{};
399 for (std::size_t chIdx = 0; chIdx< chamberVec.size(); ++chIdx) {
400 const Chamber& chamber{*chamberVec[chIdx]};
401 const Acts::Volume& chamberBounds = *chamberBoundsVec[chIdx];
402 if (m_dumpObjs) {
403 saveEnvelope(gctx, std::format("Chamber_{:}{:}{:}{:}{:}",
404 ActsTrk::to_string(chamber.detectorType()),
405 chName(chamber.chamberIndex()),
406 Acts::abs(chamber.stationEta()),
407 chamber.stationEta() > 0 ? 'A' : 'C',
408 chamber.stationPhi()),
409 chamberBounds, extractSurfaces(chamber.readoutEles()));
410 }
411 ATH_CHECK(allReadoutInEnvelope(gctx, chamber));
412 const std::vector<Amg::Vector3D> chambCorners = cornerPoints(gctx, chamberBounds);
414 std::vector<const Chamber*> overlaps{};
415 for (std::size_t chIdx1 = 0; chIdx1<chamberVec.size(); ++chIdx1) {
416 if (chIdx == chIdx1) {
417 continue;
418 }
419 const Chamber* overlapTest{chamberVec[chIdx1]};
420 if (hasOverlap(gctx, chambCorners, *chamberBoundsVec[chIdx1])) {
421 overlaps.push_back(overlapTest);
422 }
423 }
424 if (overlaps.empty()) {
425 continue;
426 }
427 overlapstream<<"The chamber "<<chamber<<" overlaps with "<<std::endl;
428 for (const Chamber* itOverlaps : overlaps) {
429 overlapstream<<" *** "<<(*itOverlaps)<<std::endl;
430 }
431 overlapstream<<std::endl<<std::endl;
432 overlapChambers.insert(overlaps.begin(), overlaps.end());
433 overlapChambers.insert(chamberVec[chIdx]);
434 }
435 if (!overlapChambers.empty()) {
436 Acts::ObjVisualization3D visualHelper{};
437 for (const Chamber* hasOverlap: overlapChambers) {
438 Acts::GeometryView3D::drawVolume(visualHelper, *hasOverlap->boundingVolume(gctx), gctx.context());
439 visualHelper.write(m_overlapChambObj.value());
440 }
441 if (m_ignoreOverlapCh) {
442 ATH_MSG_WARNING(overlapstream.str());
443 } else {
444 ATH_MSG_ERROR(overlapstream.str());
445 }
446 }
447 ATH_MSG_INFO("Chamber test completed. Found "<<overlapChambers.size()<<" overlapping chambers");
448 return overlapChambers.empty() || m_ignoreOverlapCh ? StatusCode::SUCCESS : StatusCode::FAILURE;
449 }
const boost::regex re(r_e)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
Acts::GeometryContext context() const
const MuonDetectorManager * m_detMgr
Gaudi::Property< bool > m_ignoreOverlapCh
The overlap of chamber volumes does not lead to a failure.
void saveEnvelope(const ActsTrk::GeometryContext &gctx, const std::string &envName, const Acts::Volume &envelopeVol, const std::vector< const Acts::Surface * > &assocSurfaces, const std::vector< const Acts::Volume * > &subVolumes={}) const
Gaudi::Property< bool > m_dumpObjs
Dump the chambers & sectors as separate obj files.
Gaudi::Property< std::string > m_overlapChambObj
Name of the chamber output obj file.
StatusCode allReadoutInEnvelope(const ActsTrk::GeometryContext &ctx, const EnvelopeType &envelope) const
Checks whether the readout elements of an enevelope are completely embedded into the envelope.
std::vector< Amg::Vector3D > cornerPoints(const ActsTrk::GeometryContext &gctx, const Acts::Volume &volume) const
Returns the edge points from a trapezoidal / cuboid /diamond volume.
bool hasOverlap(const ActsTrk::GeometryContext &gctx, const std::vector< Amg::Vector3D > &chamberEdges, const Acts::Volume &volume) const
Checks whether the edge points from a trapezoid/cuboid/diamond form a volume overlapping with the giv...
SpectrometerSector::ChamberSet ChamberSet
const std::string & chName(ChIndex index)
convert ChIndex into a string
Chamber
Define chamber types and locations.

◆ checkEnvelopes()

StatusCode MuonGMR4::MuonChamberToolTest::checkEnvelopes ( const ActsTrk::GeometryContext & gctx) const
private

Check envelopes.

Definition at line 451 of file MuonChamberToolTest.cxx.

451 {
452
453 std::vector<const MuonReadoutElement*> allREs = m_detMgr->getAllReadoutElements();
454 for (const MuonReadoutElement* re : allREs) {
455 if (!re->msSector()) {
456 ATH_MSG_ERROR("The readout element "<<m_idHelperSvc->toStringDetEl(re->identify())<<" does not have any sector associated ");
457 return StatusCode::FAILURE;
458 }
459 const SpectrometerSector* sectorFromDet = m_detMgr->getSectorEnvelope(re->chamberIndex(),
460 m_idHelperSvc->sector(re->identify()),
461 re->stationEta());
462 if (sectorFromDet != re->msSector()) {
463 ATH_MSG_ERROR("The sector attached to "<<m_idHelperSvc->toStringDetEl(re->identify())
464 <<", chIdx: "<<chName(re->chamberIndex())<<", sector: "<<m_idHelperSvc->sector(re->identify())
465 <<" is not the one attached to the readout geometry \n"<<(*re->msSector())<<"\n"<<(*sectorFromDet));
466 return StatusCode::FAILURE;
467 }
468 }
469 using SectorSet = MuonDetectorManager::MuonSectorSet;
470 const SectorSet sectors = m_detMgr->getAllSectors();
471 ATH_MSG_INFO(__func__<<"() "<<__LINE__<<" - Fetched "<<sectors.size()<<" sectors. ");
472 for (const SpectrometerSector* sector : sectors) {
473 if (m_dumpObjs) {
474 const auto subVols = chamberVolumes(gctx, *sector);
475 saveEnvelope(gctx, std::format("Sector_{:}{:}{:}",
476 chName(sector->chamberIndex()),
477 sector->side() >0? 'A' :'C',
478 sector->stationPhi() ),
479 *sector->boundingVolume(gctx),
480 extractSurfaces(sector->readoutEles()),
481 Acts::unpackSmartPointers(subVols));
482 }
483 ATH_CHECK(allReadoutInEnvelope(gctx, *sector));
484 const std::shared_ptr<Acts::Volume> secVolume = sector->boundingVolume(gctx);
485 for (const SpectrometerSector::ChamberPtr& chamber : sector->chambers()){
486 const std::vector<Amg::Vector3D> edges = cornerPoints(gctx, *chamber->boundingVolume(gctx));
487 unsigned int edgeCount{0};
488 for (const Amg::Vector3D& edge : edges) {
489 ATH_CHECK(pointInside(gctx, *sector, *secVolume, edge, std::format("Edge {:}", ++edgeCount),
490 chamber->readoutEles().front()->identify()));
491 }
492 }
493 }
494 ATH_MSG_INFO(__func__<<"() "<<__LINE__<<" - Sector envelope test completed.");
495 return StatusCode::SUCCESS;
496 }
StatusCode pointInside(const ActsTrk::GeometryContext &gctx, 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.
GeoModel::TransientConstSharedPtr< Chamber > ChamberPtr
Eigen::Matrix< double, 3, 1 > Vector3D

◆ checkPortals()

StatusCode MuonGMR4::MuonChamberToolTest::checkPortals ( const ActsTrk::GeometryContext & gctx,
const Acts::TrackingVolume & volume ) const
private

First check the bounds

Definition at line 497 of file MuonChamberToolTest.cxx.

498 {
499 if (!volume.isAlignable()) {
500 return StatusCode::SUCCESS;
501 }
502 const Acts::GeometryContext geoCtx = gctx.context();
503 std::vector<std::shared_ptr<const Acts::Surface>> portals{};
504 for (const Acts::Portal& portal : volume.portals()) {
505 if (portal.surface().geometryId().withBoundary(0) != volume.geometryId()) {
506 continue;
507 }
508 portals.push_back(portal.surface().getSharedPtr());
509 }
510 const auto unAlignedPortals = volume.volumeBounds().orientedSurfaces(volume.localToGlobalTransform(geoCtx));
511
512 if (unAlignedPortals.size() != portals.size()) {
513 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The size of the aligned and unaligned portals don't match for volume "
514 <<volume.volumeName()<<". Aligned: "<<portals.size()<<", unaligned: "<<unAlignedPortals.size());
515 return StatusCode::FAILURE;
516 }
517 StatusCode retCode = StatusCode::SUCCESS;
518 for (std::size_t p =0 ; p < portals.size(); ++p){
520 if (portals[p]->bounds() != unAlignedPortals[p].surface->bounds()) {
521 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The bounds of the "<<p
522 <<"-th portal differ:\n -- aligned: "<<portals[p]->bounds()
523 <<"\n -- unaligned: "<<unAlignedPortals[p].surface->bounds());
524 retCode = StatusCode::FAILURE;
525 }
526 const Amg::Transform3D& uTrf{unAlignedPortals[p].surface->localToGlobalTransform(geoCtx)};
527 const Amg::Transform3D& aTrf{portals[p]->localToGlobalTransform(geoCtx)};
528
529 if (!Amg::isIdentity(uTrf * aTrf.inverse())) {
530 ATH_MSG_ERROR(__func__<<"() "<<__LINE__
531 <<" - The unaligned and aligned portals don't end up at the same point \n"
532 <<" -- aligned: "<<Amg::toString(aTrf)<<"\n"<<" -- unaligned: "<<Amg::toString(uTrf));
533 retCode = StatusCode::FAILURE;
534 }
535 }
536 return retCode;
537 }
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
bool isIdentity(const Amg::Transform3D &trans)
Checks whether the transformation is the Identity transformation.
Eigen::Affine3d Transform3D
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ checkTrackingGeometry()

StatusCode MuonGMR4::MuonChamberToolTest::checkTrackingGeometry ( const ActsTrk::GeometryContext & gctx,
const Acts::TrackingGeometry & trackingGeometry ) const
private

Check tracking geometry volumes.

Assume that's a top-level chamber volume

That's a dirty hack because the halfZ is invalid here

Definition at line 540 of file MuonChamberToolTest.cxx.

541 {
542
543 //visit the volumes and check the overlaps with the other volumes in the tracking geometry
544 // also check overlaps between volumes and surfaces (e.g surfaces where the passive material is mapped)
545 std::vector<const Acts::TrackingVolume*> volumeVec{};
546 std::vector<const Acts::Surface*> passiveSurfaces{};
547
548 std::unordered_set<const Acts::TrackingVolume*> overlapVolumes{};
549 std::unordered_set<const Acts::Surface*> overlapSurfaces{};
550
551
552 //keep onyl the chamber volumes - not the cylinders
553 trackingGeometry.visitVolumes([&](const Acts::TrackingVolume* vol) {
554 //for the cylinder type volumes , fetch the inner surfaces only (e.g passive material surfaces)
555 if(vol->volumeBounds().type() == Acts::VolumeBounds::BoundsType::eCylinder){
556 ATH_MSG_DEBUG("checkTrackingGeometry() "<<__LINE__<<" - Fetch "<<vol->surfaces().size()
557 <<" passive surfaces from "<<vol->volumeName()<<".");
558 std::ranges::for_each(vol->surfaces(), [&](const Acts::Surface& surf){
559 ATH_MSG_VERBOSE(" --- "<<surf.type()<<" @"<<Amg::toString(surf.center(gctx.context()))
560 <<" "<<surf.bounds());
561 passiveSurfaces.push_back(&surf);
562 });
563 return;
564 }
565 const auto* placement = dynamic_cast<const ActsTrk::VolumePlacement*>(vol->volumePlacement());
566 // Not a senitive muon volume
567 if (!placement || !MuonGMR4::isMuon(placement->detectorType())) {
568 ATH_MSG_DEBUG("checkTrackingGeometry() "<<__LINE__<<" - Skip volume "
569 <<vol->volumeName()<<".");
570 return;
571 }
572 volumeVec.push_back(vol);
573 });
574
575 ATH_MSG_INFO(__func__<<"() "<<__LINE__<<" - Fetched "
576 << passiveSurfaces.size()<< " passive surfaces");
577 {
578 Acts::ObjVisualization3D visualHelper{};
579 std::ranges::for_each(passiveSurfaces,
580 [&visualHelper, &gctx](const Acts::Surface* surface) {
581 Acts::GeometryView3D::drawSurface(visualHelper, *surface, gctx.context());
582 });
583 visualHelper.write("MsTrackTest_passiveSurfaces.obj");
584
585 }
586 StatusCode retCode = StatusCode::SUCCESS;
587 for(std::size_t vIdx = 0; vIdx < volumeVec.size(); ++vIdx) {
588 const Acts::TrackingVolume* testVol{volumeVec.at(vIdx)};
589 ATH_CHECK(checkPortals(gctx, *testVol));
590
591 std::vector<const Acts::TrackingVolume*> overlaps{};
592 const std::vector<Amg::Vector3D> edges = cornerPoints(gctx, *testVol);
593
594 for(const auto& surface : testVol->surfaces()) {
595 //only plane or straw surfaces expected
596 std::vector<Amg::Vector3D> surfEdges = {};
597 if(surface.type() == Acts::Surface::SurfaceType::Straw){
598 ATH_MSG_VERBOSE(__func__<<"() - "<<__LINE__<<" Checking "<<surface.type()<<" surface "<<identify(surface)
599 <<" / "<<surface.geometryId() <<" in volume "<<testVol->volumeName());
600
601 auto edges = cornerPoints(gctx, dynamic_cast<const Acts::StrawSurface&>(surface));
602 surfEdges.insert(surfEdges.end() , edges.begin(), edges.end());
603 } else if(surface.type() == Acts::Surface::SurfaceType::Plane){
604 ATH_MSG_VERBOSE(__func__<<"() - "<<__LINE__<<" Checking "<<surface.type()<<" surface "<<identify(surface)
605 <<" / "<<surface.geometryId() <<" in volume "<<testVol->volumeName());
606
607 auto edges = cornerPoints(gctx, dynamic_cast<const Acts::PlaneSurface&>(surface));
608 surfEdges.insert(surfEdges.end() , edges.begin(), edges.end());
609 } else {
610 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The "<<surface.type()<<"-surface "
611 << m_idHelperSvc->toString(identify(surface))<<" / "
612 <<surface.geometryId() <<" is neither a straw nor a plane surface");
613 return StatusCode::FAILURE;
614 }
615
616 for(const auto& edge : surfEdges) {
617 if(!testVol->inside(gctx.context(), edge, 0.01)) {
618 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The "<<surface.type()<<"-surface "
619 << m_idHelperSvc->toString(identify(surface))<<" / "
620 <<surface.geometryId() <<" @vertex point "
621 <<Amg::toString(testVol->globalToLocalTransform(gctx.context()) *edge)<<", local: "
622 <<Amg::toString(surface.localToGlobalTransform(gctx.context()).inverse() * edge)
623 <<" is outside the parent volume: " << testVol->volumeName()
624 <<", "<<Amg::toString(testVol->localToGlobalTransform(gctx.context()))
625 <<", "<<testVol->volumeBounds());
626 overlapSurfaces.insert(&surface);
627 overlapVolumes.insert(testVol);
628 if (!m_ignoreOutsideSurf) {
629 retCode = StatusCode::FAILURE;
630 }
631 }
632 }
633 }
634
635 //check if the child volume is entirely enclosed by the mother volume
636 for (const Acts::TrackingVolume& child : testVol->volumes()) {
637 for(const auto& edge : cornerPoints(gctx, child)){
638 if(!testVol->inside(gctx.context(), edge, 0.01)){
639 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The children volume's "
640 << child.volumeName() <<" vertex point " <<Amg::toString(edge)
641 <<" is outside the parent volume" << testVol->volumeName());
642 return StatusCode::FAILURE;
643 }
644 }
645 }
647 if (!testVol->motherVolume()->isAlignable() && m_dumpObjs) {
648 std::vector<const Acts::Surface*> surfaces = extractSurfaces(*testVol);
649 const Identifier volId = identify(*surfaces.front());
650 const int eta = m_idHelperSvc->stationEta(volId);
651 saveEnvelope(gctx, std::format("TrackingVolume_{:}{:}{:}{:}_{:}",
652 chName(m_idHelperSvc->chamberIndex(volId)),
653 Acts::abs(eta), eta > 0 ? 'A' : 'C',
654 m_idHelperSvc->stationPhi(volId), vIdx),
655 *testVol, surfaces , chamberVolumes(*testVol));
656
657 }
658 // Check that there is not overlap with other volumes
659 for (std::size_t vIdx1 = 0 ; vIdx1 < vIdx; ++vIdx1) {
660 const Acts::TrackingVolume* overlapTest{volumeVec.at(vIdx1)};
661 if (overlapTest->motherVolume() == testVol ||
662 testVol->motherVolume() == overlapTest){
663 continue;
664 }
665 if (hasOverlap(gctx, edges, *overlapTest)) {
666 overlaps.push_back(overlapTest);
667 std::ranges::copy(extractSurfaces(*testVol),
668 std::inserter(overlapSurfaces, overlapSurfaces.begin()));
669 std::ranges::copy(extractSurfaces(*overlapTest),
670 std::inserter(overlapSurfaces, overlapSurfaces.begin()));
671 }
672 }
673 /*check if the tracking volume overlaps with surfaces of the tracking geometry
674 (e.g cylinders of the barrel where material is mapped) */
675 const Identifier volId = identify(*extractSurfaces(*testVol).front());
676 double volHalfR{0.}, volHalfZ{0.};
677 const double halfX = MuonGMR4::halfXhighY(testVol->volumeBounds());
678 const bool isBarrel = Muon::MuonStationIndex::isBarrel(m_idHelperSvc->chamberIndex(volId));
679 if (isBarrel){
680 volHalfR = MuonGMR4::halfZ(testVol->volumeBounds());
681 volHalfZ = MuonGMR4::halfY(testVol->volumeBounds());
682 } else {
683 volHalfZ = MuonGMR4::halfZ(testVol->volumeBounds());
684 volHalfR = MuonGMR4::halfY(testVol->volumeBounds());
685 }
686 const Amg::Vector3D center{testVol->center(gctx.context())};
687 const double rMin = center.perp() - volHalfR;
688 // Calculate the global r from the local half X which is always along phi
689 // and the halfR which is along Y (Z) for endcap (barrel) chambers.
690 const double rMax = (testVol->localToGlobalTransform(gctx.context()) *(
691 halfX * Amg::Vector3D::UnitX() +
692 volHalfR * Amg::Vector3D::Unit(1 + isBarrel))).perp();
693
694 double zMin = center.z() - volHalfZ;
695 double zMax = center.z() + volHalfZ;
697 if (testVol->volumeBounds().type() == Acts::VolumeBounds::eDiamond) {
698 zMin = 1._km; zMax = -1._km;
699 for (const Amg::Vector3D& p : cornerPoints(gctx, *testVol)){
700 zMin = std::min(zMin, p.z());
701 zMax = std::max(zMax, p.z());
702 }
703 }
704
705 for(const Acts::Surface* surf : passiveSurfaces) {
706
707 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Check "<<surf->type()
708 <<" surface "<<surf->name()<< " , "<<surf->geometryId());
709 const Amg::Vector3D center = surf->center(gctx.context());
710 if(surf->type() == Acts::Surface::SurfaceType::Cylinder) {
711 using BoundEnum = Acts::CylinderBounds::BoundValues;
712 const auto& bounds = static_cast<const Acts::CylinderBounds&>(surf->bounds());
713 const double passiveR = bounds.get(BoundEnum::eR);
714 const double passiveZ = bounds.get(BoundEnum:: eHalfLengthZ);
715 if (rMin < passiveR || rMax > passiveR){
716 continue;
717 }
718 if (passiveZ < zMin || -passiveZ > zMax) {
719 continue;
720 }
721 } else if(surf->type() == Acts::Surface::SurfaceType::Disc){
722 using BoundEnum = Acts::RadialBounds::BoundValues;
723 const auto& bounds = static_cast<const Acts::RadialBounds&>(surf->bounds());
724 if (center.z() < zMin || center.z() > zMax) {
725 continue;
726 }
727 const double surfRMax = bounds.get(BoundEnum::eMaxR);
728 const double surfRMin = bounds.get(BoundEnum::eMinR);
729 if (surfRMax < rMin || surfRMin > rMax){
730 continue;
731 }
732 // continue;
733 } else {
734 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The surface "<< surf->geometryId()
735 <<", "<< surf->name() <<" is not a cylinder surface or disc");
736 return StatusCode::FAILURE;
737 }
738
739 ATH_MSG_ERROR(__func__<<"() "<<__LINE__<<" - The volume "
740 << testVol->volumeName() << " overlaps with the surface "
741 << surf->name() << " with geo id" << surf->geometryId()
742 <<" -- volume radius: ["<<rMin<<";"<<rMax<<"] z: ["<<zMin<<";"<<zMax<<"]"
743 <<" "<<surf->bounds());
744 if (m_ignoreOutsideSurf) {
745 retCode = StatusCode::FAILURE;
746 }
747 overlapSurfaces.insert(surf);
748 overlapVolumes.insert(testVol);
749 }
750
751 if(overlaps.empty()) {
752 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - No overlaps detected for the volume "<<testVol->volumeName());
753 continue;
754 }
755
756 overlapVolumes.insert(overlaps.begin(), overlaps.end());
757 overlapVolumes.insert(testVol);
758
759 std::stringstream overlapStream{};
760 overlapStream<<__func__<<"() "<<__LINE__<<" - The volume "
761 <<testVol->volumeName() << " overlaps with: "<<std::endl;
762
763 for(const Acts::TrackingVolume* overlap: overlaps){
764 overlapStream<<" --- Volume: " << overlap->volumeName()<<", "<<overlap->volumeBounds()
765 <<", "<<Amg::toString(overlap->localToGlobalTransform(gctx.context()))<<std::endl;;
766 }
767 ATH_MSG_ALWAYS(overlapStream.str());
768 }
769
770 if (overlapVolumes.size() || overlapSurfaces.size()) {
771 const Acts::Volume* refVolume = (*overlapVolumes.begin());
772 std::vector<const Acts::Volume*> childVols{};
773 childVols.insert(childVols.begin(),std::next(overlapVolumes.begin()), overlapVolumes.end());
774 std::vector<const Acts::Surface*> childSurfs{overlapSurfaces.begin(), overlapSurfaces.end()};
775 saveEnvelope(gctx, "TrackingGeometryOverlaps", *refVolume,
776 childSurfs, childVols);
777 }
778
779
780 if(overlapVolumes.empty()) {
781 ATH_MSG_ALWAYS("No overlaps detected in the tracking geometry!!");
782 } else if (!m_ignoreOverlapCh) {
783 retCode = StatusCode::FAILURE;
784 }
785 return retCode;
786 }
Scalar eta() const
pseudorapidity method
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_ALWAYS(x)
StatusCode checkPortals(const ActsTrk::GeometryContext &gctx, const Acts::TrackingVolume &volume) const
Gaudi::Property< bool > m_ignoreOutsideSurf
The exceeding surfaces does not lead to a failure.
double halfY(const Acts::VolumeBounds &bounds)
Returns the half-Y length for the parsed volume bounds (Trapezoid/ Cuboid).
bool isMuon(const ActsTrk::DetectorType type)
Returns whether the parsed type is muon.
double halfZ(const Acts::VolumeBounds &bounds)
Returns the half-Z length for the parsed volume bounds (Trapezoid/ Cuboid).
double halfXhighY(const Acts::VolumeBounds &bounds)
Returns the half-Y length @ posiive Y for the parsed volume bounds (Trapezoid/ Cuboid).
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.

◆ cornerPoints() [1/3]

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

Account for the stereo angle of the micromega geometry

Definition at line 288 of file MuonChamberToolTest.cxx.

288 {
289 std::array<Amg::Vector3D, 4> edges{make_array<Amg::Vector3D,4>(Amg::Vector3D::Zero())};
290 if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle) { //RPC surfaces are rectangles
291 const Acts::RectangleBounds& bounds = static_cast<const Acts::RectangleBounds&>(surface.bounds());
292 using BoundEnum = Acts::RectangleBounds::BoundValues;
293
294 unsigned int edgeIdx{0};
295 for(const double signX : {-1., 1.}) {
296 for (const double signY : { -1., 1.}) {
297 const Amg::Vector3D edge{signX < 0 ? bounds.get(BoundEnum::eMinX) : bounds.get(BoundEnum::eMaxX),
298 signY < 0 ? bounds.get(BoundEnum::eMinY) : bounds.get(BoundEnum::eMaxY), 0.};
299 edges[edgeIdx] = surface.localToGlobalTransform(gctx.context()) * edge;
300 ++edgeIdx;
301 }
302 }
303 return edges;
304 } else if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eTrapezoid) {
305 using BoundEnum = Acts::TrapezoidBounds::BoundValues;
306 const auto& bounds = static_cast<const Acts::TrapezoidBounds&>(surface.bounds());
307 unsigned int edgeIdx{0};
308
309 ATH_MSG_VERBOSE("Fetch volume bounds "<<Amg::toString(surface.localToGlobalTransform(gctx.context())));
310 for (const double signX : {-1., 1.}) {
311 for (const double signY : { -1., 1.}) {
312 const Amg::Vector3D edge{Amg::getRotateZ3D(-1.*bounds.get(BoundEnum::eRotationAngle)) *
313 Amg::Vector3D(signX*bounds.get(signY < 0 ? BoundEnum::eHalfLengthXnegY : BoundEnum::eHalfLengthXposY),
314 signY*bounds.get(BoundEnum::eHalfLengthY), 0.)};
315
316 edges[edgeIdx] = surface.localToGlobalTransform(gctx.context()) * edge;
317 ++edgeIdx;
318 }
319 }
320
321 return edges;
322 } else {
323 ATH_MSG_ERROR("The surface bounds are neither a rectangle nor a trapezoid, this is not supported yet");
324 return edges;
325 }
326 }
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis

◆ cornerPoints() [2/3]

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

Definition at line 267 of file MuonChamberToolTest.cxx.

267 {
268 std::array<Amg::Vector3D, 8> edges{make_array<Amg::Vector3D,8>(Amg::Vector3D::Zero())};
269 using BoundEnum = Acts::LineBounds::BoundValues;
270 const auto& bounds = static_cast<const Acts::LineBounds&>(surface.bounds());
271 unsigned int edgeIdx{0};
272
273 ATH_MSG_VERBOSE("Fetch volume bounds "<<Amg::toString(surface.localToGlobalTransform(gctx.context())));
274 for (const double signX : {-1., 1.}) {
275 for (const double signY : { -1., 1.}) {
276 for (const double signZ: {-1., 1.}) {
277 const Amg::Vector3D edge{signX*bounds.get(BoundEnum::eR),
278 signY*bounds.get(BoundEnum::eR),
279 signZ*bounds.get(BoundEnum::eHalfLengthZ)};
280 edges[edgeIdx] = surface.localToGlobalTransform(gctx.context()) * edge;
281 ++edgeIdx;
282 }
283 }
284 }
285 return edges;
286 }

◆ cornerPoints() [3/3]

std::vector< Amg::Vector3D > MuonGMR4::MuonChamberToolTest::cornerPoints ( const ActsTrk::GeometryContext & gctx,
const Acts::Volume & volume ) const
private

Returns the edge points from a trapezoidal / cuboid /diamond volume.

Definition at line 214 of file MuonChamberToolTest.cxx.

215 {
216
217 const auto& bounds = volume.volumeBounds();
218 unsigned int edgeIdx{0};
219 //diamond volume bounds case - there are 12 edges
220 if(bounds.type() == Acts::VolumeBounds::BoundsType::eDiamond){
221 const auto& diamondBounds = static_cast<const Acts::DiamondVolumeBounds&>(bounds);
222 using BoundEnum = Acts::DiamondVolumeBounds::BoundValues;
223 std::vector<Amg::Vector3D> edges(12, Amg::Vector3D::Zero());
224 double xCord{0.}, yCord{0};
225 for(double signX : {-1.,1.}){
226 for(double signY : {-1., 0., 1.}){
227 for(double signZ : {-1.,1.}){
228 if(signY == 0){
229 xCord = diamondBounds.get(BoundEnum::eHalfLengthX2);
230 }else if(signY < 0){
231 xCord = diamondBounds.get(BoundEnum::eHalfLengthX1);
232 yCord = diamondBounds.get(BoundEnum::eLengthY1);
233 } else{
234 xCord = diamondBounds.get(BoundEnum::eHalfLengthX3);
235 yCord = diamondBounds.get(BoundEnum::eLengthY2);
236 }
237
238 const Amg::Vector3D edge{signX*xCord,
239 signY*yCord,
240 signZ*diamondBounds.get(BoundEnum::eHalfLengthZ)};
241 edges[edgeIdx] = volume.localToGlobalTransform(gctx.context())*edge;
242 ++edgeIdx;
243 }
244 }
245 }
246 return edges;
247 }
248
249 //trapezoid or rectangular bounds case
250 std::vector<Amg::Vector3D> edges{};
251 ATH_MSG_VERBOSE("Fetch volume bounds "<<Amg::toString(volume.localToGlobalTransform(gctx.context())));
252 for (const double signX : {-1., 1.}) {
253 for (const double signY : { -1., 1.}) {
254 for (const double signZ: {-1., 1.}) {
255 const Amg::Vector3D edge{signX* (signY>0 ? MuonGMR4::halfXhighY(bounds) : MuonGMR4::halfXlowY(bounds)),
256 signY*MuonGMR4::halfY(bounds),
257 signZ*MuonGMR4::halfZ(bounds)};
258 edges.push_back(volume.localToGlobalTransform(gctx.context()) * edge);
259 ATH_MSG_VERBOSE("Local edge "<<Amg::toString(edge)<<", global edge: "<<Amg::toString(edges[edgeIdx]));
260 ++edgeIdx;
261 }
262 }
263 }
264 return edges;
265 }
double halfXlowY(const Acts::VolumeBounds &bounds)
Returns the half-X length @ negative Y for the parsed volume bounds (Trapezoid/ Cuboid).

◆ declareGaudiProperty()

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 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ 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.

◆ evtStore()

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.

◆ execute()

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

Check that all chambers covered by their sector envelopes

Definition at line 807 of file MuonChamberToolTest.cxx.

807 {
808 const ActsTrk::GeometryContext* gctx{nullptr};
809 ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
811 ATH_CHECK(checkChambers(*gctx));
813 ATH_CHECK(checkTrackingGeometry(*gctx, *m_trackingGeometrySvc->trackingGeometry()));
814
815 return StatusCode::SUCCESS;
816 }
StatusCode checkEnvelopes(const ActsTrk::GeometryContext &gctx) const
Check envelopes.
StatusCode checkChambers(const ActsTrk::GeometryContext &gctx) const
Check whether the chamber envelopes are consistent.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
StatusCode checkTrackingGeometry(const ActsTrk::GeometryContext &gctx, const Acts::TrackingGeometry &trackingGeometry) const
Check tracking geometry volumes.
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.

◆ 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 ( ) const
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.

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
An algorithm that can be simultaneously executed in multiple threads.

◆ 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 }
virtual bool filterPassed(const EventContext &ctx) const

◆ hasOverlap()

bool MuonGMR4::MuonChamberToolTest::hasOverlap ( const ActsTrk::GeometryContext & gctx,
const std::vector< Amg::Vector3D > & chamberEdges,
const Acts::Volume & volume ) const
private

Checks whether the edge points from a trapezoid/cuboid/diamond form a volume overlapping with the given volume.

Parameters
gctxGeometry context carrying all alignment & global transformations
chamberEdgesEdge points of the volume that might overlap
volumeSecond volume used for the overlap checking

First check that there's at least a chance that the edges might overlap with the center

The bound values contain the half length's if the minDist is within reach Then continue the check

Definition at line 337 of file MuonChamberToolTest.cxx.

339 {
340
342 const Amg::Vector3D center{volume.center(gctx.context())};
343 double minDist = 1._km;
344 for (const Amg::Vector3D& edge : chamberEdges) {
345 minDist = std::min(minDist, (edge - center).mag());
346 }
349 if (std::ranges::none_of(volume.volumeBounds().values(),
350 [minDist](const double bound){
351 return minDist < 2.5*bound;
352 })) {
353 return false;
354 }
355 const double stepLength = 1. / m_overlapSamples;
356
357 const Acts::VolumeBounds& volBounds = volume.volumeBounds();
358 const Acts::Transform3& transform = volume.globalToLocalTransform(gctx.context());
359 for (unsigned edge1 = 1; edge1 < chamberEdges.size(); ++edge1) {
360 for (unsigned edge2 = 0; edge2 < edge1; ++edge2) {
361 for (unsigned step = 0 ; step <= m_overlapSamples; ++step) {
362 const double section = stepLength * step;
363 const Amg::Vector3D testPoint = section* chamberEdges[edge1] + (1. -section) *chamberEdges[edge2];
364 // Using acts::Volume::inside is horribly slow in dbg builds.
365 // Using the bounds method directly is much faster.
366 if (volBounds.inside (transform * testPoint)) {
367 return true;
368 }
369 }
370 }
371 }
372 return false;
373 }
Scalar mag() const
mag method
void section(const std::string &sec)
Gaudi::Property< unsigned > m_overlapSamples
Number of points to scan along the lines between two volume corners to check whether they belong to a...
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.

◆ initialize()

StatusCode MuonGMR4::MuonChamberToolTest::initialize ( )
override

Definition at line 93 of file MuonChamberToolTest.cxx.

93 {
94 ATH_CHECK(m_idHelperSvc.retrieve());
95 ATH_CHECK(m_geoCtxKey.initialize());
97 ATH_CHECK(detStore()->retrieve(m_detMgr));
98 return StatusCode::SUCCESS;
99 }
const ServiceHandle< StoreGateSvc > & detStore() const

◆ 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()

◆ isReEntrant()

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

Definition at line 38 of file MuonChamberToolTest.h.

38{return false;}

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 ActsTrk::GeometryContext & gctx,
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
gctxGeometry context carrying the aligned local -> global transfors
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 146 of file MuonChamberToolTest.cxx.

150 {
151 if (volume.inside(gctx.context(), point, tolerance)) {
152 return StatusCode::SUCCESS;
153 }
154 ATH_MSG_ERROR("In channel "<<m_idHelperSvc->toString(chamberId) <<", the point "
155 << descr <<" "<<Amg::toString(volume.globalToLocalTransform(gctx.context())* point)
156 <<" is not part of the chamber volume. The corners of the volume are:");
157 for(const Amg::Vector3D& corner : cornerPoints(gctx, volume)) {
158 ATH_MSG_ERROR(" "<<Amg::toString(volume.globalToLocalTransform(gctx.context())*corner));
159 }
160 return StatusCode::FAILURE;
161 }
constexpr double tolerance

◆ pointInside() [2/2]

template<class EnvelopeType>
StatusCode MuonGMR4::MuonChamberToolTest::pointInside ( const ActsTrk::GeometryContext & gctx,
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
gctxGeometry context carrying the aligned local -> global transfors
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 109 of file MuonChamberToolTest.cxx.

114 {
115
116 // Explicitly inline Volume::inside here so that it gets
117 // flattened in debug builds. Gives a significant speedup.
118 //if (boundVol.inside(gctx.context(), point, tolerance)) {
119 const Amg::Vector3D locPos{boundVol.globalToLocalTransform(gctx.context()) * point};
120 if (boundVol.volumeBounds().inside(locPos,tolerance)) {
121 ATH_MSG_VERBOSE("In channel "<<m_idHelperSvc->toString(channelId)
122 <<", point "<<descr <<" is inside of the chamber "<<std::endl<<chamb<<std::endl
123 <<"Local position:" <<Amg::toString(boundVol.globalToLocalTransform(gctx.context()) * point));
124 return StatusCode::SUCCESS;
125 }
126
127 StripDesign planeTrapezoid{};
128 planeTrapezoid.defineTrapezoid(chamb.halfXShort(), chamb.halfXLong(), chamb.halfY());
129 planeTrapezoid.setLevel(MSG::VERBOSE);
131 static const Eigen::Rotation2D axisSwap{90. *Gaudi::Units::deg};
132 if (std::abs(locPos.z()) - chamb.halfZ() < -tolerance &&
133 planeTrapezoid.insideTrapezoid(axisSwap*locPos.block<2,1>(0,0))) {
134 return StatusCode::SUCCESS;
135 }
136 planeTrapezoid.defineStripLayout(locPos.y() * Amg::Vector2D::UnitX(), 1, 1, 1);
137 ATH_MSG_ERROR("In channel "<<m_idHelperSvc->toString(channelId) <<", the point "
138 << descr <<" "<<Amg::toString(point)<<" is not part of the chamber volume."
139 <<std::endl<<std::endl<<chamb<<std::endl<<"Local position "<<Amg::toString(locPos)
140 <<", "<<planeTrapezoid
141 <<", box left edge: "<<Amg::toString(planeTrapezoid.leftEdge(1).value_or(Amg::Vector2D::Zero()))
142 <<", box right edge "<<Amg::toString(planeTrapezoid.rightEdge(1).value_or(Amg::Vector2D::Zero())));
143 return StatusCode::FAILURE;
144 }

◆ 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();
384 }
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)

◆ 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 {
366 }

◆ saveEnvelope()

void MuonGMR4::MuonChamberToolTest::saveEnvelope ( const ActsTrk::GeometryContext & gctx,
const std::string & envName,
const Acts::Volume & envelopeVol,
const std::vector< const Acts::Surface * > & assocSurfaces,
const std::vector< const Acts::Volume * > & subVolumes = {} ) const
private

Definition at line 788 of file MuonChamberToolTest.cxx.

792 {
793 Acts::ObjVisualization3D visualHelper{};
794 std::ranges::for_each(assocSurfaces, [&visualHelper, &gctx](const Acts::Surface* surface) {
795 Acts::GeometryView3D::drawSurface(visualHelper, *surface, gctx.context());
796
797 });
798 std::ranges::for_each(subVols, [&visualHelper, &gctx](const Acts::Volume* subVol) {
799 Acts::GeometryView3D::drawVolume(visualHelper,*subVol, gctx.context(), Amg::Transform3D::Identity(),
800 Acts::s_viewPassive);
801 });
802 Acts::GeometryView3D::drawVolume(visualHelper, envelopeVol, gctx.context());
803 ATH_MSG_DEBUG("Save new envelope 'MsTrackTest_"<<envName<<".obj'");
804 visualHelper.write(std::format("MsTrackTest_{:}.obj", envName));
805 }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ 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.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

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

◆ 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 ActsTrk::GeometryContext & 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 818 of file MuonChamberToolTest.cxx.

821 {
822 ATH_MSG_VERBOSE("Test whether "<<m_idHelperSvc->toStringDetEl(mdtMl.identify())<<std::endl<<mdtMl.getParameters());
823
824 for (unsigned int layer = 1; layer <= mdtMl.numLayers(); ++layer) {
825 for (unsigned int tube = 1; tube <= mdtMl.numTubesInLay(); ++tube) {
826 const IdentifierHash idHash = mdtMl.measurementHash(layer, tube);
827 if (!mdtMl.isValid(idHash)){
828 continue;
829 }
830 const Amg::Transform3D& locToGlob{mdtMl.localToGlobalTransform(gctx, idHash)};
831 const Identifier measId{mdtMl.measurementId(idHash)};
832
833 ATH_CHECK(pointInside(gctx, chamber, detVol, mdtMl.globalTubePos(gctx, idHash), "tube center", measId));
834
835 ATH_CHECK(pointInside(gctx, chamber, detVol, mdtMl.readOutPos(gctx, idHash), "tube readout", measId));
836 ATH_CHECK(pointInside(gctx, chamber, detVol, mdtMl.highVoltPos(gctx, idHash), "tube HV", measId));
837
838 ATH_CHECK(pointInside(gctx, chamber, detVol, locToGlob*(-mdtMl.innerTubeRadius() * Amg::Vector3D::UnitX()),
839 "bottom of the tube box", measId));
840 ATH_CHECK(pointInside(gctx, chamber, detVol, locToGlob*(mdtMl.innerTubeRadius() * Amg::Vector3D::UnitX()),
841 "sealing of the tube box", measId));
842
843 ATH_CHECK(pointInside(gctx, chamber, detVol, locToGlob*(-mdtMl.innerTubeRadius() * Amg::Vector3D::UnitY()),
844 "wall to the previous tube", measId));
845 ATH_CHECK(pointInside(gctx, chamber, detVol, locToGlob*(-mdtMl.innerTubeRadius() * Amg::Vector3D::UnitY()),
846 "wall to the next tube", measId));
847 }
848 }
849 return StatusCode::SUCCESS;
850 }
@ layer
Definition HitInfo.h:79

◆ testReadoutEle() [2/7]

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

Definition at line 895 of file MuonChamberToolTest.cxx.

898 {
899
900 const MmIdHelper& idHelper{m_idHelperSvc->mmIdHelper()};
901 for(unsigned int gasGap = 1; gasGap <= mm.nGasGaps(); ++gasGap){
902 IdentifierHash gasGapHash = MmReadoutElement::createHash(gasGap,0);
903 unsigned int firstStrip = mm.firstStrip(gasGapHash);
904 for(unsigned int strip = firstStrip; strip <= mm.numStrips(gasGapHash); ++strip){
905 const Identifier stripId = idHelper.channelID(mm.identify(), mm.multilayer(), gasGap, strip);
906 ATH_CHECK(pointInside(gctx, chamber, detVol, mm.stripPosition(gctx, stripId), "center", stripId));
907 ATH_CHECK(pointInside(gctx, chamber, detVol, mm.leftStripEdge(gctx, mm.measurementHash(stripId)), "left edge", stripId));
908 ATH_CHECK(pointInside(gctx, chamber, detVol, mm.rightStripEdge(gctx, mm.measurementHash(stripId)), "right edge", stripId));
909 }
910 }
911
912 return StatusCode::SUCCESS;
913 }
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
static IdentifierHash createHash(const int gasGap, const int strip)

◆ testReadoutEle() [3/7]

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

◆ testReadoutEle() [4/7]

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

Definition at line 852 of file MuonChamberToolTest.cxx.

855 {
856
857 ATH_MSG_VERBOSE("Test whether "<<m_idHelperSvc->toStringDetEl(rpc.identify())<<std::endl<<rpc.getParameters());
858
859 const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
860 for (unsigned int gasGap = 1 ; gasGap <= rpc.nGasGaps(); ++gasGap) {
861 for (int doubletPhi = rpc.doubletPhi(); doubletPhi <= rpc.doubletPhiMax(); ++doubletPhi){
862 for (bool measPhi : {false, true}) {
863 const int nStrips = measPhi ? rpc.nPhiStrips() : rpc.nEtaStrips();
864 for (int strip = 1; strip <= nStrips; ++strip) {
865 const Identifier stripId = idHelper.channelID(rpc.identify(),rpc.doubletZ(),
866 doubletPhi, gasGap, measPhi, strip);
867 ATH_CHECK(pointInside(gctx, chamber, detVol, rpc.stripPosition(gctx, stripId), "center", stripId));
868 ATH_CHECK(pointInside(gctx, chamber, detVol, rpc.leftStripEdge(gctx, stripId), "right edge", stripId));
869 ATH_CHECK(pointInside(gctx, chamber, detVol, rpc.rightStripEdge(gctx, stripId), "left edge", stripId));
870 }
871 }
872 }
873 }
874 return StatusCode::SUCCESS;
875 }
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)

◆ testReadoutEle() [5/7]

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

Definition at line 915 of file MuonChamberToolTest.cxx.

918 {
919
920 const sTgcIdHelper& idHelper{m_idHelperSvc->stgcIdHelper()};
921 for(unsigned int gasGap = 1; gasGap <= stgc.numLayers(); ++gasGap){
922
923 for(unsigned int nch = 1; nch <= stgc.nChTypes(); ++nch){
924 IdentifierHash gasGapHash = sTgcReadoutElement::createHash(gasGap, nch, 0, 0);
925 const unsigned int nStrips = stgc.numChannels(gasGapHash);
927
928 for(unsigned int strip = 1; strip <= nStrips; ++strip){
929 const Identifier stripId = idHelper.channelID(stgc.identify(), stgc.multilayer(), gasGap, nch, strip);
930 const IdentifierHash stripHash = stgc.measurementHash(stripId);
931 ATH_CHECK(pointInside(gctx, chamber, detVol, stgc.globalChannelPosition(gctx, stripHash), "channel position", stripId));
932
934 ATH_CHECK(pointInside(gctx, chamber, detVol, stgc.rightStripEdge(gctx, stripHash), "channel position", stripId));
935 ATH_CHECK(pointInside(gctx, chamber, detVol, stgc.leftStripEdge(gctx, stripHash), "channel position", stripId));
936 }
937 }
938 }
939 }
940 return StatusCode::SUCCESS;
941
942 }
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
static IdentifierHash createHash(const unsigned gasGap, const unsigned channelType, const unsigned channel, const unsigned wireInGrp=0)
Create a measurement hash from the Identifier fields.
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const

◆ testReadoutEle() [6/7]

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

◆ testReadoutEle() [7/7]

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

Definition at line 877 of file MuonChamberToolTest.cxx.

880 {
881 for (unsigned int gasGap = 1; gasGap <= tgc.nGasGaps(); ++gasGap){
882 for (bool isStrip : {false}) {
883 const IdentifierHash layHash = tgc.constructHash(0, gasGap, isStrip);
884 const unsigned int nChannel = tgc.numChannels(layHash);
885 for (unsigned int channel = 1; channel <= nChannel ; ++channel) {
886 const IdentifierHash measHash = tgc.constructHash(channel, gasGap, isStrip);
887 ATH_CHECK(pointInside(gctx, chamber, detVol, tgc.channelPosition(gctx, measHash),
888 "center", tgc.measurementId(measHash)));
889 }
890 }
891 }
892 return StatusCode::SUCCESS;
893 }

◆ 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) {
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 152 of file MuonChamberToolTest.h.

152{nullptr};

◆ 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_dumpObjs

Gaudi::Property<bool> MuonGMR4::MuonChamberToolTest::m_dumpObjs {this, "dumpVolumes" , false}
private

Dump the chambers & sectors as separate obj files.

Definition at line 151 of file MuonChamberToolTest.h.

151{this, "dumpVolumes" , false};

◆ 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<ActsTrk::GeometryContext> MuonGMR4::MuonChamberToolTest::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Definition at line 138 of file MuonChamberToolTest.h.

138{this, "AlignmentKey", "ActsAlignment", "cond handle key"};

◆ m_idHelperSvc

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

Definition at line 135 of file MuonChamberToolTest.h.

135 {this, "IdHelperSvc",
136 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_ignoreOutsideSurf

Gaudi::Property<bool> MuonGMR4::MuonChamberToolTest::m_ignoreOutsideSurf {this, "ignoreOutsideSurface", true}
private

The exceeding surfaces does not lead to a failure.

In fact, the tubes are exceeded in BIS78 (TODO)

Definition at line 149 of file MuonChamberToolTest.h.

149{this, "ignoreOutsideSurface", true};

◆ m_ignoreOverlapCh

Gaudi::Property<bool> MuonGMR4::MuonChamberToolTest::m_ignoreOverlapCh {this, "ignoreChamberOverlap", true}
private

The overlap of chamber volumes does not lead to a failure.

In fact, the overlap between the T4 & BIS78 chambers is found to be unavoidable without boolean shapes in the tracking geometry

Definition at line 147 of file MuonChamberToolTest.h.

147{this, "ignoreChamberOverlap", true};

◆ m_overlapChambObj

Gaudi::Property<std::string> MuonGMR4::MuonChamberToolTest::m_overlapChambObj {this, "chamberOverlapFile", "OverlapingChambers.obj"}
private

Name of the chamber output obj file.

Definition at line 144 of file MuonChamberToolTest.h.

144{this, "chamberOverlapFile", "OverlapingChambers.obj"};

◆ m_overlapSamples

Gaudi::Property<unsigned> MuonGMR4::MuonChamberToolTest::m_overlapSamples {this, "overlapSamples", 50}
private

Number of points to scan along the lines between two volume corners to check whether they belong to an another volume.

Definition at line 142 of file MuonChamberToolTest.h.

142{this, "overlapSamples", 50};

◆ m_trackingGeometrySvc

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

Definition at line 140 of file MuonChamberToolTest.h.

140{this, "TrackingGeometrySvc","ActsTrackingGeometrySvc"};

◆ 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: