Skip to content

Commit 9643d2a

Browse files
Merge branch 'AliceO2Group:master' into mctest
2 parents e3ecc37 + 89ffabd commit 9643d2a

105 files changed

Lines changed: 1685 additions & 870 deletions

File tree

Some content is hidden

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

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
9696
Configurable<std::vector<float>> confCPRdeltaEtaCutMaxVector{"confCPRdeltaEtaCutMaxVector", std::vector<float>{0.0, 0.0, 0.0, 0.0}, "Delta Eta max cut for Close Pair Rejection"};
9797
Configurable<std::vector<float>> confCPRdeltaEtaCutMinVector{"confCPRdeltaEtaCutMinVector", std::vector<float>{0.0, 0.0, 0.0, 0.0}, "Delta Eta min cut for Close Pair Rejection"};
9898
Configurable<bool> confIsCPRkT{"confIsCPRkT", true, "kT dependent deltaEta-deltaPhi cut for Close Pair Rejection"};
99+
Configurable<float> confTrkDCAxyMax{"confTrkDCAxyMax", 0.2, "Max DCA in xy "};
100+
Configurable<float> confTrkDCAzMax{"confTrkDCAzMax", 0.2, "Max DCA in z "};
101+
Configurable<int> confTrkTPCcRowsMin{"confTrkTPCcRowsMin", 80, "Min of TPC crossed rows"};
102+
Configurable<float> confTrkTPCfClsMin{"confTrkTPCfClsMin", 0.83, "Min. fraction of crossed rows/findable TPC clusters"};
103+
Configurable<float> confTrkTPCfracsClsMax{"confTrkTPCfracsClsMax", 1.0, "Max of fraction of TPC shared cluster "};
104+
Configurable<int> confTrkTPCnClsMin{"confTrkTPCnClsMin", 80, "Min number of TPC clusters"};
105+
Configurable<int> confTrkTPCsClsMax{"confTrkTPCsClsMax", 160, "Max number of TPC shared clusters"};
106+
Configurable<float> confPairFracSharedTPCcls{"confPairFracSharedTPCcls", 1.0, "Max. fraction of TPC shared clusters between two closed tracks"};
99107
Configurable<float> confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"};
100108
Configurable<bool> confUseCCImCut{"confUseCCImCut", false, "Fill SH within specific quadrants of qout-qside"};
101109
Configurable<float> confMinqTcut{"confMinqTcut", 0.005, "Min. qT cut on filling SH"};
@@ -113,7 +121,15 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
113121

114122
using FemtoFullParticles = soa::Join<aod::FDParticles, aod::FDExtParticles>;
115123
// Filters for selecting particles (both p1 and p2)
116-
Filter trackAdditionalfilter = (nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax); // example filtering on Configurable
124+
Filter trackAdditionalfilter = ((nabs(aod::femtouniverseparticle::eta) < twotracksconfigs.confEtaMax) &&
125+
(aod::track::dcaXY <= twotracksconfigs.confTrkDCAxyMax) &&
126+
(aod::track::dcaZ <= twotracksconfigs.confTrkDCAzMax) &&
127+
(aod::femtouniverseparticle::tpcNClsCrossedRows >= twotracksconfigs.confTrkTPCcRowsMin) &&
128+
(aod::femtouniverseparticle::tpcFractionSharedCls <= twotracksconfigs.confTrkTPCfracsClsMax) &&
129+
(aod::femtouniverseparticle::tpcNClsFound >= twotracksconfigs.confTrkTPCnClsMin) &&
130+
((aod::femtouniverseparticle::tpcNClsCrossedRows / aod::track::tpcNClsFindable) >= twotracksconfigs.confTrkTPCfClsMin) &&
131+
(aod::track::tpcNClsShared >= twotracksconfigs.confTrkTPCsClsMax));
132+
117133
using FilteredFemtoFullParticles = soa::Filtered<FemtoFullParticles>;
118134
// using FilteredFemtoFullParticles = FemtoFullParticles; //if no filtering is applied uncomment this optionconfIsCPRkT
119135
using FemtoRecoParticles = soa::Join<aod::FDParticles, aod::FDExtParticles, aod::FDMCLabels>;
@@ -542,6 +558,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
542558

