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) > 5 )
249 || (
cal->FebexType(i,j,k) ==
"Qint" &&
cal->FebexGain(i,j,k) > 0.0005 ) ) {
253 emax = 2000000.0 + emin;
258 else if( (
cal->FebexType(i,j,k) ==
"Qshort" &&
cal->FebexGain(i,j,k) > 0.1 )
259 || (
cal->FebexType(i,j,k) ==
"Qint" &&
cal->FebexGain(i,j,k) > 0.00001 ) ) {
263 emax = 200000.0 + emin;
267 hfebex_cal[i][j][k] =
new TH1F( hname.data(), htitle.data(),
272 hname =
"febex_" + std::to_string(i);
273 hname +=
"_" + std::to_string(j);
274 hname +=
"_" + std::to_string(k);
277 htitle =
"MWD FEBEX spectra for SFP " + std::to_string(i);
278 htitle +=
", board " + std::to_string(j);
279 htitle +=
", channel " + std::to_string(k);
280 htitle +=
";Energy (keV);Counts per 0.5 keV";
282 hfebex_mwd[i][j][k] =
new TH1F( hname.data(), htitle.data(), 32768, -0.25, 16383.75 );
288 hname =
"hfebex_hit_" + std::to_string(i);
289 hname +=
"_" + std::to_string(j);
290 htitle =
"Profile of ts versus hit_id in SFP " + std::to_string(i);
291 htitle +=
", board " + std::to_string(j);
292 hfebex_hit[i][j] =
new TProfile( hname.data(), htitle.data(), 10800, 0., 108000.,
"" );
296 hname =
"hfebex_pause_" + std::to_string(i);
297 hname +=
"_" + std::to_string(j);
298 htitle =
"Profile of ts versus pause events in SFP " + std::to_string(i);
299 htitle +=
", board " + std::to_string(j);
300 hfebex_pause[i][j] =
new TProfile( hname.data(), htitle.data(), 1000, 0., 10000.,
"" );
304 hname =
"hfebex_resume_" + std::to_string(i);
305 hname +=
"_" + std::to_string(j);
306 htitle =
"Profile of ts versus resume events in SFP " + std::to_string(i);
307 htitle +=
", board " + std::to_string(j);
308 hfebex_resume[i][j] =
new TProfile( hname.data(), htitle.data(), 1000, 0., 10000.,
"" );
312 hname =
"hfebex_sync_" + std::to_string(i);
313 hname +=
"_" + std::to_string(j);
314 htitle =
"Profile of external sync trigger ts versus hit_id";
315 hfebex_sync[i][j] =
new TProfile( hname.data(), htitle.data(), 10800, 0., 108000.,
"" );
330 for(
unsigned int i = 0; i <
set->GetNumberOfDgfModules(); ++i ) {
333 hdgf_cal[i].resize(
set->GetNumberOfDgfChannels() );
335 for(
unsigned int j = 0; j <
set->GetNumberOfDgfChannels(); ++j ) {
338 dirname = maindirname +
"dgf_" + std::to_string(i);
344 hname =
"dgf_" + std::to_string(i);
345 hname +=
"_" + std::to_string(j);
348 htitle =
"Raw DGF spectra for module " + std::to_string(i);
349 htitle +=
", channel " + std::to_string(j);
350 htitle +=
";Charge value;Counts";
352 hdgf_qshort[i][j] =
new TH1F( hname.data(), htitle.data(), 16384, 0, 65536 );
356 hname =
"dgf_" + std::to_string(i);
357 hname +=
"_" + std::to_string(j);
360 htitle =
"Calibrated DGF spectra for module " + std::to_string(i);
361 htitle +=
", channel " + std::to_string(j);
362 htitle +=
";Energy (keV);Counts per 0.5 keV";
365 unsigned int ebins = 8000;
367 float emax = 4000.0 + emin;
369 hdgf_cal[i][j] =
new TH1F( hname.data(), htitle.data(), ebins, emin, emax );
377 for(
unsigned int i = 0; i <
set->GetNumberOfAdcModules(); ++i ) {
380 hadc_cal[i].resize(
set->GetMaximumNumberOfAdcChannels() );
383 dirname = maindirname +
"adc_" + std::to_string(i);
388 for(
unsigned int j = 0; j <
set->GetMaximumNumberOfAdcChannels(); ++j ) {
391 hname =
"adc_" + std::to_string(i);
392 hname +=
"_" + std::to_string(j);
395 htitle =
"Raw ADC spectra for module " + std::to_string(i);
396 htitle +=
", channel " + std::to_string(j);
397 htitle +=
";Charge value;Counts";
399 hadc_qshort[i][j] =
new TH1F( hname.data(), htitle.data(), 8192, 0, 8192 );
403 hname =
"adc_" + std::to_string(i);
404 hname +=
"_" + std::to_string(j);
407 htitle =
"Calibrated ADC spectra for module " + std::to_string(i);
408 htitle +=
", channel " + std::to_string(j);
409 htitle +=
";Energy (keV);Counts per 0.5 keV";
412 unsigned int ebins = 6000;
414 float emax = 1.2e6 + emin;
416 hadc_cal[i][j] =
new TH1F( hname.data(), htitle.data(), ebins, emin, emax );
426 hhit_time =
new TH1F(
"hhit_time",
"Hit time distribution", 3200, -16000, 16000 );