CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/EvtRecEvent/EvtRecEvent-00-02-03/EvtRecEvent/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"
8#include "EventModel/EventModel.h"
9#include "MdcRecEvent/RecMdcTrack.h"
10#include "MdcRecEvent/RecMdcKalTrack.h"
11#include "MdcRecEvent/RecMdcDedx.h"
12#include "CgemRecEvent/RecCgemTrack.h"
13#include "CgemRecEvent/RecCgemSegment.h"
14#include "CgemRecEvent/RecCgemKalTrack.h"
15#include "CgemRecEvent/RecCgemDedx.h"
16#include "ExtEvent/RecExtTrack.h"
17#include "TofRecEvent/RecTofTrack.h"
18#include "EmcRecEventModel/RecEmcShower.h"
19#include "MucRecEvent/RecMucTrack.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
const CLID & CLID_EvtRecTrack
Definition: EventModel.cxx:448
const CLID & CLID_EvtRecTrack
Definition: EventModel.cxx:448
void setTofTrack(const SmartRefVector< RecTofTrack > trk)
void addTofTrack(const SmartRef< RecTofTrack > trk)
EvtRecTrack & operator=(const EvtRecTrack &)
Definition: EvtRecTrack.cxx:39