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
58 changes: 58 additions & 0 deletions PWGHF/Core/HFSelectorCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ enum Code {
kD0 = 421,
kD0bar = -421,
kDPlus = 411,
kDs = 431,
kLambdaCPlus = 4122,
kXiCPlus = 4232,
kXiCCPlusPlus = 4422,
kLambdaB0 = 5122,
kJpsi = 443,
kChic1 = 20443,
kBPlus = 521,
kBs = 531,
kX3872 = 9920443
};
} // namespace pdg
Expand Down Expand Up @@ -593,6 +595,62 @@ static const std::vector<std::string> pTBinLabels = {
static const std::vector<std::string> cutVarLabels = {"m", "CPA", "Chi2PCA", "d0 Lc+", "d0 Pi", "pT Lc+", "pT Pi", "Lb decLen", "Lb decLenXY", "Imp. Par. Product", "DeltaMLc", "Cos ThetaStar"};
} // namespace hf_cuts_lb_tolcpi

namespace hf_cuts_bs_todspi
{
static constexpr int npTBins = 12;
static constexpr int nCutVars = 12;
// default values for the pT bin edges (can be used to configure histogram axis)
// offset by 1 from the bin numbers in cuts array
constexpr double pTBins[npTBins + 1] = {
0,
0.5,
1.0,
2.0,
3.0,
4.0,
5.0,
7.0,
10.0,
13.0,
16.0,
20.0,
24.0};

auto pTBins_v = std::vector<double>{pTBins, pTBins + npTBins + 1};

// default values for the cuts
// DeltaM CPA chi2PCA d0Ds d0Pi pTDs pTPi BsDecayLength BsDecayLengthXY IPProd DeltaMDs CthetaStr
constexpr double cuts[npTBins][nCutVars] = {{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 0 < pt < 0.5 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 0.5 < pt < 1 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 1 < pt < 2 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 2 < pt < 3 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 3 < pt < 4 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 4 < pt < 5 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 5 < pt < 7 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 7 < pt < 10 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 10 < pt < 13 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 13 < pt < 16 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 16 < pt < 20 */
{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}}; /* 20 < pt < 24 */
// row labels
static const std::vector<std::string> pTBinLabels = {
"pT bin 0",
"pT bin 1",
"pT bin 2",
"pT bin 3",
"pT bin 4",
"pT bin 5",
"pT bin 6",
"pT bin 7",
"pT bin 8",
"pT bin 9",
"pT bin 10",
"pT bin 11"};

// column labels
static const std::vector<std::string> cutVarLabels = {"m", "CPA", "Chi2PCA", "d0 Ds+", "d0 Pi", "pT Ds+", "pT Pi", "Bs decLen", "Bs decLenXY", "Imp. Par. Product", "DeltaMDs", "Cos ThetaStar"};
} // namespace hf_cuts_bs_todspi

namespace hf_cuts_x_tojpsipipi
{
static constexpr int npTBins = 9;
Expand Down
15 changes: 15 additions & 0 deletions PWGHF/DataModel/HFCandidateSelectionTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ DECLARE_SOA_COLUMN(IsSelDplusToPiKPi, isSelDplusToPiKPi, int); //!
DECLARE_SOA_TABLE(HFSelDplusToPiKPiCandidate, "AOD", "HFSELDPLUSCAND", //!
hf_selcandidate_dplus::IsSelDplusToPiKPi);

namespace hf_selcandidate_ds
{
DECLARE_SOA_COLUMN(IsSelDsKKpi, isSelDsKKpi, int); //!
DECLARE_SOA_COLUMN(IsSelDspiKK, isSelDspiKK, int); //!
} // namespace hf_selcandidate_ds
DECLARE_SOA_TABLE(HFSelDsCandidate, "AOD", "HFSELLCCAND", //!
hf_selcandidate_ds::IsSelDsKKpi, hf_selcandidate_ds::IsSelDspiKK);

namespace hf_selcandidate_lc
{
DECLARE_SOA_COLUMN(IsSelLcpKpi, isSelLcpKpi, int); //!
Expand Down Expand Up @@ -183,6 +191,13 @@ DECLARE_SOA_COLUMN(IsSelLbToLcPi, isSelLbToLcPi, int); //!
DECLARE_SOA_TABLE(HFSelLbToLcPiCandidate, "AOD", "HFSELLBCAND", //!
hf_selcandidate_lb::IsSelLbToLcPi);

namespace hf_selcandidate_bs
{
DECLARE_SOA_COLUMN(IsSelBsToDsPi, isSelBsToDsPi, int); //!
} // namespace hf_selcandidate_bs
DECLARE_SOA_TABLE(HFSelBsToDsPiCandidate, "AOD", "HFSELBSCAND", //!
hf_selcandidate_bs::IsSelBsToDsPi);

namespace hf_selcandidate_x
{
DECLARE_SOA_COLUMN(IsSelXToJpsiToEEPiPi, isSelXToJpsiToEEPiPi, int); //!
Expand Down
101 changes: 101 additions & 0 deletions PWGHF/DataModel/HFSecondaryVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,18 @@ auto InvMassDPlus(const T& candidate)
return candidate.m(array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kPiPlus)});
}

template <typename T>
auto InvMassDsKKpi(const T& candidate)
{
return candidate.m(array{RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kKMinus), RecoDecay::getMassPDG(kPiPlus)});
}

