BOSS 6.6.4.p01
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"
16
17using namespace EventModel;
18
19extern const CLID &CLID_EvtRecTrack;
20
21class EvtRecTrack:virtual public ContainedObject {
22 public:
23 virtual const CLID& clID() const {return EvtRecTrack::classID();}
24 static const CLID& classID() { return CLID_EvtRecTrack;}
25
28
30
31 //get Track ID, Particle ID and Data Quality
32 int trackId() const {return m_trackId;}
33 int partId() const {return m_partId;}
34 int quality() const { return m_quality; }
35
36 bool isElectron() const { return (m_partId & 0x01); }
37 bool isMuon() const { return (m_partId & 0x02); }
38 bool isPion() const { return (m_partId & 0x04); }
39 bool isKaon() const { return (m_partId & 0x08); }
40 bool isProton() const { return (m_partId & 0x10); }
41
42 //Sub detector infomation is Valid or not
43 bool isMdcTrackValid() {return (m_originMdcTrack != 0);}
44 bool isMdcKalTrackValid() {return (m_originMdcKalTrack != 0);}
45 bool isMdcDedxValid() {return (m_originMdcDedx != 0);}
46 bool isTofTrackValid() {return (!m_originTofTrack.empty());}
47 bool isEmcShowerValid() {return (m_originEmcShower!= 0);}
48 bool isMucTrackValid() {return (m_originMucTrack != 0);}
49 bool isExtTrackValid() {return (m_originExtTrack != 0);}
50
51 //pointer to sub detector infomation
52
53 RecMdcTrack* mdcTrack() {return m_originMdcTrack;}
54 RecMdcKalTrack* mdcKalTrack() {return m_originMdcKalTrack;}
55 RecMdcDedx* mdcDedx() {return m_originMdcDedx;}
56 RecExtTrack* extTrack() {return m_originExtTrack;}
57 SmartRefVector<RecTofTrack> tofTrack() {return m_originTofTrack;}
58 RecEmcShower* emcShower() {return m_originEmcShower;}
59 RecMucTrack* mucTrack() {return m_originMucTrack;}
60
61
62 // set Track ID, Particle ID and Data Quality
63
64 void setTrackId(const int trkId) {m_trackId = trkId;}
65 void setPartId(const int partId) {m_partId = partId;}
66 void setQuality(const int quality) { m_quality = quality; }
67
68 void tagElectron() { m_partId |= 0x01; }
69 void tagMuon() { m_partId |= 0x02; }
70 void tagPion() { m_partId |= 0x04; }
71 void tagKaon() { m_partId |= 0x08; }
72 void tagProton() { m_partId |= 0x10; }
73
74 // set sub detector pointer
75
76 void setMdcTrack(const RecMdcTrack* trk) {m_originMdcTrack = trk;}
77 void setMdcKalTrack(const RecMdcKalTrack* trk) {m_originMdcKalTrack = trk;}
78 void setMdcDedx(const RecMdcDedx* trk) {m_originMdcDedx = trk;}
79 void setExtTrack(const RecExtTrack* trk) {m_originExtTrack = trk;}
80 void setTofTrack(const SmartRefVector<RecTofTrack> trk) {m_originTofTrack = trk;}
81 void addTofTrack(const SmartRef<RecTofTrack> trk) {m_originTofTrack.push_back(trk);}
82 void setEmcShower(const RecEmcShower* shower) {m_originEmcShower = shower;}
83 void setMucTrack(const RecMucTrack* trk) {m_originMucTrack = trk;}
84
85 // assign operator
86
88
89
90
91 private:
92
93 int m_trackId;
94 // Pid: 0x01 - electron, 0x02 - muon, 0x04 - pion, 0x08 - kaon, 0x10 - proton
95 int m_partId;
96 //data quality: 1 - very good, 2 - available, 3 - normal
97 int m_quality;
98
99 SmartRef<RecMdcTrack> m_originMdcTrack;
100 SmartRef<RecMdcKalTrack> m_originMdcKalTrack;
101 SmartRef<RecMdcDedx> m_originMdcDedx;
102 SmartRef<RecExtTrack> m_originExtTrack;
103 SmartRefVector<RecTofTrack> m_originTofTrack;
104 SmartRef<RecEmcShower> m_originEmcShower;
105 SmartRef<RecMucTrack> m_originMucTrack;
106
107};
108
109typedef ObjectVector<EvtRecTrack> EvtRecTrackCol;
110
111typedef EvtRecTrackCol::iterator EvtRecTrackIterator;
112
113
114
115#endif
EvtRecTrackCol::iterator EvtRecTrackIterator
Definition: EvtRecTrack.h:111
const CLID & CLID_EvtRecTrack
Definition: EventModel.cxx:365
ObjectVector< EvtRecTrack > EvtRecTrackCol
Definition: EvtRecTrack.h:109
bool isMdcDedxValid()
Definition: EvtRecTrack.h:45
bool isMuon() const
Definition: EvtRecTrack.h:37
bool isElectron() const
Definition: EvtRecTrack.h:36
void tagKaon()
Definition: EvtRecTrack.h:71
void tagElectron()
Definition: EvtRecTrack.h:68
void setMucTrack(const RecMucTrack *trk)
Definition: EvtRecTrack.h:83
int quality() const
Definition: EvtRecTrack.h:34
void setQuality(const int quality)
Definition: EvtRecTrack.h:66
void setPartId(const int partId)
Definition: EvtRecTrack.h:65
bool isProton() const
Definition: EvtRecTrack.h:40
void setMdcTrack(const RecMdcTrack *trk)
Definition: EvtRecTrack.h:76
void setTofTrack(const SmartRefVector< RecTofTrack > trk)
Definition: EvtRecTrack.h:80
int trackId() const
Definition: EvtRecTrack.h:32
void tagMuon()
Definition: EvtRecTrack.h:69
virtual const CLID & clID() const
Definition: EvtRecTrack.h:23
RecMucTrack * mucTrack()
Definition: EvtRecTrack.h:59
void setTrackId(const int trkId)
Definition: EvtRecTrack.h:64
bool isPion() const
Definition: EvtRecTrack.h:38
int partId() const
Definition: EvtRecTrack.h:33
RecMdcDedx * mdcDedx()
Definition: EvtRecTrack.h:55
bool isExtTrackValid()
Definition: EvtRecTrack.h:49
void setMdcKalTrack(const RecMdcKalTrack *trk)
Definition: EvtRecTrack.h:77
void setMdcDedx(const RecMdcDedx *trk)
Definition: EvtRecTrack.h:78
RecExtTrack * extTrack()
Definition: EvtRecTrack.h:56
bool isMdcKalTrackValid()
Definition: EvtRecTrack.h:44
bool isMucTrackValid()
Definition: EvtRecTrack.h:48
SmartRefVector< RecTofTrack > tofTrack()
Definition: EvtRecTrack.h:57
void setEmcShower(const RecEmcShower *shower)
Definition: EvtRecTrack.h:82
void addTofTrack(const SmartRef< RecTofTrack > trk)
Definition: EvtRecTrack.h:81
bool isTofTrackValid()
Definition: EvtRecTrack.h:46
RecEmcShower * emcShower()
Definition: EvtRecTrack.h:58
void tagProton()
Definition: EvtRecTrack.h:72
EvtRecTrack & operator=(const EvtRecTrack &)
Definition: EvtRecTrack.cxx:31
bool isMdcTrackValid()
Definition: EvtRecTrack.h:43
bool isEmcShowerValid()
Definition: EvtRecTrack.h:47
RecMdcTrack * mdcTrack()
Definition: EvtRecTrack.h:53
bool isKaon() const
Definition: EvtRecTrack.h:39
void tagPion()
Definition: EvtRecTrack.h:70
RecMdcKalTrack * mdcKalTrack()
Definition: EvtRecTrack.h:54
static const CLID & classID()
Definition: EvtRecTrack.h:24
void setExtTrack(const RecExtTrack *trk)
Definition: EvtRecTrack.h:79