Skip to content

Commit bdf7e32

Browse files
committed
changes in task for comments
1 parent 01c9e16 commit bdf7e32

File tree

3 files changed

+24
-38
lines changed

3 files changed

+24
-38
lines changed

PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
/// \author Zhen Zhang <zhenz@cern.ch>
1717
/// \author Ravindra Singh <ravindra.singh@cern.ch>
1818

19-
#include "PWGHF/Core/CentralityEstimation.h"
2019
#include "PWGHF/Core/HfHelper.h"
2120
#include "PWGHF/Core/SelectorCuts.h"
2221
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -48,8 +47,6 @@ using namespace o2::framework;
4847
using namespace o2::framework::expressions;
4948
using namespace o2::analysis::hf_correlations;
5049

51-
using namespace o2::hf_centrality;
52-
5350
///
5451
/// Returns deltaPhi values in range [-pi/2., 3.*pi/2.], typically used for correlation studies
5552
///
@@ -86,12 +83,6 @@ struct HfCorrelatorLcHadronsSelection {
8683
// filter on selection of Lc and decay channel Lc->PKPi
8784
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);
8885

89-
template <typename Coll>
90-
float evaluateCentralityColl(const Coll& collision)
91-
{
92-
return o2::hf_centrality::getCentralityColl<Coll>(collision);
93-
}
94-
9586
/// Code to select collisions with at least one Lc - for real data and data-like analysis
9687
void processLcSelectionData(SelCollisions::iterator const& collision,
9788
CandidatesLcData const& candidates)
@@ -112,7 +103,7 @@ struct HfCorrelatorLcHadronsSelection {
112103
}
113104
}
114105

115-
float cent = evaluateCentralityColl(collision);
106+
float cent = collision.centFT0M();
116107

