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 42 of file SegmentExtpTest.cxx.

42 {
43 const xAOD::MuonSegmentContainer* segments{nullptr};
44 ATH_CHECK(SG::get(segments, m_readKey, ctx));
45 const ActsTrk::GeometryContext* gctx{nullptr};
46 ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
47 const auto tgContext = gctx->context();
48
49 auto extrapolate = [&](const Acts::BoundTrackParameters& start,
50 const MuonR4::SpacePoint& sp) {
51 const Amg::Transform3D& trf = sp.msSector()->localToGlobalTrans(*gctx);
52 const Acts::Surface& target = xAOD::muonSurface(sp.primaryMeasurement());
53 const Amg::Vector3D n = target.normal(tgContext,
54 Amg::Vector3D::Zero(),
55 Amg::Vector3D::Zero());
56
57 auto lambda = sp.isStraw() ? Amg::intersect<3>(trf * sp.localPosition(),
58 trf.linear() * sp.sensorDirection(),
59 start.position(tgContext),
60 start.direction())
61 : Amg::intersect<3>(start.position(tgContext),
62 start.direction(), n,
63 n.dot(target.center(tgContext)));
64
65 const auto* detEl = static_cast<const ActsTrk::IDetectorElementBase*>(target.associatedDetectorElement());
66 ATH_MSG_VERBOSE("Propagate "<<Amg::toString(start.position(tgContext))<<" + "
67 <<Amg::toString(start.direction())<<" onto surface: "<<target.toString(tgContext)
68 <<"\n, "<<m_idHelperSvc->toString(detEl->identify())
69 << " geoId: "<<target.geometryId()<<", "<<( lambda.value_or(0.) > 0 ? "forward" : "backward"));
70
71 return m_extrapolationTool->propagate(ctx, start, target, lambda.value_or(0.) > 0
72 ? Acts::Direction::Forward()
73 : Acts::Direction::Backward(), 100._m);
74
75 };
76 StatusCode retCode = StatusCode::SUCCESS;
77 for (const xAOD::MuonSegment* segment : *segments) {
78 const MuonR4::Segment* detSeg = MuonR4::detailedSegment(*segment);
79
80 const auto segPars = localSegmentPars(*segment);
81 const auto [locPos, locDir] = makeLine(segPars);
82
83 const MuonGMR4::SpectrometerSector* sector = m_detMgr->getSectorEnvelope(segment->chamberIndex(),
84 segment->sector(),
85 segment->etaIndex());
86 auto startPars = boundSegmentPars(*gctx, *detSeg);
87
88 Acts::ObjVisualization3D visualHelper{};
89 if (m_drawEvent) {
91 drawSegmentLine(*gctx, *segment, visualHelper,
92 Acts::ViewConfig{.color = {220, 0, 0}});
93 drawSegmentMeasurements(*gctx, *segment, visualHelper, Acts::s_viewSurface);
94 }
95
96 if (msgLvl(MSG::VERBOSE)) {
97
98 std::stringstream sstr{};
99 sstr<<"pos: "<<Amg::toString(segment->position())<<", dir: "
100 <<Amg::toString(segment->direction())<<", chi2/nDoF: "
101 <<segment->chiSquared() / segment->numberDoF()<<", nDoF: "<<segment->numberDoF()<<", "
102 <<segment->nPrecisionHits()<<", "<<segment->nPhiLayers()<<std::endl;
103 for (const auto& meas : detSeg->measurements()) {
104 sstr<<" **** "<<(*meas)<<", chi2: "<<SeedingAux::chi2Term(locPos, locDir, *meas)
105 <<", sign: "<<(meas->isStraw() ?
106 (SeedingAux::strawSign(locPos,locDir, *meas) == 1 ? "R" : "L") : "-")
107 <<", geoId: "<<(meas->type() != xAOD::UncalibMeasType::Other ?
108 xAOD::muonSurface(meas->spacePoint()->primaryMeasurement()).geometryId()
109 : Acts::GeometryIdentifier{})
110 <<std::endl;
111 }
112 ATH_MSG_VERBOSE("Run propagation test on "<<sector->identString()<<std::endl<<sstr.str());
113 }
114
115 for (const auto& meas: detSeg->measurements()) {
116 if (!meas->spacePoint() ||
117 meas->fitState() != MuonR4::CalibratedSpacePoint::State::Valid) {
118 continue;
119 }
120 const auto sp = meas->spacePoint();
121 const Acts::Surface& targetSurf{xAOD::muonSurface(sp->primaryMeasurement())};
122
123 const auto& bounds = targetSurf.bounds();
124 Amg::Vector2D lPos{Amg::Vector2D::Zero()};
125 const auto trf = targetSurf.transform(tgContext).inverse() *
126 sector->surface().transform(tgContext);
127 if (targetSurf.type() == Acts::Surface::SurfaceType::Plane) {
128 lPos = (trf * SeedingAux::extrapolateToPlane(locPos, locDir, *meas)).block<2,1>(0,0);
129 if (!bounds.inside(lPos, Acts::BoundaryTolerance::AbsoluteEuclidean(-2._mm))){
130 ATH_MSG_WARNING("The position "<<Amg::toString(lPos)
131 <<" is outside the trapezoid "<<bounds
132 <<" "<<m_idHelperSvc->toString(sp->identify()));
133 continue;
134 }
135 } else if (targetSurf.type() == Acts::Surface::SurfaceType::Straw) {
136 const auto cIsect = lineIntersect<3>(meas->localPosition(),
137 meas->sensorDirection(),
138 locPos, locDir);
139 const auto cIsectPos = cIsect.position();
140 const auto cPos = trf * cIsectPos;
141 lPos[0] = cPos.perp() * SeedingAux::strawSign(locPos, locDir, *meas);
142 lPos[1] = cPos.z();
143 const auto& lBounds = static_cast<const Acts::LineBounds&>(bounds);
144 if (std::abs(cPos.z()) > lBounds.get(Acts::LineBounds::eHalfLengthZ) - 2._cm ||
145 cPos.perp() >lBounds.get(Acts::LineBounds::eR) - 0.2_mm) {
146 ATH_MSG_WARNING("The line is not on measurement "
147 <<m_idHelperSvc->toString(sp->identify())
148 <<" "<<Amg::toString(lPos)<<" vs. "<<bounds<<".");
149 continue;
150 }
151 }
152 auto extpPars = extrapolate(startPars, *sp);
153 if (!extpPars) {
154 ATH_MSG_FATAL("Failed to propagte to "<<(*meas)
155 <<",\n lPos: "<<Amg::toString(trf * meas->localPosition())
156 <<", expected: "<<Amg::toString(lPos)<<", "<<targetSurf.bounds());
157 retCode = StatusCode::FAILURE;
158 continue;
159 }
160 if (m_drawEvent) {
162 drawBoundParameters(*gctx, *extpPars, visualHelper,
163 Acts::ViewConfig{.color = {0, 0, 220}}, 6._cm);
164 }
165
166 if (targetSurf.type() == Acts::Surface::SurfaceType::Plane) {
167 ATH_MSG_DEBUG("Position on "<<m_idHelperSvc->toString(sp->identify())
168 <<" plane "<<Amg::toString(lPos)<<" vs. "
169 <<Amg::toString((*extpPars).localPosition()));
170 const Amg::Vector2D dPos = (*extpPars).localPosition() - lPos;
171 if (dPos.mag() > 0.1_mm) {
172 ATH_MSG_FATAL("Too large deviation on "<<m_idHelperSvc->toString(sp->identify())
173 <<", "<<Amg::toString(dPos));
174 retCode = StatusCode::FAILURE;
175 }
176 } else if (targetSurf.type() == Acts::Surface::SurfaceType::Straw) {
177 const double dist = lPos[0];
178 const double extDist = (*extpPars).parameters()[Acts::eBoundLoc0];
179 const double extLocZ = (*extpPars).parameters()[Acts::eBoundLoc1];
180 const double cov = meas->covariance()[Acts::toUnderlying(AxisDefs::etaCov)];
181 ATH_MSG_DEBUG("Distance on surface "<<m_idHelperSvc->toString(sp->identify())
182 <<" straight: "<<dist<<", extrapolated: "<<extDist
183 <<"--> "<<(extDist - dist ) / std::sqrt(cov)
184 <<", along the tube: "<<lPos[1]<<", extrapolated: "<<extLocZ);
185 if (std::abs(dist - extDist) / std::sqrt(cov) > 0.05 ||
186 std::abs(lPos[1] - extLocZ) > 0.1_mm) {
187 ATH_MSG_FATAL("Too large deviation on "<<m_idHelperSvc->toString(sp->identify())
188 <<", "<<Amg::toString(lPos)<<" vs. ("<<extDist<<", "<<extLocZ<<")"
189 <<", deviate R: "<<(std::abs(dist -extDist) / std::sqrt(cov))
190 <<", deviate Z: "<<std::abs(lPos[1] - extLocZ));
191 retCode = StatusCode::FAILURE;
192 }
193 }
194 }
195 if (m_drawEvent) {
196 visualHelper.write(std::format("ExtTpTest_{:}_{:}_{:}.obj",
197 ctx.eventID().event_number(), segment->index(),
198 MuonR4::printID(*segment)));
199 }
200 }
201
202 return retCode;
203 }
#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
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)
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
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".
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
MuonSegment_v1 MuonSegment
Reference the current persistent version:

◆ 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 34 of file SegmentExtpTest.cxx.

34 {
35 ATH_CHECK(m_readKey.initialize());
36 ATH_CHECK(m_geoCtxKey.initialize());
37 ATH_CHECK(m_idHelperSvc.retrieve());
40 return StatusCode::SUCCESS;
41 }
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

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