Skip to content

Commit 1b7d3e0

Browse files
committed
add Lc and Hadron table
1 parent dd048ff commit 1b7d3e0

File tree

2 files changed

+39
-10
lines changed

2 files changed

+39
-10
lines changed

PWGHF/HFC/DataModel/CorrelationTables.h

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,21 @@ DECLARE_SOA_TABLE(DDbarRecoInfo, "AOD", "DDBARRECOINFO",
5151
// definition of columns and tables for D0-Hadron correlation pairs
5252
namespace hf_correlation_d0_hadron
5353
{
54-
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between D0 and Hadrons
55-
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between D0 and Hadrons
56-
DECLARE_SOA_COLUMN(PtD, ptD, float); //! Transverse momentum of D0
57-
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron
58-
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of D0
59-
DECLARE_SOA_COLUMN(MDbar, mDbar, float); //! Invariant mass of D0bar
60-
DECLARE_SOA_COLUMN(MlScoreBkgD0, mlScoreBkgD0, float); //! ML background score for D0 selection
54+
DECLARE_SOA_COLUMN(DeltaPhi, deltaPhi, float); //! DeltaPhi between D0 and Hadrons
55+
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, float); //! DeltaEta between D0 and Hadrons
56+
DECLARE_SOA_COLUMN(PtD, ptD, float); //! Transverse momentum of D0
57+
DECLARE_SOA_COLUMN(PtHadron, ptHadron, float); //! Transverse momentum of Hadron
58+
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of D0
59+
DECLARE_SOA_COLUMN(MDbar, mDbar, float); //! Invariant mass of D0bar
60+
DECLARE_SOA_COLUMN(MlScoreBkgD0, mlScoreBkgD0, float); //! ML background score for D0 selection
6161
DECLARE_SOA_COLUMN(MlScoreNonPromptD0, mlScoreNonPromptD0, float); //! ML prompt score for D0 selection
6262
DECLARE_SOA_COLUMN(MlScorePromptD0, mlScorePromptD0, float); //! ML prompt score for D0 selection
6363
DECLARE_SOA_COLUMN(MlScoreBkgD0bar, mlScoreBkgD0bar, float); //! ML background score for D0 selection
6464
DECLARE_SOA_COLUMN(MlScoreNonPromptD0bar, mlScoreNonPromptD0bar, float); //! ML prompt score for D0 selection
6565
DECLARE_SOA_COLUMN(MlScorePromptD0bar, mlScorePromptD0bar, float); //! ML prompt score for D0 selection
66-
DECLARE_SOA_COLUMN(SignalStatus, signalStatus, int); //! Tag for D0,D0bar
67-
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
68-
DECLARE_SOA_COLUMN(IsAutoCorrelated, isAutoCorrelated, bool); //! Correlation Status
66+
DECLARE_SOA_COLUMN(SignalStatus, signalStatus, int); //! Tag for D0,D0bar
67+
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin for the MixedEvent
68+
DECLARE_SOA_COLUMN(IsAutoCorrelated, isAutoCorrelated, bool); //! Correlation Status
6969

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

246+
// definition of columns and tables for LambdaC properties
247+
namespace hf_lc_baryon
248+
{
249+
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi of Lc
250+
DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta of Lc
251+
DECLARE_SOA_COLUMN(PtLc, ptLc, float); //! Transverse momentum of Lc
252+
DECLARE_SOA_COLUMN(MLc, mLc, float); //! Invariant mass of Lc
253+
DECLARE_SOA_COLUMN(PoolBin, poolBin, int); //! Pool Bin of event defined using zvtx and multiplicity
254+
DECLARE_SOA_COLUMN(GIndexCol, gIndexCol, int); //! Global index for the collision
255+
DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp for the collision
256+
} // namespace hf_lc_baryon
257+
258+
DECLARE_SOA_TABLE(Lc, "AOD", "LC", //! Lc properties
259+
aod::hf_lc_baryon::Phi,
260+
aod::hf_lc_baryon::Eta,
261+
aod::hf_lc_baryon::PtLc,
262+
aod::hf_lc_baryon::MLc,
263+
aod::hf_lc_baryon::PoolBin,
264+
aod::hf_lc_baryon::GIndexCol,
265+
aod::hf_lc_baryon::TimeStamp);
266+
246267
// definition of columns and tables for Dplus properties
247268
namespace hf_dplus_meson
248269
{

PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ struct HfCorrelatorLcHadrons {
166166
Produces<aod::LcHadronGenInfo> entryLcHadronGenInfo;
167167
Produces<aod::LcGenInfo> entryLcCandGenInfo;
168168
Produces<aod::TrkRecInfoLc> entryTrackRecoInfo;
169+
Produces<aod::Lc> entryLc;
170+
Produces<aod::Hadron> entryHadron;
169171

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

325330
int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFT0M()));
326331
int nTracks = 0;
@@ -368,6 +373,7 @@ struct HfCorrelatorLcHadrons {
368373
outputMl[iclass] = candidate.mlProbLcToPKPi()[classMl->at(iclass)];
369374
}
370375
entryLcCandRecoInfo(hfHelper.invMassLcToPKPi(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
376+
entryLc(candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassLcToPKPi(candidate), poolBin, gCollisionId, timeStamp);
371377
}
372378
if (candidate.isSelLcToPiKP() >= selectionFlagLc) {
373379
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPiKP(candidate), candidate.pt(), efficiencyWeightLc);
@@ -377,6 +383,7 @@ struct HfCorrelatorLcHadrons {
377383
outputMl[iclass] = candidate.mlProbLcToPiKP()[classMl->at(iclass)];
378384
}
379385
entryLcCandRecoInfo(hfHelper.invMassLcToPiKP(candidate), candidate.pt() * chargeLc, outputMl[0], outputMl[1]); // 0: BkgBDTScore, 1:PromptBDTScore
386+
entryLc(candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassLcToPiKP(candidate), poolBin, gCollisionId, timeStamp);
380387
}
381388

382389
// Lc-Hadron correlation dedicated section
@@ -432,6 +439,7 @@ struct HfCorrelatorLcHadrons {
432439
}
433440
}
434441
if (cntLc == 0) {
442+
entryHadron(track.phi(), track.eta(), track.pt(), poolBin, gCollisionId, timeStamp);
435443
registry.fill(HIST("hTracksBin"), poolBin);
436444
}
437445
} // Hadron Tracks loop

0 commit comments

Comments
 (0)