ATLAS Offline Software
SequentialVertexFitter.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 TrkVertexFitters_SequentialVertexFitter_H
6 #define TrkVertexFitters_SequentialVertexFitter_H
7 
9 #include "GaudiKernel/ToolHandle.h"
13 
14 //xAOD includes
15 #include "xAODTracking/VertexFwd.h"
18 
19 
47 namespace Trk
48 {
49  class Track;
50  class VxTrackAtVertex;
51  class IVertexUpdator;
52  class IVertexSmoother;
53  class IVertexLinearizedTrackFactory;
54 
55  class SequentialVertexFitter : public extends<AthAlgTool, IVertexFitter>
56  {
57  public:
58  // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext
60 
61  virtual StatusCode initialize() override;
62  virtual StatusCode finalize() override;
63 
68  SequentialVertexFitter(const std::string& t, const std::string& n, const IInterface* p);
69 
75 
79  virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
80  const std::vector<const xAOD::NeutralParticle*>& vectorNeut,
81  const Amg::Vector3D& startingPoint) const override;
85  virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
86  const Amg::Vector3D& startingPoint) const override
87  {return fit(vectorTrk, std::vector<const xAOD::NeutralParticle*>(), startingPoint);};
88 
93  virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
94  const std::vector<const xAOD::NeutralParticle*>& vectorNeut,
95  const xAOD::Vertex& constraint) const override;
100  virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
101  const xAOD::Vertex& constraint) const override
102  {return fit(vectorTrk, std::vector<const xAOD::NeutralParticle*>(), constraint);};
103 
104 
105 
110  virtual xAOD::Vertex * fit(const std::vector<const Trk::TrackParameters*> & perigeeList,
111  const std::vector<const Trk::NeutralParameters*> & neutralPerigeeList,
112  const Amg::Vector3D& startingPoint) const override;
117  virtual xAOD::Vertex * fit(const std::vector<const Trk::TrackParameters*> & paramList,
118  const Amg::Vector3D& startingPoint) const override
119  {return fit(paramList, std::vector<const Trk::NeutralParameters*>(), startingPoint);};
120 
125  virtual xAOD::Vertex * fit(const std::vector<const Trk::TrackParameters*> & perigeeList,
126  const std::vector<const Trk::NeutralParameters*> & neutralPerigeeList,
127  const xAOD::Vertex& constraint) const override;
128  virtual xAOD::Vertex * fit(const std::vector<const Trk::TrackParameters*> & perigeeList,
129  const xAOD::Vertex& constraint) const override
130  {return fit(perigeeList, std::vector<const Trk::NeutralParameters*>(), constraint);};
131 
139  virtual xAOD::Vertex* fit(
140  const std::vector<const Trk::TrackParameters*>& perigeeList,
141  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList)
142  const override;
143  virtual xAOD::Vertex* fit(
144  const std::vector<const Trk::TrackParameters*>& perigeeList) const override
145  {return fit(perigeeList, std::vector<const Trk::NeutralParameters*>());};
146 
147 
148  private:
149 
154  std::vector<Trk::VxTrackAtVertex> linearizeTracks(
155  const std::vector<const Trk::TrackParameters*>& perigeeList,
156  const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList,
157  const xAOD::Vertex& vrt) const;
158 
163  void reLinearizeTracks(std::vector<Trk::VxTrackAtVertex>& tracks, const Amg::Vector3D & vrt)const;
164 
165  ToolHandle< IVertexUpdator > m_Updator;
166  ToolHandle< IVertexSmoother > m_Smoother;
167  ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinTrkFactory;
168 
174 
179  unsigned int m_maxStep;
180 
185  float m_maxShift;
186 
192 
198 
199  /*
200  * Avoid vertex to be initialize outside ID envelope given bu m_maxR and m_maxZ
201  */
202 
203  double m_maxR;
204  double m_maxZ;
205 
206  }; //end of class description
207 }//end of namespace definition
208 
209 #endif
Trk::SequentialVertexFitter::m_Updator
ToolHandle< IVertexUpdator > m_Updator
Definition: SequentialVertexFitter.h:165
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:76
Trk::SequentialVertexFitter::~SequentialVertexFitter
virtual ~SequentialVertexFitter()
destructor
TrackParameters.h
Trk::SequentialVertexFitter::m_maxDeltaChi2
float m_maxDeltaChi2
Max DeltaChi2 allowed in hard convergence criterium.
Definition: SequentialVertexFitter.h:197
TrackParticleBase.h
Trk::SequentialVertexFitter::m_Smoother
ToolHandle< IVertexSmoother > m_Smoother
Definition: SequentialVertexFitter.h:166
Trk::SequentialVertexFitter
Definition: SequentialVertexFitter.h:56
Trk::SequentialVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const Amg::Vector3D &startingPoint) const override
Interface for xAOD::TrackParticle with starting point.
Definition: SequentialVertexFitter.h:85
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::SequentialVertexFitter::m_LinTrkFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinTrkFactory
Definition: SequentialVertexFitter.h:167
Trk::SequentialVertexFitter::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 and xAOD::NeutralParticle with starting point.
Definition: SequentialVertexFitter.cxx:365
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Trk::SequentialVertexFitter::m_maxZ
double m_maxZ
Definition: SequentialVertexFitter.h:204
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::SequentialVertexFitter::m_maxR
double m_maxR
Definition: SequentialVertexFitter.h:203
AthAlgTool.h
Trk::SequentialVertexFitter::finalize
virtual StatusCode finalize() override
Definition: SequentialVertexFitter.cxx:52
Trk::SequentialVertexFitter::SequentialVertexFitter
SequentialVertexFitter(const std::string &t, const std::string &n, const IInterface *p)
constructor
Definition: SequentialVertexFitter.cxx:58
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
NeutralParticle.h
Trk::SequentialVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const Trk::TrackParameters * > &perigeeList) const override
Definition: SequentialVertexFitter.h:143
Trk::SequentialVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const Trk::TrackParameters * > &perigeeList, const xAOD::Vertex &constraint) const override
Definition: SequentialVertexFitter.h:128
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IVertexFitter.h
VertexFwd.h
Trk::SequentialVertexFitter::m_useLooseConvergence
bool m_useLooseConvergence
Use loose convergence criterium (maxShift) or hard (+maxDeltaChi2)
Definition: SequentialVertexFitter.h:191
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::SequentialVertexFitter::m_doSmoothing
bool m_doSmoothing
Flag controlling optional smoothing.
Definition: SequentialVertexFitter.h:173
TrackParticleFwd.h
Trk::SequentialVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const xAOD::Vertex &constraint) const override
Interface for xAOD::TrackParticle with vertex constraint the position of the constraint is ALWAYS the...
Definition: SequentialVertexFitter.h:100
Trk::SequentialVertexFitter::reLinearizeTracks
void reLinearizeTracks(std::vector< Trk::VxTrackAtVertex > &tracks, const Amg::Vector3D &vrt) const
Relinearization on iterations.
Definition: SequentialVertexFitter.cxx:343
Trk::SequentialVertexFitter::linearizeTracks
std::vector< Trk::VxTrackAtVertex > linearizeTracks(const std::vector< const Trk::TrackParameters * > &perigeeList, const std::vector< const Trk::NeutralParameters * > &neutralPerigeeList, const xAOD::Vertex &vrt) const
Internal method related to the linearization of tracks (initial linearization)
Definition: SequentialVertexFitter.cxx:280
Trk::SequentialVertexFitter::initialize
virtual StatusCode initialize() override
Definition: SequentialVertexFitter.cxx:35
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::SequentialVertexFitter::m_maxShift
float m_maxShift
Max shift (represents the convergence criterion)
Definition: SequentialVertexFitter.h:185
Trk::SequentialVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const Trk::TrackParameters * > &paramList, const Amg::Vector3D &startingPoint) const override
Vertex fit from list of track and parameters and a starting point.
Definition: SequentialVertexFitter.h:117
Trk::SequentialVertexFitter::m_maxStep
unsigned int m_maxStep
Max number of iterations to perform (in case of no convergence)
Definition: SequentialVertexFitter.h:179