template <typename T>
auto InvMassDspiKK(const T& candidate)
{
return candidate.m(array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kKMinus), RecoDecay::getMassPDG(kKPlus)});
}

// Λc± → p± K∓ π±

template <typename T>
Expand Down Expand Up @@ -1205,6 +1217,95 @@ DECLARE_SOA_TABLE(HfCandLbMCRec, "AOD", "HFCANDLBMCREC", //!
DECLARE_SOA_TABLE(HfCandLbMCGen, "AOD", "HFCANDLBMCGEN", //!
hf_cand_lb::FlagMCMatchGen,
hf_cand_lb::OriginMCGen);

// specific Bs candidate properties
namespace hf_cand_bs
{
DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, HfCandProng3, "_0"); // Bs index
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, HfCandProng3, "_0"); // Bs index
DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, HfCandProng3, "_0"); // Ds index

// MC matching result:
DECLARE_SOA_COLUMN(FlagMCMatchRec, flagMCMatchRec, int8_t); // reconstruction level
DECLARE_SOA_COLUMN(FlagMCMatchGen, flagMCMatchGen, int8_t); // generator level
DECLARE_SOA_COLUMN(OriginMCRec, originMCRec, int8_t); // particle origin, reconstruction level
DECLARE_SOA_COLUMN(OriginMCGen, originMCGen, int8_t); // particle origin, generator level
Comment on lines +1228 to +1229
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these needed?

DECLARE_SOA_COLUMN(DebugMCRec, debugMCRec, int8_t); // debug flag for mis-association reconstruction level
// mapping of decay types
enum DecayType { BsToDsPi }; // move this to a dedicated cascade namespace in the future?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enum DecayType { BsToDsPi }; // move this to a dedicated cascade namespace in the future?
enum DecayType { BsToDsPi = 0 }; // move this to a dedicated cascade namespace in the future?


// Bs → Ds+ π- → K+ K- π+ π-
// float massBs = RecoDecay::getMassPDG(pdg::Code::kBs);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// float massBs = RecoDecay::getMassPDG(pdg::Code::kBs);

template <typename T>
auto CtBs(const T& candidate)
{
return candidate.ct(RecoDecay::getMassPDG(pdg::Code::kBs));
}

template <typename T>
auto YBs(const T& candidate)
{
return candidate.y(RecoDecay::getMassPDG(pdg::Code::kBs));
}

template <typename T>
auto EBs(const T& candidate)
{
return candidate.e(RecoDecay::getMassPDG(pdg::Code::kBs));
}
template <typename T>
Comment on lines +1252 to +1253
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
template <typename T>
}
template <typename T>

