24 for(
unsigned int i = 0; i <
set->GetNumberOfFebexSfps(); ++i ) {
34 for(
unsigned int j = 0; j <
set->GetNumberOfFebexBoards(); ++j )
152 std::string hname, htitle;
153 std::string dirname, maindirname, subdirname;
174 for(
unsigned int i = 0; i <
set->GetNumberOfFebexSfps(); ++i ) {
186 for(
unsigned int j = 0; j <
set->GetNumberOfFebexBoards(); ++j ) {
193 dirname = maindirname +
"sfp_" + std::to_string(i);
194 dirname +=
"/board_" + std::to_string(j);
201 for(
unsigned int k = 0; k <
set->GetNumberOfFebexChannels(); ++k ) {
204 hname =
"febex_" + std::to_string(i);
205 hname +=
"_" + std::to_string(j);
206 hname +=
"_" + std::to_string(k);
209 htitle =
"Raw FEBEX spectra for SFP " + std::to_string(i);
210 htitle +=
", board " + std::to_string(j);
211 htitle +=
", channel " + std::to_string(k);
212 htitle +=
";Charge value;Counts";
214 hfebex_qshort[i][j][k] =
new TH1F( hname.data(), htitle.data(), 16384, 0, (
unsigned long long)1<<16 );
218 hname =
"febex_" + std::to_string(i);
219 hname +=
"_" + std::to_string(j);
220 hname +=
"_" + std::to_string(k);
223 htitle =
"Raw FEBEX spectra for SFP " + std::to_string(i);
224 htitle +=
", board " + std::to_string(j);
225 htitle +=
", channel " + std::to_string(k);
226 htitle +=
";Charge value;Counts";
232 hname =
"febex_" + std::to_string(i);
233 hname +=
"_" + std::to_string(j);
234 hname +=
"_" + std::to_string(k);
237 htitle =
"Calibrated FEBEX spectra for SFP " + std::to_string(i);
238 htitle +=
", board " + std::to_string(j);
239 htitle +=
", channel " + std::to_string(k);
240 htitle +=
";Energy (keV);Counts per 0.5 keV";
243 unsigned int ebins = 8000;
245 float emax = 4000.0 + emin;
248 if( (
cal->FebexType(i,j,k) ==
"Qshort" &&
cal->FebexGain(i,j,k) > 50 )
249 || (
cal->FebexType(i,j,k) ==
"Qint" &&
cal->FebexGain(i,j,k) > 0.005 ) ) {
253 emax = 2000000.0 + emin;
258 else if( (
cal->FebexType(i,j,k) ==
"Qshort" &&
cal->FebexGain(i,j,k) > 5 )
259 || (
cal->FebexType(i,j,k) ==
"Qint" &&
cal->FebexGain(i,j,k) > 0.0005 ) ) {
263 emax = 4000.0 + emin;
268 else if( (
cal->FebexType(i,j,k) ==
"Qshort" &&
cal->FebexGain(i,j,k) > 0.1 )
269 || (
cal->FebexType(i,j,k) ==
"Qint" &&
cal->FebexGain(i,j,k) > 0.00001 ) ) {
273 emax = 200000.0 + emin;
277 hfebex_cal[i][j][k] =
new TH1F( hname.data(), htitle.data(),
282 hname =
"febex_" + std::to_string(i);
283 hname +=
"_" + std::to_string(j);
284 hname +=
"_" + std::to_string(k);
287 htitle =
"MWD FEBEX spectra for SFP " + std::to_string(i);
288 htitle +=
", board " + std::to_string(j);
289 htitle +=
", channel " + std::to_string(k);
290 htitle +=
";Energy (keV);Counts per 0.5 keV";
292 hfebex_mwd[i][j][k] =
new TH1F( hname.data(), htitle.data(), 32768, -0.25, 16383.75 );
298 hname =
"hfebex_hit_" + std::to_string(i);
299 hname +=
"_" + std::to_string(j);
300 htitle =
"Profile of ts versus hit_id in SFP " + std::to_string(i);
301 htitle +=
", board " + std::to_string(j);
302 hfebex_hit[i][j] =
new TProfile( hname.data(), htitle.data(), 10800, 0., 108000.,
"" );
306 hname =
"hfebex_pause_" + std::to_string(i);
307 hname +=
"_" + std::to_string(j);
308 htitle =
"Profile of ts versus pause events in SFP " + std::to_string(i);
309 htitle +=
", board " + std::to_string(j);
310 hfebex_pause[i][j] =
new TProfile( hname.data(), htitle.data(), 1000, 0., 10000.,
"" );
314 hname =
"hfebex_resume_" + std::to_string(i);
315 hname +=
"_" + std::to_string(j);
316 htitle =
"Profile of ts versus resume events in SFP " + std::to_string(i);
317 htitle +=
", board " + std::to_string(j);
318 hfebex_resume[i][j] =
new TProfile( hname.data(), htitle.data(), 1000, 0., 10000.,
"" );
322 hname =
"hfebex_sync_" + std::to_string(i);
323 hname +=
"_" + std::to_string(j);
324 htitle =
"Profile of external sync trigger ts versus hit_id";
325 hfebex_sync[i][j] =
new TProfile( hname.data(), htitle.data(), 10800, 0., 108000.,
"" );
340 for(
unsigned int i = 0; i <
set->GetNumberOfDgfModules(); ++i ) {
343 hdgf_cal[i].resize(
set->GetNumberOfDgfChannels() );
345 for(
unsigned int j = 0; j <
set->GetNumberOfDgfChannels(); ++j ) {
348 dirname = maindirname +
"dgf_" + std::to_string(i);
354 hname =
"dgf_" + std::to_string(i);
355 hname +=
"_" + std::to_string(j);
358 htitle =
"Raw DGF spectra for module " + std::to_string(i);
359 htitle +=
", channel " + std::to_string(j);
360 htitle +=
";Charge value;Counts";
362 hdgf_qshort[i][j] =
new TH1F( hname.data(), htitle.data(), 16384, 0, 65536 );
366 hname =
"dgf_" + std::to_string(i);
367 hname +=
"_" + std::to_string(j);
370 htitle =
"Calibrated DGF spectra for module " + std::to_string(i);
371 htitle +=
", channel " + std::to_string(j);
372 htitle +=
";Energy (keV);Counts per 0.5 keV";
375 unsigned int ebins = 8000;
377 float emax = 4000.0 + emin;
379 hdgf_cal[i][j] =
new TH1F( hname.data(), htitle.data(), ebins, emin, emax );
387 for(
unsigned int i = 0; i <
set->GetNumberOfAdcModules(); ++i ) {
390 hadc_cal[i].resize(
set->GetMaximumNumberOfAdcChannels() );
393 dirname = maindirname +
"adc_" + std::to_string(i);
398 for(
unsigned int j = 0; j <
set->GetMaximumNumberOfAdcChannels(); ++j ) {
401 hname =
"adc_" + std::to_string(i);
402 hname +=
"_" + std::to_string(j);
405 htitle =
"Raw ADC spectra for module " + std::to_string(i);
406 htitle +=
", channel " + std::to_string(j);
407 htitle +=
";Charge value;Counts";
409 hadc_qshort[i][j] =
new TH1F( hname.data(), htitle.data(), 8192, 0, 8192 );
413 hname =
"adc_" + std::to_string(i);
414 hname +=
"_" + std::to_string(j);
417 htitle =
"Calibrated ADC spectra for module " + std::to_string(i);
418 htitle +=
", channel " + std::to_string(j);
419 htitle +=
";Energy (keV);Counts per 0.5 keV";
422 unsigned int ebins = 6000;
424 float emax = 1.2e6 + emin;
426 hadc_cal[i][j] =
new TH1F( hname.data(), htitle.data(), ebins, emin, emax );
436 hhit_time =
new TH1F(
"hhit_time",
"Hit time distribution", 3200, -16000, 16000 );