Skip to content

Commit 940a114

Browse files
committed
changes in task for comments
1 parent 5e1150d commit 940a114

File tree

3 files changed

+25
-35
lines changed

3 files changed

+25
-35
lines changed

PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/// \author Ravindra Singh <ravindra.singh@cern.ch>
1818

1919
#include "PWGHF/Core/DecayChannels.h"
20+
2021
#include "PWGHF/Core/HfHelper.h"
2122
#include "PWGHF/Core/SelectorCuts.h"
2223
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -117,12 +118,6 @@ struct HfCorrelatorLcHadronsSelection {
117118
// filter on selection of Lc and decay channel Lc->PKPi
118119
Filter lcFilter = ((o2::aod::hf_track_index::hfflag & static_cast<uint8_t>(1 << aod::hf_cand_3prong::DecayType::LcToPKPi)) != static_cast<uint8_t>(0)) && (aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc);
119120

120-
template <typename Coll>
121-
float evaluateCentralityColl(const Coll& collision)
122-
{
123-
return o2::hf_centrality::getCentralityColl<Coll>(collision);
124-
}
125-
126121
/// Code to select collisions with at least one Lc - for real data and data-like analysis
127122
void processLcSelectionData(SelCollisions::iterator const& collision,
128123
CandidatesLcData const& candidates)
@@ -143,7 +138,7 @@ struct HfCorrelatorLcHadronsSelection {
143138
}
144139
}
145140

146-
float cent = evaluateCentralityColl(collision);
141+
float cent = collision.centFT0M();
147142

