Skip to content

Commit 8cc3884

Browse files
author
Zhihe Han
committed
[PWGHF] Fix the V0 MC origin helper return type and clarify the diquark check
- getK0sOrigin() returns aod::femtodreamMCparticle::ParticleOriginMCTruth (the unqualified type does not resolve at class scope, since the using-directive is inside the function body) - clarify that the diquark check validates the two quark flavours, not the pdg / 1000 == 4 or 5 condition that motivates it - add the missing upper bound on the second quark flavour
1 parent 15cb395 commit 8cc3884

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎Common/Core/RecoDecay.h‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,23 +1183,27 @@ struct RecoDecay {
11831183

11841184
/// Check whether the PDG code corresponds to a diquark state (e.g. 4101, 4201, 5101).
11851185
/// Diquarks are constituents used by the generators during the hadronisation and are not
1186-
/// hadrons, but their PDG codes satisfy the pdg / 1000 == 4 or 5 condition that is used
1187-
/// to identify charm and beauty baryons in getParticleOrigin.
1186+
/// hadrons. A diquark carrying a charm or beauty quark has a PDG code that satisfies the
1187+
/// pdg / 1000 == 4 or 5 condition used to identify charm and beauty baryons in
1188+
/// getParticleOrigin, so such a state would be misidentified as a heavy-flavour baryon there.
1189+
/// This check therefore validates the diquark structure: two quark flavours in
1190+
/// PDG_t::kDown..kTop (any quark pair, not only a heavy-flavour one), the first flavour not
1191+
/// smaller than the second, and a spin-0 or spin-1 code.
11881192
/// \param pdgCode PDG code of the particle
11891193
/// \return true if the PDG code belongs to a diquark state
11901194
static bool isDiquark(const int pdgCode)
11911195
{
1192-
// a diquark PDG code is composed as quark1 * PdgDivisorBaryon + quark2 * PdgDivisorMeson +
1193-
// spinCode, with quark1 >= quark2 the quark flavours and spinCode either PdgDiquarkSpin0Code
1194-
// or PdgDiquarkSpin1Code
1196+
// a diquark PDG code is composed as pdgQuark1 * PdgDivisorBaryon + pdgQuark2 * PdgDivisorMeson
1197+
// + spinCode, with pdgQuark1 >= pdgQuark2 the quark flavours and spinCode either
1198+
// PdgDiquarkSpin0Code or PdgDiquarkSpin1Code
11951199
const int absPdgCode = std::abs(pdgCode);
11961200
const int spinCode = absPdgCode % PdgDivisorMeson;
11971201
if (spinCode != PdgDiquarkSpin0Code && spinCode != PdgDiquarkSpin1Code) {
11981202
return false;
11991203
}
12001204
const int pdgQuark1 = absPdgCode / PdgDivisorBaryon;
12011205
const int pdgQuark2 = (absPdgCode % PdgDivisorBaryon) / PdgDivisorMeson;
1202-
return pdgQuark1 >= PDG_t::kDown && pdgQuark1 <= PDG_t::kTop && pdgQuark2 >= PDG_t::kDown && pdgQuark1 >= pdgQuark2;
1206+
return pdgQuark1 >= PDG_t::kDown && pdgQuark1 <= PDG_t::kTop && pdgQuark2 >= PDG_t::kDown && pdgQuark2 <= PDG_t::kTop && pdgQuark1 >= pdgQuark2;
12031207
}
12041208

12051209
/// based on getCharmHardronOrigin in order to extend general particle

‎PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ struct HfProducerCharmHadronsV0FemtoDream {
507507
/// \return the origin according to ParticleOriginMCTruth (kPrimary, kMaterial,
508508
/// kSecondaryFromHF, kSecondaryFromLF or kSecondaryFromPhi)
509509
template <typename T>
510-
static ParticleOriginMCTruth getK0sOrigin(T const& mcParticles, typename T::iterator const& particleMc, const bool isFromPhi)
510+
static aod::femtodreamMCparticle::ParticleOriginMCTruth getK0sOrigin(T const& mcParticles, typename T::iterator const& particleMc, const bool isFromPhi)
511511
{
512512
using namespace o2::aod::femtodreamMCparticle;
513513
constexpr int GenFromTransport = -1;

0 commit comments

Comments
 (0)