Skip to content

Commit 1488093

Browse files
authored
Revert "[PWGCF] safer ME and QA for pi-d (AliceO2Group#13238)"
This reverts commit ee95e63.
1 parent ee95e63 commit 1488093

File tree

1 file changed

+14
-32
lines changed

1 file changed

+14
-32
lines changed

PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,13 @@ 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"};
169167
Configurable<float> settingCutInvMass{"settingCutInvMass", 0.0f, "Invariant mass upper limit"};
170168
Configurable<float> settingCutPtMinDePi{"settingCutPtMinDePi", 0.0f, "Minimum PT cut on DePi4"};
171169
Configurable<float> settingCutClSizeItsDe{"settingCutClSizeItsDe", 4.0f, "Minimum ITS cluster size for De"};
172170
Configurable<float> settingCutNCls{"settingCutNCls", 5.0f, "Minimum ITS Ncluster for tracks"};
173171
Configurable<float> settingCutTPCChi2He{"settingCutTPCChi2He", 0.0f, "Minimum tpcChi2He for Hyper He3"};
174172
Configurable<float> settingCutAverClsSizeHe{"settingCutAverClsSizeHe", 0.0f, "Minimum averClusSizeHe for Hyper He3"};
175173
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"};
177174
Configurable<float> settingCutNsigmaTPCPi{"settingCutNsigmaTPCPi", 3.0f, "Value of the TPC Nsigma cut on Pi"};
178175
Configurable<float> settingCutNsigmaTPCDe{"settingCutNsigmaTPCDe", 2.5f, "Value of the TPC Nsigma cut on De"};
179176
Configurable<float> settingCutNsigmaITSDe{"settingCutNsigmaITSDe", 2.5f, "Value of the ITD Nsigma cut on De"};
@@ -183,7 +180,6 @@ struct PiNucleiFemto {
183180
Configurable<float> settingCutNsigmaTOFTPCPi{"settingCutNsigmaTOFTPCPi", 3.0f, "Value of the Pion TOF TPC Nsigma cut"};
184181
Configurable<int> settingNoMixedEvents{"settingNoMixedEvents", 5, "Number of mixed events per event"};
185182
Configurable<bool> settingEnableBkgUS{"settingEnableBkgUS", false, "Enable US background"};
186-
Configurable<bool> settingSaferME{"settingSaferME", false, "For Safer ME"};
187183

188184
Configurable<bool> settingFillTable{"settingFillTable", false, "Enable table filling"};
189185
Configurable<float> settingCutPiptMin{"settingCutPiptMin", 0.14f, "Minimum PT cut on Pi"};
@@ -287,7 +283,6 @@ struct PiNucleiFemto {
287283
{"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}}}},
288284
{"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}}}},
289285
{"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}}}},
291286
{"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}}}},
292287
{"hkStar_LS_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
293288
{"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
@@ -307,7 +302,7 @@ struct PiNucleiFemto {
307302
float Vz_step = (Vz_high - Vz_low) / numOfVertexZBins;
308303

309304
struct EventRef {
310-
uint64_t collisionId;
305+
int64_t collisionId;
311306
};
312307

313308
struct PoolBin {
@@ -482,8 +477,6 @@ struct PiNucleiFemto {
482477
template <typename Ttrack>
483478
bool selectionPIDPion(const Ttrack& candidate)
484479
{
485-
if (candidate.tpcChi2NCl() > settingCutChi2tpcHighPion || candidate.tpcChi2NCl() < settingCutChi2tpcLowPion || candidate.itsChi2NCl() > settingCutChi2NClITSPion)
486-
return false;
487480
if (abs(candidate.dcaXY()) > settingCutPiDCAxyMin || abs(candidate.dcaZ()) > settingCutPiDCAzMin)
488481
return false;
489482

@@ -632,11 +625,9 @@ struct PiNucleiFemto {
632625
nCand = mFitter.process(trackCovDe, trackCovPi);
633626
} catch (...) {
634627
LOG(error) << "Exception caught in DCA fitter process call!";
635-
mQaRegistry.fill(HIST("hSkipReasons"), 0);
636628
return false;
637629
}
638630
if (nCand == 0) {
639-
mQaRegistry.fill(HIST("hSkipReasons"), 1);
640631
return false;
641632
}
642633

@@ -659,7 +650,6 @@ struct PiNucleiFemto {
659650
}
660651

661652
if (!mGoodCollisions[collIdxMin]) {
662-
mQaRegistry.fill(HIST("hSkipReasons"), 2);
663653
return false;
664654
}
665655
piNucand.collisionID = collIdxMin;
@@ -672,12 +662,10 @@ struct PiNucleiFemto {
672662
float invMass = 0;
673663
invMass = RecoDecay::m(std::array{piNucand.momNu, piNucand.momPi}, std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassPiPlus});
674664
if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
675-
mQaRegistry.fill(HIST("hSkipReasons"), 3);
676665
return false;
677666
}
678667
float ptDePi = std::hypot(piNucand.momNu[0] + piNucand.momPi[0], piNucand.momNu[1] + piNucand.momPi[1]);
679668
if (ptDePi < settingCutPtMinDePi) {
680-
mQaRegistry.fill(HIST("hSkipReasons"), 4);
681669
return false;
682670
}
683671

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

833820
for (const auto& track1 : tracks) {
834821
if (track0 == track1) {
@@ -1233,55 +1220,50 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal
12331220
LOG(info) << "Initialized event pool with size = " << All_Event_pool.size();
12341221
}
12351222
for (auto const& collision : collisions) {
1236-
if (!collision.sel8()) {
1237-
mQaRegistry.fill(HIST("hSkipReasons"), 0);
1238-
continue;
1239-
}
12401223
mQaRegistry.fill(HIST("hNcontributor"), collision.numContrib());
12411224
mQaRegistry.fill(HIST("hCentrality"), collision.centFT0C());
12421225
mQaRegistry.fill(HIST("hVtxZ"), collision.posZ());
1243-
12441226
int poolIndexPi = where_pool(collision.posZ(), collision.centFT0C());
1227+
12451228
if (poolIndexPi < 0 || static_cast<size_t>(poolIndexPi) >= All_Event_pool.size()) {
12461229
continue;
12471230
}
12481231
auto& pool = All_Event_pool[poolIndexPi];
12491232

1250-
const uint64_t collIdxPi = collision.globalIndex();
1251-
auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collIdxPi);
1252-
trackTableThisCollision.bindExternalIndices(&pitracks);
1253-
12541233
for (auto const& storedEvent : pool.events) {
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-
}
1234+
const auto& c2 = collisions.iteratorAt(storedEvent.collisionId);
1235+
if (!collision.sel8() || !c2.sel8()) {
1236+
mQaRegistry.fill(HIST("hSkipReasons"), 0);
1237+
continue;
12611238
}
12621239

1263-
auto hypdTablepreviousCollision = V0Hypers.sliceBy(hypPerCol, collIdxHyp);
1240+
auto hypdTablepreviousCollision = V0Hypers.sliceBy(hypPerCol, c2.globalIndex());
12641241
hypdTablepreviousCollision.bindExternalIndices(&V0Hypers);
1242+
12651243
if (hypdTablepreviousCollision.size() == 0) {
12661244
mQaRegistry.fill(HIST("hSkipReasons"), 1);
12671245
continue;
12681246
}
12691247

12701248
auto firstHyp = hypdTablepreviousCollision.iteratorAt(0);
12711249
int poolIndexHyp = where_pool(firstHyp.zPrimVtx(), firstHyp.centralityFT0C());
1250+
12721251
if (poolIndexHyp != poolIndexPi) {
12731252
mQaRegistry.fill(HIST("hSkipReasons"), 2);
12741253
continue;
12751254
}
1276-
mQaRegistry.fill(HIST("hNHypsPerPrevColl"), collIdxHyp, hypdTablepreviousCollision.size());
12771255

1256+
auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collision.globalIndex());
1257+
trackTableThisCollision.bindExternalIndices(&pitracks);
1258+
1259+
mQaRegistry.fill(HIST("hNHypsPerPrevColl"), c2.globalIndex(), hypdTablepreviousCollision.size());
12781260
pairHyperEventMixing(trackTableThisCollision, hypdTablepreviousCollision);
12791261
}
12801262

12811263
if (static_cast<int>(pool.events.size()) >= settingNoMixedEvents) {
12821264
pool.events.pop_front();
12831265
}
1284-
pool.events.push_back({collIdxPi});
1266+
pool.events.push_back({collision.globalIndex()});
12851267
}
12861268
fillPairsHyper(collisions, pitracks, V0Hypers, /*isMixedEvent*/ true);
12871269
}

0 commit comments

Comments
 (0)