ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::MsTrackFindingAlg Class Reference

The MSTrackFindingAlg combines the built MS segments to track seeds and then attempts to fit the hits on a seed. More...

#include <MsTrackFindingAlg.h>

Inheritance diagram for MuonR4::MsTrackFindingAlg:
Collaboration diagram for MuonR4::MsTrackFindingAlg:

Public Types

using OptBoundPars_t = Acts::Result<Acts::BoundTrackParameters>
 Abrivation for the result of bound track parameters.
using MeasVec_t = std::vector<const xAOD::UncalibratedMeasurement*>
 Abrivation for a vector of measurements.
using PseudoMeasHandle_t = ActsTrk::AuxiliaryMeasurementHandler::MeasurementProvider
 Auxiliary object to create the pseudo measurements.

Public Member Functions

virtual ~MsTrackFindingAlg ()
virtual StatusCode initialize () override final
 Standard algorithm hook to setup the extrapolator, retrieve the tools and declare algorithm's data dependencies.
virtual StatusCode execute (const EventContext &ctx) const override final
 Standard algorithm execution hook.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
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
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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< StoreGateSvc > StoreGateSvc_t

Private Member Functions

bool fitSeedCandidate (const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer, PseudoMeasHandle_t &auxMeasContainer) const
 Attempts to fit the track seed candidate to a full track and returns whether the fit succeeded.
template<std::size_t N>
std::unique_ptr< ActsTrk::MutableTrackContainer > fitBestCombination (const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, std::optional< Acts::BoundTrackParameters > startPars, PseudoMeasHandle_t &auxMeasContainer) const
MeasVec_t collectMeasurements (const Acts::GeometryContext &tgContext, const Acts::BoundTrackParameters &startPars, const MsTrackSeed &seed, PseudoMeasHandle_t &auxMeasContainer) const
 Collect all measurements from the segments associated with the seed If there are less than 2 phi measurements auxiliary measurements are inserted to stabilize the later fit result.
bool goodFit (const EventContext &ctx, std::unique_ptr< ActsTrk::MutableTrackContainer > &fitResult, const std::size_t reqStations) const
 Evaluate whether the fit result is acceptable in terms of chi2
and whether the fitted track contains precision hits on N stations.
bool expressAtCaloExit (const EventContext &ctx, ActsTrk::MutableTrackContainer::TrackProxy track) const
 Extrapolate the tracks back to the calo exit and update the track parameters accoringly.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 IdHelperSvc to decode the Identifiers.
const MuonGMR4::MuonDetectorManager * m_detMgr {nullptr}
 Pointer to the MuonDetectorManager.
SG::WriteHandleKey< MsTrackSeedContainer > m_msTrkSeedKey {this, "MsTrkSeedKey", "MsTrackSeeds"}
 Temporary container write handle to push the seeds to store gate for later efficiency analysis.
ToolHandle< ITrackSeedingTool > m_seedingTool {this, "SeedingTool", ""}
 The track seeding tool to construct the seed candidates and to estimate the initial parameters.
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool {this, "FittingTool", ""}
 Track fitting tool.
