Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions PWGHF/HFC/DataModel/CorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); //! U
DECLARE_SOA_COLUMN(IsPrompt, isPrompt, bool); //! Used in MC-Rec, Lc Prompt or Non-Prompt
DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool); //! Used in MC-Rec, primary associated particles
DECLARE_SOA_COLUMN(IsAutoCorrelated, isAutoCorrelated, bool); //! Correlation Status
DECLARE_SOA_COLUMN(Cent,cent,float);
DECLARE_SOA_COLUMN(Zv,zv,float);
DECLARE_SOA_COLUMN(Cent, cent, float);
DECLARE_SOA_COLUMN(Zv, zv, float);
DECLARE_SOA_COLUMN(PrNsigmTPC, prNsigmTPC, float); //! Associated Particle TPC nSigma proton
DECLARE_SOA_COLUMN(KaNsigmTPC, kaNsigmTPC, float); //! Associated Particle TPC nSigma Kaon
DECLARE_SOA_COLUMN(PiNsigmTPC, piNsigmTPC, float); //! Associated Particle TPC nSigma Pion
Expand Down
95 changes: 44 additions & 51 deletions PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
/// \author Zhen Zhang <zhenz@cern.ch>
/// \author Ravindra Singh <ravindra.singh@cern.ch>

#include <vector>
#include "TRandom3.h"

#include "CommonConstants/PhysicsConstants.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/runDataProcessing.h"
#include "PWGHF/Core/CentralityEstimation.h"
#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/Core/SelectorCuts.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"
#include "PWGHF/HFC/DataModel/CorrelationTables.h"
#include "PWGHF/HFC/Utils/utilsCorrelations.h"

#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/Core/SelectorCuts.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"
#include "PWGHF/HFC/DataModel/CorrelationTables.h"
#include "PWGHF/HFC/Utils/utilsCorrelations.h"
#include "CommonConstants/PhysicsConstants.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/runDataProcessing.h"

#include "PWGHF/Core/CentralityEstimation.h"
#include "TRandom3.h"

#include <vector>

using namespace o2;
using namespace o2::analysis;
Expand Down Expand Up @@ -73,7 +73,7 @@
Configurable<float> yCandMax{"yCandMax", 0.8, "max. cand. rapidity"};
Configurable<float> ptCandMin{"ptCandMin", 1., "min. cand. pT"};
Configurable<float> centMin{"centMin", 0., "Minimum Centrality"};
Configurable<float> centMax{"centMax", 100.,"Maximum Centrality"};
Configurable<float> centMax{"centMax", 100., "Maximum Centrality"};

HfHelper hfHelper;
SliceCache cache;
Expand All @@ -82,7 +82,6 @@
using CandidatesLcData = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc>>;
using CandidatesLcMcRec = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc, aod::HfCand3ProngMcRec>>;
using CandidatesLcMcGen = soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>;


// filter on selection of Lc and decay channel Lc->PKPi
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);
Expand Down Expand Up @@ -113,16 +112,16 @@
}
}

float cent=evaluateCentralityColl(collision);
float cent = evaluateCentralityColl(collision);

if (useSel8) {
isSel8 = collision.sel8();
}
if (selNoSameBunchPileUpColl) {
isNosameBunchPileUp = static_cast<bool>(collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup));
}
isCentInRange = (cent >= centMin && cent < centMax);

isCentInRange = (cent >= centMin && cent < centMax);
isSelColl = isLcFound && isSel8 && isNosameBunchPileUp && isCentInRange;
lcSel(isSelColl);
}
Expand Down Expand Up @@ -232,7 +231,7 @@
Service<o2::framework::O2DatabasePDG> pdg;
int leadingIndex = 0;
bool correlationStatus = false;
static constexpr size_t nDaughters{3u};

Check failure on line 234 in PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
TRandom3* rnd = new TRandom3(0);

