BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/TofDataSet.h
Go to the documentation of this file.
1#ifndef TOFDATASET_H
2#define TOFDATASET_H
3
4#include "TofRecEvent/RecBTofCalHit.h"
5#include "TofRecEvent/RecETofCalHit.h"
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:
43 public:
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
101class TofDataSet{
102 public:
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
Record(RecBTofCalHit *hit)
bool cutEtf()
void initial()
Record(const rootRecord &one)
bool cutBarrel()
bool cutEndcap()
Record(RecETofCalHit *hit)
RecordSet * getEtfData(unsigned int i) const
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
RecordSet * getBarrelData(unsigned int i) const
void setBarrelDataFiles(std::vector< std::string > &)
void setEndcapData(RecETofCalHitCol &)
double precision pisqo6 one
Definition: qlconstants.h:4