ToolHandle< ISpacePointCalibrator > m_calibTool {this, "Calibrator", ""}
 Calibration tool to fill the track states.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool {this, "ExtrapolationTool" ,"" }
 Track extrapolation tool.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc {this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"}
 Service handle to the tracking geometry service.
Gaudi::Property< bool > m_expressAtMsEntrance {this, "expressAtMsEntrance", true}
 Propagate the track at the MS entry and express its parameters.
Gaudi::Property< bool > m_ignoreFailedMsEntrance {this, "ignoreFailedExtpMsEntrance", true}
 Ignore failed track extrapolations to the entrance.
ActsTrk::ContextUtility m_ctxProvider {this}
 Utility to fetch the geometry, magnetic field and calibration context in the event.
ActsTrk::AuxiliaryMeasurementHandler m_pseudoMeasuremntCreator {this}
 Utility to impose external constraints in the fit.
ToolHandle< MuonValR4::ITrackVisualizationTool > m_visualizationTool {this, "VisualizationTool", ""}
 Visualization tool to debug the track finding.
ToolHandle< MuonR4::ITrackSummaryTool > m_summaryTool {this, "SummaryTool" , ""}
 Handle to the muon summary tool.
SG::WriteHandleKey< ActsTrk::TrackContainer > m_writeKey {this, "TrackWriteKey", "MuonMsTracks"}
 Key to the output track container.
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

The MSTrackFindingAlg combines the built MS segments to track seeds and then attempts to fit the hits on a seed.

In the standard case, the track seed is formed by expressing all segments on a common virtual cylinder and to search for accumulation points on that surface. The SeedingTool is also repsonsible to provide an initial estimate on the track parameters in terms of direction and trajectory curvature. The measurements are then extracted from the segments associated with the seed an a track fit is attempted. Failed seeds are retried by selecting any combination of N-1 segments and then to fit each of them. The best result is then taken for the next iteration.

Track candidates are then extrapolated to the Calorimeter exit volume to express the parameters there Failed extrapolation cases may be discarded depending on the configuration.

Definition at line 47 of file MsTrackFindingAlg.h.

Member Typedef Documentation

◆ MeasVec_t

Abrivation for a vector of measurements.

Definition at line 60 of file MsTrackFindingAlg.h.

◆ OptBoundPars_t

using MuonR4::MsTrackFindingAlg::OptBoundPars_t = Acts::Result<Acts::BoundTrackParameters>

Abrivation for the result of bound track parameters.

Definition at line 58 of file MsTrackFindingAlg.h.

◆ PseudoMeasHandle_t

Auxiliary object to create the pseudo measurements.

Definition at line 62 of file MsTrackFindingAlg.h.

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~MsTrackFindingAlg()

MuonR4::MsTrackFindingAlg::~MsTrackFindingAlg ( )
virtualdefault

Member Function Documentation

◆ collectMeasurements()

MsTrackFindingAlg::MeasVec_t MuonR4::MsTrackFindingAlg::collectMeasurements ( const Acts::GeometryContext & tgContext,
const Acts::BoundTrackParameters & startPars,
const MsTrackSeed & seed,
PseudoMeasHandle_t & auxMeasContainer ) const
private

Collect all measurements from the segments associated with the seed If there are less than 2 phi measurements auxiliary measurements are inserted to stabilize the later fit result.

Parameters
tgContextThe geometry context to place later the auxiliary surface
startParsThe track start parameters in use
seedThe seed in use from which associated segments the measurments are taken
auxMeasContainerMutable refernce to the auxiliary container

Count the number of sations

Check if the station has not yet been processed and also
check whether there were already enough stations processed

Count the phi degree of freedom

Combined or 2D measurements

Construct the start position at that surface

Fetch the transform from the start parameter surface

Calculate the local position and direction

Position of the first and last surface

Auxiliary measurements are no muon measurements and have no identifier

Definition at line 109 of file MsTrackFindingAlg.cxx.

112 {
113 MeasVec_t pickedMeas{};
114 pickedMeas.reserve(seed.nMeasurements());
115
116 std::uint8_t nPhiMeasurements{0};
117 AmgSymMatrix(1) phiCov{Acts::square(1._cm)};
119 for (const xAOD::MuonSegment* segment : seed.segments()) {
120 m_calibTool->stampSignsOnMeasurements(tgContext, *segment);
123 for (std::size_t m = 0; m < nMeasurements(*segment); ++m) {
124 const xAOD::UncalibratedMeasurement* meas = getMeasurement(*segment, m);
125 if (meas->type() == xAOD::UncalibMeasType::Other ||
126 isOutlierMeasurement(*segment, m)) {
127 continue;
128 }
129 pickedMeas.push_back(meas);
131 switch (meas->numDimensions()) {
132 case 1: {
133 const auto* muonMeas{dynamic_cast<const xAOD::MuonMeasurement*>(meas)};
134 assert(muonMeas != nullptr);
135 if (muonMeas->measuresPhi() || (muonMeas->type() == xAOD::UncalibMeasType::MMClusterType &&
136 m_idHelperSvc->mmIdHelper().isStereo(muonMeas->identify()))) {
137 ++nPhiMeasurements;
138 phiCov(0,0) = std::max(phiCov(0,0), 1.* meas->localCovariance<1>()(0, 0));
139 }
140 break;
141 }
143 case 0:
144 case 2:
145 ++nPhiMeasurements;
146 phiCov(0,0) = std::max(phiCov(0,0), 1.*meas->localCovariance<2>()(Acts::eBoundLoc1, Acts::eBoundLoc1));
147 break;
148 default:
149 break;
150 }
151 }
152 }
153
154 if (nPhiMeasurements < 2) {
156 const Amg::Vector3D startPos = startPars.position(tgContext);
157 const Amg::Vector3D startDir = startPars.direction();
158
160 const Acts::Transform3& startTrf{startPars.referenceSurface().
161 localToGlobalTransform(tgContext)};
163 const Amg::Vector3D locDir = startTrf.inverse().linear() * startDir;
164 const Amg::Vector3D locPos = startTrf.inverse()* startPos;
166 const Amg::Vector3D firstM = xAOD::muonSurface(pickedMeas.front()).
167 intersect(tgContext, startPos, startDir).closest().position();
168 const Amg::Vector3D lastM = xAOD::muonSurface(pickedMeas.back()).
169 intersect(tgContext, startPos, startDir).closest().position();
170
171 auto bounds = std::make_shared<Acts::RectangleBounds>(10._m, 10. * std::sqrt(phiCov(0,0)));
172 /* Place the first one between the first measurement and the start*/
173 auto firstSurface = Acts::Surface::makeShared<Acts::PlaneSurface>(startTrf *
174 Amg::getTranslate3D(locPos + 0.5*(firstM - startPos).dot(startDir) * locDir), bounds);
175 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Create new auxilliary surface @ "
176 <<Amg::toString(firstSurface->localToGlobalTransform(tgContext)));
177 auto lastSurface = Acts::Surface::makeShared<Acts::PlaneSurface>(startTrf *
178 Amg::getTranslate3D(locPos + (8._mm + (lastM - startPos).dot(startDir))* locDir), bounds);
179 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Create new auxilliary surface @ "
180 <<Amg::toString(lastSurface->localToGlobalTransform(tgContext)));
182 pickedMeas.push_back(auxMeasContainer.newMeasurement<1>(firstSurface, calibIdx, phiCov));
183 pickedMeas.push_back(auxMeasContainer.newMeasurement<1>(lastSurface, calibIdx, phiCov));
184 }
185 if (msgLvl(MSG::VERBOSE)) {
186 std::stringstream sstr{};
187 for (const xAOD::UncalibratedMeasurement* m : pickedMeas) {
189 if (!xAOD::isMuon(m->type())) {
190 sstr<<" --- auxiliary measurement, nDim: "<<m->numDimensions()<<std::endl;
191 continue;
192 }
193 sstr<<" --- "<<m_idHelperSvc->toString(xAOD::identify(m))<<", nDim: "<<m->numDimensions()<<", "
194 <<xAOD::muonSurface(m).geometryId()<<std::endl;
195 }
196 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Collected measurements.\n"<<sstr.str());
197 }
198 return pickedMeas;
199 }
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define AmgSymMatrix(dim)
@ e1DimRotNoTime
Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm).
bool msgLvl(const MSG::Level lvl) const
std::vector< const xAOD::UncalibratedMeasurement * > MeasVec_t
Abrivation for a vector of measurements.
ToolHandle< ISpacePointCalibrator > m_calibTool
Calibration tool to fill the track states.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
ConstMatrixMap< N > localCovariance() const
Returns the local covariance of the measurement.
virtual unsigned int numDimensions() const =0
Returns the number of dimensions of the measurement.
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
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.
Amg::Isometry3D getTranslate3D(const double X, const double Y, const double Z)
: Returns a shift transformation along an arbitrary axis
Eigen::Matrix< double, 3, 1 > Vector3D
const xAOD::UncalibratedMeasurement * getMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns the n-th uncalibrated measurement.
std::size_t nMeasurements(const xAOD::MuonSegment &segment)
Returns the number of associated Uncalibrated measurements.
bool isOutlierMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns whether the n-the uncalibrated measurement is an outlier.
dot(G, fn, nodesToHighlight=[])
Definition dot.py:5
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
MuonMeasurement_v1 MuonMeasurement
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
bool isMuon(const xAOD::UncalibratedMeasurement *meas)
Returns whether the measurement is from a muon detector.

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

