Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
Expand Down Expand Up @@ -184,7 +184,7 @@
Configurable<std::vector<double>> binsPtHadron{"binsPtHadron", std::vector<double>{0.3, 2., 4., 8., 12., 50.}, "pT bin limits for assoc particle"};
Configurable<std::vector<double>> binsPtEfficiencyD{"binsPtEfficiencyD", std::vector<double>{o2::analysis::hf_cuts_dplus_to_pi_k_pi::vecBinsPt}, "pT bin limits for efficiency"};
Configurable<std::vector<float>> efficiencyD{"efficiencyD", {1., 1., 1., 1., 1., 1.}, "efficiency values for D+ meson"};
ConfigurableAxis binsMultiplicity{"binsMultiplicity", {VARIABLE_WIDTH, 0.0f, 2000.0f, 6000.0f, 100000.0f}, "Mixing bins - multiplicity"};

Check warning on line 187 in PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfCorrelatorDplusHadrons: ConfigurableAxis appears too early (before end of Preslice<).
ConfigurableAxis binsZVtx{"binsZVtx", {VARIABLE_WIDTH, -10.0f, -2.5f, 2.5f, 10.0f}, "Mixing bins - z-vertex"};
ConfigurableAxis binsMultiplicityMc{"binsMultiplicityMc", {VARIABLE_WIDTH, 0.0f, 20.0f, 50.0f, 500.0f}, "Mixing bins - MC multiplicity"}; // In MCGen multiplicity is defined by counting tracks
ConfigurableAxis binsBdtScore{"binsBdtScore", {100, 0., 1.}, "Bdt output scores"};
Expand All @@ -197,7 +197,7 @@
HfHelper hfHelper;
SliceCache cache;
BinningType corrBinning{{binsZVtx, binsMultiplicity}, true};
int idxBdtScore = 1; // Index BDTScore 1 for Prompt and 2 for FD Analysis
int idxBdtScore = 1; // Index BDTScore 1 for Prompt and 2 for FD Analysis
// Event Mixing for the Data Mode
using SelCollisionsWithDplus = soa::Filtered<soa::Join<aod::Collisions, aod::Mults, aod::EvSels, aod::DmesonSelection>>;
using SelCollisionsWithDplusMc = soa::Filtered<soa::Join<aod::McCollisions, aod::DmesonSelection, aod::MultsExtraMC>>; // collisionFilter applied
Expand Down Expand Up @@ -292,12 +292,11 @@
registry.add("hPhiMcGen", "D+,Hadron particles - MC Gen", {HistType::kTH1F, {axisPhi}});
registry.add("hMultFT0AMcGen", "D+,Hadron multiplicity FT0A - MC Gen", {HistType::kTH1F, {axisMultiplicity}});
corrBinning = {{binsZVtx, binsMultiplicity}, true};
if (isPromptAnalysis){
if (isPromptAnalysis) {
idxBdtScore = 1;
}
else{
} else {
idxBdtScore = 2;
}
}
}

/// Dplus-hadron correlation pair builder - for real data and data-like analysis (i.e. reco-level w/o matching request via MC truth)
Expand Down Expand Up @@ -352,7 +351,7 @@
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMl->at(iclass)];
}
entryDplusCandRecoInfo(hfHelper.invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[idxBdtScore]); // 0: BkgBDTScore, 1:PromptBDTScore; 2:FDBDTScore
entryDplusCandRecoInfo(hfHelper.invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[idxBdtScore]); // 0: BkgBDTScore, 1:PromptBDTScore; 2:FDBDTScore
entryDplus(candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDplusToPiKPi(candidate), poolBin, gCollisionId, timeStamp);

// Dplus-Hadron correlation dedicated section
Expand Down Expand Up @@ -568,7 +567,7 @@
listDaughters.clear();
RecoDecay::getDaughters(particle1, &listDaughters, arrDaughDplusPDG, 2);
int counterDaughters = 0;
if (listDaughters.size() == 3) {

Check warning on line 570 in PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
for (const auto& dauIdx : listDaughters) {
auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset());
counterDaughters += 1;
Expand Down
Loading