1 |
#include <TTree.h> |
2 |
#include <TClassEdit.h> |
3 |
#include <TObject.h> |
4 |
#include <TList.h> |
5 |
#include <TSystem.h> |
6 |
#include <TSystemDirectory.h> |
7 |
#include <TString.h> |
8 |
#include <TFile.h> |
9 |
#include <TClass.h> |
10 |
#include <TCanvas.h> |
11 |
#include <TH1.h> |
12 |
#include <TH1F.h> |
13 |
#include <TH2D.h> |
14 |
#include <TLatex.h> |
15 |
#include <TPad.h> |
16 |
#include <TPaveLabel.h> |
17 |
#include <TChain.h> |
18 |
#include <caloclassesfun.h> |
19 |
ClassImp(CalorimeterCalibration); |
20 |
ClassImp(CalorimeterCalibScan); |
21 |
ClassImp(CalorimeterLevel1); |
22 |
ClassImp(CalorimeterLevel2); |
23 |
ClassImp(CalorimeterADCRAW); |
24 |
|
25 |
CalorimeterCalibration::CalorimeterCalibration() { |
26 |
fname = "dw_000000_000.dat"; |
27 |
status = 0; |
28 |
for (Int_t i=0; i<2;i++){ |
29 |
for (Int_t j=0; j<22;j++){ |
30 |
for (Int_t m=0; m<96;m++){ |
31 |
mip[i][j][m] = 0.; |
32 |
ermip[i][j][m] = 0.; |
33 |
chi2[i][j][m] = 0.; |
34 |
ndf[i][j][m] = 0.; |
35 |
mask[i][j][m] = 0.; |
36 |
for (Int_t a = 0; a < 4 ; a++){ |
37 |
fp[a][i][j][m] = 0.; |
38 |
fpe[a][i][j][m] = 0.; |
39 |
}; |
40 |
}; |
41 |
}; |
42 |
}; |
43 |
}; |
44 |
|
45 |
CalorimeterCalibScan::CalorimeterCalibScan() { |
46 |
calno = 0.; |
47 |
evno = 0; |
48 |
for (Int_t a = 0; a < 4 ; a++){ |
49 |
etime[a] = 0; |
50 |
cperror[a] = 0.; |
51 |
cstwerr[a] = 0; |
52 |
}; |
53 |
for (Int_t i=0; i<2;i++){ |
54 |
for (Int_t j=0; j<22;j++){ |
55 |
for (Int_t m=0; m<96;m++){ |
56 |
calped[i][j][m] = 0.; |
57 |
calgood[i][j][m] = 0.; |
58 |
calrms[i][j][m] = 0.; |
59 |
if ( m < 6){ |
60 |
calbase[i][j][m] = 0.; |
61 |
calthr[i][j][m] = 0.; |
62 |
calvar[i][j][m] = 0.; |
63 |
}; |
64 |
}; |
65 |
}; |
66 |
}; |
67 |
}; |
68 |
|
69 |
|
70 |
void CalorimeterCalibScan::Clear(){ |
71 |
calno = 0.; |
72 |
evno = 0; |
73 |
for (Int_t a = 0; a < 4 ; a++){ |
74 |
etime[a] = 0; |
75 |
cperror[a] = 0.; |
76 |
cstwerr[a] = 0; |
77 |
}; |
78 |
for (Int_t i=0; i<2;i++){ |
79 |
for (Int_t j=0; j<22;j++){ |
80 |
for (Int_t m=0; m<96;m++){ |
81 |
calped[i][j][m] = 0.; |
82 |
calgood[i][j][m] = 0.; |
83 |
calrms[i][j][m] = 0.; |
84 |
if ( m < 6){ |
85 |
calbase[i][j][m] = 0.; |
86 |
calthr[i][j][m] = 0.; |
87 |
calvar[i][j][m] = 0.; |
88 |
}; |
89 |
}; |
90 |
}; |
91 |
}; |
92 |
} |
93 |
|
94 |
CalorimeterLevel1::CalorimeterLevel1() { |
95 |
obt = 0; |
96 |
evno = 0; |
97 |
nobase = 0; |
98 |
nstrip = 0.; |
99 |
qtot = 0.; |
100 |
for (Int_t i=0; i<2;i++){ |
101 |
stwerr[i] = 0; |
102 |
perror[i] = 0.; |
103 |
calevnum[i] = 0.; |
104 |
}; |
105 |
for (Int_t i=0; i<2;i++){ |
106 |
for (Int_t j=0; j<22;j++){ |
107 |
for (Int_t m=0; m<96;m++){ |
108 |
if ( m < 6 ) diffbas[i][j][m] = 0.; |
109 |
estrip[i][j][m] = 0.; |
110 |
good[i][j][m] = 0; |
111 |
}; |
112 |
}; |
113 |
}; |
114 |
} |
115 |
|
116 |
CalorimeterLevel2::CalorimeterLevel2() { |
117 |
OBT = 0; |
118 |
pkt_num = 0; |
119 |
pro_num = 0; |
120 |
trigty = 0.; |
121 |
good = 0; |
122 |
nstrip = 0.; |
123 |
qtot = 0.; |
124 |
ncore = 0.; |
125 |
qcore = 0.; |
126 |
impx = 0.; |
127 |
impy = 0.; |
128 |
tanx = 0.; |
129 |
tany = 0.; |
130 |
nint = 0.; |
131 |
ncyl = 0.; |
132 |
qcyl = 0.; |
133 |
qtrack = 0.; |
134 |
qmax = 0.; |
135 |
nx22 = 0.; |
136 |
qx22 = 0.; |
137 |
qtrackx = 0.; |
138 |
qtracky = 0.; |
139 |
dxtrack = 0.; |
140 |
dytrack = 0.; |
141 |
qlast = 0.; |
142 |
nlast = 0.; |
143 |
qpre = 0.; |
144 |
npre = 0.; |
145 |
qpresh = 0.; |
146 |
npresh = 0.; |
147 |
qlow = 0.; |
148 |
nlow = 0.; |
149 |
qtr = 0.; |
150 |
ntr = 0.; |
151 |
for (Int_t i=0; i<4;i++){ |
152 |
qq[i] = 0.; |
153 |
swerr[i] = 0; |
154 |
perr[i] = 0; |
155 |
crc[i] = 0; |
156 |
}; |
157 |
for (Int_t i=0; i<2;i++){ |
158 |
for (Int_t j=0; j<22;j++){ |
159 |
cibar[j][i] = 0; |
160 |
cibar[j][i] = 0; |
161 |
cbar[j][i] = 0.; |
162 |
tbar[j][i] = 0.; |
163 |
}; |
164 |
}; |
165 |
}; |
166 |
|
167 |
CalorimeterADCRAW::CalorimeterADCRAW() { |
168 |
for (Int_t i=0; i<2;i++){ |
169 |
for (Int_t j=0; j<22;j++){ |
170 |
for (Int_t m=0; m<96;m++){ |
171 |
if ( m < 6 ) diffbas[i][j][m] = 0.; |
172 |
estrip[i][j][m] = 0.; |
173 |
}; |
174 |
}; |
175 |
}; |
176 |
}; |