BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/EvtRecEvent/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 "ExtEvent/RecExtTrack.h"
13#include "TofRecEvent/RecTofTrack.h"
14#include "EmcRecEventModel/RecEmcShower.h"
15#include "MucRecEvent/RecMucTrack.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
const CLID & CLID_EvtRecTrack
Definition: EventModel.cxx:375
ObjectVector< EvtRecTrack > EvtRecTrackCol
void setTofTrack(const SmartRefVector< RecTofTrack > trk)
EvtRecTrack(const EvtRecTrack &)
void setMdcKalTrack(const RecMdcKalTrack *trk)
void setEmcShower(const RecEmcShower *shower)
void addTofTrack(const SmartRef< RecTofTrack > trk)
EvtRecTrack & operator=(const EvtRecTrack &)
Definition: EvtRecTrack.cxx:31