diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index 4b0cc17e487..3de478cddbf 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -11,13 +11,14 @@ /// \file flowCorrelationsUpc.cxx /// \brief Provides a sparse with usefull two particle correlation info -/// \author Mingrui Zhao (mingrui.zhao@cern.ch, mingrui.zhao@mail.labz0.org) +/// \author Yongxi Du (yongxi.du@cern.ch), Mingrui Zhao (mingrui.zhao@cern.ch, mingrui.zhao@mail.labz0.org) /// copied from Thor Jensen (thor.kjaersgaard.jensen@cern.ch) and Debojit Sarkar (debojit.sarkar@cern.ch) #include "PWGCF/Core/CorrelationContainer.h" #include "PWGCF/Core/PairCuts.h" #include "PWGCF/DataModel/CorrelationsDerived.h" #include "PWGUD/Core/SGSelector.h" +#include "PWGUD/DataModel/SGTables.h" #include "PWGUD/DataModel/UDTables.h" #include "Common/Core/RecoDecay.h" @@ -94,7 +95,8 @@ struct CalcNchUpc { struct FlowCorrelationsUpc { O2_DEFINE_CONFIGURABLE(cfgZVtxCut, float, 10.0f, "Accepted z-vertex range") - O2_DEFINE_CONFIGURABLE(cfgPtCutMin, float, 0.2f, "minimum accepted track pT") + O2_DEFINE_CONFIGURABLE(cfgIfVertex, bool, false, "choose vertex or not") + O2_DEFINE_CONFIGURABLE(cfgPtCutMin, float, 0.1f, "minimum accepted track pT") O2_DEFINE_CONFIGURABLE(cfgPtCutMax, float, 10.0f, "maximum accepted track pT") O2_DEFINE_CONFIGURABLE(cfgEtaCut, float, 0.8f, "Eta cut") O2_DEFINE_CONFIGURABLE(cfgMinMixEventNum, int, 5, "Minimum number of events to mix") @@ -106,6 +108,17 @@ struct FlowCorrelationsUpc { O2_DEFINE_CONFIGURABLE(cfgCutMerging, float, 0.02, "Merging cut on track merge") O2_DEFINE_CONFIGURABLE(cfgRadiusLow, float, 0.8, "Low radius for merging cut") O2_DEFINE_CONFIGURABLE(cfgRadiusHigh, float, 2.5, "High radius for merging cut") + O2_DEFINE_CONFIGURABLE(cfgIsGoodItsLayers, bool, false, "whether choose itslayers") + O2_DEFINE_CONFIGURABLE(cfgGapSideA, bool, true, "choose gapside A") + O2_DEFINE_CONFIGURABLE(cfgGapSideC, bool, false, "choose gapside C") + O2_DEFINE_CONFIGURABLE(cfgDcaxy, bool, true, "choose dcaxy") + O2_DEFINE_CONFIGURABLE(cfgDcaz, bool, false, "choose dcaz") + O2_DEFINE_CONFIGURABLE(cfgDcazCut, float, 10.0, "dcaz cut") + O2_DEFINE_CONFIGURABLE(cfgItsClusterSize, unsigned int, 5, "ITS cluster size") + O2_DEFINE_CONFIGURABLE(cfgMaxTPCChi2NCl, int, 4, "tpcchi2") + O2_DEFINE_CONFIGURABLE(cfgEvSelOccupancy, bool, true, "Occupancy cut") + O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 1000, "High cut on TPC occupancy") + O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy") ConfigurableAxis axisVertex{"axisVertex", {10, -10, 10}, "vertex axis for histograms"}; ConfigurableAxis axisEta{"axisEta", {40, -1., 1.}, "eta axis for histograms"}; @@ -130,7 +143,6 @@ struct FlowCorrelationsUpc { Configurable cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"}; Configurable cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"}; Configurable cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"}; - Configurable cfgGapSideSelection{"cfgGapSideSelection", 2, "gap selection"}; // make the filters and cuts. // Filter collisionFilter = (nabs(aod::collision::posZ) < cfgZVtxCut) && (aod::flowcorrupc::multiplicity) > cfgMinMult && (aod::flowcorrupc::multiplicity) < cfgMaxMult && (aod::evsel::sel8) == true; @@ -212,29 +224,29 @@ struct FlowCorrelationsUpc { template bool trackSelected(TTrack track) { + registry.fill(HIST("hTrackCount"), 0.5); // UPC selection if (!track.isPVContributor()) { return false; } - constexpr float kDcazCut = 2.0; - if (!(std::fabs(track.dcaZ()) < kDcazCut)) { + registry.fill(HIST("hTrackCount"), 1.5); + if (cfgDcaz && !(std::fabs(track.dcaZ()) < cfgDcazCut)) { return false; } + registry.fill(HIST("hTrackCount"), 2.5); double dcaLimit = 0.0105 + 0.035 / std::pow(track.pt(), 1.1); - if (!(std::fabs(track.dcaXY()) < dcaLimit)) { + if (cfgDcaxy && !(std::fabs(track.dcaXY()) < dcaLimit)) { return false; } - constexpr int kMinITSClusters = 5; - constexpr int kMaxTPCChi2NCl = 4; - - if (track.itsClusterSizes() <= kMinITSClusters) { + registry.fill(HIST("hTrackCount"), 3.5); + if (track.itsClusterSizes() <= cfgItsClusterSize) { return false; } - if (track.tpcChi2NCl() >= kMaxTPCChi2NCl) { + registry.fill(HIST("hTrackCount"), 4.5); + if (track.tpcChi2NCl() >= cfgMaxTPCChi2NCl) { return false; } - if (track.pt() < cfgPtCutMin || track.pt() > cfgPtCutMax) - return false; + registry.fill(HIST("hTrackCount"), 5.5); return true; } @@ -324,23 +336,47 @@ struct FlowCorrelationsUpc { if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) { return; } - if (collision.trs() == 0) { + if (cfgIsGoodItsLayers && collision.trs() == 0) { return; } int gapSide = collision.gapSide(); - const int minGapSide = 0; - const int maxGapSide = 2; - if (gapSide > minGapSide && gapSide < maxGapSide) { + if (gapSide == 0) { + if (!cfgGapSideA) { + return; + } + } + if (gapSide == 1) { + if (!cfgGapSideC) { + return; + } + } + if (gapSide != 0 && gapSide != 1) { return; } - int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); gapSide = trueGapSide; - if (gapSide == cfgGapSideSelection) { + if (gapSide == 0) { + if (!cfgGapSideA) { + return; + } + } + if (gapSide == 1) { + if (!cfgGapSideC) { + return; + } + } + if (gapSide != 0 && gapSide != 1) { + return; + } + float vtxz = collision.posZ(); + if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) { + return; + } + int occupancy = collision.occupancyInTime(); + if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { return; } - int runIndex = collision.runNumber(); registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin @@ -365,29 +401,66 @@ struct FlowCorrelationsUpc { if (tracks1.size() < cfgMinMult || tracks1.size() > cfgMaxMult || tracks2.size() < cfgMinMult || tracks2.size() > cfgMaxMult) { continue; } - if (collision1.trs() == 0 || collision2.trs() == 0) { + if (cfgIsGoodItsLayers && (collision1.trs() == 0 || collision2.trs() == 0)) { continue; } - const int minGapSide = 0; - const int maxGapSide = 2; - if (collision1.gapSide() > minGapSide && collision1.gapSide() < maxGapSide) { - continue; + int gapSide1 = collision1.gapSide(); + if (gapSide1 == 0) { + if (!cfgGapSideA) { + continue; + } } - if (collision2.gapSide() > minGapSide && collision2.gapSide() < maxGapSide) { - continue; + if (gapSide1 == 1) { + if (!cfgGapSideC) { + continue; + } } - - int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); - int gapSide = trueGapSide; - if (gapSide == cfgGapSideSelection) { + int gapSide2 = collision2.gapSide(); + if (gapSide2 == 0) { + if (!cfgGapSideA) { + continue; + } + } + if (gapSide2 == 1) { + if (!cfgGapSideC) { + continue; + } + } + int trueGapSide1 = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int trueGapSide2 = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + if (trueGapSide1 != trueGapSide2) { continue; } - trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); - gapSide = trueGapSide; - if (gapSide == cfgGapSideSelection) { + if (trueGapSide1 == 0) { + if (!cfgGapSideA) { + continue; + } + } + if (trueGapSide2 == 1) { + if (!cfgGapSideC) { + continue; + } + } + if ((gapSide1 != 0 && gapSide1 != 1) || (gapSide2 != 0 && gapSide2 != 1)) { continue; } + float vtxz = collision1.posZ(); + if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) { + return; + } + int occupancy = collision1.occupancyInTime(); + if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { + return; + } + vtxz = collision2.posZ(); + if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) { + return; + } + occupancy = collision2.occupancyInTime(); + if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { + return; + } registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin fillCorrelations(tracks1, tracks2, collision1.posZ(), MixedEvent, collision1.runNumber()); // fill the ME histogram and Sparse } diff --git a/PWGUD/Tasks/flowCumulantsUpc.cxx b/PWGUD/Tasks/flowCumulantsUpc.cxx index 8ede8d2d136..98006bbde6a 100644 --- a/PWGUD/Tasks/flowCumulantsUpc.cxx +++ b/PWGUD/Tasks/flowCumulantsUpc.cxx @@ -10,7 +10,7 @@ // or submit itself to any jurisdiction. /// \file flowCumulantsUpc.cxx -/// \author Mingrui Zhao (mingrui.zhao@mail.labz0.org, mingrui.zhao@cern.ch) +/// \author Yongxi Du (yongxi.du@cern.ch), Mingrui Zhao (mingrui.zhao@mail.labz0.org, mingrui.zhao@cern.ch) /// \since Mar/2025 /// \brief jira: , task to measure flow observables with cumulant method @@ -21,6 +21,7 @@ #include "GFWWeights.h" #include "PWGUD/Core/SGSelector.h" +#include "PWGUD/DataModel/SGTables.h" #include "PWGUD/DataModel/UDTables.h" #include "Common/CCDB/ctpRateFetcher.h" @@ -62,14 +63,15 @@ using namespace o2::framework::expressions; struct FlowCumulantsUpc { O2_DEFINE_CONFIGURABLE(cfgCutVertex, float, 10.0f, "Accepted z-vertex range") + O2_DEFINE_CONFIGURABLE(cfgIfVertex, bool, false, "choose vertex or not") O2_DEFINE_CONFIGURABLE(cfgCentEstimator, int, 0, "0:FT0C; 1:FT0CVariant1; 2:FT0M; 3:FT0A") O2_DEFINE_CONFIGURABLE(cfgCentFT0CMin, float, 0.0f, "Minimum centrality (FT0C) to cut events in filter") O2_DEFINE_CONFIGURABLE(cfgCentFT0CMax, float, 100.0f, "Maximum centrality (FT0C) to cut events in filter") - O2_DEFINE_CONFIGURABLE(cfgCutPtPOIMin, float, 0.2f, "Minimal pT for poi tracks") + O2_DEFINE_CONFIGURABLE(cfgCutPtPOIMin, float, 0.1f, "Minimal pT for poi tracks") O2_DEFINE_CONFIGURABLE(cfgCutPtPOIMax, float, 10.0f, "Maximal pT for poi tracks") - O2_DEFINE_CONFIGURABLE(cfgCutPtRefMin, float, 0.2f, "Minimal pT for ref tracks") + O2_DEFINE_CONFIGURABLE(cfgCutPtRefMin, float, 0.1f, "Minimal pT for ref tracks") O2_DEFINE_CONFIGURABLE(cfgCutPtRefMax, float, 3.0f, "Maximal pT for ref tracks") - O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.2f, "Minimal pT for all tracks") + O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.1f, "Minimal pT for all tracks") O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "Maximal pT for all tracks") O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks") O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5f, "max chi2 per TPC clusters") @@ -77,22 +79,22 @@ struct FlowCumulantsUpc { 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(cfgCutDCAxyppPass3Enabled, bool, false, "switch of ppPass3 DCAxy pt dependent cut") - O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut") - O2_DEFINE_CONFIGURABLE(cfgTrkSelSwitch, bool, false, "switch for self-defined track selection") - O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") - O2_DEFINE_CONFIGURABLE(cfgUseTentativeEventCounter, bool, false, "After sel8(), count events regardless of real event selection") - O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing") - 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(cfgEvSelV0AT0ACut, bool, true, "V0A T0A 5 sigma cut") - O2_DEFINE_CONFIGURABLE(cfgGetInteractionRate, bool, false, "Get interaction rate from CCDB") - O2_DEFINE_CONFIGURABLE(cfgUseInteractionRateCut, bool, false, "Use events with low interaction rate") - O2_DEFINE_CONFIGURABLE(cfgCutMaxIR, float, 50.0f, "maximum interaction rate (kHz)") - O2_DEFINE_CONFIGURABLE(cfgCutMinIR, float, 0.0f, "minimum interaction rate (kHz)") + // O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut") + // O2_DEFINE_CONFIGURABLE(cfgTrkSelSwitch, bool, false, "switch for self-defined track selection") + // O2_DEFINE_CONFIGURABLE(cfgUseAdditionalEventCut, bool, false, "Use additional event cut on mult correlations") + // O2_DEFINE_CONFIGURABLE(cfgUseTentativeEventCounter, bool, false, "After sel8(), count events regardless of real event selection") + // O2_DEFINE_CONFIGURABLE(cfgEvSelkNoSameBunchPileup, bool, false, "rejects collisions which are associated with the same found-by-T0 bunch crossing") + // 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(cfgEvSelV0AT0ACut, bool, true, "V0A T0A 5 sigma cut") + // O2_DEFINE_CONFIGURABLE(cfgGetInteractionRate, bool, false, "Get interaction rate from CCDB") + // O2_DEFINE_CONFIGURABLE(cfgUseInteractionRateCut, bool, false, "Use events with low interaction rate") + // O2_DEFINE_CONFIGURABLE(cfgCutMaxIR, float, 50.0f, "maximum interaction rate (kHz)") + // O2_DEFINE_CONFIGURABLE(cfgCutMinIR, float, 0.0f, "minimum interaction rate (kHz)") O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Use Nch for flow observables") O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 30, "Number of subsamples") O2_DEFINE_CONFIGURABLE(cfgOutputNUAWeights, bool, false, "Fill and output NUA weights") @@ -102,9 +104,17 @@ struct FlowCumulantsUpc { O2_DEFINE_CONFIGURABLE(cfgAcceptanceList, std::string, "", "CCDB path to acceptance lsit object") O2_DEFINE_CONFIGURABLE(cfgAcceptanceListEnabled, bool, false, "switch of acceptance list") O2_DEFINE_CONFIGURABLE(cfgEvSelOccupancy, bool, true, "Occupancy cut") - O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 500, "High cut on TPC occupancy") + O2_DEFINE_CONFIGURABLE(cfgCutOccupancyHigh, int, 1000, "High cut on TPC occupancy") O2_DEFINE_CONFIGURABLE(cfgCutOccupancyLow, int, 0, "Low cut on TPC occupancy") O2_DEFINE_CONFIGURABLE(cfgUseSmallMemory, bool, false, "Use small memory mode") + O2_DEFINE_CONFIGURABLE(cfgIsGoodItsLayers, bool, false, "whether choose itslayers") + O2_DEFINE_CONFIGURABLE(cfgGapSideA, bool, true, "choose gapside A") + O2_DEFINE_CONFIGURABLE(cfgGapSideC, bool, false, "choose gapside C") + O2_DEFINE_CONFIGURABLE(cfgDcaxy, bool, true, "choose dcaxy") + O2_DEFINE_CONFIGURABLE(cfgDcaz, bool, false, "choose dcaz") + O2_DEFINE_CONFIGURABLE(cfgDcazCut, float, 10.0, "dcaz cut") + O2_DEFINE_CONFIGURABLE(cfgItsClusterSize, unsigned int, 5, "ITS cluster size") + O2_DEFINE_CONFIGURABLE(cfgMaxTPCChi2NCl, int, 4, "tpcchi2") Configurable> cfgUserDefineGFWCorr{"cfgUserDefineGFWCorr", std::vector{"refN02 {2} refP02 {-2}", "refN12 {2} refP12 {-2}"}, "User defined GFW CorrelatorConfig"}; Configurable> cfgUserDefineGFWName{"cfgUserDefineGFWName", std::vector{"Ch02Gap22", "Ch12Gap22"}, "User defined GFW Name"}; Configurable> cfgRunRemoveList{"cfgRunRemoveList", std::vector{-1}, "excluded run numbers"}; @@ -122,7 +132,6 @@ struct FlowCumulantsUpc { Configurable cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"}; Configurable cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"}; Configurable cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"}; - Configurable cfgGapSideSelection{"cfgGapSideSelection", 2, "gap selection"}; // Corrections TH1D* mEfficiency = nullptr; @@ -200,10 +209,17 @@ struct FlowCumulantsUpc { // Event QA registry.add("hEventCount", "Number of Event;; Count", {HistType::kTH1D, {{5, 0, 5}}}); registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(1, "Filtered event"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(2, "after sel8"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(3, "after supicious Runs removal"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(4, "after additional event cut"); - registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(5, "after correction loads"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(2, "after gapside selection"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(3, "after its selection"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(4, "after pt selection"); + registry.get(HIST("hEventCount"))->GetXaxis()->SetBinLabel(5, "after occupancy"); + registry.add("hTrackCount", "Number of tracks;; Count", {HistType::kTH1D, {{5, 0, 5}}}); + registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(1, "after event selection"); + registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(2, "PVContributor"); + registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(3, "dcaz"); + registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(4, "dcaxy"); + registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(5, "its clusters"); + registry.get(HIST("hTrackCount"))->GetXaxis()->SetBinLabel(6, "tpc chi2"); registry.add("hEventCountSpecific", "Number of Event;; Count", {HistType::kTH1D, {{10, 0, 10}}}); registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(1, "after sel8"); registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup"); @@ -215,19 +231,19 @@ struct FlowCumulantsUpc { registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(8, "occupancy"); registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(9, "MultCorrelation"); registry.get(HIST("hEventCountSpecific"))->GetXaxis()->SetBinLabel(10, "cfgEvSelV0AT0ACut"); - if (cfgUseTentativeEventCounter) { - registry.add("hEventCountTentative", "Number of Event;; Count", {HistType::kTH1D, {{10, 0, 10}}}); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(1, "after sel8"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(3, "kIsGoodZvtxFT0vsPV"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(4, "kNoCollInTimeRangeStandard"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(5, "kIsGoodITSLayersAll"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(6, "kNoCollInRofStandard"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(7, "kNoHighMultCollInPrevRof"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(8, "occupancy"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(9, "MultCorrelation"); - registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(10, "cfgEvSelV0AT0ACut"); - } + // if (cfgUseTentativeEventCounter) { + // registry.add("hEventCountTentative", "Number of Event;; Count", {HistType::kTH1D, {{10, 0, 10}}}); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(1, "after sel8"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(2, "kNoSameBunchPileup"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(3, "kIsGoodZvtxFT0vsPV"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(4, "kNoCollInTimeRangeStandard"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(5, "kIsGoodITSLayersAll"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(6, "kNoCollInRofStandard"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(7, "kNoHighMultCollInPrevRof"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(8, "occupancy"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(9, "MultCorrelation"); + // registry.get(HIST("hEventCountTentative"))->GetXaxis()->SetBinLabel(10, "cfgEvSelV0AT0ACut"); + // } registry.add("hVtxZ", "Vexter Z distribution", {HistType::kTH1D, {axisVertex}}); registry.add("hMult", "Multiplicity distribution", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); std::string hCentTitle = "Centrality distribution, Estimator " + std::to_string(cfgCentEstimator); @@ -266,6 +282,7 @@ struct FlowCumulantsUpc { registry.add("hDCAz", "DCAz after cuts; DCAz (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}}); registry.add("hDCAxy", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}}); registry.add("hTrackCorrection2d", "Correlation table for number of tracks table; uncorrected track; corrected track", {HistType::kTH2D, {axisNch, axisNch}}); + registry.add("hEtaNch2D", "Eta vs Nch; #eta; Nch", {HistType::kTH2D, {axisEta, axisNch}}); registry.add("hPhiMC", "#phi distribution", {HistType::kTH1D, {axisPhi}}); registry.add("hPhiWeightedMC", "corrected #phi distribution", {HistType::kTH1D, {axisPhi}}); @@ -281,6 +298,13 @@ struct FlowCumulantsUpc { registry.add("hDCAxyMC", "DCAxy after cuts; DCAxy (cm); Pt", {HistType::kTH2D, {{200, -0.5, 0.5}, {200, 0, 5}}}); registry.add("hTrackCorrection2dMC", "Correlation table for number of tracks table; uncorrected track; corrected track", {HistType::kTH2D, {axisNch, axisNch}}); + // // MC event QA histograms + // registry.add("eventCounterMC", "Number of MC Events;; Count", {HistType::kTH1D, {{5, 0, 5}}}); + // registry.add("hVtxZMC", "Vexter Z distribution (MC)", {HistType::kTH1D, {axisVertex}}); + // registry.add("hMultMC", "Multiplicity distribution (MC)", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); + // registry.add("hCentMC", "Centrality distribution (MC)", {HistType::kTH1D, {{90, 0, 90}}}); + // registry.add("numberOfTracksMC", "Number of MC tracks;; Count", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); + o2::framework::AxisSpec axis = axisPt; int nPtBins = axis.binEdges.size() - 1; double* ptBins = &(axis.binEdges)[0]; @@ -509,22 +533,22 @@ struct FlowCumulantsUpc { } fGFW->CreateRegions(); - if (cfgUseAdditionalEventCut) { - fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100); - fMultPVCutLow->SetParameters(3257.29, -121.848, 1.98492, -0.0172128, 6.47528e-05, 154.756, -1.86072, -0.0274713, 0.000633499, -3.37757e-06); - fMultPVCutHigh = new TF1("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x + 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100); - fMultPVCutHigh->SetParameters(3257.29, -121.848, 1.98492, -0.0172128, 6.47528e-05, 154.756, -1.86072, -0.0274713, 0.000633499, -3.37757e-06); - - fMultCutLow = new TF1("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); - fMultCutLow->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06); - fMultCutHigh = new TF1("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x + 3.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); - fMultCutHigh->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06); - - fT0AV0AMean = new TF1("fT0AV0AMean", "[0]+[1]*x", 0, 200000); - fT0AV0AMean->SetParameters(-1601.0581, 9.417652e-01); - fT0AV0ASigma = new TF1("fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); - fT0AV0ASigma->SetParameters(463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); - } + // if (cfgUseAdditionalEventCut) { + // fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100); + // fMultPVCutLow->SetParameters(3257.29, -121.848, 1.98492, -0.0172128, 6.47528e-05, 154.756, -1.86072, -0.0274713, 0.000633499, -3.37757e-06); + // fMultPVCutHigh = new TF1("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x + 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100); + // fMultPVCutHigh->SetParameters(3257.29, -121.848, 1.98492, -0.0172128, 6.47528e-05, 154.756, -1.86072, -0.0274713, 0.000633499, -3.37757e-06); + + // fMultCutLow = new TF1("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); + // fMultCutLow->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06); + // fMultCutHigh = new TF1("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x + 3.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100); + // fMultCutHigh->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06); + + // fT0AV0AMean = new TF1("fT0AV0AMean", "[0]+[1]*x", 0, 200000); + // fT0AV0AMean->SetParameters(-1601.0581, 9.417652e-01); + // fT0AV0ASigma = new TF1("fT0AV0ASigma", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 200000); + // fT0AV0ASigma->SetParameters(463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); + // } myTrackSel = getGlobalTrackSelectionRun3ITSMatch(TrackSelection::GlobalTrackRun3ITSMatching::Run3ITSibAny, TrackSelection::GlobalTrackRun3DCAxyCut::Default); myTrackSel.SetMinNClustersTPC(cfgCutTPCclu); @@ -677,151 +701,153 @@ struct FlowCumulantsUpc { return true; } - template - bool eventSelected(TCollision collision, const int multTrk, const float centrality) - { - 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 - // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof - return 0; - } - if (cfgEvSelkNoSameBunchPileup) { - registry.fill(HIST("hEventCountSpecific"), 1.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 - return 0; - } - if (cfgEvSelkIsGoodZvtxFT0vsPV) { - registry.fill(HIST("hEventCountSpecific"), 2.5); - } - if (cfgEvSelkNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { - // no collisions in specified time range - return 0; - } - if (cfgEvSelkNoCollInTimeRangeStandard) { - registry.fill(HIST("hEventCountSpecific"), 3.5); - } - 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 (cfgEvSelkIsGoodITSLayersAll) { - registry.fill(HIST("hEventCountSpecific"), 4.5); - } - 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 (cfgEvSelkNoCollInRofStandard) { - registry.fill(HIST("hEventCountSpecific"), 5.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 (cfgEvSelkNoHighMultCollInPrevRof) { - registry.fill(HIST("hEventCountSpecific"), 6.5); - } - auto multNTracksPV = collision.multNTracksPV(); - auto occupancy = collision.trackOccupancyInTimeRange(); - if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { - return 0; - } - if (cfgEvSelOccupancy) { - registry.fill(HIST("hEventCountSpecific"), 7.5); - } - - if (cfgEvSelMultCorrelation) { - if (multNTracksPV < fMultPVCutLow->Eval(centrality)) - return 0; - if (multNTracksPV > fMultPVCutHigh->Eval(centrality)) - return 0; - if (multTrk < fMultCutLow->Eval(centrality)) - return 0; - if (multTrk > fMultCutHigh->Eval(centrality)) - return 0; - } - if (cfgEvSelMultCorrelation) { - registry.fill(HIST("hEventCountSpecific"), 8.5); - } - - // V0A T0A 5 sigma cut - constexpr int kSigmaCut = 5; - if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > kSigmaCut * fT0AV0ASigma->Eval(collision.multFT0A()))) { - return 0; - } - if (cfgEvSelV0AT0ACut) { - registry.fill(HIST("hEventCountSpecific"), 9.5); - } - - return 1; - } - - template - void eventCounterQA(TCollision collision, const int multTrk, const float centrality) - { - registry.fill(HIST("hEventCountTentative"), 0.5); - // Regradless of the event selection, fill the event counter histograms - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { - registry.fill(HIST("hEventCountTentative"), 1.5); - } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { - registry.fill(HIST("hEventCountTentative"), 2.5); - } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { - registry.fill(HIST("hEventCountTentative"), 3.5); - } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { - registry.fill(HIST("hEventCountTentative"), 4.5); - } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { - registry.fill(HIST("hEventCountTentative"), 5.5); - } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { - registry.fill(HIST("hEventCountTentative"), 6.5); - } - auto multNTracksPV = collision.multNTracksPV(); - auto occupancy = collision.trackOccupancyInTimeRange(); - if (!(occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { - registry.fill(HIST("hEventCountTentative"), 7.5); - } - if (!((multNTracksPV < fMultPVCutLow->Eval(centrality)) || (multNTracksPV > fMultPVCutHigh->Eval(centrality)) || (multTrk < fMultCutLow->Eval(centrality)) || (multTrk > fMultCutHigh->Eval(centrality)))) { - registry.fill(HIST("hEventCountTentative"), 8.5); - } - // constexpr int kSigmaCut = 5; - // if (!(std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > kSigmaCut * fT0AV0ASigma->Eval(collision.multFT0A()))) { - // registry.fill(HIST("hEventCountTentative"), 9.5); - // } - } + // template + // bool eventSelected(TCollision collision, const int multTrk, const float centrality) + // { + // 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 + // // https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof + // return 0; + // } + // // if (cfgEvSelkNoSameBunchPileup) { + // // registry.fill(HIST("hEventCountSpecific"), 1.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 + // return 0; + // } + // if (cfgEvSelkIsGoodZvtxFT0vsPV) { + // registry.fill(HIST("hEventCountSpecific"), 2.5); + // } + // if (cfgEvSelkNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + // // no collisions in specified time range + // return 0; + // } + // if (cfgEvSelkNoCollInTimeRangeStandard) { + // registry.fill(HIST("hEventCountSpecific"), 3.5); + // } + // 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 (cfgEvSelkIsGoodITSLayersAll) { + // registry.fill(HIST("hEventCountSpecific"), 4.5); + // } + // 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 (cfgEvSelkNoCollInRofStandard) { + // registry.fill(HIST("hEventCountSpecific"), 5.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 (cfgEvSelkNoHighMultCollInPrevRof) { + // registry.fill(HIST("hEventCountSpecific"), 6.5); + // } + // auto multNTracksPV = collision.multNTracksPV(); + // auto occupancy = collision.occupancyInTime(); + // if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { + // return 0; + // } + // if (cfgEvSelOccupancy) { + // registry.fill(HIST("hEventCountSpecific"), 7.5); + // } + + // if (cfgEvSelMultCorrelation) { + // if (multNTracksPV < fMultPVCutLow->Eval(centrality)) + // return 0; + // if (multNTracksPV > fMultPVCutHigh->Eval(centrality)) + // return 0; + // if (multTrk < fMultCutLow->Eval(centrality)) + // return 0; + // if (multTrk > fMultCutHigh->Eval(centrality)) + // return 0; + // } + // if (cfgEvSelMultCorrelation) { + // registry.fill(HIST("hEventCountSpecific"), 8.5); + // } + + // // V0A T0A 5 sigma cut + // constexpr int kSigmaCut = 5; + // if (cfgEvSelV0AT0ACut && (std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > kSigmaCut * fT0AV0ASigma->Eval(collision.multFT0A()))) { + // return 0; + // } + // if (cfgEvSelV0AT0ACut) { + // registry.fill(HIST("hEventCountSpecific"), 9.5); + // } + + // return 1; + // } + + // // template + // // void eventCounterQA(TCollision collision, const int multTrk, const float centrality) + // // { + // // registry.fill(HIST("hEventCountTentative"), 0.5); + // // // Regradless of the event selection, fill the event counter histograms + // // if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + // // registry.fill(HIST("hEventCountTentative"), 1.5); + // // } + // // if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + // // registry.fill(HIST("hEventCountTentative"), 2.5); + // } + // if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + // registry.fill(HIST("hEventCountTentative"), 3.5); + // } + // if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + // registry.fill(HIST("hEventCountTentative"), 4.5); + // } + // if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + // registry.fill(HIST("hEventCountTentative"), 5.5); + // } + // if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + // registry.fill(HIST("hEventCountTentative"), 6.5); + // } + // auto multNTracksPV = collision.multNTracksPV(); + // auto occupancy = collision.trackOccupancyInTimeRange(); + // if (!(occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { + // registry.fill(HIST("hEventCountTentative"), 7.5); + // } + // if (!((multNTracksPV < fMultPVCutLow->Eval(centrality)) || (multNTracksPV > fMultPVCutHigh->Eval(centrality)) || (multTrk < fMultCutLow->Eval(centrality)) || (multTrk > fMultCutHigh->Eval(centrality)))) { + // registry.fill(HIST("hEventCountTentative"), 8.5); + // } + // // constexpr int kSigmaCut = 5; + // // if (!(std::fabs(collision.multFV0A() - fT0AV0AMean->Eval(collision.multFT0A())) > kSigmaCut * fT0AV0ASigma->Eval(collision.multFT0A()))) { + // // registry.fill(HIST("hEventCountTentative"), 9.5); + // // } + // } template bool trackSelected(TTrack track) { + registry.fill(HIST("hTrackCount"), 0.5); // UPC selection if (!track.isPVContributor()) { return false; } - constexpr float kDcazCut = 2.0; - if (!(std::fabs(track.dcaZ()) < kDcazCut)) { + registry.fill(HIST("hTrackCount"), 1.5); + if (cfgDcaz && !(std::fabs(track.dcaZ()) < cfgDcazCut)) { return false; } + registry.fill(HIST("hTrackCount"), 2.5); double dcaLimit = 0.0105 + 0.035 / std::pow(track.pt(), 1.1); - if (!(std::fabs(track.dcaXY()) < dcaLimit)) { + if (cfgDcaxy && !(std::fabs(track.dcaXY()) < dcaLimit)) { return false; } - constexpr int kMinITSClusters = 5; - constexpr int kMaxTPCChi2NCl = 4; - - if (track.itsClusterSizes() <= kMinITSClusters) { + registry.fill(HIST("hTrackCount"), 3.5); + if (track.itsClusterSizes() <= cfgItsClusterSize) { return false; } - if (track.tpcChi2NCl() >= kMaxTPCChi2NCl) { + registry.fill(HIST("hTrackCount"), 4.5); + if (track.tpcChi2NCl() >= cfgMaxTPCChi2NCl) { return false; } + registry.fill(HIST("hTrackCount"), 5.5); return true; } @@ -879,20 +905,39 @@ struct FlowCumulantsUpc { // return; // } int gapSide = collision.gapSide(); - constexpr int kGapSideSelection = 0; - constexpr int kGapSideOppositeSelection = 2; - if (gapSide > kGapSideSelection && gapSide < kGapSideOppositeSelection) { - return; + if (gapSide == 0) { + if (!cfgGapSideA) { + return; + } + } + if (gapSide == 1) { + if (!cfgGapSideC) { + return; + } } - if (collision.trs() == 0) { + if (gapSide != 0 && gapSide != 1) { return; } int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); gapSide = trueGapSide; - if (gapSide == cfgGapSideSelection) { + if (gapSide == 0) { + if (!cfgGapSideA) { + return; + } + } + if (gapSide == 1) { + if (!cfgGapSideC) { + return; + } + } + if (gapSide != 0 && gapSide != 1) { return; } registry.fill(HIST("hEventCount"), 1.5); + if (cfgIsGoodItsLayers && collision.trs() == 0) { + return; + } + registry.fill(HIST("hEventCount"), 2.5); float cent = 100; float lRandom = fRndm->Rndm(); float vtxz = collision.posZ(); @@ -900,7 +945,15 @@ struct FlowCumulantsUpc { registry.fill(HIST("hMult"), tracks.size()); registry.fill(HIST("hCent"), cent); fGFW->Clear(); - + if (cfgIfVertex && abs(vtxz) > cfgCutVertex) { + return; + } + registry.fill(HIST("hEventCount"), 3.5); + int occupancy = collision.occupancyInTime(); + if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { + return; + } + registry.fill(HIST("hEventCount"), 4.5); // // track weights float weff = 1, wacc = 1; double nTracksCorrected = 0; @@ -911,8 +964,9 @@ struct FlowCumulantsUpc { for (const auto& track : tracks) { registry.fill(HIST("hChi2prTPCcls"), track.tpcChi2NCl()); - if (!trackSelected(track)) + if (!trackSelected(track)) { continue; + } auto momentum = std::array{track.px(), track.py(), track.pz()}; double pt = RecoDecay::pt(momentum); double phi = RecoDecay::phi(momentum); @@ -950,6 +1004,7 @@ struct FlowCumulantsUpc { if (withinPtPOI && withinPtRef) { fGFW->Fill(eta, fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 4); } + registry.fill(HIST("hEtaNch2D"), eta, tracks.size()); } registry.fill(HIST("hTrackCorrection2d"), tracks.size(), nTracksCorrected); @@ -1041,12 +1096,13 @@ struct FlowCumulantsUpc { for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) { fillFCMC(corrconfigs.at(l_ind), independent, lRandomMc); } - PROCESS_SWITCH(FlowCumulantsUpc, processSim, "processSim", false); } + PROCESS_SWITCH(FlowCumulantsUpc, processSim, "processSim", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc), + }; }