ATLAS Offline Software
AdaptiveVertexFitter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRKADAPTIVEFITTERTOOLS_ADAPTIVEVERTEXFITTER_H
6 #define TRKADAPTIVEFITTERTOOLS_ADAPTIVEVERTEXFITTER_H
7 
9 #include "GaudiKernel/ToolHandle.h"
11 
12 // xAOD includes
15 #include "xAODTracking/Vertex.h"
16 
24 
25 namespace Trk {
26 class Track;
27 class TrackParticleBase;
28 class VxTrackAtVertex;
29 
86 class AdaptiveVertexFitter : public extends<AthAlgTool, IVertexFitter>
87 {
88 public:
89  // The following 'using' can be removed when IVertexFitter::fit has been fully
90  // migrated to the one with the EventContext
92 
93  virtual StatusCode initialize() override;
94 
95  // same kind error as FullVertexFitter code to be similar in error response -
96  // NOT IMPLEMENTED YET enum FitError
97  // {FITOK,MATINV,NEGTRCHI2,MAXCHI2,MAXTRCHI2,NOTRKS,NOFIT};
98 
102  AdaptiveVertexFitter(const std::string& t, const std::string& n, const IInterface* p);
103 
109 
113  virtual xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
114  const std::vector<const xAOD::NeutralParticle*>& vectorNeut,
115  const Amg::Vector3D& startingPoint) const override;
116  virtual xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
117  const Amg::Vector3D& startingPoint) const override
118  {
119  return fit(vectorTrk, std::vector<const xAOD::NeutralParticle*>(), startingPoint);
120  };
121 
126  virtual xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
127  const std::vector<const xAOD::NeutralParticle*>& vectorNeut,
128  const xAOD::Vertex& constraint) const override;
129  virtual xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
130  const xAOD::Vertex& constraint) const override
131  {
132  return fit(vectorTrk, std::vector<const xAOD::NeutralParticle*>(), constraint);
133  };
134 
138  virtual xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
139  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList,
140  const Amg::Vector3D& startingPoint) const override;
141  virtual xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
142  const Amg::Vector3D& startingPoint) const override;
143 
147  virtual xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
148  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList,
149  const xAOD::Vertex& constraint) const override;
150  virtual xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
151  const xAOD::Vertex& constraint) const override;
152 
157  xAOD::Vertex* fit(const std::vector<const Trk::Track*>& Vectortrk,
158  const xAOD::Vertex& constraint,
159  const Amg::Vector3D& startingPoint) const;
160 
165  xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
166  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList,
167  const xAOD::Vertex& constraint,
168  const Amg::Vector3D& startingPoint) const;
169  xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
170  const xAOD::Vertex& constraint,
171  const Amg::Vector3D& startingPoint) const;
172 
177  xAOD::Vertex* fit(
178  const std::vector<const Trk::TrackParameters*>& perigeeList,
179  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList) const override;
180  xAOD::Vertex* fit(const std::vector<const Trk::TrackParameters*>& perigeeList) const override;
181 
186  xAOD::Vertex* fit(const std::vector<const Trk::TrackParticleBase*>& perigeeList) const;
187 
188 private:
193  xAOD::Vertex* _fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
194  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList =
195  std::vector<const Trk::NeutralParameters*>(),
196  const xAOD::Vertex& constraint = xAOD::Vertex(),
197  const Amg::Vector3D& startingPoint = Amg::Vector3D(),
198  bool IsConstraint = false,
199  bool IsStartingPoint = false) const;
200  xAOD::Vertex* _fit(const std::vector<const Trk::TrackParameters*>& perigeeList,
201  const xAOD::Vertex& constraint = xAOD::Vertex(),
202  const Amg::Vector3D& startingPoint = Amg::Vector3D(),
203  bool IsConstraint = false,
204  bool IsStartingPoint = false) const;
205 
211  xAOD::Vertex* _fit(const std::vector<const Trk::Track*>& VectorTrk,
212  const xAOD::Vertex& constraint = xAOD::Vertex(),
213  const Amg::Vector3D& startingPoint = Amg::Vector3D(),
214  bool IsConstraint = false,
215  bool IsStartingPoint = false) const;
216 
223  xAOD::Vertex* dothefit(const xAOD::Vertex& ConstraintVertex,
224  const Amg::Vector3D& SeedVertex,
225  std::vector<VxTrackAtVertex>& myLinTracks) const;
226 
227  ToolHandle<Trk::IVertexSeedFinder> m_SeedFinder{
228  this,
229  "SeedFinder",
230  "Trk::CrossDistancesSeedFinder"
231  };
232  ToolHandle<Trk::IVertexLinearizedTrackFactory> m_LinearizedTrackFactory{
233  this,
234  "LinearizedTrackFactory",
235  "Trk::FullLinearizedTrackFactory"
236  };
237  ToolHandle<Trk::IVertexTrackCompatibilityEstimator>
239  "TrackCompatibilityEstimato",
240  "Trk::Chi2TrackCompatibilityEstimator" };
241  ToolHandle<Trk::IImpactPoint3dEstimator> m_ImpactPoint3dEstimator{
242  this,
243  "ImpactPoint3dEstimator",
244  "Trk::ImpactPoint3dEstimator/ImpactPoint3dEstimator"
245  };
246  ToolHandle<Trk::IVertexUpdator> m_VertexUpdator{ this,
247  "VertexUpdator",
248  "Trk::KalmanVertexUpdator" };
249  ToolHandle<Trk::IVertexSmoother> m_VertexSmoother{
250  this,
251  "VertexSmoother",
252  "Trk::DummyVertexSmoother"
253  };
254  ToolHandle<Trk::IVertexAnnealingMaker> m_AnnealingMaker{
255  this,
256  "AnnealingMaker",
257  "Trk::DetAnnealingMaker"
258  };
259 
264  long int m_maxIterations;
265 
272 
280 
288 
295 };
296 }
297 
298 #endif
IVertexSeedFinder.h
Trk::AdaptiveVertexFitter::m_ImpactPoint3dEstimator
ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator
Definition: AdaptiveVertexFitter.h:241
Trk::IVertexFitter::fit
virtual std::unique_ptr< xAOD::Vertex > fit(const EventContext &ctx, const std::vector< const xAOD::TrackParticle * > &vectorTrk, const Amg::Vector3D &startingPoint) const
Interface for xAOD::TrackParticle with starting point Event Context aware interface.
Definition: IVertexFitter.h:77
IVertexSmoother.h
Trk::AdaptiveVertexFitter::m_maxIterations
long int m_maxIterations
Number of maximum iterations.
Definition: AdaptiveVertexFitter.h:264
Trk::AdaptiveVertexFitter::m_VertexUpdator
ToolHandle< Trk::IVertexUpdator > m_VertexUpdator
Definition: AdaptiveVertexFitter.h:246
IImpactPoint3dEstimator.h
Trk::AdaptiveVertexFitter::fit
xAOD::Vertex * fit(const std::vector< const Trk::TrackParticleBase * > &perigeeList) const
fit providing vector of TrackParticleBase
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::AdaptiveVertexFitter::initialize
virtual StatusCode initialize() override
Definition: AdaptiveVertexFitter.cxx:49
Trk::AdaptiveVertexFitter::m_onlyzseed
bool m_onlyzseed
Variable is true if seeding has to be performed only on the z direction.
Definition: AdaptiveVertexFitter.h:287
Trk::AdaptiveVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const Amg::Vector3D &startingPoint) const override
Definition: AdaptiveVertexFitter.h:116
Trk::AdaptiveVertexFitter::m_SeedFinder
ToolHandle< Trk::IVertexSeedFinder > m_SeedFinder
Definition: AdaptiveVertexFitter.h:227
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::AdaptiveVertexFitter::~AdaptiveVertexFitter
virtual ~AdaptiveVertexFitter()
destructor
Trk::AdaptiveVertexFitter::dothefit
xAOD::Vertex * dothefit(const xAOD::Vertex &ConstraintVertex, const Amg::Vector3D &SeedVertex, std::vector< VxTrackAtVertex > &myLinTracks) const
Internal method, called by the two _fit internal functions, in order to perform the fit,...
Definition: AdaptiveVertexFitter.cxx:321
Trk::AdaptiveVertexFitter::m_VertexSmoother
ToolHandle< Trk::IVertexSmoother > m_VertexSmoother
Definition: AdaptiveVertexFitter.h:249
AthAlgTool.h
Trk::AdaptiveVertexFitter::m_doSmoothing
bool m_doSmoothing
True if smoothing after fit iterations has to be performed: otherwise the Smoother AlgoTool provided ...
Definition: AdaptiveVertexFitter.h:294
IVertexAnnealingMaker.h
Trk::AdaptiveVertexFitter::_fit
xAOD::Vertex * _fit(const std::vector< const Trk::TrackParameters * > &perigeeList, const std::vector< const Trk::NeutralParameters * > &neutralPerigeeList=std::vector< const Trk::NeutralParameters * >(), const xAOD::Vertex &constraint=xAOD::Vertex(), const Amg::Vector3D &startingPoint=Amg::Vector3D(), bool IsConstraint=false, bool IsStartingPoint=false) const
Internal method for fitting a list of TrackParameters and NeutralParameters, with or without constrai...
Definition: AdaptiveVertexFitter.cxx:115
Trk::AdaptiveVertexFitter::AdaptiveVertexFitter
AdaptiveVertexFitter(const std::string &t, const std::string &n, const IInterface *p)
default constructor due to Athena interface
Definition: AdaptiveVertexFitter.cxx:31
Trk::AdaptiveVertexFitter::m_AnnealingMaker
ToolHandle< Trk::IVertexAnnealingMaker > m_AnnealingMaker
Definition: AdaptiveVertexFitter.h:254
Trk::AdaptiveVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const std::vector< const xAOD::NeutralParticle * > &vectorNeut, const Amg::Vector3D &startingPoint) const override
Interface for xAOD::TrackParticle with starting point.
Definition: AdaptiveVertexFitter.cxx:606
Vertex.h
Trk::AdaptiveVertexFitter::fit
xAOD::Vertex * fit(const std::vector< const Trk::Track * > &Vectortrk, const xAOD::Vertex &constraint, const Amg::Vector3D &startingPoint) const
fit providing vector of tracks, constraint and startingPoint
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::AdaptiveVertexFitter::m_LinearizedTrackFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
Definition: AdaptiveVertexFitter.h:232
NeutralParticle.h
IVertexUpdator.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IVertexFitter.h
TrackParticle.h
Trk::AdaptiveVertexFitter::m_TrackCompatibilityEstimator
ToolHandle< Trk::IVertexTrackCompatibilityEstimator > m_TrackCompatibilityEstimator
Definition: AdaptiveVertexFitter.h:238
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
IVertexLinearizedTrackFactory.h
Trk::AdaptiveVertexFitter::m_initialError
double m_initialError
Initial error in form of diagonal elements of the inverse of the covariance matrix (name is misleadin...
Definition: AdaptiveVertexFitter.h:279
Trk::AdaptiveVertexFitter
Definition: AdaptiveVertexFitter.h:87
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::AdaptiveVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const xAOD::Vertex &constraint) const override
Definition: AdaptiveVertexFitter.h:129
Trk::AdaptiveVertexFitter::m_maxDistToLinPoint
double m_maxDistToLinPoint
Maximum distance of linearization point of track to actual fitted vertex before needing to relineariz...
Definition: AdaptiveVertexFitter.h:271
IVertexTrackCompatibilityEstimator.h