Skip to content

Commit 53487ae

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents 5557522 + a5083f4 commit 53487ae

37 files changed

+3001
-8199
lines changed

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 192 additions & 145 deletions
Large diffs are not rendered by default.

PWGCF/Flow/Tasks/flowGfwEse.cxx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ struct FlowGfwEse {
244244
O2_DEFINE_CONFIGURABLE(cfgAnalysisType, bool, true, "true for ese, false for mean-pT");
245245
const std::string shapesel = cfgAnalysisType ? "ese" : "mpt";
246246
static constexpr int EseBins = 100;
247+
static constexpr float MeanPtThr = -998.0;
247248

248249
// region indices for consistency flag
249250
int posRegionIndex = -1;
@@ -628,7 +629,7 @@ struct FlowGfwEse {
628629
return 0;
629630
}
630631
registry.fill(HIST("eventQA/eventSel"), kTVXTRD);
631-
if (cfgRunByRun)
632+
if (cfgRunByRun && run != -1)
632633
th1sList[run][hEventSel]->Fill(kTVXTRD);
633634
}
634635
if (cfgNoSameBunchPileupCut) {
@@ -638,7 +639,7 @@ struct FlowGfwEse {
638639
return 0;
639640
}
640641
registry.fill(HIST("eventQA/eventSel"), kNoSamebunchPU);
641-
if (cfgRunByRun)
642+
if (cfgRunByRun && run != -1)
642643
th1sList[run][hEventSel]->Fill(kNoSamebunchPU);
643644
}
644645
if (cfgIsGoodZvtxFT0vsPV) {
@@ -648,7 +649,7 @@ struct FlowGfwEse {
648649
return 0;
649650
}
650651
registry.fill(HIST("eventQA/eventSel"), kZVtxFT0PV);
651-
if (cfgRunByRun)
652+
if (cfgRunByRun && run != -1)
652653
th1sList[run][hEventSel]->Fill(kZVtxFT0PV);
653654
}
654655
if (cfgNoCollInTimeRangeStandard) {
@@ -657,7 +658,7 @@ struct FlowGfwEse {
657658
return 0;
658659
}
659660
registry.fill(HIST("eventQA/eventSel"), kNoCollTRStd);
660-
if (cfgRunByRun)
661+
if (cfgRunByRun && run != -1)
661662
th1sList[run][hEventSel]->Fill(kNoCollTRStd);
662663
}
663664

@@ -667,7 +668,7 @@ struct FlowGfwEse {
667668
return 0;
668669
}
669670
registry.fill(HIST("eventQA/eventSel"), kVtxITSTPC);
670-
if (cfgRunByRun)
671+
if (cfgRunByRun && run != -1)
671672
th1sList[run][hEventSel]->Fill(kVtxITSTPC);
672673
}
673674

@@ -676,7 +677,7 @@ struct FlowGfwEse {
676677
return 0;
677678
}
678679
registry.fill(HIST("eventQA/eventSel"), kGoodITSLayers);
679-
if (cfgRunByRun)
680+
if (cfgRunByRun && run != -1)
680681
th1sList[run][hEventSel]->Fill(kGoodITSLayers);
681682
}
682683

@@ -715,7 +716,7 @@ struct FlowGfwEse {
715716
if (!(cfgGlobalAsideCorrCuts.cfgMultGlobalASideCorrCutFunction->empty()) && static_cast<double>(collision.multFT0A()) > fMultGlobalT0ACutHigh->Eval(multTrk))
716717
return 0;
717718
registry.fill(HIST("eventQA/eventSel"), kMultCuts);
718-
if (cfgRunByRun)
719+
if (cfgRunByRun && run != -1)
719720
th1sList[run][hEventSel]->Fill(kMultCuts);
720721
}
721722
return 1;
@@ -1200,18 +1201,34 @@ struct FlowGfwEse {
12001201
}
12011202
PROCESS_SWITCH(FlowGfwEse, processData, "Process analysis for non-derived data", true);
12021203