auto InvMassBsToDsPi(const T& candidate)
{
return candidate.m(array{RecoDecay::getMassPDG(pdg::Code::kDs), RecoDecay::getMassPDG(kPiMinus)});
}
} // namespace hf_cand_bs

// declare dedicated Bs candidate table
DECLARE_SOA_TABLE(HfCandBsBase, "AOD", "HFCANDBSBASE",
// general columns
HFCAND_COLUMNS,
// 3-prong specific columns
hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0,
hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1,
hf_cand::ImpactParameter0, hf_cand::ImpactParameter1,
hf_cand::ErrorImpactParameter0, hf_cand::ErrorImpactParameter1,
hf_cand_bs::Index0Id, hf_track_index::Index1Id,
hf_track_index::HFflag,
/* dynamic columns */
hf_cand_prong2::M<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
hf_cand_prong2::M2<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
hf_cand_prong2::ImpactParameterProduct<hf_cand::ImpactParameter0, hf_cand::ImpactParameter1>,
/* dynamic columns that use candidate momentum components */
hf_cand::Pt<hf_cand_prong2::Px, hf_cand_prong2::Py>,
hf_cand::Pt2<hf_cand_prong2::Px, hf_cand_prong2::Py>,
hf_cand::P<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::P2<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::PVector<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::CPA<collision::PosX, collision::PosY, collision::PosZ, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::CPAXY<collision::PosX, collision::PosY, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand_prong2::Px, hf_cand_prong2::Py>,
hf_cand::Ct<collision::PosX, collision::PosY, collision::PosZ, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::ImpactParameterXY<collision::PosX, collision::PosY, collision::PosZ, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand_prong2::MaxNormalisedDeltaIP<collision::PosX, collision::PosY, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ErrorDecayLengthXY, hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand::ImpactParameter0, hf_cand::ErrorImpactParameter0, hf_cand::ImpactParameter1, hf_cand::ErrorImpactParameter1, hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PxProng1, hf_cand::PyProng1>,
hf_cand::Eta<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::Phi<hf_cand_prong2::Px, hf_cand_prong2::Py>,
hf_cand::Y<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::E<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>,
hf_cand::E2<hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz>);

// extended table with expression columns that can be used as arguments of dynamic columns
DECLARE_SOA_EXTENDED_TABLE_USER(HfCandBsExt, HfCandBsBase, "HFCANDBSEXT",
hf_cand_prong2::Px, hf_cand_prong2::Py, hf_cand_prong2::Pz);

using HfCandBs = HfCandBsExt;

// table with results of reconstruction level MC matching
DECLARE_SOA_TABLE(HfCandBsMCRec, "AOD", "HFCANDBSMCREC", //!
hf_cand_bs::FlagMCMatchRec,
hf_cand_bs::OriginMCRec,
hf_cand_bs::DebugMCRec);

// table with results of generator level MC matching
DECLARE_SOA_TABLE(HfCandBsMCGen, "AOD", "HFCANDBSMCGEN", //!
hf_cand_bs::FlagMCMatchGen,
hf_cand_bs::OriginMCGen);

} // namespace o2::aod

#endif // O2_ANALYSIS_HFSECONDARYVERTEX_H_
10 changes: 10 additions & 0 deletions PWGHF/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ o2physics_add_dpl_workflow(candidate-creator-lb
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing ROOT::EG
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(candidate-creator-bs
SOURCES HFCandidateCreatorBs.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing ROOT::EG
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(candidate-creator-x
SOURCES HFCandidateCreatorX.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing ROOT::EG
Expand Down Expand Up @@ -139,6 +144,11 @@ o2physics_add_dpl_workflow(bplus-tod0pi-candidate-selector
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(bs-todspi-candidate-selector
SOURCES HFBsToDsPiCandidateSelector.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lb-tolcpi-candidate-selector
SOURCES HFLbToLcPiCandidateSelector.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing
Expand Down
Loading