Standard algorithm execution hook.

Attach the number of the parent seed to the output container

Definition at line 56 of file MsTrackFindingAlg.cxx.

56 {
57 ATH_MSG_VERBOSE("Run track finding in event "<<ctx.eventID().event_number());
58
59
60 auto seedContainer = std::make_unique<MsTrackSeedContainer>();
61
62 ATH_CHECK(m_seedingTool->findTrackSeeds(ctx, *seedContainer));
63
64 if (!m_visualizationTool.empty()) {
65 m_visualizationTool->displaySeeds(ctx, *seedContainer);
66 }
67 const Acts::GeometryContext tgContext{m_ctxProvider.getGeometryContext(ctx)};
68 const Acts::MagneticFieldContext mfContext{m_ctxProvider.getMagneticFieldContext(ctx)};
69 const Acts::CalibrationContext calContext{m_ctxProvider.getCalibrationContext(ctx)};
70
71 ActsTrk::MutableTrackContainer cacheTrkContainer{Acts::VectorTrackContainer{},
72 Acts::VectorMultiTrajectory{}};
73
74 auto auxMeasHandler = m_pseudoMeasuremntCreator.makeHandle(ctx, tgContext);
75 ATH_CHECK(auxMeasHandler.ok());
77 cacheTrkContainer.addColumn<std::size_t>("parentSeed");
78 unsigned seedIdx{0};
79 for (MsTrackSeed& seed : *seedContainer) {
80 if (seed.hasOverlap()) {
81 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Overlap marker from a previous fit is triggered.");
82 continue;
83 }
84 if (fitSeedCandidate(tgContext, mfContext, calContext, seed,
85 cacheTrkContainer, *auxMeasHandler)) {
86 auto lastTrack = cacheTrkContainer.getTrack(cacheTrkContainer.size() -1);
87 lastTrack.component<std::size_t, Acts::hashString("parentSeed")>() = seedIdx;
88 seed.triggerOverlapMarker();
89 ++seedIdx;
90 }
91 }
92 auto [rBegin, rEnd] = std::ranges::remove_if(*seedContainer, &MsTrackSeed::hasOverlap);
93 seedContainer->erase(rBegin, rEnd);
94 if (!m_msTrkSeedKey.empty()) {
95 SG::WriteHandle writeHandleSeed{m_msTrkSeedKey, ctx};
96 ATH_CHECK(writeHandleSeed.record(std::move(seedContainer)));
97 }
98
99 // Constant declination
100 auto ctc = std::make_unique<ActsTrk::TrackContainer>(Acts::ConstVectorTrackContainer{std::move(cacheTrkContainer.container())},
101 Acts::ConstVectorMultiTrajectory{std::move(cacheTrkContainer.trackStateContainer())});
102
103 SG::WriteHandle writeHandle{m_writeKey, ctx};
104 ATH_CHECK(writeHandle.record(std::move(ctc)));
105 return StatusCode::SUCCESS;
106 }
#define ATH_CHECK
Evaluate an expression and check for errors.
ToolHandle< ITrackSeedingTool > m_seedingTool
The track seeding tool to construct the seed candidates and to estimate the initial parameters.
ActsTrk::AuxiliaryMeasurementHandler m_pseudoMeasuremntCreator
Utility to impose external constraints in the fit.
SG::WriteHandleKey< ActsTrk::TrackContainer > m_writeKey
Key to the output track container.
SG::WriteHandleKey< MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
bool fitSeedCandidate(const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer, PseudoMeasHandle_t &auxMeasContainer) const
Attempts to fit the track seed candidate to a full track and returns whether the fit succeeded.
ToolHandle< MuonValR4::ITrackVisualizationTool > m_visualizationTool
Visualization tool to debug the track finding.
ActsTrk::ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
bool hasOverlap() const
Returns whether the seed has been marked for overlap.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer

