Skip to content

Commit dcf577f

Browse files
committed
Merge branch 'master' into fixes-PWGCF
2 parents 035f8a3 + 8759a48 commit dcf577f

File tree

209 files changed

+8727
-4282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+8727
-4282
lines changed

ALICE3/Tasks/alice3TrackingPerformance.cxx

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
///
1414
/// \brief This task produces the tracking performance
1515
///
16-
/// \author Nicolò Jacazio, Universita del Piemonte Orientale (IT)
16+
/// \author Nicolò Jacazio, Università del Piemonte Orientale (IT)
1717
/// \since May 27, 2025
1818
///
1919

@@ -46,7 +46,9 @@ std::map<int, std::shared_ptr<TH1>> particlePtDistribution;
4646
std::map<int, std::shared_ptr<TH1>> particleEtaDistribution;
4747
std::map<int, std::shared_ptr<TH1>> ptDistribution;
4848
std::map<int, std::shared_ptr<TH2>> ptResolutionVsPt;
49+
std::map<int, std::shared_ptr<TProfile2D>> ptResolutionVsEta;
4950
std::map<int, std::shared_ptr<TH2>> invPtResolutionVsPt;
51+
std::map<int, std::shared_ptr<TProfile2D>> invPtResolutionVsEta;
5052
std::map<int, std::shared_ptr<TH2>> dcaXyResolutionVsPt;
5153
std::map<int, std::shared_ptr<TH2>> dcaZResolutionVsPt;
5254

