ATLAS Offline Software
Loading...
Searching...
No Matches
MuonValR4::SegmentExtpTest Class Reference

#include <SegmentExtpTest.h>

Inheritance diagram for MuonValR4::SegmentExtpTest:
Collaboration diagram for MuonValR4::SegmentExtpTest:

Public Member Functions

virtual ~SegmentExtpTest ()=default
virtual StatusCode initialize () override final
virtual StatusCode execute (const EventContext &ctx) const override final
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

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::MuonSegmentContainerm_readKey {this, "SegmentKey", "MuonSegmentsFromR4"}
 Declare the data dependency on the standard Mdt+Rpc+Tgc segment container.
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 IdHelperSvc to decode the Identifiers.
ToolHandle< ActsTrk::IExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool" ,"" }
 Track extrapolation tool.
SG::ReadHandleKey< ActsTrk::GeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
 Dependency on the geometry alignment.
const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
 Detector manager to fetch the sector surfaces.
Gaudi::Property< bool > m_drawEvent {this , "drawEvent", false }
 Option to draw every extrapolation asan obj file.
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 20 of file SegmentExtpTest.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

◆ ~SegmentExtpTest()

virtual MuonValR4::SegmentExtpTest::~SegmentExtpTest ( )
virtualdefault

Member Function Documentation

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

64{
65 return 0;
66}

◆ 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 MuonValR4::SegmentExtpTest::execute ( const EventContext & ctx) const
finaloverridevirtual

Draw the reference segment as a red line

Draw the true intersection from the extrapolator as blue lines

Definition at line 43 of file SegmentExtpTest.cxx.

