Skip to content

Commit d93d68f

Browse files
authored
Merge branch 'master' into master
2 parents 5959396 + 7814a61 commit d93d68f

File tree

22 files changed

+1985
-1041
lines changed

22 files changed

+1985
-1041
lines changed

PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,9 @@ struct FemtoUniverseProducerTask {
884884
if (particle.isPhysicalPrimary()) {
885885
return 0;
886886
} else if (particle.has_mothers()) {
887+
if (particle.getProcess() == 20 || particle.getProcess() == 23) { // treat particles from hadronic scattering (20, 23) as primary
888+
return 0;
889+
}
887890
auto motherparticlesMC = particle.template mothers_as<aod::McParticles>();
888891
auto motherparticleMC = motherparticlesMC.front();
889892
return motherparticleMC.pdgCode();
@@ -2142,6 +2145,7 @@ struct FemtoUniverseProducerTask {
21422145
// instead of the bitmask, the PDG of the particle is stored as uint32_t
21432146

21442147
int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode();
2148+
int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0;
21452149

21462150
// now the table is filled
21472151
if constexpr (resolveDaughs) {
@@ -2156,7 +2160,7 @@ struct FemtoUniverseProducerTask {
21562160
particle.eta(),
21572161
particle.phi(),
21582162
aod::femtouniverseparticle::ParticleType::kMCTruthTrack,
2159-
0,
2163+
variableCut,
21602164
pdgCode,
21612165
variablePDG,
21622166
childIDs,
@@ -2195,13 +2199,14 @@ struct FemtoUniverseProducerTask {
21952199
}
21962200

21972201
int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode();
2202+
int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0;
21982203

21992204
outputParts(outputCollision.lastIndex(),
22002205
particle.pt(),
22012206
particle.eta(),
22022207
particle.phi(),
22032208
aod::femtouniverseparticle::ParticleType::kMCTruthTrack,
2204-
0,
2209+
variableCut,
22052210
static_cast<uint32_t>(particle.pdgCode()),
22062211
variablePDG,
22072212
childIDs,

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
366366
}
367367
if (doprocessFractionsMCTruth) {
368368
mixedMultRegistryPM.add("MCtruth/motherParticle", "pair fractions; part1 mother PDG; part2 mother PDG", {HistType::kTH2F, {{8001, -4000, 4000}, {8001, -4000, 4000}}});
369+
mixedMultRegistryPM.add("MCtruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
369370
}
370371
}
371372

@@ -376,6 +377,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
376377
}
377378
if (doprocessFractionsMCTruth) {
378379
mixedMultRegistryPP.add("MCtruth/motherParticle", "pair fractions; part1 mother PDG; part2 mother PDG", {HistType::kTH2F, {{8001, -4000, 4000}, {8001, -4000, 4000}}});
380+
mixedMultRegistryPP.add("MCtruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
379381
}
380382
sameEventContPP.init(&resultRegistryPP, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
381383
mixedEventContPP.init(&resultRegistryPP, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
@@ -395,6 +397,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
395397
}
396398
if (doprocessFractionsMCTruth) {
397399
mixedMultRegistryMM.add("MCtruth/motherParticle", "pair fractions; part1 mother PDG; part2 mother PDG", {HistType::kTH2F, {{8001, -4000, 4000}, {8001, -4000, 4000}}});
400+
mixedMultRegistryMM.add("MCtruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
398401
}
399402
sameEventContMM.init(&resultRegistryMM, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
400403
mixedEventContMM.init(&resultRegistryMM, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
@@ -955,6 +958,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
955958
const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo);
956959
if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) {
957960
mixedMultRegistryPM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
961+
mixedMultRegistryPM.fill(HIST("MCtruth/mcProcess"), p1.cut(), p2.cut());
958962
}
959963
}
960964
break;
@@ -967,6 +971,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
967971
const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo);
968972
if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == trackonefilter.confPDGCodePartOne)) {
969973
mixedMultRegistryPP.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
974+
mixedMultRegistryPP.fill(HIST("MCtruth/mcProcess"), p1.cut(), p2.cut());
970975
}
971976
}
972977
break;
@@ -979,6 +984,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
979984
const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo);
980985
if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == tracktwofilter.confPDGCodePartTwo) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) {
981986
mixedMultRegistryMM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
987+
mixedMultRegistryMM.fill(HIST("MCtruth/mcProcess"), p1.cut(), p2.cut());
982988
}
983989
}
984990
break;

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
336336

