Skip to content

Commit

Permalink
[PWGHF] Add Lc and Hadron table (#9085)
Browse files Browse the repository at this point in the history
  • Loading branch information
zz951 authored Dec 21, 2024
1 parent 8f18e63 commit 7d7ca05
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
41 changes: 31 additions & 10 deletions PWGHF/HFC/DataModel/CorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ DECLARE_SOA_TABLE(DDbarRecoInfo, "AOD", "DDBARRECOINFO",
// definition of columns and tables for D0-Hadron correlation pairs
namespace hf_correlation_d0_hadron
{
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between D0 and Hadrons
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between D0 and Hadrons
DECLARE_SOA_COLUMN(PtD, ptD, float); //! Transverse momentum of D0
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of D0
DECLARE_SOA_COLUMN(MDbar, mDbar, float); //! Invariant mass of D0bar
DECLARE_SOA_COLUMN(MlScoreBkgD0, mlScoreBkgD0, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between D0 and Hadrons
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between D0 and Hadrons
DECLARE_SOA_COLUMN(PtD, ptD, float); //! Transverse momentum of D0
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of D0
DECLARE_SOA_COLUMN(MDbar, mDbar, float); //! Invariant mass of D0bar
DECLARE_SOA_COLUMN(MlScoreBkgD0, mlScoreBkgD0, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(MlScoreNonPromptD0, mlScoreNonPromptD0, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScorePromptD0, mlScorePromptD0, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScoreBkgD0bar, mlScoreBkgD0bar, float); //! ML background score for D0 selection
DECLARE_SOA_COLUMN(MlScoreNonPromptD0bar, mlScoreNonPromptD0bar, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(MlScorePromptD0bar, mlScorePromptD0bar, float); //! ML prompt score for D0 selection
DECLARE_SOA_COLUMN(SignalStatus, signalStatus, int); //! Tag for D0,D0bar
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
DECLARE_SOA_COLUMN(IsAutoCorrelated, isAutoCorrelated, bool); //! Correlation Status
DECLARE_SOA_COLUMN(SignalStatus, signalStatus, int); //! Tag for D0,D0bar
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
DECLARE_SOA_COLUMN(IsAutoCorrelated, isAutoCorrelated, bool); //! Correlation Status

enum ParticleTypeData {
D0Only = 1, // Identified as D0
Expand Down Expand Up @@ -243,6 +243,27 @@ DECLARE_SOA_TABLE(TrackRecoInfo, "AOD", "TRACKRECOINFO", //! Tracks Reconstructe
aod::hf_correlation_ds_hadron::TrackDcaZ,
aod::hf_correlation_ds_hadron::TrackTPCNClsCrossedRows);

// definition of columns and tables for LambdaC properties
namespace hf_lc_baryon
{
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi of Lc
DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta of Lc
DECLARE_SOA_COLUMN(PtLc, ptLc, float); //! Transverse momentum of Lc
DECLARE_SOA_COLUMN(MLc, mLc, float); //! Invariant mass of Lc
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin of event defined using zvtx and multiplicity
DECLARE_SOA_COLUMN(GIndexCol, gIndexCol, int); //! Global index for the collision
DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp for the collision
} // namespace hf_lc_baryon

DECLARE_SOA_TABLE(Lc, "AOD", "LC", //! Lc properties
aod::hf_lc_baryon::Phi,
aod::hf_lc_baryon::Eta,
aod::hf_lc_baryon::PtLc,
aod::hf_lc_baryon::MLc,
aod::hf_lc_baryon::PoolBin,
aod::hf_lc_baryon::GIndexCol,
aod::hf_lc_baryon::TimeStamp);

// definition of columns and tables for Dplus properties
namespace hf_dplus_meson
{
Expand Down
8 changes: 8 additions & 0 deletions PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ struct HfCorrelatorLcHadrons {
Produces<aod::LcHadronGenInfo> entryLcHadronGenInfo;
Produces<aod::LcGenInfo> entryLcCandGenInfo;
Produces<aod::TrkRecInfoLc> entryTrackRecoInfo;
Produces<aod::Lc> entryLc;
Produces<aod::Hadron> entryHadron;

Configurable<int> selectionFlagLc{"selectionFlagLc", 1, "Selection Flag for Lc"};
Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "number of events mixed in ME process"};
Expand Down Expand Up @@ -321,6 +323,9 @@ struct HfCorrelatorLcHadrons {
if (correlateLcWithLeadingParticle) {
leadingIndex = findLeadingParticle(tracks, dcaXYTrackMax.value, dcaZTrackMax.value, etaTrackMax.value);
}
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
int gCollisionId = collision.globalIndex();
int64_t timeStamp = bc.timestamp();

int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFT0M()));
int nTracks = 0;
Expand Down Expand Up @@ -368,6 +373,7 @@ struct HfCorrelatorLcHadrons {
outputMl[iclass] = candidate.mlProbLcToPKPi()[classMl->at(iclass)];
}
entryLcCandRecoInfo(hfHelper.invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
entryLc(candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassLcToPKPi(candidate), poolBin, gCollisionId, timeStamp);
}
if (candidate.isSelLcToPiKP() >= selectionFlagLc) {
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPiKP(candidate), candidate.pt(), efficiencyWeightLc);
Expand All @@ -377,6 +383,7 @@ struct HfCorrelatorLcHadrons {
outputMl[iclass] = candidate.mlProbLcToPiKP()[classMl->at(iclass)];
}
entryLcCandRecoInfo(hfHelper.invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
entryLc(candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassLcToPiKP(candidate), poolBin, gCollisionId, timeStamp);
}

// Lc-Hadron correlation dedicated section
Expand Down Expand Up @@ -432,6 +439,7 @@ struct HfCorrelatorLcHadrons {
}
}
if (cntLc == 0) {
entryHadron(track.phi(), track.eta(), track.pt(), poolBin, gCollisionId, timeStamp);
registry.fill(HIST("hTracksBin"), poolBin);
}
} // Hadron Tracks loop
Expand Down

0 comments on commit 7d7ca05

Please sign in to comment.