// Event Mixing for the Data Mode
Expand Down Expand Up @@ -266,8 +265,6 @@
ConfigurableAxis binsMultFT0M{"binsMultFT0M", {600, 0., 6000.}, "Multiplicity as FT0M signal amplitude"};
ConfigurableAxis binsMassLc{"binsMassLc", {200, 1.98, 2.58}, "inv. mass (p K #pi) (GeV/#it{c}^{2})"};
ConfigurableAxis binsCentFT0M{"binsCentFT0M", {100, 0., 100.}, "Centrality percentile (FT0M)"};



BinningType corrBinning{{binsZVtx, binsMultiplicity}, true};

Expand All @@ -287,7 +284,7 @@
AxisSpec axisPoolBin = {binsPoolBin, "PoolBin"};
AxisSpec axisRapidity = {100, -2, 2, "Rapidity"};
AxisSpec axisSign = {2, -1, 1, "Sign"};
AxisSpec axisCent = {binsCentFT0M,"Centrality"};
AxisSpec axisCent = {binsCentFT0M, "Centrality"};

registry.add("hPtCand", "Lc,Hadron candidates;candidate #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {axisPtLc}});
registry.add("hPtProng0", "Lc,Hadron candidates;prong 0 #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {axisPtLc}});
Expand All @@ -303,14 +300,13 @@
registry.add("hMultiplicity", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
registry.add("hMultFT0M", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
registry.add("hZvtx", "z vertex;z vertex;entries", {HistType::kTH1F, {{200, -20., 20.}}});
registry.add("hCentFT0M","Centrality FT0M; Centrality;entries", {HistType::kTH1F, {{100, 0., 100.}}});
registry.add("hCentFT0M", "Centrality FT0M; Centrality;entries", {HistType::kTH1F, {{100, 0., 100.}}});
registry.add("hLcBin", "Lc selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{9, 0., 9.}}});
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{9, 0., 9.}}});
if(isMultiplicityDependent) {
registry.add("hMassLcVsPtvsmult", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCent}}});
}
else{
registry.add("hMassLcVsPt", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}});
if (isMultiplicityDependent) {
registry.add("hMassLcVsPtvsmult", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCent}}});
} else {
registry.add("hMassLcVsPt", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}});
}
registry.add("hMassLcData", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{axisMassLc}}});
registry.add("hLcPoolBin", "Lc candidates pool bin", {HistType::kTH1F, {axisPoolBin}});
Expand Down Expand Up @@ -357,7 +353,6 @@
corrBinning = {{binsZVtx, binsMultiplicity}, true};
}


template <typename Coll>
float evaluateCentralityColl(const Coll& collision)
{
Expand Down Expand Up @@ -388,7 +383,7 @@
int gCollisionId = collision.globalIndex();
int64_t timeStamp = bc.timestamp();

float cent=evaluateCentralityColl(collision);
float cent = evaluateCentralityColl(collision);

int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFT0M()));
int nTracks = 0;
Expand Down Expand Up @@ -428,13 +423,12 @@
registry.fill(HIST("hPhi"), RecoDecay::constrainAngle(candidate.phi(), -PIHalf));
registry.fill(HIST("hY"), hfHelper.yLc(candidate));
registry.fill(HIST("hLcBin"), poolBin);

if (candidate.isSelLcToPKPi() >= selectionFlagLc) {
if(isMultiplicityDependent) {
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
}
else{
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
if (isMultiplicityDependent) {
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
} else {
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
}
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPKPi(candidate), efficiencyWeightLc);
registry.fill(HIST("hSelectionStatusLcToPKPi"), candidate.isSelLcToPKPi());
Expand All @@ -445,11 +439,10 @@
entryLc(candidate.phi(), candidate.eta(), candidate.pt() * chargeLc, hfHelper.invMassLcToPKPi(candidate), poolBin, gCollisionId, timeStamp);
}
if (candidate.isSelLcToPiKP() >= selectionFlagLc) {
if(isMultiplicityDependent) {
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
}
else{
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
if (isMultiplicityDependent) {
registry.fill(HIST("hMassLcVsPtvsmult"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
} else {
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
}
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPiKP(candidate), efficiencyWeightLc);
registry.fill(HIST("hSelectionStatusLcToPiKP"), candidate.isSelLcToPiKP());
Expand Down Expand Up @@ -491,7 +484,7 @@
track.pt() * track.sign(),
poolBin,
correlationStatus,
cent);
cent);
entryLcHadronPairY(track.y() - hfHelper.yLc(candidate));
entryLcHadronRecoInfo(hfHelper.invMassLcToPKPi(candidate), false);
entryLcHadronGenInfo(false, false, 0);
Expand All @@ -508,7 +501,7 @@
track.pt() * track.sign(),
poolBin,
correlationStatus,
cent);
cent);
entryLcHadronPairY(track.y() - hfHelper.yLc(candidate));
entryLcHadronRecoInfo(hfHelper.invMassLcToPiKP(candidate), false);
entryLcHadronGenInfo(false, false, 0);
Expand Down Expand Up @@ -697,7 +690,7 @@
}
//}
}
double_t cent =100.0; //will be updated later
double_t cent = 100.0; // will be updated later