337337
if (doprocessPairFractionsMCTruthV0 || doprocessPairFractionsMCTruth) {
338338
registryMCtruth.add("mothersTruth/motherParticle", "pair fractions;part1 mother PDG;part2 mother PDG", {HistType::kTH2F, {confMotherPDGBins, confMotherPDGBins}});
339+
registryMCtruth.add("mothersTruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
339340
}
340341

341342
// MC reco
@@ -1547,6 +1548,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
15471548
continue;
15481549

15491550
registryMCtruth.fill(HIST("mothersTruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
1551+
registryMCtruth.fill(HIST("mothersTruth/mcProcess"), p1.cut(), p2.cut());
15501552
}
15511553
};
15521554

@@ -1580,6 +1582,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
15801582
continue;
15811583

15821584
registryMCtruth.fill(HIST("mothersTruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
1585+
registryMCtruth.fill(HIST("mothersTruth/mcProcess"), p1.cut(), p2.cut());
15831586
}
15841587
};
15851588

PWGCF/Flow/Tasks/flowZdcEnergy.cxx

Lines changed: 71 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
/// \since 03/2026
1515
/// \brief Study ZDC energy observables versus centrality for Run 2 / Run 3.
1616

17+
#include "Common/Core/TrackSelection.h"
1718
#include "Common/DataModel/Centrality.h"
1819
#include "Common/DataModel/EventSelection.h"
1920
#include "Common/DataModel/Multiplicity.h"
21+
#include "Common/DataModel/TrackSelectionTables.h"
2022

2123
#include "CCDB/BasicCCDBManager.h"
2224
#include "Framework/AnalysisTask.h"
@@ -30,18 +32,28 @@
3032

3133
using namespace o2;
3234
using namespace o2::framework;
35+
using namespace o2::framework::expressions;
3336

3437
#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};
3538

3639
struct flowZdcEnergy {
3740

3841
struct : ConfigurableGroup{
39-
O2_DEFINE_CONFIGURABLE(cfgCentMin, float, 0.f, "Minimum centrality for selected events")
40-
O2_DEFINE_CONFIGURABLE(cfgCentMax, float, 90.f, "Maximum centrality for selected events")
41-
O2_DEFINE_CONFIGURABLE(cfgVtxZ, float, 10.f, "Accepted z-vertex range")} evsel;
42+
O2_DEFINE_CONFIGURABLE(cfgUseEvsel, bool, true, "whether to enable event selection")
43+
O2_DEFINE_CONFIGURABLE(cfgCentMin, float, 0.f, "Minimum centrality for selected events")
44+
O2_DEFINE_CONFIGURABLE(cfgCentMax, float, 90.f, "Maximum centrality for selected events")
45+
O2_DEFINE_CONFIGURABLE(cfgVtxZ, float, 10.f, "Accepted z-vertex range")} evsel;
46+
47+
O2_DEFINE_CONFIGURABLE(cfgEtaMax, float, 0.8f, "Maximum track #eta")
48+
O2_DEFINE_CONFIGURABLE(cfgPtMin, float, 0.2f, "Minimum track #P_{t}")
49+
O2_DEFINE_CONFIGURABLE(cfgPtMax, float, 10.0f, "Maximum track #P_{t}")
50+
O2_DEFINE_CONFIGURABLE(cfgDcaXYMax, float, 0.2f, "Maximum DCAxy")
51+
O2_DEFINE_CONFIGURABLE(cfgDcaZMax, float, 2.0f, "Maximum DCAz")
4252

4353
ConfigurableAxis axisCent{"axisCent", {90, 0, 90}, "Centrality (%)"};
4454
ConfigurableAxis axisMult{"axisMult", {100, 0, 100000}, "Multiplicity"};
55+
ConfigurableAxis axisPt{"axisPt", {100, 0, 15}, "#P_{t}"};
56+
ConfigurableAxis axisEta{"axisEta", {64, -1.6, 1.6}, "#eta"};
4557
ConfigurableAxis axisEnergy{"axisEnergy", {300, 0, 300}, "Energy"};
4658
ConfigurableAxis axisRescaledDiff{"axisRescaledDiff", {400, -1, 1}, "(EA-EC)/(EA+EC)"};
4759

@@ -59,6 +71,8 @@ struct flowZdcEnergy {
5971
Service<ccdb::BasicCCDBManager> ccdb;
6072
HistogramRegistry registry{"registry"};
6173

74+
Filter trackFilter = nabs(aod::track::eta) < cfgEtaMax && aod::track::pt > cfgPtMin&& aod::track::pt < cfgPtMax&& nabs(aod::track::dcaXY) < cfgDcaXYMax&& nabs(aod::track::dcaZ) < cfgDcaZMax;
75+
using UsedTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>>;
6276
// Run 3
6377
using CollisionsRun3 = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs>;
6478
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
@@ -77,17 +91,20 @@ struct flowZdcEnergy {
7791
.count();
7892
ccdb->setCreatedNotAfter(now);
7993

80-
registry.add("hEventCount", "Event counter;Selection;Events", {HistType::kTH1D, {{kNSelections, 0, kNSelections}}});
81-
auto hCount = registry.get<TH1>(HIST("hEventCount"));
94+
registry.add("QA/hEventCount", "Event counter;Selection;Events", {HistType::kTH1D, {{kNSelections, 0, kNSelections}}});
95+
auto hCount = registry.get<TH1>(HIST("QA/hEventCount"));
8296
hCount->GetXaxis()->SetBinLabel(kAllEvents + 1, "All events");
8397
hCount->GetXaxis()->SetBinLabel(kSeln + 1, "Sel7/8");
8498
hCount->GetXaxis()->SetBinLabel(kZvtx + 1, "Zvtx");
8599
hCount->GetXaxis()->SetBinLabel(kCentrality + 1, "Centrality");
86100
hCount->GetXaxis()->SetBinLabel(kBCHasZDC + 1, "BC has ZDC");
87101
hCount->GetXaxis()->SetBinLabel(kSelectedZDC + 1, "Selected ZDC");
88102

89-
registry.add("hCentrality", "", {HistType::kTH1D, {axisCent}});
90-
registry.add("hMultiplicity", "", {HistType::kTH1D, {axisMult}});
103+
registry.add("QA/hCentrality", "", {HistType::kTH1D, {axisCent}});
104+
registry.add("QA/hMultiplicity", "", {HistType::kTH1D, {axisMult}});
105+
registry.add("QA/hMultiplicity_TPC", "", {HistType::kTH1D, {axisMult}});
106+
registry.add("QA/hPt", "", {HistType::kTH1D, {axisPt}});
107+
registry.add("QA/hEta", "", {HistType::kTH1D, {axisEta}});
91108

92109
registry.add("hEnergyWithCent_ZNA_Common", "", {HistType::kTH2D, {axisEnergy, axisCent}});
93110
registry.add("hEnergyWithCent_ZNC_Common", "", {HistType::kTH2D, {axisEnergy, axisCent}});
@@ -107,28 +124,31 @@ struct flowZdcEnergy {
107124

108125
// Helper: event selection
109126
template <typename TCollision>
110-
bool acceptEvent(TCollision const& collision, float centrality, const int runmode)
127+
bool acceptEvent(TCollision const& collision, bool UseEvsel, float centrality, const int runmode)
111128
{
112-
registry.fill(HIST("hEventCount"), kAllEvents);
113-
114-
if (runmode == 2 && !collision.sel7()) {
115-
return false;
116-
}
117-
if (runmode == 3 && !collision.sel8()) {
118-
return false;
119-
}
120-
registry.fill(HIST("hEventCount"), kSeln);
121-
122-
if (std::abs(collision.posZ()) > evsel.cfgVtxZ) {
123-
return false;
124-
}
125-
registry.fill(HIST("hEventCount"), kZvtx);
126-
127-
if (centrality < evsel.cfgCentMin || centrality > evsel.cfgCentMax) {
128-
return false;
129+
if (!UseEvsel) {
130+
registry.fill(HIST("QA/hEventCount"), kAllEvents);
131+
registry.fill(HIST("QA/hEventCount"), kSeln);
132+
registry.fill(HIST("QA/hEventCount"), kZvtx);
133+
registry.fill(HIST("QA/hEventCount"), kCentrality);
134+
} else {
135+
registry.fill(HIST("QA/hEventCount"), kAllEvents);
136+
if (runmode == 2 && !collision.sel7()) {
137+
return false;
138+
}
139+
if (runmode == 3 && !collision.sel8()) {
140+
return false;
141+
}
142+
registry.fill(HIST("QA/hEventCount"), kSeln);
143+
if (std::abs(collision.posZ()) > evsel.cfgVtxZ) {
144+
return false;
145+
}
146+
registry.fill(HIST("QA/hEventCount"), kZvtx);
147+
if (centrality < evsel.cfgCentMin || centrality > evsel.cfgCentMax) {
148+
return false;
149+
}
150+
registry.fill(HIST("QA/hEventCount"), kCentrality);
129151
}
130-
registry.fill(HIST("hEventCount"), kCentrality);
131-
132152
return true;
133153
}
134154

@@ -140,13 +160,13 @@ struct flowZdcEnergy {
140160
if (!foundBC.has_zdc()) {
141161
return;
142162
}
143-
registry.fill(HIST("hEventCount"), kBCHasZDC);
163+
registry.fill(HIST("QA/hEventCount"), kBCHasZDC);
144164

145165
const auto& zdc = foundBC.zdc();
146166
if (zdc.energyCommonZNA() <= 1.f || zdc.energyCommonZNC() <= 1.f) {
147167
return;
148168
}
149-
registry.fill(HIST("hEventCount"), kSelectedZDC);
169+
registry.fill(HIST("QA/hEventCount"), kSelectedZDC);
150170

151171
const float energyCommonZNA = zdc.energyCommonZNA();
152172
const float energyCommonZNC = zdc.energyCommonZNC();
@@ -188,36 +208,50 @@ struct flowZdcEnergy {
188208

189209
// Run 3 process
190210
void processRun3(CollisionsRun3::iterator const& collision,
211+
UsedTracks const& tracks,
191212
BCsRun3 const&,
192213
aod::Zdcs const&)
193214
{
194215
const float centrality = collision.centFT0C();
195216
const float multi = collision.multFT0C();
217+
const float multiTPC = collision.multTPC();
196218

197-
if (!acceptEvent(collision, centrality, 3)) {
219+
if (!acceptEvent(collision, evsel.cfgUseEvsel, centrality, 3)) {
198220
return;
199221
}
200-
registry.fill(HIST("hCentrality"), centrality);
201-
registry.fill(HIST("hMultiplicity"), multi);
202-
222+
registry.fill(HIST("QA/hCentrality"), centrality);
223+
registry.fill(HIST("QA/hMultiplicity"), multi);
224+
registry.fill(HIST("QA/hMultiplicity_TPC"), multiTPC);
203225
fillZDCObservables<CollisionsRun3::iterator, BCsRun3>(collision, centrality);
226+
227+
for (const auto& track : tracks) {
228+
registry.fill(HIST("QA/hPt"), track.pt());
229+
registry.fill(HIST("QA/hEta"), track.eta());
230+
}
204231
}
205232

206233
// Run 2 process
207234
void processRun2(CollisionsRun2::iterator const& collision,
235+
UsedTracks const& tracks,
208236
BCsRun2 const&,
209237
aod::Zdcs const&)
210238
{
211239
const float centrality = collision.centRun2V0M();
212240
const float multi = collision.multFV0M();
241+
const float multiTPC = collision.multTPC();
213242

214-
if (!acceptEvent(collision, centrality, 2)) {
243+
if (!acceptEvent(collision, evsel.cfgUseEvsel, centrality, 2)) {
215244
return;
216245
}
217-
registry.fill(HIST("hCentrality"), centrality);
218-
registry.fill(HIST("hMultiplicity"), multi);
219-
246+
registry.fill(HIST("QA/hCentrality"), centrality);
247+
registry.fill(HIST("QA/hMultiplicity"), multi);
248+
registry.fill(HIST("QA/hMultiplicity_TPC"), multiTPC);
220249
fillZDCObservables<CollisionsRun2::iterator, BCsRun2>(collision, centrality);
250+
251+
for (const auto& track : tracks) {
252+
registry.fill(HIST("QA/hPt"), track.pt());
253+
registry.fill(HIST("QA/hEta"), track.eta());
254+
}
221255
}
222256

223257
// Process switches

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,15 +1822,15 @@ struct FlowGenericFramework {
18221822
if (withinPtRef && withinPtPOI && pid_index)
18231823
waccRef = waccPOI; // if particle is both (then it's overlap), override ref with POI
18241824
if (withinPtRef)
1825-
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccRef, 1);
1825+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccRef * weffInclusive, 1);
18261826
if (withinPtPOI && pid_index)
1827-
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI, (1 << (pid_index + 1)));
1827+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI * weff, (1 << (pid_index + 1)));
18281828
if (withinPtNch)
1829-
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI, 2);
1829+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI * weff * weffInclusive, 2);
18301830
if (withinPtPOI && withinPtRef && pid_index)
1831-
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI, (1 << (pid_index + 5)));
1831+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI * weff, (1 << (pid_index + 5)));
18321832
if (withinPtNch && withinPtRef)
1833-
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI, 32);
1833+
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI * weff * weffInclusive, 32);
18341834
} else { // Analysing only integrated flow
18351835
bool withinPtRef = (track.pt() > o2::analysis::gfw::ptreflow && track.pt() < o2::analysis::gfw::ptrefup);
18361836
bool withinPtPOI = (track.pt() > o2::analysis::gfw::ptpoilow && track.pt() < o2::analysis::gfw::ptpoiup);

0 commit comments

Comments
 (0)