543559
if (kT < firstRealElement || kT > lastElement)
544560
continue;
561+
float pairFractionTPCsCls = static_cast<float>((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast<float>((p1.tpcNClsFound() + p2.tpcNClsFound()));
562+
if (pairFractionTPCsCls > twotracksconfigs.confPairFracSharedTPCcls.value) {
563+
continue;
564+
}
545565

546566
if (twotracksconfigs.confIsCPR.value) {
547567
if (twotracksconfigs.confCPRFracMax.value) {
@@ -585,6 +605,11 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended {
585605
if (kT < firstRealElement || kT > lastElement)
586606
continue;
587607

608+
float pairFractionTPCsCls = static_cast<float>((p1.tpcNClsShared() + p2.tpcNClsShared())) / static_cast<float>((p1.tpcNClsFound() + p2.tpcNClsFound()));
609+
if (pairFractionTPCsCls > twotracksconfigs.confPairFracSharedTPCcls.value) {
610+
continue;
611+
}
612+
588613
double rand;
589614
rand = randgen->Rndm();
590615

PWGCF/Tasks/correlations.cxx

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ struct CorrelationTask {
109109

110110
O2_DEFINE_CONFIGURABLE(cfgPtDepMLbkg, std::vector<float>, {}, "pT interval for ML training")
111111
O2_DEFINE_CONFIGURABLE(cfgPtCentDepMLbkgSel, std::vector<float>, {}, "Bkg ML selection")
112+
O2_DEFINE_CONFIGURABLE(cfgPtCentDepMLpromptSel, std::vector<float>, {}, "Prompt ML selection")
112113

113114
ConfigurableAxis axisVertex{"axisVertex", {7, -7, 7}, "vertex axis for histograms"};
114115
ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {72, -PIHalf, PIHalf * 3}, "delta phi axis for histograms"};
@@ -174,8 +175,14 @@ struct CorrelationTask {
174175

175176
void init(o2::framework::InitContext&)
176177
{
177-
if ((doprocessSame2ProngDerivedML || doprocessSame2Prong2ProngML || doprocessMixed2ProngDerivedML || doprocessMixed2Prong2ProngML) && (cfgPtDepMLbkg->empty() || cfgPtCentDepMLbkgSel->empty()))
178-
LOGF(fatal, "cfgPtDepMLbkg or cfgPtCentDepMLbkgSel can not be empty when ML 2-prong selections are used.");
178+
if (doprocessSame2ProngDerivedML || doprocessSame2Prong2ProngML || doprocessMixed2ProngDerivedML || doprocessMixed2Prong2ProngML || doprocessMCEfficiency2ProngML || doprocessMCReflection2ProngML) {
179+
if (cfgPtDepMLbkg->empty() || cfgPtCentDepMLbkgSel->empty())
180+
LOGF(fatal, "cfgPtDepMLbkg or cfgPtCentDepMLbkgSel can not be empty when ML 2-prong selections are used.");
181+
if (cfgPtDepMLbkg->size() != cfgPtCentDepMLbkgSel->size())
182+
LOGF(fatal, "cfgPtDepMLbkg and cfgPtCentDepMLbkgSel must be same size.");
183+
if (!cfgPtCentDepMLpromptSel->empty() && cfgPtCentDepMLpromptSel->size() != cfgPtDepMLbkg->size())
184+
LOGF(fatal, "cfgPtDepMLbkg and cfgPtCentDepMLpromptSel must be same size.");
185+
}
179186
registry.add("yields", "multiplicity/centrality vs pT vs eta", {HistType::kTH3F, {{100, 0, 100, "/multiplicity/centrality"}, {40, 0, 20, "p_{T}"}, {100, -2, 2, "#eta"}}});
180187
registry.add("etaphi", "multiplicity/centrality vs eta vs phi", {HistType::kTH3F, {{100, 0, 100, "multiplicity/centrality"}, {100, -2, 2, "#eta"}, {200, 0, o2::constants::math::TwoPI, "#varphi"}}});
181188
if (doprocessSame2ProngDerived || doprocessSame2ProngDerivedML || doprocessSame2Prong2Prong || doprocessSame2Prong2ProngML || doprocessMCSameDerived2Prong) {
@@ -326,7 +333,15 @@ struct CorrelationTask {
326333
{
327334
auto it = std::lower_bound(cfgPtDepMLbkg->begin(), cfgPtDepMLbkg->end(), track.pt());
328335
int idx = std::distance(cfgPtDepMLbkg->begin(), it) - 1;
329-
return !((track.decay() == 0 && track.mlProbD0()[0] > cfgPtCentDepMLbkgSel->at(idx)) || (track.decay() == 1 && track.mlProbD0bar()[0] > cfgPtCentDepMLbkgSel->at(idx)));
336+
return (track.decay() != aod::cf2prongtrack::D0ToPiK ||
337+
(track.mlProbD0()[0] < cfgPtCentDepMLbkgSel->at(idx) && // not background
338+
(cfgPtCentDepMLpromptSel->empty() ||
339+
track.mlProbD0()[1] > cfgPtCentDepMLpromptSel->at(idx)))) && // prompt
340+
341+
((track.decay() != aod::cf2prongtrack::D0barToKPi && track.decay() != aod::cf2prongtrack::D0barToKPiExclusive) ||
342+
(track.mlProbD0bar()[0] < cfgPtCentDepMLbkgSel->at(idx) && // not background
343+
(cfgPtCentDepMLpromptSel->empty() ||
344+
track.mlProbD0bar()[1] > cfgPtCentDepMLpromptSel->at(idx)))); // prompt
330345
}
331346

332347
template <class T>
@@ -571,7 +586,7 @@ struct CorrelationTask {
571586
}
572587

573588
if constexpr (std::experimental::is_detected<HasMcDecay, typename TTracks1::iterator>::value) {
574-
if (((track1.mcDecay() != aod::cf2prongtrack::D0ToPiK) && (track1.mcDecay() != aod::cf2prongtrack::D0barToKPiExclusive)) || (track1.decay() & aod::cf2prongmcpart::Prompt) == 0)
589+
if (((track1.mcDecay() != aod::cf2prongtrack::D0ToPiK) && (track1.mcDecay() != aod::cf2prongtrack::D0barToKPiExclusive)) || (!cfgPtCentDepMLpromptSel->empty() && (track1.decay() & aod::cf2prongmcpart::Prompt) == 0))
575590
continue;
576591
} else if constexpr (std::experimental::is_detected<HasDecay, typename TTracks1::iterator>::value) {
577592
if (cfgDecayParticleMask != 0 && (cfgDecayParticleMask & (1u << static_cast<uint32_t>(track1.decay()))) == 0u) {
@@ -654,7 +669,7 @@ struct CorrelationTask {
654669

655670
// If decay attributes are found for the second track/particle, we assume 2p-2p correlation
656671
if constexpr (std::experimental::is_detected<HasMcDecay, typename TTracks2::iterator>::value) {
657-
if ((((track2.mcDecay()) != aod::cf2prongtrack::D0ToPiK) && ((track2.mcDecay()) != aod::cf2prongtrack::D0barToKPiExclusive)) || (track2.decay() & aod::cf2prongmcpart::Prompt) == 0)
672+
if ((((track2.mcDecay()) != aod::cf2prongtrack::D0ToPiK) && ((track2.mcDecay()) != aod::cf2prongtrack::D0barToKPiExclusive)) || (!cfgPtCentDepMLpromptSel->empty() && (track2.decay() & aod::cf2prongmcpart::Prompt) == 0))
658673
continue;
659674
} else if constexpr (std::experimental::is_detected<HasDecay, typename TTracks2::iterator>::value) {
660675
if (cfgDecayParticleMask != 0 && (cfgDecayParticleMask & (1u << static_cast<uint32_t>(track2.decay()))) == 0u) {
@@ -1196,8 +1211,12 @@ struct CorrelationTask {
11961211
p2indexCache.clear();
11971212
for (const auto& mcParticle : mcParticles) {
11981213
if (std::find(cfgMcTriggerPDGs->begin(), cfgMcTriggerPDGs->end(), mcParticle.pdgCode()) != cfgMcTriggerPDGs->end()) {
1199-
if (((mcParticle.mcDecay() != aod::cf2prongtrack::D0ToPiK) && (mcParticle.mcDecay() != aod::cf2prongtrack::D0barToKPiExclusive)) || (mcParticle.decay() & aod::cf2prongmcpart::Prompt) == 0)
1214+
if ((mcParticle.mcDecay() != aod::cf2prongtrack::D0ToPiK) && (mcParticle.mcDecay() != aod::cf2prongtrack::D0barToKPiExclusive))
12001215
continue; // wrong decay channel
1216+
if constexpr (!reflectionSpec) {
1217+
if (!cfgPtCentDepMLpromptSel->empty() && (mcParticle.decay() & aod::cf2prongmcpart::Prompt) == 0)
1218+
continue;
1219+
}
12011220
if (mcParticle.cfParticleDaugh0Id() < 0 && mcParticle.cfParticleDaugh1Id() < 0)
12021221
continue; // daughters not found
12031222
if constexpr (!reflectionSpec)

PWGLF/DataModel/LFStrangenessTables.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,16 @@ DECLARE_SOA_TABLE_VERSIONED(StraEvSels_005, "AOD", "STRAEVSELS", 5, //!
274274
// stracollision::EnergyCommonZNC<mult::MultZNC>,
275275
stracollision::IsUPC<udcollision::GapSide>);
276276

277+
DECLARE_SOA_TABLE(StraEvSelExtras, "AOD", "STRAEVSELEXTRAS", //! debug information
278+
udzdc::TimeZNA, // UPC info: re-assigned ZN-A time, in case of SG event, from the most active bc
279+
udzdc::TimeZNC, // UPC info: re-assigned ZN-C time, in case of SG event, from the most active bc
280+
udcollision::TimeFDDA, // Average A-side time (ns)
281+
udcollision::TimeFDDC, // Average C-side time (ns)
282+
udcollision::TimeFV0A, // Average A-side time (ns)
283+
udcollision::TimeFT0A, // Average A-side time (ns)
284+
udcollision::TimeFT0C, // Average C-side time (ns)
285+
udcollision::TriggerMaskFT0); // 8 trigger bits: OrA, OrC, Semi-central, Central, Vertex, IsActiveA, IsActiveC, IsFlangeEvent
286+
277287
DECLARE_SOA_TABLE(StraEvSelsRun2, "AOD", "STRAEVSELSRUN2", //! debug information
278288
evsel::Sel8, evsel::Sel7, evsel::Selection, //! event selection: sel8
279289
mult::MultFT0A, mult::MultFT0C, // FIT detectors

0 commit comments

Comments
 (0)