4#ifndef MUONCOMBINEDALGSR4_COMBINEDFITALG_H
5#define MUONCOMBINEDALGSR4_COMBINEDFITALG_H
33 using AthReentrantAlgorithm::AthReentrantAlgorithm;
35 virtual StatusCode
initialize()
override final;
36 virtual StatusCode
execute(
const EventContext& ctx)
const override final;
44 std::vector<const MuonR4::MuonTag*>,
55 Acts::GeometryContext
tgContext{Acts::GeometryContext::dangerouslyDefaultConstruct()};
62 Acts::VectorMultiTrajectory{}};
65 Acts::VectorMultiTrajectory{}};
71 StatusCode
prepareDataShip(
const EventContext& ctx, DataShip& ship)
const;
76 DataShip& ship)
const;
79 DataShip& ship)
const;
103 ToolHandle<ActsTrk::ITrackToTrackParticleCnvTool>
m_cnvTool{
this,
"TrackToTrackParticleCnvTool",
""};
118 "MuonCmbTrackParticles"};
121 "MuonMeTrackParticles"};
Handle class for reading from StoreGate.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for recording to StoreGate.
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< MuonR4::MuonTagContainer > m_outTagKey
Write key of the created combined tags.
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_MeParticleKey
Write key of the created ME track particles.
SG::WriteHandleKey< ActsTrk::TrackContainer > m_cmbTrackKey
Write key to store the fitted Acts combined tracks.
SG::ReadHandleKey< MuonR4::MuonTagContainer > m_stacoKey
Use STACO as input to the MuidCo chain as the track pair is already done upstream.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_cmbTrackLinkKey
Element link to the produced extrapolated Acts track.
SG::WriteHandleKey< ActsTrk::TrackContainer > m_meTrackKey
Write key to store the fitted Acts ME tracks.
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_CmbParticleKey
Write key of the created combined track particles.
void buildMETrack(MuonR4::MuonTag &combinedTag, DataShip &ship) const
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
Gaudi::Property< bool > m_fitMEtrack
Toggle whether the ME track is formed after the combined fit.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_meTrackLinkKey
StatusCode prepareDataShip(const EventContext &ctx, DataShip &ship) const
Load the input containers from store gate and setup the write Handles for the output.
StatusCode writeTracksToStoreGate(const EventContext &ctx, const SG::WriteHandleKey< ActsTrk::TrackContainer > &key, const SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > &decorKey, xAOD::TrackParticleContainer &particleContainer, ActsTrk::MutableTrackContainer &&fittedTracks) const
Convert the ActsTracks to track particles and write the Acts track container to store gate.
ActsTrk::ContextUtility m_ctxProvider
Context provider for geometry, magnetic field and calibration contexts.
virtual StatusCode initialize() override final
ToolHandle< ActsTrk::ITrackToTrackParticleCnvTool > m_cnvTool
Conversion tool from Acts -> xAOD:TrackParticle.
std::vector< Acts::SourceLink > extractMeasurements(const MuonR4::MuonTag &muonTag) const
Retrieve the ID & Muon measurements from the associated ID & MS track particles.
SG::ReadHandleKey< xAOD::UncalibratedMeasurementContainer > m_beamSpotKey
Data dependency on the beam spot.
virtual StatusCode execute(const EventContext &ctx) const override final
MuonR4::MuonTag * fitMuonTag(const MuonR4::MuonTag &tag, DataShip &ship) const
Attempt to fit the muon tag to a combined track particle.
Baseline EDM object to gather all relevant information about a reconstructed muon candidate which can...
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
TrackParticleAuxContainer_v5 TrackParticleAuxContainer
Definition of the current TrackParticle auxiliary container.
Helper struct to ship the input output data during the combined track fit.
xAOD::FillContainer< MuonR4::MuonTagContainer, void * > outputTags
The output combined tag collection.
Acts::MagneticFieldContext mfContext
The magnetic field context.
ActsTrk::MutableTrackContainer actsMeTracks
The ME track container.
std::map< const xAOD::TrackParticle *, std::vector< const MuonR4::MuonTag * >, MuonR4::ParticleSorter > preMatchedTags
The prematched combined muon tags.
xAOD::FillContainer< xAOD::TrackParticleContainer, xAOD::TrackParticleAuxContainer > cmbParticles
The output combined particle container.
Acts::GeometryContext tgContext
The geometry context to align the surfaces during the fit.
Acts::CalibrationContext calContext
The calibration context.
ActsTrk::MutableTrackContainer actsCmbTracks
The combined acts track container.
xAOD::FillContainer< xAOD::TrackParticleContainer, xAOD::TrackParticleAuxContainer > meParticles
The output ME particle container.
Auxiliary class to sort the particles by momentum First sorting is by pt, then eta and finally by phi...