ATLAS Offline Software
KalmanVertexOnJetAxisUpdator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
34 #ifndef TrkVertexFitterUtils_KalmanVertexOnJetAxisUpdator_H
35 #define TrkVertexFitterUtils_KalmanVertexOnJetAxisUpdator_H
36 
40 
41 namespace Trk
42 {
43  class VxJetCandidate;
44  class VxTrackAtVertex;
45  class LinearizedTrack;
46  class RecVertexPositions;
47  class VxVertexOnJetAxis;
48 
49  typedef Eigen::Matrix<double, 3, Eigen::Dynamic> AmgMatrix3X;
50 
51  static const InterfaceID IID_KalmanVertexOnJetAxisUpdator("Trk::KalmanVertexOnJetAxisUpdator", 1, 0);
52 
53 
55  {
56  public:
57 
58  static const InterfaceID& interfaceID()
59  {
60  return IID_KalmanVertexOnJetAxisUpdator;
61  };
62 
63 
64  virtual StatusCode initialize() override;
65 
69  KalmanVertexOnJetAxisUpdator(const std::string& t, const std::string& n, const IInterface* p);
70 
81  void add(VxTrackAtVertex* trackToAdd,const VxVertexOnJetAxis* vertexToUpdate,VxJetCandidate* candidateToUpdate) const;
82  void addWithFastUpdate(VxTrackAtVertex* trackToAdd,const VxVertexOnJetAxis* vertexToUpdate,VxJetCandidate* candidateToUpdate) const;
83 
95  void remove(VxTrackAtVertex* trackToRemove,const VxVertexOnJetAxis* vertexToUpdate,VxJetCandidate* candidateToUpdate) const;
96  void removeWithFastUpdate (VxTrackAtVertex* trackToRemove,const VxVertexOnJetAxis* vertexToUpdate,VxJetCandidate* candidateToUpdate) const;
97 
104  void updateChi2NdfInfo(VxTrackAtVertex* trackToUpdate,
105  const VxVertexOnJetAxis* vertexToUpdate,
106  VxJetCandidate* vertexCandidate) const;
107 
108 
113  void updateVertexChi2(VxJetCandidate* vertexCandidate) const;
114 
115 
122  const LinearizedTrack * trk,
123  double trackWeight, int sign,
124  int numVertex,bool isPrimary,
125  bool doFastUpdate) const;
126 
127 
143  std::pair<Amg::Vector3D,Eigen::Matrix3Xd> createTransformJacobian(const Amg::VectorX & initialjetdir,
144  int numVertex, bool isPrimary,
145  bool truncate) const;
146 
147  void smartInvert(Amg::MatrixX & new_vrt_cov) const;
148 
149 
150  private:
151 
157  void update(VxTrackAtVertex* trackToUpdate,const VxVertexOnJetAxis* vertexToUpdate,VxJetCandidate* candidateToUpdate,int sign, bool doFastUpdate) const ;
158 
164  double calculateTrackChi2 (const VxJetCandidate& vertexCandidate,
165  const LinearizedTrack * trk,
166  double trackWeight,
167  int numVertex,bool isPrimary=false) const;
168 
169 
170 
171 
172  private:
173 
175 
176  };//end of class definition
177 }//end of namespace definition
178 
179 #endif
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:32
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
Trk::KalmanVertexOnJetAxisUpdator::m_initialMomentumError
double m_initialMomentumError
Definition: KalmanVertexOnJetAxisUpdator.h:174
Trk::VxVertexOnJetAxis
VxVertexOnJetAxis inherits from Vertex.
Definition: VxVertexOnJetAxis.h:79
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::KalmanVertexOnJetAxisUpdator::remove
void remove(VxTrackAtVertex *trackToRemove, const VxVertexOnJetAxis *vertexToUpdate, VxJetCandidate *candidateToUpdate) const
Method removing already added track from the fit along the flight axis, where you specify from what v...
Definition: KalmanVertexOnJetAxisUpdator.cxx:59
Trk::KalmanVertexOnJetAxisUpdator::smartInvert
void smartInvert(Amg::MatrixX &new_vrt_cov) const
Definition: KalmanVertexOnJetAxisUpdator.cxx:571
Trk::KalmanVertexOnJetAxisUpdator::removeWithFastUpdate
void removeWithFastUpdate(VxTrackAtVertex *trackToRemove, const VxVertexOnJetAxis *vertexToUpdate, VxJetCandidate *candidateToUpdate) const
Definition: KalmanVertexOnJetAxisUpdator.cxx:66
GeoPrimitives.h
Trk::KalmanVertexOnJetAxisUpdator::addWithFastUpdate
void addWithFastUpdate(VxTrackAtVertex *trackToAdd, const VxVertexOnJetAxis *vertexToUpdate, VxJetCandidate *candidateToUpdate) const
Definition: KalmanVertexOnJetAxisUpdator.cxx:52
Trk::KalmanVertexOnJetAxisUpdator::KalmanVertexOnJetAxisUpdator
KalmanVertexOnJetAxisUpdator(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: KalmanVertexOnJetAxisUpdator.cxx:25
Trk::KalmanVertexOnJetAxisUpdator
ATLAS Reconstruction Software - (C) 2005 - 2007.
Definition: KalmanVertexOnJetAxisUpdator.h:55
Trk::KalmanVertexOnJetAxisUpdator::calculateTrackChi2
double calculateTrackChi2(const VxJetCandidate &vertexCandidate, const LinearizedTrack *trk, double trackWeight, int numVertex, bool isPrimary=false) const
Internal method where the chi2/ndf update is actually done.
Definition: KalmanVertexOnJetAxisUpdator.cxx:429
Trk::KalmanVertexOnJetAxisUpdator::positionUpdate
Trk::RecVertexPositions positionUpdate(VxJetCandidate &vertexCandidate, const LinearizedTrack *trk, double trackWeight, int sign, int numVertex, bool isPrimary, bool doFastUpdate) const
Method to do the Kalman Update of the positions of the fit along the flight axis with a single new tr...
Definition: KalmanVertexOnJetAxisUpdator.cxx:140
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::KalmanVertexOnJetAxisUpdator::initialize
virtual StatusCode initialize() override
Definition: KalmanVertexOnJetAxisUpdator.cxx:34
AthAlgTool.h
Trk::KalmanVertexOnJetAxisUpdator::interfaceID
static const InterfaceID & interfaceID()
Definition: KalmanVertexOnJetAxisUpdator.h:58
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:127
Trk::KalmanVertexOnJetAxisUpdator::updateChi2NdfInfo
void updateChi2NdfInfo(VxTrackAtVertex *trackToUpdate, const VxVertexOnJetAxis *vertexToUpdate, VxJetCandidate *vertexCandidate) const
Obsolete (will be removed - not in use, however migrated to eigen before finding out -WL) Updates onl...
Definition: KalmanVertexOnJetAxisUpdator.cxx:362
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::KalmanVertexOnJetAxisUpdator::add
void add(VxTrackAtVertex *trackToAdd, const VxVertexOnJetAxis *vertexToUpdate, VxJetCandidate *candidateToUpdate) const
Method updating the fit along the flight axis (VxJetCandidate) with a track (VxTrackOnJetAxis) which ...
Definition: KalmanVertexOnJetAxisUpdator.cxx:45
Trk::VxJetCandidate
Definition: VxJetCandidate.h:72
Trk::RecVertexPositions
Definition: RecVertexPositions.h:34
Trk::KalmanVertexOnJetAxisUpdator::update
void update(VxTrackAtVertex *trackToUpdate, const VxVertexOnJetAxis *vertexToUpdate, VxJetCandidate *candidateToUpdate, int sign, bool doFastUpdate) const
Internal method to do the Kalman Update.
Definition: KalmanVertexOnJetAxisUpdator.cxx:73
Trk::KalmanVertexOnJetAxisUpdator::createTransformJacobian
std::pair< Amg::Vector3D, Eigen::Matrix3Xd > createTransformJacobian(const Amg::VectorX &initialjetdir, int numVertex, bool isPrimary, bool truncate) const
Method to create the Jacobian needed to go to the space of single vertices to the space of the variab...
Definition: KalmanVertexOnJetAxisUpdator.cxx:515
AthAlgTool
Definition: AthAlgTool.h:26
Trk::AmgMatrix3X
Eigen::Matrix< double, 3, Eigen::Dynamic > AmgMatrix3X
Definition: KalmanVertexOnJetAxisUpdator.h:47
Trk::KalmanVertexOnJetAxisUpdator::updateVertexChi2
void updateVertexChi2(VxJetCandidate *vertexCandidate) const
Obsolete (will be removed - not in use, however moved to eigen before finding out -WL).
Definition: KalmanVertexOnJetAxisUpdator.cxx:481
egammaParameters::isPrimary
@ isPrimary
true if matched track has a hit in first or second pixel layer
Definition: egammaParamDefs.h:225
Trk::LinearizedTrack
Definition: LinearizedTrack.h:43
LArG4ShowerLibProcessing.truncate
truncate
Definition: LArG4ShowerLibProcessing.py:39