diff --git a/PWGCF/Flow/Tasks/CMakeLists.txt b/PWGCF/Flow/Tasks/CMakeLists.txt index c77ae659fdb..b87c6e5b4fc 100644 --- a/PWGCF/Flow/Tasks/CMakeLists.txt +++ b/PWGCF/Flow/Tasks/CMakeLists.txt @@ -25,7 +25,7 @@ o2physics_add_dpl_workflow(flow-runby-run COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(flow-gfw-pbpb - SOURCES FlowGFWPbPb.cxx + SOURCES flowGFWPbPb.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore COMPONENT_NAME Analysis) diff --git a/PWGCF/Flow/Tasks/FlowGFWPbPb.cxx b/PWGCF/Flow/Tasks/FlowGFWPbPb.cxx index 6e4e3290e89..f7ec9b9114e 100644 --- a/PWGCF/Flow/Tasks/FlowGFWPbPb.cxx +++ b/PWGCF/Flow/Tasks/FlowGFWPbPb.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file FlowGFWPbPb.cxx +/// \file flowGFWPbPb.cxx /// \author Iris Likmeta (iris.likmeta@cern.ch) /// \since Mar 28, 2024 /// \brief Multiparticle flow measurements with FT0 and ZDC @@ -52,7 +52,7 @@ using namespace o2::aod::evsel; #define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable NAME{#NAME, DEFAULT, HELP}; -struct FlowGFWPbPb { +struct flowGFWPbPb { O2_DEFINE_CONFIGURABLE(cfgCutVertex, float, 10.0f, "Accepted z-vertex range") O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.2f, "Minimal pT for ref tracks") @@ -111,8 +111,8 @@ struct FlowGFWPbPb { // Connect to ccdb Service ccdb; - Configurable nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; - Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; // Define output OutputObj fFC{FlowContainer("FlowContainer")}; @@ -124,7 +124,7 @@ struct FlowGFWPbPb { std::vector corrconfigs; TRandom3* fRndm = new TRandom3(0); TAxis* fPtAxis; - std::vector>> BootstrapArray; // TProfile is a shared pointer + std::vector>> bootstrapArray; // TProfile is a shared pointer enum ExtraProfile { @@ -137,7 +137,7 @@ struct FlowGFWPbPb { kCount_ExtraProfile }; - enum eventprogress { + enum EventProgress { kFILTERED, kSEL8, kOCCUPANCY, @@ -166,9 +166,9 @@ struct FlowGFWPbPb { void init(InitContext const&) // Initialization { - ccdb->setURL(url.value); + ccdb->setURL(ccdbUrl.value); ccdb->setCaching(true); - ccdb->setCreatedNotAfter(nolaterthan.value); + ccdb->setCreatedNotAfter(ccdbNoLaterThan.value); // Add some output objects to the histogram registry registry.add("hEventCount", "Number of Events;; No. of Events", {HistType::kTH1D, {{kNOOFEVENTSTEPS, -0.5, kNOOFEVENTSTEPS - 0.5}}}); @@ -213,7 +213,7 @@ struct FlowGFWPbPb { registry.add("FT0CAmp", ";FT0C amplitude;Events", kTH1F, {axisFT0CAmp}); registry.add("FT0AAmp", ";FT0A amplitude;Events", kTH1F, {axisFT0AAmp}); registry.add("FT0MAmp", ";FT0M amplitude;Events", kTH1F, {axisFT0MAmp}); - + // Track plots registry.add("Events_per_Centrality_Bin", "Events_per_Centrality_Bin;Centrality FT0C;No. of Events", kTH1F, {axisCentrality}); registry.add("Global_Tracks_Nch_vs_Cent", "Global Tracks;Centrality (%); M (|#eta| < 0.8);", {HistType::kTH2D, {axisCentrality, axisNch}}); @@ -238,7 +238,7 @@ struct FlowGFWPbPb { registry.add("c32", ";Centrality (%) ; C_{3}{2} ", {HistType::kTProfile, {axisCentrality}}); registry.add("c32etagap", ";Centrality (%) ; C_{3}{2} (|#eta| < 0.8) ", {HistType::kTProfile, {axisCentrality}}); registry.add("c34", ";Centrality (%) ; C_{3}{4} ", {HistType::kTProfile, {axisCentrality}}); - + registry.add("c22Nch", ";N_{ch}(|#eta| < 0.8) ; C_{2}{2} ", {HistType::kTProfile, {axisNch}}); registry.add("c24Nch", ";N_{ch}(|#eta| < 0.8) ; C_{2}{4}", {HistType::kTProfile, {axisNch}}); registry.add("c26Nch", ";N_{ch}(|#eta| < 0.8) ; C_{2}{6}", {HistType::kTProfile, {axisNch}}); @@ -247,7 +247,7 @@ struct FlowGFWPbPb { registry.add("c32Nch", ";N_{ch}(|#eta| < 0.8) ; C_{3}{2} ", {HistType::kTProfile, {axisNch}}); registry.add("c32Nchetagap", ";N_ch(|#eta| < 0.8) ; C_{3}{2} (|#eta| < 0.8) ", {HistType::kTProfile, {axisNch}}); registry.add("c34Nch", ";N_{ch}(|#eta| < 0.8) ; C_{3}{4} ", {HistType::kTProfile, {axisNch}}); - + registry.add("c22Nch05", ";N_{ch 0-5%}(|#eta| < 0.8) ; C_{2}{2} ", {HistType::kTProfile, {axisNch}}); registry.add("c24Nch05", ";N_{ch 0-5%}(|#eta| < 0.8) ; C_{2}{4}", {HistType::kTProfile, {axisNch}}); registry.add("c26Nch05", ";N_{ch 0-5%}(|#eta| < 0.8) ; C_{2}{6}", {HistType::kTProfile, {axisNch}}); @@ -272,47 +272,47 @@ struct FlowGFWPbPb { registry.add("hPtMCGen5060", "Monte Carlo Truth", {HistType::kTH1D, {axisPt}}); // initial array - BootstrapArray.resize(cfgNbootstrap); + bootstrapArray.resize(cfgNbootstrap); for (int i = 0; i < cfgNbootstrap; i++) { - BootstrapArray[i].resize(kCount_ExtraProfile); + bootstrapArray[i].resize(kCount_ExtraProfile); } for (int i = 0; i < cfgNbootstrap; i++) { - BootstrapArray[i][kc22] = registry.add(Form("BootstrapContainer_%d/c22", i), ";Centrality (%) ; C_{2}{2}", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc24] = registry.add(Form("BootstrapContainer_%d/c24", i), ";Centrality (%) ; C_{2}{4}", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc26] = registry.add(Form("BootstrapContainer_%d/c26", i), ";Centrality (%) ; C_{2}{6}", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc28] = registry.add(Form("BootstrapContainer_%d/c28", i), ";Centrality (%) ; C_{2}{8}", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc22etagap] = registry.add(Form("BootstrapContainer_%d/c22etagap", i), ";Centrality (%) ; C_{2}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc32] = registry.add(Form("BootstrapContainer_%d/c32", i), ";Centrality (%) ; C_{3}{2}", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc32etagap] = registry.add(Form("BootstrapContainer_%d/c32etagap", i), ";Centrality (%) ; C_{3}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisCentrality}}); - BootstrapArray[i][kc34] = registry.add(Form("BootstrapContainer_%d/c34", i), ";Centrality (%) ; C_{3}{4}", {HistType::kTProfile, {axisCentrality}}); - - BootstrapArray[i][kc22Nch] = registry.add(Form("BootstrapContainer_%d/c22Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{2}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc24Nch] = registry.add(Form("BootstrapContainer_%d/c24Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{4}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc26Nch] = registry.add(Form("BootstrapContainer_%d/c26Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{6}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc28Nch] = registry.add(Form("BootstrapContainer_%d/c28Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{8}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc22Nchetagap] = registry.add(Form("BootstrapContainer_%d/c22Nchetagap", i), ";N_ch(|#eta| < 0.8) ; C_{2}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc32Nch] = registry.add(Form("BootstrapContainer_%d/c32Nch", i), ";N_ch(|#eta| < 0.8) ; C_{3}{2}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc32Nchetagap] = registry.add(Form("BootstrapContainer_%d/c32Nchetagap", i), ";N_ch(|#eta| < 0.8) ; C_{3}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc34Nch] = registry.add(Form("BootstrapContainer_%d/c34Nch", i), ";N_ch(|#eta| < 0.8) ; C_{3}{4}", {HistType::kTProfile, {axisNch}}); - - BootstrapArray[i][kc22Nch05] = registry.add(Form("BootstrapContainer_%d/c22Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{2}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc24Nch05] = registry.add(Form("BootstrapContainer_%d/c24Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{4}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc26Nch05] = registry.add(Form("BootstrapContainer_%d/c26Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{6}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc28Nch05] = registry.add(Form("BootstrapContainer_%d/c28Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{8}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc22Nch05etagap] = registry.add(Form("BootstrapContainer_%d/c22Nch05etagap", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc32Nch05] = registry.add(Form("BootstrapContainer_%d/c32Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{3}{2}", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc32Nch05etagap] = registry.add(Form("BootstrapContainer_%d/c32Nch05etagap", i), ";N_ch05(|#eta| < 0.8) ; C_{3}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); - BootstrapArray[i][kc34Nch05] = registry.add(Form("BootstrapContainer_%d/c34Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{3}{4}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc22] = registry.add(Form("BootstrapContainer_%d/c22", i), ";Centrality (%) ; C_{2}{2}", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc24] = registry.add(Form("BootstrapContainer_%d/c24", i), ";Centrality (%) ; C_{2}{4}", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc26] = registry.add(Form("BootstrapContainer_%d/c26", i), ";Centrality (%) ; C_{2}{6}", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc28] = registry.add(Form("BootstrapContainer_%d/c28", i), ";Centrality (%) ; C_{2}{8}", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc22etagap] = registry.add(Form("BootstrapContainer_%d/c22etagap", i), ";Centrality (%) ; C_{2}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc32] = registry.add(Form("BootstrapContainer_%d/c32", i), ";Centrality (%) ; C_{3}{2}", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc32etagap] = registry.add(Form("BootstrapContainer_%d/c32etagap", i), ";Centrality (%) ; C_{3}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisCentrality}}); + bootstrapArray[i][kc34] = registry.add(Form("BootstrapContainer_%d/c34", i), ";Centrality (%) ; C_{3}{4}", {HistType::kTProfile, {axisCentrality}}); + + bootstrapArray[i][kc22Nch] = registry.add(Form("BootstrapContainer_%d/c22Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{2}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc24Nch] = registry.add(Form("BootstrapContainer_%d/c24Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{4}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc26Nch] = registry.add(Form("BootstrapContainer_%d/c26Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{6}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc28Nch] = registry.add(Form("BootstrapContainer_%d/c28Nch", i), ";N_ch(|#eta| < 0.8) ; C_{2}{8}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc22Nchetagap] = registry.add(Form("BootstrapContainer_%d/c22Nchetagap", i), ";N_ch(|#eta| < 0.8) ; C_{2}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc32Nch] = registry.add(Form("BootstrapContainer_%d/c32Nch", i), ";N_ch(|#eta| < 0.8) ; C_{3}{2}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc32Nchetagap] = registry.add(Form("BootstrapContainer_%d/c32Nchetagap", i), ";N_ch(|#eta| < 0.8) ; C_{3}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc34Nch] = registry.add(Form("BootstrapContainer_%d/c34Nch", i), ";N_ch(|#eta| < 0.8) ; C_{3}{4}", {HistType::kTProfile, {axisNch}}); + + bootstrapArray[i][kc22Nch05] = registry.add(Form("BootstrapContainer_%d/c22Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{2}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc24Nch05] = registry.add(Form("BootstrapContainer_%d/c24Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{4}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc26Nch05] = registry.add(Form("BootstrapContainer_%d/c26Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{6}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc28Nch05] = registry.add(Form("BootstrapContainer_%d/c28Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{8}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc22Nch05etagap] = registry.add(Form("BootstrapContainer_%d/c22Nch05etagap", i), ";N_ch05(|#eta| < 0.8) ; C_{2}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc32Nch05] = registry.add(Form("BootstrapContainer_%d/c32Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{3}{2}", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc32Nch05etagap] = registry.add(Form("BootstrapContainer_%d/c32Nch05etagap", i), ";N_ch05(|#eta| < 0.8) ; C_{3}{2} (|#eta| < 0.8)", {HistType::kTProfile, {axisNch}}); + bootstrapArray[i][kc34Nch05] = registry.add(Form("BootstrapContainer_%d/c34Nch05", i), ";N_ch05(|#eta| < 0.8) ; C_{3}{4}", {HistType::kTProfile, {axisNch}}); } o2::framework::AxisSpec axis = axisPt; int nPtBins = axis.binEdges.size() - 1; - double* PtBins = &(axis.binEdges)[0]; - fPtAxis = new TAxis(nPtBins, PtBins); + double* ptBins = &(axis.binEdges)[0]; + fPtAxis = new TAxis(nPtBins, ptBins); if (cfgOutputNUAWeights) { - fWeights->SetPtBins(nPtBins, PtBins); + fWeights->SetPtBins(nPtBins, ptBins); fWeights->Init(true, false); } @@ -358,15 +358,15 @@ struct FlowGFWPbPb { fPhiCutLow = new TF1("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); fPhiCutHigh = new TF1("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); } - + if (cfgTrackSelRun3ITSMatch) { myTrackSel = getGlobalTrackSelectionRun3ITSMatch(TrackSelection::GlobalTrackRun3ITSMatching::Run3ITSall7Layers, TrackSelection::GlobalTrackRun3DCAxyCut::Default);} else { myTrackSel = getGlobalTrackSelectionRun3ITSMatch(TrackSelection::GlobalTrackRun3ITSMatching::Run3ITSibAny, TrackSelection::GlobalTrackRun3DCAxyCut::Default);} - + myTrackSel.SetMinNClustersTPC(cfgCutTPCclu); myTrackSel.SetMinNClustersITS(cfgCutITSclu); - + } // end of Initialization template @@ -378,7 +378,7 @@ struct FlowGFWPbPb { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) registry.fill(tarName, cent, val, dnx); return; } @@ -393,7 +393,7 @@ struct FlowGFWPbPb { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) { + if (std::fabs(val) < 1) { tarName->Fill(cent, val, dnx); } return; @@ -409,7 +409,7 @@ struct FlowGFWPbPb { return; if (!corrconf.pTDif) { val = fGFW->Calculate(corrconf, 0, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) fFC->FillProfile(corrconf.Head.c_str(), cent, val, dnx, rndm); return; } @@ -418,7 +418,7 @@ struct FlowGFWPbPb { if (dnx == 0) continue; val = fGFW->Calculate(corrconf, i - 1, kFALSE).real() / dnx; - if (TMath::Abs(val) < 1) + if (std::fabs(val) < 1) fFC->FillProfile(Form("%s_pt_%i", corrconf.Head.c_str(), i), cent, val, dnx, rndm); } return; @@ -515,14 +515,14 @@ struct FlowGFWPbPb { float vtxz = -999; if (collision.numContrib() > 1) { vtxz = collision.posZ(); - float zRes = TMath::Sqrt(collision.covZZ()); + float zRes = sqrt(collision.covZZ()); if (zRes > 0.25 && collision.numContrib() < 20) vtxz = -999; } auto multNTracksPV = collision.multNTracksPV(); - if (abs(vtxz) > cfgCutVertex) + if (std::abs(vtxz) > cfgCutVertex) return false; if (cfgMultCut) { @@ -538,7 +538,7 @@ struct FlowGFWPbPb { } // V0A T0A 5 sigma cut - if (abs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > 5 * fT0AV0ASigma->Eval(collision.multFT0A())) + if (std::abs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > 5 * fT0AV0ASigma->Eval(collision.multFT0A())) return false; return true; @@ -577,7 +577,7 @@ struct FlowGFWPbPb { registry.fill(HIST("pt_phi_aft"), track.pt(), phimodn); return true; } - + template bool trackSelected(TTrack track) { @@ -588,22 +588,22 @@ struct FlowGFWPbPb { return (track.tpcNClsFound() >= cfgCutTPCclu); } } - + // Apply process filters Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); using Colls = soa::Filtered>; // collisions filter - using aodTracks = soa::Filtered>; // tracks filter - - void processData(Colls::iterator const& collision, aod::BCsWithTimestamps const&, aodTracks const& tracks, aod::FT0s const&) + using AodTracks = soa::Filtered>; // tracks filter + + void processData(Colls::iterator const& collision, aod::BCsWithTimestamps const&, AodTracks const& tracks, aod::FT0s const&) { registry.fill(HIST("hEventCount"), kFILTERED); if (!collision.sel8()) return; - int Ntot = tracks.size(); - if (Ntot < 1) + int nTotal = tracks.size(); + if (nTotal < 1) return; // fill event QA before cuts @@ -617,7 +617,7 @@ struct FlowGFWPbPb { registry.fill(HIST("hEventCount"), kSEL8); const auto centrality = collision.centFT0C(); - + if (cfgOccupancy) { int occupancy = collision.trackOccupancyInTimeRange(); if (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh) @@ -635,10 +635,10 @@ struct FlowGFWPbPb { float vtxz = collision.posZ(); float l_Random = fRndm->Rndm(); registry.fill(HIST("hVtxZ"), vtxz); - registry.fill(HIST("hMult"), Ntot); + registry.fill(HIST("hMult"), nTotal); registry.fill(HIST("hCent"), centrality); - registry.fill(HIST("cent_vs_Nch"), centrality, Ntot); - + registry.fill(HIST("cent_vs_Nch"), centrality, nTotal); + fGFW->Clear(); auto bc = collision.bc_as(); @@ -653,11 +653,11 @@ struct FlowGFWPbPb { registry.fill(HIST("globalTracks_multV0A_Aft"), collision.multFV0A(), tracks.size()); registry.fill(HIST("multV0A_multT0A_Aft"), collision.multFT0A(), collision.multFV0A()); registry.fill(HIST("multT0C_centT0C_Aft"), collision.centFT0C(), collision.multFT0C()); - + // FT0 amplitude to use in fine binning double ft0aAmp = 0; double ft0cAmp = 0; - + if (collision.has_foundFT0()) { auto ft0 = collision.foundFT0(); for (const auto& amplitude : ft0.amplitudeA()) { @@ -667,10 +667,10 @@ struct FlowGFWPbPb { ft0cAmp += amplitude; } } - + registry.fill(HIST("FT0AAmp"), ft0aAmp); registry.fill(HIST("FT0CAmp"), ft0cAmp); - + double ft0mAmp = ft0aAmp + ft0cAmp; registry.fill(HIST("FT0MAmp"), ft0mAmp); @@ -682,28 +682,28 @@ struct FlowGFWPbPb { // magnet field dependence cut Magnetfield = getMagneticField(bc.timestamp()); } - + // track loop int globaltracks_nch{0}; - for (auto& track : tracks) { - + for (const auto& track : tracks) { + if (!trackSelected(track)) continue; - + if (cfgUseAdditionalTrackCut && !trackSelected(track, Magnetfield)) continue; - + if (cfgOutputNUAWeights) fWeights->Fill(track.phi(), track.eta(), vtxz, track.pt(), centrality, 0); - + if (!setCurrentParticleWeights(weff, wacc, track.phi(), track.eta(), track.pt(), vtxz)) continue; - bool WithinPtRef = (cfgCutPtMin < track.pt()) && (track.pt() < cfgCutPtMax); // within RF pT range + bool withinPtRef = (cfgCutPtMin < track.pt()) && (track.pt() < cfgCutPtMax); // within RF pT range registry.fill(HIST("hPt"), track.pt()); - if (WithinPtRef) { + if (withinPtRef) { registry.fill(HIST("hPhi"), track.phi()); registry.fill(HIST("hPhiWeighted"), track.phi(), wacc); registry.fill(HIST("hEta"), track.eta()); @@ -716,10 +716,10 @@ struct FlowGFWPbPb { } globaltracks_nch++; - - if (WithinPtRef) + + if (withinPtRef) fGFW->Fill(track.eta(), 1, track.phi(), wacc * weff, 1); - + if (FineBinning == true) fGFW->Fill(track.eta(), 1, track.phi(), wacc * weff, 1); @@ -737,7 +737,7 @@ struct FlowGFWPbPb { FillProfile(corrconfigs.at(5), HIST("c32"), centrality); FillProfile(corrconfigs.at(6), HIST("c32etagap"), centrality); FillProfile(corrconfigs.at(7), HIST("c34"), centrality); - + FillProfile(corrconfigs.at(0), HIST("c22Nch"), globaltracks_nch); FillProfile(corrconfigs.at(1), HIST("c24Nch"), globaltracks_nch); FillProfile(corrconfigs.at(2), HIST("c26Nch"), globaltracks_nch); @@ -746,7 +746,7 @@ struct FlowGFWPbPb { FillProfile(corrconfigs.at(5), HIST("c32Nch"), globaltracks_nch); FillProfile(corrconfigs.at(6), HIST("c32Nchetagap"), globaltracks_nch); FillProfile(corrconfigs.at(7), HIST("c34Nch"), globaltracks_nch); - + // 0-5% centrality Nch if (centrality>=0 && centrality<=5){ FillProfile(corrconfigs.at(0), HIST("c22Nch05"), globaltracks_nch); @@ -758,53 +758,53 @@ struct FlowGFWPbPb { FillProfile(corrconfigs.at(6), HIST("c32Nch05etagap"), globaltracks_nch); FillProfile(corrconfigs.at(7), HIST("c34Nch05"), globaltracks_nch); } - + // Filling Bootstrap Samples - int SampleIndex = static_cast(cfgNbootstrap * l_Random); - FillProfile(corrconfigs.at(0), BootstrapArray[SampleIndex][kc22], centrality); - FillProfile(corrconfigs.at(1), BootstrapArray[SampleIndex][kc24], centrality); - FillProfile(corrconfigs.at(2), BootstrapArray[SampleIndex][kc26], centrality); - FillProfile(corrconfigs.at(3), BootstrapArray[SampleIndex][kc28], centrality); - FillProfile(corrconfigs.at(4), BootstrapArray[SampleIndex][kc22etagap], centrality); - FillProfile(corrconfigs.at(5), BootstrapArray[SampleIndex][kc32], centrality); - FillProfile(corrconfigs.at(6), BootstrapArray[SampleIndex][kc32etagap], centrality); - FillProfile(corrconfigs.at(7), BootstrapArray[SampleIndex][kc34], centrality); - - FillProfile(corrconfigs.at(0), BootstrapArray[SampleIndex][kc22Nch], globaltracks_nch); - FillProfile(corrconfigs.at(1), BootstrapArray[SampleIndex][kc24Nch], globaltracks_nch); - FillProfile(corrconfigs.at(2), BootstrapArray[SampleIndex][kc26Nch], globaltracks_nch); - FillProfile(corrconfigs.at(3), BootstrapArray[SampleIndex][kc28Nch], globaltracks_nch); - FillProfile(corrconfigs.at(4), BootstrapArray[SampleIndex][kc22Nchetagap], globaltracks_nch); - FillProfile(corrconfigs.at(5), BootstrapArray[SampleIndex][kc32Nch], globaltracks_nch); - FillProfile(corrconfigs.at(6), BootstrapArray[SampleIndex][kc32Nchetagap], globaltracks_nch); - FillProfile(corrconfigs.at(7), BootstrapArray[SampleIndex][kc34Nch], globaltracks_nch); - + int sampleIndex = static_cast(cfgNbootstrap * l_Random); + FillProfile(corrconfigs.at(0), bootstrapArray[sampleIndex][kc22], centrality); + FillProfile(corrconfigs.at(1), bootstrapArray[sampleIndex][kc24], centrality); + FillProfile(corrconfigs.at(2), bootstrapArray[sampleIndex][kc26], centrality); + FillProfile(corrconfigs.at(3), bootstrapArray[sampleIndex][kc28], centrality); + FillProfile(corrconfigs.at(4), bootstrapArray[sampleIndex][kc22etagap], centrality); + FillProfile(corrconfigs.at(5), bootstrapArray[sampleIndex][kc32], centrality); + FillProfile(corrconfigs.at(6), bootstrapArray[sampleIndex][kc32etagap], centrality); + FillProfile(corrconfigs.at(7), bootstrapArray[sampleIndex][kc34], centrality); + + FillProfile(corrconfigs.at(0), bootstrapArray[sampleIndex][kc22Nch], globaltracks_nch); + FillProfile(corrconfigs.at(1), bootstrapArray[sampleIndex][kc24Nch], globaltracks_nch); + FillProfile(corrconfigs.at(2), bootstrapArray[sampleIndex][kc26Nch], globaltracks_nch); + FillProfile(corrconfigs.at(3), bootstrapArray[sampleIndex][kc28Nch], globaltracks_nch); + FillProfile(corrconfigs.at(4), bootstrapArray[sampleIndex][kc22Nchetagap], globaltracks_nch); + FillProfile(corrconfigs.at(5), bootstrapArray[sampleIndex][kc32Nch], globaltracks_nch); + FillProfile(corrconfigs.at(6), bootstrapArray[sampleIndex][kc32Nchetagap], globaltracks_nch); + FillProfile(corrconfigs.at(7), bootstrapArray[sampleIndex][kc34Nch], globaltracks_nch); + if (centrality>=0 && centrality<=5){ - FillProfile(corrconfigs.at(0), BootstrapArray[SampleIndex][kc22Nch05], globaltracks_nch); - FillProfile(corrconfigs.at(1), BootstrapArray[SampleIndex][kc24Nch05], globaltracks_nch); - FillProfile(corrconfigs.at(2), BootstrapArray[SampleIndex][kc26Nch05], globaltracks_nch); - FillProfile(corrconfigs.at(3), BootstrapArray[SampleIndex][kc28Nch05], globaltracks_nch); - FillProfile(corrconfigs.at(4), BootstrapArray[SampleIndex][kc22Nch05etagap], globaltracks_nch); - FillProfile(corrconfigs.at(5), BootstrapArray[SampleIndex][kc32Nch05], globaltracks_nch); - FillProfile(corrconfigs.at(6), BootstrapArray[SampleIndex][kc32Nch05etagap], globaltracks_nch); - FillProfile(corrconfigs.at(7), BootstrapArray[SampleIndex][kc34Nch05], globaltracks_nch); + FillProfile(corrconfigs.at(0), bootstrapArray[sampleIndex][kc22Nch05], globaltracks_nch); + FillProfile(corrconfigs.at(1), bootstrapArray[sampleIndex][kc24Nch05], globaltracks_nch); + FillProfile(corrconfigs.at(2), bootstrapArray[sampleIndex][kc26Nch05], globaltracks_nch); + FillProfile(corrconfigs.at(3), bootstrapArray[sampleIndex][kc28Nch05], globaltracks_nch); + FillProfile(corrconfigs.at(4), bootstrapArray[sampleIndex][kc22Nch05etagap], globaltracks_nch); + FillProfile(corrconfigs.at(5), bootstrapArray[sampleIndex][kc32Nch05], globaltracks_nch); + FillProfile(corrconfigs.at(6), bootstrapArray[sampleIndex][kc32Nch05etagap], globaltracks_nch); + FillProfile(corrconfigs.at(7), bootstrapArray[sampleIndex][kc34Nch05], globaltracks_nch); } // Filling Flow Container for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) { FillFC(corrconfigs.at(l_ind), centrality, l_Random); } - + } // End of process - PROCESS_SWITCH(FlowGFWPbPb, processData, "Process analysis for Run 3 data", false); + PROCESS_SWITCH(flowGFWPbPb, processData, "Process analysis for Run 3 data", false); // Filter the Reco tracks Filter mytrackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (nabs(aod::track::dcaXY) < cfgCutDCAxy); - using myTracks = soa::Filtered>; - using myCollisions = soa::Join; + using MyTracks = soa::Filtered>; + using MyCollisions = soa::Join; - void processReco(myCollisions::iterator const& collision, myTracks const& tracks, aod::McParticles const&) + void processReco(MyCollisions::iterator const& collision, MyTracks const& tracks, aod::McParticles const&) { registry.fill(HIST("eventCounter"), 0.5); const auto centrality = collision.centFT0C(); @@ -824,14 +824,14 @@ struct FlowGFWPbPb { } } } - PROCESS_SWITCH(FlowGFWPbPb, processReco, "process reconstructed information", false); + PROCESS_SWITCH(flowGFWPbPb, processReco, "process reconstructed information", false); // Filter for MCParticle Filter particleFilter = (nabs(aod::mcparticle::eta) < cfgCutEta) && (aod::mcparticle::pt > cfgCutPtMin) && (aod::mcparticle::pt < cfgCutPtMax); - using myMcParticles = soa::Filtered; - using myMcCollisionsFT0Cs = soa::Join; + using MyMcParticles = soa::Filtered; + using MyMcCollisionsFT0Cs = soa::Join; - void processSim(aod::McCollision const&, soa::SmallGroups> const& collisions, myMcParticles const& mcParticles, myMcCollisionsFT0Cs const& mcCollisionsFT0Cs ) + void processSim(aod::McCollision const&, soa::SmallGroups> const& collisions, MyMcParticles const& mcParticles, MyMcCollisionsFT0Cs const& mcCollisionsFT0Cs ) { if (collisions.size() > -1) { registry.fill(HIST("mcEventCounter"), 0.5); @@ -853,12 +853,12 @@ struct FlowGFWPbPb { } } } - PROCESS_SWITCH(FlowGFWPbPb, processSim, "process pure simulation information", false); + PROCESS_SWITCH(flowGFWPbPb, processSim, "process pure simulation information", false); }; // End of struct WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc)}; }