CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
TofDataSet.h
Go to the documentation of this file.
1#ifndef TOFDATASET_H
2#define TOFDATASET_H
3
6#include "TChain.h"
7#include "TTree.h"
8#include <string>
9
10using namespace std;
11
12const unsigned int NBarrel = 176;
13const unsigned int NEndcap = 96;
14
15typedef struct tagItem{
16 Int_t run;
17 Int_t event;
18 Int_t tofid;
19 Double_t qleft;
20 Double_t qright;
21 Double_t tleft;
22 Double_t tright;
23 Double_t zrhit;
24 Double_t texp;
25 Double_t path;
26 Double_t phi;
27 Double_t theta;
28 Double_t p;
29 Double_t t0;
30 Double_t q0;
31 Int_t hitcase;
33
34
35class Record{
36 public:
37 Record();
38 ~Record();
39 public:
40 Record( RecBTofCalHit* hit );
41 Record( RecETofCalHit* hit );
42 Record( const rootRecord& one );
43
44 void initial();
45 bool cutBarrel();
46 bool cutEndcap();
47
48 int run() const { return m_run; }
49 int event() const { return m_event; }
50 int tofid() const { return m_tofid; }
51 double qleft() const { return m_qleft; }
52 double qright() const { return m_qright; }
53 double tleft() const { return m_tleft; }
54 double tright() const { return m_tright; }
55 double zrhit() const { return m_zrhit; }
56 double texp() const { return m_texp; }
57 double path() const { return m_path; }
58 double phi() const { return m_phi; }
59 double theta() const { return m_theta; }
60 double p() const { return m_p; }
61 double t0() const { return m_t0; }
62 double q0() const { return m_q0; }
63 int hitcase() const { return m_hitcase; }
64
65
66 void settleft( double tleft ) { m_tleft = tleft; }
67 void settright( double tright ) { m_tright = tright; }
68 void setT0( double t0 ) { m_t0 = t0; }
69 void setQ0( double q0 ) { m_q0 = q0; }
70
71 private:
72 int m_run;
73 int m_event;
74 int m_tofid;
75 double m_qleft;
76 double m_qright;
77 double m_tleft;
78 double m_tright;
79 double m_zrhit;
80 double m_texp;
81 double m_path;
82 double m_phi;
83 double m_theta;
84 double m_p;
85 double m_t0;
86 double m_q0;
87 int m_hitcase;
88};
89typedef std::vector<Record*> RecordSet;
90
91
93 public:
94 TofDataSet();
96
97 public:
98 RecordSet* getBarrelData( unsigned int i ) const { return barrelData[i]; }
99 RecordSet* getEndcapData( unsigned int i ) const { return endcapData[i]; }
100
101 public:
102 void setData( TTree*, bool );
103 void setBarrelDataFiles( std::vector<std::string>& );
104 void setEndcapDataFiles( std::vector<std::string>& );
105
108
109 private:
110 RecordSet* barrelData[NBarrel];
111 RecordSet* endcapData[NEndcap];
112};
113
114#endif
const DifNumber one
ObjectVector< RecBTofCalHit > RecBTofCalHitCol
ObjectVector< RecETofCalHit > RecETofCalHitCol
struct tagItem rootRecord
std::vector< Record * > RecordSet
Definition TofDataSet.h:89
const unsigned int NBarrel
Definition TofDataSet.h:12
const unsigned int NEndcap
Definition TofDataSet.h:13
double texp() const
Definition TofDataSet.h:56
double qleft() const
Definition TofDataSet.h:51
double tleft() const
Definition TofDataSet.h:53
double p() const
Definition TofDataSet.h:60
double tright() const
Definition TofDataSet.h:54
void settright(double tright)
Definition TofDataSet.h:67
int hitcase() const
Definition TofDataSet.h:63
void initial()
void setT0(double t0)
Definition TofDataSet.h:68
double t0() const
Definition TofDataSet.h:61
double phi() const
Definition TofDataSet.h:58
int run() const
Definition TofDataSet.h:48
int event() const
Definition TofDataSet.h:49
void settleft(double tleft)
Definition TofDataSet.h:66
double q0() const
Definition TofDataSet.h:62
double path() const
Definition TofDataSet.h:57
int tofid() const
Definition TofDataSet.h:50
void setQ0(double q0)
Definition TofDataSet.h:69
bool cutBarrel()
Definition cut.cxx:3
bool cutEndcap()
Definition cut.cxx:88
double theta() const
Definition TofDataSet.h:59
double zrhit() const
Definition TofDataSet.h:55
double qright() const
Definition TofDataSet.h:52
void setEndcapDataFiles(std::vector< std::string > &)
void setBarrelData(RecBTofCalHitCol &)
RecordSet * getEndcapData(unsigned int i) const
Definition TofDataSet.h:99
void setData(TTree *, bool)
RecordSet * getBarrelData(unsigned int i) const
Definition TofDataSet.h:98
void setBarrelDataFiles(std::vector< std::string > &)
void setEndcapData(RecETofCalHitCol &)
Int_t run
Definition TofDataSet.h:16
Double_t tright
Definition TofDataSet.h:22
Int_t tofid
Definition TofDataSet.h:18
Double_t qright
Definition TofDataSet.h:20
Double_t path
Definition TofDataSet.h:25
Double_t t0
Definition TofDataSet.h:29
Double_t texp
Definition TofDataSet.h:24
Double_t phi
Definition TofDataSet.h:26
Int_t event
Definition TofDataSet.h:17
Int_t hitcase
Definition TofDataSet.h:31
Double_t zrhit
Definition TofDataSet.h:23
Double_t q0
Definition TofDataSet.h:30
Double_t tleft
Definition TofDataSet.h:21
Double_t theta
Definition TofDataSet.h:27
Double_t p
Definition TofDataSet.h:28
Double_t qleft
Definition TofDataSet.h:19