117108
if (useSel8) {
118109
isSel8 = collision.sel8();
@@ -300,7 +291,7 @@ struct HfCorrelatorLcHadrons {
300291
registry.add("hMultiplicity", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
301292
registry.add("hMultFT0M", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
302293
registry.add("hZvtx", "z vertex;z vertex;entries", {HistType::kTH1F, {{200, -20., 20.}}});
303-
registry.add("hCentFT0M", "Centrality FT0M; Centrality;entries", {HistType::kTH1F, {{100, 0., 100.}}});
294+
registry.add("hCentFT0M", "Centrality FT0M; Centrality;entries", {HistType::kTH1D, {{100, 0., 100.}}});
304295
registry.add("hLcBin", "Lc selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{9, 0., 9.}}});
305296
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{9, 0., 9.}}});
306297
if (isMultiplicityDependent) {
@@ -353,12 +344,6 @@ struct HfCorrelatorLcHadrons {
353344
corrBinning = {{binsZVtx, binsMultiplicity}, true};
354345
}
355346

356-
template <typename Coll>
357-
float evaluateCentralityColl(const Coll& collision)
358-
{
359-
return o2::hf_centrality::getCentralityColl<Coll>(collision);
360-
}
361-
362347
/// Lc-hadron correlation pair builder - for real data and data-like analysis (i.e. reco-level w/o matching request via MC truth)
363348
void processData(SelCollisionsWithLc::iterator const& collision,
364349
TracksData const& tracks,
@@ -383,7 +368,7 @@ struct HfCorrelatorLcHadrons {
383368
int gCollisionId = collision.globalIndex();
384369
int64_t timeStamp = bc.timestamp();
385370

386-
float cent = evaluateCentralityColl(collision);
371+
float cent = collision.centFT0M();
387372

388373
int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFT0M()));
389374
int nTracks = 0;
@@ -428,7 +413,7 @@ struct HfCorrelatorLcHadrons {
428413
if (isMultiplicityDependent) {
429414
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
430415
} else {
431-
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
416+
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
432417
}
433418
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPKPi(candidate), efficiencyWeightLc);
434419
registry.fill(HIST("hSelectionStatusLcToPKPi"), candidate.isSelLcToPKPi());
@@ -442,7 +427,7 @@ struct HfCorrelatorLcHadrons {
442427
if (isMultiplicityDependent) {
443428
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
444429
} else {
445-
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
430+
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
446431
}
447432
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPiKP(candidate), efficiencyWeightLc);
448433
registry.fill(HIST("hSelectionStatusLcToPiKP"), candidate.isSelLcToPiKP());
@@ -690,7 +675,7 @@ struct HfCorrelatorLcHadrons {
690675
}
691676
//}
692677
}
693-
double_t cent = 100.0; // will be updated later
678+
float cent = 100.0; // will be updated later
694679

695680
// Lc-Hadron correlation dedicated section
696681
// if the candidate is selected as Lc, search for Hadron ad evaluate correlations
@@ -816,6 +801,7 @@ struct HfCorrelatorLcHadrons {
816801

817802
bool isLcPrompt = false;
818803
bool isLcNonPrompt = false;
804+
float cent = 100.0; // will be updated later
819805

820806
// find leading particle
821807
if (correlateLcWithLeadingParticle) {
@@ -905,7 +891,7 @@ struct HfCorrelatorLcHadrons {
905891
particleAssoc.pt() * chargeAssoc / std::abs(chargeAssoc),
906892
poolBin,
907893
correlationStatus,
908-
mcCollision.multMCFT0A());
894+
cent);
909895
entryLcHadronPairY(particleAssoc.y() - yL);
910896
entryLcHadronRecoInfo(MassLambdaCPlus, true);
911897
entryLcHadronGenInfo(isLcPrompt, particleAssoc.isPhysicalPrimary(), trackOrigin);
@@ -938,7 +924,7 @@ struct HfCorrelatorLcHadrons {
938924
auto trackPos1 = trigLc.template prong0_as<TracksData>(); // positive daughter (negative for the antiparticles)
939925
int8_t chargeLc = trackPos1.sign(); // charge of 1st prong will be the charge of Lc candidate
940926

941-
double_t cent = 100.0; // will be updated later
927+
float cent = 100.0; // will be updated later
942928

943929
std::vector<float> outputMl = {-1., -1., -1.};
944930
// LcToPKPi and LcToPiKP division
@@ -1037,7 +1023,7 @@ struct HfCorrelatorLcHadrons {
10371023
registry.fill(HIST("hZvtx"), c1.posZ());
10381024
registry.fill(HIST("hTracksPoolBin"), poolBin);
10391025
registry.fill(HIST("hLcPoolBin"), poolBinLc);
1040-
double_t cent = 100.0; // will be updated later
1026+
float cent = 100.0; // will be updated later
10411027
for (const auto& [candidate, pAssoc] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
10421028
if (std::abs(hfHelper.yLc(candidate)) > yCandMax || candidate.pt() < ptCandMin || candidate.pt() > ptCandMax) {
10431029
continue;
@@ -1139,7 +1125,7 @@ struct HfCorrelatorLcHadrons {
11391125
}
11401126
int8_t chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
11411127
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1142-
double_t cent = 100.0; // will be updated later
1128+
float cent = 100.0; // will be updated later
11431129

11441130
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
11451131
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".
@@ -410,7 +410,7 @@ struct HfCorrelatorLcScHadrons {
410410
{
411411
bool isPhysicalPrimary = false;
412412
int trackOrigin = -1;
413-
double_t cent = 100.0; // will be updated later
413+
float cent = 100.0; // will be updated later
414414

415415
entryCandHadronPair(getDeltaPhi(track.phi(), candidate.phi()),
416416
track.eta() - candidate.eta(),
@@ -1006,7 +1006,7 @@ struct HfCorrelatorLcScHadrons {
10061006

10071007
int8_t chargeLc = pdg->GetParticle(particle.pdgCode())->Charge(); // Retrieve charge
10081008
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1009-
double_t cent = 100.0; // will be updated later
1009+
float cent = 100.0; // will be updated later
10101010

10111011
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
10121012
registry.fill(HIST("hPtParticleAssocMcGen"), particleAssoc.pt());
@@ -1057,7 +1057,7 @@ struct HfCorrelatorLcScHadrons {
10571057
}
10581058
int8_t chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
10591059
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
1060-
double_t cent = 100.0; // will be updated later
1060+
float cent = 100.0; // will be updated later
10611061

10621062
int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
10631063
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
@@ -194,7 +194,7 @@ struct HfTaskCorrelationLcHadrons {
194194
registry.add("hDeltaPhiPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + "entries", {HistType::kTH1F, {axisDeltaPhi}});
195195
registry.add("hCorrel2DPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + "entries", {HistType::kTH2F, {{axisDeltaPhi}, {axisDeltaEta}}});
196196
if (isMultiplicityDependent) {
197-
registry.add("hCorrel2DVsPtSidebandsWithCentrality", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
197+
registry.add("hCorrel2DVsPtSidebandsWithCentrality", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
198198
} else {
199199
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}}});
200200
}
@@ -205,9 +205,9 @@ struct HfTaskCorrelationLcHadrons {
205205

206206
if (!fillSign) {
207207
if (isMultiplicityDependent) {
208-
registry.add("hCorrel2DVsPtSidebandLeftWithCentrality", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
209-
registry.add("hCorrel2DVsPtSidebandRightWithCentrality", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
210-
registry.add("hCorrel2DVsPtSignalRegionWithCentrality", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseD, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisCentFT0M}, {axisPoolBin}}});
208+
registry.add("hCorrel2DVsPtSidebandLeftWithCentrality", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
209+
registry.add("hCorrel2DVsPtSidebandRightWithCentrality", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
210+
registry.add("hCorrel2DVsPtSignalRegionWithCentrality", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
211211
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"))->Sumw2();
212212
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandRightWithCentrality"))->Sumw2();
213213
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegionWithCentrality"))->Sumw2();
@@ -507,7 +507,7 @@ struct HfTaskCorrelationLcHadrons {
507507
} else {
508508

509509
if (isMultiplicityDependent) {
510-
registry.fill(HIST("hCorrel2DVsPtSignalRegionWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
510+
registry.fill(HIST("hCorrel2DVsPtSignalRegionWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
511511
} else {
512512
registry.fill(HIST("hCorrel2DVsPtSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
513513
}
@@ -522,15 +522,15 @@ struct HfTaskCorrelationLcHadrons {
522522
registry.fill(HIST("hCorrel2DVsPtSignSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
523523
} else {
524524
if (isMultiplicityDependent) {
525-
registry.fill(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
525+
registry.fill(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
526526
} else {
527527
registry.fill(HIST("hCorrel2DVsPtSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
528528
}
529529
}
530530
registry.fill(HIST("hDeltaEtaPtIntSidebandLeft"), deltaEta, efficiencyWeight);
531531
registry.fill(HIST("hDeltaPhiPtIntSidebandLeft"), deltaPhi, efficiencyWeight);
532532
if (isMultiplicityDependent) {
533-
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
533+
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
534534
} else {
535535
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
536536
}
@@ -544,15 +544,15 @@ struct HfTaskCorrelationLcHadrons {
544544
registry.fill(HIST("hCorrel2DVsPtSignSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
545545
} else {
546546
if (isMultiplicityDependent) {
547-
registry.fill(HIST("hCorrel2DVsPtSidebandRightWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
547+
registry.fill(HIST("hCorrel2DVsPtSidebandRightWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
548548
} else {
549549
registry.fill(HIST("hCorrel2DVsPtSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
550550
}
551551
}
552552
registry.fill(HIST("hDeltaEtaPtIntSidebandRight"), deltaEta, efficiencyWeight);
553553
registry.fill(HIST("hDeltaPhiPtIntSidebandRight"), deltaPhi, efficiencyWeight);
554554
if (isMultiplicityDependent) {
555-
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, centr, poolBin, efficiencyWeight);
555+
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
556556
} else {
557557
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
558558
}

0 commit comments

Comments
 (0)