43 {
44 const xAOD::MuonSegmentContainer* segments{nullptr};
45 ATH_CHECK(SG::get(segments, m_readKey, ctx));
46 const ActsTrk::GeometryContext* gctx{nullptr};
47 ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
48 const Acts::GeometryContext tgContext{gctx->context()};
49
50 auto extrapolate = [&](const Acts::BoundTrackParameters& start,
51 const MuonR4::SpacePoint& sp) {
52 const Amg::Transform3D& trf = sp.msSector()->localToGlobalTransform(*gctx);
53 const Acts::Surface& target = xAOD::muonSurface(sp.primaryMeasurement());
54 const Amg::Vector3D n = target.normal(tgContext,
55 Amg::Vector3D::Zero(),
56 Amg::Vector3D::Zero());
57
58 auto lambda = sp.isStraw() ? Amg::intersect<3>(trf * sp.localPosition(),
59 trf.linear() * sp.sensorDirection(),
60 start.position(tgContext),
61 start.direction())
62 : Amg::intersect<3>(start.position(tgContext),
63 start.direction(), n,
64 n.dot(target.center(tgContext)));
65
66 const auto* detEl = static_cast<const ActsTrk::IDetectorElementBase*>(target.surfacePlacement());
67 ATH_MSG_VERBOSE("Propagate "<<Amg::toString(start.position(tgContext))<<" + "
68 <<Amg::toString(start.direction())<<" onto surface: "<<target.toString(tgContext)
69 <<"\n, "<<m_idHelperSvc->toString(detEl->identify())
70 << " geoId: "<<target.geometryId()<<", "<<( lambda.value_or(0.) > 0 ? "forward" : "backward"));
71
72 return m_extrapolationTool->propagate(ctx, start, target, lambda.value_or(0.) > 0
73 ? Acts::Direction::Forward()
74 : Acts::Direction::Backward(), 100._m);
75
76 };
77 StatusCode retCode = StatusCode::SUCCESS;
78
79 SeedingAux::Config cfg{};
80 cfg.parsToUse.clear();
81 SeedingAux pullCalculator{cfg, makeActsAthenaLogger(this, "PullCalculator")};
82
83 SeedingAux::Line_t line{};
84
85 for (const xAOD::MuonSegment* segment : *segments) {
86 const MuonR4::Segment* detSeg = MuonR4::detailedSegment(*segment);
87
88 line.updateParameters(localSegmentPars(*segment));
89
90
91 const MuonGMR4::SpectrometerSector* sector = m_detMgr->getSectorEnvelope(segment->chamberIndex(),
92 segment->sector(),
93 segment->etaIndex());
94 auto startPars = boundSegmentPars(*gctx, *detSeg);
95
96 Acts::ObjVisualization3D visualHelper{};
97 if (m_drawEvent) {
99 drawSegmentLine(*gctx, *segment, visualHelper,
100 Acts::ViewConfig{.color = {220, 0, 0}});
101 drawSegmentMeasurements(*gctx, *segment, visualHelper, Acts::s_viewSurface);
102 }
103
104 if (msgLvl(MSG::VERBOSE)) {
105 std::stringstream sstr{};
106 sstr<<"pos: "<<Amg::toString(segment->position())
107 <<", dir: "<<Amg::toString(segment->direction())
108 <<", chi2/nDoF: "<<segment->chiSquared() / segment->numberDoF()
109 <<", nDoF: "<<segment->numberDoF()<<", "
110 <<segment->nPrecisionHits()<<", "<<segment->nPhiLayers()<<std::endl;
111 for (const auto& meas : detSeg->measurements()) {
112 sstr<<" **** "<<(*meas)<<", chi2: "<<SeedingAux::chi2Term(line, *meas)
113 <<", sign: "<<(meas->isStraw() ?
114 (SeedingAux::strawSign(line, *meas) == 1 ? "R" : "L") : "-")
115 <<", geoId: "<<(meas->type() != xAOD::UncalibMeasType::Other ?
116 xAOD::muonSurface(meas->spacePoint()->primaryMeasurement()).geometryId()
117 : Acts::GeometryIdentifier{})
118 <<std::endl;
119 }
120 ATH_MSG_VERBOSE("Run propagation test on "<<sector->identString()<<std::endl<<sstr.str());
121 }
122 for (const auto& meas: detSeg->measurements()) {
123 if (!meas->spacePoint() ||
124 meas->fitState() != MuonR4::CalibratedSpacePoint::State::Valid) {
125 continue;
126 }
127 const auto sp = meas->spacePoint();
128 const Acts::Surface& targetSurf{xAOD::muonSurface(sp->primaryMeasurement())};
129
130 const auto& bounds = targetSurf.bounds();
131 Amg::Vector2D lPos{Amg::Vector2D::Zero()}, mPos{Amg::Vector2D::Zero()};
132 const Amg::Transform3D toSurf = targetSurf.localToGlobalTransform(tgContext).inverse() *
133 sector->surface().localToGlobalTransform(tgContext);
134 if (targetSurf.type() == Acts::Surface::SurfaceType::Plane) {
135 lPos = (toSurf * SeedingAux::extrapolateToPlane(line, *meas)).block<2,1>(0,0);
136 if (!bounds.inside(lPos, Acts::BoundaryTolerance::AbsoluteEuclidean(-2._mm))){
137 ATH_MSG_WARNING("The position "<<Amg::toString(lPos)
138 <<" is outside the trapezoid "<<bounds
139 <<" "<<m_idHelperSvc->toString(sp->identify()));
140 continue;
141 }
142 mPos = (toSurf * meas->localPosition()).block<2,1>(0,0);
143 } else if (targetSurf.type() == Acts::Surface::SurfaceType::Straw) {
144 const auto cIsect = lineIntersect<3>(meas->localPosition(), meas->sensorDirection(),
145 line.position(), line.direction());
146 const auto cIsectPos = cIsect.position();
147 const Amg::Vector3D closePos = toSurf * cIsectPos;
148 lPos[0] = Acts::copySign(closePos.perp(), SeedingAux::strawSign(line, *meas));
149 lPos[1] = closePos.z();
150 mPos[0] = Acts::copySign(meas->driftRadius(), lPos[0]);
151 if (meas->measuresPhi()) {
152 mPos[1] = meas->localPosition().x();
153 }
154 const auto& lBounds = static_cast<const Acts::LineBounds&>(bounds);
155 if (std::abs(closePos.z()) > lBounds.get(Acts::LineBounds::eHalfLengthZ) - 2._cm ||
156 closePos.perp() >lBounds.get(Acts::LineBounds::eR) - 0.2_mm) {
157 ATH_MSG_WARNING("The line does not cross tube "
158 <<m_idHelperSvc->toString(sp->identify())
159 <<" "<<Amg::toString(lPos)<<" vs. "<<bounds<<".");
160 continue;
161 }
162 }
163 auto extpPars = extrapolate(startPars, *sp);
164 if (!extpPars.ok()) {
165 ATH_MSG_FATAL("Failed to propagate to "<<(*meas)
166 <<",\n lPos: "<<Amg::toString(toSurf * meas->localPosition())
167 <<", expected: "<<Amg::toString(lPos)<<", "<<targetSurf.bounds());
168 retCode = StatusCode::FAILURE;
169 continue;
170 }
171 if (m_drawEvent) {
173 drawBoundParameters(*gctx, *extpPars, visualHelper,
174 Acts::ViewConfig{.color = {0, 0, 220}}, 6._cm);
175 }
176
177 if (targetSurf.type() == Acts::Surface::SurfaceType::Plane) {
178 ATH_MSG_DEBUG("Position on "<<m_idHelperSvc->toString(sp->identify())
179 <<" plane "<<Amg::toString(lPos)<<" vs. "
180 <<Amg::toString((*extpPars).localPosition()));
181 const Amg::Vector2D dPos = (*extpPars).localPosition() - lPos;
182 if (dPos.mag() > 0.1_mm) {
183 ATH_MSG_FATAL("Too large deviation on "<<m_idHelperSvc->toString(sp->identify())
184 <<", "<<Amg::toString(dPos));
185 retCode = StatusCode::FAILURE;
186 }
187 } else if (targetSurf.type() == Acts::Surface::SurfaceType::Straw) {
188 const double dist = lPos[0];
189 const double extDist = (*extpPars).parameters()[Acts::eBoundLoc0];
190 const double extLocZ = (*extpPars).parameters()[Acts::eBoundLoc1];
191 const double cov = meas->covariance()[Acts::toUnderlying(AxisDefs::etaCov)];
192 ATH_MSG_DEBUG("Distance on surface "<<m_idHelperSvc->toString(sp->identify())
193 <<" straight: "<<dist<<", extrapolated: "<<extDist
194 <<"--> "<<(extDist - dist ) / std::sqrt(cov)
195 <<", along the tube: "<<lPos[1]<<", extrapolated: "<<extLocZ);
196 if (std::abs(dist - extDist) / std::sqrt(cov) > 0.05 ||
197 std::abs(lPos[1] - extLocZ) > 0.1_mm) {
198 ATH_MSG_FATAL("Too large deviation on "<<m_idHelperSvc->toString(sp->identify())
199 <<", "<<Amg::toString(lPos)<<" vs. ("<<extDist<<", "<<extLocZ<<")"
200 <<", deviate R: "<<(std::abs(dist -extDist) / std::sqrt(cov))
201 <<", deviate Z: "<<std::abs(lPos[1] - extLocZ));
202 retCode = StatusCode::FAILURE;
203 }
204 }
205
206 pullCalculator.updateSpatialResidual(line, *meas);
207 ATH_MSG_DEBUG("Analyze residual for "<<m_idHelperSvc->toString(sp->identify())
208 <<" / "<<targetSurf.geometryId()<<" --- measurement: "<<Amg::toString(mPos)<<", extraploated: "
209 <<Amg::toString(lPos)<<" --> residual: "<<Amg::toString(mPos - lPos)<<" vs. "
210 <<Amg::toString(pullCalculator.residual()));
211 }
212 if (m_drawEvent) {
213 visualHelper.write(std::format("ExtTpTest_{:}_{:}_{:}.obj",
214 ctx.eventID().event_number(), segment->index(),
215 MuonR4::printID(*segment)));
216 }
217 }
218
219 return retCode;
220 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sp
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Acts::GeometryContext context() const
bool msgLvl(const MSG::Level lvl) const
std::string identString() const
Returns a string encoding the chamber index & the sector of the MS sector.
const Acts::PlaneSurface & surface() const
Returns the associated surface.
const MeasVec & measurements() const
Returns the associated measurements.
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Dependency on the geometry alignment.
Gaudi::Property< bool > m_drawEvent
Option to draw every extrapolation asan obj file.
const MuonGMR4::MuonDetectorManager * m_detMgr
Detector manager to fetch the sector surfaces.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_readKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
::StatusCode StatusCode
StatusCode definition for legacy code.
float extrapolate(const MuonLayerHough::Maximum &ref, const MuonLayerHough::Maximum &ex, bool doparabolic=false)
SpacePoint::SeedingAux SeedingAux
Abrivation of the CompSpacePointAuxiliaries.
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
Acts::BoundTrackParameters boundSegmentPars(const MuonGMR4::MuonDetectorManager &detMgr, const xAOD::MuonSegment &segment, std::optional< Acts::BoundMatrix > cov=std::nullopt, Acts::ParticleHypothesis hypot=Acts::ParticleHypothesis::muon())
Returns the segment parameters as boundTrackParameters.
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
void drawBoundParameters(const ActsTrk::GeometryContext &gctx, const Acts::BoundTrackParameters &pars, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewLine, const double standardLength=3.*Gaudi::Units::cm)
Draw a line representing the bound track parameters.
void drawSegmentMeasurements(const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewSensitive)
Draw all uncalibrated measurements associated to the segment.
void drawSegmentLine(const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewLine, const double standardLength=1.*Gaudi::Units::m)
Draw a segment line inside the obj file.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
dot(G, fn, nodesToHighlight=[])
Definition dot.py:5
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
MuonSegment_v1 MuonSegment
Reference the current persistent version:
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.

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

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 }
97}
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

