103 ATH_MSG_DEBUG(
"Opening trigger efficiency file " << filename);
105 std::unique_ptr<TFile>
file (TFile::Open(filename.c_str(),
"READ"));
106 if (
file ==
nullptr ||
file->IsZombie())
116 std::stringstream Aalpha_name;
117 Aalpha_name <<
"A_alpha_" << runNumber;
118 TSpline3* par_A_alpha = (TSpline3*)
file->GetObjectChecked(Aalpha_name.str().c_str(),
"TSpline3");
122 ATH_MSG_WARNING(
"No trigger efficiencies for run number " << runNumber);
126 std::stringstream Abeta_name;
127 Abeta_name <<
"A_beta_" << runNumber;
128 TSpline3* par_A_beta = (TSpline3*)
file->GetObjectChecked(Abeta_name.str().c_str(),
"TSpline3");
129 std::stringstream Atheta_name;
130 Atheta_name <<
"A_theta_" << runNumber;
131 TSpline3* par_A_theta = (TSpline3*)
file->GetObjectChecked(Atheta_name.str().c_str(),
"TSpline3");
133 std::stringstream Calpha_name;
134 Calpha_name <<
"C_alpha_" << runNumber;
135 TSpline3* par_C_alpha = (TSpline3*)
file->GetObjectChecked(Calpha_name.str().c_str(),
"TSpline3");
136 std::stringstream Cbeta_name;
137 Cbeta_name <<
"C_beta_" << runNumber;
138 TSpline3* par_C_beta = (TSpline3*)
file->GetObjectChecked(Cbeta_name.str().c_str(),
"TSpline3");
139 std::stringstream Ctheta_name;
140 Ctheta_name <<
"C_theta_" << runNumber;
141 TSpline3* par_C_theta = (TSpline3*)
file->GetObjectChecked(Ctheta_name.str().c_str(),
"TSpline3");
143 std::stringstream Err_Aalpha_name;
144 Err_Aalpha_name <<
"A_alpha_error_" << runNumber;
145 TSpline3* parErr_A_alpha = (TSpline3*)
file->GetObjectChecked(Err_Aalpha_name.str().c_str(),
"TSpline3");
146 std::stringstream Err_Abeta_name;
147 Err_Abeta_name <<
"A_beta_error_" << runNumber;
148 TSpline3* parErr_A_beta = (TSpline3*)
file->GetObjectChecked(Err_Abeta_name.str().c_str(),
"TSpline3");
149 std::stringstream Err_Atheta_name;
150 Err_Atheta_name <<
"A_theta_error_" << runNumber;
151 TSpline3* parErr_A_theta = (TSpline3*)
file->GetObjectChecked(Err_Atheta_name.str().c_str(),
"TSpline3");
153 std::stringstream Err_Calpha_name;
154 Err_Calpha_name <<
"C_alpha_error_" << runNumber;
155 TSpline3* parErr_C_alpha = (TSpline3*)
file->GetObjectChecked(Err_Calpha_name.str().c_str(),
"TSpline3");
156 std::stringstream Err_Cbeta_name;
157 Err_Cbeta_name <<
"C_beta_error_" << runNumber;
158 TSpline3* parErr_C_beta = (TSpline3*)
file->GetObjectChecked(Err_Cbeta_name.str().c_str(),
"TSpline3");
159 std::stringstream Err_Ctheta_name;
160 Err_Ctheta_name <<
"C_theta_error_" << runNumber;
161 TSpline3* parErr_C_theta = (TSpline3*)
file->GetObjectChecked(Err_Ctheta_name.str().c_str(),
"TSpline3");
164 std::stringstream Cov_A_alpha_beta_name;
165 Cov_A_alpha_beta_name <<
"cov_A_alpha_beta_" << runNumber;
166 TSpline3* cov_A_alpha_beta = (TSpline3*)
file->GetObjectChecked(Cov_A_alpha_beta_name.str().c_str(),
"TSpline3");
167 std::stringstream Cov_A_alpha_theta_name;
168 Cov_A_alpha_theta_name <<
"cov_A_alpha_theta_" << runNumber;
169 TSpline3* cov_A_alpha_theta = (TSpline3*)
file->GetObjectChecked(Cov_A_alpha_theta_name.str().c_str(),
"TSpline3");
170 std::stringstream Cov_A_beta_theta_name;
171 Cov_A_beta_theta_name <<
"cov_A_beta_theta_" << runNumber;
172 TSpline3* cov_A_beta_theta = (TSpline3*)
file->GetObjectChecked(Cov_A_beta_theta_name.str().c_str(),
"TSpline3");
174 std::stringstream Cov_C_alpha_beta_name;
175 Cov_C_alpha_beta_name <<
"cov_C_alpha_beta_" << runNumber;
176 TSpline3* cov_C_alpha_beta = (TSpline3*)
file->GetObjectChecked(Cov_C_alpha_beta_name.str().c_str(),
"TSpline3");
177 std::stringstream Cov_C_alpha_theta_name;
178 Cov_C_alpha_theta_name <<
"cov_C_alpha_theta_" << runNumber;
179 TSpline3* cov_C_alpha_theta = (TSpline3*)
file->GetObjectChecked(Cov_C_alpha_theta_name.str().c_str(),
"TSpline3");
180 std::stringstream Cov_C_beta_theta_name;
181 Cov_C_beta_theta_name <<
"cov_C_beta_theta_" << runNumber;
182 TSpline3* cov_C_beta_theta = (TSpline3*)
file->GetObjectChecked(Cov_C_beta_theta_name.str().c_str(),
"TSpline3");
184 std::array<std::vector<TSpline3*>, 2> effparams;
185 std::array<std::vector<TSpline3*>, 2> effparamErrors;
186 std::array<std::vector<TSpline3*>, 2> effparamsCorrCoeffs;
188 effparams[0] = {par_C_alpha, par_C_beta, par_C_theta};
189 effparams[1] = {par_A_alpha, par_A_beta, par_A_theta};
190 effparamErrors[0] = {parErr_C_alpha, parErr_C_beta, parErr_C_theta};
191 effparamErrors[1] = {parErr_A_alpha, parErr_A_beta, parErr_A_theta};
192 effparamsCorrCoeffs[0] = {cov_C_alpha_beta, cov_C_alpha_theta, cov_C_beta_theta};
193 effparamsCorrCoeffs[1] = {cov_A_alpha_beta, cov_A_alpha_theta, cov_A_beta_theta};
239 {0, 1.1, 1.1, 1.1}}};
247 for (
size_t side : {0, 1}) {
248 for (
size_t module : {0, 1, 2, 3}) {
249 fixTau1Arr[side][module] =
true;
250 fixTau2Arr[side][module] =
false;
252 peak2ndDerivMinThresholdsHG[side][module] = -35;
253 peak2ndDerivMinThresholdsLG[side][module] = -16;
255 deltaT0CutLow[side][module] = -10;
256 deltaT0CutHigh[side][module] = 10;
257 chisqDivAmpCut[side][module] = 20;
261 ATH_MSG_DEBUG(
"LHCF2022: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
276 peak2ndDerivMinSamples,
277 peak2ndDerivMinThresholdsHG,
278 peak2ndDerivMinThresholdsLG,
281 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(2);
282 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
283 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
284 zdcDataAnalyzer->SetCutValues(chisqDivAmpCut, chisqDivAmpCut, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
286 zdcDataAnalyzer->SetGainFactorsHGLG(0.1, 1);
291 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
296 {-12, -12, -12, -12}}};
301 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
305 zdcDataAnalyzer->SetFitMinMaxAmpValues(5, 2, 5000, 5000);
308 zdcDataAnalyzer->disableModule(0, 0);
309 zdcDataAnalyzer->disableModule(1, 0);
311 return zdcDataAnalyzer;
329 {1.1, 1.1, 1.1, 1.1}}};
337 const int deriv2ndThreshDSHG = -35;
338 const int deriv2ndThreshDSLG = -10;
340 const float deltaTcutLow = -10;
341 const float deltaTcutHigh = 10;
342 const float chisqDivAmpCutVal = 10;
344 for (
size_t side : {0, 1}) {
345 for (
size_t module : {0, 1, 2, 3}) {
346 fixTau1Arr[side][module] =
true;
347 fixTau2Arr[side][module] =
false;
349 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
350 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
352 deltaT0CutLow[side][module] = deltaTcutLow;
353 deltaT0CutHigh[side][module] = deltaTcutHigh;
354 chisqDivAmpCut[side][module] = chisqDivAmpCutVal;
358 ATH_MSG_DEBUG(
"pp2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
369 peak2ndDerivMinSamples,
370 peak2ndDerivMinThresholdsHG,
371 peak2ndDerivMinThresholdsLG,
374 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
375 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
376 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
377 zdcDataAnalyzer->SetCutValues(chisqDivAmpCut, chisqDivAmpCut, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
379 zdcDataAnalyzer->SetGainFactorsHGLG(1, 10);
384 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
389 {-12, -12, -12, -12}}};
394 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
398 zdcDataAnalyzer->SetFitMinMaxAmpValues(5, 2, 5000, 5000);
400 return zdcDataAnalyzer;
418 {1.1, 1.1, 1.1, 1.1}}};
426 const int deriv2ndThreshDSHG = -35;
427 const int deriv2ndThreshDSLG = -10;
429 const float deltaTcutLow = -10;
430 const float deltaTcutHigh = 10;
431 const float chisqDivAmpCutVal = 100;
433 for (
size_t side : {0, 1}) {
434 for (
size_t module : {0, 1, 2, 3}) {
435 fixTau1Arr[side][module] =
true;
436 fixTau2Arr[side][module] =
false;
438 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
439 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
441 deltaT0CutLow[side][module] = deltaTcutLow;
442 deltaT0CutHigh[side][module] = deltaTcutHigh;
443 chisqDivAmpCut[side][module] = chisqDivAmpCutVal;
447 ATH_MSG_DEBUG(
"pp2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
458 peak2ndDerivMinSamples,
459 peak2ndDerivMinThresholdsHG,
460 peak2ndDerivMinThresholdsLG,
463 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
464 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
465 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
466 zdcDataAnalyzer->SetCutValues(chisqDivAmpCut, chisqDivAmpCut, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
468 zdcDataAnalyzer->SetGainFactorsHGLG(1, 1);
473 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
478 {-12, -12, -12, -12}}};
483 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
487 zdcDataAnalyzer->SetFitMinMaxAmpValues(5, 2, 5000, 5000);
489 return zdcDataAnalyzer;
500 const int deriv2ndThreshDSHG = -25;
501 const int deriv2ndThreshDSLG = -10;
502 const unsigned int peakSample = 10;
504 const float deltaTcutLow = -10;
505 const float deltaTcutHigh = 10;
506 const float chisqDivAmpCutHGVal = 30;
507 const float chisqDivAmpCutLGVal = 50;
517 {1.35, 1.4, 1.3, 1.1}}};
524 for (
size_t side : {0, 1}) {
525 for (
size_t module : {0, 1, 2, 3}) {
526 fixTau1Arr[side][module] =
true;
527 fixTau2Arr[side][module] =
false;
529 peak2ndDerivMinSamples[side][module] = peakSample;
530 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
531 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
533 deltaT0CutLow[side][module] = deltaTcutLow;
534 deltaT0CutHigh[side][module] = deltaTcutHigh;
535 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
536 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
540 ATH_MSG_DEBUG(
"PbPb2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
547 peak2ndDerivMinSamples,
548 peak2ndDerivMinThresholdsHG,
549 peak2ndDerivMinThresholdsLG,
551 zdcDataAnalyzer->set2ndDerivStep(2);
552 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
557 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
565 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
573 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
574 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
575 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
580 {-20, -20, -20, -20},}};
585 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
589 zdcDataAnalyzer->enablePreExclusion(4, 500, 200);
590 zdcDataAnalyzer->enablePostExclusion(4, 300, 200);
594 std::array<std::array<std::vector<float>, 4>, 2> nonLinearCorrCoefficHG, nonLinearCorrCoefficLG;
596 nonLinearCorrCoefficHG[0][0] = {-0.0225871, 0.00702802, 0.00201155, -0.00675293, 0.00186212} ;
597 nonLinearCorrCoefficHG[0][1] = {-0.0155562, 0.00594092, 0.00382112, -0.00665466, 0.00143384} ;
598 nonLinearCorrCoefficHG[0][2] = {-0.0313621, 0.0134528, 0.00529013, -0.0111751, 0.0029913} ;
599 nonLinearCorrCoefficHG[0][3] = {-0.025108, 0.00301898, 0.022472, -0.0204288, 0.00453215} ;
600 nonLinearCorrCoefficHG[1][0] = {-0.0266648, 0.0106792, -0.00939959, 0.000833011, 0.000199051} ;
601 nonLinearCorrCoefficHG[1][1] = {-0.0246541, 0.000327376, 0.00754946, -0.00710273, 0.00136899} ;
602 nonLinearCorrCoefficHG[1][2] = {-0.0175283, 0.0127954, 0.000235749, -0.00769698, 0.00221995} ;;
603 nonLinearCorrCoefficHG[1][3] = {-0.0279931, 0.0188122, 0.0126234, -0.0169907, 0.00398826} ;
607 nonLinearCorrCoefficLG = {{ {{{0},
620 zdcDataAnalyzer->SetNonlinCorrParams(1000, 1000, nonLinearCorrCoefficHG, nonLinearCorrCoefficLG);
622 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
623 timeCorrCoefficHG[0][0] = {0.07, -0.020672, 0.070206, 0.004961, -0.010821, -0.001835};
624 timeCorrCoefficHG[0][1] = {0.04, -0.012961, 0.008204, 0.010771, 0.011593, 0.002045};
625 timeCorrCoefficHG[0][2] = {0.04, 0.017393, 0.017597, 0.003736, -0.001696, -0.000465};
626 timeCorrCoefficHG[0][3] = {0.04, 0.018463, 0.009862, -0.000277, -0.000268, 0.000192};
628 timeCorrCoefficHG[1][0] = {0.13, -0.106068, 0.078153, 0.034479, -0.004964, -0.001688};
629 timeCorrCoefficHG[1][1] = {0.03, -0.007518, 0.008937, 0.015319, 0.012290, 0.001889};
630 timeCorrCoefficHG[1][2] = {-0.01, 0.006711, -0.001652, -0.004223, -0.000573, 0.000161};
631 timeCorrCoefficHG[1][3] = {0.015, 0.017993, 0.006339, 0.003122, 0.002980, 0.000735};
639 timeCorrCoefficLG[0][0] = {0.035f+3.25f, -0.126189, 0.022724, 0.039116, -0.098255};
640 timeCorrCoefficLG[0][1] = {0.022f+3.25f, -0.165988, -0.014125, 0.057323, -0.205109};
641 timeCorrCoefficLG[0][2] = {0.01f+3.25f, -0.136087, -0.007248, -0.014452, -0.060469};
642 timeCorrCoefficLG[0][3] = {0.0f+3.25f, -0.131067, 0.025579, 0.059994, -0.065595};
644 timeCorrCoefficLG[1][0] = {0.076f+3.25f, -0.300587, -0.041827, 0.641108, -0.594157};
645 timeCorrCoefficLG[1][1] = {0.057f+3.25f, -0.223443, -0.125013, -0.176900, 0.348081};
646 timeCorrCoefficLG[1][2] = {0.015f+3.25f, -0.141721, 0.023936, 0.099657, -0.188526};
647 timeCorrCoefficLG[1][3] = {0.01f+3.25f, -0.152589, 0.016122, -0.086580, 0.563625};
653 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
655 return zdcDataAnalyzer;
665 const int deriv2ndThreshDSHG = -45;
666 const int deriv2ndThreshDSLG = -10;
667 const unsigned int peakSample = 10;
669 const float deltaTcutLow = -10;
670 const float deltaTcutHigh = 10;
671 const float chisqDivAmpCutHGVal = 30;
672 const float chisqDivAmpCutLGVal = 50;
682 {1.35, 1.4, 1.3, 1.1}}};
689 for (
size_t side : {0, 1}) {
690 for (
size_t module : {0, 1, 2, 3}) {
691 fixTau1Arr[side][module] =
true;
692 fixTau2Arr[side][module] =
false;
694 peak2ndDerivMinSamples[side][module] = peakSample;
695 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
696 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
698 deltaT0CutLow[side][module] = deltaTcutLow;
699 deltaT0CutHigh[side][module] = deltaTcutHigh;
700 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
701 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
705 ATH_MSG_DEBUG(
"PbPb2024: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
712 peak2ndDerivMinSamples,
713 peak2ndDerivMinThresholdsHG,
714 peak2ndDerivMinThresholdsLG,
716 zdcDataAnalyzer->set2ndDerivStep(2);
717 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
722 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
730 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
738 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
739 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
740 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
745 {-30, -30, -30, -30},}};
750 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
754 zdcDataAnalyzer->enablePreExclusion(4, 500, 200);
755 zdcDataAnalyzer->enablePostExclusion(4, 300, 200);
759 std::array<std::array<std::vector<float>, 4>, 2> nonLinearCorrCoefficHG, nonLinearCorrCoefficLG;
761 nonLinearCorrCoefficHG[0][0] = {-0.0225871, 0.00702802, 0.00201155, -0.00675293, 0.00186212} ;
762 nonLinearCorrCoefficHG[0][1] = {-0.0155562, 0.00594092, 0.00382112, -0.00665466, 0.00143384} ;
763 nonLinearCorrCoefficHG[0][2] = {-0.0313621, 0.0134528, 0.00529013, -0.0111751, 0.0029913} ;
764 nonLinearCorrCoefficHG[0][3] = {-0.025108, 0.00301898, 0.022472, -0.0204288, 0.00453215} ;
765 nonLinearCorrCoefficHG[1][0] = {-0.0266648, 0.0106792, -0.00939959, 0.000833011, 0.000199051} ;
766 nonLinearCorrCoefficHG[1][1] = {-0.0246541, 0.000327376, 0.00754946, -0.00710273, 0.00136899} ;
767 nonLinearCorrCoefficHG[1][2] = {-0.0175283, 0.0127954, 0.000235749, -0.00769698, 0.00221995} ;;
768 nonLinearCorrCoefficHG[1][3] = {-0.0279931, 0.0188122, 0.0126234, -0.0169907, 0.00398826} ;
772 nonLinearCorrCoefficHG = {{ {{{0},
784 zdcDataAnalyzer->SetNonlinCorrParams(1000, 1000, nonLinearCorrCoefficHG, nonLinearCorrCoefficLG);
786 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
787 timeCorrCoefficHG[0][0] = {0.07, -0.020672, 0.070206, 0.004961, -0.010821, -0.001835};
788 timeCorrCoefficHG[0][1] = {0.04, -0.012961, 0.008204, 0.010771, 0.011593, 0.002045};
789 timeCorrCoefficHG[0][2] = {0.04, 0.017393, 0.017597, 0.003736, -0.001696, -0.000465};
790 timeCorrCoefficHG[0][3] = {0.04, 0.018463, 0.009862, -0.000277, -0.000268, 0.000192};
792 timeCorrCoefficHG[1][0] = {0.13, -0.106068, 0.078153, 0.034479, -0.004964, -0.001688};
793 timeCorrCoefficHG[1][1] = {0.03, -0.007518, 0.008937, 0.015319, 0.012290, 0.001889};
794 timeCorrCoefficHG[1][2] = {-0.01, 0.006711, -0.001652, -0.004223, -0.000573, 0.000161};
795 timeCorrCoefficHG[1][3] = {0.015, 0.017993, 0.006339, 0.003122, 0.002980, 0.000735};
803 timeCorrCoefficLG[0][0] = {0.035f+3.25f, -0.126189, 0.022724, 0.039116, -0.098255};
804 timeCorrCoefficLG[0][1] = {0.022f+3.25f, -0.165988, -0.014125, 0.057323, -0.205109};
805 timeCorrCoefficLG[0][2] = {0.01f+3.25f, -0.136087, -0.007248, -0.014452, -0.060469};
806 timeCorrCoefficLG[0][3] = {0.0f+3.25f, -0.131067, 0.025579, 0.059994, -0.065595};
808 timeCorrCoefficLG[1][0] = {0.076f+3.25f, -0.300587, -0.041827, 0.641108, -0.594157};
809 timeCorrCoefficLG[1][1] = {0.057f+3.25f, -0.223443, -0.125013, -0.176900, 0.348081};
810 timeCorrCoefficLG[1][2] = {0.015f+3.25f, -0.141721, 0.023936, 0.099657, -0.188526};
811 timeCorrCoefficLG[1][3] = {0.01f+3.25f, -0.152589, 0.016122, -0.086580, 0.563625};
816 std::array< std::array< std::vector<float>, 3>, 2> nlCalib = {{
817 {{ {{0.3, 1, -0.00753349, 0.882218, 0.019739, 1.0803}},{{0.3, 1, 0.0181165, 0.620646, -0.171213, 2.2143}},{{0.25, 1, -0.108547, 0.106, -1.3594, 4.1509}} }},
818 {{ {{0.3, 1, -0.00753349, 0.882218, 0.019739, 1.0803}},{{0.3, 1, 0.0181165, 0.620646, -0.171213, 2.2143}},{{0.25, 1, -0.108547, 0.106, -1.3594, 4.1509}} }}
821 zdcDataAnalyzer->SetNLcalibParams(nlCalib);
824 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
826 return zdcDataAnalyzer;
836 const unsigned int peakSample = 10;
838 const float deltaTcutLow = -10;
839 const float deltaTcutHigh = 10;
840 const float chisqDivAmpCutHGVal = 15;
841 const float chisqDivAmpCutLGVal = 15;
843 float deriv2ndThreshSigHGPass1 = 4.;
844 float deriv2ndThreshSigHGPass2 = 2.;
846 float deriv2ndThreshSigLGPass1 = 4;
847 float deriv2ndThreshSigLGPass2 = 2;
857 {1.5, 1.45, 1.3, 1.05}}};
867 chisqDivAmpScaleHG = {{{39.2, 4.2, 10.2, 17.2}, {16.6, 9.9, 29, 32.7}}};
868 chisqDivAmpOffsetHG = {{{0.58, 1.47, 1.14, 0.91}, {0.91, 1.1, 0.75, 0.64}}};
869 chisqDivAmpPowerHG = {{{2.50, 3.22, 2.79, 2.37}, {3.03, 3.07, 2.89, 2.53}}};
879 chisqDivAmpOffsetLG = chisqDivAmpOffsetHG;
880 chisqDivAmpPowerLG = chisqDivAmpPowerHG;
885 for (
size_t side : {0, 1}) {
886 for (
size_t module : {0, 1, 2, 3}) {
887 fixTau1Arr[side][module] =
true;
888 fixTau2Arr[side][module] =
true;
890 peak2ndDerivMinSamples[side][module] = peakSample;
892 deltaT0CutLow[side][module] = deltaTcutLow;
893 deltaT0CutHigh[side][module] = deltaTcutHigh;
895 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
896 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
898 chisqDivAmpScaleLG[side][module] = chisqRatioLGHGScaleFactor[side][module]*chisqDivAmpScaleHG[side][module];
900 peak2ndDerivMinThresholdsHG[side][module] = noiseSigmasHG[side][module]*std::sqrt(6.0)*deriv2ndThreshSigHGPass1;
901 peak2ndDerivMinThresholdsLG[side][module] = noiseSigmasLG[side][module]*std::sqrt(6.0)*deriv2ndThreshSigLGPass1;
903 peak2ndDerivMinRepassHG[side][module] = noiseSigmasHG[side][module]*std::sqrt(6.0)*deriv2ndThreshSigHGPass2;
904 peak2ndDerivMinRepassLG[side][module] = noiseSigmasLG[side][module]*std::sqrt(6.0)*deriv2ndThreshSigLGPass2;
913 peak2ndDerivMinSamples,
914 peak2ndDerivMinThresholdsHG,
915 peak2ndDerivMinThresholdsLG,
917 zdcDataAnalyzer->set2ndDerivStep(1);
918 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(4);
923 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
929 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
931 std::vector<float> sampleNoiseHG = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 8, 12, 12, 16, 16, 12, 6, 4, 4, 4};
932 std::vector<float> sampleNoiseLG = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 12, 12, 12, 16, 20, 12, 4, 1, 1, 1, 1};
934 std::array<std::array<std::vector<float>,4>,2> sampleNoiseVecsHG, sampleNoiseVecsLG;
935 for (
size_t side : {0, 1}) {
936 for (
size_t module : {0, 1, 2, 3}) {
937 sampleNoiseVecsHG[side][module] = sampleNoiseHG;
938 sampleNoiseVecsLG[side][module] = sampleNoiseLG;
941 zdcDataAnalyzer->setPerSampleNoiseSigmas(sampleNoiseVecsHG, sampleNoiseVecsLG);
949 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
950 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
951 zdcDataAnalyzer->SetTimeCuts(deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
952 zdcDataAnalyzer->SetChisqCuts(chisqDivAmpCutHG, chisqDivAmpScaleHG, chisqDivAmpOffsetHG, chisqDivAmpPowerHG,
953 chisqDivAmpCutLG, chisqDivAmpScaleLG, chisqDivAmpOffsetLG, chisqDivAmpPowerLG);
957 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
961 zdcDataAnalyzer->enablePreExclusion(4, 500, 200);
962 zdcDataAnalyzer->enablePostExclusion(4, 300, 200);
966 std::array<std::array<std::vector<float>, 4>, 2> nonLinearCorrCoefficHG, nonLinearCorrCoefficLG;
968 nonLinearCorrCoefficHG[0][0] = {-0.0225871, 0.00702802, 0.00201155, -0.00675293, 0.00186212} ;
969 nonLinearCorrCoefficHG[0][1] = {-0.0155562, 0.00594092, 0.00382112, -0.00665466, 0.00143384} ;
970 nonLinearCorrCoefficHG[0][2] = {-0.0313621, 0.0134528, 0.00529013, -0.0111751, 0.0029913} ;
971 nonLinearCorrCoefficHG[0][3] = {-0.025108, 0.00301898, 0.022472, -0.0204288, 0.00453215} ;
972 nonLinearCorrCoefficHG[1][0] = {-0.0266648, 0.0106792, -0.00939959, 0.000833011, 0.000199051} ;
973 nonLinearCorrCoefficHG[1][1] = {-0.0246541, 0.000327376, 0.00754946, -0.00710273, 0.00136899} ;
974 nonLinearCorrCoefficHG[1][2] = {-0.0175283, 0.0127954, 0.000235749, -0.00769698, 0.00221995} ;;
975 nonLinearCorrCoefficHG[1][3] = {-0.0279931, 0.0188122, 0.0126234, -0.0169907, 0.00398826} ;
980 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
981 timeCorrCoefficHG[0][0] = {0.07, -0.020672, 0.070206, 0.004961, -0.010821, -0.001835};
982 timeCorrCoefficHG[0][1] = {0.04, -0.012961, 0.008204, 0.010771, 0.011593, 0.002045};
983 timeCorrCoefficHG[0][2] = {0.04, 0.017393, 0.017597, 0.003736, -0.001696, -0.000465};
984 timeCorrCoefficHG[0][3] = {0.04, 0.018463, 0.009862, -0.000277, -0.000268, 0.000192};
986 timeCorrCoefficHG[1][0] = {0.13, -0.106068, 0.078153, 0.034479, -0.004964, -0.001688};
987 timeCorrCoefficHG[1][1] = {0.03, -0.007518, 0.008937, 0.015319, 0.012290, 0.001889};
988 timeCorrCoefficHG[1][2] = {-0.01, 0.006711, -0.001652, -0.004223, -0.000573, 0.000161};
989 timeCorrCoefficHG[1][3] = {0.015, 0.017993, 0.006339, 0.003122, 0.002980, 0.000735};
997 timeCorrCoefficLG[0][0] = {0.035f+3.25f, -0.126189, 0.022724, 0.039116, -0.098255};
998 timeCorrCoefficLG[0][1] = {0.022f+3.25f, -0.165988, -0.014125, 0.057323, -0.205109};
999 timeCorrCoefficLG[0][2] = {0.01f+3.25f, -0.136087, -0.007248, -0.014452, -0.060469};
1000 timeCorrCoefficLG[0][3] = {0.0f+3.25f, -0.131067, 0.025579, 0.059994, -0.065595};
1002 timeCorrCoefficLG[1][0] = {0.076f+3.25f, -0.300587, -0.041827, 0.641108, -0.594157};
1003 timeCorrCoefficLG[1][1] = {0.057f+3.25f, -0.223443, -0.125013, -0.176900, 0.348081};
1004 timeCorrCoefficLG[1][2] = {0.015f+3.25f, -0.141721, 0.023936, 0.099657, -0.188526};
1005 timeCorrCoefficLG[1][3] = {0.01f+3.25f, -0.152589, 0.016122, -0.086580, 0.563625};
1012 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1013 zdcDataAnalyzer->setMinimumSignificance(4,5);
1022 std::array< std::array< std::vector<float>, 3>, 2> nlCalib = {{
1023 {{ {{0.3, 1, -0.00753349, 0.882218, 0.019739, 1.0803}},{{0.3, 1, 0.0181165, 0.620646, -0.171213, 2.2143}},{{0.25, 1, -0.108547, 0.106, -1.3594, 4.1509}} }},
1024 {{ {{0.3, 1, -0.00753349, 0.882218, 0.019739, 1.0803}},{{0.3, 1, 0.0181165, 0.620646, -0.171213, 2.2143}},{{0.25, 1, -0.108547, 0.106, -1.3594, 4.1509}} }}
1027 zdcDataAnalyzer->SetNLcalibParams(nlCalib);
1029 return zdcDataAnalyzer;
1039 const int deriv2ndThreshDSHG = -45;
1040 const int deriv2ndThreshDSLG = -10;
1041 const unsigned int peakSample = 10;
1043 const float deltaTcutLow = -10;
1044 const float deltaTcutHigh = 10;
1045 const float chisqDivAmpCutHGVal = 30;
1046 const float chisqDivAmpCutLGVal = 50;
1056 {1.35, 1.4, 1.3, 1.1}}};
1063 for (
size_t side : {0, 1}) {
1064 for (
size_t module : {0, 1, 2, 3}) {
1065 fixTau1Arr[side][module] =
true;
1066 fixTau2Arr[side][module] =
false;
1068 peak2ndDerivMinSamples[side][module] = peakSample;
1069 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
1070 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
1072 deltaT0CutLow[side][module] = deltaTcutLow;
1073 deltaT0CutHigh[side][module] = deltaTcutHigh;
1074 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
1075 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
1086 peak2ndDerivMinSamples,
1087 peak2ndDerivMinThresholdsHG,
1088 peak2ndDerivMinThresholdsLG,
1090 zdcDataAnalyzer->set2ndDerivStep(1);
1091 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
1096 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
1104 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
1112 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1113 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
1114 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
1119 {-30, -30, -30, -30},}};
1124 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
1128 zdcDataAnalyzer->enablePreExclusion(4, 500, 200);
1129 zdcDataAnalyzer->enablePostExclusion(4, 300, 200);
1133 std::array<std::array<std::vector<float>, 4>, 2> nonLinearCorrCoefficHG, nonLinearCorrCoefficLG;
1135 nonLinearCorrCoefficHG[0][0] = {-0.0225871, 0.00702802, 0.00201155, -0.00675293, 0.00186212} ;
1136 nonLinearCorrCoefficHG[0][1] = {-0.0155562, 0.00594092, 0.00382112, -0.00665466, 0.00143384} ;
1137 nonLinearCorrCoefficHG[0][2] = {-0.0313621, 0.0134528, 0.00529013, -0.0111751, 0.0029913} ;
1138 nonLinearCorrCoefficHG[0][3] = {-0.025108, 0.00301898, 0.022472, -0.0204288, 0.00453215} ;
1139 nonLinearCorrCoefficHG[1][0] = {-0.0266648, 0.0106792, -0.00939959, 0.000833011, 0.000199051} ;
1140 nonLinearCorrCoefficHG[1][1] = {-0.0246541, 0.000327376, 0.00754946, -0.00710273, 0.00136899} ;
1141 nonLinearCorrCoefficHG[1][2] = {-0.0175283, 0.0127954, 0.000235749, -0.00769698, 0.00221995} ;;
1142 nonLinearCorrCoefficHG[1][3] = {-0.0279931, 0.0188122, 0.0126234, -0.0169907, 0.00398826} ;
1146 nonLinearCorrCoefficHG = {{ {{{0},
1158 zdcDataAnalyzer->SetNonlinCorrParams(1000, 1000, nonLinearCorrCoefficHG, nonLinearCorrCoefficLG);
1160 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
1161 timeCorrCoefficHG[0][0] = {0.07, -0.020672, 0.070206, 0.004961, -0.010821, -0.001835};
1162 timeCorrCoefficHG[0][1] = {0.04, -0.012961, 0.008204, 0.010771, 0.011593, 0.002045};
1163 timeCorrCoefficHG[0][2] = {0.04, 0.017393, 0.017597, 0.003736, -0.001696, -0.000465};
1164 timeCorrCoefficHG[0][3] = {0.04, 0.018463, 0.009862, -0.000277, -0.000268, 0.000192};
1166 timeCorrCoefficHG[1][0] = {0.13, -0.106068, 0.078153, 0.034479, -0.004964, -0.001688};
1167 timeCorrCoefficHG[1][1] = {0.03, -0.007518, 0.008937, 0.015319, 0.012290, 0.001889};
1168 timeCorrCoefficHG[1][2] = {-0.01, 0.006711, -0.001652, -0.004223, -0.000573, 0.000161};
1169 timeCorrCoefficHG[1][3] = {0.015, 0.017993, 0.006339, 0.003122, 0.002980, 0.000735};
1177 timeCorrCoefficLG[0][0] = {0.035f+3.25f, -0.126189, 0.022724, 0.039116, -0.098255};
1178 timeCorrCoefficLG[0][1] = {0.022f+3.25f, -0.165988, -0.014125, 0.057323, -0.205109};
1179 timeCorrCoefficLG[0][2] = {0.01f+3.25f, -0.136087, -0.007248, -0.014452, -0.060469};
1180 timeCorrCoefficLG[0][3] = {0.0f+3.25f, -0.131067, 0.025579, 0.059994, -0.065595};
1182 timeCorrCoefficLG[1][0] = {0.076f+3.25f, -0.300587, -0.041827, 0.641108, -0.594157};
1183 timeCorrCoefficLG[1][1] = {0.057f+3.25f, -0.223443, -0.125013, -0.176900, 0.348081};
1184 timeCorrCoefficLG[1][2] = {0.015f+3.25f, -0.141721, 0.023936, 0.099657, -0.188526};
1185 timeCorrCoefficLG[1][3] = {0.01f+3.25f, -0.152589, 0.016122, -0.086580, 0.563625};
1192 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1194 zdcDataAnalyzer->disableModule(0, 0);
1196 return zdcDataAnalyzer;
1206 const int deriv2ndThreshDSHG = -45;
1207 const int deriv2ndThreshDSLG = -10;
1208 const unsigned int peakSample = 10;
1210 const float deltaTcutLow = -10;
1211 const float deltaTcutHigh = 10;
1212 const float chisqDivAmpCutHGVal = 30;
1213 const float chisqDivAmpCutLGVal = 50;
1223 {1.35, 1.4, 1.3, 1.1}}};
1230 for (
size_t side : {0, 1}) {
1231 for (
size_t module : {0, 1, 2, 3}) {
1232 fixTau1Arr[side][module] =
true;
1233 fixTau2Arr[side][module] =
false;
1235 peak2ndDerivMinSamples[side][module] = peakSample;
1236 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
1237 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
1239 deltaT0CutLow[side][module] = deltaTcutLow;
1240 deltaT0CutHigh[side][module] = deltaTcutHigh;
1241 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
1242 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
1246 ATH_MSG_DEBUG(
"PbPb2024: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
1253 peak2ndDerivMinSamples,
1254 peak2ndDerivMinThresholdsHG,
1255 peak2ndDerivMinThresholdsLG,
1257 zdcDataAnalyzer->set2ndDerivStep(1);
1258 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
1263 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
1271 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
1279 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1280 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
1281 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
1286 {-30, -30, -30, -30},}};
1291 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
1295 zdcDataAnalyzer->enablePreExclusion(4, 500, 200);
1296 zdcDataAnalyzer->enablePostExclusion(4, 300, 200);
1300 std::array<std::array<std::vector<float>, 4>, 2> nonLinearCorrCoefficHG, nonLinearCorrCoefficLG;
1302 nonLinearCorrCoefficHG[0][0] = {-0.0225871, 0.00702802, 0.00201155, -0.00675293, 0.00186212} ;
1303 nonLinearCorrCoefficHG[0][1] = {-0.0155562, 0.00594092, 0.00382112, -0.00665466, 0.00143384} ;
1304 nonLinearCorrCoefficHG[0][2] = {-0.0313621, 0.0134528, 0.00529013, -0.0111751, 0.0029913} ;
1305 nonLinearCorrCoefficHG[0][3] = {-0.025108, 0.00301898, 0.022472, -0.0204288, 0.00453215} ;
1306 nonLinearCorrCoefficHG[1][0] = {-0.0266648, 0.0106792, -0.00939959, 0.000833011, 0.000199051} ;
1307 nonLinearCorrCoefficHG[1][1] = {-0.0246541, 0.000327376, 0.00754946, -0.00710273, 0.00136899} ;
1308 nonLinearCorrCoefficHG[1][2] = {-0.0175283, 0.0127954, 0.000235749, -0.00769698, 0.00221995} ;;
1309 nonLinearCorrCoefficHG[1][3] = {-0.0279931, 0.0188122, 0.0126234, -0.0169907, 0.00398826} ;
1313 nonLinearCorrCoefficHG = {{ {{{0},
1325 zdcDataAnalyzer->SetNonlinCorrParams(1000, 1000, nonLinearCorrCoefficHG, nonLinearCorrCoefficLG);
1327 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
1328 timeCorrCoefficHG[0][0] = {0.07, -0.020672, 0.070206, 0.004961, -0.010821, -0.001835};
1329 timeCorrCoefficHG[0][1] = {0.04, -0.012961, 0.008204, 0.010771, 0.011593, 0.002045};
1330 timeCorrCoefficHG[0][2] = {0.04, 0.017393, 0.017597, 0.003736, -0.001696, -0.000465};
1331 timeCorrCoefficHG[0][3] = {0.04, 0.018463, 0.009862, -0.000277, -0.000268, 0.000192};
1333 timeCorrCoefficHG[1][0] = {0.13, -0.106068, 0.078153, 0.034479, -0.004964, -0.001688};
1334 timeCorrCoefficHG[1][1] = {0.03, -0.007518, 0.008937, 0.015319, 0.012290, 0.001889};
1335 timeCorrCoefficHG[1][2] = {-0.01, 0.006711, -0.001652, -0.004223, -0.000573, 0.000161};
1336 timeCorrCoefficHG[1][3] = {0.015, 0.017993, 0.006339, 0.003122, 0.002980, 0.000735};
1344 timeCorrCoefficLG[0][0] = {0.035f+3.25f, -0.126189, 0.022724, 0.039116, -0.098255};
1345 timeCorrCoefficLG[0][1] = {0.022f+3.25f, -0.165988, -0.014125, 0.057323, -0.205109};
1346 timeCorrCoefficLG[0][2] = {0.01f+3.25f, -0.136087, -0.007248, -0.014452, -0.060469};
1347 timeCorrCoefficLG[0][3] = {0.0f+3.25f, -0.131067, 0.025579, 0.059994, -0.065595};
1349 timeCorrCoefficLG[1][0] = {0.076f+3.25f, -0.300587, -0.041827, 0.641108, -0.594157};
1350 timeCorrCoefficLG[1][1] = {0.057f+3.25f, -0.223443, -0.125013, -0.176900, 0.348081};
1351 timeCorrCoefficLG[1][2] = {0.015f+3.25f, -0.141721, 0.023936, 0.099657, -0.188526};
1352 timeCorrCoefficLG[1][3] = {0.01f+3.25f, -0.152589, 0.016122, -0.086580, 0.563625};
1359 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1361 zdcDataAnalyzer->disableModule(0, 0);
1363 return zdcDataAnalyzer;
1373 const int deriv2ndThreshDSHG = -10;
1374 const int deriv2ndThreshDSLG = -10;
1375 const unsigned int peakSample = 10;
1377 const float deltaTcutLow = -50;
1378 const float deltaTcutHigh = 50;
1379 const float chisqDivAmpCutHGVal = 30;
1380 const float chisqDivAmpCutLGVal = 50;
1390 {1.35, 1.4, 1.3, 1.1}}};
1397 for (
size_t side : {0, 1}) {
1398 for (
size_t module : {0, 1, 2, 3}) {
1399 fixTau1Arr[side][module] =
false;
1400 fixTau2Arr[side][module] =
true;
1402 peak2ndDerivMinSamples[side][module] = peakSample;
1403 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
1404 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
1406 deltaT0CutLow[side][module] = deltaTcutLow;
1407 deltaT0CutHigh[side][module] = deltaTcutHigh;
1408 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
1409 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
1413 ATH_MSG_DEBUG(
"PbPb2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
1420 peak2ndDerivMinSamples,
1421 peak2ndDerivMinThresholdsHG,
1422 peak2ndDerivMinThresholdsLG,
1424 zdcDataAnalyzer->set2ndDerivStep(2);
1425 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(10);
1430 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
1438 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
1446 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1447 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
1448 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
1452 zdcDataAnalyzer->enablePreExclusion(4, 500, 200);
1453 zdcDataAnalyzer->enablePostExclusion(4, 300, 200);
1456 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
1457 timeCorrCoefficHG[0][0] = {0.07, -0.020672, 0.070206, 0.004961, -0.010821, -0.001835};
1458 timeCorrCoefficHG[0][1] = {0.04, -0.012961, 0.008204, 0.010771, 0.011593, 0.002045};
1459 timeCorrCoefficHG[0][2] = {0.04, 0.017393, 0.017597, 0.003736, -0.001696, -0.000465};
1460 timeCorrCoefficHG[0][3] = {0.04, 0.018463, 0.009862, -0.000277, -0.000268, 0.000192};
1462 timeCorrCoefficHG[1][0] = {0.13, -0.106068, 0.078153, 0.034479, -0.004964, -0.001688};
1463 timeCorrCoefficHG[1][1] = {0.03, -0.007518, 0.008937, 0.015319, 0.012290, 0.001889};
1464 timeCorrCoefficHG[1][2] = {-0.01, 0.006711, -0.001652, -0.004223, -0.000573, 0.000161};
1465 timeCorrCoefficHG[1][3] = {0.015, 0.017993, 0.006339, 0.003122, 0.002980, 0.000735};
1473 timeCorrCoefficLG[0][0] = {0.035f+3.25f, -0.126189, 0.022724, 0.039116, -0.098255};
1474 timeCorrCoefficLG[0][1] = {0.022f+3.25f, -0.165988, -0.014125, 0.057323, -0.205109};
1475 timeCorrCoefficLG[0][2] = {0.01f+3.25f, -0.136087, -0.007248, -0.014452, -0.060469};
1476 timeCorrCoefficLG[0][3] = {0.0f+3.25f, -0.131067, 0.025579, 0.059994, -0.065595};
1478 timeCorrCoefficLG[1][0] = {0.076f+3.25f, -0.300587, -0.041827, 0.641108, -0.594157};
1479 timeCorrCoefficLG[1][1] = {0.057f+3.25f, -0.223443, -0.125013, -0.176900, 0.348081};
1480 timeCorrCoefficLG[1][2] = {0.015f+3.25f, -0.141721, 0.023936, 0.099657, -0.188526};
1481 timeCorrCoefficLG[1][3] = {0.01f+3.25f, -0.152589, 0.016122, -0.086580, 0.563625};
1487 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1489 return zdcDataAnalyzer;
1499 const int deriv2ndThreshDSHG = -25;
1500 const int deriv2ndThreshDSLG = -10;
1501 const unsigned int peakSample = 10;
1503 const float deltaTcutLow = -10;
1504 const float deltaTcutHigh = 10;
1505 const float chisqDivAmpCutHGVal = 30;
1506 const float chisqDivAmpCutLGVal = 50;
1522 for (
size_t side : {0, 1}) {
1523 for (
size_t module : {0, 1, 2, 3}) {
1524 fixTau1Arr[side][module] =
false;
1525 fixTau2Arr[side][module] =
true;
1527 peak2ndDerivMinSamples[side][module] = peakSample;
1528 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
1529 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
1531 deltaT0CutLow[side][module] = deltaTcutLow;
1532 deltaT0CutHigh[side][module] = deltaTcutHigh;
1533 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
1534 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
1538 ATH_MSG_DEBUG(
"PbPb2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
1545 peak2ndDerivMinSamples,
1546 peak2ndDerivMinThresholdsHG,
1547 peak2ndDerivMinThresholdsLG,
1550 zdcDataAnalyzer->set2ndDerivStep(2);
1551 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
1556 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
1564 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
1572 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1573 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
1574 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
1578 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1580 return zdcDataAnalyzer;
1590 const int deriv2ndThreshDSHG = -25;
1591 const int deriv2ndThreshDSLG = -10;
1592 const unsigned int peakSample = 10;
1594 const float deltaTcutLow = -10;
1595 const float deltaTcutHigh = 10;
1596 const float chisqDivAmpCutHGVal = 30;
1597 const float chisqDivAmpCutLGVal = 50;
1613 for (
size_t side : {0, 1}) {
1614 for (
size_t module : {0, 1, 2, 3}) {
1615 fixTau1Arr[side][module] =
false;
1616 fixTau2Arr[side][module] =
true;
1618 peak2ndDerivMinSamples[side][module] = peakSample;
1619 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
1620 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
1622 deltaT0CutLow[side][module] = deltaTcutLow;
1623 deltaT0CutHigh[side][module] = deltaTcutHigh;
1624 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
1625 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
1629 ATH_MSG_DEBUG(
"PbPb2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
1636 peak2ndDerivMinSamples,
1637 peak2ndDerivMinThresholdsHG,
1638 peak2ndDerivMinThresholdsLG,
1641 zdcDataAnalyzer->set2ndDerivStep(2);
1642 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
1647 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
1655 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
1663 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1664 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
1665 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
1669 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1671 return zdcDataAnalyzer;
1681 const int deriv2ndThreshDSHG = -25;
1682 const int deriv2ndThreshDSLG = -10;
1683 const unsigned int peakSample = 10;
1685 const float deltaTcutLow = -10;
1686 const float deltaTcutHigh = 10;
1687 const float chisqDivAmpCutHGVal = 30;
1688 const float chisqDivAmpCutLGVal = 50;
1698 {1.1, 1.1, 1.1, 1.1}}};
1705 for (
size_t side : {0, 1}) {
1706 for (
size_t module : {0, 1, 2, 3}) {
1707 fixTau1Arr[side][module] =
false;
1708 fixTau2Arr[side][module] =
false;
1710 peak2ndDerivMinSamples[side][module] = peakSample;
1711 peak2ndDerivMinThresholdsHG[side][module] = deriv2ndThreshDSHG;
1712 peak2ndDerivMinThresholdsLG[side][module] = deriv2ndThreshDSLG;
1714 deltaT0CutLow[side][module] = deltaTcutLow;
1715 deltaT0CutHigh[side][module] = deltaTcutHigh;
1716 chisqDivAmpCutLG[side][module] = chisqDivAmpCutLGVal;
1717 chisqDivAmpCutHG[side][module] = chisqDivAmpCutHGVal;
1721 ATH_MSG_DEBUG(
"PbPb2023: delta t cut, value low = " << deltaT0CutLow[0][0] <<
", high = " << deltaT0CutHigh[0][0] );
1728 peak2ndDerivMinSamples,
1729 peak2ndDerivMinThresholdsHG,
1730 peak2ndDerivMinThresholdsLG,
1732 zdcDataAnalyzer->set2ndDerivStep(2);
1733 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(3);
1738 zdcDataAnalyzer->SetGainFactorsHGLG(gainsHG, gainsLG);
1746 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
1754 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1755 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1, tau2, t0HG, t0LG);
1756 zdcDataAnalyzer->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, deltaT0CutLow, deltaT0CutHigh, deltaT0CutLow, deltaT0CutHigh);
1761 {-10, -10, -10, -10}}};
1766 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
1775 std::array<std::array<std::vector<float>, 4>, 2> nonLinearCorrCoefficHG, nonLinearCorrCoefficLG;
1777 nonLinearCorrCoefficHG = {{ {{{0},
1788 nonLinearCorrCoefficLG = {{ {{{0},
1798 zdcDataAnalyzer->SetNonlinCorrParams(0, 1000, nonLinearCorrCoefficHG, nonLinearCorrCoefficLG);
1800 std::array<std::array<std::vector<float>, 4>, 2> timeCorrCoefficHG, timeCorrCoefficLG;
1801 timeCorrCoefficHG[0][0] = {};
1802 timeCorrCoefficHG[0][1] = {};
1803 timeCorrCoefficHG[0][2] = {};
1804 timeCorrCoefficHG[0][3] = {};
1806 timeCorrCoefficHG[1][0] = {};
1807 timeCorrCoefficHG[1][1] = {};
1808 timeCorrCoefficHG[1][2] = {};
1809 timeCorrCoefficHG[1][3] = {};
1811 timeCorrCoefficLG[0][0] = {};
1812 timeCorrCoefficLG[0][1] = {};
1813 timeCorrCoefficLG[0][2] = {};
1814 timeCorrCoefficLG[0][3] = {};
1816 timeCorrCoefficLG[1][0] = {};
1817 timeCorrCoefficLG[1][1] = {};
1818 timeCorrCoefficLG[1][2] = {};
1819 timeCorrCoefficLG[1][3] = {};
1825 zdcDataAnalyzer->SetFitMinMaxAmpValues(2, 2, 6000, 6000);
1827 return zdcDataAnalyzer;
1901 const int peakSample = 4;
1902 const float peak2ndDerivThreshHG = -12;
1903 const float peak2ndDerivThreshLG = -10;
1905 {4.000, 4.000, 4.000, 4.000}}};
1907 {25.11, 25.08, 25.18, 25.48}}};
1910 {57.28, 57.29, 57.31, 57.33}}};
1912 {57.28, 57.29, 57.31, 57.33}}};
1920 for (
size_t side : {0, 1}) {
1921 for (
size_t module : {0, 1, 2, 3}) {
1922 fixTau1Arr[side][module] =
true;
1923 fixTau2Arr[side][module] =
true;
1925 peak2ndDerivMinSamples[side][module] = peakSample;
1926 peak2ndDerivMinThresholdsHG[side][module] = peak2ndDerivThreshHG;
1927 peak2ndDerivMinThresholdsLG[side][module] = peak2ndDerivThreshLG;
1929 chisqDivAmpCut[side][module] = 15;
1940 peak2ndDerivMinThresholdsHG, peak2ndDerivMinThresholdsLG,
m_lowGainMode));
1944 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(1);
1946 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
1947 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1Arr, tau2Arr, t0HG, t0LG);
1948 zdcDataAnalyzer->SetCutValues(chisqDivAmpCut, chisqDivAmpCut, DeltaT0CutLowHG, DeltaT0CutHighHG, DeltaT0CutLowLG, DeltaT0CutHighLG);
1950 zdcDataAnalyzer->SetFitTimeMax(85);
1952 return zdcDataAnalyzer;
1968 const int peakSample = 5;
1969 const float peak2ndDerivThreshHG = -12;
1970 const float peak2ndDerivThreshLG = -10;
1972 {4.472, 4.656, 3.871, 4.061}
1976 {24.17, 24.22, 25.46, 24.45}
1980 {75.11, 74.94, 73.93, 74.45}
1983 {76.28, 76.07, 74.98, 76.54}
1993 for (
size_t side : {0, 1}) {
1994 for (
size_t module : {0, 1, 2, 3}) {
1995 fixTau1Arr[side][module] =
true;
1996 fixTau2Arr[side][module] =
true;
1998 peak2ndDerivMinSamples[side][module] = peakSample;
1999 peak2ndDerivMinThresholdsHG[side][module] = peak2ndDerivThreshHG;
2000 peak2ndDerivMinThresholdsLG[side][module] = peak2ndDerivThreshLG;
2002 chisqDivAmpCut[side][module] = 15;
2010 std::array<std::array<std::vector<float>, 4>, 2> slewingParamsHG, slewingParamsLG;
2012 slewingParamsHG[0][0] = {0, 0, 0, 0};
2013 slewingParamsHG[0][1] = { -4.780244e-01, -7.150874e-02, 4.614585e-02, 8.015731e-04};
2014 slewingParamsHG[0][2] = { -5.253412e-01, -5.718167e-02, 5.243121e-02, 2.128398e-03};
2015 slewingParamsHG[0][3] = { -5.773952e-01, -5.687478e-02, 4.564267e-02, 1.462294e-03};
2017 slewingParamsHG[1][0] = { 7.105115e-01, -3.686143e-02, 7.727447e-02, 5.924152e-03};
2018 slewingParamsHG[1][1] = { 4.052120e-02, 4.450686e-03, 8.031615e-02, 4.038097e-03};
2019 slewingParamsHG[1][2] = { 3.389476e-02, -2.056782e-02, 4.805321e-02, -2.627999e-03};
2020 slewingParamsHG[1][3] = { 2.069765e-01, -2.890419e-02, 6.084375e-02, 3.742011e-03};
2022 slewingParamsLG[0][0] = {0, 0, 0, 0};
2023 slewingParamsLG[0][1] = { -1.632547e+00, -4.827813e-01, -1.379131e-01, -2.522607e-02};
2024 slewingParamsLG[0][2] = { -7.254288e+00, -5.454064e+00, -1.619126e+00, -1.739665e-01};
2025 slewingParamsLG[0][3] = { -1.548400e+01, -1.277708e+01, -3.729333e+00, -3.700458e-01};
2027 slewingParamsLG[1][0] = { 1.142767e-01, -3.608906e-02, 9.642735e-02, -3.097043e-03};
2028 slewingParamsLG[1][1] = { -5.615388e-01, -1.655047e-02, 8.327350e-02, -4.231348e-03};
2029 slewingParamsLG[1][2] = { -7.370728e-01, -2.887482e-02, 8.293875e-02, -4.482743e-03};
2030 slewingParamsLG[1][3] = { -1.270636e+00, -2.791777e-01, -5.807295e-02, -2.332612e-02};
2037 peak2ndDerivMinThresholdsHG, peak2ndDerivMinThresholdsLG,
m_lowGainMode));
2041 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(1);
2045 zdcDataAnalyzer->disableModule(0, 0);
2047 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
2048 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1Arr, tau2Arr, t0HG, t0LG);
2049 zdcDataAnalyzer->SetCutValues(chisqDivAmpCut, chisqDivAmpCut, DeltaT0CutLowHG, DeltaT0CutHighHG, DeltaT0CutLowLG, DeltaT0CutHighLG);
2057 zdcDataAnalyzer->enableDelayed(-12.5, defaultPedestalShifts);
2058 zdcDataAnalyzer->SetFitTimeMax(140);
2060 slewingParamsHG, slewingParamsLG);
2063 return zdcDataAnalyzer;
2073 static constexpr int peakSample = 5;
2074 static constexpr float peak2ndDerivThreshHG = -35;
2075 static constexpr float peak2ndDerivThreshLG = -20;
2076 static constexpr float peak2ndDerivRepassHG = -10;
2077 static constexpr float peak2ndDerivRepassLG = -6;
2080 {4.296, 4.064, 3.497, 3.642}
2084 {24.42, 24.99, 25.72, 25.29}
2088 {74.18, 72.79, 71.77, 72.62}
2091 {75.16, 73.71, 72.25, 73.61}
2095 {0.3216, 0.2593, 0.2511, 0.1680}
2104 for (
size_t side : {0, 1}) {
2105 for (
size_t module : {0, 1, 2, 3}) {
2106 fixTau1Arr[side][module] =
true;
2107 fixTau2Arr[side][module] =
true;
2109 peak2ndDerivMinSamples[side][module] = peakSample;
2110 peak2ndDerivMinThresholdsHG[side][module] = peak2ndDerivThreshHG;
2111 peak2ndDerivMinThresholdsLG[side][module] = peak2ndDerivThreshLG;
2112 peak2ndDerivMinRepassHG [side][module] = peak2ndDerivRepassHG;
2113 peak2ndDerivMinRepassLG [side][module] = peak2ndDerivRepassLG;
2115 chisqDivAmpCut[side][module] = 15;
2127 std::array<std::array<std::vector<float>, 4>, 2> slewingParamsHG, slewingParamsLG;
2129 slewingParamsHG[0][0] = { -1.335560e-01, -6.071869e-03, 5.858193e-02, 2.473300e-03};
2130 slewingParamsHG[0][1] = { -1.223062e-01, -4.379469e-02, 4.452285e-02, 2.130210e-03};
2131 slewingParamsHG[0][2] = { -1.021415e-01, -4.254239e-02, 4.939866e-02, 3.849738e-03};
2132 slewingParamsHG[0][3] = { -8.234056e-02, -3.938803e-02, 4.689029e-02, 2.784816e-03};
2134 slewingParamsHG[1][0] = { -1.640979e-01, -2.780350e-02, 5.755065e-02, -4.244651e-04};
2135 slewingParamsHG[1][1] = { -1.422324e-01, 2.663803e-02, 7.295366e-02, 3.740496e-03};
2136 slewingParamsHG[1][2] = { -9.858124e-02, -2.426132e-02, 4.895967e-02, 2.291393e-03};
2137 slewingParamsHG[1][3] = { -1.070401e-01, -2.256383e-03, 5.833770e-02, 2.255208e-03};
2139 slewingParamsLG[0][0] = { -2.588446e-01, -3.241086e-02, 7.828661e-02, 1.945547e-03};
2140 slewingParamsLG[0][1] = { -3.112495e-01, -7.419508e-02, 6.825776e-02, 2.148860e-03};
2141 slewingParamsLG[0][2] = { -3.470650e-01, -5.836748e-02, 6.204396e-02, 1.550421e-03};
2142 slewingParamsLG[0][3] = { -4.485435e-01, -4.603790e-02, 5.944799e-02, -1.174585e-03};
2144 slewingParamsLG[1][0] = { -3.291676e-01, -4.023732e-02, 8.608755e-02, -3.958167e-03};
2145 slewingParamsLG[1][1] = { -2.608969e-01, -2.129786e-03, 6.930791e-02, -4.141910e-03};
2146 slewingParamsLG[1][2] = { -2.505712e-01, -2.195804e-02, 5.137261e-02, -4.058378e-03};
2147 slewingParamsLG[1][3] = { -5.083206e-01, 3.776601e-02, 1.284275e-01, 1.014067e-02};
2153 std::unique_ptr<ZDCDataAnalyzer> zdcDataAnalyzer = std::make_unique<ZDCDataAnalyzer>(
MakeMessageFunction(), 7, 25, 0,
"FermiExpLinear", peak2ndDerivMinSamples,
2154 peak2ndDerivMinThresholdsHG, peak2ndDerivMinThresholdsLG,
m_lowGainMode);
2158 zdcDataAnalyzer->SetPeak2ndDerivMinTolerances(1);
2163 zdcDataAnalyzer->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
2164 zdcDataAnalyzer->SetTauT0Values(fixTau1Arr, fixTau2Arr, tau1Arr, tau2Arr, t0HG, t0LG);
2165 zdcDataAnalyzer->SetModuleAmpFractionLG(moduleAmpFractionLG);
2166 zdcDataAnalyzer->SetCutValues(chisqDivAmpCut, chisqDivAmpCut, DeltaT0CutLowHG, DeltaT0CutHighHG, DeltaT0CutLowLG, DeltaT0CutHighLG);
2176 {{ -12.5, -12.5, -12.5, -12.5}}
2180 zdcDataAnalyzer->enableDelayed(delayDeltaTs, defaultPedestalShifts);
2181 zdcDataAnalyzer->SetFitTimeMax(140);
2182 zdcDataAnalyzer->enableRepass(peak2ndDerivMinRepassHG, peak2ndDerivMinRepassLG);
2184 slewingParamsHG, slewingParamsLG);
2187 zdcDataAnalyzer->SetNoiseSigmas(noiseSigmasHG, noiseSigmasLG);
2189 return zdcDataAnalyzer;
2198 {{5.0, 3.7, 3.5, 3.5}}
2204 {{19.1, 21.9, 22.6, 23.4}}
2230 bool fixTau1 =
true;
2231 bool fixTau2 =
true;
2233 for (
size_t side : {0, 1}) {
2234 for (
size_t module : {0, 1, 2, 3}) {
2235 fixTau1Arr[side][module] = fixTau1;
2236 fixTau2Arr[side][module] = fixTau2;
2241 {{46.314, 42.267, 50.327, 41.605}}
2245 {{44.295, 41.755, 48.081, 40.175}}
2257 std::array<std::array<std::vector<float>, 4>, 2> slewingParamsHG, slewingParamsLG;
2259 slewingParamsHG[0][0] = {0, -7.904e-02, 4.686e-02, 1.530e-03 };
2260 slewingParamsHG[0][1] = {0, 2.250e-02, 4.732e-02, 6.050e-03 };
2261 slewingParamsHG[0][2] = {0, 4.388e-02, 6.707e-02, -5.526e-05 };
2262 slewingParamsHG[0][3] = {0, 1.205e-01, 2.726e-02, 2.610e-03 };
2264 slewingParamsHG[1][0] = {0, 6.861e-02, 5.175e-03, -9.018e-04 };
2265 slewingParamsHG[1][1] = {0, 3.855e-01, -4.442e-02, -2.022e-02 };
2266 slewingParamsHG[1][2] = {0, -4.337e-03, 3.841e-02, 4.661e-03 };
2267 slewingParamsHG[1][3] = {0, 3.623e-01, -3.882e-02, -1.805e-02 };
2269 slewingParamsLG[0][0] = {0, 1.708e-02, 7.929e-02, 5.079e-03 };
2270 slewingParamsLG[0][1] = {0, 1.406e-01, 1.209e-01, -1.922e-04 };
2271 slewingParamsLG[0][2] = {0, 1.762e-01, 1.118e-01, 1.679e-04 };
2272 slewingParamsLG[0][3] = {0, 1.361e-02, -2.685e-02, -4.168e-02 };
2274 slewingParamsLG[1][0] = {0, 1.962e-01, -5.025e-03, -2.001e-02 };
2275 slewingParamsLG[1][1] = {0, 3.258e-01, 1.229e-02, -2.925e-02 };
2276 slewingParamsLG[1][2] = {0, 1.393e-01, 8.113e-02, -2.594e-03 };
2277 slewingParamsLG[1][3] = {0, 1.939e-01, 2.188e-02, -5.579e-02 };
2280 peak2ndDerivMinThresholdsHG, peak2ndDerivMinThresholdsLG,
m_lowGainMode));
2284 m_zdcDataAnalyzer_40MHz->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, DeltaT0CutLowHG, DeltaT0CutHighHG, DeltaT0CutLowLG, DeltaT0CutHighLG);
2286 slewingParamsHG, slewingParamsLG);
2288 std::array<std::array<std::vector<float>, 4>, 2> moduleHGNonLinCorr, moduleLGNonLinCorr;
2289 moduleHGNonLinCorr[0][0] = { -3.76800e-02, 4.63597e-02};
2290 moduleHGNonLinCorr[0][1] = { -1.02185e-01, -1.17548e-01};
2291 moduleHGNonLinCorr[0][2] = { -8.78451e-02, -1.52174e-01};
2292 moduleHGNonLinCorr[0][3] = { -1.04835e-01, -1.96514e-01};
2293 moduleHGNonLinCorr[1][0] = { -6.83115e-02, 3.57802e-02};
2294 moduleHGNonLinCorr[1][1] = { -1.08162e-01, -1.91413e-01};
2295 moduleHGNonLinCorr[1][2] = { -7.82514e-02, -1.21218e-01};
2296 moduleHGNonLinCorr[1][3] = { -2.34354e-02, -2.52033e-01};
2298 moduleLGNonLinCorr = {{ {{{0},
2338 bool fixTau1 =
true;
2339 bool fixTau2 =
true;
2341 for (
size_t side : {0, 1}) {
2342 for (
size_t module : {0, 1, 2, 3}) {
2343 fixTau1Arr[side][module] = fixTau1;
2344 fixTau2Arr[side][module] = fixTau2;
2349 {{4.2, 3.6, 3.3, 3.4}}
2354 {{19.1, 21.9, 22.6, 23.4}}
2359 {{36.0, 31.1, 40.75, 30.5}}
2364 {{33.7, 29.9, 39.0, 29.3}}
2375 std::array<std::array<std::vector<float>, 4>, 2> slewingParamsHG, slewingParamsLG;
2377 slewingParamsHG[0][0] = {0, -6.5e-2, 2.85e-2, -2.83e-3};
2378 slewingParamsHG[0][1] = {0, -5.5e-2, 5.13e-2, 5.6e-3};
2379 slewingParamsHG[0][2] = {0, -1.45e-3, 9.3e-2, 3.9e-3};
2380 slewingParamsHG[0][3] = {0, -2.36e-2, 8.3e-2, 1.1e-3};
2382 slewingParamsHG[1][0] = {0, -6.5e-2, 4.84e-2, -3.7e-3};
2383 slewingParamsHG[1][1] = {0, 1.34e-2, 6.57e-2, 5.37e-3};
2384 slewingParamsHG[1][2] = {0, -5.37e-2, 3.49e-2, 3.8e-3};
2385 slewingParamsHG[1][3] = {0, -3.3e-2, 3.9e-2, 2.2e-3};
2387 slewingParamsLG[0][0] = {0, -9.6e-2, 4.39e-2, 2.93e-3 };
2388 slewingParamsLG[0][1] = {0, -5.0e-2, 14.9e-2, 20.6e-3 };
2389 slewingParamsLG[0][2] = {0, -4.4e-2, 5.3e-2, 0, };
2390 slewingParamsLG[0][3] = {0, -9.90e-2, 4.08e-2, 0, };
2392 slewingParamsLG[1][0] = {0, -8.7e-2, 4.2e-2, -3.2e-3 };
2393 slewingParamsLG[1][1] = {0, -3.26e-2, 3.84e-2, -2.32e-3};
2394 slewingParamsLG[1][2] = {0, -26.8e-2, -2.64e-2, -5.3e-3 };
2395 slewingParamsLG[1][3] = {0, -13.2e-2, 0.45e-2, -2.4e-3 };
2403 m_zdcDataAnalyzer_80MHz->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG, DeltaT0CutLowHG, DeltaT0CutHighHG, DeltaT0CutLowLG, DeltaT0CutHighLG);
2405 slewingParamsHG, slewingParamsLG);
2407 std::array<std::array<std::vector<float>, 4>, 2> moduleHGNonLinCorr, moduleLGNonLinCorr;
2408 moduleHGNonLinCorr[0][0] = { -3.76800e-02, 4.63597e-02};
2409 moduleHGNonLinCorr[0][1] = { -1.02185e-01, -1.17548e-01};
2410 moduleHGNonLinCorr[0][2] = { -8.78451e-02, -1.52174e-01};
2411 moduleHGNonLinCorr[0][3] = { -1.04835e-01, -1.96514e-01};
2412 moduleHGNonLinCorr[1][0] = { -6.83115e-02, 3.57802e-02};
2413 moduleHGNonLinCorr[1][1] = { -1.08162e-01, -1.91413e-01};
2414 moduleHGNonLinCorr[1][2] = { -7.82514e-02, -1.21218e-01};
2415 moduleHGNonLinCorr[1][3] = { -2.34354e-02, -2.52033e-01};
2417 moduleLGNonLinCorr = {{ {{{0},
2669 if (moduleContainer.
size()==0)
return StatusCode::SUCCESS;
2672 if (!eventInfo.
isValid())
return StatusCode::FAILURE;
2679 return StatusCode::SUCCESS;
2684 unsigned int thisRunNumber = eventInfo->runNumber();
2686 ATH_MSG_DEBUG(
"ZDC analysis tool will be configured for run " << thisRunNumber);
2694 unsigned int calibRunNumber = thisRunNumber;
2700 catch(std::runtime_error&)
2710 unsigned int calibRunNumber = thisRunNumber;
2716 catch(std::runtime_error&)
2743 const std::vector<unsigned short>* adcUndelayLG = 0;
2744 const std::vector<unsigned short>* adcUndelayHG = 0;
2746 const std::vector<unsigned short>* adcDelayLG = 0;
2747 const std::vector<unsigned short>* adcDelayHG = 0;
2750 for (
const auto zdcModule : moduleContainer)
2753 if (zdcModule->zdcSide() == -1) side = 0;
2754 else if (zdcModule->zdcSide() == 1) side = 1;
2758 ATH_MSG_WARNING(
"Invalid side value found for module number: " << zdcModule->zdcModule() <<
", side value = " << side);
2762 if(zdcModule->zdcModule() > 4)
continue;
2764 if (zdcModule->zdcType() == 0) {
2770 adcUndelayLG = &g0dataAcc(*zdcModule);
2771 adcUndelayHG = &g1dataAcc(*zdcModule);
2784 adcUndelayLG = &g0d1dataAcc(*zdcModule);
2785 adcUndelayHG = &g1d1dataAcc(*zdcModule);
2786 adcDelayLG = &g0d0dataAcc(*zdcModule);
2787 adcDelayHG = &g1d0dataAcc(*zdcModule);
2791 adcUndelayLG = &g0d0dataAcc(*zdcModule);
2792 adcUndelayHG = &g1d0dataAcc(*zdcModule);
2793 adcDelayLG = &g0d1dataAcc(*zdcModule);
2794 adcDelayHG = &g1d1dataAcc(*zdcModule);
2800 return StatusCode::FAILURE;
2804 std::vector<float> HGUndelADCSamples(
m_numSample);
2805 std::vector<float> LGUndelADCSamples(
m_numSample);
2807 if (LGUndelADCSamples.size() < adcUndelayLG->size()) {
2808 LGUndelADCSamples.resize(adcUndelayLG->size());
2811 if (HGUndelADCSamples.size() < adcUndelayHG->size()) {
2812 HGUndelADCSamples.resize(adcUndelayHG->size());
2815 std::copy(adcUndelayLG->begin(), adcUndelayLG->end(), LGUndelADCSamples.begin());
2816 std::copy(adcUndelayHG->begin(), adcUndelayHG->end(), HGUndelADCSamples.begin());
2818 int side = (zdcModule->zdcSide() == -1) ? 0 : 1 ;
2821 m_zdcDataAnalyzer->LoadAndAnalyzeData(side, zdcModule->zdcModule(), HGUndelADCSamples, LGUndelADCSamples);
2824 std::vector<float> HGDelayADCSamples(
m_numSample);
2825 std::vector<float> LGDelayADCSamples(
m_numSample);
2826 if (adcDelayLG and adcDelayHG){
2827 std::copy(adcDelayLG->begin(), adcDelayLG->end(), LGDelayADCSamples.begin());
2828 std::copy(adcDelayHG->begin(), adcDelayHG->end(), HGDelayADCSamples.begin());
2830 ATH_MSG_ERROR(
"adcDelayLG or adcDelayHG pointers are null");
2831 return StatusCode::FAILURE;
2838 HGUndelADCSamples, LGUndelADCSamples,
2839 HGDelayADCSamples, LGDelayADCSamples);
2890 for (
const auto zdcModule : moduleContainer)
2892 int side = (zdcModule->zdcSide() == -1) ? 0 : 1 ;
2893 int mod = zdcModule->zdcModule();
2895 if(mod > 4)
continue;
2897 if (zdcModule->zdcType() == 0) {
2901 zdcModuleCalibEnergy(*zdcModule) = calibEnergy;
2902 zdcModuleCalibTime(*zdcModule) =
m_zdcDataAnalyzer->GetModuleCalibTime(side, mod);
2904 zdcModuleAmplitude(*zdcModule) =
m_zdcDataAnalyzer->GetModuleAmplitude(side, mod);
2909 zdcModuleChisq(*zdcModule) = pulseAna_p->
GetChisq();
2910 zdcModuleChisqRatio(*zdcModule) = pulseAna_p->
GetChisqRatio();
2913 zdcModuleFitAmpError(*zdcModule) = pulseAna_p->
GetAmpError();
2914 zdcModuleFitT0(*zdcModule) = pulseAna_p->
GetFitT0();
2917 zdcModulePresample(*zdcModule) = pulseAna_p->
getPresample();
2919 zdcModuleMaxADC(*zdcModule) = pulseAna_p->
getMaxADCSub();
2920 zdcModuleMaxADCHG(*zdcModule) = pulseAna_p->
getMaxADCHG();
2921 zdcModuleMaxADCLG(*zdcModule) = pulseAna_p->
getMaxADCLG();
2923 zdcModuleAmpLGRefit(*zdcModule) = pulseAna_p->
getRefitLGAmp();
2950 for (
const auto zdc_sum: moduleSumContainer)
2952 ATH_MSG_DEBUG(
"Extracting ZDC side " << zdc_sum->zdcSide());
2954 if (zdc_sum->zdcSide()==0)
continue;
2956 int iside = (zdc_sum->zdcSide()==-1) ? 0 : 1;
2959 zdcSumUncalibSum(*zdc_sum) = uncalibSum;
2961 zdcSumUncalibSumErr(*zdc_sum) = uncalibSumErr;
2964 zdcSumCalibEnergy(*zdc_sum) = calibEnergy;
2966 zdcSumCalibEnergyErr(*zdc_sum) = calibEnergyErr;
2969 zdcSumNLCalibEnergy(*zdc_sum) = nlcalibEnergy;
2971 zdcSumNLCalibEnergyErr(*zdc_sum) = nlcalibEnergyErr;
2973 float finalEnergy = calibEnergy;
2974 zdcSumFinalEnergy(*zdc_sum) = finalEnergy;
2977 zdcSumModuleMask(*zdc_sum) = (
getModuleMask() >> (4 * iside)) & 0xF;
2980 return StatusCode::SUCCESS;