3838#include < Framework/HistogramRegistry.h>
3939#include < Framework/HistogramSpec.h>
4040#include < Framework/InitContext.h>
41+ #include < Framework/OutputObjHeader.h>
4142#include < Framework/runDataProcessing.h>
4243
4344#include < TAxis.h>
4445#include < TProfile2D.h>
4546
47+ #include < algorithm>
4648#include < cmath>
4749#include < cstdint>
4850#include < random>
5355using namespace o2 ;
5456using namespace o2 ::framework;
5557
56- #define V02_FILL_QA (NAME, STEP ) \
57- for (int qaBin = 1 ; qaBin <= (STEP ); ++qaBin) { \
58- histos.fill (HIST (NAME ), static_cast <float >(qaBin)); \
59- }
60-
6158struct JV02DmesonAnalysis {
6259 enum Detector {
6360 kFT0C = 0 ,
@@ -286,7 +283,9 @@ struct JV02DmesonAnalysis {
286283 float cent = -1 .f ;
287284 float xy = 0 .f ;
288285 const int step = passedEventStep (collision, cent);
289- V02_FILL_QA (" hadron/hEventQa" , step);
286+ for (int qaBin = 1 ; qaBin <= step; ++qaBin) {
287+ histos.fill (HIST (" hadron/hEventQa" ), static_cast <float >(qaBin));
288+ }
290289 const int cfId = cfCollisionIndex (refs);
291290 if (step < StepAccepted || cfId < 0 || !referenceProduct (collision, xy)) {
292291 return ;
@@ -304,7 +303,7 @@ struct JV02DmesonAnalysis {
304303 histos.fill (HIST (" hadron/Prof_XY_sub" ), static_cast <float >(sample), cent, xy);
305304 const int nBins = mHadPtAxis ->GetNbins ();
306305 for (int ibin = 1 ; ibin <= nBins; ++ibin) {
307- const float pt = static_cast <float >(mHadPtAxis ->GetBinCenter (ibin));
306+ const auto pt = static_cast <float >(mHadPtAxis ->GetBinCenter (ibin));
308307 const float z = mHadCounts [ibin - 1 ] / nch;
309308 histos.fill (HIST (" hadron/Prof_Z" ), cent, pt, z);
310309 histos.fill (HIST (" hadron/Prof_XYZ" ), cent, pt, xy * z);
@@ -319,7 +318,9 @@ struct JV02DmesonAnalysis {
319318 float cent = -1 .f ;
320319 float xy = 0 .f ;
321320 const int step = passedEventStep (collision, cent);
322- V02_FILL_QA (" D0/hEventQa" , step);
321+ for (int qaBin = 1 ; qaBin <= step; ++qaBin) {
322+ histos.fill (HIST (" D0/hEventQa" ), static_cast <float >(qaBin));
323+ }
323324 const int cfId = cfCollisionIndex (refs);
324325 if (step < StepAccepted || cfId < 0 || !referenceProduct (collision, xy)) {
325326 return ;
@@ -343,7 +344,7 @@ struct JV02DmesonAnalysis {
343344 }
344345 histos.fill (HIST (" D0/hEventQa" ), 6 .f );
345346 const int sample = mSampleDist (mRng );
346- const float sampleCoord = static_cast <float >(sample);
347+ const auto sampleCoord = static_cast <float >(sample);
347348 histos.fill (HIST (" D0/hEvents" ), cent);
348349 histos.fill (HIST (" D0/Prof_XY" ), cent, xy);
349350 histos.fill (HIST (" D0/Prof_Nch" ), cent, nch);
0 commit comments