◆ expressAtCaloExit()

bool MuonR4::MsTrackFindingAlg::expressAtCaloExit ( const EventContext & ctx,
ActsTrk::MutableTrackContainer::TrackProxy track ) const
private

Extrapolate the tracks back to the calo exit and update the track parameters accoringly.

If the extrapolation fails, a false is returned

Parameters
ctxEventContext to access the GeometryContext and the magnetic field
trackThe track to be expressed at the calorimeter entrance

Definition at line 429 of file MsTrackFindingAlg.cxx.

430 {
432 return true;
433 }
434 const Acts::BoundTrackParameters startPars = track.createParametersAtReference();
435 const Acts::TrackingVolume* msEntrance = m_trackingGeometrySvc->getEnvelope(ActsTrk::SystemEnvelope::CaloExit);
436 const Acts::GeometryContext tgContext = m_ctxProvider.getGeometryContext(ctx);
437 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Extrapolate "<<startPars<<", "
438 <<startPars.referenceSurface().toString(tgContext)<<" to MS entrance: "<<msEntrance->volumeBounds());
439
440 auto parsAtEntrance = m_extrapolationTool->propagate(ctx, startPars, *msEntrance,
442 Acts::Direction::Backward());
443
444 if (!parsAtEntrance.ok()) {
445 ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - Failed to extrapolate "<<startPars<<" to MS entrance");
447 }
448 if (parsAtEntrance->referenceSurface().geometryId().withBoundary(0) != msEntrance->geometryId()) {
449 ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - Parameter extrapolation to "<<(*parsAtEntrance)<<", @"
450 << Amg::toString(parsAtEntrance->referenceSurface().localToGlobalTransform(tgContext))
451 <<" did not end up at "<<msEntrance->geometryId()<<".");
453 }
454 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Extrapolated start parameters to "<<(*parsAtEntrance)
455 <<", "<<parsAtEntrance->referenceSurface().toString(tgContext));
456 track.setReferenceSurface(parsAtEntrance->referenceSurface().getSharedPtr());
457 track.parameters() = parsAtEntrance->parameters();
458 track.covariance() = (*parsAtEntrance->covariance());
459 return true;
460 }
#define ATH_MSG_WARNING(x,...)
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Service handle to the tracking geometry service.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
Gaudi::Property< bool > m_expressAtMsEntrance
Propagate the track at the MS entry and express its parameters.
Gaudi::Property< bool > m_ignoreFailedMsEntrance
Ignore failed track extrapolations to the entrance.

◆ 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 & AthCommonAlgorithm< 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 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ fitBestCombination()

template<std::size_t N>
std::unique_ptr< ActsTrk::MutableTrackContainer > MuonR4::MsTrackFindingAlg::fitBestCombination ( const Acts::GeometryContext & tgContext,
const Acts::MagneticFieldContext & mfContext,
const Acts::CalibrationContext & calContext,
const MsTrackSeed & seed,
std::optional< Acts::BoundTrackParameters > startPars,
PseudoMeasHandle_t & auxMeasContainer ) const
private

The start parameters of the partial seed are behind the first segment to fit

Definition at line 203 of file MsTrackFindingAlg.cxx.

