diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index 9dcb3cac9bd..010bc11e3ee 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -83,6 +83,7 @@ struct CalcNchUpc { registry.add("Ncharge", "N_{charge}", {HistType::kTH1D, {axisNch}}); registry.add("zVtx_all", "zVtx_all", {HistType::kTH1D, {axisVrtx}}); + registry.add("Nch_vs_zVtx", "Nch vs zVtx", {HistType::kTH2D, {axisVrtx, axisNch}}); } void process(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks) @@ -90,6 +91,7 @@ struct CalcNchUpc { multiplicityNch(tracks.size()); registry.fill(HIST("Ncharge"), tracks.size()); registry.fill(HIST("zVtx_all"), collision.posZ()); + registry.fill(HIST("Nch_vs_zVtx"), collision.posZ(), tracks.size()); } }; @@ -109,8 +111,8 @@ struct FlowCorrelationsUpc { 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(cfgGapSide, int, 0, "0: gapside A;1:C") + O2_DEFINE_CONFIGURABLE(cfgGapSideMerge, bool, false, "whether merge A and C side together") 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") @@ -145,12 +147,14 @@ struct FlowCorrelationsUpc { Configurable cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"}; // make the filters and cuts. + Filter trackFilter = (aod::udtrack::isPVContributor == true); + Filter collisionFilter = (cfgGapSideMerge == false && aod::udcollision::gapSide == (uint8_t)cfgGapSide); // Filter collisionFilter = (nabs(aod::collision::posZ) < cfgZVtxCut) && (aod::flowcorrupc::multiplicity) > cfgMinMult && (aod::flowcorrupc::multiplicity) < cfgMaxMult && (aod::evsel::sel8) == true; // Filter trackFilter = (nabs(aod::track::eta) < cfgEtaCut) && (aod::track::pt > cfgPtCutMin) && (aod::track::pt < cfgPtCutMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)); - using UdTracks = soa::Join; - using UdTracksFull = soa::Join; - using UDCollisionsFull = soa::Join; + using UdTracks = soa::Filtered>; + using UdTracksFull = soa::Filtered>; + using UDCollisionsFull = soa::Filtered>; // Define the outputs OutputObj same{Form("sameEvent_%i_%i", static_cast(cfgMinMult), static_cast(cfgMaxMult))}; @@ -169,10 +173,11 @@ struct FlowCorrelationsUpc { registry.add("pT", "pT", {HistType::kTH1D, {axisPtTrigger}}); registry.add("Nch", "N_{ch}", {HistType::kTH1D, {axisMultiplicity}}); registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}}); + registry.add("Nch_vs_zVtx", "Nch vs zVtx", {HistType::kTH2D, {axisVertex, axisMultiplicity}}); registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}}); - 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, {{10, 0, 10, "bin"}}}); // histogram to see how many events are in the same and mixed event std::vector corrAxis = {{axisSample, "Sample"}, {axisVertex, "z-vtx (cm)"}, @@ -192,7 +197,8 @@ struct FlowCorrelationsUpc { } enum EventType { SameEvent = 1, - MixedEvent = 3 + MixedEvent = 3, + MixedFinal = 9 }; template @@ -226,6 +232,9 @@ struct FlowCorrelationsUpc { { // registry.fill(HIST("hTrackCount"), 0.5); // UPC selection + if (track.pt() < cfgPtCutMin || track.pt() > cfgPtCutMax) { + return false; + } if (!track.isPVContributor()) { return false; } @@ -340,35 +349,24 @@ struct FlowCorrelationsUpc { return; } - int gapSide = collision.gapSide(); - if (gapSide == 0) { - if (!cfgGapSideA) { - return; - } - } - if (gapSide == 1) { - if (!cfgGapSideC) { + if (cfgGapSideMerge) { + int gapSide = collision.gapSide(); + if (gapSide != 0 && gapSide != 1) { return; } - } - if (gapSide != 0 && gapSide != 1) { - return; - } - int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); - gapSide = trueGapSide; - if (gapSide == 0) { - if (!cfgGapSideA) { + int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int gapSide1 = trueGapSide; + if (gapSide1 != 0 && gapSide1 != 1) { return; } } - if (gapSide == 1) { - if (!cfgGapSideC) { + if (!cfgGapSideMerge) { + int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int gapSide1 = trueGapSide; + if (gapSide1 != cfgGapSide) { return; } } - if (gapSide != 0 && gapSide != 1) { - return; - } float vtxz = collision.posZ(); if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) { return; @@ -380,6 +378,7 @@ struct FlowCorrelationsUpc { int runIndex = collision.runNumber(); registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin + registry.fill(HIST("Nch_vs_zVtx"), collision.posZ(), tracks.size()); fillYield(collision, tracks); fillCorrelations(tracks, tracks, collision.posZ(), SameEvent, runIndex); // fill the SE histogram and Sparse } @@ -388,80 +387,80 @@ struct FlowCorrelationsUpc { // event mixing SliceCache cache; + // using MixedBinning = FlexibleBinningPolicy, aod::collision::PosZ, aod::flowcorrupc::Multiplicity>; using MixedBinning = ColumnBinningPolicy; // the process for filling the mixed events void processMixed(UDCollisionsFull const& collisions, UdTracksFull const& tracks) { MixedBinning binningOnVtxAndMult{{vtxMix, multMix}, true}; // true is for 'ignore overflows' (true by default) - auto tracksTuple = std::make_tuple(tracks); - SameKindPair pairs{binningOnVtxAndMult, cfgMinMixEventNum, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip + auto tracksTuple = std::make_tuple(tracks, tracks); + Pair pairs{binningOnVtxAndMult, cfgMinMixEventNum, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip for (auto const& [collision1, tracks1, collision2, tracks2] : pairs) { + registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin if (tracks1.size() < cfgMinMult || tracks1.size() > cfgMaxMult || tracks2.size() < cfgMinMult || tracks2.size() > cfgMaxMult) { continue; } + registry.fill(HIST("eventcount"), 4.5); if (cfgIsGoodItsLayers && (collision1.trs() == 0 || collision2.trs() == 0)) { continue; } - - int gapSide1 = collision1.gapSide(); - if (gapSide1 == 0) { - if (!cfgGapSideA) { + registry.fill(HIST("eventcount"), 5.5); + if (cfgGapSideMerge) { + int gapSide = collision1.gapSide(); + if (gapSide != 0 && gapSide != 1) { continue; } - } - if (gapSide1 == 1) { - if (!cfgGapSideC) { + int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int gapSide1 = trueGapSide; + if (gapSide1 != 0 && gapSide1 != 1) { continue; } } - int gapSide2 = collision2.gapSide(); - if (gapSide2 == 0) { - if (!cfgGapSideA) { + if (!cfgGapSideMerge) { + int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int gapSide1 = trueGapSide; + if (gapSide1 != cfgGapSide) { continue; } } - if (gapSide2 == 1) { - if (!cfgGapSideC) { + if (cfgGapSideMerge) { + int gapSide = collision2.gapSide(); + if (gapSide != 0 && gapSide != 1) { continue; } - } - int trueGapSide1 = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); - int trueGapSide2 = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); - if (trueGapSide1 != trueGapSide2) { - continue; - } - if (trueGapSide1 == 0) { - if (!cfgGapSideA) { + int trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int gapSide2 = trueGapSide; + if (gapSide2 != 0 && gapSide2 != 1) { continue; } } - if (trueGapSide2 == 1) { - if (!cfgGapSideC) { + if (!cfgGapSideMerge) { + int trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC); + int gapSide2 = trueGapSide; + if (gapSide2 != cfgGapSide) { continue; } } - if ((gapSide1 != 0 && gapSide1 != 1) || (gapSide2 != 0 && gapSide2 != 1)) { - continue; - } + registry.fill(HIST("eventcount"), 6.5); float vtxz = collision1.posZ(); if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) { - return; + continue; } int occupancy = collision1.occupancyInTime(); if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { - return; + continue; } vtxz = collision2.posZ(); if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) { - return; + continue; } occupancy = collision2.occupancyInTime(); if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) { - return; + continue; } - registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin + registry.fill(HIST("eventcount"), MixedFinal); fillCorrelations(tracks1, tracks2, collision1.posZ(), MixedEvent, collision1.runNumber()); // fill the ME histogram and Sparse } }