148143
if (useSel8) {
149144
isSel8 = collision.sel8();
@@ -333,7 +328,7 @@ struct HfCorrelatorLcHadrons {
333328
registry.add("hMultiplicity", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
334329
registry.add("hMultFT0M", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
335330
registry.add("hZvtx", "z vertex;z vertex;entries", {HistType::kTH1F, {{200, -20., 20.}}});
336-
registry.add("hCentFT0M", "Centrality FT0M; Centrality;entries", {HistType::kTH1F, {{100, 0., 100.}}});
331+
registry.add("hCentFT0M", "Centrality FT0M; Centrality;entries", {HistType::kTH1D, {{100, 0., 100.}}});
337332
registry.add("hLcBin", "Lc selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{9, 0., 9.}}});
338333
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{9, 0., 9.}}});
339334
if (isMultiplicityDependent) {
@@ -386,12 +381,6 @@ struct HfCorrelatorLcHadrons {
386381
corrBinning = {{binsZVtx, binsMultiplicity}, true};
387382
}
388383

389-
template <typename Coll>
390-
float evaluateCentralityColl(const Coll& collision)
391-
{
392-
return o2::hf_centrality::getCentralityColl<Coll>(collision);
393-
}
394-
395384
/// Lc-hadron correlation pair builder - for real data and data-like analysis (i.e. reco-level w/o matching request via MC truth)
396385
void processData(SelCollisionsWithLc::iterator const& collision,
397386
TracksData const& tracks,
@@ -416,7 +405,7 @@ struct HfCorrelatorLcHadrons {
416405
int gCollisionId = collision.globalIndex();
417406
int64_t timeStamp = bc.timestamp();
418407

419-
float cent = evaluateCentralityColl(collision);
408+
float cent = collision.centFT0M();
420409

421410
int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFT0M()));
422411
int nTracks = 0;
@@ -461,7 +450,7 @@ struct HfCorrelatorLcHadrons {
461450
if (isMultiplicityDependent) {
462451
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
463452
} else {
464-
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
453+
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
465454
}
466455
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPKPi(candidate), efficiencyWeightLc);
467456
registry.fill(HIST("hSelectionStatusLcToPKPi"), candidate.isSelLcToPKPi());
@@ -475,7 +464,7 @@ struct HfCorrelatorLcHadrons {
475464
if (isMultiplicityDependent) {
476465
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
477466
} else {
478-
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
467+
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
479468
}
480469
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPiKP(candidate), efficiencyWeightLc);
481470
registry.fill(HIST("hSelectionStatusLcToPiKP"), candidate.isSelLcToPiKP());
@@ -723,7 +712,7 @@ struct HfCorrelatorLcHadrons {
723712
}
724713
//}
725714
}
726-
double_t cent = 100.0; // will be updated later
715+
float cent = 100.0; // will be updated later
727716

728717
// Lc-Hadron correlation dedicated section
729718
// if the candidate is selected as Lc, search for Hadron ad evaluate correlations
@@ -849,6 +838,7 @@ struct HfCorrelatorLcHadrons {
849838

850839
bool isLcPrompt = false;
851840
bool isLcNonPrompt = false;
841+
float cent = 100.0; // will be updated later
852842

853843
// find leading particle
854844
if (correlateLcWithLeadingParticle) {
@@ -938,7 +928,7 @@ struct HfCorrelatorLcHadrons {
938928
particleAssoc.pt() * chargeAssoc / std::abs(chargeAssoc),
939929
poolBin,
940930
correlationStatus,
941-
mcCollision.multMCFT0A());
931+
cent);
942932
entryLcHadronPairY(particleAssoc.y() - yL);
943933
entryLcHadronRecoInfo(MassLambdaCPlus, true);
944934
entryLcHadronGenInfo(isLcPrompt, particleAssoc.isPhysicalPrimary(), trackOrigin);
@@ -971,7 +961,7 @@ struct HfCorrelatorLcHadrons {
971961
auto trackPos1 = trigLc.template prong0_as<TracksData>(); // positive daughter (negative for the antiparticles)
972962
int8_t chargeLc = trackPos1.sign(); // charge of 1st prong will be the charge of Lc candidate
973963

974-
double_t cent = 100.0; // will be updated later
964+
float cent = 100.0; // will be updated later
975965

976966
std::vector<float> outputMl = {-1., -1., -1.};
977967
// LcToPKPi and LcToPiKP division
@@ -1070,7 +1060,7 @@ struct HfCorrelatorLcHadrons {
10701060
registry.fill(HIST("hZvtx"), c1.posZ());
10711061
registry.fill(HIST("hTracksPoolBin"), poolBin);
10721062
registry.fill(HIST("hLcPoolBin"), poolBinLc);
1073-
double_t cent = 100.0; // will be updated later
1063+
float cent = 100.0; // will be updated later
10741064
for (const auto& [candidate, pAssoc] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
10751065
if (std::abs(hfHelper.yLc(candidate)) > yCandMax || candidate.pt() < ptCandMin || candidate.pt() > ptCandMax) {
10761066
continue;
@@ -1172,7 +1162,7 @@ struct HfCorrelatorLcHadrons {
11721162
}
11731163
int8_t chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
11741164
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1175-
double_t cent = 100.0; // will be updated later
1165+
float cent = 100.0; // will be updated later
11761166

11771167
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
11781168
bool isLcPrompt = candidate.originMcGen() == RecoDecay::OriginType::Prompt;

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
22
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3-
// All rights not expressly granted are reserved.
3+
// All rights not expressly granted are reserved.`
44
//
55
// This software is distributed under the terms of the GNU General Public
66
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
@@ -494,7 +494,7 @@ struct HfCorrelatorLcScHadrons {
494494
{
495495
bool isPhysicalPrimary = false;
496496
int trackOrigin = -1;
497-
double_t cent = 100.0; // will be updated later
497+
float cent = 100.0; // will be updated later
498498

499499
entryCandHadronPair(getDeltaPhi(track.phi(), candidate.phi()),
500500
track.eta() - candidate.eta(),
@@ -1038,7 +1038,7 @@ struct HfCorrelatorLcScHadrons {
10381038

10391039
int8_t chargeLc = pdg->GetParticle(particle.pdgCode())->Charge(); // Retrieve charge
10401040
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1041-
double_t cent = 100.0; // will be updated later
1041+
float cent = 100.0; // will be updated later
10421042

10431043
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
10441044
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
@@ -1191,7 +1191,7 @@ struct HfCorrelatorLcScHadrons {
11911191
}
11921192
int8_t chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
11931193
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1194-
double_t cent = 100.0; // will be updated later
1194+
float cent = 100.0; // will be updated later
11951195

11961196
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
11971197
bool isPrompt = candidate.originMcGen() == RecoDecay::OriginType::Prompt;

PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ struct HfTaskCorrelationLcHadrons {
228228
registry.add("hDeltaPhiPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + "entries", {HistType::kTH1F, {axisDeltaPhi}});
229229
registry.add("hCorrel2DPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + "entries", {HistType::kTH2F, {{axisDeltaPhi}, {axisDeltaEta}}});
230230
if (isMultiplicityDependent) {
231-
registry.add("hCorrel2DVsPtSidebandsWithCentrality", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
231+
registry.add("hCorrel2DVsPtSidebandsWithCentrality", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
232232
} else {
233233
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}}});
234234
}
@@ -239,9 +239,9 @@ struct HfTaskCorrelationLcHadrons {
239239

240240
if (!fillSign) {
241241
if (isMultiplicityDependent) {
242-
registry.add("hCorrel2DVsPtSidebandLeftWithCentrality", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
243-
registry.add("hCorrel2DVsPtSidebandRightWithCentrality", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
244-
registry.add("hCorrel2DVsPtSignalRegionWithCentrality", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
242+
registry.add("hCorrel2DVsPtSidebandLeftWithCentrality", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
243+
registry.add("hCorrel2DVsPtSidebandRightWithCentrality", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
244+
registry.add("hCorrel2DVsPtSignalRegionWithCentrality", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
245245
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"))->Sumw2();
246246
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandRightWithCentrality"))->Sumw2();
247247
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegionWithCentrality"))->Sumw2();
@@ -541,7 +541,7 @@ struct HfTaskCorrelationLcHadrons {
541541
} else {
542542

543543
if (isMultiplicityDependent) {
544-
registry.fill(HIST("hCorrel2DVsPtSignalRegionWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
544+
registry.fill(HIST("hCorrel2DVsPtSignalRegionWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
545545
} else {
546546
registry.fill(HIST("hCorrel2DVsPtSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
547547
}
@@ -556,15 +556,15 @@ struct HfTaskCorrelationLcHadrons {
556556
registry.fill(HIST("hCorrel2DVsPtSignSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
557557
} else {
558558
if (isMultiplicityDependent) {
559-
registry.fill(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
559+
registry.fill(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
560560
} else {
561561
registry.fill(HIST("hCorrel2DVsPtSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
562562
}
563563
}
564564
registry.fill(HIST("hDeltaEtaPtIntSidebandLeft"), deltaEta, efficiencyWeight);
565565
registry.fill(HIST("hDeltaPhiPtIntSidebandLeft"), deltaPhi, efficiencyWeight);
566566
if (isMultiplicityDependent) {
567-
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
567+
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
568568
} else {
569569
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
570570
}
@@ -578,15 +578,15 @@ struct HfTaskCorrelationLcHadrons {
578578
registry.fill(HIST("hCorrel2DVsPtSignSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
579579
} else {
580580
if (isMultiplicityDependent) {
581-
registry.fill(HIST("hCorrel2DVsPtSidebandRightWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
581+
registry.fill(HIST("hCorrel2DVsPtSidebandRightWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
582582
} else {
583583
registry.fill(HIST("hCorrel2DVsPtSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
584584
}
585585
}
586586
registry.fill(HIST("hDeltaEtaPtIntSidebandRight"), deltaEta, efficiencyWeight);
587587
registry.fill(HIST("hDeltaPhiPtIntSidebandRight"), deltaPhi, efficiencyWeight);
588588
if (isMultiplicityDependent) {
589-
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
589+
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
590590
} else {
591591
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
592592
}

0 commit comments

Comments
 (0)