208 {
209 std::unique_ptr<ActsTrk::MutableTrackContainer> bestFit{};
210 const EventContext& ctx{*calContext.get<const EventContext*>()};
211 const auto stations = seed.stations();
212 std::array<StIndex, N> pickedStations{};
213
214 double bestRedChi2{std::numeric_limits<double>::max()};
215 Acts::detail::CombinatoricIndices<N> stationPicker{stations.size()};
216 for (const auto& combo : stationPicker) {
217 for (std::size_t i =0 ; i < N; ++i){
218 pickedStations[i] = stations[combo[i]];
219 }
220 if constexpr(N == 2) {
221 if (Acts::rangeContainsValue(pickedStations, StIndex::BE) ||
222 Acts::rangeContainsValue(pickedStations, StIndex::EE) ||
223 toLayerIndex(pickedStations.front()) == toLayerIndex(pickedStations.back()) ||
224 (Acts::rangeContainsValue(pickedStations, StIndex::EM) &&
225 Acts::rangeContainsValue(pickedStations, StIndex::EO))){
226 continue;
227 }
228 }
229
230 MsTrackSeed partialSeed{seed.location(), seed.sector()};
231 for (const xAOD::MuonSegment* segment : seed.segments()) {
232 const StIndex stIdx = toStationIndex(segment->chamberIndex());
233 if (!Acts::rangeContainsValue(pickedStations, stIdx)) {
234 continue;
235 }
236 partialSeed.addSegment(segment);
237 }
238 ATH_MSG_DEBUG(__func__<<"<"<<N<<">() "<<__LINE__<<" - Try station combination "<<pickedStations);
239
240 if (startPars) {
241 const Amg::Vector3D startPos = startPars->position(tgContext);
242 const Acts::GeometryIdentifier volId = volumeId(xAOD::muonSurface(getMeasurement(*partialSeed.segments()[0], 0)));
243 const Acts::TrackingVolume* volume{MuonGMR4::highestAlignable(m_trackingGeometrySvc->trackingGeometry()->findVolume(volId))};
244 auto boundSurf = MuonGMR4::bottomBoundary(*volume);
245 if (!boundSurf) {
246 ATH_MSG_WARNING(__func__<<"<"<<N<<">() "<<__LINE__<<" - Failed to find boundary surface for tracking volume");
247 continue;
248 }
249
250 ATH_MSG_VERBOSE(__func__<<"<"<<N<<">() "<<__LINE__<<" - Start position: "<<Amg::toString(startPos)
251 <<", perp: "<<startPos.perp()<<", "<<startPars->referenceSurface().center(tgContext).perp()
252 <<", surf center: "<<Amg::toString(boundSurf->center(tgContext))
253 <<", perp: "<<boundSurf->center(tgContext).perp()
254 <<", "<<(boundSurf->center(tgContext)-startPos).dot(startPars->direction()));
256 if (boundSurf->geometryId() != startPars->referenceSurface().geometryId() &&
257 (boundSurf->center(tgContext)-startPos).dot(startPars->direction()) < 0.) {
258
259 auto firstSurface = Acts::Surface::makeShared<Acts::PlaneSurface>(boundSurf->localToGlobalTransform(tgContext) *
260 Amg::getTranslateZ3D(-10._cm));
261 ATH_MSG_DEBUG(__func__<<"<"<<N<<">() "<<__LINE__<<" - Extrapolate back onto surface "
262 <<firstSurface->center(tgContext).perp()
263 <<", "<<boundSurf->center(tgContext).perp());
264
265 auto extpPars = m_extrapolationTool->propagate(ctx, *startPars, *firstSurface,
266 Acts::Direction::Backward());
267 if(extpPars.ok()) {
268 startPars = std::move(*extpPars);
269 }
270 }
271 } else {
272 auto seedPars = m_seedingTool->estimateStartParameters(ctx, partialSeed);
273 if (seedPars.ok()) {
274 startPars = std::move(*seedPars);
275 }
276 }
277 if (!startPars) {
278 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Start parameter estimation failed.");
279 continue;
280 }
281 const MeasVec_t measurements = collectMeasurements(tgContext, *startPars, partialSeed, auxMeasContainer);
282 auto fit = m_trackFitTool->fit(measurements, *startPars, tgContext, mfContext, calContext, nullptr);
283 if (!fit) {
284 ATH_MSG_DEBUG(__func__<<"<"<<N<<">() "<<__LINE__<<" - Fit failed.");
285 continue;
286 }
287 ActsTrk::MutableTrackContainer::TrackProxy track = fit->getTrack(0);
288 const std::size_t nFitStations = m_summaryTool->countMuonStations(ctx, track);
289 const double redChi2 = track.chi2() / std::max<double>(1., track.nDoF());
290 ATH_MSG_DEBUG(__func__<<"<"<<N<<">() "<<__LINE__<<" - Combination "<<pickedStations
291 <<" gives chi2/nDoF: "<<redChi2<<", nStations: "<<nFitStations);
292 if (nFitStations >= N && redChi2 < bestRedChi2) {
293 bestRedChi2 = redChi2;
294 bestFit = std::move(fit);
295 }
296 }
297 return bestFit;
298 }
MeasVec_t collectMeasurements(const Acts::GeometryContext &tgContext, const Acts::BoundTrackParameters &startPars, const MsTrackSeed &seed, PseudoMeasHandle_t &auxMeasContainer) const
Collect all measurements from the segments associated with the seed If there are less than 2 phi meas...
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
ToolHandle< MuonR4::ITrackSummaryTool > m_summaryTool
Handle to the muon summary tool.
Amg::Isometry3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
const Acts::Surface * bottomBoundary(const Acts::TrackingVolume &volume)
Returns the boundary surface parallel to the x-y plane at negative local z.
const Acts::TrackingVolume * highestAlignable(const Acts::TrackingVolume *volume)
Returns the highest parent volume that is alignable.
constexpr std::size_t N
Acts::GeometryIdentifier volumeId(const Acts::Surface &surface)
Returns the identifier of the volume in which the surface is embedded.
StIndex
enum to classify the different station layers in the muon spectrometer
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex

◆ fitSeedCandidate()

bool MuonR4::MsTrackFindingAlg::fitSeedCandidate ( const Acts::GeometryContext & tgContext,
const Acts::MagneticFieldContext & mfContext,
const Acts::CalibrationContext & calContext,
const MsTrackSeed & seed,
ActsTrk::MutableTrackContainer & outContainer,
PseudoMeasHandle_t & auxMeasContainer ) const
private

Attempts to fit the track seed candidate to a full track and returns whether the fit succeeded.

Parameters
tgContextGeometry context to access the alignment of the surfaces
mfContextcMagnetic field context to access the field map during the fit
calContextCalibration context to access the calibration constants from Store gate during the track state filling
seedThe seed of interest to fit
outContainerMutable track container to which the output track is written
auxMeasContainerWrite handle to create auxiliary measurements for each fit if needed.

We first combine two muon

No tracks have succceeded.

Add the links to the segments making up this track as an extra column. Use the indices of the segment objects which can later be transformed into a full ElementLink as there is only one SegmentContainer from which the seeds are built

Definition at line 301 of file MsTrackFindingAlg.cxx.

306 {
307 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Attempt to fit a new track seed \n"<<seed);
308 const EventContext& ctx{*calContext.get<const EventContext*>()};
309 const auto initialPars = m_seedingTool->estimateStartParameters(ctx, seed);
310 if (!initialPars.ok()) {
311 ATH_MSG_WARNING(__func__<<"() "<<__LINE__
312 <<" - Start parameter creation failed. ");
313 if (m_visualizationTool.isEnabled()) {
314 m_visualizationTool->displayTrackSeedObj(ctx, seed, initialPars, "FailedStartPars");
315 }
316 return false;
317 }
318 MeasVec_t measurements = collectMeasurements(tgContext, *initialPars, seed, auxMeasContainer);
319
320 ActsTrk::MutableTrackContainer fitAttempts{Acts::VectorTrackContainer{},
321 Acts::VectorMultiTrajectory{}};
322
323 auto copyFit = [&] (std::unique_ptr<ActsTrk::MutableTrackContainer> && result,
324 const std::size_t reqStations) {
325 if (!result || result->size() == 0ul) {
326 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Track fit failed");
327 if (m_visualizationTool.isEnabled()) {
328 auto fitStartPars = fitAttempts.size() > 0 ? fitAttempts.getTrack(
329 fitAttempts.size() -1ul).createParametersAtReference() :
330 *initialPars;
331 m_visualizationTool->displayTrackSeedObj(ctx, seed, fitStartPars,
332 "FailedFit");
333 }
334 return false;
335 }
336 fitAttempts.ensureDynamicColumns(*result);
337 ActsTrk::MutableTrackContainer::TrackProxy track = result->getTrack(0);
338
339 auto destProxy = fitAttempts.getTrack(fitAttempts.addTrack());
340 destProxy.copyFrom(track);
341
342 const std::size_t nStations = m_summaryTool->countMuonStations(ctx, track);
343 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Created new track "<<Amg::toString(track.parameters())<<
344 " with chi2: "<<(track.chi2() / track.nDoF())<<", nDoF: "<<track.nDoF()<<", nStations: "<<nStations
345 <<", requested: "<<reqStations);
346 if (m_visualizationTool.isEnabled() && nStations < reqStations) {
347 m_visualizationTool->displayTrackSeedObj(ctx, seed, track.createParametersAtReference(),
348 std::format("InsufficentStations_{:}_vs_{:}", nStations, reqStations));
349 }
350 return nStations >= reqStations;
351 };
353 const Acts::Surface* target = initialPars->referenceSurface().getSharedPtr().get();
354 if (!copyFit(m_trackFitTool->fit(measurements, *initialPars,
355 tgContext, mfContext, calContext, target), seed.nStations()) && seed.nStations() > 2) {
356 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - First shot failed. Attempt iteratively over the stations. ");
357 for (std::size_t nStation = 2ul; nStation <= seed.nStations(); ++nStation) {
358 auto startPars = fitAttempts.size() > 0ul ?
359 std::make_optional<Acts::BoundTrackParameters>(fitAttempts.getTrack(fitAttempts.size() - 1ul).createParametersAtReference())
360 : std::nullopt;
361 std::unique_ptr<ActsTrk::MutableTrackContainer> fitTraject{};
362 switch (nStation) {
363 case 2ul:
364 fitTraject = fitBestCombination<2>(tgContext, mfContext, calContext, seed, startPars, auxMeasContainer);
365 break;
366 case 3ul:
367 fitTraject = fitBestCombination<3>(tgContext, mfContext, calContext, seed, startPars, auxMeasContainer);
368 break;
369 case 4ul:
370 fitTraject = fitBestCombination<4>(tgContext, mfContext, calContext, seed, startPars, auxMeasContainer);
371 break;
372 case 5ul:
373 fitTraject = fitBestCombination<5>(tgContext, mfContext, calContext, seed, startPars, auxMeasContainer);
374 break;
375 case 6ul:
376 fitTraject = fitBestCombination<6>(tgContext, mfContext, calContext, seed, startPars, auxMeasContainer);
377 break;
378 default:
379 ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - A seven station track is extraordinary\n"<<seed);
380 }
381 if (!copyFit(std::move(fitTraject), nStation)) {
382 break;
383 }
384 if (m_visualizationTool.isEnabled()) {
385 m_visualizationTool->displayTrackSeedObj(ctx, seed,
386 fitAttempts.getTrack(fitAttempts.size() - 1ul).createParametersAtReference(),
387 std::format("IntermediateGooFit_{:}", nStation));
388 }
389 }
390 }
391
393 if (fitAttempts.size() == 0ul) {
394 return false;
395 }
396 ActsTrk::MutableTrackContainer::TrackProxy track = fitAttempts.getTrack(fitAttempts.size() - 1);
397 // Check the hit counts on track post fit and if we only have one station on track discard track
398 // Eventually we should implement some recovery mechanism for track where we loose too many stations
399 const std::uint32_t nStations = m_summaryTool->countMuonStations(ctx, track);
400 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Track has " << nStations << " precision layers.\n"
401 <<m_summaryTool->makeSummary(ctx, track));
402 if(nStations<2ul) {
403 ATH_MSG_DEBUG("rejecting single station track");
404 return false;
405 }
406 if (!expressAtCaloExit(ctx, track)) {
407 return false;
408 }
409
414 {
415 fitAttempts.addColumn<std::vector<const xAOD::MuonSegment*>>("muonSegLinks");
416 auto& toAppend = track.component<std::vector<const xAOD::MuonSegment*>>("muonSegLinks");
417 toAppend.insert_range(toAppend.end(), seed.segments());
418 }
419 outContainer.ensureDynamicColumns(fitAttempts);
420 auto destProxy = outContainer.getTrack(outContainer.addTrack());
421 destProxy.copyFrom(track);
422 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Good track fit...");
423 if (m_visualizationTool.isEnabled()) {
424 m_visualizationTool->displayTrackSeedObj(ctx, seed,
425 destProxy.createParametersAtReference(), "GoodFit");
426 }
427 return true;
428 }
bool expressAtCaloExit(const EventContext &ctx, ActsTrk::MutableTrackContainer::TrackProxy track) const
Extrapolate the tracks back to the calo exit and update the track parameters accoringly.
std::unique_ptr< ActsTrk::MutableTrackContainer > fitBestCombination(const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, std::optional< Acts::BoundTrackParameters > startPars, PseudoMeasHandle_t &auxMeasContainer) const
unsigned long ul