◆ initialize()

StatusCode MuonValR4::SegmentExtpTest::initialize ( )
finaloverridevirtual

Definition at line 35 of file SegmentExtpTest.cxx.

35 {
36 ATH_CHECK(m_readKey.initialize());
37 ATH_CHECK(m_geoCtxKey.initialize());
38 ATH_CHECK(m_idHelperSvc.retrieve());
40 ATH_CHECK(detStore()->retrieve(m_detMgr));
41 return StatusCode::SUCCESS;
42 }
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()

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

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

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

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

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()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
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.

◆ 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 MuonGMR4::MuonDetectorManager* MuonValR4::SegmentExtpTest::m_detMgr {nullptr}
private

Detector manager to fetch the sector surfaces.

Definition at line 36 of file SegmentExtpTest.h.

36{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_drawEvent

Gaudi::Property<bool> MuonValR4::SegmentExtpTest::m_drawEvent {this , "drawEvent", false }
private

Option to draw every extrapolation asan obj file.

Definition at line 38 of file SegmentExtpTest.h.

38{this , "drawEvent", 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_extrapolationTool

ToolHandle<ActsTrk::IExtrapolationTool> MuonValR4::SegmentExtpTest::m_extrapolationTool {this, "ExtrapolationTool" ,"" }
private

Track extrapolation tool.

Definition at line 32 of file SegmentExtpTest.h.

32{this, "ExtrapolationTool" ,"" };

◆ m_geoCtxKey

SG::ReadHandleKey<ActsTrk::GeometryContext> MuonValR4::SegmentExtpTest::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Dependency on the geometry alignment.

Definition at line 34 of file SegmentExtpTest.h.

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

◆ m_idHelperSvc

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

IdHelperSvc to decode the Identifiers.

Definition at line 30 of file SegmentExtpTest.h.

30{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_readKey

SG::ReadHandleKey<xAOD::MuonSegmentContainer> MuonValR4::SegmentExtpTest::m_readKey {this, "SegmentKey", "MuonSegmentsFromR4"}
private

Declare the data dependency on the standard Mdt+Rpc+Tgc segment container.

Definition at line 28 of file SegmentExtpTest.h.

28{this, "SegmentKey", "MuonSegmentsFromR4"};

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