ATLAS Offline Software
FastVertexFitter.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 TRKVERTEXFITTERBILLOIR_FASTVERTEXFITTER_H
6 #define TRKVERTEXFITTERBILLOIR_FASTVERTEXFITTER_H
7 
10 #include "GaudiKernel/ToolHandle.h"
16 #include "xAODTracking/VertexFwd.h"
17 
18 namespace Trk {
19 class Track;
20 class TrackParticleBase;
21 class IExtrapolator;
22 class IVertexLinearizedTrackFactory;
23 
38 class FastVertexFitter : public extends<AthAlgTool, IVertexFitter>
39 {
40 public:
41  // The following 'using' can be removed when IVertexFitter::fit has been fully
42  // migrated to the one with the EventContext
44 
45  virtual StatusCode initialize() override;
46 
47  FastVertexFitter(const std::string& t,
48  const std::string& n,
49  const IInterface* p);
50  virtual ~FastVertexFitter();
51 
53  virtual xAOD::Vertex* fit(
54  const std::vector<const Trk::TrackParameters*>& perigeeList,
55  const Amg::Vector3D& startingPoint) const override;
56 
59  virtual xAOD::Vertex* fit(
60  const std::vector<const TrackParameters*>& perigeeList,
61  const std::vector<const Trk::NeutralParameters*>& /*neutralPerigeeList*/,
62  const Amg::Vector3D& startingPoint) const override
63  {
64  msg(MSG::WARNING)
65  << "FastVertexFitter::fit(fit(const std::vector<const "
66  "TrackParameters*>&,const std::vector<const "
67  "Trk::NeutralParameters*>&,const Amg::Vector3D&) ignoring neutrals"
68  << endmsg;
69  return fit(perigeeList, startingPoint);
70  };
71 
74  virtual xAOD::Vertex* fit(
75  const std::vector<const Trk::TrackParameters*>& perigeeList,
76  const xAOD::Vertex& constraint) const override;
77 
80  virtual xAOD::Vertex* fit(
81  const std::vector<const TrackParameters*>& perigeeList,
82  const std::vector<const Trk::NeutralParameters*>& /*neutralPerigeeList*/,
83  const xAOD::Vertex& constraint) const override
84  {
85  msg(MSG::WARNING)
86  << "FastVertexFitter::fit(fit(const std::vector<const "
87  "TrackParameters*>&,const std::vector<const "
88  "Trk::NeutralParameters*>&,const xAOD::Vertex&) ignoring neutrals"
89  << endmsg;
90  return fit(perigeeList, constraint);
91  };
92 
97  virtual xAOD::Vertex* fit(
98  const std::vector<const Trk::TrackParameters*>& perigeeList) const override;
99 
100  virtual xAOD::Vertex* fit(
101  const std::vector<const TrackParameters*>& perigeeList,
102  const std::vector<const Trk::NeutralParameters*>& /*neutralPerigeeList*/)
103  const override
104  {
105  msg(MSG::WARNING) << "FastVertexFitter::fit(fit(const std::vector<const "
106  "TrackParameters*>&,const std::vector<const "
107  "Trk::NeutralParameters*>&) ignoring neutrals"
108  << endmsg;
109  return fit(perigeeList);
110  };
111 
113  virtual xAOD::Vertex* fit(
114  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
115  const Amg::Vector3D& startingPoint) const override;
116 
119  virtual xAOD::Vertex* fit(
120  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
121  const std::vector<const xAOD::NeutralParticle*>& /*vectorNeut*/,
122  const Amg::Vector3D& startingPoint) const override
123  {
124  msg(MSG::WARNING)
125  << "FastVertexFitter::fit(fit(const std::vector<const "
126  "TrackParticle*>&,const std::vector<const "
127  "Trk::NeutralParticle*>&,const Amg::Vector3D&) ignoring neutrals"
128  << endmsg;
129  return fit(vectorTrk, startingPoint);
130  };
131 
134  virtual xAOD::Vertex* fit(
135  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
136  const xAOD::Vertex& constraint) const override;
137 
141  virtual xAOD::Vertex* fit(
142  const std::vector<const xAOD::TrackParticle*>& vectorTrk,
143  const std::vector<const xAOD::NeutralParticle*>& /*vectorNeut*/,
144  const xAOD::Vertex& constraint) const override
145  {
146  msg(MSG::WARNING)
147  << "FastVertexFitter::fit(fit(const std::vector<const "
148  "TrackParticle*>&,const std::vector<const "
149  "Trk::NeutralParticle*>&,const xAOD::Vertex&) ignoring neutrals"
150  << endmsg;
151  return fit(vectorTrk, constraint);
152  };
153 
154 private:
155  unsigned int m_maxIterations;
157 
158  ToolHandle<Trk::IExtrapolator> m_extrapolator{this, "Extrapolator", "Trk::Extrapolator"};
159  ToolHandle<Trk::IVertexLinearizedTrackFactory> m_linFactory{this, "LinearizedTrackFactory", "Trk::FullLinearizedTrackFactory"};
160 };
161 }
162 #endif
163 
Trk::FastVertexFitter::initialize
virtual StatusCode initialize() override
Definition: FastVertexFitter.cxx:55
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::FastVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const Trk::TrackParameters * > &perigeeList, const Amg::Vector3D &startingPoint) const override
Interface for ParametersBase with starting point.
Definition: FastVertexFitter.cxx:100
TrackParameters.h
Trk::FastVertexFitter::m_maxDchi2PerNdf
double m_maxDchi2PerNdf
Definition: FastVertexFitter.h:156
Trk::FastVertexFitter::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: FastVertexFitter.h:158
IExtrapolator.h
Trk::FastVertexFitter
This class implements a fast vertex fitting algorithm as proposed by P.
Definition: FastVertexFitter.h:39
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::FastVertexFitter::m_maxIterations
unsigned int m_maxIterations
Definition: FastVertexFitter.h:152
Trk::FastVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const std::vector< const Trk::NeutralParameters * > &, const Amg::Vector3D &startingPoint) const override
Interface for TrackParameters and NeutralParameters with starting point.
Definition: FastVertexFitter.h:59
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Trk::FastVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const std::vector< const xAOD::NeutralParticle * > &, const Amg::Vector3D &startingPoint) const override
*Interface for xAOD::TrackParticle and NeutralParticle with starting point
Definition: FastVertexFitter.h:119
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::FastVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const std::vector< const Trk::NeutralParameters * > &) const override
Definition: FastVertexFitter.h:100
Trk::FastVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const std::vector< const Trk::NeutralParameters * > &, const xAOD::Vertex &constraint) const override
Interface for TrackParameters and NeutralParameters with RecVertex starting point.
Definition: FastVertexFitter.h:80
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::FastVertexFitter::~FastVertexFitter
virtual ~FastVertexFitter()
standard destructor
Trk::FastVertexFitter::FastVertexFitter
FastVertexFitter(const std::string &t, const std::string &n, const IInterface *p)
Definition: FastVertexFitter.cxx:82
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IVertexFitter.h
VertexFwd.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::FastVertexFitter::m_linFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_linFactory
Definition: FastVertexFitter.h:159
TrackParticleFwd.h
Trk::FastVertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const std::vector< const xAOD::NeutralParticle * > &, const xAOD::Vertex &constraint) const override
Definition: FastVertexFitter.h:141
IVertexLinearizedTrackFactory.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
checker_macros.h
Define macros for attributes used to control the static checker.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7