ATLAS Offline Software
Loading...
Searching...
No Matches
GaussianSumFitter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
13#ifndef TrkGaussianSumFitter_H
14#define TrkGaussianSumFitter_H
15
18//
21//
23//
31#include "TrkSurfaces/Surface.h"
33//
35#include "GaudiKernel/EventContext.h"
36#include "GaudiKernel/ToolHandle.h"
37//
38#include <atomic>
39
40namespace Trk {
41class FitQuality;
42class Track;
43
45 : virtual public ITrackFitter
46 , public AthAlgTool
47{
48public:
50 GaussianSumFitter(const std::string&, const std::string&, const IInterface*);
51
53 virtual ~GaussianSumFitter() = default;
54
56 virtual StatusCode initialize() override final;
57
71
75 virtual std::unique_ptr<Track> fit(
76 const EventContext& ctx,
79 const RunOutlierRemoval /*Not used*/,
80 const ParticleHypothesis /*Not used*/) const override final;
81
85 virtual std::unique_ptr<Track> fit(
86 const EventContext& ctx,
89 const RunOutlierRemoval /*Not used*/,
90 const ParticleHypothesis particleHypothesis /*Not used*/) const override final;
91
93 virtual std::unique_ptr<Track> fit(
94 const EventContext& ctx,
95 const Track&,
96 const RunOutlierRemoval /*Not used*/,
97 const ParticleHypothesis /*Not used*/) const override final;
98
100 virtual std::unique_ptr<Track> fit(
101 const EventContext& ctx,
102 const Track&,
104 const RunOutlierRemoval /*Not used*/,
105 const ParticleHypothesis /*Not used*/) const override final;
106
108 virtual std::unique_ptr<Track> fit(
109 const EventContext& ctx,
110 const Track&,
112 const RunOutlierRemoval /*Not used*/,
113 const ParticleHypothesis /*Not used*/) const override final;
114
116 virtual std::unique_ptr<Track> fit(
117 const EventContext& ctx,
118 const Track&,
119 const Track&,
120 const RunOutlierRemoval /*Not used*/,
121 const ParticleHypothesis /*Not used*/) const override final;
123 // Internally we can use a simple std::vector
125
126private:
129
132 GSFTrajectory& trajectory) const;
133
136 const EventContext& ctx,
138 const GSFTrajectory& smoothedTrajectory) const;
140 bool addCCOT(const EventContext& ctx,
142 GSFTrajectory& smoothedTrajectory) const;
144
147
149 template <typename T>
151 const EventContext& ctx,
153 const T& inputSet,
154 const TrackParameters& estimatedTrackParametersNearOrigin) const;
155
157 template <typename T>
159 const EventContext& ctx,
161 GSFTrajectory& forwardTrajectory,
162 const T* measurement,
163 const Surface& surface,
164 MultiComponentState& updatedState) const;
165
170 const EventContext& ctx, Trk::IMultiStateExtrapolator::Cache&,
171 GSFTrajectory& forwardTrajectory,
172 const CaloCluster_OnTrack* ccot = nullptr) const;
173
175 private:
177 this, "ToolForExtrapolation", "Trk::GsfExtrapolator/GsfExtrapolator", ""};
178
179 ToolHandle<IRIO_OnTrackCreator> m_rioOnTrackCreator{
180 this, "ToolForROTCreation", "",
181 "Tool for converting Raw Data to measurements"};
182
183 Gaudi::Property<bool> m_reintegrateOutliers{this, "ReintegrateOutliers", true,
184 "Reintegrate Outliers"};
185
186 Gaudi::Property<bool> m_refitOnMeasurementBase{
187 this, "RefitOnMeasurementBase", true, "Refit On Measurement Base"};
188
189 Gaudi::Property<bool> m_combineWithFitter{
190 this, "CombineStateWithFitter", false,
191 "Combine with forwards state during Smoothing"};
192
193 Gaudi::Property<bool> m_useMode{
194 this, "useMode", true,
195 "Collapse MultiComponent States using Mode rather than Mean"};
196
197 Gaudi::Property<bool> m_slimTransientMTSOS{
198 this, "slimTransientMTSOS", true,
199 "Slim the transient MTSOS . Keeping just the combined state and not all "
200 "components"};
201
202 Gaudi::Property<double> m_cutChiSquaredPerNumberDOF{
203 this, "StateChi2PerNDOFCut", 50., "Cut on Chi2 per NDOF"};
204
205 Gaudi::Property<unsigned int> m_maximumNumberOfComponents{
206 this, "MaximumNumberOfComponents", 12, "Maximum number of components"};
207
208 DoubleArrayProperty m_smootherCovFactors{
209 this,
210 "smootherStartCovFactors",
211 {15., 5., 15., 5., 15.},
212 "Inflation factors for the covariance at the start of smoothing [LocX, LocY, phi, "
213 "theta, q / p]"};
214
217};
218
219} // end Trk namespace
221
222#endif
@begin September 2023
Code for performing kalman filter update step on multi-component states for the gaussian-sum filter.
DataVector< const Trk::MultiComponentStateOnSurface > MultiComponentStateOnSurfaceDV
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Class to handle Cluster On Tracks (ROT) for CaloClusters, it inherits from the common MeasurementBase...
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition FitQuality.h:97
GSFTrajectory forwardFit(const EventContext &ctx, IMultiStateExtrapolator::Cache &cache, const T &inputSet, const TrackParameters &estimatedTrackParametersNearOrigin) const
Forward GSF fit.
std::unique_ptr< MultiComponentStateOnSurfaceDV > convertTrajToTrack(GSFTrajectory &trajectory) const
Helper to convert the GSFTrajectory to a Trk::Track.
ToolHandle< IMultiStateExtrapolator > m_extrapolator
Trk::ParticleHypothesis m_particleHypothesis
GSFTrajectory smootherFit(const EventContext &ctx, Trk::IMultiStateExtrapolator::Cache &, GSFTrajectory &forwardTrajectory, const CaloCluster_OnTrack *ccot=nullptr) const
Gsf smoothed trajectory.
GaussianSumFitter(const std::string &, const std::string &, const IInterface *)
Constructor with parameters to be passed to AlgTool.
bool addCCOT(const EventContext &ctx, const Trk::CaloCluster_OnTrack *ccot, GSFTrajectory &smoothedTrajectory) const
Methof to add the CaloCluster onto the track.
Gaudi::Property< bool > m_refitOnMeasurementBase
ToolHandle< IRIO_OnTrackCreator > m_rioOnTrackCreator
virtual StatusCode initialize() override final
AlgTool initialise method.
Gaudi::Property< unsigned int > m_maximumNumberOfComponents
Gaudi::Property< double > m_cutChiSquaredPerNumberDOF
GSFTsos makePerigee(const EventContext &ctx, Trk::IMultiStateExtrapolator::Cache &, const GSFTrajectory &smoothedTrajectory) const
Produces a perigee from a smoothed trajectory.
Gaudi::Property< bool > m_useMode
TrkParametersComparisonFunction m_trkParametersComparisonFunction
std::vector< GSFTsos > GSFTrajectory
DoubleArrayProperty m_smootherCovFactors
virtual std::unique_ptr< Track > fit(const EventContext &ctx, const PrepRawDataSet &, const TrackParameters &, const RunOutlierRemoval, const ParticleHypothesis) const override final
Fit a collection of 'PrepRawData' objects using the Gaussian Sum Filter.
Gaudi::Property< bool > m_slimTransientMTSOS
Gaudi::Property< bool > m_reintegrateOutliers
virtual ~GaussianSumFitter()=default
Virtual destructor.
bool stepForwardFit(const EventContext &ctx, IMultiStateExtrapolator::Cache &, GSFTrajectory &forwardTrajectory, const T *measurement, const Surface &surface, MultiComponentState &updatedState) const
Progress one step along the forward fit.
Gaudi::Property< bool > m_combineWithFitter
Provides the abstract interface for track fitting in the common ATLAS Tracking EDM.
Abstract Base Class for tracking surfaces.
STL class.
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
Definition FitterTypes.h:30
std::vector< ComponentParameters > MultiComponentState
ComparisonFunction< TrackParameters > TrkParametersComparisonFunction
bool RunOutlierRemoval
switch to toggle quality processing after fit
Definition FitterTypes.h:22
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
std::vector< const PrepRawData * > PrepRawDataSet
vector of clusters and drift circles
Definition FitterTypes.h:26
STL namespace.
#define private