◆ goodFit()

bool MuonR4::MsTrackFindingAlg::goodFit ( const EventContext & ctx,
std::unique_ptr< ActsTrk::MutableTrackContainer > & fitResult,
const std::size_t reqStations ) const
private

Evaluate whether the fit result is acceptable in terms of chi2
and whether the fitted track contains precision hits on N stations.

Parameters
ctxEventContext to access the conditions data in the track summary evaluation
fitResultThe fit container to test
reqStationThe threshold on the number of stations that need to contain a precision hit.

◆ initialize()

StatusCode MuonR4::MsTrackFindingAlg::initialize ( )
finaloverridevirtual

Standard algorithm hook to setup the extrapolator, retrieve the tools and declare algorithm's data dependencies.

Definition at line 36 of file MsTrackFindingAlg.cxx.

36 {
37 ATH_CHECK(m_idHelperSvc.retrieve());
38 ATH_CHECK(detStore()->retrieve(m_detMgr));
40
41 ATH_CHECK(m_visualizationTool.retrieve(EnableTool{!m_visualizationTool.empty()}));
42 ATH_CHECK(m_trackFitTool.retrieve());
43 ATH_CHECK(m_calibTool.retrieve());
44 ATH_CHECK(m_writeKey.initialize());
45 ATH_CHECK(m_summaryTool.retrieve());
46 ATH_CHECK(m_seedingTool.retrieve());
47 ATH_CHECK(m_extrapolationTool.retrieve(EnableTool{m_expressAtMsEntrance}));
49 ATH_CHECK(m_pseudoMeasuremntCreator.initialize(m_writeKey.key(), !m_writeKey.empty()));
50 ATH_CHECK(m_ctxProvider.initialize());
51 return StatusCode::SUCCESS;
52 }
const ServiceHandle< StoreGateSvc > & detStore() const
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the MuonDetectorManager.

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

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< 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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
virtual StatusCode sysInitialize() override
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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_calibTool

