CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRecTrack.h
Go to the documentation of this file.
1#ifndef Event_EvtRecTrack_H
2#define Event_EvtRecTrack_H
3
4#include "GaudiKernel/ObjectVector.h"
5#include "GaudiKernel/ContainedObject.h"
6#include "GaudiKernel/SmartRef.h"
7#include "GaudiKernel/SmartRefVector.h"
20
21using namespace EventModel;
22
23extern const CLID &CLID_EvtRecTrack;
24
25class EvtRecTrack:virtual public ContainedObject {
26 public:
27 virtual const CLID& clID() const {return EvtRecTrack::classID();}
28 static const CLID& classID() { return CLID_EvtRecTrack;}
29
32
34
35 //get Track ID, Particle ID and Data Quality
36 int trackId() const {return m_trackId;}
37 int partId() const {return m_partId;}
38 int quality() const { return m_quality; }
39
40 bool isElectron() const { return (m_partId & 0x01); }
41 bool isMuon() const { return (m_partId & 0x02); }
42 bool isPion() const { return (m_partId & 0x04); }
43 bool isKaon() const { return (m_partId & 0x08); }
44 bool isProton() const { return (m_partId & 0x10); }
45
46 //Sub detector infomation is Valid or not
47 bool isMdcTrackValid() {return (m_originMdcTrack != 0);}
48 bool isMdcKalTrackValid() {return (m_originMdcKalTrack != 0);}
49 bool isMdcDedxValid() {return (m_originMdcDedx != 0);}
50 bool isCgemTrackValid() {return (m_originCgemTrack != 0);}
51 bool isCgemSegmentValid() {return (m_originCgemSegment != 0);}
52 bool isCgemKalTrackValid() {return (m_originCgemKalTrack != 0);}
53 bool isCgemDedxValid() {return (m_originCgemDedx != 0);}
54 bool isTofTrackValid() {return (!m_originTofTrack.empty());}
55 bool isEmcShowerValid() {return (m_originEmcShower!= 0);}
56 bool isMucTrackValid() {return (m_originMucTrack != 0);}
57 bool isExtTrackValid() {return (m_originExtTrack != 0);}
58
59 //pointer to sub detector infomation
60
61 RecMdcTrack* mdcTrack() {return m_originMdcTrack;}
62 RecMdcKalTrack* mdcKalTrack() {return m_originMdcKalTrack;}
63 RecMdcDedx* mdcDedx() {return m_originMdcDedx;}
64 RecCgemTrack* cgemTrack() {return m_originCgemTrack;}
65 RecCgemSegment* cgemSegment() {return m_originCgemSegment;}
66 RecCgemKalTrack* cgemKalTrack() {return m_originCgemKalTrack;}
67 RecCgemDedx* cgemDedx() {return m_originCgemDedx;}
68 RecExtTrack* extTrack() {return m_originExtTrack;}
69 SmartRefVector<RecTofTrack> tofTrack() {return m_originTofTrack;}
70 RecEmcShower* emcShower() {return m_originEmcShower;}
71 RecMucTrack* mucTrack() {return m_originMucTrack;}
72
73
74 // set Track ID, Particle ID and Data Quality
75
76 void setTrackId(const int trkId) {m_trackId = trkId;}
77 void setPartId(const int partId) {m_partId = partId;}
78 void setQuality(const int quality) { m_quality = quality; }
79
80 void tagElectron() { m_partId |= 0x01; }
81 void tagMuon() { m_partId |= 0x02; }
82 void tagPion() { m_partId |= 0x04; }
83 void tagKaon() { m_partId |= 0x08; }
84 void tagProton() { m_partId |= 0x10; }
85
86 // set sub detector pointer
87
88 void setMdcTrack(const RecMdcTrack* trk) {m_originMdcTrack = trk;}
89 void setMdcKalTrack(const RecMdcKalTrack* trk) {m_originMdcKalTrack = trk;}
90 void setMdcDedx(const RecMdcDedx* trk) {m_originMdcDedx = trk;}
91 void setCgemTrack(const RecCgemTrack* trk) {m_originCgemTrack = trk;}
92 void setCgemSegment(const RecCgemSegment* trk) {m_originCgemSegment = trk;}
93 void setCgemKalTrack(const RecCgemKalTrack* trk) {m_originCgemKalTrack = trk;}
94 void setCgemDedx(const RecCgemDedx* trk) {m_originCgemDedx = trk;}
95 void setExtTrack(const RecExtTrack* trk) {m_originExtTrack = trk;}
96 void setTofTrack(const SmartRefVector<RecTofTrack> trk) {m_originTofTrack = trk;}
97 void addTofTrack(const SmartRef<RecTofTrack> trk) {m_originTofTrack.push_back(trk);}
98 void setEmcShower(const RecEmcShower* shower) {m_originEmcShower = shower;}
99 void setMucTrack(const RecMucTrack* trk) {m_originMucTrack = trk;}
100
101 // assign operator
102
104
105
106
107 private:
108
109 int m_trackId;
110 // Pid: 0x01 - electron, 0x02 - muon, 0x04 - pion, 0x08 - kaon, 0x10 - proton
111 int m_partId;
112 //data quality: 1 - very good, 2 - available, 3 - normal
113 int m_quality;
114
115 SmartRef<RecMdcTrack> m_originMdcTrack;
116 SmartRef<RecMdcKalTrack> m_originMdcKalTrack;
117 SmartRef<RecMdcDedx> m_originMdcDedx;
118 SmartRef<RecCgemTrack> m_originCgemTrack;
119 SmartRef<RecCgemSegment> m_originCgemSegment;
120 SmartRef<RecCgemKalTrack> m_originCgemKalTrack;
121 SmartRef<RecCgemDedx> m_originCgemDedx;
122 SmartRef<RecExtTrack> m_originExtTrack;
123 SmartRefVector<RecTofTrack> m_originTofTrack;
124 SmartRef<RecEmcShower> m_originEmcShower;
125 SmartRef<RecMucTrack> m_originMucTrack;
126
127};
128
129typedef ObjectVector<EvtRecTrack> EvtRecTrackCol;
130
131typedef EvtRecTrackCol::iterator EvtRecTrackIterator;
132
133
134
135#endif
EvtRecTrackCol::iterator EvtRecTrackIterator
const CLID & CLID_EvtRecTrack
ObjectVector< EvtRecTrack > EvtRecTrackCol
void setCgemTrack(const RecCgemTrack *trk)
Definition EvtRecTrack.h:91
void setCgemDedx(const RecCgemDedx *trk)
Definition EvtRecTrack.h:94
bool isMdcDedxValid()
Definition EvtRecTrack.h:49
bool isMuon() const
Definition EvtRecTrack.h:41
bool isElectron() const
Definition EvtRecTrack.h:40
void tagKaon()
Definition EvtRecTrack.h:83
void tagElectron()
Definition EvtRecTrack.h:80
void setMucTrack(const RecMucTrack *trk)
Definition EvtRecTrack.h:99
int quality() const
Definition EvtRecTrack.h:38
void setQuality(const int quality)
Definition EvtRecTrack.h:78
void setPartId(const int partId)
Definition EvtRecTrack.h:77
RecCgemSegment * cgemSegment()
Definition EvtRecTrack.h:65
bool isProton() const
Definition EvtRecTrack.h:44
void setMdcTrack(const RecMdcTrack *trk)
Definition EvtRecTrack.h:88
void setTofTrack(const SmartRefVector< RecTofTrack > trk)
Definition EvtRecTrack.h:96
int trackId() const
Definition EvtRecTrack.h:36
void setCgemSegment(const RecCgemSegment *trk)
Definition EvtRecTrack.h:92
void tagMuon()
Definition EvtRecTrack.h:81
virtual const CLID & clID() const
Definition EvtRecTrack.h:27
RecMucTrack * mucTrack()
Definition EvtRecTrack.h:71
void setTrackId(const int trkId)
Definition EvtRecTrack.h:76
bool isPion() const
Definition EvtRecTrack.h:42
RecCgemKalTrack * cgemKalTrack()
Definition EvtRecTrack.h:66
RecCgemDedx * cgemDedx()
Definition EvtRecTrack.h:67
int partId() const
Definition EvtRecTrack.h:37
RecMdcDedx * mdcDedx()
Definition EvtRecTrack.h:63
bool isExtTrackValid()
Definition EvtRecTrack.h:57
void setMdcKalTrack(const RecMdcKalTrack *trk)
Definition EvtRecTrack.h:89
void setCgemKalTrack(const RecCgemKalTrack *trk)
Definition EvtRecTrack.h:93
bool isCgemSegmentValid()
Definition EvtRecTrack.h:51
void setMdcDedx(const RecMdcDedx *trk)
Definition EvtRecTrack.h:90
RecExtTrack * extTrack()
Definition EvtRecTrack.h:68
bool isMdcKalTrackValid()
Definition EvtRecTrack.h:48
bool isMucTrackValid()
Definition EvtRecTrack.h:56
bool isCgemTrackValid()
Definition EvtRecTrack.h:50
SmartRefVector< RecTofTrack > tofTrack()
Definition EvtRecTrack.h:69
void setEmcShower(const RecEmcShower *shower)
Definition EvtRecTrack.h:98
void addTofTrack(const SmartRef< RecTofTrack > trk)
Definition EvtRecTrack.h:97
bool isTofTrackValid()
Definition EvtRecTrack.h:54
RecEmcShower * emcShower()
Definition EvtRecTrack.h:70
RecCgemTrack * cgemTrack()
Definition EvtRecTrack.h:64
void tagProton()
Definition EvtRecTrack.h:84
EvtRecTrack & operator=(const EvtRecTrack &)
bool isMdcTrackValid()
Definition EvtRecTrack.h:47
bool isCgemDedxValid()
Definition EvtRecTrack.h:53
bool isEmcShowerValid()
Definition EvtRecTrack.h:55
RecMdcTrack * mdcTrack()
Definition EvtRecTrack.h:61
bool isKaon() const
Definition EvtRecTrack.h:43
bool isCgemKalTrackValid()
Definition EvtRecTrack.h:52
void tagPion()
Definition EvtRecTrack.h:82
RecMdcKalTrack * mdcKalTrack()
Definition EvtRecTrack.h:62
static const CLID & classID()
Definition EvtRecTrack.h:28
void setExtTrack(const RecExtTrack *trk)
Definition EvtRecTrack.h:95