Skip to content

Commit e9eff57

Browse files
VDiBellaValerio Di Bellavkucera
authored
[PWGHF] Adding : ML and skimming in double Dplus correlator + other minor change (#18125)
Co-authored-by: Valerio Di Bella <vdibella@sbgpc51.in2p3.fr> Co-authored-by: Vít Kučera <26327373+vkucera@users.noreply.github.com>
1 parent 4534b7d commit e9eff57

4 files changed

Lines changed: 257 additions & 52 deletions

File tree

‎PWGHF/HFC/DataModel/ReducedDMesonPairsTables.h‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ DECLARE_SOA_TABLE(HfCandDpMcEvs, "AOD", "HFCANDDPMCEV",
3838

3939
namespace full
4040
{
41+
DECLARE_SOA_INDEX_COLUMN(HfCandDpFullEv, hfCandDpFullEv);
42+
DECLARE_SOA_INDEX_COLUMN(HfCandDpMcEv, hfCandDpMcEv);
4143
DECLARE_SOA_COLUMN(RSecondaryVertex, rSecondaryVertex, float); //! Radius of secondary vertex (cm)
4244
DECLARE_SOA_COLUMN(PtProng0, ptProng0, float); //! Transverse momentum of prong0 (GeV/c)
4345
DECLARE_SOA_COLUMN(PProng0, pProng0, float); //! Momentum of prong0 (GeV/c)
@@ -57,8 +59,6 @@ DECLARE_SOA_COLUMN(Eta, eta, float);
5759
DECLARE_SOA_COLUMN(Phi, phi, float); //! Azimuth angle of candidate
5860
DECLARE_SOA_COLUMN(E, e, float); //! Energy of candidate (GeV)
5961
DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Collision centrality
60-
DECLARE_SOA_INDEX_COLUMN(HfCandDpMcEv, hfCandDpMcEv); //! The Mc collision index this MC particles belongs to
61-
DECLARE_SOA_INDEX_COLUMN(HfCandDpFullEv, hfCandDpFullEv); //! The collision index this candidate belongs to
6262
DECLARE_SOA_COLUMN(NSigTpcPi0, nSigTpcPi0, float); //! TPC Nsigma separation for prong0 with pion mass hypothesis
6363
DECLARE_SOA_COLUMN(NSigTpcKa0, nSigTpcKa0, float); //! TPC Nsigma separation for prong0 with kaon mass hypothesis
6464
DECLARE_SOA_COLUMN(NSigTofPi0, nSigTofPi0, float); //! TOF Nsigma separation for prong0 with pion mass hypothesis
@@ -71,12 +71,12 @@ DECLARE_SOA_COLUMN(NSigTpcPi2, nSigTpcPi2, float);
7171
DECLARE_SOA_COLUMN(NSigTpcKa2, nSigTpcKa2, float); //! TPC Nsigma separation for prong2 with kaon mass hypothesis
7272
DECLARE_SOA_COLUMN(NSigTofPi2, nSigTofPi2, float); //! TOF Nsigma separation for prong2 with pion mass hypothesis
7373
DECLARE_SOA_COLUMN(NSigTofKa2, nSigTofKa2, float); //! TOF Nsigma separation for prong2 with kaon mass hypothesis
74-
DECLARE_SOA_COLUMN(NSigTpcTofPi0, nSigTpcTofPi0, float); //! TPC and TOF combined Nsigma separation for prong0 with pion mass hypothesis
75-
DECLARE_SOA_COLUMN(NSigTpcTofKa0, nSigTpcTofKa0, float); //! TPC and TOF combined Nsigma separation for prong0 with kaon mass hypothesis
76-
DECLARE_SOA_COLUMN(NSigTpcTofPi1, nSigTpcTofPi1, float); //! TPC and TOF combined Nsigma separation for prong1 with pion mass hypothesis
77-
DECLARE_SOA_COLUMN(NSigTpcTofKa1, nSigTpcTofKa1, float); //! TPC and TOF combined Nsigma separation for prong1 with kaon mass hypothesis
78-
DECLARE_SOA_COLUMN(NSigTpcTofPi2, nSigTpcTofPi2, float); //! TPC and TOF combined Nsigma separation for prong2 with pion mass hypothesis
79-
DECLARE_SOA_COLUMN(NSigTpcTofKa2, nSigTpcTofKa2, float); //! TPC and TOF combined Nsigma separation for prong2 with kaon mass hypothesis
74+
DECLARE_SOA_COLUMN(TpcTofNSigmaPi0, tpcTofNSigmaPi0, float); //! TPC and TOF combined Nsigma separation for prong0 with pion mass hypothesis
75+
DECLARE_SOA_COLUMN(TpcTofNSigmaKa0, tpcTofNSigmaKa0, float); //! TPC and TOF combined Nsigma separation for prong0 with kaon mass hypothesis
76+
DECLARE_SOA_COLUMN(TpcTofNSigmaPi1, tpcTofNSigmaPi1, float); //! TPC and TOF combined Nsigma separation for prong1 with pion mass hypothesis
77+
DECLARE_SOA_COLUMN(TpcTofNSigmaKa1, tpcTofNSigmaKa1, float); //! TPC and TOF combined Nsigma separation for prong1 with kaon mass hypothesis
78+
DECLARE_SOA_COLUMN(TpcTofNSigmaPi2, tpcTofNSigmaPi2, float); //! TPC and TOF combined Nsigma separation for prong2 with pion mass hypothesis
79+
DECLARE_SOA_COLUMN(TpcTofNSigmaKa2, tpcTofNSigmaKa2, float); //! TPC and TOF combined Nsigma separation for prong2 with kaon mass hypothesis
8080
DECLARE_SOA_COLUMN(DecayLength, decayLength, float); //! Decay length of candidate (cm)
8181
DECLARE_SOA_COLUMN(DecayLengthXY, decayLengthXY, float); //! Transverse decay length of candidate (cm)
8282
DECLARE_SOA_COLUMN(DecayLengthNormalised, decayLengthNormalised, float); //! Normalised decay length of candidate
@@ -96,7 +96,7 @@ DECLARE_SOA_TABLE(HfCandDpMls, "AOD", "HFCANDDPML",
9696
full::MlScore0,
9797
full::MlScore1)
9898

99-
DECLARE_SOA_TABLE(HfCandDpTinys, "AOD", "HFCANDDPTINY",
99+
DECLARE_SOA_TABLE(HfCandDpTinys, "AOD", "HFCANDDPTINY", o2::soa::Index<>,
100100
full::CandidateSelFlag,
101101
full::M,
102102
full::Pt,
@@ -107,7 +107,7 @@ DECLARE_SOA_TABLE(HfCandDpTinys, "AOD", "HFCANDDPTINY",
107107
hf_cand_mc_flag::OriginMcRec,
108108
hf_cand_mc_flag::FlagMcDecayChanRec)
109109

110-
DECLARE_SOA_TABLE(HfCandDpLites, "AOD", "HFCANDDPLITE",
110+
DECLARE_SOA_TABLE(HfCandDpSimples, "AOD", "HFCANDDPSIMPLE", o2::soa::Index<>,
111111
hf_cand::Chi2PCA,
112112
full::DecayLength,
113113
full::DecayLengthXY,
@@ -126,20 +126,20 @@ DECLARE_SOA_TABLE(HfCandDpLites, "AOD", "HFCANDDPLITE",
126126
full::NSigTpcKa0,
127127
full::NSigTofPi0,
128128
full::NSigTofKa0,
129-
full::NSigTpcTofPi0,
130-
full::NSigTpcTofKa0,
129+
full::TpcTofNSigmaPi0,
130+
full::TpcTofNSigmaKa0,
131131
full::NSigTpcPi1,
132132
full::NSigTpcKa1,
133133
full::NSigTofPi1,
134134
full::NSigTofKa1,
135-
full::NSigTpcTofPi1,
136-
full::NSigTpcTofKa1,
135+
full::TpcTofNSigmaPi1,
136+
full::TpcTofNSigmaKa1,
137137
full::NSigTpcPi2,
138138
full::NSigTpcKa2,
139139
full::NSigTofPi2,
140140
full::NSigTofKa2,
141-
full::NSigTpcTofPi2,
142-
full::NSigTpcTofKa2,
141+
full::TpcTofNSigmaPi2,
142+
full::TpcTofNSigmaKa2,
143143
full::CandidateSelFlag,
144144
full::M,
145145
full::Pt,
@@ -155,7 +155,7 @@ DECLARE_SOA_TABLE(HfCandDpLites, "AOD", "HFCANDDPLITE",
155155
hf_cand_mc_flag::OriginMcRec,
156156
hf_cand_mc_flag::FlagMcDecayChanRec)
157157

158-
DECLARE_SOA_TABLE(HfCandDpFulls, "AOD", "HFCANDDPFULL",
158+
DECLARE_SOA_TABLE(HfCandDpFulls, "AOD", "HFCANDDPFULL", o2::soa::Index<>,
159159
hf_cand::XSecondaryVertex,
160160
hf_cand::YSecondaryVertex,
161161
hf_cand::ZSecondaryVertex,
@@ -201,20 +201,20 @@ DECLARE_SOA_TABLE(HfCandDpFulls, "AOD", "HFCANDDPFULL",
201201
full::NSigTpcKa0,
202202
full::NSigTofPi0,
203203
full::NSigTofKa0,
204-
full::NSigTpcTofPi0,
205-
full::NSigTpcTofKa0,
204+
full::TpcTofNSigmaPi0,
205+
full::TpcTofNSigmaKa0,
206206
full::NSigTpcPi1,
207207
full::NSigTpcKa1,
208208
full::NSigTofPi1,
209209
full::NSigTofKa1,
210-
full::NSigTpcTofPi1,
211-
full::NSigTpcTofKa1,
210+
full::TpcTofNSigmaPi1,
211+
full::TpcTofNSigmaKa1,
212212
full::NSigTpcPi2,
213213
full::NSigTpcKa2,
214214
full::NSigTofPi2,
215215
full::NSigTofKa2,
216-
full::NSigTpcTofPi2,
217-
full::NSigTpcTofKa2,
216+
full::TpcTofNSigmaPi2,
217+
full::TpcTofNSigmaKa2,
218218
full::CandidateSelFlag,
219219
full::M,
220220
full::Pt,
@@ -233,7 +233,7 @@ DECLARE_SOA_TABLE(HfCandDpFulls, "AOD", "HFCANDDPFULL",
233233
hf_cand_mc_flag::OriginMcRec,
234234
hf_cand_mc_flag::FlagMcDecayChanRec);
235235

236-
DECLARE_SOA_TABLE(HfCandDpMcPs, "AOD", "HFCANDDPMCP",
236+
DECLARE_SOA_TABLE(HfCandDpMcPs, "AOD", "HFCANDDPMCP", o2::soa::Index<>,
237237
full::Pt,
238238
full::Eta,
239239
full::Phi,

‎PWGHF/HFC/TableProducer/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ o2physics_add_dpl_workflow(correlator-dplus-dminus
4242
o2physics_add_dpl_workflow(correlator-dplus-dplus-reduced
4343
SOURCES correlatorDplusDplusReduced.cxx
4444
REUSE_FROM HfCandidatesPCH
45-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
45+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::MLCore
4646
COMPONENT_NAME Analysis)
4747

4848
o2physics_add_dpl_workflow(correlator-dplus-hadrons

‎PWGHF/HFC/TableProducer/correlatorDplusDplusReduced.cxx‎

Lines changed: 120 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "PWGHF/Core/CentralityEstimation.h"
2121
#include "PWGHF/Core/DecayChannels.h"
2222
#include "PWGHF/Core/HfHelper.h"
23+
#include "PWGHF/Core/HfMlResponseDplusToPiKPi.h"
24+
#include "PWGHF/Core/SelectorCuts.h"
2325
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2426
#include "PWGHF/DataModel/CandidateSelectionTables.h"
2527
#include "PWGHF/HFC/DataModel/ReducedDMesonPairsTables.h"
@@ -30,28 +32,33 @@
3032
#include "Common/DataModel/Centrality.h"
3133

3234
#include <CCDB/BasicCCDBManager.h>
35+
#include <CCDB/CcdbApi.h>
3336
#include <Framework/ASoA.h>
3437
#include <Framework/AnalysisDataModel.h>
3538
#include <Framework/AnalysisHelpers.h>
3639
#include <Framework/AnalysisTask.h>
40+
#include <Framework/Array2D.h>
3741
#include <Framework/Configurable.h>
3842
#include <Framework/Expressions.h>
3943
#include <Framework/HistogramRegistry.h>
4044
#include <Framework/InitContext.h>
4145
#include <Framework/runDataProcessing.h>
4246

4347
#include <cstdint>
48+
#include <cstdlib>
49+
#include <string>
4450
#include <vector>
4551

4652
using namespace o2;
53+
using namespace o2::analysis;
4754
using namespace o2::framework;
4855
using namespace o2::framework::expressions;
4956
using namespace o2::hf_centrality;
5057

5158
/// Writes the full information in an output TTree
5259
struct HfCorrelatorDplusDplusReduced {
5360
Produces<o2::aod::HfCandDpFulls> rowCandidateFull;
54-
Produces<o2::aod::HfCandDpLites> rowCandidateLite;
61+
Produces<o2::aod::HfCandDpSimples> rowCandidateLite;
5562
Produces<o2::aod::HfCandDpTinys> rowCandidateTiny;
5663
Produces<o2::aod::HfCandDpFullEvs> rowCandidateFullEvents;
5764
Produces<o2::aod::HfCandDpMls> rowCandidateMl;
@@ -69,6 +76,34 @@ struct HfCorrelatorDplusDplusReduced {
6976
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", true, "Enables processing of skimmed datasets"};
7077
Configurable<bool> skipSingleD{"skipSingleD", true, "Skip collisions with one or less D candidates"};
7178

79+
Configurable<bool> applyMl{"applyMl", false, "Flag to apply ML selections"};
80+
Configurable<bool> applySkimming{"applySkimming", false, "Flag to apply Skimming selections"};
81+
Configurable<bool> loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"};
82+
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
83+
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
84+
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {hf_cuts_ml::Cuts[0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, "ML selections per pT bin"};
85+
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::NCutScores), "Number of classes in ML model"};
86+
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
87+
Configurable<std::vector<std::string>> modelPathsCCDB{"modelPathsCCDB", std::vector<std::string>{"EventFiltering/PWGHF/BDTDPlus"}, "Paths of models on CCDB"};
88+
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"ModelHandler_onnx_DPlusToKPiPi.onnx"}, "ONNX file names for each pT bin (if not from CCDB full path)"};
89+
Configurable<int64_t> timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"};
90+
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
91+
92+
Configurable<std::vector<double>> cutPtSkimming{"cutPtSkimming", {1, 5, 1000}, "pT bin limits for Skimming application"};
93+
Configurable<std::vector<double>> massMin{"massMin", {1.7, 1.7}, "Mass minimal for the cut for each pt bin"};
94+
Configurable<std::vector<double>> massMax{"massMax", {2.0, 2.1}, "Mass maximal for the cut for each pt bin"};
95+
Configurable<std::vector<double>> cosThetaMin{"cosThetaMin", {0.96, 0.98}, "CosTheta minimal for the cut for each pt bin"};
96+
Configurable<std::vector<double>> decayLengthMin{"decayLengthMin", {0.02, 0.03}, "DecayLength minimal for the cut for each pt bin"};
97+
Configurable<std::vector<double>> nSigmaTpcMax{"nSigmaTpcMax", {3, 3}, "NsigmaTPC maximal for the cut for each pt bin"};
98+
Configurable<std::vector<double>> nSigmaTofMax{"nSigmaTofMax", {3, 3}, "NsigmaTOF maximal for the cut for each pt bin"};
99+
100+
Configurable<std::vector<double>> binsPtSkimming{"binsPtSkimming", {0}, "pT bin limits for Skimming application"};
101+
102+
HfMlResponseDplusToPiKPi<float> hfMlResponse;
103+
104+
std::vector<float> outputMl;
105+
o2::ccdb::CcdbApi ccdbApi;
106+
72107
HfHelper hfHelper;
73108

74109
Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -102,6 +137,39 @@ struct HfCorrelatorDplusDplusReduced {
102137
if (cfgSkimmedProcessing) {
103138
zorroSummary.setObject(zorro.getZorroSummary());
104139
}
140+
141+
if (applyMl) {
142+
hfMlResponse.configure(binsPtMl, cutsMl, cutDirMl, nClassesMl);
143+
if (loadModelsFromCCDB) {
144+
ccdbApi.init(ccdbUrl);
145+
hfMlResponse.setModelPathsCCDB(onnxFileNames, ccdbApi, modelPathsCCDB, timestampCCDB);
146+
} else {
147+
hfMlResponse.setModelPathsLocal(onnxFileNames);
148+
}
149+
hfMlResponse.cacheInputFeaturesIndices(namesInputFeatures);
150+
hfMlResponse.init();
151+
}
152+
}
153+
154+
bool skimming(auto const& candidate)
155+
{
156+
if (candidate.pt() < cutPtSkimming.value.at(0) || candidate.pt() > cutPtSkimming.value.at(cutPtSkimming.value.size() - 1)) {
157+
return false;
158+
}
159+
for (size_t i = 0; i < cutPtSkimming.value.size() - 1; i++) {
160+
if (candidate.pt() <= cutPtSkimming.value.at(i + 1)) {
161+
if (hfHelper.invMassDplusToPiKPi(candidate) < massMin.value.at(i) ||
162+
hfHelper.invMassDplusToPiKPi(candidate) > massMax.value.at(i) ||
163+
candidate.cpa() < cosThetaMin.value.at(i) ||
164+
candidate.decayLength() < decayLengthMin.value.at(i) ||
165+
std::abs(candidate.nSigTofKa1()) > nSigmaTofMax.value.at(i) ||
166+
std::abs(candidate.nSigTpcKa1()) > nSigmaTpcMax.value.at(i)) {
167+
return false;
168+
}
169+
return true;
170+
}
171+
}
172+
return false;
105173
}
106174

107175
template <typename T>
@@ -127,14 +195,14 @@ struct HfCorrelatorDplusDplusReduced {
127195
channelMc = candidate.flagMcDecayChanRec();
128196
}
129197

130-
std::vector<float> outputMl = {-999., -999.};
198+
std::vector<float> mlProb = {-999., -999.};
131199
if constexpr (DoMl) {
132200
for (unsigned int iclass = 0; iclass < classMlIndexes->size(); iclass++) {
133-
outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMlIndexes->at(iclass)];
201+
mlProb[iclass] = candidate.mlProbDplusToPiKPi()[classMlIndexes->at(iclass)];
134202
}
135203
rowCandidateMl(
136-
outputMl[0],
137-
outputMl[1]);
204+
mlProb[0],
205+
mlProb[1]);
138206
}
139207

140208
float cent{-1.};
@@ -291,7 +359,9 @@ struct HfCorrelatorDplusDplusReduced {
291359
static int lastRunNumber = -1;
292360
// reserve memory
293361
rowCandidateFullEvents.reserve(collisions.size());
294-
if (fillCandidateLiteTable) {
362+
if (fillCandidateTinyTable) {
363+
rowCandidateTiny.reserve(candidates.size());
364+
} else if (fillCandidateLiteTable) {
295365
rowCandidateLite.reserve(candidates.size());
296366
} else {
297367
rowCandidateFull.reserve(candidates.size());
@@ -313,13 +383,31 @@ struct HfCorrelatorDplusDplusReduced {
313383

314384
const auto colId = collision.globalIndex();
315385
auto candidatesInThisCollision = candidates.sliceBy(tracksPerCollision, colId);
316-
if (skipSingleD)
386+
if (skipSingleD) {
317387
if (candidatesInThisCollision.size() < 2) // o2-linter: disable=magic-number (number of candidate must be larger than 1)
388+
{
318389
continue;
390+
}
391+
}
319392
fillEvent(collision);
320393
for (const auto& candidate : candidatesInThisCollision) {
321394
auto prongCandidate = candidate.prong1_as<aod::Tracks>();
322395
auto candidateSign = -prongCandidate.sign();
396+
397+
if (applySkimming &&
398+
!skimming(candidate)) {
399+
continue;
400+
}
401+
402+
if (applyMl) {
403+
std::vector<float> inputFeatures = hfMlResponse.getInputFeatures(candidate);
404+
bool const isSelectedMl = hfMlResponse.isSelectedMl(inputFeatures,
405+
std::abs(candidate.pt()),
406+
outputMl);
407+
if (!isSelectedMl) {
408+
continue;
409+
}
410+
}
323411
fillCandidateTable<aod::Collisions>(candidate, rowCandidateFullEvents.lastIndex(), candidateSign);
324412
}
325413
}
@@ -332,7 +420,9 @@ struct HfCorrelatorDplusDplusReduced {
332420
{
333421
// reserve memory
334422
rowCandidateFullEvents.reserve(collisions.size());
335-
if (fillCandidateLiteTable) {
423+
if (fillCandidateTinyTable) {
424+
rowCandidateTiny.reserve(candidates.size());
425+
} else if (fillCandidateLiteTable) {
336426
rowCandidateLite.reserve(candidates.size());
337427
} else {
338428
rowCandidateFull.reserve(candidates.size());
@@ -341,13 +431,30 @@ struct HfCorrelatorDplusDplusReduced {
341431
for (const auto& collision : collisions) { // No skimming for MC data. No Zorro !
342432
const auto colId = collision.globalIndex();
343433
auto candidatesInThisCollision = candidates.sliceBy(tracksPerCollision, colId);
344-
if (skipSingleD)
434+
if (skipSingleD) {
345435
if (candidatesInThisCollision.size() < 2) // o2-linter: disable=magic-number (number of candidate must be larger than 1)
436+
{
346437
continue;
438+
}
439+
}
347440
fillEvent(collision);
348441
for (const auto& candidate : candidatesInThisCollision) {
349442
auto prongCandidate = candidate.prong1_as<aod::Tracks>();
350443
auto candidateSign = -prongCandidate.sign();
444+
445+
if (applySkimming &&
446+
!skimming(candidate)) {
447+
continue;
448+
}
449+
if (applyMl) {
450+
std::vector<float> inputFeatures = hfMlResponse.getInputFeatures(candidate);
451+
bool const isSelectedMl = hfMlResponse.isSelectedMl(inputFeatures,
452+
std::abs(candidate.pt()),
453+
outputMl);
454+
if (!isSelectedMl) {
455+
continue;
456+
}
457+
}
351458
fillCandidateTable<aod::Collisions, true>(candidate, rowCandidateFullEvents.lastIndex(), candidateSign);
352459
}
353460
}
@@ -364,9 +471,12 @@ struct HfCorrelatorDplusDplusReduced {
364471
for (const auto& mccollision : mccollisions) { // No skimming for MC data. No Zorro !
365472
const auto colId = mccollision.globalIndex();
366473
const auto particlesInThisCollision = mcparticles.sliceBy(mcParticlesPerMcCollision, colId);
367-
if (skipSingleD)
474+
if (skipSingleD) {
368475
if (particlesInThisCollision.size() < 2) // o2-linter: disable=magic-number (number of candidate must be larger than 1)
476+
{
369477
continue;
478+
}
479+
}
370480
rowCandidateMcCollisions(
371481
mccollision.posX(),
372482
mccollision.posY(),

0 commit comments

Comments
 (0)