ToolHandle<ISpacePointCalibrator> MuonR4::MsTrackFindingAlg::m_calibTool {this, "Calibrator", ""}
private

Calibration tool to fill the track states.

Definition at line 127 of file MsTrackFindingAlg.h.

127{this, "Calibrator", ""};

◆ m_ctxProvider

ActsTrk::ContextUtility MuonR4::MsTrackFindingAlg::m_ctxProvider {this}
private

Utility to fetch the geometry, magnetic field and calibration context in the event.

Definition at line 137 of file MsTrackFindingAlg.h.

137{this};

◆ m_detMgr

const MuonGMR4::MuonDetectorManager* MuonR4::MsTrackFindingAlg::m_detMgr {nullptr}
private

Pointer to the MuonDetectorManager.

Definition at line 119 of file MsTrackFindingAlg.h.

119{nullptr};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_expressAtMsEntrance

Gaudi::Property<bool> MuonR4::MsTrackFindingAlg::m_expressAtMsEntrance {this, "expressAtMsEntrance", true}
private

Propagate the track at the MS entry and express its parameters.

Definition at line 133 of file MsTrackFindingAlg.h.

133{this, "expressAtMsEntrance", true};

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_extrapolationTool

ToolHandle<ActsTrk::IExtrapolationTool> MuonR4::MsTrackFindingAlg::m_extrapolationTool {this, "ExtrapolationTool" ,"" }
private

Track extrapolation tool.

Definition at line 129 of file MsTrackFindingAlg.h.

129{this, "ExtrapolationTool" ,"" };

◆ m_idHelperSvc

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

IdHelperSvc to decode the Identifiers.

Definition at line 117 of file MsTrackFindingAlg.h.

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

◆ m_ignoreFailedMsEntrance

Gaudi::Property<bool> MuonR4::MsTrackFindingAlg::m_ignoreFailedMsEntrance {this, "ignoreFailedExtpMsEntrance", true}
private

Ignore failed track extrapolations to the entrance.

Definition at line 135 of file MsTrackFindingAlg.h.

135{this, "ignoreFailedExtpMsEntrance", true};

◆ m_msTrkSeedKey

SG::WriteHandleKey<MsTrackSeedContainer> MuonR4::MsTrackFindingAlg::m_msTrkSeedKey {this, "MsTrkSeedKey", "MsTrackSeeds"}
private

Temporary container write handle to push the seeds to store gate for later efficiency analysis.

Definition at line 121 of file MsTrackFindingAlg.h.

121{this, "MsTrkSeedKey", "MsTrackSeeds"};

◆ m_pseudoMeasuremntCreator

ActsTrk::AuxiliaryMeasurementHandler MuonR4::MsTrackFindingAlg::m_pseudoMeasuremntCreator {this}
private

Utility to impose external constraints in the fit.

Definition at line 139 of file MsTrackFindingAlg.h.

139{this};

◆ m_seedingTool

ToolHandle<ITrackSeedingTool> MuonR4::MsTrackFindingAlg::m_seedingTool {this, "SeedingTool", ""}
private

The track seeding tool to construct the seed candidates and to estimate the initial parameters.

Definition at line 123 of file MsTrackFindingAlg.h.

123{this, "SeedingTool", ""};

◆ m_summaryTool

ToolHandle<MuonR4::ITrackSummaryTool> MuonR4::MsTrackFindingAlg::m_summaryTool {this, "SummaryTool" , ""}
private

Handle to the muon summary tool.

Definition at line 143 of file MsTrackFindingAlg.h.

143{this, "SummaryTool" , ""};

◆ m_trackFitTool

ToolHandle<ActsTrk::IFitterTool> MuonR4::MsTrackFindingAlg::m_trackFitTool {this, "FittingTool", ""}
private

Track fitting tool.

Definition at line 125 of file MsTrackFindingAlg.h.

125{this, "FittingTool", ""};

◆ m_trackingGeometrySvc

ServiceHandle<ActsTrk::ITrackingGeometrySvc> MuonR4::MsTrackFindingAlg::m_trackingGeometrySvc {this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"}
private

Service handle to the tracking geometry service.

Definition at line 131 of file MsTrackFindingAlg.h.

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

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_visualizationTool

ToolHandle<MuonValR4::ITrackVisualizationTool> MuonR4::MsTrackFindingAlg::m_visualizationTool {this, "VisualizationTool", ""}
private

Visualization tool to debug the track finding.

Definition at line 141 of file MsTrackFindingAlg.h.

141{this, "VisualizationTool", ""};

◆ m_writeKey

SG::WriteHandleKey<ActsTrk::TrackContainer> MuonR4::MsTrackFindingAlg::m_writeKey {this, "TrackWriteKey", "MuonMsTracks"}
private

Key to the output track container.

Definition at line 145 of file MsTrackFindingAlg.h.

145{this, "TrackWriteKey", "MuonMsTracks"};

The documentation for this class was generated from the following files: