ATLAS Offline Software
TrigL2Vertex.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGINDETEVENT_TRIGL2VERTEX_H
6 #define TRIGINDETEVENT_TRIGL2VERTEX_H
7 
8 #include <list>
9 #include <vector>
11 #include "TrkTrack/Track.h"
12 #include "GaudiKernel/MsgStream.h"
13 
14 #define MAX_SIZE_VERT_COVM 30
15 
38 {
39  public:
42  virtual double getChi2Distance(class TrigL2Vertex*) = 0;
43  virtual void updateVertex(class TrigL2Vertex*) = 0;
44  virtual MsgStream& report( MsgStream& ) const = 0;
45  protected:
46  double m_resid[2]{};
47  double m_V[2][2]{};
48  double m_D[2][MAX_SIZE_VERT_COVM]{};
49 };
50 
51 inline MsgStream& operator << ( MsgStream& msg, const TrigVertexFittingNode& node)
52 {
53  return node.report(msg);
54 }
55 
56 inline MsgStream& operator << ( MsgStream& msg, const TrigVertexFittingNode* node)
57 {
58  return node->report(msg);
59 }
60 
62 {
63  public:
65  TrigVertexFitInputTrack(const Trk::Track*, double);
68  const Trk::Track* getTrkTrack();
69  void initializeVertex(class TrigL2Vertex*);
70  bool linearize(class TrigL2Vertex*);
71  virtual double getChi2Distance(class TrigL2Vertex*);
72  virtual void updateVertex(class TrigL2Vertex*);
73  virtual MsgStream& report( MsgStream& ) const;
74  void setIndex(int);
75  int getIndex() const;
76  int getTrackType();
77  bool isActive();
78  void activate();
79  void mask();
80  void setMass(double);
81  double getMass() const {return m_mass;}
82  const double* Perigee() const;
83  double PerigeeCovariance(int,int) const;
84  private:
87  int m_nTrackType{};
88  int m_index{};
89  double m_mass{};
90  double m_Vqq[3][3]{};
91  double m_Vuq[2][3]{};
92  double m_Vuu[2][2]{};
93  double m_u[2]{};
94  double m_q[3]{};
95  double m_Perigee[5]{};
96  double m_PerigeeCovariance[5][5]{};
97  double m_A[2][3]{};
98  double m_B[2][3]{};
99  double m_h[2]{};
100 
101  bool m_active{true};
102 };
103 
105 {
106  public:
109  const TrigVertexFitInputTrack*);
111  virtual double getChi2Distance(class TrigL2Vertex*);
112  virtual void updateVertex(class TrigL2Vertex*);
113  virtual MsgStream& report( MsgStream& ) const;
114  double getValue();
115  private:
117  std::list<const TrigVertexFitInputTrack*> m_trackList;
118  double m_value;
119 };
120 
121 /*
122 class TrigVertexCovarianceRow
123 {
124  public:
125  TrigVertexCovarianceRow(int);
126  ~TrigVertexCovarianceRow();
127  double& operator[] (int);
128  private:
129  int m_size;
130  double* m_data;
131 };
132 
133 class TrigVertexCovariance
134 {
135  public:
136  TrigVertexCovariance(int);
137  ~TrigVertexCovariance();
138  TrigVertexCovarianceRow& operator[] (int);
139  private:
140  int m_size;
141  std::vector<TrigVertexCovarianceRow*>* m_data;
142 };
143 */
144 
146 {
147  public:
148  TrigL2Vertex();
149  ~TrigL2Vertex();
150  TrigL2Vertex(const TrigL2Vertex&) = delete;
152  bool prepareForFit();
153  void reset();
154  double chi2();
155  int ndof();
156  double mass();
157  double massVariance();
158 
159  void addChi2(double);
160  void addNdof(int);
161  void setMass(double);
162  void setMassVariance(double);
163  int getNumberOfTracks();
164  double* getParametersVector();
165  //TrigVertexCovariance* m_getCovariance();
166  //void m_setCovariance(TrigVertexCovariance*);
167 
168  bool isVertexFitted();
169  bool isMassEstimated();
170  bool isReadyForFit();
171 
174 
175  std::list<TrigVertexFitConstraint*>* getConstraints();
176  std::list<TrigVertexFitInputTrack*>* getTracks();
177  void setStatus(int);
178  int getStatus();
181  MsgStream& report( MsgStream& ) const;
183 
184  private:
186 
187  std::list<TrigVertexFitInputTrack*>* m_pvTracks;
188  std::list<TrigVertexFitConstraint*>* m_pvConstraints;
190  double m_massVar;
194  bool m_ready;
195 };
196 
197 inline MsgStream& operator << ( MsgStream& msg, const TrigL2Vertex& vrt)
198 {
199  return vrt.report(msg);
200 }
201 
202 inline MsgStream& operator << ( MsgStream& msg, const TrigL2Vertex* vrt)
203 {
204  return vrt->report(msg);
205 }
206 
207 #endif
TrigVertexFitConstraint::calculateInvariantMass
double calculateInvariantMass(TrigL2Vertex *pV)
Definition: TrigL2Vertex.cxx:367
TrigL2Vertex::m_P
TrigInDetTrackFitPar * m_P
Definition: TrigL2Vertex.h:193
TrigVertexFitConstraint::TrigVertexFitConstraint
TrigVertexFitConstraint(double, const TrigVertexFitInputTrack *, const TrigVertexFitInputTrack *)
two-track mass constraint
Definition: TrigL2Vertex.cxx:343
TrigVertexFitInputTrack::setMass
void setMass(double)
sets a mass of this particle
Definition: TrigL2Vertex.cxx:133
TrigVertexFitInputTrack::m_u
double m_u[2]
Definition: TrigL2Vertex.h:93
TrigVertexFitInputTrack::getTrackType
int getTrackType()
0: L2 track, 1: EF(offline) track
Definition: TrigL2Vertex.cxx:153
TrigVertexFittingNode::report
virtual MsgStream & report(MsgStream &) const =0
TrigVertexFitConstraint::m_value
double m_value
Definition: TrigL2Vertex.h:118
TrigL2Vertex::setStatus
void setStatus(int)
sets vertex status flag
Definition: TrigL2Vertex.cxx:666
TrigVertexFitInputTrack::initializeVertex
void initializeVertex(class TrigL2Vertex *)
resets and fills its part of the covariance and parameter vector
Definition: TrigL2Vertex.cxx:189
TrigL2Vertex::TrigL2Vertex
TrigL2Vertex()
Definition: TrigL2Vertex.cxx:545
TrigVertexFitInputTrack::getTrkTrack
const Trk::Track * getTrkTrack()
getter for EF (offline) tracks
Definition: TrigL2Vertex.cxx:164
TrigL2Vertex::m_massVar
double m_massVar
Definition: TrigL2Vertex.h:190
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
TrigVertexFitConstraint::~TrigVertexFitConstraint
~TrigVertexFitConstraint()
Definition: TrigL2Vertex.cxx:362
TrigVertexFittingNode::m_D
double m_D[2][MAX_SIZE_VERT_COVM]
Definition: TrigL2Vertex.h:48
TrigVertexFittingNode::getChi2Distance
virtual double getChi2Distance(class TrigL2Vertex *)=0
abstract method
TrigVertexFitInputTrack::getIndex
int getIndex() const
to be used by TrigVertexingTool
Definition: TrigL2Vertex.cxx:174
TrigVertexFittingNode
This is the implementation of classes used by TrigL2VertexFitter:
Definition: TrigL2Vertex.h:38
TrigVertexFitConstraint::updateVertex
virtual void updateVertex(class TrigL2Vertex *)
implementation of abstract method from the base class
Definition: TrigL2Vertex.cxx:509
TrigVertexFitInputTrack::m_Perigee
double m_Perigee[5]
Definition: TrigL2Vertex.h:95
TrigVertexFitConstraint::getChi2Distance
virtual double getChi2Distance(class TrigL2Vertex *)
implementation of abstract method from the base class
Definition: TrigL2Vertex.cxx:400
TrigInDetTrackFitPar
Definition: TrigInDetTrackFitPar.h:68
TrigVertexFitInputTrack::getTrigTrack
const TrigInDetTrack * getTrigTrack()
getter for L2 tracks
Definition: TrigL2Vertex.cxx:159
TrigVertexFitInputTrack::m_A
double m_A[2][3]
Definition: TrigL2Vertex.h:97
TrigL2Vertex::addNdof
void addNdof(int)
increments accumulated number-of-degree-of-freedom of the fit
Definition: TrigL2Vertex.cxx:634
TrigVertexFitInputTrack::m_Vuq
double m_Vuq[2][3]
Definition: TrigL2Vertex.h:91
TrigVertexFitInputTrack::m_active
bool m_active
Definition: TrigL2Vertex.h:101
TrigVertexFitInputTrack::m_Vqq
double m_Vqq[3][3]
Definition: TrigL2Vertex.h:90
TrigL2Vertex::reset
void reset()
resets all internal structures
Definition: TrigL2Vertex.cxx:592
TrigVertexFitConstraint::report
virtual MsgStream & report(MsgStream &) const
Definition: TrigL2Vertex.cxx:534
TrigL2Vertex::~TrigL2Vertex
~TrigL2Vertex()
Definition: TrigL2Vertex.cxx:560
TrigVertexFitInputTrack::m_pTrkTrack
const Trk::Track * m_pTrkTrack
Definition: TrigL2Vertex.h:86
TrigVertexFittingNode::m_V
double m_V[2][2]
Definition: TrigL2Vertex.h:47
TrigL2Vertex::getTracks
std::list< TrigVertexFitInputTrack * > * getTracks()
lists of tracks in the vertex
Definition: TrigL2Vertex.cxx:656
TrigVertexFitInputTrack::m_PerigeeCovariance
double m_PerigeeCovariance[5][5]
Definition: TrigL2Vertex.h:96
TrigL2Vertex::addChi2
void addChi2(double)
increments accumulated of the fit
Definition: TrigL2Vertex.cxx:629
TrigVertexFittingNode::TrigVertexFittingNode
TrigVertexFittingNode()
Definition: TrigL2Vertex.h:40
TrigL2Vertex::ndof
int ndof()
returns accumulated number-of-degree-of-freedom of the fit
Definition: TrigL2Vertex.cxx:624
TrigVertexFitInputTrack::m_h
double m_h[2]
Definition: TrigL2Vertex.h:99
TrigL2Vertex::m_ready
bool m_ready
Definition: TrigL2Vertex.h:194
TrigInDetTrack
Definition: TrigInDetTrack.h:34
TrigL2Vertex::m_chiSquared
double m_chiSquared
Definition: TrigL2Vertex.h:189
Track.h
TrigL2Vertex::prepareForFit
bool prepareForFit()
resets all internal structures + initialization of the covariance
Definition: TrigL2Vertex.cxx:583
TrigVertexFitInputTrack::activate
void activate()
sets isActive to true
Definition: TrigL2Vertex.cxx:143
MAX_SIZE_VERT_COVM
#define MAX_SIZE_VERT_COVM
Definition: TrigL2Vertex.h:14
TrigVertexFitInputTrack::m_mass
double m_mass
Definition: TrigL2Vertex.h:89
TrigL2Vertex::setMass
void setMass(double)
sets calculated mass of the vertex
Definition: TrigL2Vertex.cxx:671
TrigInDetTrack.h
TrigVertexFittingNode::m_resid
double m_resid[2]
Definition: TrigL2Vertex.h:46
TrigVertexFitInputTrack::updateVertex
virtual void updateVertex(class TrigL2Vertex *)
implementation of abstract method from the base class
Definition: TrigL2Vertex.cxx:303
TrigL2Vertex
Definition: TrigL2Vertex.h:146
TrigVertexFittingNode::updateVertex
virtual void updateVertex(class TrigL2Vertex *)=0
abstract method
TrigL2Vertex::setMassVariance
void setMassVariance(double)
sets variance of the calculated mass of the vertex
Definition: TrigL2Vertex.cxx:676
TrigVertexFitInputTrack::TrigVertexFitInputTrack
TrigVertexFitInputTrack(const TrigInDetTrack *, double)
constructor for L2 tracks
Definition: TrigL2Vertex.cxx:9
TrigVertexFitInputTrack::isActive
bool isActive()
if true this track will be used in the vertex fit otherwise it will be masked
Definition: TrigL2Vertex.cxx:148
TrigVertexFitInputTrack::mask
void mask()
sets isActive to false
Definition: TrigL2Vertex.cxx:138
TrigVertexFitInputTrack::Perigee
const double * Perigee() const
track parameters at the perigee
Definition: TrigL2Vertex.cxx:179
TrigL2Vertex::getMotherTrack
const TrigInDetTrackFitPar * getMotherTrack()
returns mother particle parameters if m_isMassEstimated() is true
Definition: TrigL2Vertex.cxx:609
TrigVertexFitInputTrack::m_pTrigTrack
const TrigInDetTrack * m_pTrigTrack
Definition: TrigL2Vertex.h:85
TrigL2Vertex::m_pvTracks
std::list< TrigVertexFitInputTrack * > * m_pvTracks
Definition: TrigL2Vertex.h:187
TrigVertexFitInputTrack::m_q
double m_q[3]
Definition: TrigL2Vertex.h:94
TrigVertexFitInputTrack::m_index
int m_index
Definition: TrigL2Vertex.h:88
TrigL2Vertex::getNumberOfTracks
int getNumberOfTracks()
Definition: TrigL2Vertex.cxx:577
TrigL2Vertex::chi2
double chi2()
returns accumulated of the fit
Definition: TrigL2Vertex.cxx:619
TrigL2Vertex::mass
double mass()
returns calculated mass of the vertex
Definition: TrigL2Vertex.cxx:639
TrigL2Vertex::massVariance
double massVariance()
returns variance of the calculated mass of the vertex
Definition: TrigL2Vertex.cxx:645
TrigVertexFitConstraint
Definition: TrigL2Vertex.h:105
TrigVertexFitInputTrack::setIndex
void setIndex(int)
to be used by TrigVertexingTool
Definition: TrigL2Vertex.cxx:169
TrigVertexFitInputTrack::linearize
bool linearize(class TrigL2Vertex *)
re-calculates linearization of the measurement model in the vicinity of parameters provided by input ...
TrigVertexFitInputTrack::~TrigVertexFitInputTrack
~TrigVertexFitInputTrack()
Definition: TrigL2Vertex.cxx:128
TrigL2Vertex::contains
const TrigVertexFitInputTrack * contains(const TrigInDetTrack *)
checks whether L2 track is in the vertex
Definition: TrigL2Vertex.cxx:704
TrigL2Vertex::m_nStatus
int m_nStatus
Definition: TrigL2Vertex.h:191
TrigVertexFitInputTrack::getMass
double getMass() const
gets a mass of this particle
Definition: TrigL2Vertex.h:81
TrigVertexFitInputTrack::PerigeeCovariance
double PerigeeCovariance(int, int) const
covariance of track parameters at the perigee
Definition: TrigL2Vertex.cxx:184
TrigL2Vertex::setMotherTrack
void setMotherTrack(TrigInDetTrackFitPar *)
sets mother particle parameters after kinematical fitting
Definition: TrigL2Vertex.cxx:614
TrigL2Vertex::m_Gk
double m_Gk[MAX_SIZE_VERT_COVM][MAX_SIZE_VERT_COVM]
Definition: TrigL2Vertex.h:182
TrigL2Vertex::m_nTracks
int m_nTracks
Definition: TrigL2Vertex.h:185
TrigL2Vertex::m_pvConstraints
std::list< TrigVertexFitConstraint * > * m_pvConstraints
Definition: TrigL2Vertex.h:188
TrigVertexFitInputTrack::m_nTrackType
int m_nTrackType
Definition: TrigL2Vertex.h:87
TrigL2Vertex::m_Rk
double m_Rk[MAX_SIZE_VERT_COVM]
Definition: TrigL2Vertex.h:192
TrigVertexFitInputTrack::m_Vuu
double m_Vuu[2][2]
Definition: TrigL2Vertex.h:92
operator<<
MsgStream & operator<<(MsgStream &msg, const TrigVertexFittingNode &node)
Definition: TrigL2Vertex.h:51
TrigL2Vertex::report
MsgStream & report(MsgStream &) const
Definition: TrigL2Vertex.cxx:691
TrigVertexFitInputTrack
Definition: TrigL2Vertex.h:62
TrigVertexFitInputTrack::m_B
double m_B[2][3]
Definition: TrigL2Vertex.h:98
TrigL2Vertex::operator=
TrigL2Vertex & operator=(const TrigL2Vertex &)=delete
TrigL2Vertex::isReadyForFit
bool isReadyForFit()
vertex status
Definition: TrigL2Vertex.cxx:686
TrigL2Vertex::getParametersVector
double * getParametersVector()
returns vector of vertex fit parameters: vertex position + refitted track momenta at-perigee (sic !...
Definition: TrigL2Vertex.cxx:651
TrigL2Vertex::isMassEstimated
bool isMassEstimated()
vertex status
Definition: TrigL2Vertex.cxx:604
TrigVertexFitConstraint::getValue
double getValue()
returns a mass of the constraint
Definition: TrigL2Vertex.cxx:540
TrigVertexFittingNode::~TrigVertexFittingNode
virtual ~TrigVertexFittingNode()
Definition: TrigL2Vertex.h:41
TrigVertexFitInputTrack::report
virtual MsgStream & report(MsgStream &) const
Definition: TrigL2Vertex.cxx:329
TrigL2Vertex::m_mass
double m_mass
Definition: TrigL2Vertex.h:189
TrigL2Vertex::getStatus
int getStatus()
returns vertex status flag
Definition: TrigL2Vertex.cxx:681
TrigL2Vertex::m_nDOF
int m_nDOF
Definition: TrigL2Vertex.h:185
TrigL2Vertex::TrigL2Vertex
TrigL2Vertex(const TrigL2Vertex &)=delete
TrigL2Vertex::getConstraints
std::list< TrigVertexFitConstraint * > * getConstraints()
lists of all constraints imposed on the vertex
Definition: TrigL2Vertex.cxx:661
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TrigVertexFitConstraint::m_trackList
std::list< const TrigVertexFitInputTrack * > m_trackList
Definition: TrigL2Vertex.h:117
node
Definition: memory_hooks-stdcmalloc.h:74
TrigL2Vertex::isVertexFitted
bool isVertexFitted()
vertex status
Definition: TrigL2Vertex.cxx:599
TrigVertexFitInputTrack::getChi2Distance
virtual double getChi2Distance(class TrigL2Vertex *)
implementation of abstract method from the base class
Definition: TrigL2Vertex.cxx:196