 |
ATLAS Offline Software
|
#include <MSTrackFindingAlg.h>
|
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 |
|
|
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. More...
|
|
void | fitSeedCandidate (const Acts::GeometryContext &gCtx, const Acts::MagneticFieldContext &mCtx, const Acts::CalibrationContext &cCtx, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer) 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...
|
|
|
SG::ReadHandleKeyArray< xAOD::MuonSegmentContainer > | m_segmentKeys {this, "SegmentContainer", {} } |
| Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment container. More...
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
| IdHelperSvc to decode the Identifiers. More...
|
|
const MuonGMR4::MuonDetectorManager * | m_detMgr {nullptr} |
| Pointer to the MuonDetectorManager. More...
|
|
SG::WriteHandleKey< MsTrackSeedContainer > | m_msTrkSeedKey {this, "MsTrkSeedKey", "MsTrackSeeds"} |
| Temporary container write handle to push the seeds to store gate for later efficiency analysis. More...
|
|
ToolHandle< ISegmentSelectionTool > | m_segSelector {this, "SegmentSelectionTool" , "" } |
| Segment selection tool to pick the good quality segments. More...
|
|
ToolHandle< ActsTrk::IFitterTool > | m_trackFitTool {this, "FittingTool", ""} |
| Track fitting tool. More...
|
|
PublicToolHandle< ActsTrk::ITrackingGeometryTool > | m_trackingGeometryTool {this, "TrackingGeometryTool", ""} |
| Tracking geometry tool. More...
|
|
ToolHandle< IActsExtrapolationTool > | m_extrapolationTool {this, "ExtrapolationTool" ,"" } |
| Track extrapolation tool. More...
|
|
ToolHandle< MuonValR4::ITrackVisualizationTool > | m_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...
|
|
Gaudi::Property< std::string > | m_writePrefix {this, "WritePrefix", "MuonSA"} |
| Output track container prefix. More...
|
|
ActsTrk::MutableTrackContainerHandlesHelper | m_trackContKeys {this} |
|
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 |
|
Definition at line 36 of file MSTrackFindingAlg.h.
◆ StoreGateSvc_t
◆ ~MSTrackFindingAlg()
MuonR4::MSTrackFindingAlg::~MSTrackFindingAlg |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
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.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode MuonR4::MSTrackFindingAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Standard algorithm execution hook.
Definition at line 38 of file MSTrackFindingAlg.cxx.
39 ATH_MSG_VERBOSE(
"Run track finding in event "<<ctx.eventID().event_number());
45 allEventSegs.insert(allEventSegs.end(), partSegments->begin(), partSegments->end());
47 auto seedContainer =
findTrackSeeds(ctx, *allEventSegs.asDataVector());
51 const Acts::MagneticFieldContext mfContext =
m_extrapolationTool->getMagneticFieldContext(ctx);
55 Acts::VectorTrackContainer trackBackend;
56 Acts::VectorMultiTrajectory trackStateBackend;
58 std::move(trackBackend),
59 std::move(trackStateBackend)};
62 for (
const MsTrackSeed& seed :*seedContainer) {
67 ATH_CHECK(writeHandle.record(std::move(seedContainer)));
68 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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()
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.
◆ filterPassed()
◆ findTrackSeeds()
Iterates over the search tree and combines close-by segments to a track seed.
Seeds with the same segments as other seeds are deduplicated
ctx: The event's context to access StoreGate & Conditions
- Parameters
-
segments | Full segment container |
Definition at line 72 of file MSTrackFindingAlg.cxx.
75 MsTrackSeeder::Config seederCfg{};
79 MsTrackSeeder seeder{
name(), std::move(seederCfg)};
81 auto seedContainer = seeder.findTrackSeeds(ctx, segments);
◆ fitSeedCandidate()
The first segment on the seed is the inner most one
Create a surface which is shortly before the first measurement
Definition at line 88 of file MSTrackFindingAlg.cxx.
95 std::vector<const xAOD::UncalibratedMeasurement*> measurements{};
97 seed.detailedSegments().end(), 0,
99 return n + segment->measurements().size();
101 measurements.reserve(nMeas);
107 measurements.insert(measurements.end(),
108 std::make_move_iterator(segMeasuremnts.begin()),
109 std::make_move_iterator(segMeasuremnts.end()));
112 const Segment* innerSeg{
seed.detailedSegments().front()};
115 const Amg::Vector3D refPos = innerSeg->position() - propDistance * innerSeg->direction();
116 auto target = Acts::Surface::makeShared<Acts::PerigeeSurface>(refPos);
118 Acts::ActsVector<4> fourPos{};
119 fourPos.block<3,1>(Acts::ePos0, 0) = refPos;
121 auto initialPars = Acts::BoundTrackParameters::create(tgContext,
target, fourPos,
122 innerSeg->direction(),
125 if (!initialPars.ok()) {
129 auto fitTraject =
m_trackFitTool->fit(measurements, *initialPars, tgContext, mfContext,calContext,
target.get());
133 auto destProxy = outContainer.getTrack(outContainer.addTrack());
134 destProxy.copyFrom(fitTraject->getTrack(0),
true);
136 for (
const auto state : destProxy.trackStates()) {
137 if (!state.hasUncalibratedSourceLink()){
◆ 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 20 of file MSTrackFindingAlg.cxx.
33 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
◆ sysExecute()
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.
◆ sysInitialize()
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.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detMgr
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
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<IActsExtrapolationTool> MuonR4::MSTrackFindingAlg::m_extrapolationTool {this, "ExtrapolationTool" ,"" } |
|
private |
◆ m_idHelperSvc
◆ m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
Definition at line 69 of file MSTrackFindingAlg.h.
◆ m_seedHalfLength
Gaudi::Property<double> MuonR4::MSTrackFindingAlg::m_seedHalfLength {this, "SeedHalfLength", 50.*Gaudi::Units::cm} |
|
private |
◆ m_segmentKeys
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment container.
Definition at line 62 of file MSTrackFindingAlg.h.
◆ m_segSelector
ToolHandle<ISegmentSelectionTool> MuonR4::MSTrackFindingAlg::m_segSelector {this, "SegmentSelectionTool" , "" } |
|
private |
◆ m_trackContKeys
◆ m_trackFitTool
ToolHandle<ActsTrk::IFitterTool> MuonR4::MSTrackFindingAlg::m_trackFitTool {this, "FittingTool", ""} |
|
private |
◆ m_trackingGeometryTool
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_visualizationTool
◆ m_writePrefix
Gaudi::Property<std::string> MuonR4::MSTrackFindingAlg::m_writePrefix {this, "WritePrefix", "MuonSA"} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements(const Segment &seg, bool skipOutlier=true)
Helper function to extract the measurements from the segment.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Gaudi::Property< double > m_seedHalfLength
Maximum search window to search segments for.
Gaudi::Property< std::string > m_writePrefix
Output track container prefix.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the MuonDetectorManager.
StatusCode initialize(const std::string &prefix)
Sets up the handles.
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
ActsTrk::MutableTrackContainerHandlesHelper m_trackContKeys
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ToolHandle< ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteHandleKey< MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
Eigen::Matrix< double, 3, 1 > Vector3D
const Acts::Surface & muonSurface(const xAOD::UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
accumulate
Update flags based on parser line args.
#define ATH_MSG_WARNING(x)
DataVector adapter that acts like it holds const pointers.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
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.
SG::ReadHandleKeyArray< xAOD::MuonSegmentContainer > m_segmentKeys
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment contai...
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
ToolHandle< MuonValR4::ITrackVisualizationTool > m_visualizationTool
Visualization tool to debug the track finding.
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
void fitSeedCandidate(const Acts::GeometryContext &gCtx, const Acts::MagneticFieldContext &mCtx, const Acts::CalibrationContext &cCtx, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer) const