forked from GRIFFINCollaboration/NTuple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.cc
389 lines (328 loc) · 26.5 KB
/
Settings.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
#include "Settings.hh"
#include "TEnv.h"
#include "TString.h"
Settings::Settings(std::string fileName, int verbosityLevel)
: fVerbosityLevel(verbosityLevel) {
TEnv env;
env.ReadFile(fileName.c_str(),kEnvLocal);
// env.PrintEnv();
fNtupleName = env.GetValue("NtupleName","/ntuple/ntuple");
fBufferSize = env.GetValue("BufferSize",1024000);
fSortNumberOfEvents = env.GetValue("SortNumberOfEvents",0);
fWriteTree = env.GetValue("WriteTree",true);
fWrite2DHist = env.GetValue("Write2DHist",false);
//fWrite3DHist = env.GetValue("Write3DHist",false);
fWriteNDHist = env.GetValue("WriteNDHist",false);
fWrite2DSGGHist = env.GetValue("Write2DSGGHist",false);
fWriteGriffinAddbackVector = env.GetValue("WriteGriffinAddbackVector",false);
fGriffinAddbackVectorLengthmm = env.GetValue("GriffinAddbackVectorLengthmm",105.0);
fGriffinAddbackVectorDepthmm = env.GetValue("GriffinAddbackVectorDepthmm",45.0);
fGriffinAddbackVectorCrystalFaceDistancemm = env.GetValue("GriffinAddbackVectorCrystalFaceDistancemm",110.0);
// Griffin
fResolution[1000].resize(16);
fThreshold[1000].resize(16,std::vector<double>(4));
fThresholdWidth[1000].resize(16,std::vector<double>(4));
fTimeWindow[1000].resize(16,std::vector<double>(4));
fResolution[1010].resize(16);
fThreshold[1010].resize(16,std::vector<double>(4));
fThresholdWidth[1010].resize(16,std::vector<double>(4));
fTimeWindow[1010].resize(16,std::vector<double>(4));
fResolution[1020].resize(16);
fThreshold[1020].resize(16,std::vector<double>(4));
fThresholdWidth[1020].resize(16,std::vector<double>(4));
fTimeWindow[1020].resize(16,std::vector<double>(4));
fResolution[1030].resize(16);
fThreshold[1030].resize(16,std::vector<double>(4));
fThresholdWidth[1030].resize(16,std::vector<double>(4));
fTimeWindow[1030].resize(16,std::vector<double>(4));
fResolution[1040].resize(16);
fThreshold[1040].resize(16,std::vector<double>(4));
fThresholdWidth[1040].resize(16,std::vector<double>(4));
fTimeWindow[1040].resize(16,std::vector<double>(4));
fResolution[1050].resize(16);
fThreshold[1050].resize(16,std::vector<double>(4));
fThresholdWidth[1050].resize(16,std::vector<double>(4));
fTimeWindow[1050].resize(16,std::vector<double>(4));
// LaBr3
fResolution[2000].resize(16);
fThreshold[2000].resize(16,std::vector<double>(1));
fThresholdWidth[2000].resize(16,std::vector<double>(1));
fTimeWindow[2000].resize(16,std::vector<double>(1));
// Sceptar
fResolution[5000].resize(20);
fThreshold[5000].resize(20,std::vector<double>(1));
fThresholdWidth[5000].resize(20,std::vector<double>(1));
fTimeWindow[5000].resize(20,std::vector<double>(1));
// EightPi
fResolution[6000].resize(20);
fThreshold[6000].resize(20,std::vector<double>(4));
fThresholdWidth[6000].resize(20,std::vector<double>(4));
fTimeWindow[6000].resize(20,std::vector<double>(4));
fResolution[6010].resize(20);
fThreshold[6010].resize(20,std::vector<double>(4));
fThresholdWidth[6010].resize(20,std::vector<double>(4));
fTimeWindow[6010].resize(20,std::vector<double>(4));
fResolution[6020].resize(20);
fThreshold[6020].resize(20,std::vector<double>(4));
fThresholdWidth[6020].resize(20,std::vector<double>(4));
fTimeWindow[6020].resize(20,std::vector<double>(4));
fResolution[6030].resize(20);
fThreshold[6030].resize(20,std::vector<double>(4));
fThresholdWidth[6030].resize(20,std::vector<double>(4));
fTimeWindow[6030].resize(20,std::vector<double>(4));
// Descant
fResolution[8010].resize(15);
fThreshold[8010].resize(15,std::vector<double>(1));
fThresholdWidth[8010].resize(15,std::vector<double>(1));
fTimeWindow[8010].resize(15,std::vector<double>(1));
fResolution[8020].resize(10);
fThreshold[8020].resize(10,std::vector<double>(1));
fThresholdWidth[8020].resize(10,std::vector<double>(1));
fTimeWindow[8020].resize(10,std::vector<double>(1));
fResolution[8030].resize(15);
fThreshold[8030].resize(15,std::vector<double>(1));
fThresholdWidth[8030].resize(15,std::vector<double>(1));
fTimeWindow[8030].resize(15,std::vector<double>(1));
fResolution[8040].resize(20);
fThreshold[8040].resize(20,std::vector<double>(1));
fThresholdWidth[8040].resize(20,std::vector<double>(1));
fTimeWindow[8040].resize(20,std::vector<double>(1));
fResolution[8050].resize(10);
fThreshold[8050].resize(10,std::vector<double>(1));
fThresholdWidth[8050].resize(10,std::vector<double>(1));
fTimeWindow[8050].resize(10,std::vector<double>(1));
//testcan
fResolution[8500].resize(1);
fThreshold[8500].resize(1,std::vector<double>(1));
fThresholdWidth[8500].resize(1,std::vector<double>(1));
fTimeWindow[8500].resize(1,std::vector<double>(1));
// Paces
fResolution[9000].resize(5);
fThreshold[9000].resize(5,std::vector<double>(1));
fThresholdWidth[9000].resize(5,std::vector<double>(1));
fTimeWindow[9000].resize(5,std::vector<double>(1));
double offset, linear, quadratic, cubic;
// Griffin
for(int detector = 0; detector < 16; ++detector) {
for(int crystal = 0; crystal < 4; ++crystal) {
offset = env.GetValue(Form("Griffin.%d.%d.Resolution.Offset",detector,crystal),1.100);
linear = env.GetValue(Form("Griffin.%d.%d.Resolution.Linear",detector,crystal),0.00183744);
quadratic = env.GetValue(Form("Griffin.%d.%d.Resolution.Quadratic",detector,crystal),0.0000007);
cubic = env.GetValue(Form("Griffin.%d.%d.Resolution.Cubic",detector,crystal),0.);
fResolution[1000][detector].push_back(TF1(Form("Griffin.%d.%d.Resolution",detector,crystal),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[1000][detector][crystal] = env.GetValue(Form("Griffin.%d.%d.Threshold.keV",detector,crystal),10.);
fThresholdWidth[1000][detector][crystal] = env.GetValue(Form("Griffin.%d.%d.ThresholdWidth.keV",detector,crystal),2.);
fTimeWindow[1000][detector][crystal] = env.GetValue(Form("Griffin.%d.%d.TimeWindow.sec",detector,crystal),0.);
offset = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.Resolution.Offset",detector,crystal),1.100);
linear = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.Resolution.Linear",detector,crystal),0.00183744);
quadratic = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.Resolution.Quadratic",detector,crystal),0.0000007);
cubic = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.Resolution.Cubic",detector,crystal),0.);
fResolution[1010][detector].push_back(TF1(Form("Griffin.BGO.Front.Left.%d.%d.Resolution",detector,crystal),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[1010][detector][crystal] = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.Threshold.keV",detector,crystal),10.);
fThresholdWidth[1010][detector][crystal] = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.ThresholdWidth.keV",detector,crystal),2.);
fTimeWindow[1010][detector][crystal] = env.GetValue(Form("Griffin.BGO.Front.Left.%d.%d.TimeWindow.sec",detector,crystal),0.);
offset = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.Resolution.Offset",detector,crystal),1.100);
linear = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.Resolution.Linear",detector,crystal),0.00183744);
quadratic = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.Resolution.Quadratic",detector,crystal),0.0000007);
cubic = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.Resolution.Cubic",detector,crystal),0.);
fResolution[1020][detector].push_back(TF1(Form("Griffin.BGO.Front.Right.%d.%d.Resolution",detector,crystal),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[1020][detector][crystal] = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.Threshold.keV",detector,crystal),10.);
fThresholdWidth[1020][detector][crystal] = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.ThresholdWidth.keV",detector,crystal),2.);
fTimeWindow[1020][detector][crystal] = env.GetValue(Form("Griffin.BGO.Front.Right.%d.%d.TimeWindow.sec",detector,crystal),0.);
offset = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.Resolution.Offset",detector,crystal),1.100);
linear = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.Resolution.Linear",detector,crystal),0.00183744);
quadratic = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.Resolution.Quadratic",detector,crystal),0.0000007);
cubic = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.Resolution.Cubic",detector,crystal),0.);
fResolution[1030][detector].push_back(TF1(Form("Griffin.BGO.Side.Left.%d.%d.Resolution",detector,crystal),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[1030][detector][crystal] = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.Threshold.keV",detector,crystal),10.);
fThresholdWidth[1030][detector][crystal] = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.ThresholdWidth.keV",detector,crystal),2.);
fTimeWindow[1030][detector][crystal] = env.GetValue(Form("Griffin.BGO.Side.Left.%d.%d.TimeWindow.sec",detector,crystal),0.);
offset = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.Resolution.Offset",detector,crystal),1.100);
linear = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.Resolution.Linear",detector,crystal),0.00183744);
quadratic = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.Resolution.Quadratic",detector,crystal),0.0000007);
cubic = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.Resolution.Cubic",detector,crystal),0.);
fResolution[1040][detector].push_back(TF1(Form("Griffin.BGO.Side.Right.%d.%d.Resolution",detector,crystal),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[1040][detector][crystal] = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.Threshold.keV",detector,crystal),10.);
fThresholdWidth[1040][detector][crystal] = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.ThresholdWidth.keV",detector,crystal),2.);
fTimeWindow[1040][detector][crystal] = env.GetValue(Form("Griffin.BGO.Side.Right.%d.%d.TimeWindow.sec",detector,crystal),0.);
offset = env.GetValue(Form("Griffin.BGO.Back.%d.%d.Resolution.Offset",detector,crystal),1.100);
linear = env.GetValue(Form("Griffin.BGO.Back.%d.%d.Resolution.Linear",detector,crystal),0.00183744);
quadratic = env.GetValue(Form("Griffin.BGO.Back.%d.%d.Resolution.Quadratic",detector,crystal),0.0000007);
cubic = env.GetValue(Form("Griffin.BGO.Back.%d.%d.Resolution.Cubic",detector,crystal),0.);
fResolution[1050][detector].push_back(TF1(Form("Griffin.BGO.Back.%d.%d.Resolution",detector,crystal),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[1050][detector][crystal] = env.GetValue(Form("Griffin.BGO.Back.%d.%d.Threshold.keV",detector,crystal),10.);
fThresholdWidth[1050][detector][crystal] = env.GetValue(Form("Griffin.BGO.Back.%d.%d.ThresholdWidth.keV",detector,crystal),2.);
fTimeWindow[1050][detector][crystal] = env.GetValue(Form("Griffin.BGO.Back.%d.%d.TimeWindow.sec",detector,crystal),0.);
}
}
// LaBr3
for(int detector = 0; detector < 16; ++detector) {
offset = env.GetValue(Form("LaBr3.%d.Resolution.Offset",detector),1.7006116);
linear = env.GetValue(Form("LaBr3.%d.Resolution.Linear",detector),0.5009382);
quadratic = env.GetValue(Form("LaBr3.%d.Resolution.Quadratic",detector),0.000065451219);
cubic = env.GetValue(Form("LaBr3.%d.Resolution.Cubic",detector),0.);
fResolution[2000][detector].push_back(TF1(Form("LaBr3.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[2000][detector][0] = env.GetValue(Form("LaBr3.%d.Threshold.keV",detector),10.);
fThresholdWidth[2000][detector][0] = env.GetValue(Form("LaBr3.%d.ThresholdWidth.keV",detector),2.);
fTimeWindow[2000][detector][0] = env.GetValue(Form("LaBr3.%d.TimeWindow.sec",detector),0.);
}
// Sceptar
for(int detector = 0; detector < 20; ++detector) {
offset = env.GetValue(Form("Sceptar.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Sceptar.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Sceptar.%d.Resolution.Quadratic",detector),0.0);
cubic = env.GetValue(Form("Sceptar.%d.Resolution.Cubic",detector),0.0);
fResolution[5000][detector].push_back(TF1(Form("Sceptar.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[5000][detector][0] = env.GetValue(Form("Sceptar.%d.Threshold.keV",detector),0.0);
fThresholdWidth[5000][detector][0] = env.GetValue(Form("Sceptar.%d.ThresholdWidth.keV",detector),0.0);
fTimeWindow[5000][detector][0] = env.GetValue(Form("Sceptar.%d.TimeWindow.sec",detector),0.0);
}
// EightPi
for(int detector = 0; detector < 20; ++detector) {
offset = env.GetValue(Form("EightPi.%d.Resolution.Offset",detector),1.100);
linear = env.GetValue(Form("EightPi.%d.Resolution.Linear",detector),0.00183744);
quadratic = env.GetValue(Form("EightPi.%d.Resolution.Quadratic",detector),0.0000007);
cubic = env.GetValue(Form("EightPi.%d.Resolution.Cubic",detector),0.);
fResolution[6000][detector].push_back(TF1(Form("EightPi.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[6000][detector][0] = env.GetValue(Form("EightPi.%d.Threshold.keV",detector),10.);
fThresholdWidth[6000][detector][0] = env.GetValue(Form("EightPi.%d.ThresholdWidth.keV",detector),2.);
fTimeWindow[6000][detector][0] = env.GetValue(Form("EightPi.%d.TimeWindow.sec",detector),0.);
offset = env.GetValue(Form("EightPi.BGO.%d.Resolution.Offset",detector),1.100);
linear = env.GetValue(Form("EightPi.BGO.%d.Resolution.Linear",detector),0.00183744);
quadratic = env.GetValue(Form("EightPi.BGO.%d.Resolution.Quadratic",detector),0.0000007);
cubic = env.GetValue(Form("EightPi.BGO.%d.Resolution.Cubic",detector),0.);
fResolution[6010][detector].push_back(TF1(Form("EightPi.BGO.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[6010][detector][0] = env.GetValue(Form("EightPi.BGO.%d.Threshold.keV",detector),10.);
fThresholdWidth[6010][detector][0] = env.GetValue(Form("EightPi.BGO.%d.ThresholdWidth.keV",detector),2.);
fTimeWindow[6010][detector][0] = env.GetValue(Form("EightPi.BGO.%d.TimeWindow.sec",detector),0.);
offset = env.GetValue(Form("EightPi.BGO.%d.Resolution.Offset",detector),1.100);
linear = env.GetValue(Form("EightPi.BGO.%d.Resolution.Linear",detector),0.00183744);
quadratic = env.GetValue(Form("EightPi.BGO.%d.Resolution.Quadratic",detector),0.0000007);
cubic = env.GetValue(Form("EightPi.BGO.%d.Resolution.Cubic",detector),0.);
fResolution[6020][detector].push_back(TF1(Form("EightPi.BGO.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[6020][detector][0] = env.GetValue(Form("EightPi.BGO.%d.Threshold.keV",detector),10.);
fThresholdWidth[6020][detector][0] = env.GetValue(Form("EightPi.BGO.%d.ThresholdWidth.keV",detector),2.);
fTimeWindow[6020][detector][0] = env.GetValue(Form("EightPi.BGO.%d.TimeWindow.sec",detector),0.);
offset = env.GetValue(Form("EightPi.BGO.%d.Resolution.Offset",detector),1.100);
linear = env.GetValue(Form("EightPi.BGO.%d.Resolution.Linear",detector),0.00183744);
quadratic = env.GetValue(Form("EightPi.BGO.%d.Resolution.Quadratic",detector),0.0000007);
cubic = env.GetValue(Form("EightPi.BGO.%d.Resolution.Cubic",detector),0.);
fResolution[6030][detector].push_back(TF1(Form("EightPi.BGO.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[6030][detector][0] = env.GetValue(Form("EightPi.BGO.%d.Threshold.keV",detector),10.);
fThresholdWidth[6030][detector][0] = env.GetValue(Form("EightPi.BGO.%d.ThresholdWidth.keV",detector),2.);
fTimeWindow[6030][detector][0] = env.GetValue(Form("EightPi.BGO.%d.TimeWindow.sec",detector),0.);
}
// DESCANT
for(int detector = 0; detector < 15; ++detector) {
offset = env.GetValue(Form("Descant.Blue.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Descant.Blue.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Descant.Blue.%d.Resolution.Quadratic",detector),0.009);
cubic = env.GetValue(Form("Descant.Blue.%d.Resolution.Cubic",detector),0.0);
fResolution[8010][detector].push_back(TF1(Form("Descant.Blue.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[8010][detector][0] = env.GetValue(Form("Descant.Blue.%d.Threshold.keV",detector),0.);
fThresholdWidth[8010][detector][0] = env.GetValue(Form("Descant.Blue.%d.ThresholdWidth.keV",detector),0.);
fTimeWindow[8010][detector][0] = env.GetValue(Form("Descant.Blue.%d.TimeWindow.sec",detector),0.);
}
for(int detector = 0; detector < 10; ++detector) {
offset = env.GetValue(Form("Descant.Green.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Descant.Green.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Descant.Green.%d.Resolution.Quadratic",detector),0.009);
cubic = env.GetValue(Form("Descant.Green.%d.Resolution.Cubic",detector),0.0);
fResolution[8020][detector].push_back(TF1(Form("Descant.Green.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[8020][detector][0] = env.GetValue(Form("Descant.Green.%d.Threshold.keV",detector),0.);
fThresholdWidth[8020][detector][0] = env.GetValue(Form("Descant.Green.%d.ThresholdWidth.keV",detector),0.);
fTimeWindow[8020][detector][0] = env.GetValue(Form("Descant.Green.%d.TimeWindow.sec",detector),0.);
}
for(int detector = 0; detector < 15; ++detector) {
offset = env.GetValue(Form("Descant.Red.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Descant.Red.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Descant.Red.%d.Resolution.Quadratic",detector),0.009);
cubic = env.GetValue(Form("Descant.Red.%d.Resolution.Cubic",detector),0.0);
fResolution[8030][detector].push_back(TF1(Form("Descant.Red.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[8030][detector][0] = env.GetValue(Form("Descant.Red.%d.Threshold.keV",detector),0.);
fThresholdWidth[8030][detector][0] = env.GetValue(Form("Descant.Red.%d.ThresholdWidth.keV",detector),0.);
fTimeWindow[8030][detector][0] = env.GetValue(Form("Descant.Red.%d.TimeWindow.sec",detector),0.);
}
for(int detector = 0; detector < 20; ++detector) {
offset = env.GetValue(Form("Descant.White.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Descant.White.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Descant.White.%d.Resolution.Quadratic",detector),0.009);
cubic = env.GetValue(Form("Descant.White.%d.Resolution.Cubic",detector),0.0);
fResolution[8040][detector].push_back(TF1(Form("Descant.White.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[8040][detector][0] = env.GetValue(Form("Descant.White.%d.Threshold.keV",detector),0.);
fThresholdWidth[8040][detector][0] = env.GetValue(Form("Descant.White.%d.ThresholdWidth.keV",detector),0.);
fTimeWindow[8040][detector][0] = env.GetValue(Form("Descant.White.%d.TimeWindow.sec",detector),0.);
}
for(int detector = 0; detector < 10; ++detector) {
offset = env.GetValue(Form("Descant.Yellow.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Descant.Yellow.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Descant.Yellow.%d.Resolution.Quadratic",detector),0.009);
cubic = env.GetValue(Form("Descant.Yellow.%d.Resolution.Cubic",detector),0.0);
fResolution[8050][detector].push_back(TF1(Form("Descant.Yellow.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[8050][detector][0] = env.GetValue(Form("Descant.Yellow.%d.Threshold.keV",detector),0.);
fThresholdWidth[8050][detector][0] = env.GetValue(Form("Descant.Yellow.%d.ThresholdWidth.keV",detector),0.);
fTimeWindow[8050][detector][0] = env.GetValue(Form("Descant.Yellow.%d.TimeWindow.sec",detector),0.);
}
//testcan
double fanoFactor = env.GetValue("Testcan.Resolution.FanoFactor",20.);
fResolution[8500][0].push_back(TF1("Testcan.Resolution",Form("%f*TMath::Sqrt(x)",fanoFactor), 0., 100000.));
fThreshold[8500][0][0] = env.GetValue("Testcan.Threshold.keV",0.);
fThresholdWidth[8500][0][0] = env.GetValue("Testcan.ThresholdWidth.keV",0.);
fTimeWindow[8500][0][0] = env.GetValue("Testcan.TimeWindow.sec",0.);
// Paces
for(int detector = 0; detector < 5; ++detector) {
offset = env.GetValue(Form("Paces.%d.Resolution.Offset",detector),0.0);
linear = env.GetValue(Form("Paces.%d.Resolution.Linear",detector),0.0);
quadratic = env.GetValue(Form("Paces.%d.Resolution.Quadratic",detector),0.0);
cubic = env.GetValue(Form("Paces.%d.Resolution.Cubic",detector),0.0);
fResolution[9000][detector].push_back(TF1(Form("Paces.%d.Resolution",detector),
Form("(TMath::Sqrt((%f+%f*x+%f*x*x+%f*x*x*x)))/(2.*TMath::Sqrt(2.*TMath::Log(2.)))",offset, linear, quadratic, cubic),0.,100000.));
fThreshold[9000][detector][0] = env.GetValue(Form("Paces.%d.Threshold.keV",detector),0.0);
fThresholdWidth[9000][detector][0] = env.GetValue(Form("Paces.%d.ThresholdWidth.keV",detector),0.0);
fTimeWindow[9000][detector][0] = env.GetValue(Form("Paces.%d.TimeWindow.sec",detector),0.0);
}
fNofBins["Statistics"] = env.GetValue("Histogram.Statistics.NofBins",64);
fRangeLow["Statistics"] = env.GetValue("Histogram.Statistics.RangeLow.keV",0.);
fRangeHigh["Statistics"] = env.GetValue("Histogram.Statistics.RangeHigh.keV",64.);
fNofBins["Griffin1D"] = env.GetValue("Histogram.1D.Griffin.NofBins",4096);
fRangeLow["Griffin1D"] = env.GetValue("Histogram.1D.Griffin.RangeLow.keV",0.5);
fRangeHigh["Griffin1D"] = env.GetValue("Histogram.1D.Griffin.RangeHigh.keV",4096.5);
fNofBins["0RES_Griffin1D"] = env.GetValue("Histogram.1D.Griffin.NofBins",4096);
fRangeLow["0RES_Griffin1D"] = env.GetValue("Histogram.1D.Griffin.RangeLow.keV",0.5);
fRangeHigh["0RES_Griffin1D"] = env.GetValue("Histogram.1D.Griffin.RangeHigh.keV",4096.5);
fNofBins["Griffin2D"] = env.GetValue("Histogram.2D.Griffin.NofBins",4096);
fRangeLow["Griffin2D"] = env.GetValue("Histogram.2D.Griffin.RangeLow.keV",0.5);
fRangeHigh["Griffin2D"] = env.GetValue("Histogram.2D.Griffin.RangeHigh.keV",4096.5);
fNofBins["0RES_Griffin2D"] = env.GetValue("Histogram.2D.Griffin.NofBins",4096);
fRangeLow["0RES_Griffin2D"] = env.GetValue("Histogram.2D.Griffin.RangeLow.keV",0.5);
fRangeHigh["0RES_Griffin2D"] = env.GetValue("Histogram.2D.Griffin.RangeHigh.keV",4096.5);
//fNofBins["Griffin3D"] = env.GetValue("Histogram.3D.Griffin.NofBins",500);
//fRangeLow["Griffin3D"] = env.GetValue("Histogram.3D.Griffin.RangeLow.keV",0.5);
// fRangeHigh["Griffin3D"] = env.GetValue("Histogram.3D.Griffin.RangeHigh.keV",500.5);
fNofBins["GriffinND"] = env.GetValue("Histogram.ND.Griffin.NofBins",500);
fRangeLow["GriffinND"] = env.GetValue("Histogram.ND.Griffin.RangeLow.keV",0.5);
fRangeHigh["GriffinND"] = env.GetValue("Histogram.ND.Griffin.RangeHigh.keV",500.5);
fNofBins["Descant1D"] = env.GetValue("Histogram.1D.Descant.NofBins",4096);
fRangeLow["Descant1D"] = env.GetValue("Histogram.1D.Descant.RangeLow.keV",0.5);
fRangeHigh["Descant1D"] = env.GetValue("Histogram.1D.Descant.RangeHigh.keV",4096.5);
fNofBins["0RES_Descant1D"] = env.GetValue("Histogram.1D.Descant.NofBins",4096);
fRangeLow["0RES_Descant1D"] = env.GetValue("Histogram.1D.Descant.RangeLow.keV",0.5);
fRangeHigh["0RES_Descant1D"] = env.GetValue("Histogram.1D.Descant.RangeHigh.keV",4096.5);
}