From 6d1653e20614bb3e0a09c35d7f7e61b25ebba681 Mon Sep 17 00:00:00 2001 From: lcernusa Date: Tue, 24 Mar 2026 19:19:04 +0100 Subject: [PATCH 1/2] [PWGCF] Flow-decorrelations added option to only cut ITS layer 0-3 for pp specific research --- .../Tasks/flowDecorrelation.cxx | 1539 +++++++++++------ 1 file changed, 1040 insertions(+), 499 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx index a2b7422f9f4..250bfa8704c 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright +// holders. All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -10,8 +10,10 @@ // or submit itself to any jurisdiction. /// \file flowDecorrelation.cxx -/// \brief long range correlations for O-O and Ne-Ne collisions as a function of eta -/// \author Zhiyong Lu (zhiyong.lu@cern.ch), Joachim Hansen (joachim.hansen@cern.ch), Lukas Cernusak (lukas.cernusak@cern.ch) +/// \brief long range correlations for O-O and Ne-Ne collisions as a function of +/// eta +/// \author Zhiyong Lu (zhiyong.lu@cern.ch), Joachim Hansen +/// (joachim.hansen@cern.ch), Lukas Cernusak (lukas.cernusak@cern.ch) /// \since Sep/10/2025 #include "PWGCF/Core/CorrelationContainer.h" @@ -59,128 +61,294 @@ using namespace o2::framework; using namespace o2::framework::expressions; // define the filtered collisions and tracks -#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable NAME{#NAME, DEFAULT, HELP}; +#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) \ + Configurable NAME{#NAME, DEFAULT, HELP}; struct FlowDecorrelation { Service ccdb; O2_DEFINE_CONFIGURABLE(cfgCutVtxZ, float, 10.0f, "Accepted z-vertex range") O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.2f, "minimum accepted track pT") O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "maximum accepted track pT") - O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, "max chi2 per TPC clusters") + O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, + "max chi2 per TPC clusters") O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum TPC clusters") - O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows") + O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, + "minimum TPC crossed rows") O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters") O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z") - O2_DEFINE_CONFIGURABLE(cfgSelCollByNch, bool, true, "Select collisions by Nch or centrality") - O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, "Minimum multiplicity for collision") - O2_DEFINE_CONFIGURABLE(cfgCutMultMax, int, 10, "Maximum multiplicity for collision") - O2_DEFINE_CONFIGURABLE(cfgCutCentMin, float, 60.0f, "Minimum centrality for collision") - O2_DEFINE_CONFIGURABLE(cfgCutCentMax, float, 80.0f, "Maximum centrality for collision") - O2_DEFINE_CONFIGURABLE(cfgMixEventNumMin, int, 5, "Minimum number of events to mix") - O2_DEFINE_CONFIGURABLE(cfgSampleSize, double, 10, "Sample size for mixed event") - O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FT0A") - O2_DEFINE_CONFIGURABLE(cfgCentTableUnavailable, bool, false, "if a dataset does not provide centrality information") - O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoITSROFrameBorder, bool, false, "reject events at ITS ROF border") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoTimeFrameBorder, bool, false, "reject events at TF border") - O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodZvtxFT0vsPV, bool, false, "removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, "no collisions in specified time range") - O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, true, "cut time intervals with dead ITS staves") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInRofStandard, bool, false, "no other collisions in this Readout Frame with per-collision multiplicity above threshold") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoHighMultCollInPrevRof, bool, false, "veto an event if FT0C amplitude in previous ITS ROF is above threshold") - O2_DEFINE_CONFIGURABLE(cfgEvSelMultCorrelation, bool, true, "Multiplicity correlation cut") + O2_DEFINE_CONFIGURABLE(cfgSelCollByNch, bool, true, + "Select collisions by Nch or centrality") + O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, + "Minimum multiplicity for collision") + O2_DEFINE_CONFIGURABLE(cfgCutMultMax, int, 10, + "Maximum multiplicity for collision") + O2_DEFINE_CONFIGURABLE(cfgCutCentMin, float, 60.0f, + "Minimum centrality for collision") + O2_DEFINE_CONFIGURABLE(cfgCutCentMax, float, 80.0f, + "Maximum centrality for collision") + O2_DEFINE_CONFIGURABLE(cfgMixEventNumMin, int, 5, + "Minimum number of events to mix") + O2_DEFINE_CONFIGURABLE(cfgSampleSize, double, 10, + "Sample size for mixed event") + O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, + "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FT0A") + O2_DEFINE_CONFIGURABLE(cfgCentTableUnavailable, bool, false, + "if a dataset does not provide centrality information") + O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, + "Use additional event cut on mult correlations") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, + "rejects collisions which are associated with the " + "same found-by-T0 bunch crossing") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoITSROFrameBorder, bool, false, + "reject events at ITS ROF border") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoTimeFrameBorder, bool, false, + "reject events at TF border") + O2_DEFINE_CONFIGURABLE( + cfgEvSelkIsGoodZvtxFT0vsPV, bool, false, + "removes collisions with large differences between z of PV by tracks and " + "z of PV from FT0 A-C time difference, use this cut at low " + "multiplicities with caution") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, + "no collisions in specified time range") + O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, true, + "cut time intervals with dead ITS staves") + O2_DEFINE_CONFIGURABLE( + cfgEvSelkIsGoodITSLayer0123, bool, false, + "cut time intervals with dead ITS staves (layers 0-3 only, for pp)") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInRofStandard, bool, false, + "no other collisions in this Readout Frame with " + "per-collision multiplicity above threshold") + O2_DEFINE_CONFIGURABLE( + cfgEvSelkNoHighMultCollInPrevRof, bool, false, + "veto an event if FT0C amplitude in previous ITS ROF is above threshold") + O2_DEFINE_CONFIGURABLE(cfgEvSelMultCorrelation, bool, true, + "Multiplicity correlation cut") O2_DEFINE_CONFIGURABLE(cfgEvSelV0AT0ACut, bool, true, "V0A T0A 5 sigma cut") O2_DEFINE_CONFIGURABLE(cfgEvSelOccupancy, bool, true, "Occupancy cut") - O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 2000, "High cut on TPC occupancy") + O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 2000, + "High cut on TPC occupancy") O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy") - O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object") - O2_DEFINE_CONFIGURABLE(cfgCentralityWeight, std::string, "", "CCDB path to centrality weight object") - O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, "Use local efficiency object") - O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event") - O2_DEFINE_CONFIGURABLE(cfgDrawEtaPhiDis, bool, false, "draw eta-phi distribution for detectors in used") - O2_DEFINE_CONFIGURABLE(nClustersMftTrack, int, 5, "Minimum number of clusters for MFT track") + O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", + "CCDB path to efficiency object") + O2_DEFINE_CONFIGURABLE(cfgCentralityWeight, std::string, "", + "CCDB path to centrality weight object") + O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, + "Use local efficiency object") + O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, + "Use event weights for mixed event") + O2_DEFINE_CONFIGURABLE(cfgDrawEtaPhiDis, bool, false, + "draw eta-phi distribution for detectors in used") + O2_DEFINE_CONFIGURABLE(nClustersMftTrack, int, 5, + "Minimum number of clusters for MFT track") O2_DEFINE_CONFIGURABLE(cfgCutChi2Mft, float, -1.0f, "max chi2 of MFT track") - O2_DEFINE_CONFIGURABLE(cfgCutTrackTimeMft, float, -1.0f, "max deviation of MFT track wrt. bc in ns") - O2_DEFINE_CONFIGURABLE(cfgRejectFT0AInside, bool, false, "Rejection of inner ring channels of the FT0A detector") - O2_DEFINE_CONFIGURABLE(cfgRejectFT0AOutside, bool, false, "Rejection of outer ring channels of the FT0A detector") - O2_DEFINE_CONFIGURABLE(cfgRejectFT0CInside, bool, false, "Rejection of inner ring channels of the FT0C detector") - O2_DEFINE_CONFIGURABLE(cfgRejectFT0COutside, bool, false, "Rejection of outer ring channels of the FT0C detector") + O2_DEFINE_CONFIGURABLE(cfgCutTrackTimeMft, float, -1.0f, + "max deviation of MFT track wrt. bc in ns") + O2_DEFINE_CONFIGURABLE( + cfgRejectFT0AInside, bool, false, + "Rejection of inner ring channels of the FT0A detector") + O2_DEFINE_CONFIGURABLE( + cfgRejectFT0AOutside, bool, false, + "Rejection of outer ring channels of the FT0A detector") + O2_DEFINE_CONFIGURABLE( + cfgRejectFT0CInside, bool, false, + "Rejection of inner ring channels of the FT0C detector") + O2_DEFINE_CONFIGURABLE( + cfgRejectFT0COutside, bool, false, + "Rejection of outer ring channels of the FT0C detector") struct : ConfigurableGroup { - O2_DEFINE_CONFIGURABLE(cfgMultCentHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultCentLowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultT0CCutEnabled, bool, false, "Enable Global multiplicity vs T0C centrality cut") - Configurable> cfgMultT0CCutPars{"cfgMultT0CCutPars", std::vector{143.04, -4.58368, 0.0766055, -0.000727796, 2.86153e-06, 23.3108, -0.36304, 0.00437706, -4.717e-05, 1.98332e-07}, "Global multiplicity vs T0C centrality cut parameter values"}; - O2_DEFINE_CONFIGURABLE(cfgMultPVT0CCutEnabled, bool, false, "Enable PV multiplicity vs T0C centrality cut") - Configurable> cfgMultPVT0CCutPars{"cfgMultPVT0CCutPars", std::vector{195.357, -6.15194, 0.101313, -0.000955828, 3.74793e-06, 30.0326, -0.43322, 0.00476265, -5.11206e-05, 2.13613e-07}, "PV multiplicity vs T0C centrality cut parameter values"}; - O2_DEFINE_CONFIGURABLE(cfgMultMultPVHighCutFunction, std::string, "[0]+[1]*x + 5.*([2]+[3]*x)", "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultMultPVLowCutFunction, std::string, "[0]+[1]*x - 5.*([2]+[3]*x)", "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultGlobalPVCutEnabled, bool, false, "Enable global multiplicity vs PV multiplicity cut") - Configurable> cfgMultGlobalPVCutPars{"cfgMultGlobalPVCutPars", std::vector{-0.140809, 0.734344, 2.77495, 0.0165935}, "PV multiplicity vs T0C centrality cut parameter values"}; - O2_DEFINE_CONFIGURABLE(cfgMultMultV0AHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 4.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultMultV0ALowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultMultV0ACutEnabled, bool, false, "Enable global multiplicity vs V0A multiplicity cut") - Configurable> cfgMultMultV0ACutPars{"cfgMultMultV0ACutPars", std::vector{534.893, 184.344, 0.423539, -0.00331436, 5.34622e-06, 871.239, 53.3735, -0.203528, 0.000122758, 5.41027e-07}, "Global multiplicity vs V0A multiplicity cut parameter values"}; + O2_DEFINE_CONFIGURABLE( + cfgMultCentHighCutFunction, std::string, + "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + " + "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", + "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE( + cfgMultCentLowCutFunction, std::string, + "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + " + "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", + "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultT0CCutEnabled, bool, false, + "Enable Global multiplicity vs T0C centrality cut") + Configurable> cfgMultT0CCutPars{ + "cfgMultT0CCutPars", + std::vector{143.04, -4.58368, 0.0766055, -0.000727796, + 2.86153e-06, 23.3108, -0.36304, 0.00437706, + -4.717e-05, 1.98332e-07}, + "Global multiplicity vs T0C centrality cut parameter values"}; + O2_DEFINE_CONFIGURABLE(cfgMultPVT0CCutEnabled, bool, false, + "Enable PV multiplicity vs T0C centrality cut") + Configurable> cfgMultPVT0CCutPars{ + "cfgMultPVT0CCutPars", + std::vector{195.357, -6.15194, 0.101313, -0.000955828, + 3.74793e-06, 30.0326, -0.43322, 0.00476265, + -5.11206e-05, 2.13613e-07}, + "PV multiplicity vs T0C centrality cut parameter values"}; + O2_DEFINE_CONFIGURABLE(cfgMultMultPVHighCutFunction, std::string, + "[0]+[1]*x + 5.*([2]+[3]*x)", + "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultMultPVLowCutFunction, std::string, + "[0]+[1]*x - 5.*([2]+[3]*x)", + "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultGlobalPVCutEnabled, bool, false, + "Enable global multiplicity vs PV multiplicity cut") + Configurable> cfgMultGlobalPVCutPars{ + "cfgMultGlobalPVCutPars", + std::vector{-0.140809, 0.734344, 2.77495, 0.0165935}, + "PV multiplicity vs T0C centrality cut parameter values"}; + O2_DEFINE_CONFIGURABLE( + cfgMultMultV0AHighCutFunction, std::string, + "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 4.*([5] + [6]*x + " + "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", + "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE( + cfgMultMultV0ALowCutFunction, std::string, + "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + " + "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", + "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultMultV0ACutEnabled, bool, false, + "Enable global multiplicity vs V0A multiplicity cut") + Configurable> cfgMultMultV0ACutPars{ + "cfgMultMultV0ACutPars", + std::vector{534.893, 184.344, 0.423539, -0.00331436, + 5.34622e-06, 871.239, 53.3735, -0.203528, + 0.000122758, 5.41027e-07}, + "Global multiplicity vs V0A multiplicity cut parameter values"}; std::vector multT0CCutPars; std::vector multPVT0CCutPars; std::vector multGlobalPVCutPars; std::vector multMultV0ACutPars; - TF1* fMultPVT0CCutLow = nullptr; - TF1* fMultPVT0CCutHigh = nullptr; - TF1* fMultT0CCutLow = nullptr; - TF1* fMultT0CCutHigh = nullptr; - TF1* fMultGlobalPVCutLow = nullptr; - TF1* fMultGlobalPVCutHigh = nullptr; - TF1* fMultMultV0ACutLow = nullptr; - TF1* fMultMultV0ACutHigh = nullptr; - TF1* fT0AV0AMean = nullptr; - TF1* fT0AV0ASigma = nullptr; + TF1 *fMultPVT0CCutLow = nullptr; + TF1 *fMultPVT0CCutHigh = nullptr; + TF1 *fMultT0CCutLow = nullptr; + TF1 *fMultT0CCutHigh = nullptr; + TF1 *fMultGlobalPVCutLow = nullptr; + TF1 *fMultGlobalPVCutHigh = nullptr; + TF1 *fMultMultV0ACutLow = nullptr; + TF1 *fMultMultV0ACutHigh = nullptr; + TF1 *fT0AV0AMean = nullptr; + TF1 *fT0AV0ASigma = nullptr; } cfgFuncParas; SliceCache cache; - ConfigurableAxis axisVertex{"axisVertex", {10, -10, 10}, "vertex axis for histograms"}; - ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260}, "multiplicity axis for histograms"}; - ConfigurableAxis axisEta{"axisEta", {70, -5.0, 5.0}, "eta axis for histograms"}; - ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {72, -PIHalf, PIHalf * 3}, "delta phi axis for histograms"}; - ConfigurableAxis axisDeltaEtaTpcFt0a{"axisDeltaEtaTpcFt0a", {32, -5.8, -2.6}, "delta eta axis, -5.8~-2.6 for TPC-FT0A,"}; - ConfigurableAxis axisDeltaEtaTpcFt0c{"axisDeltaEtaTpcFt0c", {32, 1.2, 4.2}, "delta eta axis, 1.2~4.2 for TPC-FT0C"}; - ConfigurableAxis axisDeltaEtaFt0aFt0c{"axisDeltaEtaFt0aFt0c", {32, 4.2, 8.2}, "delta eta axis, 4.2~8.2 for FT0A-FT0C"}; - ConfigurableAxis axisDeltaEtaTpcMft{"axisDeltaEtaTpcMft", {32, 1.3, 4.8}, "delta eta axis, 1.3~4.8 for TPC-MFT"}; - ConfigurableAxis axisDeltaEtaTpcFv0{"axisDeltaEtaTpcFv0", {32, -1.2, -6.1}, "delta eta axis for TPC-FV0 histograms"}; - ConfigurableAxis axisEtaTrigger{"axisEtaTrigger", {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, "eta trigger axis for histograms"}; - ConfigurableAxis axisEtaAssoc{"axisEtaAssoc", {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, "eta associated axis for histograms"}; - ConfigurableAxis axisVtxMix{"axisVtxMix", {VARIABLE_WIDTH, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "vertex axis for mixed event histograms"}; - ConfigurableAxis axisMultMix{"axisMultMix", {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260}, "multiplicity / centrality axis for mixed event histograms"}; - ConfigurableAxis axisSample{"axisSample", {cfgSampleSize, 0, cfgSampleSize}, "sample axis for histograms"}; - - ConfigurableAxis axisVertexEfficiency{"axisVertexEfficiency", {10, -10, 10}, "vertex axis for efficiency histograms"}; - ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", {20, -1.0, 1.0}, "eta axis for efficiency histograms"}; - ConfigurableAxis axisPtEfficiency{"axisPtEfficiency", {VARIABLE_WIDTH, 0.2, 0.5, 1, 1.5, 2, 3, 4, 6, 10}, "pt axis for efficiency histograms"}; - ConfigurableAxis axisAmplitudeFt0a{"axisAmplitudeFt0a", {5000, 0, 1000}, "FT0A amplitude"}; - ConfigurableAxis axisChannelFt0aAxis{"axisChannelFt0aAxis", {96, 0.0, 96.0}, "FT0A channel"}; - - Configurable cfgGainEqPath{"cfgGainEqPath", "Analysis/EventPlane/GainEq", "CCDB path for gain equalization constants"}; - Configurable cfgCorrLevel{"cfgCorrLevel", 1, "calibration step: 0 = no corr, 1 = gain corr"}; + ConfigurableAxis axisVertex{ + "axisVertex", {10, -10, 10}, "vertex axis for histograms"}; + ConfigurableAxis axisMultiplicity{"axisMultiplicity", + {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, + 120, 140, 160, 180, 200, 220, 240, 260}, + "multiplicity axis for histograms"}; + ConfigurableAxis axisEta{ + "axisEta", {70, -5.0, 5.0}, "eta axis for histograms"}; + ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", + {72, -PIHalf, PIHalf * 3}, + "delta phi axis for histograms"}; + ConfigurableAxis axisDeltaEtaTpcFt0a{ + "axisDeltaEtaTpcFt0a", + {32, -5.8, -2.6}, + "delta eta axis, -5.8~-2.6 for TPC-FT0A,"}; + ConfigurableAxis axisDeltaEtaTpcFt0c{"axisDeltaEtaTpcFt0c", + {32, 1.2, 4.2}, + "delta eta axis, 1.2~4.2 for TPC-FT0C"}; + ConfigurableAxis axisDeltaEtaFt0aFt0c{ + "axisDeltaEtaFt0aFt0c", + {32, 4.2, 8.2}, + "delta eta axis, 4.2~8.2 for FT0A-FT0C"}; + ConfigurableAxis axisDeltaEtaTpcMft{"axisDeltaEtaTpcMft", + {32, 1.3, 4.8}, + "delta eta axis, 1.3~4.8 for TPC-MFT"}; + ConfigurableAxis axisDeltaEtaTpcFv0{"axisDeltaEtaTpcFv0", + {32, -1.2, -6.1}, + "delta eta axis for TPC-FV0 histograms"}; + ConfigurableAxis axisEtaTrigger{"axisEtaTrigger", + {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, + -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, + "eta trigger axis for histograms"}; + ConfigurableAxis axisEtaAssoc{"axisEtaAssoc", + {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, + -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, + "eta associated axis for histograms"}; + ConfigurableAxis axisVtxMix{"axisVtxMix", + {VARIABLE_WIDTH, + -10, + -9, + -8, + -7, + -6, + -5, + -4, + -3, + -2, + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10}, + "vertex axis for mixed event histograms"}; + ConfigurableAxis axisMultMix{ + "axisMultMix", + {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, + 240, 260}, + "multiplicity / centrality axis for mixed event histograms"}; + ConfigurableAxis axisSample{"axisSample", + {cfgSampleSize, 0, cfgSampleSize}, + "sample axis for histograms"}; + + ConfigurableAxis axisVertexEfficiency{ + "axisVertexEfficiency", + {10, -10, 10}, + "vertex axis for efficiency histograms"}; + ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", + {20, -1.0, 1.0}, + "eta axis for efficiency histograms"}; + ConfigurableAxis axisPtEfficiency{ + "axisPtEfficiency", + {VARIABLE_WIDTH, 0.2, 0.5, 1, 1.5, 2, 3, 4, 6, 10}, + "pt axis for efficiency histograms"}; + ConfigurableAxis axisAmplitudeFt0a{ + "axisAmplitudeFt0a", {5000, 0, 1000}, "FT0A amplitude"}; + ConfigurableAxis axisChannelFt0aAxis{ + "axisChannelFt0aAxis", {96, 0.0, 96.0}, "FT0A channel"}; + + Configurable cfgGainEqPath{ + "cfgGainEqPath", "Analysis/EventPlane/GainEq", + "CCDB path for gain equalization constants"}; + Configurable cfgCorrLevel{ + "cfgCorrLevel", 1, "calibration step: 0 = no corr, 1 = gain corr"}; ConfigurableAxis cfgaxisFITamp{"cfgaxisFITamp", {1000, 0, 5000}, ""}; AxisSpec axisFit{cfgaxisFITamp, "fit amplitude"}; AxisSpec axisChID = {220, 0, 220}; // make the filters and cuts. Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ); - Filter trackFilter = (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); - using FilteredCollisions = soa::Filtered>; - using FilteredTracks = soa::Filtered>; + Filter trackFilter = + (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && + ((requireGlobalTrackInFilter()) || + (aod::track::isGlobalTrackSDD == static_cast(true))) && + (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && + (nabs(aod::track::dcaZ) < cfgCutDCAz); + using FilteredCollisions = + soa::Filtered>; + using FilteredTracks = + soa::Filtered>; // FT0 geometry o2::ft0::Geometry ft0Det; - o2::fv0::Geometry* fv0Det{}; + o2::fv0::Geometry *fv0Det{}; static constexpr uint64_t Ft0IndexA = 96; - std::vector* offsetFT0; - std::vector* offsetFV0; + std::vector *offsetFT0; + std::vector *offsetFV0; std::vector cstFT0RelGain{}; // Corrections - TH3D* mEfficiency = nullptr; - TH1D* mCentralityWeight = nullptr; + TH3D *mEfficiency = nullptr; + TH1D *mCentralityWeight = nullptr; bool correctionsLoaded = false; // Define the outputs @@ -189,7 +357,7 @@ struct FlowDecorrelation { HistogramRegistry registry{"registry"}; // define global variables - TRandom3* gRandom = new TRandom3(); + TRandom3 *gRandom = new TRandom3(); enum CentEstimators { kCentFT0C = 0, kCentFT0CVariant1, @@ -198,15 +366,8 @@ struct FlowDecorrelation { // Count the total number of enum kCount_CentEstimators }; - enum EventType { - SameEvent = 1, - MixedEvent = 3 - }; - enum FITIndex { - kFT0A = 0, - kFT0C = 1, - kFV0 = 2 - }; + enum EventType { SameEvent = 1, MixedEvent = 3 }; + enum FITIndex { kFT0A = 0, kFT0C = 1, kFV0 = 2 }; enum ParticleNsigma { kPionUp = 0, kKaonUp, @@ -215,11 +376,7 @@ struct FlowDecorrelation { kKaonLow, kProtonLow }; - enum DetectorType { - kTPC = 0, - kTOF, - kITS - }; + enum DetectorType { kTPC = 0, kTOF, kITS }; enum DetectorChannels { kFT0AInnerRingMin = 0, kFT0AInnerRingMax = 31, @@ -234,10 +391,10 @@ struct FlowDecorrelation { std::array itsNsigmaCut; std::array tpcNsigmaCut; - void init(InitContext&) - { + void init(InitContext &) { if (cfgCentTableUnavailable && !cfgSelCollByNch) { - LOGF(fatal, "Centrality table is unavailable, cannot select collisions by centrality"); + LOGF(fatal, "Centrality table is unavailable, cannot select collisions " + "by centrality"); } const AxisSpec axisPhi{72, 0.0, constants::math::TwoPI, "#varphi"}; const AxisSpec axisEta{40, -1., 1., "#eta"}; @@ -245,26 +402,58 @@ struct FlowDecorrelation { ccdb->setURL("http://alice-ccdb.cern.ch"); ccdb->setCaching(true); - auto now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + auto now = std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()) + .count(); ccdb->setCreatedNotAfter(now); fv0Det = o2::fv0::Geometry::instance(o2::fv0::Geometry::eUninitialized); LOGF(info, "Starting init"); // Event Counter - if ((doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) && cfgUseAdditionalEventCut) { - registry.add("hEventCountSpecific", "Number of Event;; Count", {HistType::kTH1D, {{12, 0, 12}}}); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(1, "after sel8"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(3, "kNoITSROFrameBorder"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(4, "kNoTimeFrameBorder"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(5, "kIsGoodZvtxFT0vsPV"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(6, "kNoCollInTimeRangeStandard"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(7, "kIsGoodITSLayersAll"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(8, "kNoCollInRofStandard"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(9, "kNoHighMultCollInPrevRof"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(10, "occupancy"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(11, "MultCorrelation"); - registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(12, "cfgEvSelV0AT0ACut"); + if ((doprocessSameTpcFt0a || doprocessSameTpcFt0c || + doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) && + cfgUseAdditionalEventCut) { + registry.add("hEventCountSpecific", "Number of Event;; Count", + {HistType::kTH1D, {{13, 0, 13}}}); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(1, "after sel8"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(2, "kNoSameBunchPileup"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(3, "kNoITSROFrameBorder"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(4, "kNoTimeFrameBorder"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(5, "kIsGoodZvtxFT0vsPV"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(6, "kNoCollInTimeRangeStandard"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(7, "kIsGoodITSLayersAll"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(8, "kIsGoodITSLayer0123"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(9, "kNoCollInRofStandard"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(10, "kNoHighMultCollInPrevRof"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(11, "occupancy"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(12, "MultCorrelation"); + registry.get(HIST("hEventCountSpecific")) + ->GetXaxis() + ->SetBinLabel(13, "cfgEvSelV0AT0ACut"); } if (cfgEvSelMultCorrelation) { @@ -272,45 +461,83 @@ struct FlowDecorrelation { cfgFuncParas.multPVT0CCutPars = cfgFuncParas.cfgMultPVT0CCutPars; cfgFuncParas.multGlobalPVCutPars = cfgFuncParas.cfgMultGlobalPVCutPars; cfgFuncParas.multMultV0ACutPars = cfgFuncParas.cfgMultMultV0ACutPars; - cfgFuncParas.fMultPVT0CCutLow = new TF1("fMultPVT0CCutLow", cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultPVT0CCutLow->SetParameters(&(cfgFuncParas.multPVT0CCutPars[0])); - cfgFuncParas.fMultPVT0CCutHigh = new TF1("fMultPVT0CCutHigh", cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultPVT0CCutHigh->SetParameters(&(cfgFuncParas.multPVT0CCutPars[0])); - - cfgFuncParas.fMultT0CCutLow = new TF1("fMultT0CCutLow", cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultT0CCutLow->SetParameters(&(cfgFuncParas.multT0CCutPars[0])); - cfgFuncParas.fMultT0CCutHigh = new TF1("fMultT0CCutHigh", cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultT0CCutHigh->SetParameters(&(cfgFuncParas.multT0CCutPars[0])); - - cfgFuncParas.fMultGlobalPVCutLow = new TF1("fMultGlobalPVCutLow", cfgFuncParas.cfgMultMultPVLowCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultGlobalPVCutLow->SetParameters(&(cfgFuncParas.multGlobalPVCutPars[0])); - cfgFuncParas.fMultGlobalPVCutHigh = new TF1("fMultGlobalPVCutHigh", cfgFuncParas.cfgMultMultPVHighCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultGlobalPVCutHigh->SetParameters(&(cfgFuncParas.multGlobalPVCutPars[0])); - - cfgFuncParas.fMultMultV0ACutLow = new TF1("fMultMultV0ACutLow", cfgFuncParas.cfgMultMultV0ALowCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultMultV0ACutLow->SetParameters(&(cfgFuncParas.multMultV0ACutPars[0])); - cfgFuncParas.fMultMultV0ACutHigh = new TF1("fMultMultV0ACutHigh", cfgFuncParas.cfgMultMultV0AHighCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultMultV0ACutHigh->SetParameters(&(cfgFuncParas.multMultV0ACutPars[0])); + cfgFuncParas.fMultPVT0CCutLow = + new TF1("fMultPVT0CCutLow", + cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultPVT0CCutLow->SetParameters( + &(cfgFuncParas.multPVT0CCutPars[0])); + cfgFuncParas.fMultPVT0CCutHigh = + new TF1("fMultPVT0CCutHigh", + cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultPVT0CCutHigh->SetParameters( + &(cfgFuncParas.multPVT0CCutPars[0])); + + cfgFuncParas.fMultT0CCutLow = + new TF1("fMultT0CCutLow", + cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultT0CCutLow->SetParameters( + &(cfgFuncParas.multT0CCutPars[0])); + cfgFuncParas.fMultT0CCutHigh = + new TF1("fMultT0CCutHigh", + cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultT0CCutHigh->SetParameters( + &(cfgFuncParas.multT0CCutPars[0])); + + cfgFuncParas.fMultGlobalPVCutLow = + new TF1("fMultGlobalPVCutLow", + cfgFuncParas.cfgMultMultPVLowCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultGlobalPVCutLow->SetParameters( + &(cfgFuncParas.multGlobalPVCutPars[0])); + cfgFuncParas.fMultGlobalPVCutHigh = + new TF1("fMultGlobalPVCutHigh", + cfgFuncParas.cfgMultMultPVHighCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultGlobalPVCutHigh->SetParameters( + &(cfgFuncParas.multGlobalPVCutPars[0])); + + cfgFuncParas.fMultMultV0ACutLow = + new TF1("fMultMultV0ACutLow", + cfgFuncParas.cfgMultMultV0ALowCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultMultV0ACutLow->SetParameters( + &(cfgFuncParas.multMultV0ACutPars[0])); + cfgFuncParas.fMultMultV0ACutHigh = + new TF1("fMultMultV0ACutHigh", + cfgFuncParas.cfgMultMultV0AHighCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultMultV0ACutHigh->SetParameters( + &(cfgFuncParas.multMultV0ACutPars[0])); cfgFuncParas.fT0AV0AMean = new TF1("fT0AV0AMean", "[0]+[1]*x", 0, 200000); cfgFuncParas.fT0AV0AMean->SetParameters(-1601.0581, 9.417652e-01); - cfgFuncParas.fT0AV0ASigma = new TF1("fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); - cfgFuncParas.fT0AV0ASigma->SetParameters(463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); + cfgFuncParas.fT0AV0ASigma = new TF1( + "fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); + cfgFuncParas.fT0AV0ASigma->SetParameters( + 463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); } - std::string hCentTitle = "Centrality distribution, Estimator " + std::to_string(cfgCentEstimator); + std::string hCentTitle = "Centrality distribution, Estimator " + + std::to_string(cfgCentEstimator); // Make histograms to check the distributions after cuts - if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) { + if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || + doprocessSameTpcMft || doprocessSameTpcFv0) { registry.add("Phi", "Phi", {HistType::kTH1D, {axisPhi}}); registry.add("Eta", "Eta", {HistType::kTH1D, {axisEta}}); - registry.add("EtaCorrected", "EtaCorrected", {HistType::kTH1D, {axisEta}}); + registry.add("EtaCorrected", "EtaCorrected", + {HistType::kTH1D, {axisEta}}); registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); - registry.add("Nch_used", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event - registry.add("Centrality", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); - registry.add("CentralityWeighted", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); - registry.add("Centrality_used", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); // histogram to see how many events are in the same and mixed event + registry.add("Nch_used", "N_{ch}", + {HistType::kTH1D, + {axisMultiplicity}}); // histogram to see how many events + // are in the same and mixed event + registry.add("Centrality", hCentTitle.c_str(), + {HistType::kTH1D, {{100, 0, 100}}}); + registry.add("CentralityWeighted", hCentTitle.c_str(), + {HistType::kTH1D, {{100, 0, 100}}}); + registry.add("Centrality_used", hCentTitle.c_str(), + {HistType::kTH1D, + {{100, 0, 100}}}); // histogram to see how many events are + // in the same and mixed event registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}}); - registry.add("pTCorrected", "pTCorrected", {HistType::kTH1D, {axisPtEfficiency}}); + registry.add("pTCorrected", "pTCorrected", + {HistType::kTH1D, {axisPtEfficiency}}); registry.add("pT", "pT", {HistType::kTH1D, {axisPtEfficiency}}); registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}}); registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}}); @@ -320,111 +547,181 @@ struct FlowDecorrelation { } } if (doprocessSameTpcFt0a) { - registry.add("deltaEta_deltaPhi_same_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); - registry.add("Assoc_amp_same_TPC_FT0A", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_TPC_FT0A", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Trig_hist_TPC_FT0A", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add( + "deltaEta_deltaPhi_same_TPC_FT0A", "", + {HistType::kTH2D, + {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta + // and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_FT0A", "", + {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); + registry.add("Assoc_amp_same_TPC_FT0A", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_TPC_FT0A", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add( + "Trig_hist_TPC_FT0A", "", + {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameTpcFt0c) { - registry.add("deltaEta_deltaPhi_same_TPC_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); // check to see the delta eta and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); - registry.add("Assoc_amp_same_TPC_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_TPC_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Trig_hist_TPC_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add( + "deltaEta_deltaPhi_same_TPC_FT0C", "", + {HistType::kTH2D, + {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); // check to see the delta eta + // and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_FT0C", "", + {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); + registry.add("Assoc_amp_same_TPC_FT0C", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_TPC_FT0C", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add( + "Trig_hist_TPC_FT0C", "", + {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameFt0aFt0c) { - registry.add("deltaEta_deltaPhi_same_FT0A_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); // check to see the delta eta and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_FT0A_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); - registry.add("Assoc_amp_same_FT0A_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_FT0A_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Trig_hist_FT0A_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add( + "deltaEta_deltaPhi_same_FT0A_FT0C", "", + {HistType::kTH2D, + {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); // check to see the delta eta + // and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_FT0A_FT0C", "", + {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); + registry.add("Assoc_amp_same_FT0A_FT0C", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_FT0A_FT0C", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add( + "Trig_hist_FT0A_FT0C", "", + {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameTpcMft) { - registry.add("deltaEta_deltaPhi_same_TPC_MFT", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcMft}}); // check to see the delta eta and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_MFT", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcMft}}); - registry.add("Trig_hist_TPC_MFT", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add( + "deltaEta_deltaPhi_same_TPC_MFT", "", + {HistType::kTH2D, + {axisDeltaPhi, axisDeltaEtaTpcMft}}); // check to see the delta eta + // and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_MFT", "", + {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcMft}}); + registry.add( + "Trig_hist_TPC_MFT", "", + {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameTpcFv0) { - registry.add("deltaEta_deltaPhi_same_TPC_FV0", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFv0}}); // check to see the delta eta and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_FV0", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFv0}}); - registry.add("Assoc_amp_same_TPC_FV0", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_TPC_FV0", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Trig_hist_TPC_FV0", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add( + "deltaEta_deltaPhi_same_TPC_FV0", "", + {HistType::kTH2D, + {axisDeltaPhi, axisDeltaEtaTpcFv0}}); // check to see the delta eta + // and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_FV0", "", + {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFv0}}); + registry.add("Assoc_amp_same_TPC_FV0", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_TPC_FV0", "", + {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add( + "Trig_hist_TPC_FV0", "", + {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); registry.add("FV0Amp", "", {HistType::kTH2F, {axisChID, axisFit}}); } - registry.add("eventcount", "bin", {HistType::kTH1F, {{4, 0, 4, "bin"}}}); // histogram to see how many events are in the same and mixed event + registry.add("eventcount", "bin", + {HistType::kTH1F, + {{4, 0, 4, "bin"}}}); // histogram to see how many events are + // in the same and mixed event LOGF(info, "Initializing correlation container"); std::vector effAxis = { - {axisEtaEfficiency, "#eta"}, - {axisPtEfficiency, "p_{T} (GeV/c)"}, - {axisVertexEfficiency, "z-vtx (cm)"}, + {axisEtaEfficiency, "#eta"}, + {axisPtEfficiency, "p_{T} (GeV/c)"}, + {axisVertexEfficiency, "z-vtx (cm)"}, }; std::vector userAxis; - std::vector corrAxisTpcFt0a = {{axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcFt0a, "#Delta#eta"}}; - - std::vector corrAxisTpcFt0c = {{axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcFt0c, "#Delta#eta"}}; - - std::vector corrAxisFt0aFt0c = {{axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaFt0aFt0c, "#Delta#eta"}}; - - std::vector corrAxisTpcMft = {{axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcMft, "#Delta#eta"}}; - - std::vector corrAxisTpcFv0 = {{axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcFv0, "#Delta#eta"}}; + std::vector corrAxisTpcFt0a = { + {axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcFt0a, "#Delta#eta"}}; + + std::vector corrAxisTpcFt0c = { + {axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcFt0c, "#Delta#eta"}}; + + std::vector corrAxisFt0aFt0c = { + {axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaFt0aFt0c, "#Delta#eta"}}; + + std::vector corrAxisTpcMft = { + {axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcMft, "#Delta#eta"}}; + + std::vector corrAxisTpcFv0 = { + {axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcFv0, "#Delta#eta"}}; if (doprocessSameTpcFt0a) { - same.setObject(new CorrelationContainer("sameEvent_TPC_FT0A", "sameEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FT0A", "mixedEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis)); + same.setObject( + new CorrelationContainer("sameEvent_TPC_FT0A", "sameEvent_TPC_FT0A", + corrAxisTpcFt0a, effAxis, userAxis)); + mixed.setObject( + new CorrelationContainer("mixedEvent_TPC_FT0A", "mixedEvent_TPC_FT0A", + corrAxisTpcFt0a, effAxis, userAxis)); } if (doprocessSameTpcFt0c) { - same.setObject(new CorrelationContainer("sameEvent_TPC_FT0C", "sameEvent_TPC_FT0C", corrAxisTpcFt0c, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FT0C", "mixedEvent_TPC_FT0C", corrAxisTpcFt0c, effAxis, userAxis)); + same.setObject( + new CorrelationContainer("sameEvent_TPC_FT0C", "sameEvent_TPC_FT0C", + corrAxisTpcFt0c, effAxis, userAxis)); + mixed.setObject( + new CorrelationContainer("mixedEvent_TPC_FT0C", "mixedEvent_TPC_FT0C", + corrAxisTpcFt0c, effAxis, userAxis)); } if (doprocessSameFt0aFt0c) { - same.setObject(new CorrelationContainer("sameEvent_FT0A_FT0C", "sameEvent_FT0A_FT0C", corrAxisFt0aFt0c, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer("mixedEvent_FT0A_FT0C", "mixedEvent_FT0A_FT0C", corrAxisFt0aFt0c, effAxis, userAxis)); + same.setObject( + new CorrelationContainer("sameEvent_FT0A_FT0C", "sameEvent_FT0A_FT0C", + corrAxisFt0aFt0c, effAxis, userAxis)); + mixed.setObject(new CorrelationContainer( + "mixedEvent_FT0A_FT0C", "mixedEvent_FT0A_FT0C", corrAxisFt0aFt0c, + effAxis, userAxis)); } if (doprocessSameTpcMft) { - same.setObject(new CorrelationContainer("sameEvent_TPC_MFT", "sameEvent_TPC_MFT", corrAxisTpcMft, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer("mixedEvent_TPC_MFT", "mixedEvent_TPC_MFT", corrAxisTpcMft, effAxis, userAxis)); + same.setObject( + new CorrelationContainer("sameEvent_TPC_MFT", "sameEvent_TPC_MFT", + corrAxisTpcMft, effAxis, userAxis)); + mixed.setObject( + new CorrelationContainer("mixedEvent_TPC_MFT", "mixedEvent_TPC_MFT", + corrAxisTpcMft, effAxis, userAxis)); } if (doprocessSameTpcFv0) { - same.setObject(new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FV0", corrAxisTpcFv0, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FV0", corrAxisTpcFv0, effAxis, userAxis)); + same.setObject( + new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FV0", + corrAxisTpcFv0, effAxis, userAxis)); + mixed.setObject( + new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FV0", + corrAxisTpcFv0, effAxis, userAxis)); } LOGF(info, "End of init"); } template - bool isAcceptedMftTrack(TTrackAssoc const& mftTrack) - { + bool isAcceptedMftTrack(TTrackAssoc const &mftTrack) { // cut on the number of clusters of the reconstructed MFT track if (mftTrack.nClusters() < nClustersMftTrack) return false; @@ -432,32 +729,39 @@ struct FlowDecorrelation { if (cfgCutChi2Mft > 0. && mftTrack.chi2() > cfgCutChi2Mft) return false; - if (cfgCutTrackTimeMft > 0. && std::abs(mftTrack.trackTime()) > cfgCutTrackTimeMft) + if (cfgCutTrackTimeMft > 0. && + std::abs(mftTrack.trackTime()) > cfgCutTrackTimeMft) return false; return true; } - double getPhiFV0(uint64_t chno) - { + double getPhiFV0(uint64_t chno) { o2::fv0::Point3Dsimple chPos{}; - int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; - bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft); + int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, + 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; + bool const isChnoInLeft = + std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != + std::end(cellsInLeft); if (isChnoInLeft) { chPos = fv0Det->getReadoutCenter(chno); - return RecoDecay::phi(chPos.x + (*offsetFV0)[0].getX(), chPos.y + (*offsetFV0)[0].getY()); + return RecoDecay::phi(chPos.x + (*offsetFV0)[0].getX(), + chPos.y + (*offsetFV0)[0].getY()); } else { chPos = fv0Det->getReadoutCenter(chno); - return RecoDecay::phi(chPos.x + (*offsetFV0)[1].getX(), chPos.y + (*offsetFV0)[1].getY()); + return RecoDecay::phi(chPos.x + (*offsetFV0)[1].getX(), + chPos.y + (*offsetFV0)[1].getY()); } } - double getEtaFV0(uint64_t chno) - { + double getEtaFV0(uint64_t chno) { - int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; - bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft); + int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, + 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; + bool const isChnoInLeft = + std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != + std::end(cellsInLeft); o2::fv0::Point3Dsimple chPos{}; chPos = fv0Det->getReadoutCenter(chno); @@ -484,19 +788,18 @@ struct FlowDecorrelation { return -std::log(std::tan(0.5 * theta)); } - double getPhiFT0(uint64_t chno, int i) - { + double getPhiFT0(uint64_t chno, int i) { // offsetFT0[0]: FT0A, offsetFT0[1]: FT0C if (i > 1 || i < 0) { LOGF(fatal, "kFIT Index %d out of range", i); } ft0Det.calculateChannelCenter(); auto chPos = ft0Det.getChannelCenter(chno); - return RecoDecay::phi(chPos.X() + (*offsetFT0)[i].getX(), chPos.Y() + (*offsetFT0)[i].getY()); + return RecoDecay::phi(chPos.X() + (*offsetFT0)[i].getX(), + chPos.Y() + (*offsetFT0)[i].getY()); } - double getEtaFT0(uint64_t chno, int i) - { + double getEtaFT0(uint64_t chno, int i) { // offsetFT0[0]: FT0A, offsetFT0[1]: FT0C if (i > 1 || i < 0) { LOGF(fatal, "kFIT Index %d out of range", i); @@ -515,38 +818,38 @@ struct FlowDecorrelation { } template - float getCentrality(TCollision const& collision) - { + float getCentrality(TCollision const &collision) { float cent; switch (cfgCentEstimator) { - case kCentFT0C: - cent = collision.centFT0C(); - break; - case kCentFT0CVariant1: - cent = collision.centFT0CVariant1(); - break; - case kCentFT0M: - cent = collision.centFT0M(); - break; - case kCentFV0A: - cent = collision.centFV0A(); - break; - default: - cent = collision.centFT0C(); + case kCentFT0C: + cent = collision.centFT0C(); + break; + case kCentFT0CVariant1: + cent = collision.centFT0CVariant1(); + break; + case kCentFT0M: + cent = collision.centFT0M(); + break; + case kCentFV0A: + cent = collision.centFV0A(); + break; + default: + cent = collision.centFT0C(); } return cent; } - template - bool trackSelected(TTrack track) - { - return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu)); + template bool trackSelected(TTrack track) { + return ((track.tpcNClsFound() >= cfgCutTPCclu) && + (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && + (track.itsNCls() >= cfgCutITSclu)); } - void loadAlignParam(uint64_t timestamp) - { - offsetFT0 = ccdb->getForTimeStamp>("FT0/Calib/Align", timestamp); - offsetFV0 = ccdb->getForTimeStamp>("FV0/Calib/Align", timestamp); + void loadAlignParam(uint64_t timestamp) { + offsetFT0 = ccdb->getForTimeStamp>( + "FT0/Calib/Align", timestamp); + offsetFV0 = ccdb->getForTimeStamp>( + "FV0/Calib/Align", timestamp); if (offsetFT0 == nullptr) { LOGF(fatal, "Could not load FT0/Calib/Align for timestamp %d", timestamp); } @@ -555,8 +858,7 @@ struct FlowDecorrelation { } } - void loadGain(aod::BCsWithTimestamps::iterator const& bc) - { + void loadGain(aod::BCsWithTimestamps::iterator const &bc) { cstFT0RelGain.clear(); cstFT0RelGain = {}; std::string fullPath; @@ -570,7 +872,8 @@ struct FlowDecorrelation { } else { fullPath = cfgGainEqPath; fullPath += "/FT0"; - const auto objft0Gain = ccdb->getForTimeStamp>(fullPath, timestamp); + const auto objft0Gain = + ccdb->getForTimeStamp>(fullPath, timestamp); if (!objft0Gain) { for (auto i{0u}; i < ChannelsFT0; i++) { cstFT0RelGain.push_back(1.); @@ -581,35 +884,45 @@ struct FlowDecorrelation { } } - void loadCorrection(uint64_t timestamp) - { + void loadCorrection(uint64_t timestamp) { if (correctionsLoaded) { return; } if (cfgEfficiency.value.empty() == false) { if (cfgLocalEfficiency > 0) { - TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ"); - mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + TFile *fEfficiencyTrigger = + TFile::Open(cfgEfficiency.value.c_str(), "READ"); + mEfficiency = + reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); } if (mEfficiency == nullptr) { - LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str()); + LOGF( + fatal, + "Could not load efficiency histogram for trigger particles from %s", + cfgEfficiency.value.c_str()); } - LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency); + LOGF(info, "Loaded efficiency histogram from %s (%p)", + cfgEfficiency.value.c_str(), (void *)mEfficiency); } if (cfgCentralityWeight.value.empty() == false) { - mCentralityWeight = ccdb->getForTimeStamp(cfgCentralityWeight, timestamp); + mCentralityWeight = + ccdb->getForTimeStamp(cfgCentralityWeight, timestamp); if (mCentralityWeight == nullptr) { - LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgCentralityWeight.value.c_str()); + LOGF( + fatal, + "Could not load efficiency histogram for trigger particles from %s", + cfgCentralityWeight.value.c_str()); } - LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), (void*)mCentralityWeight); + LOGF(info, "Loaded efficiency histogram from %s (%p)", + cfgCentralityWeight.value.c_str(), (void *)mCentralityWeight); } correctionsLoaded = true; } - bool getEfficiencyCorrection(float& weight_nue, float eta, float pt, float posZ) - { + bool getEfficiencyCorrection(float &weight_nue, float eta, float pt, + float posZ) { float eff = 1.; if (mEfficiency) { int etaBin = mEfficiency->GetXaxis()->FindBin(eta); @@ -625,11 +938,11 @@ struct FlowDecorrelation { return true; } - bool getCentralityWeight(float& weightCent, const float centrality) - { + bool getCentralityWeight(float &weightCent, const float centrality) { float weight = 1.; if (mCentralityWeight) - weight = mCentralityWeight->GetBinContent(mCentralityWeight->FindBin(centrality)); + weight = mCentralityWeight->GetBinContent( + mCentralityWeight->FindBin(centrality)); else weight = 1.0; if (weight == 0) @@ -640,11 +953,13 @@ struct FlowDecorrelation { // fill multiple histograms template - void fillYield(TCollision collision, TTracks tracks) // function to fill the yield and etaphi histograms. + void + fillYield(TCollision collision, + TTracks tracks) // function to fill the yield and etaphi histograms. { float weff1 = 1; float vtxz = collision.posZ(); - for (auto const& track1 : tracks) { + for (auto const &track1 : tracks) { if (!trackSelected(track1)) continue; if (!getEfficiencyCorrection(weff1, track1.eta(), track1.pt(), vtxz)) @@ -658,8 +973,8 @@ struct FlowDecorrelation { } template - void getChannel(TFT0s const& ft0, std::size_t const& iCh, int& id, float& ampl, int fitType) - { + void getChannel(TFT0s const &ft0, std::size_t const &iCh, int &id, + float &l, int fitType) { if (fitType == kFT0C) { id = ft0.channelC()[iCh]; id = id + Ft0IndexA; @@ -679,15 +994,19 @@ struct FlowDecorrelation { } template - void getChannelFV0(TFT0s const& fv0, std::size_t const& iCh, int& id, float& ampl) - { + void getChannelFV0(TFT0s const &fv0, std::size_t const &iCh, int &id, + float &l) { id = fv0.channel()[iCh]; ampl = fv0.amplitude()[iCh]; registry.fill(HIST("FV0Amp"), id, ampl); } template - void fillCorrelationsTPCFIT(TTracks tracks1, TFT0s const& ft0, float posZ, int system, int corType, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms + void fillCorrelationsTPCFIT( + TTracks tracks1, TFT0s const &ft0, float posZ, int system, int corType, + float cent, + float eventWeight) // function to fill the Output functions (sparse) and + // the delta eta and delta phi histograms { if (system == SameEvent) { if (!cfgCentTableUnavailable) @@ -699,19 +1018,23 @@ struct FlowDecorrelation { float triggerWeight = 1.0f; // loop over all tracks - for (auto const& track1 : tracks1) { + for (auto const &track1 : tracks1) { if (!trackSelected(track1)) continue; - if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ)) + if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), + posZ)) continue; if (system == SameEvent) { if (corType == kFT0C) - registry.fill(HIST("Trig_hist_TPC_FT0C"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_FT0C"), fSampleIndex, posZ, + track1.eta(), eventWeight * triggerWeight); else if (corType == kFT0A) - registry.fill(HIST("Trig_hist_TPC_FT0A"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_FT0A"), fSampleIndex, posZ, + track1.eta(), eventWeight * triggerWeight); if (cfgDrawEtaPhiDis && corType == kFT0A) - registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), eventWeight * triggerWeight); + registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), + eventWeight * triggerWeight); } std::size_t channelSize = 0; @@ -727,11 +1050,17 @@ struct FlowDecorrelation { float ampl = 0.; getChannel(ft0, iCh, chanelid, ampl, corType); if (corType == kFT0C) { - if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax))) { + if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && + chanelid <= kFT0CInnerRingMax)) || + (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && + chanelid <= kFT0COuterRingMax))) { continue; } } else if (corType == kFT0A) { - if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && chanelid <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && chanelid <= kFT0AOuterRingMax))) { + if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && + chanelid <= kFT0AInnerRingMax)) || + (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && + chanelid <= kFT0AOuterRingMax))) { continue; } } @@ -747,22 +1076,34 @@ struct FlowDecorrelation { if (system == SameEvent) { if (corType == kFT0A) { registry.fill(HIST("Assoc_amp_same_TPC_FT0A"), chanelid, ampl); - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0A"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + eta, deltaPhi, deltaEta, + ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0A"), deltaPhi, + deltaEta, ampl * eventWeight * triggerWeight); } else if (corType == kFT0C) { registry.fill(HIST("Assoc_amp_same_TPC_FT0C"), chanelid, ampl); - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0C"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + eta, deltaPhi, deltaEta, + ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0C"), deltaPhi, + deltaEta, ampl * eventWeight * triggerWeight); } } else if (system == MixedEvent) { if (corType == kFT0A) { registry.fill(HIST("Assoc_amp_mixed_TPC_FT0A"), chanelid, ampl); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0A"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + eta, deltaPhi, deltaEta, + ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0A"), deltaPhi, + deltaEta, ampl * eventWeight * triggerWeight); } else if (corType == kFT0C) { registry.fill(HIST("Assoc_amp_mixed_TPC_FT0C"), chanelid, ampl); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0C"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + eta, deltaPhi, deltaEta, + ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0C"), deltaPhi, + deltaEta, ampl * eventWeight * triggerWeight); } } } @@ -770,8 +1111,9 @@ struct FlowDecorrelation { } template - void fillCorrelationsFT0AFT0C(TFT0s const& ft0Trig, TFT0s const& ft0Assoc, float posZ, int multTrk, int system, float cent, float eventWeight) - { + void fillCorrelationsFT0AFT0C(TFT0s const &ft0Trig, TFT0s const &ft0Assoc, + float posZ, int multTrk, int system, float cent, + float eventWeight) { if (system == SameEvent) { if (!cfgCentTableUnavailable) registry.fill(HIST("Centrality_used"), cent); @@ -784,7 +1126,10 @@ struct FlowDecorrelation { int channelIdA = 0; float amplA = 0.f; getChannel(ft0Trig, iChA, channelIdA, amplA, kFT0A); - if ((cfgRejectFT0AInside && (channelIdA >= kFT0AInnerRingMin && channelIdA <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (channelIdA >= kFT0AOuterRingMin && channelIdA <= kFT0AOuterRingMax))) { + if ((cfgRejectFT0AInside && (channelIdA >= kFT0AInnerRingMin && + channelIdA <= kFT0AInnerRingMax)) || + (cfgRejectFT0AOutside && (channelIdA >= kFT0AOuterRingMin && + channelIdA <= kFT0AOuterRingMax))) { continue; } @@ -792,14 +1137,18 @@ struct FlowDecorrelation { const double etaA = getEtaFT0(channelIdA, kFT0A); if (system == SameEvent) { - registry.fill(HIST("Trig_hist_FT0A_FT0C"), fSampleIndex, posZ, etaA, eventWeight * amplA); + registry.fill(HIST("Trig_hist_FT0A_FT0C"), fSampleIndex, posZ, etaA, + eventWeight * amplA); } for (std::size_t iChC = 0; iChC < ft0Assoc.channelC().size(); iChC++) { int channelIdC = 0; float amplC = 0.f; getChannel(ft0Assoc, iChC, channelIdC, amplC, kFT0C); - if ((cfgRejectFT0CInside && (channelIdC >= kFT0CInnerRingMin && channelIdC <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (channelIdC >= kFT0COuterRingMin && channelIdC <= kFT0COuterRingMax))) { + if ((cfgRejectFT0CInside && (channelIdC >= kFT0CInnerRingMin && + channelIdC <= kFT0CInnerRingMax)) || + (cfgRejectFT0COutside && (channelIdC >= kFT0COuterRingMin && + channelIdC <= kFT0COuterRingMax))) { continue; } @@ -812,19 +1161,26 @@ struct FlowDecorrelation { if (system == SameEvent) { registry.fill(HIST("Assoc_amp_same_FT0A_FT0C"), channelIdC, amplC); - same->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, deltaPhi, deltaEta, pairWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_FT0A_FT0C"), deltaPhi, deltaEta, pairWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, + deltaPhi, deltaEta, pairWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_FT0A_FT0C"), deltaPhi, + deltaEta, pairWeight); } else if (system == MixedEvent) { registry.fill(HIST("Assoc_amp_mixed_FT0A_FT0C"), channelIdC, amplC); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, deltaPhi, deltaEta, pairWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_FT0A_FT0C"), deltaPhi, deltaEta, pairWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, + deltaPhi, deltaEta, pairWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_FT0A_FT0C"), deltaPhi, + deltaEta, pairWeight); } } } } template - void fillCorrelationsTPCFV0(TTracks tracks1, TFT0s const& fv0, float posZ, int system, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms + void fillCorrelationsTPCFV0( + TTracks tracks1, TFT0s const &fv0, float posZ, int system, float cent, + float eventWeight) // function to fill the Output functions (sparse) and + // the delta eta and delta phi histograms { if (system == SameEvent) { if (!cfgCentTableUnavailable) @@ -836,14 +1192,16 @@ struct FlowDecorrelation { float triggerWeight = 1.0f; // loop over all tracks - for (auto const& track1 : tracks1) { + for (auto const &track1 : tracks1) { if (!trackSelected(track1)) continue; - if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ)) + if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), + posZ)) continue; if (system == SameEvent) { - registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, + track1.eta(), eventWeight * triggerWeight); } std::size_t channelSize = 0; @@ -865,75 +1223,100 @@ struct FlowDecorrelation { // fill the right sparse and histograms if (system == SameEvent) { registry.fill(HIST("Assoc_amp_same_TPC_FV0"), chanelid, ampl); - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FV0"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, + deltaPhi, deltaEta, + ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FV0"), deltaPhi, + deltaEta, ampl * eventWeight * triggerWeight); } else if (system == MixedEvent) { registry.fill(HIST("Assoc_amp_mixed_TPC_FV0"), chanelid, ampl); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FV0"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + eta, deltaPhi, deltaEta, + ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FV0"), deltaPhi, + deltaEta, ampl * eventWeight * triggerWeight); } } } } template - bool eventSelected(TCollision collision, const int multTrk, const float centrality, const bool fillCounter) - { + bool eventSelected(TCollision collision, const int multTrk, + const float centrality, const bool fillCounter) { registry.fill(HIST("hEventCountSpecific"), 0.5); - if (cfgEvSelkNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { - // rejects collisions which are associated with the same "found-by-T0" bunch crossing + if (cfgEvSelkNoSameBunchPileup && + !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + // rejects collisions which are associated with the same "found-by-T0" + // bunch crossing // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof return 0; } if (fillCounter && cfgEvSelkNoSameBunchPileup) registry.fill(HIST("hEventCountSpecific"), 1.5); - if (cfgEvSelkNoITSROFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (cfgEvSelkNoITSROFrameBorder && + !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { return 0; } if (fillCounter && cfgEvSelkNoITSROFrameBorder) registry.fill(HIST("hEventCountSpecific"), 2.5); - if (cfgEvSelkNoTimeFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (cfgEvSelkNoTimeFrameBorder && + !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { return 0; } if (fillCounter && cfgEvSelkNoTimeFrameBorder) registry.fill(HIST("hEventCountSpecific"), 3.5); - if (cfgEvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { - // removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference - // use this cut at low multiplicities with caution + if (cfgEvSelkIsGoodZvtxFT0vsPV && + !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + // removes collisions with large differences between z of PV by tracks and + // z of PV from FT0 A-C time difference use this cut at low multiplicities + // with caution return 0; } if (fillCounter && cfgEvSelkIsGoodZvtxFT0vsPV) registry.fill(HIST("hEventCountSpecific"), 4.5); - if (cfgEvSelkNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (cfgEvSelkNoCollInTimeRangeStandard && + !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { // no collisions in specified time range return 0; } if (fillCounter && cfgEvSelkNoCollInTimeRangeStandard) registry.fill(HIST("hEventCountSpecific"), 5.5); - if (cfgEvSelkIsGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (cfgEvSelkIsGoodITSLayersAll && + !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { // from Jan 9 2025 AOT meeting // cut time intervals with dead ITS staves return 0; } if (fillCounter && cfgEvSelkIsGoodITSLayersAll) registry.fill(HIST("hEventCountSpecific"), 6.5); - if (cfgEvSelkNoCollInRofStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { - // no other collisions in this Readout Frame with per-collision multiplicity above threshold + if (cfgEvSelkIsGoodITSLayer0123 && + !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + // for pp: cut time intervals with dead ITS staves on layers 0-3 only return 0; } - if (fillCounter && cfgEvSelkNoCollInRofStandard) + if (fillCounter && cfgEvSelkIsGoodITSLayer0123) registry.fill(HIST("hEventCountSpecific"), 7.5); - if (cfgEvSelkNoHighMultCollInPrevRof && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (cfgEvSelkNoCollInRofStandard && + !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + // no other collisions in this Readout Frame with per-collision + // multiplicity above threshold + return 0; + } + if (fillCounter && cfgEvSelkNoCollInRofStandard) + registry.fill(HIST("hEventCountSpecific"), 8.5); + if (cfgEvSelkNoHighMultCollInPrevRof && + !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { // veto an event if FT0C amplitude in previous ITS ROF is above threshold return 0; } if (fillCounter && cfgEvSelkNoHighMultCollInPrevRof) - registry.fill(HIST("hEventCountSpecific"), 8.5); + registry.fill(HIST("hEventCountSpecific"), 9.5); auto occupancy = collision.trackOccupancyInTimeRange(); - if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) + if (cfgEvSelOccupancy && + (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) return 0; if (fillCounter && cfgEvSelOccupancy) - registry.fill(HIST("hEventCountSpecific"), 9.5); + registry.fill(HIST("hEventCountSpecific"), 10.5); auto multNTracksPV = collision.multNTracksPV(); if (cfgEvSelMultCorrelation) { @@ -956,27 +1339,33 @@ struct FlowDecorrelation { return 0; } if (cfgFuncParas.cfgMultMultV0ACutEnabled) { - if (collision.multFV0A() < cfgFuncParas.fMultMultV0ACutLow->Eval(multTrk)) + if (collision.multFV0A() < + cfgFuncParas.fMultMultV0ACutLow->Eval(multTrk)) return 0; - if (collision.multFV0A() > cfgFuncParas.fMultMultV0ACutHigh->Eval(multTrk)) + if (collision.multFV0A() > + cfgFuncParas.fMultMultV0ACutHigh->Eval(multTrk)) return 0; } } if (fillCounter && cfgEvSelMultCorrelation) - registry.fill(HIST("hEventCountSpecific"), 10.5); + registry.fill(HIST("hEventCountSpecific"), 11.5); // V0A T0A 5 sigma cut float sigma = 5.0; - if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - cfgFuncParas.fT0AV0AMean->Eval(collision.multFT0A())) > sigma * cfgFuncParas.fT0AV0ASigma->Eval(collision.multFT0A()))) + if (cfgEvSelV0AT0ACut && + (std::fabs(collision.multFV0A() - + cfgFuncParas.fT0AV0AMean->Eval(collision.multFT0A())) > + sigma * cfgFuncParas.fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; if (fillCounter && cfgEvSelV0AT0ACut) - registry.fill(HIST("hEventCountSpecific"), 11.5); + registry.fill(HIST("hEventCountSpecific"), 12.5); return 1; } - void processSameTpcFt0a(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) - { + void processSameTpcFt0a(FilteredCollisions::iterator const &collision, + FilteredTracks const &tracks, aod::FT0s const &, + aod::BCsWithTimestamps const &) { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -985,7 +1374,8 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFT0()) return; @@ -1000,47 +1390,66 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && + (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), + SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto& ft0 = collision.foundFT0(); - fillCorrelationsTPCFIT(tracks, ft0, collision.posZ(), SameEvent, kFT0A, cent, weightCent); + const auto &ft0 = collision.foundFT0(); + fillCorrelationsTPCFIT( + tracks, ft0, collision.posZ(), SameEvent, kFT0A, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0a, "Process same event for TPC-FT0 correlation", true); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0a, + "Process same event for TPC-FT0 correlation", true); // the process for filling the mixed events - void processMixedTpcFt0a(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) - { - - auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { - auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); + void processMixedTpcFt0a(FilteredCollisions const &collisions, + FilteredTracks const &tracks, aod::FT0s const &, + aod::BCsWithTimestamps const &) { + + auto getTracksSize = [&tracks, + this](FilteredCollisions::iterator const &collision) { + auto associatedTracks = tracks.sliceByCached( + o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = + FlexibleBinningPolicy, + aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{ + {getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip + Pair + pairs{binningOnVtxAndMult, + cfgMixEventNumMin, + -1, + collisions, + tracksTuple, + &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto& [collision1, tracks1, collision2, tracks2] = *it; + auto &[collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1049,21 +1458,26 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFT0() && collision2.has_foundFT0())) continue; - registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), + MixedEvent); // fill the mixed event in the 3 bin auto bc = collision1.bc_as(); loadAlignParam(bc.timestamp()); loadCorrection(bc.timestamp()); @@ -1074,14 +1488,18 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto& ft0 = collision2.foundFT0(); - fillCorrelationsTPCFIT(tracks1, ft0, collision1.posZ(), MixedEvent, kFT0A, cent1, eventWeight * weightCent); + const auto &ft0 = collision2.foundFT0(); + fillCorrelationsTPCFIT( + tracks1, ft0, collision1.posZ(), MixedEvent, kFT0A, cent1, + eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0a, "Process mixed events for TPC-FT0A correlation", true); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0a, + "Process mixed events for TPC-FT0A correlation", true); - void processSameTpcFt0c(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) - { + void processSameTpcFt0c(FilteredCollisions::iterator const &collision, + FilteredTracks const &tracks, aod::FT0s const &, + aod::BCsWithTimestamps const &) { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1090,7 +1508,8 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFT0()) return; @@ -1105,47 +1524,66 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && + (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), + SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto& ft0 = collision.foundFT0(); - fillCorrelationsTPCFIT(tracks, ft0, collision.posZ(), SameEvent, kFT0C, cent, weightCent); + const auto &ft0 = collision.foundFT0(); + fillCorrelationsTPCFIT( + tracks, ft0, collision.posZ(), SameEvent, kFT0C, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0c, "Process same event for TPC-FT0C correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0c, + "Process same event for TPC-FT0C correlation", false); // the process for filling the mixed events - void processMixedTpcFt0c(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) - { - - auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { - auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); + void processMixedTpcFt0c(FilteredCollisions const &collisions, + FilteredTracks const &tracks, aod::FT0s const &, + aod::BCsWithTimestamps const &) { + + auto getTracksSize = [&tracks, + this](FilteredCollisions::iterator const &collision) { + auto associatedTracks = tracks.sliceByCached( + o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = + FlexibleBinningPolicy, + aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{ + {getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip + Pair + pairs{binningOnVtxAndMult, + cfgMixEventNumMin, + -1, + collisions, + tracksTuple, + &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto& [collision1, tracks1, collision2, tracks2] = *it; + auto &[collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1154,21 +1592,26 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFT0() && collision2.has_foundFT0())) continue; - registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), + MixedEvent); // fill the mixed event in the 3 bin auto bc = collision1.bc_as(); loadAlignParam(bc.timestamp()); loadCorrection(bc.timestamp()); @@ -1179,14 +1622,18 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto& ft0 = collision2.foundFT0(); - fillCorrelationsTPCFIT(tracks1, ft0, collision1.posZ(), MixedEvent, kFT0C, cent1, eventWeight * weightCent); + const auto &ft0 = collision2.foundFT0(); + fillCorrelationsTPCFIT( + tracks1, ft0, collision1.posZ(), MixedEvent, kFT0C, cent1, + eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0c, "Process mixed events for TPC-FT0C correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0c, + "Process mixed events for TPC-FT0C correlation", false); - void processSameFt0aFt0c(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) - { + void processSameFt0aFt0c(FilteredCollisions::iterator const &collision, + FilteredTracks const &tracks, aod::FT0s const &, + aod::BCsWithTimestamps const &) { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1195,7 +1642,8 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFT0()) return; @@ -1210,44 +1658,58 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && + (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } registry.fill(HIST("eventcount"), SameEvent); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto& ft0 = collision.foundFT0(); - fillCorrelationsFT0AFT0C(ft0, ft0, collision.posZ(), tracks.size(), SameEvent, cent, weightCent); + const auto &ft0 = collision.foundFT0(); + fillCorrelationsFT0AFT0C( + ft0, ft0, collision.posZ(), tracks.size(), SameEvent, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameFt0aFt0c, "Process same event for FT0A-FT0C correlation", false); - - void processMixedFt0aFt0c(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) - { - auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { - auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); + PROCESS_SWITCH(FlowDecorrelation, processSameFt0aFt0c, + "Process same event for FT0A-FT0C correlation", false); + + void processMixedFt0aFt0c(FilteredCollisions const &collisions, + FilteredTracks const &tracks, aod::FT0s const &, + aod::BCsWithTimestamps const &) { + auto getTracksSize = [&tracks, + this](FilteredCollisions::iterator const &collision) { + auto associatedTracks = tracks.sliceByCached( + o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = + FlexibleBinningPolicy, + aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{ + {getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; + Pair + pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, + collisions, tracksTuple, &cache}; for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto& [collision1, tracks1, collision2, tracks2] = *it; + auto &[collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1256,15 +1718,19 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFT0() && collision2.has_foundFT0())) @@ -1282,15 +1748,22 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto& ft0Trig = collision1.foundFT0(); - const auto& ft0Assoc = collision2.foundFT0(); - fillCorrelationsFT0AFT0C(ft0Trig, ft0Assoc, collision1.posZ(), tracks1.size(), MixedEvent, cent1, eventWeight * weightCent); + const auto &ft0Trig = collision1.foundFT0(); + const auto &ft0Assoc = collision2.foundFT0(); + fillCorrelationsFT0AFT0C( + ft0Trig, ft0Assoc, collision1.posZ(), tracks1.size(), MixedEvent, + cent1, eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedFt0aFt0c, "Process mixed events for FT0A-FT0C correlation", false); - - template - void fillCorrelationsTPCMFT(TTracks tracks1, TTracksAssoc tracks2, float posZ, int system, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms + PROCESS_SWITCH(FlowDecorrelation, processMixedFt0aFt0c, + "Process mixed events for FT0A-FT0C correlation", false); + + template + void fillCorrelationsTPCMFT( + TTracks tracks1, TTracksAssoc tracks2, float posZ, int system, float cent, + float eventWeight) // function to fill the Output functions (sparse) and + // the delta eta and delta phi histograms { if (system == SameEvent) { if (!cfgCentTableUnavailable) @@ -1302,38 +1775,49 @@ struct FlowDecorrelation { float triggerWeight = 1.0f; // loop over all tracks - for (auto const& track1 : tracks1) { + for (auto const &track1 : tracks1) { if (!trackSelected(track1)) continue; - if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ)) + if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), + posZ)) continue; if (system == SameEvent) { - registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, + track1.pt(), eventWeight * triggerWeight); } - for (auto const& track2 : tracks2) { + for (auto const &track2 : tracks2) { if (!isAcceptedMftTrack(track2)) continue; - float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); + float deltaPhi = + RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); float deltaEta = track1.eta() - track2.eta(); if (system == SameEvent) { - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), track2.eta(), deltaPhi, deltaEta, eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_MFT"), deltaPhi, deltaEta, eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + track2.eta(), deltaPhi, deltaEta, + eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_MFT"), deltaPhi, + deltaEta, eventWeight * triggerWeight); } else if (system == MixedEvent) { - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), track2.eta(), deltaPhi, deltaEta, eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_MFT"), deltaPhi, deltaEta, eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), + track2.eta(), deltaPhi, deltaEta, + eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_MFT"), deltaPhi, + deltaEta, eventWeight * triggerWeight); } } } } - void processSameTpcMft(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::MFTTracks const& mfts, aod::BCsWithTimestamps const&) - { + void processSameTpcMft(FilteredCollisions::iterator const &collision, + FilteredTracks const &tracks, + aod::MFTTracks const &mfts, + aod::BCsWithTimestamps const &) { float cent = -1.; float weightCent = 1.0f; if (!cfgCentTableUnavailable) { @@ -1342,7 +1826,8 @@ struct FlowDecorrelation { if (!collision.sel8()) return; - if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision, tracks.size(), cent, true)) return; auto bc = collision.bc_as(); @@ -1360,45 +1845,65 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && + (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), + SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); - fillCorrelationsTPCMFT(tracks, mfts, collision.posZ(), SameEvent, cent, weightCent); + fillCorrelationsTPCMFT( + tracks, mfts, collision.posZ(), SameEvent, cent, weightCent); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcMft, "Process same events for TPC-MFT correlation", false); - - void processMixedTpcMft(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::MFTTracks const& MFTtracks, aod::BCsWithTimestamps const&) - { - auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { - auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcMft, + "Process same events for TPC-MFT correlation", false); + + void processMixedTpcMft(FilteredCollisions const &collisions, + FilteredTracks const &tracks, + aod::MFTTracks const &MFTtracks, + aod::BCsWithTimestamps const &) { + auto getTracksSize = [&tracks, + this](FilteredCollisions::iterator const &collision) { + auto associatedTracks = tracks.sliceByCached( + o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = + FlexibleBinningPolicy, + aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{ + {getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip + Pair + pairs{binningOnVtxAndMult, + cfgMixEventNumMin, + -1, + collisions, + tracksTuple, + &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto& [collision1, tracks1, collision2, tracks2] = *it; + auto &[collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1412,14 +1917,18 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; registry.fill(HIST("eventcount"), MixedEvent); @@ -1438,15 +1947,20 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - auto mftTracks2 = MFTtracks.sliceByCached(o2::aod::fwdtrack::collisionId, collision2.globalIndex(), cache); + auto mftTracks2 = MFTtracks.sliceByCached( + o2::aod::fwdtrack::collisionId, collision2.globalIndex(), cache); - fillCorrelationsTPCMFT(tracks1, mftTracks2, collision1.posZ(), MixedEvent, 10., eventWeight * weightCent); + fillCorrelationsTPCMFT( + tracks1, mftTracks2, collision1.posZ(), MixedEvent, 10., + eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcMft, "Process same events for TPC-MFT correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcMft, + "Process same events for TPC-MFT correlation", false); - void processSameTpcFv0(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FV0As const&, aod::BCsWithTimestamps const&) - { + void processSameTpcFv0(FilteredCollisions::iterator const &collision, + FilteredTracks const &tracks, aod::FV0As const &, + aod::BCsWithTimestamps const &) { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1455,7 +1969,8 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFV0()) return; @@ -1471,47 +1986,66 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && + (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), + SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto& fv0 = collision.foundFV0(); - fillCorrelationsTPCFV0(tracks, fv0, collision.posZ(), SameEvent, cent, weightCent); + const auto &fv0 = collision.foundFV0(); + fillCorrelationsTPCFV0( + tracks, fv0, collision.posZ(), SameEvent, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcFv0, "Process same events for TPC-FV0 correlation", false); - - void processMixedTpcFv0(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FV0As const&, aod::BCsWithTimestamps const&) - { - auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { - auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcFv0, + "Process same events for TPC-FV0 correlation", false); + + void processMixedTpcFv0(FilteredCollisions const &collisions, + FilteredTracks const &tracks, aod::FV0As const &, + aod::BCsWithTimestamps const &) { + auto getTracksSize = [&tracks, + this](FilteredCollisions::iterator const &collision) { + auto associatedTracks = tracks.sliceByCached( + o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = + FlexibleBinningPolicy, + aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{ + {getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip + Pair + pairs{binningOnVtxAndMult, + cfgMixEventNumMin, + -1, + collisions, + tracksTuple, + &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto& [collision1, tracks1, collision2, tracks2] = *it; + auto &[collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && + (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1520,21 +2054,26 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && + !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && + (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFV0() && collision2.has_foundFV0())) continue; - registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), + MixedEvent); // fill the mixed event in the 3 bin auto bc = collision1.bc_as(); loadAlignParam(bc.timestamp()); loadCorrection(bc.timestamp()); @@ -1545,16 +2084,18 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto& fv0 = collision2.foundFV0(); - fillCorrelationsTPCFV0(tracks1, fv0, collision1.posZ(), MixedEvent, cent1, eventWeight * weightCent); + const auto &fv0 = collision2.foundFV0(); + fillCorrelationsTPCFV0( + tracks1, fv0, collision1.posZ(), MixedEvent, cent1, + eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFv0, "Process mixed events for TPC-FV0 correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFv0, + "Process mixed events for TPC-FV0 correlation", false); }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; } From 76d79bc831059b3089b9b99abcaada599a87ee20 Mon Sep 17 00:00:00 2001 From: lcernusa Date: Tue, 24 Mar 2026 19:21:35 +0100 Subject: [PATCH 2/2] Altered formating --- .../Tasks/flowDecorrelation.cxx | 1527 ++++++----------- 1 file changed, 497 insertions(+), 1030 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx index 250bfa8704c..89bb63cc0cd 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/flowDecorrelation.cxx @@ -1,6 +1,6 @@ // Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright -// holders. All rights not expressly granted are reserved. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". @@ -10,10 +10,8 @@ // or submit itself to any jurisdiction. /// \file flowDecorrelation.cxx -/// \brief long range correlations for O-O and Ne-Ne collisions as a function of -/// eta -/// \author Zhiyong Lu (zhiyong.lu@cern.ch), Joachim Hansen -/// (joachim.hansen@cern.ch), Lukas Cernusak (lukas.cernusak@cern.ch) +/// \brief long range correlations for O-O and Ne-Ne collisions as a function of eta +/// \author Zhiyong Lu (zhiyong.lu@cern.ch), Joachim Hansen (joachim.hansen@cern.ch), Lukas Cernusak (lukas.cernusak@cern.ch) /// \since Sep/10/2025 #include "PWGCF/Core/CorrelationContainer.h" @@ -61,294 +59,129 @@ using namespace o2::framework; using namespace o2::framework::expressions; // define the filtered collisions and tracks -#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) \ - Configurable NAME{#NAME, DEFAULT, HELP}; +#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable NAME{#NAME, DEFAULT, HELP}; struct FlowDecorrelation { Service ccdb; O2_DEFINE_CONFIGURABLE(cfgCutVtxZ, float, 10.0f, "Accepted z-vertex range") O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.2f, "minimum accepted track pT") O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "maximum accepted track pT") - O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, - "max chi2 per TPC clusters") + O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, "max chi2 per TPC clusters") O2_DEFINE_CONFIGURABLE(cfgCutTPCclu, float, 50.0f, "minimum TPC clusters") - O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, - "minimum TPC crossed rows") + O2_DEFINE_CONFIGURABLE(cfgCutTPCCrossedRows, float, 70.0f, "minimum TPC crossed rows") O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters") O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "max DCA to vertex z") - O2_DEFINE_CONFIGURABLE(cfgSelCollByNch, bool, true, - "Select collisions by Nch or centrality") - O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, - "Minimum multiplicity for collision") - O2_DEFINE_CONFIGURABLE(cfgCutMultMax, int, 10, - "Maximum multiplicity for collision") - O2_DEFINE_CONFIGURABLE(cfgCutCentMin, float, 60.0f, - "Minimum centrality for collision") - O2_DEFINE_CONFIGURABLE(cfgCutCentMax, float, 80.0f, - "Maximum centrality for collision") - O2_DEFINE_CONFIGURABLE(cfgMixEventNumMin, int, 5, - "Minimum number of events to mix") - O2_DEFINE_CONFIGURABLE(cfgSampleSize, double, 10, - "Sample size for mixed event") - O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, - "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FT0A") - O2_DEFINE_CONFIGURABLE(cfgCentTableUnavailable, bool, false, - "if a dataset does not provide centrality information") - O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, - "Use additional event cut on mult correlations") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, - "rejects collisions which are associated with the " - "same found-by-T0 bunch crossing") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoITSROFrameBorder, bool, false, - "reject events at ITS ROF border") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoTimeFrameBorder, bool, false, - "reject events at TF border") - O2_DEFINE_CONFIGURABLE( - cfgEvSelkIsGoodZvtxFT0vsPV, bool, false, - "removes collisions with large differences between z of PV by tracks and " - "z of PV from FT0 A-C time difference, use this cut at low " - "multiplicities with caution") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, - "no collisions in specified time range") - O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, true, - "cut time intervals with dead ITS staves") - O2_DEFINE_CONFIGURABLE( - cfgEvSelkIsGoodITSLayer0123, bool, false, - "cut time intervals with dead ITS staves (layers 0-3 only, for pp)") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInRofStandard, bool, false, - "no other collisions in this Readout Frame with " - "per-collision multiplicity above threshold") - O2_DEFINE_CONFIGURABLE( - cfgEvSelkNoHighMultCollInPrevRof, bool, false, - "veto an event if FT0C amplitude in previous ITS ROF is above threshold") - O2_DEFINE_CONFIGURABLE(cfgEvSelMultCorrelation, bool, true, - "Multiplicity correlation cut") + O2_DEFINE_CONFIGURABLE(cfgSelCollByNch, bool, true, "Select collisions by Nch or centrality") + O2_DEFINE_CONFIGURABLE(cfgCutMultMin, int, 0, "Minimum multiplicity for collision") + O2_DEFINE_CONFIGURABLE(cfgCutMultMax, int, 10, "Maximum multiplicity for collision") + O2_DEFINE_CONFIGURABLE(cfgCutCentMin, float, 60.0f, "Minimum centrality for collision") + O2_DEFINE_CONFIGURABLE(cfgCutCentMax, float, 80.0f, "Maximum centrality for collision") + O2_DEFINE_CONFIGURABLE(cfgMixEventNumMin, int, 5, "Minimum number of events to mix") + O2_DEFINE_CONFIGURABLE(cfgSampleSize, double, 10, "Sample size for mixed event") + O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FT0A") + O2_DEFINE_CONFIGURABLE(cfgCentTableUnavailable, bool, false, "if a dataset does not provide centrality information") + O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoITSROFrameBorder, bool, false, "reject events at ITS ROF border") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoTimeFrameBorder, bool, false, "reject events at TF border") + O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodZvtxFT0vsPV, bool, false, "removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference, use this cut at low multiplicities with caution") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInTimeRangeStandard, bool, false, "no collisions in specified time range") + O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayersAll, bool, true, "cut time intervals with dead ITS staves") + O2_DEFINE_CONFIGURABLE(cfgEvSelkIsGoodITSLayer0123, bool, false, "cut time intervals with dead ITS staves (layers 0-3 only, for pp)") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoCollInRofStandard, bool, false, "no other collisions in this Readout Frame with per-collision multiplicity above threshold") + O2_DEFINE_CONFIGURABLE(cfgEvSelkNoHighMultCollInPrevRof, bool, false, "veto an event if FT0C amplitude in previous ITS ROF is above threshold") + O2_DEFINE_CONFIGURABLE(cfgEvSelMultCorrelation, bool, true, "Multiplicity correlation cut") O2_DEFINE_CONFIGURABLE(cfgEvSelV0AT0ACut, bool, true, "V0A T0A 5 sigma cut") O2_DEFINE_CONFIGURABLE(cfgEvSelOccupancy, bool, true, "Occupancy cut") - O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 2000, - "High cut on TPC occupancy") + O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 2000, "High cut on TPC occupancy") O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy") - O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", - "CCDB path to efficiency object") - O2_DEFINE_CONFIGURABLE(cfgCentralityWeight, std::string, "", - "CCDB path to centrality weight object") - O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, - "Use local efficiency object") - O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, - "Use event weights for mixed event") - O2_DEFINE_CONFIGURABLE(cfgDrawEtaPhiDis, bool, false, - "draw eta-phi distribution for detectors in used") - O2_DEFINE_CONFIGURABLE(nClustersMftTrack, int, 5, - "Minimum number of clusters for MFT track") + O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object") + O2_DEFINE_CONFIGURABLE(cfgCentralityWeight, std::string, "", "CCDB path to centrality weight object") + O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, "Use local efficiency object") + O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event") + O2_DEFINE_CONFIGURABLE(cfgDrawEtaPhiDis, bool, false, "draw eta-phi distribution for detectors in used") + O2_DEFINE_CONFIGURABLE(nClustersMftTrack, int, 5, "Minimum number of clusters for MFT track") O2_DEFINE_CONFIGURABLE(cfgCutChi2Mft, float, -1.0f, "max chi2 of MFT track") - O2_DEFINE_CONFIGURABLE(cfgCutTrackTimeMft, float, -1.0f, - "max deviation of MFT track wrt. bc in ns") - O2_DEFINE_CONFIGURABLE( - cfgRejectFT0AInside, bool, false, - "Rejection of inner ring channels of the FT0A detector") - O2_DEFINE_CONFIGURABLE( - cfgRejectFT0AOutside, bool, false, - "Rejection of outer ring channels of the FT0A detector") - O2_DEFINE_CONFIGURABLE( - cfgRejectFT0CInside, bool, false, - "Rejection of inner ring channels of the FT0C detector") - O2_DEFINE_CONFIGURABLE( - cfgRejectFT0COutside, bool, false, - "Rejection of outer ring channels of the FT0C detector") + O2_DEFINE_CONFIGURABLE(cfgCutTrackTimeMft, float, -1.0f, "max deviation of MFT track wrt. bc in ns") + O2_DEFINE_CONFIGURABLE(cfgRejectFT0AInside, bool, false, "Rejection of inner ring channels of the FT0A detector") + O2_DEFINE_CONFIGURABLE(cfgRejectFT0AOutside, bool, false, "Rejection of outer ring channels of the FT0A detector") + O2_DEFINE_CONFIGURABLE(cfgRejectFT0CInside, bool, false, "Rejection of inner ring channels of the FT0C detector") + O2_DEFINE_CONFIGURABLE(cfgRejectFT0COutside, bool, false, "Rejection of outer ring channels of the FT0C detector") struct : ConfigurableGroup { - O2_DEFINE_CONFIGURABLE( - cfgMultCentHighCutFunction, std::string, - "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + " - "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", - "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE( - cfgMultCentLowCutFunction, std::string, - "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + " - "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", - "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultT0CCutEnabled, bool, false, - "Enable Global multiplicity vs T0C centrality cut") - Configurable> cfgMultT0CCutPars{ - "cfgMultT0CCutPars", - std::vector{143.04, -4.58368, 0.0766055, -0.000727796, - 2.86153e-06, 23.3108, -0.36304, 0.00437706, - -4.717e-05, 1.98332e-07}, - "Global multiplicity vs T0C centrality cut parameter values"}; - O2_DEFINE_CONFIGURABLE(cfgMultPVT0CCutEnabled, bool, false, - "Enable PV multiplicity vs T0C centrality cut") - Configurable> cfgMultPVT0CCutPars{ - "cfgMultPVT0CCutPars", - std::vector{195.357, -6.15194, 0.101313, -0.000955828, - 3.74793e-06, 30.0326, -0.43322, 0.00476265, - -5.11206e-05, 2.13613e-07}, - "PV multiplicity vs T0C centrality cut parameter values"}; - O2_DEFINE_CONFIGURABLE(cfgMultMultPVHighCutFunction, std::string, - "[0]+[1]*x + 5.*([2]+[3]*x)", - "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultMultPVLowCutFunction, std::string, - "[0]+[1]*x - 5.*([2]+[3]*x)", - "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultGlobalPVCutEnabled, bool, false, - "Enable global multiplicity vs PV multiplicity cut") - Configurable> cfgMultGlobalPVCutPars{ - "cfgMultGlobalPVCutPars", - std::vector{-0.140809, 0.734344, 2.77495, 0.0165935}, - "PV multiplicity vs T0C centrality cut parameter values"}; - O2_DEFINE_CONFIGURABLE( - cfgMultMultV0AHighCutFunction, std::string, - "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 4.*([5] + [6]*x + " - "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", - "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE( - cfgMultMultV0ALowCutFunction, std::string, - "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + " - "[7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", - "Functional for multiplicity correlation cut"); - O2_DEFINE_CONFIGURABLE(cfgMultMultV0ACutEnabled, bool, false, - "Enable global multiplicity vs V0A multiplicity cut") - Configurable> cfgMultMultV0ACutPars{ - "cfgMultMultV0ACutPars", - std::vector{534.893, 184.344, 0.423539, -0.00331436, - 5.34622e-06, 871.239, 53.3735, -0.203528, - 0.000122758, 5.41027e-07}, - "Global multiplicity vs V0A multiplicity cut parameter values"}; + O2_DEFINE_CONFIGURABLE(cfgMultCentHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultCentLowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultT0CCutEnabled, bool, false, "Enable Global multiplicity vs T0C centrality cut") + Configurable> cfgMultT0CCutPars{"cfgMultT0CCutPars", std::vector{143.04, -4.58368, 0.0766055, -0.000727796, 2.86153e-06, 23.3108, -0.36304, 0.00437706, -4.717e-05, 1.98332e-07}, "Global multiplicity vs T0C centrality cut parameter values"}; + O2_DEFINE_CONFIGURABLE(cfgMultPVT0CCutEnabled, bool, false, "Enable PV multiplicity vs T0C centrality cut") + Configurable> cfgMultPVT0CCutPars{"cfgMultPVT0CCutPars", std::vector{195.357, -6.15194, 0.101313, -0.000955828, 3.74793e-06, 30.0326, -0.43322, 0.00476265, -5.11206e-05, 2.13613e-07}, "PV multiplicity vs T0C centrality cut parameter values"}; + O2_DEFINE_CONFIGURABLE(cfgMultMultPVHighCutFunction, std::string, "[0]+[1]*x + 5.*([2]+[3]*x)", "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultMultPVLowCutFunction, std::string, "[0]+[1]*x - 5.*([2]+[3]*x)", "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultGlobalPVCutEnabled, bool, false, "Enable global multiplicity vs PV multiplicity cut") + Configurable> cfgMultGlobalPVCutPars{"cfgMultGlobalPVCutPars", std::vector{-0.140809, 0.734344, 2.77495, 0.0165935}, "PV multiplicity vs T0C centrality cut parameter values"}; + O2_DEFINE_CONFIGURABLE(cfgMultMultV0AHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 4.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultMultV0ALowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut"); + O2_DEFINE_CONFIGURABLE(cfgMultMultV0ACutEnabled, bool, false, "Enable global multiplicity vs V0A multiplicity cut") + Configurable> cfgMultMultV0ACutPars{"cfgMultMultV0ACutPars", std::vector{534.893, 184.344, 0.423539, -0.00331436, 5.34622e-06, 871.239, 53.3735, -0.203528, 0.000122758, 5.41027e-07}, "Global multiplicity vs V0A multiplicity cut parameter values"}; std::vector multT0CCutPars; std::vector multPVT0CCutPars; std::vector multGlobalPVCutPars; std::vector multMultV0ACutPars; - TF1 *fMultPVT0CCutLow = nullptr; - TF1 *fMultPVT0CCutHigh = nullptr; - TF1 *fMultT0CCutLow = nullptr; - TF1 *fMultT0CCutHigh = nullptr; - TF1 *fMultGlobalPVCutLow = nullptr; - TF1 *fMultGlobalPVCutHigh = nullptr; - TF1 *fMultMultV0ACutLow = nullptr; - TF1 *fMultMultV0ACutHigh = nullptr; - TF1 *fT0AV0AMean = nullptr; - TF1 *fT0AV0ASigma = nullptr; + TF1* fMultPVT0CCutLow = nullptr; + TF1* fMultPVT0CCutHigh = nullptr; + TF1* fMultT0CCutLow = nullptr; + TF1* fMultT0CCutHigh = nullptr; + TF1* fMultGlobalPVCutLow = nullptr; + TF1* fMultGlobalPVCutHigh = nullptr; + TF1* fMultMultV0ACutLow = nullptr; + TF1* fMultMultV0ACutHigh = nullptr; + TF1* fT0AV0AMean = nullptr; + TF1* fT0AV0ASigma = nullptr; } cfgFuncParas; SliceCache cache; - ConfigurableAxis axisVertex{ - "axisVertex", {10, -10, 10}, "vertex axis for histograms"}; - ConfigurableAxis axisMultiplicity{"axisMultiplicity", - {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, - 120, 140, 160, 180, 200, 220, 240, 260}, - "multiplicity axis for histograms"}; - ConfigurableAxis axisEta{ - "axisEta", {70, -5.0, 5.0}, "eta axis for histograms"}; - ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", - {72, -PIHalf, PIHalf * 3}, - "delta phi axis for histograms"}; - ConfigurableAxis axisDeltaEtaTpcFt0a{ - "axisDeltaEtaTpcFt0a", - {32, -5.8, -2.6}, - "delta eta axis, -5.8~-2.6 for TPC-FT0A,"}; - ConfigurableAxis axisDeltaEtaTpcFt0c{"axisDeltaEtaTpcFt0c", - {32, 1.2, 4.2}, - "delta eta axis, 1.2~4.2 for TPC-FT0C"}; - ConfigurableAxis axisDeltaEtaFt0aFt0c{ - "axisDeltaEtaFt0aFt0c", - {32, 4.2, 8.2}, - "delta eta axis, 4.2~8.2 for FT0A-FT0C"}; - ConfigurableAxis axisDeltaEtaTpcMft{"axisDeltaEtaTpcMft", - {32, 1.3, 4.8}, - "delta eta axis, 1.3~4.8 for TPC-MFT"}; - ConfigurableAxis axisDeltaEtaTpcFv0{"axisDeltaEtaTpcFv0", - {32, -1.2, -6.1}, - "delta eta axis for TPC-FV0 histograms"}; - ConfigurableAxis axisEtaTrigger{"axisEtaTrigger", - {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, - -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, - "eta trigger axis for histograms"}; - ConfigurableAxis axisEtaAssoc{"axisEtaAssoc", - {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, - -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, - "eta associated axis for histograms"}; - ConfigurableAxis axisVtxMix{"axisVtxMix", - {VARIABLE_WIDTH, - -10, - -9, - -8, - -7, - -6, - -5, - -4, - -3, - -2, - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10}, - "vertex axis for mixed event histograms"}; - ConfigurableAxis axisMultMix{ - "axisMultMix", - {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, - 240, 260}, - "multiplicity / centrality axis for mixed event histograms"}; - ConfigurableAxis axisSample{"axisSample", - {cfgSampleSize, 0, cfgSampleSize}, - "sample axis for histograms"}; - - ConfigurableAxis axisVertexEfficiency{ - "axisVertexEfficiency", - {10, -10, 10}, - "vertex axis for efficiency histograms"}; - ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", - {20, -1.0, 1.0}, - "eta axis for efficiency histograms"}; - ConfigurableAxis axisPtEfficiency{ - "axisPtEfficiency", - {VARIABLE_WIDTH, 0.2, 0.5, 1, 1.5, 2, 3, 4, 6, 10}, - "pt axis for efficiency histograms"}; - ConfigurableAxis axisAmplitudeFt0a{ - "axisAmplitudeFt0a", {5000, 0, 1000}, "FT0A amplitude"}; - ConfigurableAxis axisChannelFt0aAxis{ - "axisChannelFt0aAxis", {96, 0.0, 96.0}, "FT0A channel"}; - - Configurable cfgGainEqPath{ - "cfgGainEqPath", "Analysis/EventPlane/GainEq", - "CCDB path for gain equalization constants"}; - Configurable cfgCorrLevel{ - "cfgCorrLevel", 1, "calibration step: 0 = no corr, 1 = gain corr"}; + ConfigurableAxis axisVertex{"axisVertex", {10, -10, 10}, "vertex axis for histograms"}; + ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260}, "multiplicity axis for histograms"}; + ConfigurableAxis axisEta{"axisEta", {70, -5.0, 5.0}, "eta axis for histograms"}; + ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {72, -PIHalf, PIHalf * 3}, "delta phi axis for histograms"}; + ConfigurableAxis axisDeltaEtaTpcFt0a{"axisDeltaEtaTpcFt0a", {32, -5.8, -2.6}, "delta eta axis, -5.8~-2.6 for TPC-FT0A,"}; + ConfigurableAxis axisDeltaEtaTpcFt0c{"axisDeltaEtaTpcFt0c", {32, 1.2, 4.2}, "delta eta axis, 1.2~4.2 for TPC-FT0C"}; + ConfigurableAxis axisDeltaEtaFt0aFt0c{"axisDeltaEtaFt0aFt0c", {32, 4.2, 8.2}, "delta eta axis, 4.2~8.2 for FT0A-FT0C"}; + ConfigurableAxis axisDeltaEtaTpcMft{"axisDeltaEtaTpcMft", {32, 1.3, 4.8}, "delta eta axis, 1.3~4.8 for TPC-MFT"}; + ConfigurableAxis axisDeltaEtaTpcFv0{"axisDeltaEtaTpcFv0", {32, -1.2, -6.1}, "delta eta axis for TPC-FV0 histograms"}; + ConfigurableAxis axisEtaTrigger{"axisEtaTrigger", {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, "eta trigger axis for histograms"}; + ConfigurableAxis axisEtaAssoc{"axisEtaAssoc", {VARIABLE_WIDTH, -3.3, -2.1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 3.5, 4.9}, "eta associated axis for histograms"}; + ConfigurableAxis axisVtxMix{"axisVtxMix", {VARIABLE_WIDTH, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "vertex axis for mixed event histograms"}; + ConfigurableAxis axisMultMix{"axisMultMix", {VARIABLE_WIDTH, 0, 10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260}, "multiplicity / centrality axis for mixed event histograms"}; + ConfigurableAxis axisSample{"axisSample", {cfgSampleSize, 0, cfgSampleSize}, "sample axis for histograms"}; + + ConfigurableAxis axisVertexEfficiency{"axisVertexEfficiency", {10, -10, 10}, "vertex axis for efficiency histograms"}; + ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", {20, -1.0, 1.0}, "eta axis for efficiency histograms"}; + ConfigurableAxis axisPtEfficiency{"axisPtEfficiency", {VARIABLE_WIDTH, 0.2, 0.5, 1, 1.5, 2, 3, 4, 6, 10}, "pt axis for efficiency histograms"}; + ConfigurableAxis axisAmplitudeFt0a{"axisAmplitudeFt0a", {5000, 0, 1000}, "FT0A amplitude"}; + ConfigurableAxis axisChannelFt0aAxis{"axisChannelFt0aAxis", {96, 0.0, 96.0}, "FT0A channel"}; + + Configurable cfgGainEqPath{"cfgGainEqPath", "Analysis/EventPlane/GainEq", "CCDB path for gain equalization constants"}; + Configurable cfgCorrLevel{"cfgCorrLevel", 1, "calibration step: 0 = no corr, 1 = gain corr"}; ConfigurableAxis cfgaxisFITamp{"cfgaxisFITamp", {1000, 0, 5000}, ""}; AxisSpec axisFit{cfgaxisFITamp, "fit amplitude"}; AxisSpec axisChID = {220, 0, 220}; // make the filters and cuts. Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ); - Filter trackFilter = - (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && - ((requireGlobalTrackInFilter()) || - (aod::track::isGlobalTrackSDD == static_cast(true))) && - (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && - (nabs(aod::track::dcaZ) < cfgCutDCAz); - using FilteredCollisions = - soa::Filtered>; - using FilteredTracks = - soa::Filtered>; + Filter trackFilter = (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + using FilteredCollisions = soa::Filtered>; + using FilteredTracks = soa::Filtered>; // FT0 geometry o2::ft0::Geometry ft0Det; - o2::fv0::Geometry *fv0Det{}; + o2::fv0::Geometry* fv0Det{}; static constexpr uint64_t Ft0IndexA = 96; - std::vector *offsetFT0; - std::vector *offsetFV0; + std::vector* offsetFT0; + std::vector* offsetFV0; std::vector cstFT0RelGain{}; // Corrections - TH3D *mEfficiency = nullptr; - TH1D *mCentralityWeight = nullptr; + TH3D* mEfficiency = nullptr; + TH1D* mCentralityWeight = nullptr; bool correctionsLoaded = false; // Define the outputs @@ -357,7 +190,7 @@ struct FlowDecorrelation { HistogramRegistry registry{"registry"}; // define global variables - TRandom3 *gRandom = new TRandom3(); + TRandom3* gRandom = new TRandom3(); enum CentEstimators { kCentFT0C = 0, kCentFT0CVariant1, @@ -366,8 +199,15 @@ struct FlowDecorrelation { // Count the total number of enum kCount_CentEstimators }; - enum EventType { SameEvent = 1, MixedEvent = 3 }; - enum FITIndex { kFT0A = 0, kFT0C = 1, kFV0 = 2 }; + enum EventType { + SameEvent = 1, + MixedEvent = 3 + }; + enum FITIndex { + kFT0A = 0, + kFT0C = 1, + kFV0 = 2 + }; enum ParticleNsigma { kPionUp = 0, kKaonUp, @@ -376,7 +216,11 @@ struct FlowDecorrelation { kKaonLow, kProtonLow }; - enum DetectorType { kTPC = 0, kTOF, kITS }; + enum DetectorType { + kTPC = 0, + kTOF, + kITS + }; enum DetectorChannels { kFT0AInnerRingMin = 0, kFT0AInnerRingMax = 31, @@ -391,10 +235,10 @@ struct FlowDecorrelation { std::array itsNsigmaCut; std::array tpcNsigmaCut; - void init(InitContext &) { + void init(InitContext&) + { if (cfgCentTableUnavailable && !cfgSelCollByNch) { - LOGF(fatal, "Centrality table is unavailable, cannot select collisions " - "by centrality"); + LOGF(fatal, "Centrality table is unavailable, cannot select collisions by centrality"); } const AxisSpec axisPhi{72, 0.0, constants::math::TwoPI, "#varphi"}; const AxisSpec axisEta{40, -1., 1., "#eta"}; @@ -402,58 +246,27 @@ struct FlowDecorrelation { ccdb->setURL("http://alice-ccdb.cern.ch"); ccdb->setCaching(true); - auto now = std::chrono::duration_cast( - std::chrono::system_clock::now().time_since_epoch()) - .count(); + auto now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); ccdb->setCreatedNotAfter(now); fv0Det = o2::fv0::Geometry::instance(o2::fv0::Geometry::eUninitialized); LOGF(info, "Starting init"); // Event Counter - if ((doprocessSameTpcFt0a || doprocessSameTpcFt0c || - doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) && - cfgUseAdditionalEventCut) { - registry.add("hEventCountSpecific", "Number of Event;; Count", - {HistType::kTH1D, {{13, 0, 13}}}); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(1, "after sel8"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(2, "kNoSameBunchPileup"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(3, "kNoITSROFrameBorder"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(4, "kNoTimeFrameBorder"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(5, "kIsGoodZvtxFT0vsPV"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(6, "kNoCollInTimeRangeStandard"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(7, "kIsGoodITSLayersAll"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(8, "kIsGoodITSLayer0123"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(9, "kNoCollInRofStandard"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(10, "kNoHighMultCollInPrevRof"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(11, "occupancy"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(12, "MultCorrelation"); - registry.get(HIST("hEventCountSpecific")) - ->GetXaxis() - ->SetBinLabel(13, "cfgEvSelV0AT0ACut"); + if ((doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) && cfgUseAdditionalEventCut) { + registry.add("hEventCountSpecific", "Number of Event;; Count", {HistType::kTH1D, {{13, 0, 13}}}); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(1, "after sel8"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(3, "kNoITSROFrameBorder"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(4, "kNoTimeFrameBorder"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(5, "kIsGoodZvtxFT0vsPV"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(6, "kNoCollInTimeRangeStandard"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(7, "kIsGoodITSLayersAll"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(8, "kIsGoodITSLayer0123"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(9, "kNoCollInRofStandard"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(10, "kNoHighMultCollInPrevRof"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(11, "occupancy"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(12, "MultCorrelation"); + registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(13, "cfgEvSelV0AT0ACut"); } if (cfgEvSelMultCorrelation) { @@ -461,83 +274,45 @@ struct FlowDecorrelation { cfgFuncParas.multPVT0CCutPars = cfgFuncParas.cfgMultPVT0CCutPars; cfgFuncParas.multGlobalPVCutPars = cfgFuncParas.cfgMultGlobalPVCutPars; cfgFuncParas.multMultV0ACutPars = cfgFuncParas.cfgMultMultV0ACutPars; - cfgFuncParas.fMultPVT0CCutLow = - new TF1("fMultPVT0CCutLow", - cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultPVT0CCutLow->SetParameters( - &(cfgFuncParas.multPVT0CCutPars[0])); - cfgFuncParas.fMultPVT0CCutHigh = - new TF1("fMultPVT0CCutHigh", - cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultPVT0CCutHigh->SetParameters( - &(cfgFuncParas.multPVT0CCutPars[0])); - - cfgFuncParas.fMultT0CCutLow = - new TF1("fMultT0CCutLow", - cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultT0CCutLow->SetParameters( - &(cfgFuncParas.multT0CCutPars[0])); - cfgFuncParas.fMultT0CCutHigh = - new TF1("fMultT0CCutHigh", - cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); - cfgFuncParas.fMultT0CCutHigh->SetParameters( - &(cfgFuncParas.multT0CCutPars[0])); - - cfgFuncParas.fMultGlobalPVCutLow = - new TF1("fMultGlobalPVCutLow", - cfgFuncParas.cfgMultMultPVLowCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultGlobalPVCutLow->SetParameters( - &(cfgFuncParas.multGlobalPVCutPars[0])); - cfgFuncParas.fMultGlobalPVCutHigh = - new TF1("fMultGlobalPVCutHigh", - cfgFuncParas.cfgMultMultPVHighCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultGlobalPVCutHigh->SetParameters( - &(cfgFuncParas.multGlobalPVCutPars[0])); - - cfgFuncParas.fMultMultV0ACutLow = - new TF1("fMultMultV0ACutLow", - cfgFuncParas.cfgMultMultV0ALowCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultMultV0ACutLow->SetParameters( - &(cfgFuncParas.multMultV0ACutPars[0])); - cfgFuncParas.fMultMultV0ACutHigh = - new TF1("fMultMultV0ACutHigh", - cfgFuncParas.cfgMultMultV0AHighCutFunction->c_str(), 0, 4000); - cfgFuncParas.fMultMultV0ACutHigh->SetParameters( - &(cfgFuncParas.multMultV0ACutPars[0])); + cfgFuncParas.fMultPVT0CCutLow = new TF1("fMultPVT0CCutLow", cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultPVT0CCutLow->SetParameters(&(cfgFuncParas.multPVT0CCutPars[0])); + cfgFuncParas.fMultPVT0CCutHigh = new TF1("fMultPVT0CCutHigh", cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultPVT0CCutHigh->SetParameters(&(cfgFuncParas.multPVT0CCutPars[0])); + + cfgFuncParas.fMultT0CCutLow = new TF1("fMultT0CCutLow", cfgFuncParas.cfgMultCentLowCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultT0CCutLow->SetParameters(&(cfgFuncParas.multT0CCutPars[0])); + cfgFuncParas.fMultT0CCutHigh = new TF1("fMultT0CCutHigh", cfgFuncParas.cfgMultCentHighCutFunction->c_str(), 0, 100); + cfgFuncParas.fMultT0CCutHigh->SetParameters(&(cfgFuncParas.multT0CCutPars[0])); + + cfgFuncParas.fMultGlobalPVCutLow = new TF1("fMultGlobalPVCutLow", cfgFuncParas.cfgMultMultPVLowCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultGlobalPVCutLow->SetParameters(&(cfgFuncParas.multGlobalPVCutPars[0])); + cfgFuncParas.fMultGlobalPVCutHigh = new TF1("fMultGlobalPVCutHigh", cfgFuncParas.cfgMultMultPVHighCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultGlobalPVCutHigh->SetParameters(&(cfgFuncParas.multGlobalPVCutPars[0])); + + cfgFuncParas.fMultMultV0ACutLow = new TF1("fMultMultV0ACutLow", cfgFuncParas.cfgMultMultV0ALowCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultMultV0ACutLow->SetParameters(&(cfgFuncParas.multMultV0ACutPars[0])); + cfgFuncParas.fMultMultV0ACutHigh = new TF1("fMultMultV0ACutHigh", cfgFuncParas.cfgMultMultV0AHighCutFunction->c_str(), 0, 4000); + cfgFuncParas.fMultMultV0ACutHigh->SetParameters(&(cfgFuncParas.multMultV0ACutPars[0])); cfgFuncParas.fT0AV0AMean = new TF1("fT0AV0AMean", "[0]+[1]*x", 0, 200000); cfgFuncParas.fT0AV0AMean->SetParameters(-1601.0581, 9.417652e-01); - cfgFuncParas.fT0AV0ASigma = new TF1( - "fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); - cfgFuncParas.fT0AV0ASigma->SetParameters( - 463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); + cfgFuncParas.fT0AV0ASigma = new TF1("fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); + cfgFuncParas.fT0AV0ASigma->SetParameters(463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); } - std::string hCentTitle = "Centrality distribution, Estimator " + - std::to_string(cfgCentEstimator); + std::string hCentTitle = "Centrality distribution, Estimator " + std::to_string(cfgCentEstimator); // Make histograms to check the distributions after cuts - if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || - doprocessSameTpcMft || doprocessSameTpcFv0) { + if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) { registry.add("Phi", "Phi", {HistType::kTH1D, {axisPhi}}); registry.add("Eta", "Eta", {HistType::kTH1D, {axisEta}}); - registry.add("EtaCorrected", "EtaCorrected", - {HistType::kTH1D, {axisEta}}); + registry.add("EtaCorrected", "EtaCorrected", {HistType::kTH1D, {axisEta}}); registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); - registry.add("Nch_used", "N_{ch}", - {HistType::kTH1D, - {axisMultiplicity}}); // histogram to see how many events - // are in the same and mixed event - registry.add("Centrality", hCentTitle.c_str(), - {HistType::kTH1D, {{100, 0, 100}}}); - registry.add("CentralityWeighted", hCentTitle.c_str(), - {HistType::kTH1D, {{100, 0, 100}}}); - registry.add("Centrality_used", hCentTitle.c_str(), - {HistType::kTH1D, - {{100, 0, 100}}}); // histogram to see how many events are - // in the same and mixed event + registry.add("Nch_used", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event + registry.add("Centrality", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); + registry.add("CentralityWeighted", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); + registry.add("Centrality_used", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); // histogram to see how many events are in the same and mixed event registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}}); - registry.add("pTCorrected", "pTCorrected", - {HistType::kTH1D, {axisPtEfficiency}}); + registry.add("pTCorrected", "pTCorrected", {HistType::kTH1D, {axisPtEfficiency}}); registry.add("pT", "pT", {HistType::kTH1D, {axisPtEfficiency}}); registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}}); registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}}); @@ -547,181 +322,111 @@ struct FlowDecorrelation { } } if (doprocessSameTpcFt0a) { - registry.add( - "deltaEta_deltaPhi_same_TPC_FT0A", "", - {HistType::kTH2D, - {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta - // and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_FT0A", "", - {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); - registry.add("Assoc_amp_same_TPC_FT0A", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_TPC_FT0A", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add( - "Trig_hist_TPC_FT0A", "", - {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add("deltaEta_deltaPhi_same_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); + registry.add("Assoc_amp_same_TPC_FT0A", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_TPC_FT0A", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Trig_hist_TPC_FT0A", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameTpcFt0c) { - registry.add( - "deltaEta_deltaPhi_same_TPC_FT0C", "", - {HistType::kTH2D, - {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); // check to see the delta eta - // and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_FT0C", "", - {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); - registry.add("Assoc_amp_same_TPC_FT0C", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_TPC_FT0C", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add( - "Trig_hist_TPC_FT0C", "", - {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add("deltaEta_deltaPhi_same_TPC_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); // check to see the delta eta and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); + registry.add("Assoc_amp_same_TPC_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_TPC_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Trig_hist_TPC_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameFt0aFt0c) { - registry.add( - "deltaEta_deltaPhi_same_FT0A_FT0C", "", - {HistType::kTH2D, - {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); // check to see the delta eta - // and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_FT0A_FT0C", "", - {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); - registry.add("Assoc_amp_same_FT0A_FT0C", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_FT0A_FT0C", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add( - "Trig_hist_FT0A_FT0C", "", - {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add("deltaEta_deltaPhi_same_FT0A_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); // check to see the delta eta and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_FT0A_FT0C", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaFt0aFt0c}}); + registry.add("Assoc_amp_same_FT0A_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_FT0A_FT0C", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Trig_hist_FT0A_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameTpcMft) { - registry.add( - "deltaEta_deltaPhi_same_TPC_MFT", "", - {HistType::kTH2D, - {axisDeltaPhi, axisDeltaEtaTpcMft}}); // check to see the delta eta - // and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_MFT", "", - {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcMft}}); - registry.add( - "Trig_hist_TPC_MFT", "", - {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add("deltaEta_deltaPhi_same_TPC_MFT", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcMft}}); // check to see the delta eta and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_MFT", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcMft}}); + registry.add("Trig_hist_TPC_MFT", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); } if (doprocessSameTpcFv0) { - registry.add( - "deltaEta_deltaPhi_same_TPC_FV0", "", - {HistType::kTH2D, - {axisDeltaPhi, axisDeltaEtaTpcFv0}}); // check to see the delta eta - // and delta phi distribution - registry.add("deltaEta_deltaPhi_mixed_TPC_FV0", "", - {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFv0}}); - registry.add("Assoc_amp_same_TPC_FV0", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add("Assoc_amp_mixed_TPC_FV0", "", - {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); - registry.add( - "Trig_hist_TPC_FV0", "", - {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); + registry.add("deltaEta_deltaPhi_same_TPC_FV0", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFv0}}); // check to see the delta eta and delta phi distribution + registry.add("deltaEta_deltaPhi_mixed_TPC_FV0", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFv0}}); + registry.add("Assoc_amp_same_TPC_FV0", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Assoc_amp_mixed_TPC_FV0", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); + registry.add("Trig_hist_TPC_FV0", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisEtaTrigger}}}); registry.add("FV0Amp", "", {HistType::kTH2F, {axisChID, axisFit}}); } - registry.add("eventcount", "bin", - {HistType::kTH1F, - {{4, 0, 4, "bin"}}}); // histogram to see how many events are - // in the same and mixed event + registry.add("eventcount", "bin", {HistType::kTH1F, {{4, 0, 4, "bin"}}}); // histogram to see how many events are in the same and mixed event LOGF(info, "Initializing correlation container"); std::vector effAxis = { - {axisEtaEfficiency, "#eta"}, - {axisPtEfficiency, "p_{T} (GeV/c)"}, - {axisVertexEfficiency, "z-vtx (cm)"}, + {axisEtaEfficiency, "#eta"}, + {axisPtEfficiency, "p_{T} (GeV/c)"}, + {axisVertexEfficiency, "z-vtx (cm)"}, }; std::vector userAxis; - std::vector corrAxisTpcFt0a = { - {axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcFt0a, "#Delta#eta"}}; - - std::vector corrAxisTpcFt0c = { - {axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcFt0c, "#Delta#eta"}}; - - std::vector corrAxisFt0aFt0c = { - {axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaFt0aFt0c, "#Delta#eta"}}; - - std::vector corrAxisTpcMft = { - {axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcMft, "#Delta#eta"}}; - - std::vector corrAxisTpcFv0 = { - {axisSample, "Sample"}, - {axisVertex, "z-vtx (cm)"}, - {axisEtaTrigger, "#eta"}, - {axisEtaAssoc, "#eta"}, - {axisDeltaPhi, "#Delta#varphi (rad)"}, - {axisDeltaEtaTpcFv0, "#Delta#eta"}}; + std::vector corrAxisTpcFt0a = {{axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcFt0a, "#Delta#eta"}}; + + std::vector corrAxisTpcFt0c = {{axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcFt0c, "#Delta#eta"}}; + + std::vector corrAxisFt0aFt0c = {{axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaFt0aFt0c, "#Delta#eta"}}; + + std::vector corrAxisTpcMft = {{axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcMft, "#Delta#eta"}}; + + std::vector corrAxisTpcFv0 = {{axisSample, "Sample"}, + {axisVertex, "z-vtx (cm)"}, + {axisEtaTrigger, "#eta"}, + {axisEtaAssoc, "#eta"}, + {axisDeltaPhi, "#Delta#varphi (rad)"}, + {axisDeltaEtaTpcFv0, "#Delta#eta"}}; if (doprocessSameTpcFt0a) { - same.setObject( - new CorrelationContainer("sameEvent_TPC_FT0A", "sameEvent_TPC_FT0A", - corrAxisTpcFt0a, effAxis, userAxis)); - mixed.setObject( - new CorrelationContainer("mixedEvent_TPC_FT0A", "mixedEvent_TPC_FT0A", - corrAxisTpcFt0a, effAxis, userAxis)); + same.setObject(new CorrelationContainer("sameEvent_TPC_FT0A", "sameEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis)); + mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FT0A", "mixedEvent_TPC_FT0A", corrAxisTpcFt0a, effAxis, userAxis)); } if (doprocessSameTpcFt0c) { - same.setObject( - new CorrelationContainer("sameEvent_TPC_FT0C", "sameEvent_TPC_FT0C", - corrAxisTpcFt0c, effAxis, userAxis)); - mixed.setObject( - new CorrelationContainer("mixedEvent_TPC_FT0C", "mixedEvent_TPC_FT0C", - corrAxisTpcFt0c, effAxis, userAxis)); + same.setObject(new CorrelationContainer("sameEvent_TPC_FT0C", "sameEvent_TPC_FT0C", corrAxisTpcFt0c, effAxis, userAxis)); + mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FT0C", "mixedEvent_TPC_FT0C", corrAxisTpcFt0c, effAxis, userAxis)); } if (doprocessSameFt0aFt0c) { - same.setObject( - new CorrelationContainer("sameEvent_FT0A_FT0C", "sameEvent_FT0A_FT0C", - corrAxisFt0aFt0c, effAxis, userAxis)); - mixed.setObject(new CorrelationContainer( - "mixedEvent_FT0A_FT0C", "mixedEvent_FT0A_FT0C", corrAxisFt0aFt0c, - effAxis, userAxis)); + same.setObject(new CorrelationContainer("sameEvent_FT0A_FT0C", "sameEvent_FT0A_FT0C", corrAxisFt0aFt0c, effAxis, userAxis)); + mixed.setObject(new CorrelationContainer("mixedEvent_FT0A_FT0C", "mixedEvent_FT0A_FT0C", corrAxisFt0aFt0c, effAxis, userAxis)); } if (doprocessSameTpcMft) { - same.setObject( - new CorrelationContainer("sameEvent_TPC_MFT", "sameEvent_TPC_MFT", - corrAxisTpcMft, effAxis, userAxis)); - mixed.setObject( - new CorrelationContainer("mixedEvent_TPC_MFT", "mixedEvent_TPC_MFT", - corrAxisTpcMft, effAxis, userAxis)); + same.setObject(new CorrelationContainer("sameEvent_TPC_MFT", "sameEvent_TPC_MFT", corrAxisTpcMft, effAxis, userAxis)); + mixed.setObject(new CorrelationContainer("mixedEvent_TPC_MFT", "mixedEvent_TPC_MFT", corrAxisTpcMft, effAxis, userAxis)); } if (doprocessSameTpcFv0) { - same.setObject( - new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FV0", - corrAxisTpcFv0, effAxis, userAxis)); - mixed.setObject( - new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FV0", - corrAxisTpcFv0, effAxis, userAxis)); + same.setObject(new CorrelationContainer("sameEvent_TPC_FV0", "sameEvent_TPC_FV0", corrAxisTpcFv0, effAxis, userAxis)); + mixed.setObject(new CorrelationContainer("mixedEvent_TPC_FV0", "mixedEvent_TPC_FV0", corrAxisTpcFv0, effAxis, userAxis)); } LOGF(info, "End of init"); } template - bool isAcceptedMftTrack(TTrackAssoc const &mftTrack) { + bool isAcceptedMftTrack(TTrackAssoc const& mftTrack) + { // cut on the number of clusters of the reconstructed MFT track if (mftTrack.nClusters() < nClustersMftTrack) return false; @@ -729,39 +434,32 @@ struct FlowDecorrelation { if (cfgCutChi2Mft > 0. && mftTrack.chi2() > cfgCutChi2Mft) return false; - if (cfgCutTrackTimeMft > 0. && - std::abs(mftTrack.trackTime()) > cfgCutTrackTimeMft) + if (cfgCutTrackTimeMft > 0. && std::abs(mftTrack.trackTime()) > cfgCutTrackTimeMft) return false; return true; } - double getPhiFV0(uint64_t chno) { + double getPhiFV0(uint64_t chno) + { o2::fv0::Point3Dsimple chPos{}; - int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, - 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; - bool const isChnoInLeft = - std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != - std::end(cellsInLeft); + int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; + bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft); if (isChnoInLeft) { chPos = fv0Det->getReadoutCenter(chno); - return RecoDecay::phi(chPos.x + (*offsetFV0)[0].getX(), - chPos.y + (*offsetFV0)[0].getY()); + return RecoDecay::phi(chPos.x + (*offsetFV0)[0].getX(), chPos.y + (*offsetFV0)[0].getY()); } else { chPos = fv0Det->getReadoutCenter(chno); - return RecoDecay::phi(chPos.x + (*offsetFV0)[1].getX(), - chPos.y + (*offsetFV0)[1].getY()); + return RecoDecay::phi(chPos.x + (*offsetFV0)[1].getX(), chPos.y + (*offsetFV0)[1].getY()); } } - double getEtaFV0(uint64_t chno) { + double getEtaFV0(uint64_t chno) + { - int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, - 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; - bool const isChnoInLeft = - std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != - std::end(cellsInLeft); + int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; + bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft); o2::fv0::Point3Dsimple chPos{}; chPos = fv0Det->getReadoutCenter(chno); @@ -788,18 +486,19 @@ struct FlowDecorrelation { return -std::log(std::tan(0.5 * theta)); } - double getPhiFT0(uint64_t chno, int i) { + double getPhiFT0(uint64_t chno, int i) + { // offsetFT0[0]: FT0A, offsetFT0[1]: FT0C if (i > 1 || i < 0) { LOGF(fatal, "kFIT Index %d out of range", i); } ft0Det.calculateChannelCenter(); auto chPos = ft0Det.getChannelCenter(chno); - return RecoDecay::phi(chPos.X() + (*offsetFT0)[i].getX(), - chPos.Y() + (*offsetFT0)[i].getY()); + return RecoDecay::phi(chPos.X() + (*offsetFT0)[i].getX(), chPos.Y() + (*offsetFT0)[i].getY()); } - double getEtaFT0(uint64_t chno, int i) { + double getEtaFT0(uint64_t chno, int i) + { // offsetFT0[0]: FT0A, offsetFT0[1]: FT0C if (i > 1 || i < 0) { LOGF(fatal, "kFIT Index %d out of range", i); @@ -818,38 +517,38 @@ struct FlowDecorrelation { } template - float getCentrality(TCollision const &collision) { + float getCentrality(TCollision const& collision) + { float cent; switch (cfgCentEstimator) { - case kCentFT0C: - cent = collision.centFT0C(); - break; - case kCentFT0CVariant1: - cent = collision.centFT0CVariant1(); - break; - case kCentFT0M: - cent = collision.centFT0M(); - break; - case kCentFV0A: - cent = collision.centFV0A(); - break; - default: - cent = collision.centFT0C(); + case kCentFT0C: + cent = collision.centFT0C(); + break; + case kCentFT0CVariant1: + cent = collision.centFT0CVariant1(); + break; + case kCentFT0M: + cent = collision.centFT0M(); + break; + case kCentFV0A: + cent = collision.centFV0A(); + break; + default: + cent = collision.centFT0C(); } return cent; } - template bool trackSelected(TTrack track) { - return ((track.tpcNClsFound() >= cfgCutTPCclu) && - (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && - (track.itsNCls() >= cfgCutITSclu)); + template + bool trackSelected(TTrack track) + { + return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu)); } - void loadAlignParam(uint64_t timestamp) { - offsetFT0 = ccdb->getForTimeStamp>( - "FT0/Calib/Align", timestamp); - offsetFV0 = ccdb->getForTimeStamp>( - "FV0/Calib/Align", timestamp); + void loadAlignParam(uint64_t timestamp) + { + offsetFT0 = ccdb->getForTimeStamp>("FT0/Calib/Align", timestamp); + offsetFV0 = ccdb->getForTimeStamp>("FV0/Calib/Align", timestamp); if (offsetFT0 == nullptr) { LOGF(fatal, "Could not load FT0/Calib/Align for timestamp %d", timestamp); } @@ -858,7 +557,8 @@ struct FlowDecorrelation { } } - void loadGain(aod::BCsWithTimestamps::iterator const &bc) { + void loadGain(aod::BCsWithTimestamps::iterator const& bc) + { cstFT0RelGain.clear(); cstFT0RelGain = {}; std::string fullPath; @@ -872,8 +572,7 @@ struct FlowDecorrelation { } else { fullPath = cfgGainEqPath; fullPath += "/FT0"; - const auto objft0Gain = - ccdb->getForTimeStamp>(fullPath, timestamp); + const auto objft0Gain = ccdb->getForTimeStamp>(fullPath, timestamp); if (!objft0Gain) { for (auto i{0u}; i < ChannelsFT0; i++) { cstFT0RelGain.push_back(1.); @@ -884,45 +583,35 @@ struct FlowDecorrelation { } } - void loadCorrection(uint64_t timestamp) { + void loadCorrection(uint64_t timestamp) + { if (correctionsLoaded) { return; } if (cfgEfficiency.value.empty() == false) { if (cfgLocalEfficiency > 0) { - TFile *fEfficiencyTrigger = - TFile::Open(cfgEfficiency.value.c_str(), "READ"); - mEfficiency = - reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); + TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ"); + mEfficiency = reinterpret_cast(fEfficiencyTrigger->Get("ccdb_object")); } else { mEfficiency = ccdb->getForTimeStamp(cfgEfficiency, timestamp); } if (mEfficiency == nullptr) { - LOGF( - fatal, - "Could not load efficiency histogram for trigger particles from %s", - cfgEfficiency.value.c_str()); + LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiency.value.c_str()); } - LOGF(info, "Loaded efficiency histogram from %s (%p)", - cfgEfficiency.value.c_str(), (void *)mEfficiency); + LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency); } if (cfgCentralityWeight.value.empty() == false) { - mCentralityWeight = - ccdb->getForTimeStamp(cfgCentralityWeight, timestamp); + mCentralityWeight = ccdb->getForTimeStamp(cfgCentralityWeight, timestamp); if (mCentralityWeight == nullptr) { - LOGF( - fatal, - "Could not load efficiency histogram for trigger particles from %s", - cfgCentralityWeight.value.c_str()); + LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgCentralityWeight.value.c_str()); } - LOGF(info, "Loaded efficiency histogram from %s (%p)", - cfgCentralityWeight.value.c_str(), (void *)mCentralityWeight); + LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgCentralityWeight.value.c_str(), (void*)mCentralityWeight); } correctionsLoaded = true; } - bool getEfficiencyCorrection(float &weight_nue, float eta, float pt, - float posZ) { + bool getEfficiencyCorrection(float& weight_nue, float eta, float pt, float posZ) + { float eff = 1.; if (mEfficiency) { int etaBin = mEfficiency->GetXaxis()->FindBin(eta); @@ -938,11 +627,11 @@ struct FlowDecorrelation { return true; } - bool getCentralityWeight(float &weightCent, const float centrality) { + bool getCentralityWeight(float& weightCent, const float centrality) + { float weight = 1.; if (mCentralityWeight) - weight = mCentralityWeight->GetBinContent( - mCentralityWeight->FindBin(centrality)); + weight = mCentralityWeight->GetBinContent(mCentralityWeight->FindBin(centrality)); else weight = 1.0; if (weight == 0) @@ -953,13 +642,11 @@ struct FlowDecorrelation { // fill multiple histograms template - void - fillYield(TCollision collision, - TTracks tracks) // function to fill the yield and etaphi histograms. + void fillYield(TCollision collision, TTracks tracks) // function to fill the yield and etaphi histograms. { float weff1 = 1; float vtxz = collision.posZ(); - for (auto const &track1 : tracks) { + for (auto const& track1 : tracks) { if (!trackSelected(track1)) continue; if (!getEfficiencyCorrection(weff1, track1.eta(), track1.pt(), vtxz)) @@ -973,8 +660,8 @@ struct FlowDecorrelation { } template - void getChannel(TFT0s const &ft0, std::size_t const &iCh, int &id, - float &l, int fitType) { + void getChannel(TFT0s const& ft0, std::size_t const& iCh, int& id, float& ampl, int fitType) + { if (fitType == kFT0C) { id = ft0.channelC()[iCh]; id = id + Ft0IndexA; @@ -994,19 +681,15 @@ struct FlowDecorrelation { } template - void getChannelFV0(TFT0s const &fv0, std::size_t const &iCh, int &id, - float &l) { + void getChannelFV0(TFT0s const& fv0, std::size_t const& iCh, int& id, float& ampl) + { id = fv0.channel()[iCh]; ampl = fv0.amplitude()[iCh]; registry.fill(HIST("FV0Amp"), id, ampl); } template - void fillCorrelationsTPCFIT( - TTracks tracks1, TFT0s const &ft0, float posZ, int system, int corType, - float cent, - float eventWeight) // function to fill the Output functions (sparse) and - // the delta eta and delta phi histograms + void fillCorrelationsTPCFIT(TTracks tracks1, TFT0s const& ft0, float posZ, int system, int corType, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms { if (system == SameEvent) { if (!cfgCentTableUnavailable) @@ -1018,23 +701,19 @@ struct FlowDecorrelation { float triggerWeight = 1.0f; // loop over all tracks - for (auto const &track1 : tracks1) { + for (auto const& track1 : tracks1) { if (!trackSelected(track1)) continue; - if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), - posZ)) + if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ)) continue; if (system == SameEvent) { if (corType == kFT0C) - registry.fill(HIST("Trig_hist_TPC_FT0C"), fSampleIndex, posZ, - track1.eta(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_FT0C"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight); else if (corType == kFT0A) - registry.fill(HIST("Trig_hist_TPC_FT0A"), fSampleIndex, posZ, - track1.eta(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_FT0A"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight); if (cfgDrawEtaPhiDis && corType == kFT0A) - registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), - eventWeight * triggerWeight); + registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), eventWeight * triggerWeight); } std::size_t channelSize = 0; @@ -1050,17 +729,11 @@ struct FlowDecorrelation { float ampl = 0.; getChannel(ft0, iCh, chanelid, ampl, corType); if (corType == kFT0C) { - if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && - chanelid <= kFT0CInnerRingMax)) || - (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && - chanelid <= kFT0COuterRingMax))) { + if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax))) { continue; } } else if (corType == kFT0A) { - if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && - chanelid <= kFT0AInnerRingMax)) || - (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && - chanelid <= kFT0AOuterRingMax))) { + if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && chanelid <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && chanelid <= kFT0AOuterRingMax))) { continue; } } @@ -1076,34 +749,22 @@ struct FlowDecorrelation { if (system == SameEvent) { if (corType == kFT0A) { registry.fill(HIST("Assoc_amp_same_TPC_FT0A"), chanelid, ampl); - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - eta, deltaPhi, deltaEta, - ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0A"), deltaPhi, - deltaEta, ampl * eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0A"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); } else if (corType == kFT0C) { registry.fill(HIST("Assoc_amp_same_TPC_FT0C"), chanelid, ampl); - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - eta, deltaPhi, deltaEta, - ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0C"), deltaPhi, - deltaEta, ampl * eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FT0C"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); } } else if (system == MixedEvent) { if (corType == kFT0A) { registry.fill(HIST("Assoc_amp_mixed_TPC_FT0A"), chanelid, ampl); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - eta, deltaPhi, deltaEta, - ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0A"), deltaPhi, - deltaEta, ampl * eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0A"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); } else if (corType == kFT0C) { registry.fill(HIST("Assoc_amp_mixed_TPC_FT0C"), chanelid, ampl); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - eta, deltaPhi, deltaEta, - ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0C"), deltaPhi, - deltaEta, ampl * eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FT0C"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); } } } @@ -1111,9 +772,8 @@ struct FlowDecorrelation { } template - void fillCorrelationsFT0AFT0C(TFT0s const &ft0Trig, TFT0s const &ft0Assoc, - float posZ, int multTrk, int system, float cent, - float eventWeight) { + void fillCorrelationsFT0AFT0C(TFT0s const& ft0Trig, TFT0s const& ft0Assoc, float posZ, int multTrk, int system, float cent, float eventWeight) + { if (system == SameEvent) { if (!cfgCentTableUnavailable) registry.fill(HIST("Centrality_used"), cent); @@ -1126,10 +786,7 @@ struct FlowDecorrelation { int channelIdA = 0; float amplA = 0.f; getChannel(ft0Trig, iChA, channelIdA, amplA, kFT0A); - if ((cfgRejectFT0AInside && (channelIdA >= kFT0AInnerRingMin && - channelIdA <= kFT0AInnerRingMax)) || - (cfgRejectFT0AOutside && (channelIdA >= kFT0AOuterRingMin && - channelIdA <= kFT0AOuterRingMax))) { + if ((cfgRejectFT0AInside && (channelIdA >= kFT0AInnerRingMin && channelIdA <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (channelIdA >= kFT0AOuterRingMin && channelIdA <= kFT0AOuterRingMax))) { continue; } @@ -1137,18 +794,14 @@ struct FlowDecorrelation { const double etaA = getEtaFT0(channelIdA, kFT0A); if (system == SameEvent) { - registry.fill(HIST("Trig_hist_FT0A_FT0C"), fSampleIndex, posZ, etaA, - eventWeight * amplA); + registry.fill(HIST("Trig_hist_FT0A_FT0C"), fSampleIndex, posZ, etaA, eventWeight * amplA); } for (std::size_t iChC = 0; iChC < ft0Assoc.channelC().size(); iChC++) { int channelIdC = 0; float amplC = 0.f; getChannel(ft0Assoc, iChC, channelIdC, amplC, kFT0C); - if ((cfgRejectFT0CInside && (channelIdC >= kFT0CInnerRingMin && - channelIdC <= kFT0CInnerRingMax)) || - (cfgRejectFT0COutside && (channelIdC >= kFT0COuterRingMin && - channelIdC <= kFT0COuterRingMax))) { + if ((cfgRejectFT0CInside && (channelIdC >= kFT0CInnerRingMin && channelIdC <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (channelIdC >= kFT0COuterRingMin && channelIdC <= kFT0COuterRingMax))) { continue; } @@ -1161,26 +814,19 @@ struct FlowDecorrelation { if (system == SameEvent) { registry.fill(HIST("Assoc_amp_same_FT0A_FT0C"), channelIdC, amplC); - same->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, - deltaPhi, deltaEta, pairWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_FT0A_FT0C"), deltaPhi, - deltaEta, pairWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, deltaPhi, deltaEta, pairWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_FT0A_FT0C"), deltaPhi, deltaEta, pairWeight); } else if (system == MixedEvent) { registry.fill(HIST("Assoc_amp_mixed_FT0A_FT0C"), channelIdC, amplC); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, - deltaPhi, deltaEta, pairWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_FT0A_FT0C"), deltaPhi, - deltaEta, pairWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, etaA, etaC, deltaPhi, deltaEta, pairWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_FT0A_FT0C"), deltaPhi, deltaEta, pairWeight); } } } } template - void fillCorrelationsTPCFV0( - TTracks tracks1, TFT0s const &fv0, float posZ, int system, float cent, - float eventWeight) // function to fill the Output functions (sparse) and - // the delta eta and delta phi histograms + void fillCorrelationsTPCFV0(TTracks tracks1, TFT0s const& fv0, float posZ, int system, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms { if (system == SameEvent) { if (!cfgCentTableUnavailable) @@ -1192,16 +838,14 @@ struct FlowDecorrelation { float triggerWeight = 1.0f; // loop over all tracks - for (auto const &track1 : tracks1) { + for (auto const& track1 : tracks1) { if (!trackSelected(track1)) continue; - if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), - posZ)) + if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ)) continue; if (system == SameEvent) { - registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, - track1.eta(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_FV0"), fSampleIndex, posZ, track1.eta(), eventWeight * triggerWeight); } std::size_t channelSize = 0; @@ -1223,97 +867,78 @@ struct FlowDecorrelation { // fill the right sparse and histograms if (system == SameEvent) { registry.fill(HIST("Assoc_amp_same_TPC_FV0"), chanelid, ampl); - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, - deltaPhi, deltaEta, - ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FV0"), deltaPhi, - deltaEta, ampl * eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_FV0"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); } else if (system == MixedEvent) { registry.fill(HIST("Assoc_amp_mixed_TPC_FV0"), chanelid, ampl); - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - eta, deltaPhi, deltaEta, - ampl * eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FV0"), deltaPhi, - deltaEta, ampl * eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), eta, deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_FV0"), deltaPhi, deltaEta, ampl * eventWeight * triggerWeight); } } } } template - bool eventSelected(TCollision collision, const int multTrk, - const float centrality, const bool fillCounter) { + bool eventSelected(TCollision collision, const int multTrk, const float centrality, const bool fillCounter) + { registry.fill(HIST("hEventCountSpecific"), 0.5); - if (cfgEvSelkNoSameBunchPileup && - !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { - // rejects collisions which are associated with the same "found-by-T0" - // bunch crossing + if (cfgEvSelkNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + // rejects collisions which are associated with the same "found-by-T0" bunch crossing // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof return 0; } if (fillCounter && cfgEvSelkNoSameBunchPileup) registry.fill(HIST("hEventCountSpecific"), 1.5); - if (cfgEvSelkNoITSROFrameBorder && - !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (cfgEvSelkNoITSROFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { return 0; } if (fillCounter && cfgEvSelkNoITSROFrameBorder) registry.fill(HIST("hEventCountSpecific"), 2.5); - if (cfgEvSelkNoTimeFrameBorder && - !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (cfgEvSelkNoTimeFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { return 0; } if (fillCounter && cfgEvSelkNoTimeFrameBorder) registry.fill(HIST("hEventCountSpecific"), 3.5); - if (cfgEvSelkIsGoodZvtxFT0vsPV && - !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { - // removes collisions with large differences between z of PV by tracks and - // z of PV from FT0 A-C time difference use this cut at low multiplicities - // with caution + if (cfgEvSelkIsGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + // removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference + // use this cut at low multiplicities with caution return 0; } if (fillCounter && cfgEvSelkIsGoodZvtxFT0vsPV) registry.fill(HIST("hEventCountSpecific"), 4.5); - if (cfgEvSelkNoCollInTimeRangeStandard && - !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (cfgEvSelkNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { // no collisions in specified time range return 0; } if (fillCounter && cfgEvSelkNoCollInTimeRangeStandard) registry.fill(HIST("hEventCountSpecific"), 5.5); - if (cfgEvSelkIsGoodITSLayersAll && - !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (cfgEvSelkIsGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { // from Jan 9 2025 AOT meeting // cut time intervals with dead ITS staves return 0; } if (fillCounter && cfgEvSelkIsGoodITSLayersAll) registry.fill(HIST("hEventCountSpecific"), 6.5); - if (cfgEvSelkIsGoodITSLayer0123 && - !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (cfgEvSelkIsGoodITSLayer0123 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { // for pp: cut time intervals with dead ITS staves on layers 0-3 only return 0; } if (fillCounter && cfgEvSelkIsGoodITSLayer0123) registry.fill(HIST("hEventCountSpecific"), 7.5); - if (cfgEvSelkNoCollInRofStandard && - !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { - // no other collisions in this Readout Frame with per-collision - // multiplicity above threshold + if (cfgEvSelkNoCollInRofStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + // no other collisions in this Readout Frame with per-collision multiplicity above threshold return 0; } if (fillCounter && cfgEvSelkNoCollInRofStandard) registry.fill(HIST("hEventCountSpecific"), 8.5); - if (cfgEvSelkNoHighMultCollInPrevRof && - !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (cfgEvSelkNoHighMultCollInPrevRof && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { // veto an event if FT0C amplitude in previous ITS ROF is above threshold return 0; } if (fillCounter && cfgEvSelkNoHighMultCollInPrevRof) registry.fill(HIST("hEventCountSpecific"), 9.5); auto occupancy = collision.trackOccupancyInTimeRange(); - if (cfgEvSelOccupancy && - (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) + if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) return 0; if (fillCounter && cfgEvSelOccupancy) registry.fill(HIST("hEventCountSpecific"), 10.5); @@ -1339,11 +964,9 @@ struct FlowDecorrelation { return 0; } if (cfgFuncParas.cfgMultMultV0ACutEnabled) { - if (collision.multFV0A() < - cfgFuncParas.fMultMultV0ACutLow->Eval(multTrk)) + if (collision.multFV0A() < cfgFuncParas.fMultMultV0ACutLow->Eval(multTrk)) return 0; - if (collision.multFV0A() > - cfgFuncParas.fMultMultV0ACutHigh->Eval(multTrk)) + if (collision.multFV0A() > cfgFuncParas.fMultMultV0ACutHigh->Eval(multTrk)) return 0; } } @@ -1352,10 +975,7 @@ struct FlowDecorrelation { // V0A T0A 5 sigma cut float sigma = 5.0; - if (cfgEvSelV0AT0ACut && - (std::fabs(collision.multFV0A() - - cfgFuncParas.fT0AV0AMean->Eval(collision.multFT0A())) > - sigma * cfgFuncParas.fT0AV0ASigma->Eval(collision.multFT0A()))) + if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - cfgFuncParas.fT0AV0AMean->Eval(collision.multFT0A())) > sigma * cfgFuncParas.fT0AV0ASigma->Eval(collision.multFT0A()))) return 0; if (fillCounter && cfgEvSelV0AT0ACut) registry.fill(HIST("hEventCountSpecific"), 12.5); @@ -1363,9 +983,8 @@ struct FlowDecorrelation { return 1; } - void processSameTpcFt0a(FilteredCollisions::iterator const &collision, - FilteredTracks const &tracks, aod::FT0s const &, - aod::BCsWithTimestamps const &) { + void processSameTpcFt0a(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) + { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1374,8 +993,7 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFT0()) return; @@ -1390,66 +1008,47 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && - (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), - SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto &ft0 = collision.foundFT0(); - fillCorrelationsTPCFIT( - tracks, ft0, collision.posZ(), SameEvent, kFT0A, cent, weightCent); + const auto& ft0 = collision.foundFT0(); + fillCorrelationsTPCFIT(tracks, ft0, collision.posZ(), SameEvent, kFT0A, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0a, - "Process same event for TPC-FT0 correlation", true); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0a, "Process same event for TPC-FT0 correlation", true); // the process for filling the mixed events - void processMixedTpcFt0a(FilteredCollisions const &collisions, - FilteredTracks const &tracks, aod::FT0s const &, - aod::BCsWithTimestamps const &) { - - auto getTracksSize = [&tracks, - this](FilteredCollisions::iterator const &collision) { - auto associatedTracks = tracks.sliceByCached( - o2::aod::track::collisionId, collision.globalIndex(), this->cache); + void processMixedTpcFt0a(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) + { + + auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { + auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = - FlexibleBinningPolicy, - aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{ - {getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair - pairs{binningOnVtxAndMult, - cfgMixEventNumMin, - -1, - collisions, - tracksTuple, - &cache}; // -1 is the number of the bin to skip + Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto &[collision1, tracks1, collision2, tracks2] = *it; + auto& [collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && - (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && - (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1458,26 +1057,21 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && - !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFT0() && collision2.has_foundFT0())) continue; - registry.fill(HIST("eventcount"), - MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin auto bc = collision1.bc_as(); loadAlignParam(bc.timestamp()); loadCorrection(bc.timestamp()); @@ -1488,18 +1082,14 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto &ft0 = collision2.foundFT0(); - fillCorrelationsTPCFIT( - tracks1, ft0, collision1.posZ(), MixedEvent, kFT0A, cent1, - eventWeight * weightCent); + const auto& ft0 = collision2.foundFT0(); + fillCorrelationsTPCFIT(tracks1, ft0, collision1.posZ(), MixedEvent, kFT0A, cent1, eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0a, - "Process mixed events for TPC-FT0A correlation", true); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0a, "Process mixed events for TPC-FT0A correlation", true); - void processSameTpcFt0c(FilteredCollisions::iterator const &collision, - FilteredTracks const &tracks, aod::FT0s const &, - aod::BCsWithTimestamps const &) { + void processSameTpcFt0c(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) + { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1508,8 +1098,7 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFT0()) return; @@ -1524,66 +1113,47 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && - (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), - SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto &ft0 = collision.foundFT0(); - fillCorrelationsTPCFIT( - tracks, ft0, collision.posZ(), SameEvent, kFT0C, cent, weightCent); + const auto& ft0 = collision.foundFT0(); + fillCorrelationsTPCFIT(tracks, ft0, collision.posZ(), SameEvent, kFT0C, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0c, - "Process same event for TPC-FT0C correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcFt0c, "Process same event for TPC-FT0C correlation", false); // the process for filling the mixed events - void processMixedTpcFt0c(FilteredCollisions const &collisions, - FilteredTracks const &tracks, aod::FT0s const &, - aod::BCsWithTimestamps const &) { - - auto getTracksSize = [&tracks, - this](FilteredCollisions::iterator const &collision) { - auto associatedTracks = tracks.sliceByCached( - o2::aod::track::collisionId, collision.globalIndex(), this->cache); + void processMixedTpcFt0c(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) + { + + auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { + auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = - FlexibleBinningPolicy, - aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{ - {getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair - pairs{binningOnVtxAndMult, - cfgMixEventNumMin, - -1, - collisions, - tracksTuple, - &cache}; // -1 is the number of the bin to skip + Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto &[collision1, tracks1, collision2, tracks2] = *it; + auto& [collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && - (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && - (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1592,26 +1162,21 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && - !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFT0() && collision2.has_foundFT0())) continue; - registry.fill(HIST("eventcount"), - MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin auto bc = collision1.bc_as(); loadAlignParam(bc.timestamp()); loadCorrection(bc.timestamp()); @@ -1622,18 +1187,14 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto &ft0 = collision2.foundFT0(); - fillCorrelationsTPCFIT( - tracks1, ft0, collision1.posZ(), MixedEvent, kFT0C, cent1, - eventWeight * weightCent); + const auto& ft0 = collision2.foundFT0(); + fillCorrelationsTPCFIT(tracks1, ft0, collision1.posZ(), MixedEvent, kFT0C, cent1, eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0c, - "Process mixed events for TPC-FT0C correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFt0c, "Process mixed events for TPC-FT0C correlation", false); - void processSameFt0aFt0c(FilteredCollisions::iterator const &collision, - FilteredTracks const &tracks, aod::FT0s const &, - aod::BCsWithTimestamps const &) { + void processSameFt0aFt0c(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) + { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1642,8 +1203,7 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFT0()) return; @@ -1658,58 +1218,44 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && - (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } registry.fill(HIST("eventcount"), SameEvent); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto &ft0 = collision.foundFT0(); - fillCorrelationsFT0AFT0C( - ft0, ft0, collision.posZ(), tracks.size(), SameEvent, cent, weightCent); + const auto& ft0 = collision.foundFT0(); + fillCorrelationsFT0AFT0C(ft0, ft0, collision.posZ(), tracks.size(), SameEvent, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameFt0aFt0c, - "Process same event for FT0A-FT0C correlation", false); - - void processMixedFt0aFt0c(FilteredCollisions const &collisions, - FilteredTracks const &tracks, aod::FT0s const &, - aod::BCsWithTimestamps const &) { - auto getTracksSize = [&tracks, - this](FilteredCollisions::iterator const &collision) { - auto associatedTracks = tracks.sliceByCached( - o2::aod::track::collisionId, collision.globalIndex(), this->cache); + PROCESS_SWITCH(FlowDecorrelation, processSameFt0aFt0c, "Process same event for FT0A-FT0C correlation", false); + + void processMixedFt0aFt0c(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FT0s const&, aod::BCsWithTimestamps const&) + { + auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { + auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = - FlexibleBinningPolicy, - aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{ - {getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair - pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, - collisions, tracksTuple, &cache}; + Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto &[collision1, tracks1, collision2, tracks2] = *it; + auto& [collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && - (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && - (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1718,19 +1264,15 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && - !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFT0() && collision2.has_foundFT0())) @@ -1748,22 +1290,15 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto &ft0Trig = collision1.foundFT0(); - const auto &ft0Assoc = collision2.foundFT0(); - fillCorrelationsFT0AFT0C( - ft0Trig, ft0Assoc, collision1.posZ(), tracks1.size(), MixedEvent, - cent1, eventWeight * weightCent); + const auto& ft0Trig = collision1.foundFT0(); + const auto& ft0Assoc = collision2.foundFT0(); + fillCorrelationsFT0AFT0C(ft0Trig, ft0Assoc, collision1.posZ(), tracks1.size(), MixedEvent, cent1, eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedFt0aFt0c, - "Process mixed events for FT0A-FT0C correlation", false); - - template - void fillCorrelationsTPCMFT( - TTracks tracks1, TTracksAssoc tracks2, float posZ, int system, float cent, - float eventWeight) // function to fill the Output functions (sparse) and - // the delta eta and delta phi histograms + PROCESS_SWITCH(FlowDecorrelation, processMixedFt0aFt0c, "Process mixed events for FT0A-FT0C correlation", false); + + template + void fillCorrelationsTPCMFT(TTracks tracks1, TTracksAssoc tracks2, float posZ, int system, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms { if (system == SameEvent) { if (!cfgCentTableUnavailable) @@ -1775,49 +1310,38 @@ struct FlowDecorrelation { float triggerWeight = 1.0f; // loop over all tracks - for (auto const &track1 : tracks1) { + for (auto const& track1 : tracks1) { if (!trackSelected(track1)) continue; - if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), - posZ)) + if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ)) continue; if (system == SameEvent) { - registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, - track1.pt(), eventWeight * triggerWeight); + registry.fill(HIST("Trig_hist_TPC_MFT"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight); } - for (auto const &track2 : tracks2) { + for (auto const& track2 : tracks2) { if (!isAcceptedMftTrack(track2)) continue; - float deltaPhi = - RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); + float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi(), -PIHalf); float deltaEta = track1.eta() - track2.eta(); if (system == SameEvent) { - same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - track2.eta(), deltaPhi, deltaEta, - eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_same_TPC_MFT"), deltaPhi, - deltaEta, eventWeight * triggerWeight); + same->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), track2.eta(), deltaPhi, deltaEta, eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_same_TPC_MFT"), deltaPhi, deltaEta, eventWeight * triggerWeight); } else if (system == MixedEvent) { - mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), - track2.eta(), deltaPhi, deltaEta, - eventWeight * triggerWeight); - registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_MFT"), deltaPhi, - deltaEta, eventWeight * triggerWeight); + mixed->getPairHist()->Fill(step, fSampleIndex, posZ, track1.eta(), track2.eta(), deltaPhi, deltaEta, eventWeight * triggerWeight); + registry.fill(HIST("deltaEta_deltaPhi_mixed_TPC_MFT"), deltaPhi, deltaEta, eventWeight * triggerWeight); } } } } - void processSameTpcMft(FilteredCollisions::iterator const &collision, - FilteredTracks const &tracks, - aod::MFTTracks const &mfts, - aod::BCsWithTimestamps const &) { + void processSameTpcMft(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::MFTTracks const& mfts, aod::BCsWithTimestamps const&) + { float cent = -1.; float weightCent = 1.0f; if (!cfgCentTableUnavailable) { @@ -1826,8 +1350,7 @@ struct FlowDecorrelation { if (!collision.sel8()) return; - if (cfgUseAdditionalEventCut && - !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) return; auto bc = collision.bc_as(); @@ -1845,65 +1368,45 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && - (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), - SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); - fillCorrelationsTPCMFT( - tracks, mfts, collision.posZ(), SameEvent, cent, weightCent); + fillCorrelationsTPCMFT(tracks, mfts, collision.posZ(), SameEvent, cent, weightCent); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcMft, - "Process same events for TPC-MFT correlation", false); - - void processMixedTpcMft(FilteredCollisions const &collisions, - FilteredTracks const &tracks, - aod::MFTTracks const &MFTtracks, - aod::BCsWithTimestamps const &) { - auto getTracksSize = [&tracks, - this](FilteredCollisions::iterator const &collision) { - auto associatedTracks = tracks.sliceByCached( - o2::aod::track::collisionId, collision.globalIndex(), this->cache); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcMft, "Process same events for TPC-MFT correlation", false); + + void processMixedTpcMft(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::MFTTracks const& MFTtracks, aod::BCsWithTimestamps const&) + { + auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { + auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = - FlexibleBinningPolicy, - aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{ - {getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair - pairs{binningOnVtxAndMult, - cfgMixEventNumMin, - -1, - collisions, - tracksTuple, - &cache}; // -1 is the number of the bin to skip + Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto &[collision1, tracks1, collision2, tracks2] = *it; + auto& [collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && - (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && - (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -1917,18 +1420,14 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && - !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; registry.fill(HIST("eventcount"), MixedEvent); @@ -1947,20 +1446,15 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - auto mftTracks2 = MFTtracks.sliceByCached( - o2::aod::fwdtrack::collisionId, collision2.globalIndex(), cache); + auto mftTracks2 = MFTtracks.sliceByCached(o2::aod::fwdtrack::collisionId, collision2.globalIndex(), cache); - fillCorrelationsTPCMFT( - tracks1, mftTracks2, collision1.posZ(), MixedEvent, 10., - eventWeight * weightCent); + fillCorrelationsTPCMFT(tracks1, mftTracks2, collision1.posZ(), MixedEvent, 10., eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcMft, - "Process same events for TPC-MFT correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcMft, "Process same events for TPC-MFT correlation", false); - void processSameTpcFv0(FilteredCollisions::iterator const &collision, - FilteredTracks const &tracks, aod::FV0As const &, - aod::BCsWithTimestamps const &) { + void processSameTpcFv0(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks, aod::FV0As const&, aod::BCsWithTimestamps const&) + { if (!collision.sel8()) return; auto bc = collision.bc_as(); @@ -1969,8 +1463,7 @@ struct FlowDecorrelation { if (!cfgCentTableUnavailable) { cent = getCentrality(collision); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision, tracks.size(), cent, true)) + if (cfgUseAdditionalEventCut && !eventSelected(collision, tracks.size(), cent, true)) return; if (!collision.has_foundFV0()) return; @@ -1986,66 +1479,47 @@ struct FlowDecorrelation { registry.fill(HIST("Nch"), tracks.size()); registry.fill(HIST("zVtx"), collision.posZ()); - if (cfgSelCollByNch && - (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { + if (cfgSelCollByNch && (tracks.size() < cfgCutMultMin || tracks.size() >= cfgCutMultMax)) { return; } - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) { return; } - registry.fill(HIST("eventcount"), - SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin fillYield(collision, tracks); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); same->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed); - const auto &fv0 = collision.foundFV0(); - fillCorrelationsTPCFV0( - tracks, fv0, collision.posZ(), SameEvent, cent, weightCent); + const auto& fv0 = collision.foundFV0(); + fillCorrelationsTPCFV0(tracks, fv0, collision.posZ(), SameEvent, cent, weightCent); } - PROCESS_SWITCH(FlowDecorrelation, processSameTpcFv0, - "Process same events for TPC-FV0 correlation", false); - - void processMixedTpcFv0(FilteredCollisions const &collisions, - FilteredTracks const &tracks, aod::FV0As const &, - aod::BCsWithTimestamps const &) { - auto getTracksSize = [&tracks, - this](FilteredCollisions::iterator const &collision) { - auto associatedTracks = tracks.sliceByCached( - o2::aod::track::collisionId, collision.globalIndex(), this->cache); + PROCESS_SWITCH(FlowDecorrelation, processSameTpcFv0, "Process same events for TPC-FV0 correlation", false); + + void processMixedTpcFv0(FilteredCollisions const& collisions, FilteredTracks const& tracks, aod::FV0As const&, aod::BCsWithTimestamps const&) + { + auto getTracksSize = [&tracks, this](FilteredCollisions::iterator const& collision) { + auto associatedTracks = tracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), this->cache); auto mult = associatedTracks.size(); return mult; }; - using MixedBinning = - FlexibleBinningPolicy, - aod::collision::PosZ, decltype(getTracksSize)>; + using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, decltype(getTracksSize)>; - MixedBinning binningOnVtxAndMult{ - {getTracksSize}, {axisVtxMix, axisMultMix}, true}; + MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxMix, axisMultMix}, true}; auto tracksTuple = std::make_tuple(tracks, tracks); - Pair - pairs{binningOnVtxAndMult, - cfgMixEventNumMin, - -1, - collisions, - tracksTuple, - &cache}; // -1 is the number of the bin to skip + Pair pairs{binningOnVtxAndMult, cfgMixEventNumMin, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip for (auto it = pairs.begin(); it != pairs.end(); it++) { - auto &[collision1, tracks1, collision2, tracks2] = *it; + auto& [collision1, tracks1, collision2, tracks2] = *it; if (!collision1.sel8() || !collision2.sel8()) continue; - if (cfgSelCollByNch && - (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks1.size() < cfgCutMultMin || tracks1.size() >= cfgCutMultMax)) continue; - if (cfgSelCollByNch && - (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) + if (cfgSelCollByNch && (tracks2.size() < cfgCutMultMin || tracks2.size() >= cfgCutMultMax)) continue; float cent1 = -1; @@ -2054,26 +1528,21 @@ struct FlowDecorrelation { cent1 = getCentrality(collision1); cent2 = getCentrality(collision2); } - if (cfgUseAdditionalEventCut && - !eventSelected(collision1, tracks1.size(), cent1, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision1, tracks1.size(), cent1, false)) continue; - if (cfgUseAdditionalEventCut && - !eventSelected(collision2, tracks2.size(), cent2, false)) + if (cfgUseAdditionalEventCut && !eventSelected(collision2, tracks2.size(), cent2, false)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent1 < cfgCutCentMin || cent1 >= cfgCutCentMax)) continue; - if (!cfgSelCollByNch && !cfgCentTableUnavailable && - (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) + if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent2 < cfgCutCentMin || cent2 >= cfgCutCentMax)) continue; if (!(collision1.has_foundFV0() && collision2.has_foundFV0())) continue; - registry.fill(HIST("eventcount"), - MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin auto bc = collision1.bc_as(); loadAlignParam(bc.timestamp()); loadCorrection(bc.timestamp()); @@ -2084,18 +1553,16 @@ struct FlowDecorrelation { float weightCent = 1.0f; if (!cfgCentTableUnavailable) getCentralityWeight(weightCent, cent1); - const auto &fv0 = collision2.foundFV0(); - fillCorrelationsTPCFV0( - tracks1, fv0, collision1.posZ(), MixedEvent, cent1, - eventWeight * weightCent); + const auto& fv0 = collision2.foundFV0(); + fillCorrelationsTPCFV0(tracks1, fv0, collision1.posZ(), MixedEvent, cent1, eventWeight * weightCent); } } - PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFv0, - "Process mixed events for TPC-FV0 correlation", false); + PROCESS_SWITCH(FlowDecorrelation, processMixedTpcFv0, "Process mixed events for TPC-FV0 correlation", false); }; -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ return WorkflowSpec{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; }