@@ -57,26 +59,30 @@ struct Alice3TrackingPerformance {
5759

5860
void init(o2::framework::InitContext&)
5961
{
60-
const AxisSpec axisPt{100, 0, 10, "p_{T} (GeV/c)"};
62+
const AxisSpec axisPt{500, 0, 100, "#it{p}_{T} (GeV/#it{c})"};
6163
const AxisSpec axisEta{100, etaRange.value.first, etaRange.value.second, "#eta"};
62-
const AxisSpec axisPtDelta{100, -1, 1, "p_{T}^{gen} - p_{T}^{reco} (GeV/c)"};
63-
const AxisSpec axisInvPtDelta{100, -1, 1, "1./p_{T}^{gen} - 1./p_{T}^{reco} (GeV/c)^{-1}"};
64+
const AxisSpec axisPtDelta{100, -1, 1, "(#it{p}_{T}^{reco} - #it{p}_{T}^{gen}) / #it{p}_{T}^{gen}"};
65+
const AxisSpec axisInvPtDelta{100, -1, 1, "1./#it{p}_{T}^{gen} - 1./#it{p}_{T}^{reco} (GeV/#it{c})^{-1}"};
6466
const AxisSpec axisDcaXy{100, -1, 1, "DCA_{xy} (cm)"};
6567
const AxisSpec axisDcaZ{100, -1, 1, "DCA_{z} (cm)"};
6668
particlePdgCodes = histos.add<TH1>("particlePdgCodes", "", kTH1D, {AxisSpec{100, -0.5, 99.5, "PDG Code"}});
6769
for (const int& pdg : pdgCodes.value) {
68-
std::string tag = Form("_%d", pdg);
70+
std::string prefix = Form("%i", pdg);
6971
if (pdg < 0) {
70-
tag = Form("_m%d", -pdg);
72+
prefix = Form("m%i", -pdg);
7173
}
72-
particlePtDistribution[pdg] = histos.add<TH1>("particlePtDistribution" + tag, "", kTH1D, {axisPt});
73-
particleEtaDistribution[pdg] = histos.add<TH1>("particleEtaDistribution" + tag, "", kTH1D, {axisEta});
74+
const std::string tag = "_" + prefix;
75+
prefix += "/";
76+
particlePtDistribution[pdg] = histos.add<TH1>(prefix + "particlePtDistribution" + tag, "", kTH1D, {axisPt});
77+
particleEtaDistribution[pdg] = histos.add<TH1>(prefix + "particleEtaDistribution" + tag, "", kTH1D, {axisEta});
7478

75-
ptDistribution[pdg] = histos.add<TH1>("ptDistribution" + tag, "", kTH1D, {axisPt});
76-
ptResolutionVsPt[pdg] = histos.add<TH2>("ptResolutionVsPt" + tag, "", kTH2D, {axisPt, axisPtDelta});
77-
invPtResolutionVsPt[pdg] = histos.add<TH2>("invPtResolutionVsPt" + tag, "", kTH2D, {axisPt, axisInvPtDelta});
78-
dcaXyResolutionVsPt[pdg] = histos.add<TH2>("dcaXyResolutionVsPt" + tag, "", kTH2D, {axisPt, axisDcaXy});
79-
dcaZResolutionVsPt[pdg] = histos.add<TH2>("dcaZResolutionVsPt" + tag, "", kTH2D, {axisPt, axisDcaZ});
79+
ptDistribution[pdg] = histos.add<TH1>(prefix + "ptDistribution" + tag, "", kTH1D, {axisPt});
80+
ptResolutionVsPt[pdg] = histos.add<TH2>(prefix + "ptResolutionVsPt" + tag, "", kTH2D, {axisPt, axisPtDelta});
81+
ptResolutionVsEta[pdg] = histos.add<TProfile2D>(prefix + "ptResolutionVsEta" + tag, "", kTProfile2D, {axisPt, axisEta});
82+
invPtResolutionVsPt[pdg] = histos.add<TH2>(prefix + "invPtResolutionVsPt" + tag, "", kTH2D, {axisPt, axisInvPtDelta});
83+
invPtResolutionVsEta[pdg] = histos.add<TProfile2D>(prefix + "invPtResolutionVsEta" + tag, "", kTProfile2D, {axisPt, axisEta});
84+
dcaXyResolutionVsPt[pdg] = histos.add<TH2>(prefix + "dcaXyResolutionVsPt" + tag, "", kTH2D, {axisPt, axisDcaXy});
85+
dcaZResolutionVsPt[pdg] = histos.add<TH2>(prefix + "dcaZResolutionVsPt" + tag, "", kTH2D, {axisPt, axisDcaZ});
8086
}
8187
}
8288

@@ -110,26 +116,32 @@ struct Alice3TrackingPerformance {
110116
particleEtaDistribution[mcParticle.pdgCode()]->Fill(mcParticle.eta());
111117
}
112118
for (const auto& track : tracks) {
113-
ptDistribution[0]->Fill(track.pt());
114119
if (!track.has_mcParticle()) {
115120
continue;
116121
}
117122
const auto& mcParticle = track.mcParticle();
118-
ptResolutionVsPt[0]->Fill(mcParticle.pt(), mcParticle.pt() - track.pt());
119-
invPtResolutionVsPt[0]->Fill(mcParticle.pt(), 1.f / mcParticle.pt() - 1.f / track.pt());
120-
dcaXyResolutionVsPt[0]->Fill(mcParticle.pt(), track.dcaXY());
121-
dcaZResolutionVsPt[0]->Fill(mcParticle.pt(), track.dcaZ());
123+
const float ptResolution = (track.pt() - mcParticle.pt()) / mcParticle.pt();
124+
const float invptResolution = 1.f / track.pt() - 1.f / mcParticle.pt();
125+
126+
auto fillResolutionHistograms = [&](const int p) {
127+
ptDistribution[p]->Fill(track.pt());
128+
ptResolutionVsPt[p]->Fill(mcParticle.pt(), ptResolution);
129+
ptResolutionVsEta[p]->Fill(mcParticle.pt(), mcParticle.eta(), ptResolution);
130+
invPtResolutionVsPt[p]->Fill(mcParticle.pt(), invptResolution);
131+
invPtResolutionVsEta[p]->Fill(mcParticle.pt(), mcParticle.eta(), invptResolution);
132+
dcaXyResolutionVsPt[p]->Fill(mcParticle.pt(), track.dcaXY());
133+
dcaZResolutionVsPt[p]->Fill(mcParticle.pt(), track.dcaZ());
134+
};
135+
136+
fillResolutionHistograms(0);
137+
122138
if (!isParticleSelected(mcParticle)) {
123139
continue;
124140
}
125141
if (ptResolutionVsPt.find(mcParticle.pdgCode()) == ptResolutionVsPt.end()) {
126142
continue;
127143
}
128-
ptDistribution[mcParticle.pdgCode()]->Fill(mcParticle.pt());
129-
ptResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), mcParticle.pt() - track.pt());
130-
invPtResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), 1.f / mcParticle.pt() - 1.f / track.pt());
131-
dcaXyResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), track.dcaXY());
132-
dcaZResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), track.dcaZ());
144+
fillResolutionHistograms(mcParticle.pdgCode());
133145
}
134146
}
135147
};

Common/Tools/Multiplicity/MultModule.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,11 +1233,11 @@ class MultModule
12331233
// invoke loading only for requested centralities
12341234
if (internalOpts.mEnabledTables[kCentFV0As])
12351235
getccdb(fv0aInfo, internalOpts.generatorName);
1236-
if (internalOpts.mEnabledTables[kCentFT0Ms])
1236+
if (internalOpts.mEnabledTables[kCentFT0Ms] || internalOpts.mEnabledTables[kBCCentFT0Ms])
12371237
getccdb(ft0mInfo, internalOpts.generatorName);
1238-
if (internalOpts.mEnabledTables[kCentFT0As])
1238+
if (internalOpts.mEnabledTables[kCentFT0As] || internalOpts.mEnabledTables[kBCCentFT0As])
12391239
getccdb(ft0aInfo, internalOpts.generatorName);
1240-
if (internalOpts.mEnabledTables[kCentFT0Cs])
1240+
if (internalOpts.mEnabledTables[kCentFT0Cs] || internalOpts.mEnabledTables[kBCCentFT0Cs])
12411241
getccdb(ft0cInfo, internalOpts.generatorName);
12421242
if (internalOpts.mEnabledTables[kCentFT0CVariant1s])
12431243
getccdb(ft0cVariant1Info, internalOpts.generatorName);

