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

#include <MsTrackFindingAlg.h>

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

Public Types

using OptBoundPars_t = Acts::Result< Acts::BoundTrackParameters >
 
using MeasVec_t = std::vector< const xAOD::UncalibratedMeasurement * >
 

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. More...
 
virtual StatusCode execute (const EventContext &ctx) const override final
 Standard algorithm execution hook. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::unique_ptr< MsTrackSeedContainerfindTrackSeeds (const EventContext &ctx, const xAOD::MuonSegmentContainer &segments) const
 Iterates over the search tree and combines close-by segments to a track seed. More...
 
bool fitSeedCandidate (const Acts::GeometryContext &gCtx, const Acts::MagneticFieldContext &mCtx, const Acts::CalibrationContext &cCtx, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer) const
 Attempts to fit the track seed candidate to a full track and returns whether the fit succeeded. More...
 
std::pair< OptBoundPars_t, MeasVec_tprepareFit (const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed) const
 Prepares the input by the fit by collecting the measurements on the segment &. More...
 
void visualizeObj (const Acts::GeometryContext &tgContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, const OptBoundPars_t &parsToExt) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::MuonSegmentContainerm_segmentKey {this, "SegmentContainer", "MuonSegmentsFromR4" }
 Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment container. More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 IdHelperSvc to decode the Identifiers. More...
 
const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
 Pointer to the MuonDetectorManager. More...
 
SG::WriteHandleKey< MsTrackSeedContainerm_msTrkSeedKey {this, "MsTrkSeedKey", "MsTrackSeeds"}
 Temporary container write handle to push the seeds to store gate for later efficiency analysis. More...
 
ToolHandle< ISegmentSelectionToolm_segSelector {this, "SegmentSelectionTool" , "" }
 Segment selection tool to pick the good quality segments. More...
 
ToolHandle< ActsTrk::IFitterToolm_trackFitTool {this, "FittingTool", ""}
 Track fitting tool. More...
 
ToolHandle< ISpacePointCalibratorm_calibTool {this, "Calibrator", ""}
 
PublicToolHandle< ActsTrk::ITrackingGeometryToolm_trackingGeometryTool {this, "TrackingGeometryTool", ""}
 Tracking geometry tool. More...
 
ToolHandle< ActsTrk::IExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool" ,"" }
 Track extrapolation tool. More...
 
ToolHandle< MuonValR4::ITrackVisualizationToolm_visualizationTool {this, "VisualizationTool", ""}
 Visualization tool to debug the track finding. More...
 
Gaudi::Property< double > m_seedHalfLength {this, "SeedHalfLength", 50.*Gaudi::Units::cm}
 Maximum search window to search segments for. More...
 
SG::WriteHandleKey< ActsTrk::TrackContainerm_writeKey {this, "TrackWriteKey", "MsTracks"}
 Key to the output track container. More...
 
Gaudi::Property< bool > m_drawEvent {this , "drawEvent", false }
 Dump the segments & the pre estimated track parameters. More...
 
std::unique_ptr< MsTrackSeederm_seeder {}
 Pointer to the actual seeder implementation. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 38 of file MsTrackFindingAlg.h.

Member Typedef Documentation

◆ MeasVec_t

Definition at line 50 of file MsTrackFindingAlg.h.

◆ OptBoundPars_t

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

Definition at line 49 of file MsTrackFindingAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~MsTrackFindingAlg()

MuonR4::MsTrackFindingAlg::~MsTrackFindingAlg ( )
virtualdefault

Member Function Documentation

◆ cardinality()

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

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

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode 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 57 of file MsTrackFindingAlg.cxx.

