ATLAS Offline Software
Loading...
Searching...
No Matches
TrigVertex.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGINDETEVENT_TRIGVERTEX_H
6#define TRIGINDETEVENT_TRIGVERTEX_H
7
8#include <list>
9
10#include "CLHEP/Geometry/Point3D.h"
12#include <math.h>
13#include <map>
14#include <ostream>
15#include <memory>
16#include "GaudiKernel/MsgStream.h"
17
26
27typedef std::list< const TrigInDetTrack* > TrackInVertexList;
28
30
31 public:
38
39 // Constructors
40 TrigVertex() : m_x(0.0), m_y(0.0), m_z(0.), m_position(0,0,0),
41 m_chiSquared(0.0), m_nDOF(0),
43 m_ownTracks(false)
44 {
45 for(int i=0;i<6;i++) m_cov[i]=0.0;
49 }
50
51 TrigVertex( double zPosition ) : m_x(0.0), m_y(0.0), m_z(zPosition),m_position(0,0,zPosition),
52 m_chiSquared(0.0), m_nDOF(0),
54 m_ownTracks(false)
55 {
56 for(int i=0;i<6;i++) m_cov[i]=0.0;
60 }
61
62 TrigVertex( double zPosition, AlgoId id ) : m_x(0.0), m_y(0.0), m_z(zPosition), m_position(0,0,zPosition),
63 m_chiSquared(0.0), m_nDOF(0),
64 m_algId(id),
65 m_ownTracks(false)
66 {
67 for(int i=0;i<6;i++) m_cov[i]=0.0;
71 }
72
73 TrigVertex( double zPosition, double cv, AlgoId id ) : m_x(0.0), m_y(0.0), m_z(zPosition), m_position(0,0,zPosition),
74 m_chiSquared(0.0), m_nDOF(0),
75 m_algId(id),
76 m_ownTracks(false)
77 {
78 for(int i=0;i<5;i++) m_cov[i]=0.0;
79 m_cov[5]=cv;
83 }
84
85 TrigVertex(double x, double y, double z, double cv[6], double chi2, int ndf, std::unique_ptr<TrackInVertexList> tracks) :
87 m_nDOF(ndf), m_tracks(std::move(tracks)), m_algId(NULLID),
88 m_ownTracks(false)
89 {
90 for(int i=0;i<6;i++) m_cov[i]=cv[i];
94 }
95
96 TrigVertex(double x, double y, double z, double cv[6], double chi2, int ndf, std::unique_ptr<TrackInVertexList> tracks,
97 double mass, double energyFraction, int n2trkvtx,
99 AlgoId algo_id) :
100 m_x(x), m_y(y), m_z(z), m_mass(mass), m_massVar(0),
102 m_nTwoTracksSecVtx(n2trkvtx),
106 m_nDOF(ndf), m_tracks(std::move(tracks)), m_algId(algo_id),
107 m_ownTracks(false)
108 {
109 for(int i=0;i<6;i++) m_cov[i]=cv[i];
110 }
111
112 // Destructor
114 {
115 if (m_ownTracks) {
116 for (TrackInVertexList::iterator i = m_tracks->begin();
117 i != m_tracks->end();
118 ++i)
119 delete *i;
120 }
121 }
122
123 // Methods to retrieve data members
124
125 void algorithmId(const AlgoId id) { m_algId = id;}
126 AlgoId algorithmId() const { return m_algId;}
127
128 const HepGeom::Point3D<double>& position() const { return m_position; }
129 double chi2() const { return m_chiSquared; }
130 int ndof() const { return m_nDOF; }
131 const double* cov() const { return &m_cov[0];}
132
133 TrackInVertexList* tracks() { return m_tracks.get(); }
134 const TrackInVertexList* tracks() const { return m_tracks.get(); }
135 double x() const { return m_x; }
136 double y() const { return m_y; }
137 double z() const { return m_z; }
138
139 double mass() const { return m_mass; }
140 double massVariance() const { return m_massVar; }
141 const TrigInDetTrackFitPar* getMotherTrack() const { return m_P.get();}
142
143 double energyFraction() const { return m_energyFraction; }
144 int nTwoTracksSecVtx() const { return m_nTwoTracksSecVtx; }
145 double decayLength() const { return m_decayLength; }
147
148 // Methods to set data members
149
150 void setMass (double m) { m_mass = m; }
151 void setMassVariance (double m) { m_massVar = m; }
152 void setMotherTrack(std::unique_ptr<const TrigInDetTrackFitPar> P) { m_P=std::move(P);}
153
154 void setEnergyFraction (double e) { m_energyFraction = e; }
156
157 void setDecayLength (double v) {m_decayLength = v;}
159
160 private:
161 friend class TrigVertexCnv_p1;
162 friend class TrigVertexCnv_p2;
163
164
166 double m_cov[6];
167
169
171
174
175 HepGeom::Point3D<double> m_position;
178 std::unique_ptr<TrackInVertexList> m_tracks;
180 std::unique_ptr<const TrigInDetTrackFitPar> m_P;
182
183};
184
185std::string str( const TrigVertex& v ); //<! printing helper
186MsgStream& operator<< ( MsgStream& m, const TrigVertex& v ); //<! printing helper (wraps above)
187bool operator== ( const TrigVertex& a, const TrigVertex& b );
188inline bool operator!= ( const TrigVertex& a, const TrigVertex& b ) { return !(a==b); }
189
197void diff( const TrigVertex& a, const TrigVertex& b, std::map<std::string, double>& variableChange );
198
199
200CLASS_DEF( TrigVertex , 224516498 , 1 )
201
202#endif // TRIGINDETEVENT_TRIGVERTEX_H
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
static Double_t a
static Double_t P(Double_t *tt, Double_t *par)
bool operator==(const TrigVertex &a, const TrigVertex &b)
void diff(const TrigVertex &a, const TrigVertex &b, std::map< std::string, double > &variableChange)
comparison with feedback Function compares two objects and returns "semi verbose" output in the form ...
std::list< const TrigInDetTrack * > TrackInVertexList
Definition TrigVertex.h:27
MsgStream & operator<<(MsgStream &m, const TrigVertex &v)
bool operator!=(const TrigVertex &a, const TrigVertex &b)
Definition TrigVertex.h:188
encapsulates LVL2 track parameters and covariance matrix The vector of track parameters consists of
encapsulates LVL2 vertex parameters (in the global reference frame), covariance matrix,...
Definition TrigVertex.h:29
double mass() const
vertex mass estimated after the vertex fit
Definition TrigVertex.h:139
void setDecayLength(double v)
Definition TrigVertex.h:157
TrigVertex(double zPosition, AlgoId id)
Definition TrigVertex.h:62
double m_energyFraction
energy ratio E(secondary vertex)/E(jet)
Definition TrigVertex.h:168
double chi2() const
of the vertex fit
Definition TrigVertex.h:129
double m_mass
Definition TrigVertex.h:165
void setDecayLengthSignificance(double v)
Definition TrigVertex.h:158
double massVariance() const
variance of the vertex mass estimate
Definition TrigVertex.h:140
double decayLength() const
decay length to the primary vertex used to find this secondary vertex
Definition TrigVertex.h:145
const HepGeom::Point3D< double > & position() const
position in HepGeom::Point3D<double> form
Definition TrigVertex.h:128
double m_x
Definition TrigVertex.h:165
double decayLengthSignificance() const
decay length divided by its error
Definition TrigVertex.h:146
AlgoId m_algId
Definition TrigVertex.h:179
TrigVertex(double x, double y, double z, double cv[6], double chi2, int ndf, std::unique_ptr< TrackInVertexList > tracks)
Definition TrigVertex.h:85
std::unique_ptr< const TrigInDetTrackFitPar > m_P
Definition TrigVertex.h:180
TrackInVertexList * tracks()
std::list of track pointers associated with the vertex
Definition TrigVertex.h:133
double energyFraction() const
energy ratio E(secondary vertex)/E(jet)
Definition TrigVertex.h:143
double m_chiSquared
Definition TrigVertex.h:176
const TrackInVertexList * tracks() const
std::list of track pointers associated with the vertex
Definition TrigVertex.h:134
@ BSSPLITSITRACKID
Definition TrigVertex.h:33
@ HISTOPRMVTXFTKIDTAU
Definition TrigVertex.h:36
@ HISTOPRMVTXIDSCANID
Definition TrigVertex.h:33
@ BSFULL_STRATEGY_F_ID
Definition TrigVertex.h:36
@ BSFULLSITRACKID
Definition TrigVertex.h:33
@ BSFULL_STRATEGY_A_ID
Definition TrigVertex.h:35
@ HISTOPRMVTXSITRACKID
Definition TrigVertex.h:32
@ BSSPLIT_STRATEGY_A_ID
Definition TrigVertex.h:35
@ HISTOPRMVTXEFID
Definition TrigVertex.h:34
@ BSSPLITIDSCANID
Definition TrigVertex.h:33
@ HISTOPRMVTXFTKID_REFIT
Definition TrigVertex.h:37
@ HISTOPRMVTXFTKID
Definition TrigVertex.h:36
@ BSSPLIT_STRATEGY_B_ID
Definition TrigVertex.h:35
@ BSFULL_STRATEGY_B_ID
Definition TrigVertex.h:35
@ HISTOPRMVTXSITRACKIDTAU
Definition TrigVertex.h:34
@ HISTOPRMVTXEFIDTAU
Definition TrigVertex.h:34
@ BSSPLIT_STRATEGY_F_ID
Definition TrigVertex.h:36
TrigVertex(double zPosition, double cv, AlgoId id)
Definition TrigVertex.h:73
int m_nTwoTracksSecVtx
number of 2-track vertices
Definition TrigVertex.h:170
const TrigInDetTrackFitPar * getMotherTrack() const
parameters of a mother particle reconstructed after the vertex fit
Definition TrigVertex.h:141
double m_decayLengthSignificance
Definition TrigVertex.h:173
void setMotherTrack(std::unique_ptr< const TrigInDetTrackFitPar > P)
Definition TrigVertex.h:152
double x() const
x-position
Definition TrigVertex.h:135
std::unique_ptr< TrackInVertexList > m_tracks
Definition TrigVertex.h:178
int ndof() const
Number of degree-of-freedom of the vertex fit.
Definition TrigVertex.h:130
double z() const
z-position
Definition TrigVertex.h:137
int nTwoTracksSecVtx() const
number of 2-track vertices
Definition TrigVertex.h:144
double m_z
Definition TrigVertex.h:165
bool m_ownTracks
Definition TrigVertex.h:181
void setEnergyFraction(double e)
Definition TrigVertex.h:154
friend class TrigVertexCnv_p2
Definition TrigVertex.h:162
const double * cov() const
covariance of the vertex position, packed as follows
Definition TrigVertex.h:131
void setMass(double m)
Definition TrigVertex.h:150
friend class TrigVertexCnv_p1
Definition TrigVertex.h:161
double m_cov[6]
Definition TrigVertex.h:166
double y() const
y-position
Definition TrigVertex.h:136
void algorithmId(const AlgoId id)
sets author ID - algorithm that's created this vertex
Definition TrigVertex.h:125
AlgoId algorithmId() const
returns author ID - algorithm that's created this vertex
Definition TrigVertex.h:126
double m_decayLength
Definition TrigVertex.h:172
TrigVertex(double zPosition)
Definition TrigVertex.h:51
double m_y
Definition TrigVertex.h:165
void setNTwoTrackSecVtx(int n)
Definition TrigVertex.h:155
HepGeom::Point3D< double > m_position
Definition TrigVertex.h:175
void setMassVariance(double m)
Definition TrigVertex.h:151
TrigVertex(double x, double y, double z, double cv[6], double chi2, int ndf, std::unique_ptr< TrackInVertexList > tracks, double mass, double energyFraction, int n2trkvtx, double decayLength, double decayLengthSignificance, AlgoId algo_id)
Definition TrigVertex.h:96
double m_massVar
Definition TrigVertex.h:165
STL namespace.