Skip to content

Commit

Permalink
PWGHF: Add Bs meson to creator of reduced data model (#7950)
Browse files Browse the repository at this point in the history
* Add Bs to reduced data model

* clang format

* Add Bs to creator of reduced data format

* Use name for K0* PDG code

* Adapt reduced data model to support Ds mass hypotheses

* Rework inv mass histograms and add Ds mass hypotheses
  • Loading branch information
fcatalan92 authored Oct 11, 2024
1 parent 711799c commit c315996
Show file tree
Hide file tree
Showing 10 changed files with 577 additions and 101 deletions.
121 changes: 114 additions & 7 deletions PWGHF/D2H/DataModel/ReducedDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
///
/// \author Alexandre Bigot <[email protected]>, IPHC Strasbourg
/// \author Antonio Palasciano <[email protected]>, Università degli Studi di Bari & INFN, Bari
/// \author Fabio Catalano <[email protected]>, CERN

#ifndef PWGHF_D2H_DATAMODEL_REDUCEDDATAMODEL_H_
#define PWGHF_D2H_DATAMODEL_REDUCEDDATAMODEL_H_
Expand Down Expand Up @@ -164,9 +165,8 @@ using HfRedTracks = HfRedTracksExt;

namespace hf_charm_cand_reduced
{
DECLARE_SOA_COLUMN(InvMass, invMass, float); //! Invariant mass of 2prong candidate in GeV/c2
DECLARE_SOA_COLUMN(InvMassD0, invMassD0, float); //! Invariant mass of 2prong candidate in GeV/c2
DECLARE_SOA_COLUMN(InvMassD0Bar, invMassD0Bar, float); //! Invariant mass of 2prong candidate in GeV/c2
DECLARE_SOA_COLUMN(InvMassHypo0, invMassHypo0, float); //! Invariant mass of candidate in GeV/c2 (mass hypothesis 0)
DECLARE_SOA_COLUMN(InvMassHypo1, invMassHypo1, float); //! Invariant mass of candidate in GeV/c2 (mass hypothesis 1)
DECLARE_SOA_COLUMN(MlScoreBkgMassHypo0, mlScoreBkgMassHypo0, float); //! ML score for background class (mass hypothesis 0)
DECLARE_SOA_COLUMN(MlScorePromptMassHypo0, mlScorePromptMassHypo0, float); //! ML score for prompt class (mass hypothesis 0)
DECLARE_SOA_COLUMN(MlScoreNonpromptMassHypo0, mlScoreNonpromptMassHypo0, float); //! ML score for non-prompt class (mass hypothesis 0)
Expand All @@ -183,7 +183,7 @@ DECLARE_SOA_TABLE(HfRed2Prongs, "AOD", "HFRED2PRONG", //! Table with 2prong cand
hf_track_index_reduced::HfRedCollisionId,
HFTRACKPAR_COLUMNS,
hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex,
hf_charm_cand_reduced::InvMassD0, hf_charm_cand_reduced::InvMassD0Bar,
hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1,
aod::track::Px<aod::track::Signed1Pt, aod::track::Snp, aod::track::Alpha>,
aod::track::Py<aod::track::Signed1Pt, aod::track::Snp, aod::track::Alpha>,
aod::track::Pz<aod::track::Signed1Pt, track::Tgl>,
Expand All @@ -210,7 +210,7 @@ DECLARE_SOA_TABLE(HfRed3Prongs, "AOD", "HFRED3PRONG", //! Table with 3prong cand
hf_track_index_reduced::HfRedCollisionId,
HFTRACKPAR_COLUMNS,
hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex,
hf_charm_cand_reduced::InvMass,
hf_charm_cand_reduced::InvMassHypo0, hf_charm_cand_reduced::InvMassHypo1,
aod::track::Px<aod::track::Signed1Pt, aod::track::Snp, aod::track::Alpha>,
aod::track::Py<aod::track::Signed1Pt, aod::track::Snp, aod::track::Alpha>,
aod::track::Pz<aod::track::Signed1Pt, track::Tgl>,
Expand All @@ -224,7 +224,11 @@ DECLARE_SOA_TABLE(HfRed3ProngsCov, "AOD", "HFRED3PRONGSCOV", //! Table with 3pro
DECLARE_SOA_TABLE(HfRed3ProngsMl, "AOD", "HFRED3PRONGML", //! Table with 3prong candidate ML scores
hf_charm_cand_reduced::MlScoreBkgMassHypo0,
hf_charm_cand_reduced::MlScorePromptMassHypo0,
hf_charm_cand_reduced::MlScoreNonpromptMassHypo0);
hf_charm_cand_reduced::MlScoreNonpromptMassHypo0,
hf_charm_cand_reduced::MlScoreBkgMassHypo1,
hf_charm_cand_reduced::MlScorePromptMassHypo1,
hf_charm_cand_reduced::MlScoreNonpromptMassHypo1,
o2::soa::Marker<1>);

// Beauty candidates prongs
namespace hf_cand_b0_reduced
Expand Down Expand Up @@ -259,14 +263,34 @@ DECLARE_SOA_COLUMN(Prong0MlScoreNonprompt, prong0MlScoreNonprompt, float); //! N
DECLARE_SOA_TABLE(HfRedBplusProngs, "AOD", "HFREDBPPRONG",
hf_cand_bplus_reduced::Prong0Id, hf_cand_bplus_reduced::Prong1Id);

DECLARE_SOA_TABLE(HfRedBplusD0Mls, "AOD", "HFREDBPLUSD0ML", //! Table with ML scores for the D+ daughter
DECLARE_SOA_TABLE(HfRedBplusD0Mls, "AOD", "HFREDBPLUSD0ML", //! Table with ML scores for the D0 daughter
hf_cand_bplus_reduced::Prong0MlScoreBkg,
hf_cand_bplus_reduced::Prong0MlScorePrompt,
hf_cand_bplus_reduced::Prong0MlScoreNonprompt,
o2::soa::Marker<1>);

using HfRedCandBplus = soa::Join<HfCandBplusExt, HfRedBplusProngs>;

namespace hf_cand_bs_reduced
{
DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, HfRed3Prongs, "_0"); //! Prong0 index
DECLARE_SOA_INDEX_COLUMN_FULL(Prong1, prong1, int, HfRedTrackBases, "_1"); //! Prong1 index
DECLARE_SOA_COLUMN(Prong0MlScoreBkg, prong0MlScoreBkg, float); //! Bkg ML score of the D daughter
DECLARE_SOA_COLUMN(Prong0MlScorePrompt, prong0MlScorePrompt, float); //! Prompt ML score of the D daughter
DECLARE_SOA_COLUMN(Prong0MlScoreNonprompt, prong0MlScoreNonprompt, float); //! Nonprompt ML score of the D daughter
} // namespace hf_cand_bs_reduced

DECLARE_SOA_TABLE(HfRedBsProngs, "AOD", "HFREDBSPRONG", //! Table with Bs daughter indices
hf_cand_bs_reduced::Prong0Id, hf_cand_bs_reduced::Prong1Id);

DECLARE_SOA_TABLE(HfRedBsDsMls, "AOD", "HFREDBSDSML", //! Table with ML scores for the Ds daughter
hf_cand_bs_reduced::Prong0MlScoreBkg,
hf_cand_bs_reduced::Prong0MlScorePrompt,
hf_cand_bs_reduced::Prong0MlScoreNonprompt,
o2::soa::Marker<1>);

using HfRedCandBs = soa::Join<HfCandBsExt, HfRedBsProngs>;

namespace hf_b0_mc
{
// MC Rec
Expand Down Expand Up @@ -428,6 +452,89 @@ DECLARE_SOA_TABLE(HfCandBpConfigs, "AOD", "HFCANDBPCONFIG", //! Table with confi
hf_cand_bplus_config::MySelectionFlagD0bar,
hf_cand_bplus_config::MyInvMassWindowD0Pi);

namespace hf_bs_mc
{
// MC Rec
DECLARE_SOA_COLUMN(PtMother, ptMother, float); //! Transverse momentum of the mother in GeV/c
// MC Gen
DECLARE_SOA_COLUMN(PtTrack, ptTrack, float); //! Transverse momentum of the track in GeV/c
DECLARE_SOA_COLUMN(YTrack, yTrack, float); //! Rapidity of the track
DECLARE_SOA_COLUMN(EtaTrack, etaTrack, float); //! Pseudorapidity of the track
DECLARE_SOA_COLUMN(PtProng0, ptProng0, float); //! Transverse momentum of the track's prong0 in GeV/c
DECLARE_SOA_COLUMN(YProng0, yProng0, float); //! Rapidity of the track's prong0
DECLARE_SOA_COLUMN(EtaProng0, etaProng0, float); //! Pseudorapidity of the track's prong0
DECLARE_SOA_COLUMN(PtProng1, ptProng1, float); //! Transverse momentum of the track's prong1 in GeV/c
DECLARE_SOA_COLUMN(YProng1, yProng1, float); //! Rapidity of the track's prong1
DECLARE_SOA_COLUMN(EtaProng1, etaProng1, float); //! Pseudorapidity of the track's prong1

DECLARE_SOA_COLUMN(PdgCodeBeautyMother, pdgCodeBeautyMother, int); //! Pdg code of beauty mother
DECLARE_SOA_COLUMN(PdgCodeCharmMother, pdgCodeCharmMother, int); //! Pdg code of charm mother
DECLARE_SOA_COLUMN(PdgCodeProng0, pdgCodeProng0, int); //! Pdg code of prong0
DECLARE_SOA_COLUMN(PdgCodeProng1, pdgCodeProng1, int); //! Pdg code of prong1
DECLARE_SOA_COLUMN(PdgCodeProng2, pdgCodeProng2, int); //! Pdg code of prong2
DECLARE_SOA_COLUMN(PdgCodeProng3, pdgCodeProng3, int); //! Pdg code of prong3
} // namespace hf_bs_mc

// table with results of reconstruction level MC matching
DECLARE_SOA_TABLE(HfMcRecRedDsPis, "AOD", "HFMCRECREDDSPI", //! Table with reconstructed MC information on DsPi(<-Bs) pairs for reduced workflow
hf_cand_bs_reduced::Prong0Id,
hf_cand_bs_reduced::Prong1Id,
hf_cand_bs::FlagMcMatchRec,
hf_cand_bs::FlagWrongCollision,
hf_cand_bs::DebugMcRec,
hf_bs_mc::PtMother);

// try with extended table ?
// DECLARE_SOA_EXTENDED_TABLE_USER(ExTable, Tracks, "EXTABLE",
DECLARE_SOA_TABLE(HfMcCheckDsPis, "AOD", "HFMCCHECKDSPI", //! Table with reconstructed MC information on DsPi(<-Bs) pairs for MC checks in reduced workflow
hf_bs_mc::PdgCodeBeautyMother,
hf_bs_mc::PdgCodeCharmMother,
hf_bs_mc::PdgCodeProng0,
hf_bs_mc::PdgCodeProng1,
hf_bs_mc::PdgCodeProng2,
hf_bs_mc::PdgCodeProng3,
o2::soa::Marker<1>);

// Table with same size as HFCANDBS
DECLARE_SOA_TABLE(HfMcRecRedBss, "AOD", "HFMCRECREDBS", //! Reconstruction-level MC information on Bs candidates for reduced workflow
hf_cand_bs::FlagMcMatchRec,
hf_cand_bs::FlagWrongCollision,
hf_cand_bs::DebugMcRec,
hf_bs_mc::PtMother);

DECLARE_SOA_TABLE(HfMcCheckBss, "AOD", "HFMCCHECKBS", //! Table with reconstructed MC information on Bs candidates for MC checks in reduced workflow
hf_bs_mc::PdgCodeBeautyMother,
hf_bs_mc::PdgCodeCharmMother,
hf_bs_mc::PdgCodeProng0,
hf_bs_mc::PdgCodeProng1,
hf_bs_mc::PdgCodeProng2,
hf_bs_mc::PdgCodeProng3,
o2::soa::Marker<2>);

DECLARE_SOA_TABLE(HfMcGenRedBss, "AOD", "HFMCGENREDBS", //! Generation-level MC information on Bs candidates for reduced workflow
hf_cand_bs::FlagMcMatchGen,
hf_bs_mc::PtTrack,
hf_bs_mc::YTrack,
hf_bs_mc::EtaTrack,
hf_bs_mc::PtProng0,
hf_bs_mc::YProng0,
hf_bs_mc::EtaProng0,
hf_bs_mc::PtProng1,
hf_bs_mc::YProng1,
hf_bs_mc::EtaProng1);

// store all configurables values used in the first part of the workflow
// so we can use them in the Bs part
namespace hf_cand_bs_config
{
DECLARE_SOA_COLUMN(MySelectionFlagD, mySelectionFlagD, int8_t); //! Flag to filter selected Ds mesons
DECLARE_SOA_COLUMN(MyInvMassWindowDPi, myInvMassWindowDPi, float); //! Half-width of the Bs invariant-mass window in GeV/c2
} // namespace hf_cand_bs_config

DECLARE_SOA_TABLE(HfCandBsConfigs, "AOD", "HFCANDBSCONFIG", //! Table with configurables information for reduced workflow
hf_cand_bs_config::MySelectionFlagD,
hf_cand_bs_config::MyInvMassWindowDPi);

// Charm resonances analysis
namespace hf_reso_3_prong
{
Expand Down
Loading

0 comments on commit c315996

Please sign in to comment.