CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Tof/tofcalgsec/tofcalgsec-00-02-08/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;
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:
39 public:
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
92class TofDataSet{
93 public:
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
Record(RecBTofCalHit *hit)
void initial()
Record(const rootRecord &one)
bool cutBarrel()
bool cutEndcap()
Record(RecETofCalHit *hit)
void setEndcapDataFiles(std::vector< std::string > &)
void setBarrelData(RecBTofCalHitCol &)
RecordSet * getEndcapData(unsigned int i) const
void setData(TTree *, bool)
RecordSet * getBarrelData(unsigned int i) const
void setBarrelDataFiles(std::vector< std::string > &)
void setEndcapData(RecETofCalHitCol &)