@@ -97,6 +97,10 @@ struct fitQa {
9797 static constexpr float vtxMinFDD = -60 .;
9898 static constexpr float vtxMaxFDD = 60 .;
9999
100+ static constexpr int nBinsTotAmpl = 10000 ;
101+ static constexpr float totAmplMin = 0 .;
102+ static constexpr float totAmplMax = 100000 .;
103+
100104 /* Helper functions */
101105 static float cm2ns (float cm) { return cm / o2::constants::physics::LightSpeedCm2NS; }
102106 static float ns2cm (float ns) { return ns * o2::constants::physics::LightSpeedCm2NS; }
@@ -173,11 +177,13 @@ struct fitQa {
173177 OutputObj<TH2F > ooFT0TimeRes{" FT0TimeRes" }; // /< FT0 collision time resolution (ns)
174178 OutputObj<TH2F > ooFT0Vtx{" FT0Vtx" }; // /< FT0 vertex (cm)
175179 OutputObj<TH2F > ooFT0VtxNS{" FT0VtxNS" }; // /< FT0 vertex (ns)
180+ OutputObj<TH2F > ooFT0TotAmpl{" FT0TotAmpl" }; // /< FT0 total amplitude (ADC)
176181
177182 // FV0
178183 OutputObj<TH2F > ooFV0Time{" FV0Time" }; // /< FV0 average time (ns)
179184 OutputObj<TH2F > ooFV0TimeCorr{" FV0TimeCorr" }; // /< PV corrected FV0 average time (ns)
180185 OutputObj<TH2F > ooPVFV0FT0CVtxDiffNS{" PVFV0FT0CVtxDiff" }; // /< PV - FV0-FT0C vertex (ns)
186+ OutputObj<TH2F > ooFV0TotAmpl{" FV0TotAmpl" }; // /< FV0 total amplitude (ADC)
181187
182188 // FDD
183189 OutputObj<TH2F > ooFDDTimeA{" FDDTimeA" }; // /< FDDA average time (ns)
@@ -188,6 +194,7 @@ struct fitQa {
188194 OutputObj<TH2F > ooFDDVtx{" FDDVtx" }; // /< FDD vertex (cm)
189195 OutputObj<TH2F > ooFDDVtxNS{" FDDVtxNS" }; // /< FDD vertex (ns)
190196 OutputObj<TH2F > ooPVFDDVtxDiffNS{" PVFDDVtxDiffNS" }; // /< PV - FDD vertex (ns)
197+ OutputObj<TH2F > ooFDDTotAmpl{" FDDTotAmpl" }; // /< FDD total amplitude (ADC)
191198
192199 // FT0, FV0
193200 OutputObj<TH2F > ooFT0TimeFV0TimeDiff{" FT0TimeFV0TimeDiff" }; // /< FT0 collision time - FV0 average time (ns)
@@ -372,6 +379,39 @@ struct fitQa {
372379 ooFT0VtxFDDVtxDiffNS.setObject (new TH2F (ooFT0VtxFDDVtxDiffNS.label .c_str (), " FT0 vertex - FDD vertex;$(\\ langle t_{\\ text{FT0C}} \\ rangle - \\ langle t_{\\ text{FT0A}} \\ rangle)/2 - (\\ langle t_{\\ text{FDDC}} \\ rangle - \\ langle t_{\\ text{FDDA}} \\ rangle)/2 \\ text{ (ns)}$" , nBinsTResFDD, tResMinFDD, tResMaxFDD, conditions.size (), 0 , conditions.size ()));
373380 objs[&ooFT0VtxFDDVtxDiffNS] = [&]() { return objs[&ooFT0VtxNS]() - objs[&ooFDDVtxNS](); };
374381
382+ ooFT0TotAmpl.setObject (new TH2F (ooFT0TotAmpl.label .c_str (), " FT0 total amplitude;FT0 amplitude (ADC)" , nBinsTotAmpl, totAmplMin, totAmplMax, conditions.size (), 0 , conditions.size ()));
383+ objs[&ooFT0TotAmpl] = [&]() {
384+ float totAmpl = 0 .f ;
385+ for (const auto & ampl : ft0ChAmpl) {
386+ if (ampl > -100 .f ) {
387+ totAmpl += ampl;
388+ }
389+ }
390+ return totAmpl;
391+ };
392+
393+ ooFV0TotAmpl.setObject (new TH2F (ooFV0TotAmpl.label .c_str (), " FV0 total amplitude;FV0 amplitude (ADC)" , nBinsTotAmpl, totAmplMin, totAmplMax, conditions.size (), 0 , conditions.size ()));
394+ objs[&ooFV0TotAmpl] = [&]() {
395+ float totAmpl = 0 .f ;
396+ for (const auto & ampl : fv0ChAmpl) {
397+ if (ampl > -100 .f ) {
398+ totAmpl += ampl;
399+ }
400+ }
401+ return totAmpl;
402+ };
403+
404+ ooFDDTotAmpl.setObject (new TH2F (ooFDDTotAmpl.label .c_str (), " FDD total amplitude;FDD amplitude (ADC)" , nBinsTotAmpl, totAmplMin, totAmplMax, conditions.size (), 0 , conditions.size ()));
405+ objs[&ooFDDTotAmpl] = [&]() {
406+ float totAmpl = 0 .f ;
407+ for (const auto & ampl : fddChAmpl) {
408+ if (ampl > -100 .f ) {
409+ totAmpl += ampl;
410+ }
411+ }
412+ return totAmpl;
413+ };
414+
375415 // 2D quantities
376416
377417 ooFT0TimeVsFT0Vtx.setObject (new TH3F (ooFT0TimeVsFT0Vtx.label .c_str (), " FT0 time vs FT0 vertex;$(\\ langle t_{\\ text{FT0C}} \\ rangle - \\ langle t_{\\ text{FT0A}} \\ rangle)/2 \\ text{ (cm)}$;$(\\ langle t_{\\ text{FT0A}} \\ rangle + \\ langle t_{\\ text{FT0C}} \\ rangle)/2 \\ text{ (ns)}$" , nBinsVtx, vtxMin, vtxMax, nBinsT, tMin, tMax, conditions.size (), 0 , conditions.size ()));
0 commit comments