Skip to content
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5a0026b
resorted MC
miedema-11 Oct 23, 2025
c88abbd
modify process switch
miedema-11 Dec 1, 2025
43f7419
decrease log output
miedema-11 Dec 5, 2025
fba50da
decrease more log
miedema-11 Dec 8, 2025
b31d538
Merge branch 'master' into master
miedema-11 Dec 9, 2025
a85669d
add default cut
miedema-11 Jan 17, 2026
1d80ce7
Merge branch 'master' of github.com:miedema-11/O2Physics
miedema-11 Jan 17, 2026
01bc036
Merge branch 'master' into master
miedema-11 Jan 19, 2026
94b3040
remove tpc cluster
miedema-11 Jan 25, 2026
c8eddc1
Merge branch 'master' of github.com:miedema-11/O2Physics
miedema-11 Jan 25, 2026
b30fcfd
Merge branch 'master' into master
miedema-11 Jan 25, 2026
de81db0
Remove unused variable pt2 from flowCorrelationsUpc.cxx
miedema-11 Jan 26, 2026
b5f637d
fix gapside selection
miedema-11 Feb 14, 2026
62553da
Merge branch 'master' into master
miedema-11 Feb 15, 2026
8f12dfc
fix htrackcount issue
miedema-11 Feb 17, 2026
3ba4626
Merge branch 'master' of github.com:miedema-11/O2Physics
miedema-11 Feb 17, 2026
8a8c6d4
Merge branch 'master' into master
miedema-11 Feb 17, 2026
53a6db3
Merge branch 'master' of github.com:miedema-11/O2Physics
miedema-11 Feb 21, 2026
eaae55b
refix htrackcount error
miedema-11 Feb 21, 2026
3134dd3
add Nch_vs_zVtx
miedema-11 Feb 25, 2026
26f2740
Merge branch 'master' of github.com:miedema-11/O2Physics
miedema-11 Feb 25, 2026
bac658d
Merge branch 'master' of github.com:miedema-11/O2Physics
miedema-11 Feb 25, 2026
d0c22bc
filtered table
miedema-11 Mar 3, 2026
0130ce5
filtered truegapside
miedema-11 Mar 3, 2026
e3e0ff3
Merge branch 'master' into master
miedema-11 Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 104 additions & 94 deletions PWGUD/Tasks/flowCorrelationsUpc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ namespace o2::aod
namespace flowcorrupc
{
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, int);
}
DECLARE_SOA_COLUMN(Truegapside, truegapside, int);
} // namespace flowcorrupc
DECLARE_SOA_TABLE(Multiplicity, "AOD", "MULTIPLICITY",
flowcorrupc::Multiplicity);

DECLARE_SOA_TABLE(Truegapside, "AOD", "TRUEGAPSIDE", flowcorrupc::Truegapside);
} // namespace o2::aod

using namespace o2;
Expand All @@ -66,30 +67,42 @@ struct CalcNchUpc {
O2_DEFINE_CONFIGURABLE(cfgEtaCut, float, 0.8f, "Eta cut")
O2_DEFINE_CONFIGURABLE(cfgMinMixEventNum, int, 5, "Minimum number of events to mix")

// Added UPC Cuts
SGSelector sgSelector;
Configurable<float> cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"};
Configurable<float> cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"};
Configurable<float> cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"};
Configurable<float> cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"};

// 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<aod::UDTracks, aod::UDTracksExtra, aod::UDTracksPID>;
using UdTracksFull = soa::Join<aod::UDTracks, aod::UDTracksPID, aod::UDTracksExtra, aod::UDTracksFlags, aod::UDTracksDCA>;
using UDCollisionsFull = soa::Join<aod::UDCollisions, aod::SGCollisions, aod::UDCollisionsSels, aod::UDZdcsReduced, aod::UDCollisionSelExtras>;

Produces<aod::Multiplicity> multiplicityNch;
Produces<aod::Truegapside> truegapside;

HistogramRegistry registry{"registry"};

void init(InitContext&)
{
AxisSpec axisNch = {100, 0, 100};
AxisSpec axisVrtx = {10, -10, 10};
AxisSpec axisgap = {12, -6, 6};

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}});
registry.add("truegap", "truegap", {HistType::kTH1D, {axisgap}});
}

