Skip to content

Commit 4d09887

Browse files
authored
Merge branch 'AliceO2Group:master' into dev-dca
2 parents b2b7eea + 20c2770 commit 4d09887

8 files changed

Lines changed: 1030 additions & 231 deletions

File tree

PWGCF/Flow/Tasks/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,9 @@ o2physics_add_dpl_workflow(pid-flow-pt-corr
113113
SOURCES pidFlowPtCorr.cxx
114114
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::GFWCore
115115
COMPONENT_NAME Analysis)
116+
117+
o2physics_add_dpl_workflow(flow-gpol-ese
118+
SOURCES flowDirectedFlowTask.cxx
119+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
120+
COMPONENT_NAME Analysis)
121+

PWGCF/Flow/Tasks/flowDirectedFlowTask.cxx

Lines changed: 594 additions & 0 deletions
Large diffs are not rendered by default.

PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx

Lines changed: 92 additions & 46 deletions
Large diffs are not rendered by default.

PWGCF/Flow/Tasks/flowMc.cxx

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ struct FlowMc {
100100
O2_DEFINE_CONFIGURABLE(cfgCentVsIPTruth, std::string, "", "CCDB path to centrality vs IP truth")
101101
O2_DEFINE_CONFIGURABLE(cfgIsGlobalTrack, bool, false, "Use global tracks instead of hasTPC&&hasITS")
102102
O2_DEFINE_CONFIGURABLE(cfgK0Lambda0Enabled, bool, false, "Add K0 and Lambda0, for bulk particle efficiency please keep off")
103+
O2_DEFINE_CONFIGURABLE(cfgAcceptSecondaries, bool, false, "Accept secondary particles produced from decays")
104+
O2_DEFINE_CONFIGURABLE(cfgRequireTOF, bool, false, "Require that reconstructed tracks have TOF for resonance decays")
103105
O2_DEFINE_CONFIGURABLE(cfgFlowCumulantEnabled, bool, false, "switch of calculating flow")
104106
O2_DEFINE_CONFIGURABLE(cfgFlowCumulantNbootstrap, int, 30, "Number of subsamples")
105107
O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrUse, bool, false, "Use track density efficiency correction")
@@ -238,6 +240,12 @@ struct FlowMc {
238240
histos.add<TH2>("hPtNchGlobalK0", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
239241
histos.add<TH2>("hPtNchGeneratedLambda", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
240242
histos.add<TH2>("hPtNchGlobalLambda", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
243+
histos.add<TH2>("hPtNchGeneratedK0Pions", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
244+
histos.add<TH2>("hPtNchGlobalK0Pions", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
245+
histos.add<TH2>("hPtNchGeneratedLambdaPions", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
246+
histos.add<TH2>("hPtNchGlobalLambdaPions", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
247+
histos.add<TH2>("hPtNchGeneratedLambdaProtons", "Reco production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
248+
histos.add<TH2>("hPtNchGlobalLambdaProtons", "Global production; pT (GeV/c); multiplicity", HistType::kTH2D, {axisPt, axisNch});
241249
histos.add<TH1>("hPtMCGen", "Monte Carlo Truth; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
242250
histos.add<TH3>("hEtaPtVtxzMCGen", "Monte Carlo Truth; #eta; p_{T} (GeV/c); V_{z} (cm);", {HistType::kTH3D, {axisEta, axisPt, axisVertex}});
243251
histos.add<TH1>("hPtMCGlobal", "Monte Carlo Global; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
@@ -599,8 +607,13 @@ struct FlowMc {
599607
if (extraPDGType && pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
600608
continue;
601609

602-
if (!mcParticle.isPhysicalPrimary())
610+
bool isPhysicalPrimary = mcParticle.isPhysicalPrimary();
611+
const int producedByDecay = 4;
612+
bool isSecondary = (mcParticle.has_mothers() && mcParticle.getProcess() == producedByDecay);
613+
bool isAcceptedSecondary = (cfgAcceptSecondaries) ? isSecondary : false;
614+
if (!isPhysicalPrimary && !isAcceptedSecondary)
603615
continue;
616+
604617
if (std::fabs(mcParticle.eta()) > cfgCutEta) // main acceptance
605618
continue;
606619

@@ -621,11 +634,23 @@ struct FlowMc {
621634
histos.fill(HIST("hPtNchGeneratedK0"), mcParticle.pt(), nChGlobal);
622635
if (pdgCode == PDG_t::kLambda0)
623636
histos.fill(HIST("hPtNchGeneratedLambda"), mcParticle.pt(), nChGlobal);
624-
637+
if (mcParticle.has_daughters()) {
638+
for (const auto& d : mcParticle.template daughters_as<FilteredMcParticles>()) {
639+
if (std::abs(d.pdgCode()) == PDG_t::kPiPlus) {
640+
if (pdgCode == PDG_t::kK0Short)
641+
histos.fill(HIST("hPtNchGeneratedK0Pions"), d.pt(), nChGlobal);
642+
if (pdgCode == PDG_t::kLambda0)
643+
histos.fill(HIST("hPtNchGeneratedLambdaPions"), d.pt(), nChGlobal);
644+
}
645+
if (pdgCode == PDG_t::kLambda0 && std::abs(d.pdgCode()) == PDG_t::kProton)
646+
histos.fill(HIST("hPtNchGeneratedLambdaProtons"), d.pt(), nChGlobal);
647+
}
648+
}
625649
nCh++;
626650

627651
bool validGlobal = false;
628652
bool validTrack = false;
653+
bool validTOFTrack = false;
629654
bool validTPCTrack = false;
630655
bool validITSTrack = false;
631656
bool validITSABTrack = false;
@@ -643,6 +668,9 @@ struct FlowMc {
643668
if (!cfgIsGlobalTrack && track.hasTPC() && track.hasITS()) {
644669
validGlobal = true;
645670
}
671+
if (track.hasTOF() && validGlobal) {
672+
validTOFTrack = true;
673+
}
646674
if (track.hasTPC() || track.hasITS()) {
647675
validTrack = true;
648676
}
@@ -657,7 +685,6 @@ struct FlowMc {
657685
}
658686
}
659687
}
660-
661688
bool withinPtRef = (cfgCutPtRefMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtRefMax); // within RF pT range
662689
bool withinPtPOI = (cfgCutPtPOIMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtPOIMax); // within POI pT range
663690
if (cfgOutputNUAWeights && withinPtRef)
@@ -723,6 +750,24 @@ struct FlowMc {
723750
histos.fill(HIST("hPtNchGlobalK0"), mcParticle.pt(), nChGlobal);
724751
if (pdgCode == PDG_t::kLambda0)
725752
histos.fill(HIST("hPtNchGlobalLambda"), mcParticle.pt(), nChGlobal);
753+
if (!cfgRequireTOF || (cfgRequireTOF && validTOFTrack)) {
754+
if (mcParticle.has_mothers()) {
755+
for (const auto& m : mcParticle.template mothers_as<FilteredMcParticles>()) {
756+
if (!m.isPhysicalPrimary())
757+
continue;
758+
if (pdgCode == PDG_t::kPiPlus) {
759+
if (m.pdgCode() == PDG_t::kK0Short) {
760+
histos.fill(HIST("hPtNchGlobalK0Pions"), mcParticle.pt(), nChGlobal);
761+
}
762+
if (m.pdgCode() == PDG_t::kLambda0) {
763+
histos.fill(HIST("hPtNchGlobalLambdaPions"), mcParticle.pt(), nChGlobal);
764+
}
765+
}
766+
if (pdgCode == PDG_t::kProton && m.pdgCode() == PDG_t::kLambda0)
767+
histos.fill(HIST("hPtNchGlobalLambdaProtons"), mcParticle.pt(), nChGlobal);
768+
}
769+
}
770+
}
726771
}
727772
// if any track present, fill
728773
if (validTrack)

0 commit comments

Comments
 (0)