Skip to content

Commit

Permalink
[PWGLF] move ME definition & add dedicated ME autocorrelation QA in c…
Browse files Browse the repository at this point in the history
…ascade correlations (#8905)

Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
  • Loading branch information
rspijkers and alibuild authored Dec 10, 2024
1 parent 51f9794 commit d6a76e6
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions PWGLF/Tasks/Strangeness/cascadecorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ struct CascadeCorrelations {
{"MixedEvents/hMEDeltaPhiSS", "hMEDeltaPhiSS", {HistType::kTH1F, {deltaPhiAxis}}},
{"MixedEvents/hMEDeltaPhiOS", "hMEDeltaPhiOS", {HistType::kTH1F, {deltaPhiAxis}}},
{"MixedEvents/hMEQA", "hMEQA", {HistType::kTH1I, {{2, 0, 2, "QA for exceptions in ME (this histogram should have 0 entries!)"}}}},
{"MixedEvents/hMEAutoCorrelation", "hMEAutoCorrelation", {HistType::kTH1I, {{4, -0.5f, 3.5f, "Types of SS autocorrelation"}}}},
{"MixedEvents/hMEAutoCorrelationOS", "hMEAutoCorrelationOS", {HistType::kTH1I, {{2, -1.f, 1.f, "Charge of OS autocorrelated track"}}}},

{"MixedEvents/hMEXiXiOS", "hMEXiXiOS", {HistType::kTHnSparseF, {deltaPhiAxis, deltaYAxis, ptAxis, ptAxis, invMassAxis, invMassAxis, vertexAxis, multiplicityAxis}}, true},
{"MixedEvents/hMEXiXiSS", "hMEXiXiSS", {HistType::kTHnSparseF, {deltaPhiAxis, deltaYAxis, ptAxis, ptAxis, invMassAxis, invMassAxis, vertexAxis, multiplicityAxis}}, true},
Expand All @@ -441,9 +443,15 @@ struct CascadeCorrelations {
// cascade filter
Filter cascadeSelector = aod::cascadeflags::isSelected > 0;

// Warning: it is not possible to use this axis as configurable due to a bug - however, default values are sensible.
SliceCache cache;
ConfigurableAxis axisVtxZ{"axisVtxZ", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"};
// ConfigurableAxis axisMult{"axisMult", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 100, 1000}, "Mixing bins - multiplicity"};
// using BinningType = ColumnBinningPolicy<aod::collision::PosZ, aod::mult::MultFT0M<aod::mult::MultFT0A, aod::mult::MultFT0C>>;
// BinningType colBinning{{axisVtxZ, axisMult}, true}; // true is for 'ignore overflows' (true by default). Underflows and overflows will have bin -1.
using BinningType = ColumnBinningPolicy<aod::collision::PosZ>;
BinningType colBinning{{axisVtxZ}, true}; // true is for 'ignore overflows' (true by default). Underflows and overflows will have bin -1.
SameKindPair<MyCollisionsMult, MyCascades, BinningType> pair{colBinning, nMixedEvents, -1, &cache};

void processSameEvent(MyCollisionsMult::iterator const& collision, MyCascades const& Cascades, aod::V0sLinked const&, aod::V0Datas const&, FullTracksExtIU const&, aod::BCsWithTimestamps const&)
{
Expand Down Expand Up @@ -662,13 +670,6 @@ struct CascadeCorrelations {
void processMixedEvent(MyCollisionsMult const& /*collisions*/, MyCascades const& /*Cascades*/,
aod::V0sLinked const&, aod::V0Datas const&, FullTracksExtIU const&)
{
// mixed events
// using BinningType = ColumnBinningPolicy<aod::collision::PosZ, aod::mult::MultFT0M<aod::mult::MultFT0A, aod::mult::MultFT0C>>;
// BinningType colBinning{{axisVtxZ, axisMult}, true}; // true is for 'ignore overflows' (true by default). Underflows and overflows will have bin -1.
using BinningType = ColumnBinningPolicy<aod::collision::PosZ>;
BinningType colBinning{{axisVtxZ}, true}; // true is for 'ignore overflows' (true by default). Underflows and overflows will have bin -1.
SameKindPair<MyCollisionsMult, MyCascades, BinningType> pair{colBinning, nMixedEvents, -1, &cache};

for (auto const& [col1, cascades1, col2, cascades2] : pair) {
if (!col1.sel8() || !col2.sel8())
continue;
Expand Down Expand Up @@ -719,24 +720,24 @@ struct CascadeCorrelations {
if (trigger.isSelected() >= 2) {
if (trigger.sign() > 0 && trigger.bachelorId() == posIdAssoc) {
// K+ from trigger Omega is the same as proton from assoc lambda
registry.fill(HIST("hAutoCorrelationOS"), 1);
registry.fill(HIST("hMEAutoCorrelationOS"), 1);
continue;
}
if (trigger.sign() < 0 && trigger.bachelorId() == negIdAssoc) {
// K- from trigger Omega is the same as antiproton from assoc antilambda
registry.fill(HIST("hAutoCorrelationOS"), -1);
registry.fill(HIST("hMEAutoCorrelationOS"), -1);
continue;
}
}
if (assoc.isSelected() >= 2) {
if (assoc.sign() > 0 && assoc.bachelorId() == posIdTrigg) {
// K+ from assoc Omega is the same as proton from trigger lambda
registry.fill(HIST("hAutoCorrelationOS"), 1);
registry.fill(HIST("hMEAutoCorrelationOS"), 1);
continue;
}
if (assoc.sign() < 0 && assoc.bachelorId() == negIdTrigg) {
// K- from assoc Omega is the same as antiproton from trigger antilambda
registry.fill(HIST("hAutoCorrelationOS"), -1);
registry.fill(HIST("hMEAutoCorrelationOS"), -1);
continue;
}
}
Expand Down Expand Up @@ -776,33 +777,33 @@ struct CascadeCorrelations {
// make sure to check for autocorrelations - only possible in same-sign correlations (if PID is correct)
if (posIdTrigg == posIdAssoc && negIdTrigg == negIdAssoc) {
// LOGF(info, "same v0 in SS correlation! %d %d", v0dataTrigg.v0Id(), v0dataAssoc.v0Id());
registry.fill(HIST("hAutoCorrelation"), 0);
registry.fill(HIST("hMEAutoCorrelation"), 0);
continue;
}
int bachIdTrigg = trigger.bachelorId();
int bachIdAssoc = assoc.bachelorId();

if (bachIdTrigg == bachIdAssoc) {
// LOGF(info, "same bachelor in SS correlation! %d %d", bachIdTrigg, bachIdAssoc);
registry.fill(HIST("hAutoCorrelation"), 1);
registry.fill(HIST("hMEAutoCorrelation"), 1);
continue;
}
// check for same tracks in v0's of cascades
if (negIdTrigg == negIdAssoc || posIdTrigg == posIdAssoc) {
// LOGF(info, "cascades have a v0-track in common in SS correlation!");
registry.fill(HIST("hAutoCorrelation"), 2);
registry.fill(HIST("hMEAutoCorrelation"), 2);
continue;
}
if (trigger.sign() < 0) { // neg cascade
if (negIdTrigg == bachIdAssoc || negIdAssoc == bachIdTrigg) {
// LOGF(info, "bach of casc == v0-pion of other casc in neg SS correlation!");
registry.fill(HIST("hAutoCorrelation"), 3);
registry.fill(HIST("hMEAutoCorrelation"), 3);
continue;
}
} else { // pos cascade
if (posIdTrigg == bachIdAssoc || posIdAssoc == bachIdTrigg) {
// LOGF(info, "bach of casc == v0-pion of other casc in pos SS correlation!");
registry.fill(HIST("hAutoCorrelation"), 3);
registry.fill(HIST("hMEAutoCorrelation"), 3);
continue;
}
}
Expand Down Expand Up @@ -840,7 +841,7 @@ struct CascadeCorrelations {
} // same sign
} // correlations
} // collisions
} // process mixed events
} // process mixed events

PROCESS_SWITCH(CascadeCorrelations, processSameEvent, "Process same events", true);
PROCESS_SWITCH(CascadeCorrelations, processMixedEvent, "Process mixed events", true);
Expand Down

0 comments on commit d6a76e6

Please sign in to comment.