Skip to content

Commit 5f8e5a9

Browse files
committed
Merge branch 'master' into hf-clang-tidy
2 parents be0fc82 + 716ee17 commit 5f8e5a9

File tree

13 files changed

+1723
-576
lines changed

13 files changed

+1723
-576
lines changed

PWGCF/DataModel/FemtoDerived.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@ DECLARE_SOA_COLUMN(Prong2Eta, prong2Eta, float); //! Track et
245245
DECLARE_SOA_COLUMN(Prong0Phi, prong0Phi, float); //! Track phi of charm hadron prong0
246246
DECLARE_SOA_COLUMN(Prong1Phi, prong1Phi, float); //! Track phi of charm hadron prong1
247247
DECLARE_SOA_COLUMN(Prong2Phi, prong2Phi, float); //! Track phi of charm hadron prong2
248-
DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int8_t); //! Selection of mass hypothesis for charm hadron (1 for Lc -> pkpi, 2 for Lc -> pikp, 4 for D+ -> pikpi)
248+
DECLARE_SOA_COLUMN(CandidateSelFlag, candidateSelFlag, int); //! Selection of mass hypothesis for charm hadron (1 for Lc -> pkpi, 2 for Lc -> pikp, 4 for D+ -> pikpi)
249249
DECLARE_SOA_COLUMN(BDTBkg, bdtBkg, float); //! Background score using Boosted Decision Tree for charm hadron
250250
DECLARE_SOA_COLUMN(BDTPrompt, bdtPrompt, float); //! Prompt signal score using Boosted Decision Tree for charm hadron
251251
DECLARE_SOA_COLUMN(BDTFD, bdtFD, float); //! Feed-down score using Boosted Decision Tree for charm hadron
252-
DECLARE_SOA_COLUMN(FlagMc, flagMc, int8_t); //! To select MC particle among charm hadrons, { DplusToPiKPi = 1, LcToPKPi = 2, DsToKKPi = 4, XicToPKP = 8, N3ProngD = 2ecays };
253-
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); //! flag for reconstruction level matching (1 for prompt, 2 for non-prompt)
254-
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); //! flag for generator level matching (1 for prompt, 2 for non-prompt)
255-
DECLARE_SOA_COLUMN(IsCandidateSwapped, isCandidateSwapped, int8_t); //! swapping of the prongs order (0 for Lc -> pkpi, 1 for Lc -> pikp)
252+
DECLARE_SOA_COLUMN(FlagMc, flagMc, int); //! To select MC particle among charm hadrons, { DplusToPiKPi = 1, LcToPKPi = 17, DsToKKPi = 6, XicToPKPi = 21, N3ProngD = 2ecays };
253+
DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int); //! flag for reconstruction level matching (1 for prompt, 2 for non-prompt)
254+
DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int); //! flag for generator level matching (1 for prompt, 2 for non-prompt)
255+
DECLARE_SOA_COLUMN(IsCandidateSwapped, isCandidateSwapped, int); //! swapping of the prongs order (0 for Lc -> pkpi, 1 for Lc -> pikp)
256256
DECLARE_SOA_COLUMN(TrkPt, trkPt, float); //! Transverse momentum of associate femto particle
257257
DECLARE_SOA_COLUMN(TrkEta, trkEta, float); //! Eta of associate femto particle
258258
DECLARE_SOA_COLUMN(TrkPhi, trkPhi, float); //! Phi of associate femto particle

PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,16 @@ struct PiNucleiFemto {
164164
Configurable<float> settingCutEta{"settingCutEta", 0.8f, "Eta cut on daughter track"};
165165
Configurable<float> settingCutChi2tpcLow{"settingCutChi2tpcLow", 0.0f, "Low cut on TPC chi2"};
166166
Configurable<float> settingCutChi2tpcHigh{"settingCutChi2tpcHigh", 999.f, "High cut on TPC chi2"};
167+
Configurable<float> settingCutChi2tpcLowPion{"settingCutChi2tpcLowPion", 0.5f, "Low cut on TPC chi2 only for pion"};
168+
Configurable<float> settingCutChi2tpcHighPion{"settingCutChi2tpcHighPion", 4.f, "High cut on TPC chi2 only for pion"};
167169
Configurable<float> settingCutInvMass{"settingCutInvMass", 0.0f, "Invariant mass upper limit"};
168170
Configurable<float> settingCutPtMinDePi{"settingCutPtMinDePi", 0.0f, "Minimum PT cut on DePi4"};
169171
Configurable<float> settingCutClSizeItsDe{"settingCutClSizeItsDe", 4.0f, "Minimum ITS cluster size for De"};
170172
Configurable<float> settingCutNCls{"settingCutNCls", 5.0f, "Minimum ITS Ncluster for tracks"};
171173
Configurable<float> settingCutTPCChi2He{"settingCutTPCChi2He", 0.0f, "Minimum tpcChi2He for Hyper He3"};
172174
Configurable<float> settingCutAverClsSizeHe{"settingCutAverClsSizeHe", 0.0f, "Minimum averClusSizeHe for Hyper He3"};
173175
Configurable<float> settingCutChi2NClITS{"settingCutChi2NClITS", 999.f, "Maximum ITS Chi2 for tracks"};
176+
Configurable<float> settingCutChi2NClITSPion{"settingCutChi2NClITSPion", 36.f, "Maximum ITS Chi2 for tracks only for pion"};
174177
Configurable<float> settingCutNsigmaTPCPi{"settingCutNsigmaTPCPi", 3.0f, "Value of the TPC Nsigma cut on Pi"};
175178
Configurable<float> settingCutNsigmaTPCDe{"settingCutNsigmaTPCDe", 2.5f, "Value of the TPC Nsigma cut on De"};
176179
Configurable<float> settingCutNsigmaITSDe{"settingCutNsigmaITSDe", 2.5f, "Value of the ITD Nsigma cut on De"};
@@ -180,6 +183,7 @@ struct PiNucleiFemto {
180183
Configurable<float> settingCutNsigmaTOFTPCPi{"settingCutNsigmaTOFTPCPi", 3.0f, "Value of the Pion TOF TPC Nsigma cut"};
181184
Configurable<int> settingNoMixedEvents{"settingNoMixedEvents", 5, "Number of mixed events per event"};
182185
Configurable<bool> settingEnableBkgUS{"settingEnableBkgUS", false, "Enable US background"};
186+
Configurable<bool> settingSaferME{"settingSaferME", false, "For Safer ME"};
183187

184188
Configurable<bool> settingFillTable{"settingFillTable", false, "Enable table filling"};
185189
Configurable<float> settingCutPiptMin{"settingCutPiptMin", 0.14f, "Minimum PT cut on Pi"};
@@ -283,6 +287,7 @@ struct PiNucleiFemto {
283287
{"hkStaVsmTVsCent_US_M", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2f, 3.2f}, {100, 0.0f, 100.0f}}}},
284288
{"hkStaVsmTVsCent_US_A", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2f, 3.2f}, {100, 0.0f, 100.0f}}}},
285289
{"hCollIDVsCentEachPion", ";CollisionID;Centrality", {HistType::kTH2F, {{4000, 0.0f, 4000.0f}, {100, 0.0f, 100.0f}}}},
290+
{"hCollIDVsCentEachDe", ";CollisionID;Centrality", {HistType::kTH2F, {{4000, 0.0f, 4000.0f}, {100, 0.0f, 100.0f}}}},
286291
{"hNHypsPerPrevColl", "Number of V0Hypers in previous collision used for mixing;N_{V0Hypers};Entries", {HistType::kTH2F, {{4000, 0.0f, 4000.0f}, {50, -0.5, 49.5}}}},
287292
{"hkStar_LS_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
288293
{"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
@@ -302,7 +307,7 @@ struct PiNucleiFemto {
302307
float Vz_step = (Vz_high - Vz_low) / numOfVertexZBins;
303308

304309
struct EventRef {
305-
int64_t collisionId;
310+
uint64_t collisionId;
306311
};
307312

308313
struct PoolBin {
@@ -477,6 +482,8 @@ struct PiNucleiFemto {
477482
template <typename Ttrack>
478483
bool selectionPIDPion(const Ttrack& candidate)
479484
{
485+
if (candidate.tpcChi2NCl() > settingCutChi2tpcHighPion || candidate.tpcChi2NCl() < settingCutChi2tpcLowPion || candidate.itsChi2NCl() > settingCutChi2NClITSPion)
486+
return false;
480487
if (abs(candidate.dcaXY()) > settingCutPiDCAxyMin || abs(candidate.dcaZ()) > settingCutPiDCAzMin)
481488
return false;
482489

@@ -625,9 +632,11 @@ struct PiNucleiFemto {
625632
nCand = mFitter.process(trackCovDe, trackCovPi);
626633
} catch (...) {
627634
LOG(error) << "Exception caught in DCA fitter process call!";
635+
mQaRegistry.fill(HIST("hSkipReasons"), 0);
628636
return false;
629637
}
630638
if (nCand == 0) {
639+
mQaRegistry.fill(HIST("hSkipReasons"), 1);
631640
return false;
632641
}
633642

@@ -650,6 +659,7 @@ struct PiNucleiFemto {
650659
}
651660

652661
if (!mGoodCollisions[collIdxMin]) {
662+
mQaRegistry.fill(HIST("hSkipReasons"), 2);
653663
return false;
654664
}
655665
piNucand.collisionID = collIdxMin;
@@ -662,10 +672,12 @@ struct PiNucleiFemto {
662672
float invMass = 0;
663673
invMass = RecoDecay::m(std::array{piNucand.momNu, piNucand.momPi}, std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassPiPlus});
664674
if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
675+
mQaRegistry.fill(HIST("hSkipReasons"), 3);
665676
return false;
666677
}
667678
float ptDePi = std::hypot(piNucand.momNu[0] + piNucand.momPi[0], piNucand.momNu[1] + piNucand.momPi[1]);
668679
if (ptDePi < settingCutPtMinDePi) {
680+
mQaRegistry.fill(HIST("hSkipReasons"), 4);
669681
return false;
670682
}
671683

@@ -816,6 +828,7 @@ struct PiNucleiFemto {
816828
}
817829
mQaRegistry.fill(HIST("hTrackSel"), Selections::kPID);
818830
mQaRegistry.fill(HIST("hSingleNuPt"), track0.pt() * track0.sign());
831+
mQaRegistry.fill(HIST("hCollIDVsCentEachDe"), track0.collisionId(), cent);
819832

820833
for (const auto& track1 : tracks) {
821834
if (track0 == track1) {
@@ -1220,50 +1233,55 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal
12201233
LOG(info) << "Initialized event pool with size = " << All_Event_pool.size();
12211234
}
12221235
for (auto const& collision : collisions) {
1236+
if (!collision.sel8()) {
1237+
mQaRegistry.fill(HIST("hSkipReasons"), 0);
1238+
continue;
1239+
}
12231240
mQaRegistry.fill(HIST("hNcontributor"), collision.numContrib());
12241241
mQaRegistry.fill(HIST("hCentrality"), collision.centFT0C());
12251242
mQaRegistry.fill(HIST("hVtxZ"), collision.posZ());
1226-
int poolIndexPi = where_pool(collision.posZ(), collision.centFT0C());
12271243

1244+
int poolIndexPi = where_pool(collision.posZ(), collision.centFT0C());
12281245
if (poolIndexPi < 0 || static_cast<size_t>(poolIndexPi) >= All_Event_pool.size()) {
12291246
continue;
12301247
}
12311248
auto& pool = All_Event_pool[poolIndexPi];
12321249

1250+
const uint64_t collIdxPi = collision.globalIndex();
1251+
auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collIdxPi);
1252+
trackTableThisCollision.bindExternalIndices(&pitracks);
1253+
12331254
for (auto const& storedEvent : pool.events) {
1234-
const auto& c2 = collisions.iteratorAt(storedEvent.collisionId);
1235-
if (!collision.sel8() || !c2.sel8()) {
1236-
mQaRegistry.fill(HIST("hSkipReasons"), 0);
1237-
continue;
1255+
const uint64_t collIdxHyp = storedEvent.collisionId;
1256+
if (settingSaferME) {
1257+
if (static_cast<int64_t>(collIdxHyp) > collisions.size()) {
1258+
mQaRegistry.fill(HIST("hSkipReasons"), 4);
1259+
continue;
1260+
}
12381261
}
12391262

1240-
auto hypdTablepreviousCollision = V0Hypers.sliceBy(hypPerCol, c2.globalIndex());
1263+
auto hypdTablepreviousCollision = V0Hypers.sliceBy(hypPerCol, collIdxHyp);
12411264
hypdTablepreviousCollision.bindExternalIndices(&V0Hypers);
1242-
12431265
if (hypdTablepreviousCollision.size() == 0) {
12441266
mQaRegistry.fill(HIST("hSkipReasons"), 1);
12451267
continue;
12461268
}
12471269

12481270
auto firstHyp = hypdTablepreviousCollision.iteratorAt(0);
12491271
int poolIndexHyp = where_pool(firstHyp.zPrimVtx(), firstHyp.centralityFT0C());
1250-
12511272
if (poolIndexHyp != poolIndexPi) {
12521273
mQaRegistry.fill(HIST("hSkipReasons"), 2);
12531274
continue;
12541275
}
1276+
mQaRegistry.fill(HIST("hNHypsPerPrevColl"), collIdxHyp, hypdTablepreviousCollision.size());
12551277

1256-
auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collision.globalIndex());
1257-
trackTableThisCollision.bindExternalIndices(&pitracks);
1258-
1259-
mQaRegistry.fill(HIST("hNHypsPerPrevColl"), c2.globalIndex(), hypdTablepreviousCollision.size());
12601278
pairHyperEventMixing(trackTableThisCollision, hypdTablepreviousCollision);
12611279
}
12621280

12631281
if (static_cast<int>(pool.events.size()) >= settingNoMixedEvents) {
12641282
pool.events.pop_front();
12651283
}
1266-
pool.events.push_back({collision.globalIndex()});
1284+
pool.events.push_back({collIdxPi});
12671285
}
12681286
fillPairsHyper(collisions, pitracks, V0Hypers, /*isMixedEvent*/ true);
12691287
}

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ struct LongRangeDihadronCor {
279279
registry.add("Centrality_used", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}}); // histogram to see how many events are in the same and mixed event
280280
registry.add("zVtx", "zVtx", {HistType::kTH1D, {axisVertex}});
281281
registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}});
282-
registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
282+
registry.add("Trig_hist_TPC_FT0A", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
283+
registry.add("Trig_hist_TPC_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
283284
registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}});
284285
registry.add("FT0AmpCorrect", "", {HistType::kTH2F, {axisChID, axisFit}});
285286
registry.add("FT0Cmp", "", {HistType::kTH2F, {axisChID, axisFit}});
@@ -558,7 +559,11 @@ struct LongRangeDihadronCor {
558559
if (!getEfficiencyCorrection(triggerWeight, track1.eta(), track1.pt(), posZ))
559560
continue;
560561
if (system == SameEvent) {
561-
registry.fill(HIST("Trig_hist"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
562+
if (corType == kFT0C) {
563+
registry.fill(HIST("Trig_hist_TPC_FT0C"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
564+
} else if (corType == kFT0A) {
565+
registry.fill(HIST("Trig_hist_TPC_FT0A"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
566+
}
562567
}
563568

564569
std::size_t channelSize = 0;
@@ -630,10 +635,10 @@ struct LongRangeDihadronCor {
630635
float deltaEta = etaA - etaC;
631636
// fill the right sparse and histograms
632637
if (system == SameEvent) {
633-
sameFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0., 0., deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
638+
sameFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
634639
registry.fill(HIST("deltaEta_deltaPhi_same_FT0A_FT0C"), deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
635640
} else if (system == MixedEvent) {
636-
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0., 0., deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
641+
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
637642
registry.fill(HIST("deltaEta_deltaPhi_mixed_FT0A_FT0C"), deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
638643
}
639644
}

PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ struct HfTaskCharmHadronsFemtoDream {
159159

160160
Filter eventMultiplicity = aod::femtodreamcollision::multNtr >= eventSel.multMin && aod::femtodreamcollision::multNtr <= eventSel.multMax;
161161
Filter eventMultiplicityPercentile = aod::femtodreamcollision::multV0M >= eventSel.multPercentileMin && aod::femtodreamcollision::multV0M <= eventSel.multPercentileMax;
162-
Filter hfCandSelFilter = aod::fdhf::candidateSelFlag >= static_cast<int8_t>(charmHadCandSel.value);
163-
Filter hfMcSelFilter = nabs(aod::fdhf::flagMc) == static_cast<int8_t>(charmHadMcSel.value);
162+
Filter hfCandSelFilter = aod::fdhf::candidateSelFlag >= charmHadCandSel;
163+
Filter hfMcSelFilter = (nabs(aod::fdhf::flagMc) == charmHadMcSel);
164164
Filter trackEtaFilterLow = ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack), aod::femtodreamparticle::eta < etaTrack1Max, true);
165165
Filter trackEtaFilterUp = ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack), aod::femtodreamparticle::eta > etaTrack1Min, true);
166166
Filter trackPtFilterLow = ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack), aod::femtodreamparticle::pt < ptTrack1Max, true);
@@ -582,7 +582,7 @@ struct HfTaskCharmHadronsFemtoDream {
582582
part.tpcNSigmaPr(),
583583
part.tofNSigmaPr());
584584
}
585-
if ((sliceCharmHad.size() != 0) || (sliceTrk1.size() != 0)) {
585+
if (sliceCharmHad.size() > 0 || sliceTrk1.size() > 0) {
586586
rowFemtoResultColl(
587587
col.globalIndex(),
588588
timeStamp,
@@ -591,6 +591,7 @@ struct HfTaskCharmHadronsFemtoDream {
591591
} else {
592592
return;
593593
}
594+
594595
doSameEvent<false>(sliceTrk1, sliceCharmHad, parts, col);
595596
}
596597
PROCESS_SWITCH(HfTaskCharmHadronsFemtoDream, processSameEvent, "Enable processing same event", false);
@@ -630,6 +631,11 @@ struct HfTaskCharmHadronsFemtoDream {
630631
auto sliceMcTrk1 = partitionMcTrk1->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
631632
auto sliceMcCharmHad = partitionMcCharmHadron->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
632633

634+
if (sliceMcCharmHad.size() > 0) {
635+
for (auto const& part : sliceMcCharmHad) {
636+
registryCharmHadronQa.fill(HIST("CharmHadronQA/hPtVsMass"), part.pt(), getCharmHadronMass(part));
637+
}
638+
}
633639
if (sliceMcTrk1.size() == 0 && sliceMcCharmHad.size() == 0) {
634640
return;
635641
}

PWGLF/DataModel/LFSlimNucleiTables.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,21 @@ DECLARE_SOA_TABLE(NucleiPairTable, "AOD", "NUCLEIPAIRTABLE",
185185
NucleiPairTableNS::ClusterSizesITS2,
186186
NucleiPairTableNS::Flags2);
187187

188+
// Reduced table
189+
DECLARE_SOA_TABLE(NucleiTableRed, "AOD", "NUCLEITABLERED",
190+
NucleiTableNS::Pt,
191+
NucleiTableNS::Eta,
192+
NucleiTableNS::Phi,
193+
NucleiTableNS::TPCInnerParam,
194+
NucleiTableNS::ITSclusterSizes,
195+
NucleiTableNS::TPCsignal,
196+
NucleiTableNS::Beta,
197+
NucleiTableNS::DCAxy,
198+
NucleiTableNS::DCAz,
199+
NucleiTableNS::Flags,
200+
NucleiTableNS::PDGcode,
201+
NucleiTableNS::MotherPDGcode);
202+
188203
} // namespace o2::aod
189204

190205
#endif // PWGLF_DATAMODEL_LFSLIMNUCLEITABLES_H_

0 commit comments

Comments
 (0)