57  {
58  ATH_MSG_VERBOSE("Run track finding in event "<<ctx.eventID().event_number());
59 
60  const xAOD::MuonSegmentContainer* allEventSegs{nullptr};
61  ATH_CHECK(SG::get(allEventSegs, m_segmentKey, ctx));
62 
63  auto seedContainer = findTrackSeeds(ctx, *allEventSegs);
64 
65  const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
66  const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
67  const Acts::CalibrationContext calContext{ActsTrk::getCalibrationContext(ctx)};
68 
69 
70  Acts::VectorTrackContainer trackBackend{};
71  Acts::VectorMultiTrajectory trackStateBackend{};
72  ActsTrk::MutableTrackContainer cacheTrkContainer{std::move(trackBackend),
73  std::move(trackStateBackend)};
75  cacheTrkContainer.addColumn<std::size_t>("parentSeed");
76  unsigned seedIdx{0};
77  for (const MsTrackSeed& seed : *seedContainer) {
78  if (!fitSeedCandidate(tgContext, mfContext, calContext, seed,
79  cacheTrkContainer)) {
80  ++seedIdx;
81  continue;
82  }
83  auto lastTrack = cacheTrkContainer.getTrack(cacheTrkContainer.size() -1);
84  lastTrack.component<std::size_t, Acts::hashString("parentSeed")>() = seedIdx;
85  ++seedIdx;
86  }
87  SG::WriteHandle writeHandleSeed{m_msTrkSeedKey, ctx};
88  ATH_CHECK(writeHandleSeed.record(std::move(seedContainer)));
89 
90  // Constant declination
91  Acts::ConstVectorTrackContainer ctrackBackend{std::move(cacheTrkContainer.container())};
92  Acts::ConstVectorMultiTrajectory ctrackStateBackend{std::move(cacheTrkContainer.trackStateContainer())};
93  auto ctc = std::make_unique<ActsTrk::TrackContainer>(std::move(ctrackBackend),
94  std::move(ctrackStateBackend));
95 
96  SG::WriteHandle writeHandle{m_writeKey, ctx};
97  ATH_CHECK(writeHandle.record(std::move(ctc)));
98  return StatusCode::SUCCESS;
99  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

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

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

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

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

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

◆ findTrackSeeds()

std::unique_ptr< MsTrackSeedContainer > MuonR4::MsTrackFindingAlg::findTrackSeeds ( const EventContext &  ctx,
const xAOD::MuonSegmentContainer segments 
) const
private

Iterates over the search tree and combines close-by segments to a track seed.

Seeds with the same segments as other seeds are deduplicated

Parameters
ctxThe event's context to access StoreGate & Conditions
segmentsFull segment container

Definition at line 102 of file MsTrackFindingAlg.cxx.

103  {
104 
105  auto seedContainer = m_seeder->findTrackSeeds(ctx, m_trackingGeometryTool->getGeometryContext(ctx), segments);
106 
107  if (!m_visualizationTool.empty()) {
108  m_visualizationTool->displaySeeds(ctx, *m_seeder, segments, *seedContainer, "all seeds");
109  }
110  return seedContainer;
111  }

◆ fitSeedCandidate()

bool MuonR4::MsTrackFindingAlg::fitSeedCandidate ( const Acts::GeometryContext &  gCtx,
const Acts::MagneticFieldContext &  mCtx,
const Acts::CalibrationContext &  cCtx,
const MsTrackSeed seed,
ActsTrk::MutableTrackContainer outContainer 
) const
private

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

Parameters
gCtxGeometry context to access the alignment of the surfaces
mCtxcMagnetic field context to access the field map during the fit
cCtxCalibration 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

Definition at line 216 of file MsTrackFindingAlg.cxx.

220  {
221 
222  ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Attempt to fit a new track seed \n"<<seed);
223 
224  const auto [initialPars, measurements] = prepareFit(tgContext, mfContext, calContext, seed);
225 
226  if (!initialPars.ok()) {
227  ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - Failed to construct valid parameters for seed \n"<<seed);
228  visualizeObj(tgContext, calContext, seed, initialPars);
229  return false;
230  }
231  auto fitTraject = m_trackFitTool->fit(measurements, *initialPars,
232  tgContext, mfContext, calContext,
233  &(*initialPars).referenceSurface());
234  if (!fitTraject || fitTraject->size() == 0) {
235  ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Fit failed ");
236  visualizeObj(tgContext, calContext, seed, initialPars);
237  return false;
238  }
239  outContainer.ensureDynamicColumns(*fitTraject);
240  auto destProxy = outContainer.getTrack(outContainer.addTrack());
241  destProxy.copyFrom(fitTraject->getTrack(0));
242  ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Good track fit...");
243  for (const auto state : destProxy.trackStates()) {
244  if (!state.hasUncalibratedSourceLink()){
245  continue;
246  }
247  auto meas = ActsTrk::detail::xAODUncalibMeasCalibrator::unpack(state.getUncalibratedSourceLink());
248  ATH_MSG_DEBUG("Accepted measurement "<<m_idHelperSvc->toString(xAOD::identify(meas))
249  <<", "<<xAOD::muonSurface(meas).geometryId());
250  }
251  return true;
252  }

◆ 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 30 of file MsTrackFindingAlg.cxx.

30  {
32  ATH_CHECK(m_idHelperSvc.retrieve());
34  ATH_CHECK(m_segSelector.retrieve());
36 
37  ATH_CHECK(m_visualizationTool.retrieve(EnableTool{!m_visualizationTool.empty()}));
38 
40  ATH_CHECK(m_extrapolationTool.retrieve());
41  ATH_CHECK(m_trackFitTool.retrieve());
42  ATH_CHECK(m_calibTool.retrieve());
44 
45 
46  MsTrackSeeder::Config seederCfg{};
47  seederCfg.seedHalfLength = m_seedHalfLength;
48  seederCfg.selector = m_segSelector.get();
49  seederCfg.detMgr = m_detMgr;
50 
51  m_seeder = std::make_unique<MsTrackSeeder>(name(), std::move(seederCfg));
52  return StatusCode::SUCCESS;
53  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

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

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

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

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ prepareFit()

std::pair< MsTrackFindingAlg::OptBoundPars_t, MsTrackFindingAlg::MeasVec_t > MuonR4::MsTrackFindingAlg::prepareFit ( const Acts::GeometryContext &  tgContext,
const Acts::MagneticFieldContext &  mfContext,
const Acts::CalibrationContext &  calContext,
const MsTrackSeed seed 
) const
private

Prepares the input by the fit by collecting the measurements on the segment &.

Parameters
gCtxGeometry context to access the alignment of the surfaces
mCtxcMagnetic field context to access the field map during the fit
cCtxCalibration context to access the calibration constants from Store gate during the track state filling
seedThe seed of interest to fit

Fetch the measurements from the segment & find the first segment which has phi hits

Ensure that the drift signs from the fit are stamped onto the Uncalibrated measurements

The middle or outer segment provide the phi information. Not so easy becasue we want to Take the y0 & precision direction from the inner segment but the phi & x0 from a straight line extrapolation onto the plane

Create a surface which is shortly before the first measurement

Definition at line 114 of file MsTrackFindingAlg.cxx.

117  {
118  const EventContext& ctx{*calContext.get<const EventContext*>()};
119  MeasVec_t measurements{};
120  measurements.reserve(100);
122  const xAOD::MuonSegment* refSeg{nullptr};
123  for (const xAOD::MuonSegment* segment : seed.segments()) {
125  m_calibTool->stampSignsOnMeasurements(*segment);
126  MeasVec_t segMeasurements = collectMeasurements(*segment, /*skipOutlier:*/ true);
127  if (msgLvl(MSG::VERBOSE)) {
128  std::stringstream sstr{};
129  for (const xAOD::UncalibratedMeasurement* m : segMeasurements) {
130  const Acts::Surface& surf{xAOD::muonSurface(m)};
131  sstr<<" *** "<<m_idHelperSvc->toString(xAOD::identify(m))
132  <<", "<<m->numDimensions()<<", "
133  <<", "<<surf.geometryId()<<" @ "<<Amg::toString(surf.transform(tgContext))<<std::endl;
134  }
135  ATH_MSG_VERBOSE("Fetch measurements from segment: "<<Amg::toString(segment->position())
136  <<", direction: "<<Amg::toString(segment->direction())<<"\n"<<sstr.str());
137  }
138  measurements.insert(measurements.end(),
139  std::make_move_iterator(segMeasurements.begin()),
140  std::make_move_iterator(segMeasurements.end()));
141 
142  if (!refSeg && m_segSelector->passSeedingQuality(ctx, *detailedSegment(*segment))) {
143  refSeg = segment;
144  }
145  }
146  Amg::Vector3D seedPos{refSeg->position()};
147  Amg::Vector3D seedDir{refSeg->direction()};
151  if (false && refSeg != seed.segments().front()) {
152  const MuonGMR4::SpectrometerSector* innerPlane = m_seeder->envelope(*seed.segments().front());
153  const Acts::PlaneSurface& surf = innerPlane->surface();
154  const Amg::Transform3D toInnerPlane = surf.transform(tgContext).inverse();
155  const Amg::Vector3D locSeedPos = toInnerPlane * seedPos;
156  const Amg::Vector3D locSeedDir = toInnerPlane.linear() * seedDir;
157 
158  auto seedOnInner = Acts::PlanarHelper::intersectPlane(locSeedPos, locSeedDir,
159  Amg::Vector3D::UnitZ(), 0.);
160 
161  using enum SegmentFit::ParamDefs;
162  SegmentFit::Parameters innerPars = SegmentFit::localSegmentPars(*seed.segments().front());
163  innerPars[Acts::toUnderlying(x0)] = seedOnInner.position().x();
164  const Amg::Vector3D innerSegDir =
165  Acts::makeDirectionFromPhiTheta(innerPars[Acts::toUnderlying(phi)],
166  innerPars[Acts::toUnderlying(theta)]);
167  const Amg::Vector3D combSegDir =
168  Acts::makeDirectionFromAxisTangents(houghTanAlpha(locSeedDir),
169  houghTanBeta(innerSegDir));
170  seedPos = surf.transform(tgContext) * Amg::Vector3D{innerPars[Acts::toUnderlying(x0)],
171  innerPars[Acts::toUnderlying(y0)], 0};
172  seedDir = surf.transform(tgContext).linear() * combSegDir;
173  }
175  const double propDistance = (xAOD::muonSurface(measurements[0]).center(tgContext) -
176  seedPos).dot(seedDir) - 1.*Gaudi::Units::cm;
177  const Amg::Vector3D refPos = seedPos + propDistance * seedDir;
178  auto target = Acts::Surface::makeShared<Acts::PerigeeSurface>(refPos);
179 
180  auto fourPos = ActsTrk::convertPosToActs(refPos, refPos.mag() / Gaudi::Units::c_light);
181  const double qOverP = 1./ m_seeder->estimateQtimesP(*tgContext.get<const ActsTrk::GeometryContext*>(),
182  *mfContext.get<const AtlasFieldCacheCondObj*>(), seed);
183  auto initialPars = Acts::BoundTrackParameters::create(tgContext, target, fourPos,
184  seedDir,
186  Acts::BoundSquareMatrix::Identity(),
188  return std::make_pair(std::move(initialPars), std::move(measurements));
189 
190  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

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

◆ sysExecute()

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

Execute an algorithm.

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

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

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

◆ sysInitialize()

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

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

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

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ visualizeObj()

void MuonR4::MsTrackFindingAlg::visualizeObj ( const Acts::GeometryContext &  tgContext,
const Acts::CalibrationContext &  calContext,
const MsTrackSeed seed,
const OptBoundPars_t parsToExt 
) const
private

Definition at line 191 of file MsTrackFindingAlg.cxx.

194  {
195  if (!m_drawEvent) {
196  return;
197  }
198  const EventContext& ctx {*calContext.get<const EventContext*>()};
199  const ActsTrk::GeometryContext& gctx{*tgContext.get<const ActsTrk::GeometryContext*>()};
200  Acts::ObjVisualization3D visualHelper{};
201  if (parsToExt.ok()) {
202  MuonValR4::drawPropagation(m_extrapolationTool->propagationSteps(ctx, *parsToExt).first,
203  visualHelper);
204  }
205  std::string saveStr = std::format("MsTrackFinding_{:}", ctx.eventID().event_number());
206  for (const xAOD::MuonSegment* seg : seed.segments()) {
207  MuonValR4::drawSegmentMeasurements(gctx,* seg, visualHelper);
208  MuonValR4::drawSegmentLine(gctx,*seg, visualHelper);
209  saveStr += std::format("_{:}_{:}", printID(*seg), seg->index());
210  }
211  saveStr+=".obj";
212  visualHelper.write(saveStr);
213  }

Member Data Documentation

◆ m_calibTool

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

Definition at line 103 of file MsTrackFindingAlg.h.

◆ m_detMgr

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

Pointer to the MuonDetectorManager.

Definition at line 95 of file MsTrackFindingAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_drawEvent

Gaudi::Property<bool> MuonR4::MsTrackFindingAlg::m_drawEvent {this , "drawEvent", false }
private

Dump the segments & the pre estimated track parameters.

Definition at line 115 of file MsTrackFindingAlg.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_extrapolationTool

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

Track extrapolation tool.

Definition at line 107 of file MsTrackFindingAlg.h.

◆ m_idHelperSvc

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

IdHelperSvc to decode the Identifiers.

Definition at line 93 of file MsTrackFindingAlg.h.

◆ 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 97 of file MsTrackFindingAlg.h.

◆ m_seeder

std::unique_ptr<MsTrackSeeder> MuonR4::MsTrackFindingAlg::m_seeder {}
private

Pointer to the actual seeder implementation.

Definition at line 118 of file MsTrackFindingAlg.h.

◆ m_seedHalfLength

Gaudi::Property<double> MuonR4::MsTrackFindingAlg::m_seedHalfLength {this, "SeedHalfLength", 50.*Gaudi::Units::cm}
private

Maximum search window to search segments for.

Definition at line 111 of file MsTrackFindingAlg.h.

◆ m_segmentKey

SG::ReadHandleKey<xAOD::MuonSegmentContainer> MuonR4::MsTrackFindingAlg::m_segmentKey {this, "SegmentContainer", "MuonSegmentsFromR4" }
private

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

Definition at line 91 of file MsTrackFindingAlg.h.

◆ m_segSelector

ToolHandle<ISegmentSelectionTool> MuonR4::MsTrackFindingAlg::m_segSelector {this, "SegmentSelectionTool" , "" }
private

Segment selection tool to pick the good quality segments.

Definition at line 99 of file MsTrackFindingAlg.h.

◆ m_trackFitTool

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

Track fitting tool.

Definition at line 101 of file MsTrackFindingAlg.h.

◆ m_trackingGeometryTool

PublicToolHandle<ActsTrk::ITrackingGeometryTool> MuonR4::MsTrackFindingAlg::m_trackingGeometryTool {this, "TrackingGeometryTool", ""}
private

Tracking geometry tool.

Definition at line 105 of file MsTrackFindingAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_visualizationTool

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

Visualization tool to debug the track finding.

Definition at line 109 of file MsTrackFindingAlg.h.

◆ m_writeKey

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

Key to the output track container.

Definition at line 113 of file MsTrackFindingAlg.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonR4::collectMeasurements
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements(const Segment &seg, bool skipOutlier=true)
Helper function to extract the measurements from the segment.
Definition: TrackingHelpers.cxx:33
MuonR4::printID
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
Definition: TrackingHelpers.cxx:15
ActsTrk::getCalibrationContext
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
Definition: CalibrationContext.h:15
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:95
MuonGMR4::SpectrometerSector
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
Definition: SpectrometerSector.h:40
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
vtune_athena.format
format
Definition: vtune_athena.py:14
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
MuonR4::MsTrackFindingAlg::m_msTrkSeedKey
SG::WriteHandleKey< MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
Definition: MsTrackFindingAlg.h:97
MuonR4::MsTrackFindingAlg::m_trackFitTool
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
Definition: MsTrackFindingAlg.h:101
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
ActsTrk::energyToActs
constexpr double energyToActs(const double athenaE)
Converts an energy scalar from Athena to Acts units.
Definition: UnitConverters.h:21
ActsTrk::MutableTrackContainer
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Definition: TrackContainer.h:27
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
MuonR4::SegmentFit::ParamDefs
SeedingAux::FitParIndex ParamDefs
Use the same parameter indices as used by the CompSpacePointAuxiliaries.
Definition: MuonHoughDefs.h:38
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ActsTrk::convertPosToActs
Acts::Vector4 convertPosToActs(const Amg::Vector3D &athenaPos, const double athenaTime=0.)
Converts a position vector & time from Athena units into Acts units.
Definition: UnitConverters.h:74
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonValR4::drawSegmentLine
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.
Definition: ObjVisualizationHelpers.cxx:46
ActsTrk::detail::xAODUncalibMeasCalibrator::unpack
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
Definition: xAODUncalibMeasCalibrator.cxx:12
MuonR4::MsTrackFindingAlg::MeasVec_t
std::vector< const xAOD::UncalibratedMeasurement * > MeasVec_t
Definition: MsTrackFindingAlg.h:50
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:22
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
MuonR4::MsTrackFindingAlg::visualizeObj
void visualizeObj(const Acts::GeometryContext &tgContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, const OptBoundPars_t &parsToExt) const
Definition: MsTrackFindingAlg.cxx:191
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonR4::MsTrackFindingAlg::m_trackingGeometryTool
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
Definition: MsTrackFindingAlg.h:105
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
MuonR4::MsTrackFindingAlg::fitSeedCandidate
bool fitSeedCandidate(const Acts::GeometryContext &gCtx, const Acts::MagneticFieldContext &mCtx, const Acts::CalibrationContext &cCtx, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer) const
Attempts to fit the track seed candidate to a full track and returns whether the fit succeeded.
Definition: MsTrackFindingAlg.cxx:216
MuonR4::houghTanBeta
double houghTanBeta(const Amg::Vector3D &v)
Returns the hough tanBeta [y] / [z].
Definition: SegmentFitterEventData.cxx:26
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::MsTrackFindingAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the MuonDetectorManager.
Definition: MsTrackFindingAlg.h:95
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
MuonValR4::drawPropagation
void drawPropagation(const std::vector< Acts::detail::Step > &steps, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewLine)
Definition: ObjVisualizationHelpers.cxx:29
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonR4::SegmentFit::Parameters
Acts::Experimental::CompositeSpacePointLineFitter::ParamVec_t Parameters
Definition: MuonHoughDefs.h:46
MuonR4::MsTrackFindingAlg::m_segmentKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment contai...
Definition: MsTrackFindingAlg.h:91
MuonGMR4::SpectrometerSector::surface
const Acts::PlaneSurface & surface() const
Returns the associated surface.
Definition: SpectrometerSector.cxx:72
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonR4::MsTrackFindingAlg::findTrackSeeds
std::unique_ptr< MsTrackSeedContainer > findTrackSeeds(const EventContext &ctx, const xAOD::MuonSegmentContainer &segments) const
Iterates over the search tree and combines close-by segments to a track seed.
Definition: MsTrackFindingAlg.cxx:102
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
ActsTrk::GeometryContext
Definition: GeometryContext.h:28
MuonR4::MsTrackFindingAlg::m_seedHalfLength
Gaudi::Property< double > m_seedHalfLength
Maximum search window to search segments for.
Definition: MsTrackFindingAlg.h:111
MuonR4::MsTrackFindingAlg::m_calibTool
ToolHandle< ISpacePointCalibrator > m_calibTool
Definition: MsTrackFindingAlg.h:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MuonR4::MsTrackFindingAlg::m_writeKey
SG::WriteHandleKey< ActsTrk::TrackContainer > m_writeKey
Key to the output track container.
Definition: MsTrackFindingAlg.h:113
MuonR4::MsTrackFindingAlg::prepareFit
std::pair< OptBoundPars_t, MeasVec_t > prepareFit(const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed) const
Prepares the input by the fit by collecting the measurements on the segment &.
Definition: MsTrackFindingAlg.cxx:114
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
MuonR4::MsTrackFindingAlg::m_drawEvent
Gaudi::Property< bool > m_drawEvent
Dump the segments & the pre estimated track parameters.
Definition: MsTrackFindingAlg.h:115
MuonR4::MsTrackFindingAlg::m_extrapolationTool
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
Definition: MsTrackFindingAlg.h:107
MuonValR4::drawSegmentMeasurements
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.
Definition: ObjVisualizationHelpers.cxx:81
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:73
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
xAOD::muonSurface
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:68
MuonR4::MsTrackFindingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
Definition: MsTrackFindingAlg.h:93
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
MuonR4::MsTrackFindingAlg::m_visualizationTool
ToolHandle< MuonValR4::ITrackVisualizationTool > m_visualizationTool
Visualization tool to debug the track finding.
Definition: MsTrackFindingAlg.h:109
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
copySelective.target
string target
Definition: copySelective.py:36
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
MuonR4::SegmentFit::localSegmentPars
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
Definition: SegmentFitterEventData.cxx:42
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
MuonR4::houghTanAlpha
double houghTanAlpha(const Amg::Vector3D &v)
: Returns the hough tanAlpha [x] / [z]
Definition: SegmentFitterEventData.cxx:30
MuonR4::MsTrackFindingAlg::m_seeder
std::unique_ptr< MsTrackSeeder > m_seeder
Pointer to the actual seeder implementation.
Definition: MsTrackFindingAlg.h:118
MuonR4::MsTrackFindingAlg::m_segSelector
ToolHandle< ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
Definition: MsTrackFindingAlg.h:99
fitman.k
k
Definition: fitman.py:528
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
ServiceHandle< ICondSvc >