5555#include " DetectorsVertexing/HelixHelper.h"
5656#include " TableHelper.h"
5757#include " ALICE3/Core/DelphesO2TrackSmearer.h"
58+ #include " TEfficiency.h"
59+ #include " THashList.h"
5860
5961using namespace o2 ;
6062using namespace o2 ::framework;
@@ -117,6 +119,8 @@ struct OnTheFlyTofPid {
117119 Configurable<int > nBinsTimeRes{" nBinsTimeRes" , 400 , " number of bins plots time resolution" };
118120 Configurable<int > nBinsRelativeEtaPt{" nBinsRelativeEtaPt" , 400 , " number of bins plots pt and eta relative errors" };
119121 Configurable<int > nBinsEta{" nBinsEta" , 400 , " number of bins plot relative eta error" };
122+ Configurable<int > nBinsMult{" nBinsMult" , 200 , " number of bins in multiplicity" };
123+ Configurable<float > maxMultRange{" maxMultRange" , 1000 .f , " upper limit in multiplicity plots" };
120124 } plotsConfig;
121125
122126 o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE;
@@ -129,6 +133,7 @@ struct OnTheFlyTofPid {
129133
130134 // for handling basic QA histograms if requested
131135 HistogramRegistry histos{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
136+ OutputObj<THashList> listEfficiency{" efficiency" };
132137 static constexpr int kParticles = 5 ;
133138
134139 void init (o2::framework::InitContext& initContext)
@@ -179,13 +184,16 @@ struct OnTheFlyTofPid {
179184 }
180185
181186 if (plotsConfig.doQAplots ) {
182- const AxisSpec axisdNdeta{200 , 0 .0f , 1000 . 0f , Form (" dN/d#eta in |#eta| < %f" , simConfig.multiplicityEtaRange .value )};
187+ const AxisSpec axisdNdeta{plotsConfig. nBinsMult , 0 .0f , plotsConfig. maxMultRange , Form (" dN/d#eta in |#eta| < %f" , simConfig.multiplicityEtaRange .value )};
183188
184189 histos.add (" h1dNdeta" , " h2dNdeta" , kTH1F , {axisdNdeta});
185190 histos.add (" h2dEventTime" , " h2dEventTime" , kTH2F , {{200 , -1000 , 1000 , " computed" }, {200 , -1000 , 1000 , " generated" }});
186191 histos.add (" h1dEventTimegen" , " h1dEventTimegen" , kTH1F , {{200 , -1000 , 1000 , " generated" }});
187192 histos.add (" h1dEventTimerec" , " h1dEventTimerec" , kTH1F , {{200 , -1000 , 1000 , " computed" }});
193+ histos.add (" h1dEventTimedelta" , " h1dEventTimedelta" , kTH1F , {{200 , -1000 , 1000 , " generated - computed" }});
188194 histos.add (" h2dEventTimeres" , " h2dEventTimeres" , kTH2F , {axisdNdeta, {300 , 0 , 300 , " resolution" }});
195+ listEfficiency.setObject (new THashList);
196+ listEfficiency->Add (new TEfficiency (" effEventTime" , " effEventTime" , plotsConfig.nBinsMult , 0 .0f , plotsConfig.maxMultRange ));
189197
190198 const AxisSpec axisMomentum{static_cast <int >(plotsConfig.nBinsP ), 0 .0f , +10 .0f , " #it{p} (GeV/#it{c})" };
191199 const AxisSpec axisMomentumSmall{static_cast <int >(plotsConfig.nBinsP ), 0 .0f , +1 .0f , " #it{p} (GeV/#it{c})" };
@@ -564,8 +572,9 @@ struct OnTheFlyTofPid {
564572 // Now we compute the event time for the tracks
565573
566574 std::array<float , 2 > tzero = {0 .f , 0 .f };
575+ bool etStatus = false ;
567576 if (simConfig.considerEventTime .value ) {
568- const bool etStatus = eventTime (tracksWithTime, tzero);
577+ etStatus = eventTime (tracksWithTime, tzero);
569578 if (!etStatus) {
570579 LOG (warning) << " Event time calculation failed with " << tracksWithTime.size () << " tracks" ;
571580 }
@@ -576,6 +585,10 @@ struct OnTheFlyTofPid {
576585 histos.fill (HIST (" h1dEventTimegen" ), eventCollisionTimePS);
577586 histos.fill (HIST (" h1dEventTimerec" ), tzero[0 ]);
578587 histos.fill (HIST (" h2dEventTimeres" ), dNdEta, tzero[1 ]);
588+ if (etStatus) {
589+ histos.fill (HIST (" h1dEventTimedelta" ), eventCollisionTimePS - tzero[0 ]);
590+ }
591+ static_cast <TEfficiency*>(listEfficiency->At (0 ))->Fill (etStatus, dNdEta);
579592 }
580593
581594 // Then we do a second loop to compute the measured quantities with the measured event time
0 commit comments