1203-
// void processMptq2(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNTPVs, aod::CentNGlobals, aod::CentMFTs, aod::Qvectors, aod::QPercentileFT0Cs/*, aod::MeanPtShape*/>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
1204-
1205-
void processMptq2(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNTPVs, aod::CentNGlobals, aod::CentMFTs, aod::Qvectors, aod::QPercentileFT0Cs, aod::MeanPtShapes, aod::MeanPts>>::iterator const& collision, aod::BCsWithTimestamps const& /*, GFWTracks const& tracks*/)
1204+
void processMptq2(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNTPVs, aod::CentNGlobals, aod::CentMFTs, aod::Qvectors, aod::QPercentileFT0Cs, aod::MeanPtShapes, aod::MeanPts>>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
12061205
{
12071206
float count{0.5};
12081207
registry.fill(HIST("mptcorr/eventcounter"), count++);
1208+
if (!collision.sel8()) {
1209+
return;
1210+
}
1211+
registry.fill(HIST("mptcorr/eventcounter"), count++);
1212+
if (cfgDoOccupancySel) {
1213+
int occupancy = collision.trackOccupancyInTimeRange();
1214+
if (occupancy < 0 || occupancy > cfgOccupancySelection) {
1215+
return;
1216+
}
1217+
}
1218+
registry.fill(HIST("mptcorr/eventcounter"), count++);
1219+
12091220
const auto centr = collision.centFT0C();
12101221
const auto qPerc = collision.qPERCFT0C();
12111222
const auto mPt = collision.fMEANPTSHAPE();
12121223
const auto mPtv = collision.fMEANPT();
12131224
if (qPerc[0] < 0 || mPt[0] < 0)
12141225
return;
1226+
if (mPtv[0] < MeanPtThr)
1227+
return;
1228+
const XAxis xaxis{getCentrality(collision), tracks.size(), -1.0};
1229+
if (cfgUseAdditionalEventCut && !eventSelected(collision, xaxis.multiplicity, xaxis.centrality, -1))
1230+
return;
1231+
12151232
registry.fill(HIST("mptcorr/eventcounter"), count++);
12161233
registry.fill(HIST("mptcorr/h3_cent_q2_meanptperc"), centr, qPerc[0], mPt[0]);
12171234
registry.fill(HIST("mptcorr/h3_cent_q2_mptvalue"), centr, qPerc[0], mPtv[0]);

PWGCF/Tasks/correlations.cxx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,6 @@ struct CorrelationTask {
457457
template <class T>
458458
using HasPartDaugh1Id = decltype(std::declval<T&>().cfParticleDaugh1Id());
459459

460-
/*
461-
OO outlier cut (requires mask 15):
462-
(567.785+172.715*[mGlob]+0.77888*[mGlob]*[mGlob]+-0.00693466*[mGlob]*[mGlob]*[mGlob]+1.40564e-05*[mGlob]*[mGlob]*[mGlob]*[mGlob] + 3.5*(679.853+66.8068*[mGlob]+-0.444332*[mGlob]*[mGlob]+0.00115002*[mGlob]*[mGlob]*[mGlob]+-4.92064e-07*[mGlob]*[mGlob]*[mGlob]*[mGlob])) > [mFV0A] && (567.785+172.715*[mGlob]+0.77888*[mGlob]*[mGlob]+-0.00693466*[mGlob]*[mGlob]*[mGlob]+1.40564e-05*[mGlob]*[mGlob]*[mGlob]*[mGlob] - 3.0*(679.853+66.8068*[mGlob]+-0.444332*[mGlob]*[mGlob]+0.00115002*[mGlob]*[mGlob]*[mGlob]+-4.92064e-07*[mGlob]*[mGlob]*[mGlob]*[mGlob])) < [mFV0A] && (172.406 + -4.50219*[cFT0C] + 0.0543038*[cFT0C]*[cFT0C] + -0.000373213*[cFT0C]*[cFT0C]*[cFT0C] + 1.15322e-06*[cFT0C]*[cFT0C]*[cFT0C]*[cFT0C] + 4.0*(49.7503 + -1.29008*[cFT0C] + 0.0160059*[cFT0C]*[cFT0C] + -7.86846e-05*[cFT0C]*[cFT0C]*[cFT0C])) > [mPV] && (172.406 + -4.50219*[cFT0C] + 0.0543038*[cFT0C]*[cFT0C] + -0.000373213*[cFT0C]*[cFT0C]*[cFT0C] + 1.15322e-06*[cFT0C]*[cFT0C]*[cFT0C]*[cFT0C] - 2.5*(49.7503 + -1.29008*[cFT0C] + 0.0160059*[cFT0C]*[cFT0C] + -7.86846e-05*[cFT0C]*[cFT0C]*[cFT0C])) < [mPV] && (125.02 + -3.30255*[cFT0C] + 0.0398663*[cFT0C]*[cFT0C] + -0.000271942*[cFT0C]*[cFT0C]*[cFT0C] + 8.34098e-07*[cFT0C]*[cFT0C]*[cFT0C]*[cFT0C] + 4.0*(37.0244 + -0.949883*[cFT0C] + 0.0116622*[cFT0C]*[cFT0C] + -5.71117e-05*[cFT0C]*[cFT0C]*[cFT0C])) > [mGlob] && (125.02 + -3.30255*[cFT0C] + 0.0398663*[cFT0C]*[cFT0C] + -0.000271942*[cFT0C]*[cFT0C]*[cFT0C] + 8.34098e-07*[cFT0C]*[cFT0C]*[cFT0C]*[cFT0C] - 2.5*(37.0244 + -0.949883*[cFT0C] + 0.0116622*[cFT0C]*[cFT0C] + -5.71117e-05*[cFT0C]*[cFT0C]*[cFT0C])) < [mGlob] && (-0.223013 + 0.715849*[mPV] + 3*(0.664242 + 0.0829653*[mPV] + -0.000503733*[mPV]*[mPV] + 1.21185e-06*[mPV]*[mPV]*[mPV])) > [mGlob]
463-
*/
464460
template <class CollType>
465461
bool passOutlier(CollType const& collision)
466462
{
@@ -1180,6 +1176,7 @@ struct CorrelationTask {
11801176
if (!passMLScore(p2track))
11811177
continue;
11821178
}
1179+
same->getTrackHistEfficiency()->Fill(CorrelationContainer::RecoAll, p2track.eta(), p2track.pt(), 4, multiplicity, mcCollision.posZ());
11831180
auto fillMC2p = [&](const aod::CFTracksWithLabel::iterator& p) -> bool {
11841181
if (!p.has_cfMCParticle())
11851182
return false;
@@ -1191,7 +1188,6 @@ struct CorrelationTask {
11911188
return false;
11921189
const auto& mcParticle = mcParticles.iteratorAt(*m - mcParticles.begin().globalIndex());
11931190
same->getTrackHistEfficiency()->Fill(CorrelationContainer::RecoPrimaries, mcParticle.eta(), mcParticle.pt(), 4, multiplicity, mcCollision.posZ());
1194-
same->getTrackHistEfficiency()->Fill(CorrelationContainer::RecoAll, mcParticle.eta(), mcParticle.pt(), 4, multiplicity, mcCollision.posZ());
11951191
return true;
11961192
};
11971193
if (p2track.has_cfTrackProng0()) {
@@ -1204,11 +1200,6 @@ struct CorrelationTask {
12041200
continue;
12051201
}
12061202

1207-
// alternatively, book the reco pTs directly
1208-
// same->getTrackHistEfficiency()->Fill(CorrelationContainer::RecoPrimaries, p2track.eta(), p2track.pt(), 4, multiplicity, mcCollision.posZ());
1209-
// same->getTrackHistEfficiency()->Fill(CorrelationContainer::RecoAll, p2track.eta(), p2track.pt(), 4, multiplicity, mcCollision.posZ());
1210-
// continue;
1211-
12121203
// fake track
12131204
same->getTrackHistEfficiency()->Fill(CorrelationContainer::Fake, p2track.eta(), p2track.pt(), 4, multiplicity, mcCollision.posZ());
12141205
}

PWGCF/TwoParticleCorrelations/Tasks/pidDiHadron.cxx

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ struct PidDiHadron {
184184
// make the filters and cuts.
185185
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVertex);
186186
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtPOIMin) && (aod::track::pt < cfgCutPtPOIMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
187+
187188
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
188189
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFbeta, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>>;
190+
using FilteredMcTracks = soa::Filtered<soa::Join<aod::Tracks, aod::McTrackLabels, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFbeta, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>>;
189191
using V0TrackCandidate = aod::V0Datas;
190192

191193
Preslice<aod::Tracks> perCollision = aod::track::collisionId;
@@ -356,7 +358,7 @@ struct PidDiHadron {
356358
massAxisReso = {resoSwitchVals[kMassBins][iPhi], resoCutVals[kMassMin][iPhi], resoCutVals[kMassMax][iPhi], "M_{K^{+}K^{-}} (GeV/c^{2})"};
357359

358360
// Event Counter
359-
if ((doprocessSame || doprocessSameReso) && cfgUseAdditionalEventCut) {
361+
if ((doprocessSame || doprocessSameReso || doprocessMC) && cfgUseAdditionalEventCut) {
360362
histos.add("hEventCount", "Number of Events;; Count", {HistType::kTH1D, {{15, -0.5, 14.5}}});
361363
histos.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kFilteredEvents + 1, "Filtered event");
362364
histos.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kAfterSel8 + 1, "After sel8");
@@ -512,6 +514,19 @@ struct PidDiHadron {
512514
if (doprocessMixed || doprocessMixedReso) {
513515
histos.add("deltaEta_deltaPhi_mixed", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEta}});
514516
}
517+
if (doprocessMC) {
518+
histos.add("hNsigmaPionTruePositives", "hNsigmaPionTruePositives", {HistType::kTH1D, {axisPt}}); // Fraction of particles that are pions and selected as pions
519+
histos.add("hNsigmaKaonTruePositives", "hNsigmaKaonTruePositives", {HistType::kTH1D, {axisPt}}); // Fraction of particles that are kaons and selected as kaons
520+
histos.add("hNsigmaProtonTruePositives", "hNsigmaProtonTruePositives", {HistType::kTH1D, {axisPt}}); // Fraction of particles that are protons and selected as protons
521+
522+
histos.add("hNsigmaPionSelected", "hNsigmaPionSelected", {HistType::kTH1D, {axisPt}});
523+
histos.add("hNsigmaKaonSelected", "hNsigmaKaonSelected", {HistType::kTH1D, {axisPt}});
524+
histos.add("hNsigmaProtonSelected", "hNsigmaProtonSelected", {HistType::kTH1D, {axisPt}});
525+
526+
histos.add("hNsigmaPionTrue", "hNsigmaPionTrue", {HistType::kTH1D, {axisPt}}); // All true pions from MC
527+
histos.add("hNsigmaKaonTrue", "hNsigmaKaonTrue", {HistType::kTH1D, {axisPt}}); // All true kaons from MC
528+
histos.add("hNsigmaProtonTrue", "hNsigmaProtonTrue", {HistType::kTH1D, {axisPt}}); // All true protons from MC
529+
}
515530

516531
histos.add("eventcount", "bin", {HistType::kTH1F, {{4, 0, 4, "bin"}}}); // histogram to see how many events are in the same and mixed event
517532

@@ -1467,6 +1482,66 @@ struct PidDiHadron {
14671482
}
14681483
}
14691484
PROCESS_SWITCH(PidDiHadron, processMixedReso, "Process mixed events", true);
1485+
1486+
void processMC(FilteredCollisions::iterator const& collision, FilteredMcTracks const& tracksmc, aod::BCsWithTimestamps const&, aod::McParticles const&)
1487+
{
1488+
float cent = -1.;
1489+
if (!cfgCentTableUnavailable)
1490+
cent = getCentrality(collision);
1491+
if (cfgUseAdditionalEventCut && !selectionEvent(collision, tracksmc.size(), cent, true))
1492+
return;
1493+
1494+
if (cfgSelCollByNch && (tracksmc.size() < cfgCutMultMin || tracksmc.size() >= cfgCutMultMax)) {
1495+
return;
1496+
}
1497+
if (!cfgSelCollByNch && !cfgCentTableUnavailable && (cent < cfgCutCentMin || cent >= cfgCutCentMax)) {
1498+
return;
1499+
}
1500+
1501+
// loop over all tracks
1502+
for (auto const& track : tracksmc) {
1503+
1504+
if (!trackSelected(track))
1505+
continue;
1506+
1507+
int pidIndex = getNsigmaPID(track);
1508+
1509+
// Fill Counts for selection through Nsigma cuts
1510+
if (pidIndex == kPions)
1511+
histos.fill(HIST("hNsigmaPionSelected"), track.pt());
1512+
if (pidIndex == kKaons)
1513+
histos.fill(HIST("hNsigmaKaonSelected"), track.pt());
1514+
if (pidIndex == kProtons)
1515+
histos.fill(HIST("hNsigmaProtonSelected"), track.pt());
1516+
1517+
// Check the PDG code for the particles (MC truth) and match with analysed Nsigma PID
1518+
if (std::abs(track.mcParticle().pdgCode()) == PDG_t::kPiPlus) {
1519+
histos.fill(HIST("hNsigmaPionTrue"), track.pt());
1520+
1521+
if (pidIndex == kPions) {
1522+
histos.fill(HIST("hNsigmaPionTruePositives"), track.pt());
1523+
}
1524+
} // Pion condition
1525+
1526+
if (std::abs(track.mcParticle().pdgCode()) == PDG_t::kKPlus) {
1527+
histos.fill(HIST("hNsigmaKaonTrue"), track.pt());
1528+
1529+
if (pidIndex == kKaons) {
1530+
histos.fill(HIST("hNsigmaKaonTruePositives"), track.pt());
1531+
}
1532+
} // Kaon condition
1533+
1534+
if (std::abs(track.mcParticle().pdgCode()) == PDG_t::kProton) {
1535+
histos.fill(HIST("hNsigmaProtonTrue"), track.pt());
1536+
1537+
if (pidIndex == kProtons) {
1538+
histos.fill(HIST("hNsigmaProtonTruePositives"), track.pt());
1539+
}
1540+
} // Proton condition
1541+
1542+
} // end of tracks MC loop
1543+
} // end of process MC
1544+
PROCESS_SWITCH(PidDiHadron, processMC, "Process Monte Carlo", true);
14701545
};
14711546

14721547
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)