void process(UDCollisionsFull::iterator const& collision, UdTracksFull const& tracks)
{
multiplicityNch(tracks.size());
truegapside(sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC));
registry.fill(HIST("Ncharge"), tracks.size());
registry.fill(HIST("truegap"), sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC));
registry.fill(HIST("zVtx_all"), collision.posZ());
registry.fill(HIST("Nch_vs_zVtx"), collision.posZ(), tracks.size());
}
Expand Down Expand Up @@ -148,13 +161,13 @@ struct FlowCorrelationsUpc {

// make the filters and cuts.
Filter trackFilter = (aod::udtrack::isPVContributor == true);
Filter collisionFilter = (cfgGapSideMerge == false && aod::udcollision::gapSide == (uint8_t)cfgGapSide);
Filter collisionFilter = (((cfgGapSideMerge == true && (aod::udcollision::gapSide == (uint8_t)1 || aod::udcollision::gapSide == (uint8_t)0)) || aod::udcollision::gapSide == (uint8_t)cfgGapSide) && (cfgIfVertex == false || aod::collision::posZ < cfgZVtxCut) && (aod::udcollision::occupancyInTime > 0 && aod::udcollision::occupancyInTime < cfgCutOccupancyHigh) && ((cfgGapSideMerge == true && (aod::flowcorrupc::truegapside == 0 || aod::flowcorrupc::truegapside == 1)) || aod::flowcorrupc::truegapside == 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::Filtered<soa::Join<aod::UDTracks, aod::UDTracksExtra, aod::UDTracksPID>>;
using UdTracksFull = soa::Filtered<soa::Join<aod::UDTracks, aod::UDTracksPID, aod::UDTracksExtra, aod::UDTracksFlags, aod::UDTracksDCA>>;
using UDCollisionsFull = soa::Filtered<soa::Join<aod::UDCollisions, aod::SGCollisions, aod::UDCollisionsSels, aod::UDZdcsReduced, aod::Multiplicity, aod::UDCollisionSelExtras>>;
using UDCollisionsFull = soa::Filtered<soa::Join<aod::UDCollisions, aod::SGCollisions, aod::UDCollisionsSels, aod::UDZdcsReduced, aod::Multiplicity, aod::Truegapside, aod::UDCollisionSelExtras>>;

// Define the outputs
OutputObj<CorrelationContainer> same{Form("sameEvent_%i_%i", static_cast<int>(cfgMinMult), static_cast<int>(cfgMaxMult))};
Expand Down Expand Up @@ -235,9 +248,6 @@ struct FlowCorrelationsUpc {
if (track.pt() < cfgPtCutMin || track.pt() > cfgPtCutMax) {
return false;
}
if (!track.isPVContributor()) {
return false;
}
// registry.fill(HIST("hTrackCount"), 1.5);
if (cfgDcaz && !(std::fabs(track.dcaZ()) < cfgDcazCut)) {
return false;
Expand Down Expand Up @@ -345,36 +355,36 @@ struct FlowCorrelationsUpc {
if (tracks.size() < cfgMinMult || tracks.size() > cfgMaxMult) {
return;
}
if (cfgIsGoodItsLayers && collision.trs() == 0) {
return;
}

if (cfgGapSideMerge) {
int gapSide = collision.gapSide();
if (gapSide != 0 && gapSide != 1) {
return;
}
int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
int gapSide1 = trueGapSide;
if (gapSide1 != 0 && gapSide1 != 1) {
return;
}
}
if (!cfgGapSideMerge) {
int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
int gapSide1 = trueGapSide;
if (gapSide1 != cfgGapSide) {
return;
}
}
float vtxz = collision.posZ();
if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) {
return;
}
int occupancy = collision.occupancyInTime();
if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) {
return;
}
// if (cfgIsGoodItsLayers && collision.trs() == 0) {
// return;
// }

// if (cfgGapSideMerge) {
// int gapSide = collision.gapSide();
// if (gapSide != 0 && gapSide != 1) {
// return;
// }
// int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
// int gapSide1 = trueGapSide;
// if (gapSide1 != 0 && gapSide1 != 1) {
// return;
// }
// }
// if (!cfgGapSideMerge) {
// int trueGapSide = sgSelector.trueGap(collision, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
// int gapSide1 = trueGapSide;
// if (gapSide1 != cfgGapSide) {
// 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
Expand Down Expand Up @@ -402,64 +412,64 @@ struct FlowCorrelationsUpc {
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;
}
registry.fill(HIST("eventcount"), 5.5);
if (cfgGapSideMerge) {
int gapSide = collision1.gapSide();
if (gapSide != 0 && gapSide != 1) {
continue;
}
int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
int gapSide1 = trueGapSide;
if (gapSide1 != 0 && gapSide1 != 1) {
continue;
}
}
if (!cfgGapSideMerge) {
int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
int gapSide1 = trueGapSide;
if (gapSide1 != cfgGapSide) {
continue;
}
}
if (cfgGapSideMerge) {
int gapSide = collision2.gapSide();
if (gapSide != 0 && gapSide != 1) {
continue;
}
int trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
int gapSide2 = trueGapSide;
if (gapSide2 != 0 && gapSide2 != 1) {
continue;
}
}
if (!cfgGapSideMerge) {
int trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
int gapSide2 = trueGapSide;
if (gapSide2 != cfgGapSide) {
continue;
}
}
// registry.fill(HIST("eventcount"), 4.5);
// if (cfgIsGoodItsLayers && (collision1.trs() == 0 || collision2.trs() == 0)) {
// continue;
// }
// registry.fill(HIST("eventcount"), 5.5);
// if (cfgGapSideMerge) {
// int gapSide = collision1.gapSide();
// if (gapSide != 0 && gapSide != 1) {
// continue;
// }
// int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
// int gapSide1 = trueGapSide;
// if (gapSide1 != 0 && gapSide1 != 1) {
// continue;
// }
// }
// if (!cfgGapSideMerge) {
// int trueGapSide = sgSelector.trueGap(collision1, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
// int gapSide1 = trueGapSide;
// if (gapSide1 != cfgGapSide) {
// continue;
// }
// }
// if (cfgGapSideMerge) {
// int gapSide = collision2.gapSide();
// if (gapSide != 0 && gapSide != 1) {
// continue;
// }
// int trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
// int gapSide2 = trueGapSide;
// if (gapSide2 != 0 && gapSide2 != 1) {
// continue;
// }
// }
// if (!cfgGapSideMerge) {
// int trueGapSide = sgSelector.trueGap(collision2, cfgCutFV0, cfgCutFT0A, cfgCutFT0C, cfgCutZDC);
// int gapSide2 = trueGapSide;
// if (gapSide2 != cfgGapSide) {
// continue;
// }
// }
registry.fill(HIST("eventcount"), 6.5);
float vtxz = collision1.posZ();
if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) {
continue;
}
int occupancy = collision1.occupancyInTime();
if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) {
continue;
}
vtxz = collision2.posZ();
if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) {
continue;
}
occupancy = collision2.occupancyInTime();
if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) {
continue;
}
// float vtxz = collision1.posZ();
// if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) {
// continue;
// }
// int occupancy = collision1.occupancyInTime();
// if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) {
// continue;
// }
// vtxz = collision2.posZ();
// if (cfgIfVertex && abs(vtxz) > cfgZVtxCut) {
// continue;
// }
// occupancy = collision2.occupancyInTime();
// if (cfgEvSelOccupancy && (occupancy < cfgCutOccupancyLow || occupancy > cfgCutOccupancyHigh)) {
// continue;
// }
registry.fill(HIST("eventcount"), MixedFinal);
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(tracks1, tracks2, collision1.posZ(), MixedEvent, collision1.runNumber()); // fill the ME histogram and Sparse
}
Expand Down
Loading