BOSS 7.1.2
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;
14const unsigned int NEtf = 72;
15const unsigned int NStrip = 12;
16
17typedef struct tagItem{
18 Int_t run;
19 Int_t event;
20 Int_t tofid;
21 Int_t strip;
22 Double_t qleft;
23 Double_t qright;
24 Double_t tleft;
25 Double_t tright;
26 Double_t zrhit;
27 Double_t dt;
28 Double_t texp;
29 Double_t path;
30 Double_t phi;
31 Double_t theta;
32 Double_t p;
33 Double_t t0;
34 Double_t q0;
35 Int_t hitcase;
37
38
39class Record{
40 public:
41 Record();
42 ~Record();
43 public:
44 Record( RecBTofCalHit* hit );
45 Record( RecETofCalHit* hit );
46 Record( const rootRecord& one );
47
48 void initial();
49 bool cutBarrel();
50 bool cutEndcap();
51 bool cutEtf();
52
53 int run() const { return m_run; }
54 int event() const { return m_event; }
55 int tofid() const { return m_tofid; }
56 int strip() const { return m_strip; }
57 double qleft() const { return m_qleft; }
58 double qright() const { return m_qright; }
59 double tleft() const { return m_tleft; }
60 double tright() const { return m_tright; }
61 double zrhit() const { return m_zrhit; }
62 double dt() const { return m_dt; }
63 double texp() const { return m_texp; }
64 double path() const { return m_path; }
65 double phi() const { return m_phi; }
66 double theta() const { return m_theta; }
67 double p() const { return m_p; }
68 double t0() const { return m_t0; }
69 double q0() const { return m_q0; }
70 int hitcase() const { return m_hitcase; }
71
72
73 void settleft( double tleft ) { m_tleft = tleft; }
74 void settright( double tright ) { m_tright = tright; }
75 void setT0( double t0 ) { m_t0 = t0; }
76 void setQ0( double q0 ) { m_q0 = q0; }
77
78 private:
79 int m_run;
80 int m_event;
81 int m_tofid;
82 int m_strip;
83 double m_qleft;
84 double m_qright;
85 double m_tleft;
86 double m_tright;
87 double m_zrhit;
88 double m_dt;
89 double m_texp;
90 double m_path;
91 double m_phi;
92 double m_theta;
93 double m_p;
94 double m_t0;
95 double m_q0;
96 int m_hitcase;
97};
98typedef std::vector<Record*> RecordSet;
99
100
102 public:
103 TofDataSet();
104 ~TofDataSet();
105
106 public:
107 RecordSet* getBarrelData( unsigned int i ) const { return barrelData[i]; }
108 RecordSet* getEndcapData( unsigned int i ) const { return endcapData[i]; }
109 RecordSet* getEtfData( unsigned int i ) const { return etfData[i]; }
110
111 public:
112 void setData( TTree*, unsigned int );
113 void setBarrelDataFiles( std::vector<std::string>& );
114 void setEndcapDataFiles( std::vector<std::string>& );
115 void setEtfDataFiles( std::vector<std::string>& );
116
120
121 private:
122 RecordSet* barrelData[NBarrel];
123 RecordSet* endcapData[NEndcap];
124 RecordSet* etfData[NEtf*NStrip];
125};
126
127#endif
ObjectVector< RecBTofCalHit > RecBTofCalHitCol
ObjectVector< RecETofCalHit > RecETofCalHitCol
struct tagItem rootRecord
std::vector< Record * > RecordSet
Definition TofDataSet.h:98
const unsigned int NStrip
Definition TofDataSet.h:15
const unsigned int NEtf
Definition TofDataSet.h:14
const unsigned int NBarrel
Definition TofDataSet.h:12
const unsigned int NEndcap
Definition TofDataSet.h:13
double texp() const
Definition TofDataSet.h:63
double qleft() const
Definition TofDataSet.h:57
double tleft() const
Definition TofDataSet.h:59
int strip() const
Definition TofDataSet.h:56
double p() const
Definition TofDataSet.h:67
bool cutEtf()
Definition cut.cxx:308
double tright() const
Definition TofDataSet.h:60
void settright(double tright)
Definition TofDataSet.h:74
int hitcase() const
Definition TofDataSet.h:70
void initial()
void setT0(double t0)
Definition TofDataSet.h:75
double t0() const
Definition TofDataSet.h:68
double dt() const
Definition TofDataSet.h:62
double phi() const
Definition TofDataSet.h:65
int run() const
Definition TofDataSet.h:53
int event() const
Definition TofDataSet.h:54
void settleft(double tleft)
Definition TofDataSet.h:73
double q0() const
Definition TofDataSet.h:69
double path() const
Definition TofDataSet.h:64
int tofid() const
Definition TofDataSet.h:55
void setQ0(double q0)
Definition TofDataSet.h:76
bool cutBarrel()
Definition cut.cxx:3
bool cutEndcap()
Definition cut.cxx:223
double theta() const
Definition TofDataSet.h:66
double zrhit() const
Definition TofDataSet.h:61
double qright() const
Definition TofDataSet.h:58
RecordSet * getEtfData(unsigned int i) const
Definition TofDataSet.h:109
void setData(TTree *, unsigned int)
void setEtfDataFiles(std::vector< std::string > &)
void setEtfData(RecBTofCalHitCol &)
void setEndcapDataFiles(std::vector< std::string > &)
void setBarrelData(RecBTofCalHitCol &)
RecordSet * getEndcapData(unsigned int i) const
Definition TofDataSet.h:108
RecordSet * getBarrelData(unsigned int i) const
Definition TofDataSet.h:107
void setBarrelDataFiles(std::vector< std::string > &)
void setEndcapData(RecETofCalHitCol &)
double precision pisqo6 one
Definition qlconstants.h:4
Int_t run
Definition TofDataSet.h:18
Double_t tright
Definition TofDataSet.h:25
Int_t tofid
Definition TofDataSet.h:20
Double_t qright
Definition TofDataSet.h:23
Double_t path
Definition TofDataSet.h:29
Double_t t0
Definition TofDataSet.h:33
Double_t texp
Definition TofDataSet.h:28
Double_t phi
Definition TofDataSet.h:30
Int_t event
Definition TofDataSet.h:19
Double_t dt
Definition TofDataSet.h:27
Int_t hitcase
Definition TofDataSet.h:35
Int_t strip
Definition TofDataSet.h:21
Double_t zrhit
Definition TofDataSet.h:26
Double_t q0
Definition TofDataSet.h:34
Double_t tleft
Definition TofDataSet.h:24
Double_t theta
Definition TofDataSet.h:31
Double_t p
Definition TofDataSet.h:32
Double_t qleft
Definition TofDataSet.h:22