// Lc-Hadron correlation dedicated section
// if the candidate is selected as Lc, search for Hadron ad evaluate correlations
Expand Down Expand Up @@ -944,8 +937,8 @@

auto trackPos1 = trigLc.template prong0_as<TracksData>(); // positive daughter (negative for the antiparticles)
int8_t chargeLc = trackPos1.sign(); // charge of 1st prong will be the charge of Lc candidate
double_t cent =100.0; //will be updated later

double_t cent = 100.0; // will be updated later

std::vector<float> outputMl = {-1., -1., -1.};
// LcToPKPi and LcToPiKP division
Expand Down Expand Up @@ -1036,15 +1029,15 @@
}
auto tracksTuple = std::make_tuple(candidates, tracks);
Pair<SelCollisionsWithLc, CandidatesLcMcRec, TracksWithMc, BinningType> pairMcRec{corrBinning, numberEventsMixed, -1, collisions, tracksTuple, &cache};

for (const auto& [c1, tracks1, c2, tracks2] : pairMcRec) {
int poolBin = corrBinning.getBin(std::make_tuple(c2.posZ(), c2.multFT0M()));
int poolBinLc = corrBinning.getBin(std::make_tuple(c1.posZ(), c1.multFT0M()));
registry.fill(HIST("hMultFT0M"), c1.multFT0M());
registry.fill(HIST("hZvtx"), c1.posZ());
registry.fill(HIST("hTracksPoolBin"), poolBin);
registry.fill(HIST("hLcPoolBin"), poolBinLc);
double_t cent =100.0; //will be updated later
double_t cent = 100.0; // will be updated later
for (const auto& [candidate, pAssoc] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
if (std::abs(hfHelper.yLc(candidate)) > yCandMax || candidate.pt() < ptCandMin || candidate.pt() > ptCandMax) {
continue;
Expand Down Expand Up @@ -1146,7 +1139,7 @@
}
int8_t chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
double_t cent =100.0; //will be updated later
double_t cent = 100.0; // will be updated later

int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
bool isLcPrompt = candidate.originMcGen() == RecoDecay::OriginType::Prompt;
Expand Down
6 changes: 3 additions & 3 deletions PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ struct HfCorrelatorLcScHadrons {
{
bool isPhysicalPrimary = false;
int trackOrigin = -1;
double_t cent =100.0; //will be updated later
double_t cent = 100.0; // will be updated later

entryCandHadronPair(getDeltaPhi(track.phi(), candidate.phi()),
track.eta() - candidate.eta(),
Expand Down Expand Up @@ -1005,7 +1005,7 @@ struct HfCorrelatorLcScHadrons {

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

int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
registry.fill(HIST("hPtParticleAssocMcGen"), particleAssoc.pt());
Expand Down Expand Up @@ -1056,7 +1056,7 @@ struct HfCorrelatorLcScHadrons {
}
int8_t chargeLc = pdg->GetParticle(candidate.pdgCode())->Charge(); // Retrieve charge
int8_t chargeAssoc = pdg->GetParticle(particleAssoc.pdgCode())->Charge(); // Retrieve charge
double_t cent =100.0; //will be updated later
double_t cent = 100.0; // will be updated later

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