DPG/Tasks/AOTTrack/qaEfficiency.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ struct QaEfficiency {
201201
Configurable<bool> numSameCollision{"numSameCollision", false, "Flag to ask that the numerator is in the same collision as the denominator"};
202202
Configurable<bool> noFakesHits{"noFakesHits", false, "Flag to reject tracks that have fake hits"};
203203
Configurable<bool> skipEventsWithoutTPCTracks{"skipEventsWithoutTPCTracks", false, "Flag to reject events that have no tracks reconstructed in the TPC"};
204+
Configurable<bool> skipParticlesFromBackgroundEvents{"skipParticlesFromBackgroundEvents", false, "Flag to reject particles from background events (for embedded MC)"};
204205
Configurable<float> maxProdRadius{"maxProdRadius", 9999.f, "Maximum production radius of the particle under study"};
205206
Configurable<float> nsigmaTPCDe{"nsigmaTPCDe", 3.f, "Value of the Nsigma TPC cut for deuterons PID"};
206207
// Charge selection
@@ -1548,6 +1549,9 @@ struct QaEfficiency {
15481549
histos.fill(countingHisto, trkCutIdxHasMcPart); // Tracks with particles (i.e. no fakes)
15491550
}
15501551
const auto mcParticle = track.mcParticle();
1552+
if (skipParticlesFromBackgroundEvents && mcParticle.fromBackgroundEvent()) {
1553+
return false;
1554+
}
15511555
if (!isInAcceptance<true, doFillHisto>(mcParticle, countingHisto, trkCutIdxHasMcPart)) {
15521556
// 3: pt cut 4: eta cut 5: phi cut 6: y cut
15531557
return false;
@@ -1913,6 +1917,9 @@ struct QaEfficiency {
19131917

19141918
/// only to fill denominator of ITS-TPC matched primary tracks only in MC events with at least 1 reco. vtx
19151919
for (const auto& particle : groupedMcParticles) { // Particle loop
1920+
if (skipParticlesFromBackgroundEvents && particle.fromBackgroundEvent()) {
1921+
continue;
1922+
}
19161923

19171924
/// require generated particle in acceptance
19181925
if (!isInAcceptance<true, false>(particle, nullptr)) {
@@ -1968,6 +1975,9 @@ struct QaEfficiency {
19681975
// Loop on particles to fill the denominator
19691976
float dNdEta = 0; // Multiplicity
19701977
for (const auto& mcParticle : groupedMcParticles) {
1978+
if (skipParticlesFromBackgroundEvents && mcParticle.fromBackgroundEvent()) {
1979+
continue;
1980+
}
19711981
if (TMath::Abs(mcParticle.eta()) <= 2.f && !mcParticle.has_daughters()) {
19721982
dNdEta += 1.f;
19731983
}

PWGCF/DataModel/CorrelationsDerived.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ DECLARE_SOA_TABLE(CFMcParticles, "AOD", "CFMCPARTICLE", //! Reduced MC particle
4545
mcparticle::IsPhysicalPrimary<mcparticle::Flags>);
4646
using CFMcParticle = CFMcParticles::iterator;
4747

48+
namespace cfmultiplicity
49+
{
50+
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float);
51+
}
52+
DECLARE_SOA_TABLE(CFMultiplicities, "AOD", "CFMULTIPLICITY", cfmultiplicity::Multiplicity);
53+
54+
using CFMultiplicity = CFMultiplicities::iterator;
55+
4856
namespace cfcollision
4957
{
5058
DECLARE_SOA_INDEX_COLUMN(CFMcCollision, cfMcCollision); //! Index to reduced MC collision
@@ -156,7 +164,8 @@ enum ParticleDecay {
156164
LambdaToPPiTight,
157165
AntiLambdaToPiPLoose,
158166
AntiLambdaToPiPTight,
159-
D0barToKPiExclusive
167+
D0barToKPiExclusive,
168+
PhiToKKPID3Mixed
160169
};
161170
} // namespace cf2prongtrack
162171
DECLARE_SOA_TABLE(CF2ProngTracks, "AOD", "CF2PRONGTRACK", //! Reduced track table
@@ -185,9 +194,10 @@ namespace cf2prongmcpart
185194
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh0, cfParticleDaugh0, int, CFMcParticles, "_0"); //! Index to prong 1 CFMcParticle
186195
DECLARE_SOA_INDEX_COLUMN_FULL(CFParticleDaugh1, cfParticleDaugh1, int, CFMcParticles, "_1"); //! Index to prong 2 CFMcParticle
187196
DECLARE_SOA_COLUMN(Decay, decay, uint8_t); //! Particle decay and flags
188-
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x7f; }); //! MC particle decay
197+
DECLARE_SOA_DYNAMIC_COLUMN(McDecay, mcDecay, [](uint8_t decay) -> uint8_t { return decay & 0x3f; }); //! MC particle decay
189198
enum ParticleDecayFlags {
190-
Prompt = 0x80
199+
Prompt = 0x40,
200+
NonPrompt = 0x80
191201
};
192202
} // namespace cf2prongmcpart
193203
DECLARE_SOA_TABLE(CF2ProngMcParts, "AOD", "CF2PRONGMCPART", //! Table for the daughter particles of a 2-prong particle, to be joined with CFMcParticles

PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ struct NetProtCumulants {
9292
Configurable<bool> cfgIfRejectElectron{"cfgIfRejectElectron", true, "Remove electrons"};
9393
Configurable<bool> cfgIfMandatoryTOF{"cfgIfMandatoryTOF", true, "Mandatory TOF requirement to remove pileup"};
9494
Configurable<bool> cfgEvSelkIsVertexTOFmatched{"cfgEvSelkIsVertexTOFmatched", true, "If matched with TOF, for pileup"};
95+
Configurable<bool> cfgEvSelkIsGoodZvtxFT0vsPV{"cfgEvSelkIsGoodZvtxFT0vsPV", false, "Apply kIsGoodZvtxFT0vsPV event selection"};
9596
ConfigurableAxis cfgCentralityBins{"cfgCentralityBins", {90, 0., 90.}, "Centrality/Multiplicity percentile bining"};
9697

9798
// Connect to ccdb
@@ -1069,7 +1070,7 @@ struct NetProtCumulants {
10691070
}
10701071
//-------------------------------------------------------------------------------------------
10711072
}
1072-
PROCESS_SWITCH(NetProtCumulants, processMCGen, "Process Generated", false);
1073+
PROCESS_SWITCH(NetProtCumulants, processMCGen, "Process Generated", true);
10731074

10741075
void processMCRec(MyMCRecCollision const& collision, MyMCTracks const& tracks, aod::McCollisions const&, aod::McParticles const&)
10751076
{
@@ -1088,7 +1089,9 @@ struct NetProtCumulants {
10881089
}
10891090
if (cfgEvSelkIsVertexTOFmatched && !(collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched))) {
10901091
return;
1091-
;
1092+
}
1093+
if (cfgEvSelkIsGoodZvtxFT0vsPV && !(collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV))) {
1094+
return;
10921095
}
10931096

10941097
auto cent = collision.centFT0C();
@@ -2017,7 +2020,7 @@ struct NetProtCumulants {
20172020
histos.get<TProfile2D>(HIST("Prof2D_Q112221_111"))->Fill(cent, sampleIndex, fQ112221_111);
20182021
}
20192022
}
2020-
PROCESS_SWITCH(NetProtCumulants, processMCRec, "Process Generated", false);
2023+
PROCESS_SWITCH(NetProtCumulants, processMCRec, "Process Generated", true);
20212024

20222025
void processDataRec(AodCollisions::iterator const& coll, aod::BCsWithTimestamps const&, AodTracks const& inputTracks)
20232026
{
@@ -2035,7 +2038,10 @@ struct NetProtCumulants {
20352038

20362039
if (cfgEvSelkIsVertexTOFmatched && !(coll.selection_bit(o2::aod::evsel::kIsVertexTOFmatched))) {
20372040
return;
2038-
;
2041+
}
2042+
2043+
if (cfgEvSelkIsGoodZvtxFT0vsPV && !(coll.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV))) {
2044+
return;
20392045
}
20402046

20412047
histos.fill(HIST("hZvtx_after"), coll.posZ());
@@ -2969,7 +2975,7 @@ struct NetProtCumulants {
29692975
histos.get<TProfile2D>(HIST("Prof2D_Q112221_111"))->Fill(cent, sampleIndex, fQ112221_111);
29702976
}
29712977
}
2972-
PROCESS_SWITCH(NetProtCumulants, processDataRec, "Process real data", true);
2978+
PROCESS_SWITCH(NetProtCumulants, processDataRec, "Process real data", false);
29732979
};
29742980

29752981
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)