BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRecPrimaryVertex.h
Go to the documentation of this file.
1#ifndef Event_EvtRecPrimaryVertex_H
2#define Event_EvtRecPrimaryVertex_H
3
4#include "GaudiKernel/DataObject.h"
5#include "GaudiKernel/ObjectVector.h"
6#include "GaudiKernel/ContainedObject.h"
7#include "GaudiKernel/SmartRef.h"
9#include "CLHEP/Matrix/Vector.h"
10#include "CLHEP/Matrix/SymMatrix.h"
11
12using CLHEP::HepVector;
13using CLHEP::HepSymMatrix;
14using namespace EventModel;
15extern const CLID & CLID_EvtRecPrimaryVertex;
16
17//
18// For Primary Vertex information
19// only 1 primary vertex for every event
20// Author : Kanglin He, Min Xu Date : 2008.11.13
21//
22class EvtRecPrimaryVertex : public DataObject {
23 public:
24 virtual const CLID& clID() const {return EvtRecPrimaryVertex::classID();}
25 static const CLID& classID() {return CLID_EvtRecPrimaryVertex;}
26
29
32
33 bool isValid() const {return m_isValid;}
34 int nTracks() const {return m_nTracks;}
35 const std::vector<int>& trackIdList() const {return m_trackIdList;}
36 double chi2() const {return m_chi2;}
37 int ndof() const {return m_ndof;}
38 int fitMethod() const {return m_fitMethod;}
39 const HepVector& vertex() const {return m_vtx;}
40 const HepSymMatrix& errorVertex() const {return m_Evtx;}
41
42 void setIsValid(bool isValid) {m_isValid = isValid;}
43 void setNTracks(int nTracks) {m_nTracks = nTracks;}
44 void setTrackIdList(const std::vector<int>& trackIdList) {m_trackIdList = trackIdList;}
45 void setChi2(double chi2) {m_chi2 = chi2;}
46 void setNdof(int ndof) {m_ndof = ndof;}
47 void setFitMethod(int fitMethod) {m_fitMethod = fitMethod;}
48 void setVertex(const HepVector& vtx) {m_vtx = vtx;}
49 void setErrorVertex(const HepSymMatrix& Evtx) {m_Evtx = Evtx;}
50
51 private:
52 bool m_isValid;
53 int m_nTracks; //number of tracks contributing to vertex fitting
54 std::vector<int> m_trackIdList; // id list of tracks contributing to vertex fitting
55 double m_chi2; // chi square of vertex fitting
56 int m_ndof; // degree of freedom
57 // for a fixed position => 2n; for unknown position => 2n-3;
58 int m_fitMethod; // vertex fitting algorithm
59 // 0 => global method; 1 => kalman filter method;
60 HepVector m_vtx; // primary vertex position : (Vx, Vy, Vz)
61 HepSymMatrix m_Evtx; // error matrix of primary vertex
62};
63
64//typedef ObjectVector<EvtRecPrimaryVertex> EvtRecPrimaryVertexCol;
65#endif
66
const CLID & CLID_EvtRecPrimaryVertex
Definition: EventModel.cxx:373
void setTrackIdList(const std::vector< int > &trackIdList)
void setVertex(const HepVector &vtx)
EvtRecPrimaryVertex & operator=(const EvtRecPrimaryVertex &)
const HepVector & vertex() const
void setFitMethod(int fitMethod)
static const CLID & classID()
const std::vector< int > & trackIdList() const
void setErrorVertex(const HepSymMatrix &Evtx)
virtual const CLID & clID() const
void setChi2(double chi2)
const HepSymMatrix & errorVertex() const
void setNTracks(int nTracks)
void setIsValid(bool isValid)