ATLAS Offline Software
Loading...
Searching...
No Matches
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
36
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
51inline MsgStream& operator << ( MsgStream& msg, const TrigVertexFittingNode& node)
52{
53 return node.report(msg);
54}
55
56inline 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:
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:
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/*
122class 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
133class 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();
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;
195};
196
197inline MsgStream& operator << ( MsgStream& msg, const TrigL2Vertex& vrt)
198{
199 return vrt.report(msg);
200}
201
202inline MsgStream& operator << ( MsgStream& msg, const TrigL2Vertex* vrt)
203{
204 return vrt->report(msg);
205}
206
207#endif
MsgStream & operator<<(MsgStream &msg, const TrigVertexFittingNode &node)
#define MAX_SIZE_VERT_COVM
encapsulates LVL2 track parameters and covariance matrix The vector of track parameters consists of
represents a LVL2 ID track
bool isVertexFitted()
vertex status
MsgStream & report(MsgStream &) const
void addNdof(int)
increments accumulated number-of-degree-of-freedom of the fit
void setMotherTrack(TrigInDetTrackFitPar *)
sets mother particle parameters after kinematical fitting
TrigL2Vertex(const TrigL2Vertex &)=delete
void setMassVariance(double)
sets variance of the calculated mass of the vertex
std::list< TrigVertexFitConstraint * > * m_pvConstraints
std::list< TrigVertexFitInputTrack * > * getTracks()
lists of tracks in the vertex
void setMass(double)
sets calculated mass of the vertex
bool isReadyForFit()
vertex status
const TrigInDetTrackFitPar * getMotherTrack()
returns mother particle parameters if m_isMassEstimated() is true
void addChi2(double)
increments accumulated of the fit
double mass()
returns calculated mass of the vertex
bool isMassEstimated()
vertex status
void setStatus(int)
sets vertex status flag
const TrigVertexFitInputTrack * contains(const TrigInDetTrack *)
checks whether L2 track is in the vertex
double chi2()
returns accumulated of the fit
double m_Rk[MAX_SIZE_VERT_COVM]
bool prepareForFit()
resets all internal structures + initialization of the covariance
std::list< TrigVertexFitConstraint * > * getConstraints()
lists of all constraints imposed on the vertex
double * getParametersVector()
returns vector of vertex fit parameters: vertex position + refitted track momenta at-perigee (sic !...
void reset()
resets all internal structures
int ndof()
returns accumulated number-of-degree-of-freedom of the fit
TrigInDetTrackFitPar * m_P
double massVariance()
returns variance of the calculated mass of the vertex
std::list< TrigVertexFitInputTrack * > * m_pvTracks
TrigL2Vertex & operator=(const TrigL2Vertex &)=delete
int getNumberOfTracks()
double m_chiSquared
int getStatus()
returns vertex status flag
double m_Gk[MAX_SIZE_VERT_COVM][MAX_SIZE_VERT_COVM]
virtual void updateVertex(class TrigL2Vertex *)
implementation of abstract method from the base class
TrigVertexFitConstraint(double, const TrigVertexFitInputTrack *, const TrigVertexFitInputTrack *)
two-track mass constraint
virtual double getChi2Distance(class TrigL2Vertex *)
implementation of abstract method from the base class
virtual MsgStream & report(MsgStream &) const
double calculateInvariantMass(TrigL2Vertex *pV)
std::list< const TrigVertexFitInputTrack * > m_trackList
double getValue()
returns a mass of the constraint
int getTrackType()
0: L2 track, 1: EF(offline) track
int getIndex() const
to be used by TrigVertexingTool
virtual void updateVertex(class TrigL2Vertex *)
implementation of abstract method from the base class
void mask()
sets isActive to false
double m_PerigeeCovariance[5][5]
const double * Perigee() const
track parameters at the perigee
bool isActive()
if true this track will be used in the vertex fit otherwise it will be masked
const TrigInDetTrack * m_pTrigTrack
void setMass(double)
sets a mass of this particle
TrigVertexFitInputTrack(const TrigInDetTrack *, double)
constructor for L2 tracks
const TrigInDetTrack * getTrigTrack()
getter for L2 tracks
double PerigeeCovariance(int, int) const
covariance of track parameters at the perigee
void activate()
sets isActive to true
const Trk::Track * m_pTrkTrack
double getMass() const
gets a mass of this particle
bool linearize(class TrigL2Vertex *)
re-calculates linearization of the measurement model in the vicinity of parameters provided by input ...
void initializeVertex(class TrigL2Vertex *)
resets and fills its part of the covariance and parameter vector
const Trk::Track * getTrkTrack()
getter for EF (offline) tracks
virtual double getChi2Distance(class TrigL2Vertex *)
implementation of abstract method from the base class
virtual MsgStream & report(MsgStream &) const
void setIndex(int)
to be used by TrigVertexingTool
This is the implementation of classes used by TrigL2VertexFitter:
virtual double getChi2Distance(class TrigL2Vertex *)=0
abstract method
virtual MsgStream & report(MsgStream &) const =0
virtual ~TrigVertexFittingNode()
double m_D[2][MAX_SIZE_VERT_COVM]
virtual void updateVertex(class TrigL2Vertex *)=0
abstract method
Definition node.h:24
MsgStream & msg
Definition testRead.cxx:32