BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRecVeeVertex.h
Go to the documentation of this file.
1#ifndef Event_EvtRecVeeVertex_H
2#define Event_EvtRecVeeVertex_H
3
4#include "GaudiKernel/ObjectVector.h"
5#include "GaudiKernel/ContainedObject.h"
6#include "GaudiKernel/SmartRef.h"
7#include "GaudiKernel/SmartRefVector.h"
9#include "CLHEP/Matrix/Vector.h"
10#include "CLHEP/Matrix/SymMatrix.h"
12#include <utility>
13
14using CLHEP::HepVector;
15using CLHEP::HepSymMatrix;
16using namespace EventModel;
17extern const CLID & CLID_EvtRecVeeVertex;
18
19//
20// For "V" Type Vertex : Ks, Lambda, gamma conversion
21// more than 1 vee vertex for every event
22// Author : Kanglin He, Min Xu Date: 2008.11.13
23//
24class EvtRecVeeVertex : virtual public ContainedObject {
25 public:
26 virtual const CLID& clID() const {return EvtRecVeeVertex::classID();}
27 static const CLID& classID() {return CLID_EvtRecVeeVertex;}
28
31
34
35 int vertexId() const {return m_vertexId;}
36 int vertexType() const {return m_vertexType;}
37 double chi2() const {return m_chi2;}
38 int ndof() const {return m_ndof;}
39 double mass() const {return m_mass;}
40 const HepVector& w() const {return m_w;}
41 const HepSymMatrix& Ew() const {return m_Ew;}
42 const std::pair<int, int>& pair() const {return m_pair;}
43 inline int pair(int i) const;
44 int nCharge() const {return m_nCharge;}
45 int nTracks() const {return m_nTracks;}
46 std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack> >& pairDaughters() {
47 return m_daughters;
48 }
49 inline SmartRef<EvtRecTrack>& daughter(int i);
50
51 void setVertexId(int vtxId) {m_vertexId = vtxId;}
52 void setVertexType(int vtxType) {m_vertexType = vtxType;}
53 void setChi2(double chi2) {m_chi2 = chi2;}
54 void setNdof(int ndof) {m_ndof = ndof;}
55 void setMass(double mass) {m_mass = mass;}
56 void setW(const HepVector& w) {m_w = w;}
57 void setEw(const HepSymMatrix& Ew) {m_Ew = Ew;}
58 void setPair(const std::pair<int, int>& pair) {m_pair = pair;}
59 void setNCharge(int nCharge) {m_nCharge = nCharge;}
60 void setNTracks(int nTracks) {m_nTracks = nTracks;}
61 inline void addDaughter(const SmartRef<EvtRecTrack>& track, int i);
62 void setDaughter(const std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack> >& p) {
63 m_daughters = p;
64 }
65
66 private:
67 int m_vertexId;
68 int m_vertexType; // 0 : Ks; 1 : Lambda; 2 : gamma conversion
69 double m_chi2; // chi square of vertex fitting
70 int m_ndof; // degree of freedom
71 double m_mass; // mass of "V" type decay particle
72 HepVector m_w; // (px, py, pz, E, x, y, z) of "V" type decay particle
73 HepSymMatrix m_Ew; // error matrix
74 std::pair<int, int> m_pair; // identification of daughter particles
75 // 1:e 2:mu 3:pion 4:kaon 5:proton
76 int m_nCharge; // total charges of daughter particles
77 int m_nTracks; // total tracks of daughter particles
78 std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack> > m_daughters;
79};
80
81inline int EvtRecVeeVertex::pair(int i) const {
82 if (i == 0) {
83 return m_pair.first;
84 }
85 assert(i == 1);
86 return m_pair.second;
87}
88
89inline SmartRef<EvtRecTrack>& EvtRecVeeVertex::daughter(int i) {
90 if (i == 0) {
91 return m_daughters.first;
92 }
93 assert(i == 1);
94 return m_daughters.second;
95}
96
97inline void EvtRecVeeVertex::addDaughter(const SmartRef<EvtRecTrack>& track, int i) {
98 if (i == 0) {
99 m_daughters.first = track;
100 } else if (i == 1) {
101 m_daughters.second = track;
102 } else {
103 assert(false);
104 }
105}
106
107typedef ObjectVector<EvtRecVeeVertex> EvtRecVeeVertexCol;
108#endif
109
const CLID & CLID_EvtRecVeeVertex
Definition: EventModel.cxx:377
ObjectVector< EvtRecVeeVertex > EvtRecVeeVertexCol
const std::pair< int, int > & pair() const
void setVertexType(int vtxType)
void setChi2(double chi2)
std::pair< SmartRef< EvtRecTrack >, SmartRef< EvtRecTrack > > & pairDaughters()
int vertexType() const
SmartRef< EvtRecTrack > & daughter(int i)
void addDaughter(const SmartRef< EvtRecTrack > &track, int i)
int vertexId() const
void setEw(const HepSymMatrix &Ew)
double mass() const
void setMass(double mass)
void setNdof(int ndof)
void setNTracks(int nTracks)
void setVertexId(int vtxId)
void setPair(const std::pair< int, int > &pair)
EvtRecVeeVertex & operator=(const EvtRecVeeVertex &)
const HepVector & w() const
int nTracks() const
int nCharge() const
double chi2() const
static const CLID & classID()
const HepSymMatrix & Ew() const
void setDaughter(const std::pair< SmartRef< EvtRecTrack >, SmartRef< EvtRecTrack > > &p)
void setW(const HepVector &w)
virtual const CLID & clID() const
int ndof() const
void setNCharge(int nCharge)