Skip to content

Commit 882928c

Browse files
committed
Remove separate header file
1 parent eb75ae0 commit 882928c

13 files changed

Lines changed: 336 additions & 394 deletions

‎PWGHF/Core/DecayChannels.h‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ namespace o2::hf_decay
2727

2828
// TODO
2929
// - HF cascades (Λc+ → p K0short)
30-
// - HF cascades to LF cascades (Ωc0/Ξc0 → Ξ+ π−, Ξc+ → Ξ+ π− π+)
3130
// - Σc
3231

3332
using HfDecayChannel = int8_t;
@@ -296,6 +295,21 @@ enum DecayChannelMain : HfDecayChannel {
296295
};
297296
} // namespace hf_cand_sigmac
298297

298+
// @brief XiC0 and OmegaC0 candidates: main channels
299+
namespace hf_cand_casc_bach_qa
300+
{
301+
enum DecayChannelMain : HfDecayChannel {
302+
// XiC0
303+
Xic0ToXiPi = 1, // Xi- π+ → Λ π- π+ → p π- π- π+
304+
Xic0ToOmegaK = 2, // Ω- K+ → Λ K- K+ → p π- K- K+
305+
// OmegaC0
306+
Omegac0ToOmegaPi = 3, // Ω- π+ → Λ π- π+ → p π- π- π+
307+
Omegac0ToOmegaK = 4, // Ω- K+ → Λ K- K+ → p π- K- K+
308+
Omegac0ToXiPi = 5, // Xi- π+ → Λ π- π+ → p π- π- π+
309+
NChannelsMain = Omegac0ToXiPi // last channel
310+
};
311+
} // namespace hf_cand_casc_bach_qa
312+
299313
} // namespace o2::hf_decay
300314

301315
#endif // PWGHF_CORE_DECAYCHANNELS_H_

‎PWGHF/Core/HfHelper.h‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,84 @@ struct HfHelper {
491491
return candidate.m(std::array{o2::constants::physics::MassXiMinus, o2::constants::physics::MassPiPlus});
492492
}
493493

494+
template <typename T>
495+
static auto invMassOmegaczeroToXiPi(const T& candidate)
496+
{
497+
return candidate.m(std::array{o2::constants::physics::MassXiMinus, o2::constants::physics::MassPiPlus});
498+
}
499+
494500
template <typename T>
495501
static auto invMassOmegaczeroToOmegaPi(const T& candidate)
496502
{
497503
return candidate.m(std::array{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassPiPlus});
498504
}
499505

506+
template <typename T>
507+
static auto invMassOmegaczeroToOmegaK(const T& candidate)
508+
{
509+
return candidate.m(std::array{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassKPlus});
510+
}
511+
512+
template <typename T>
513+
static auto yXiczero(const T& candidate)
514+
{
515+
return candidate.y(o2::constants::physics::MassXiC0);
516+
}
517+
518+
template <typename T>
519+
static auto eXiczero(const T& candidate)
520+
{
521+
return candidate.e(o2::constants::physics::MassXiC0);
522+
}
523+
524+
template <typename T>
525+
static auto ctXiczero(const T& candidate)
526+
{
527+
return candidate.ct(o2::constants::physics::MassXiC0);
528+
}
529+
530+
template <typename T>
531+
static auto cosThetaStarXiczeroToXiPi(const T& candidate)
532+
{
533+
return candidate.cosThetaStar(std::array{o2::constants::physics::MassXiMinus, o2::constants::physics::MassPiPlus}, o2::constants::physics::MassXiC0, 1);
534+
}
535+
536+
template <typename T>
537+
static auto yOmegaczero(const T& candidate)
538+
{
539+
return candidate.y(o2::constants::physics::MassOmegaC0);
540+
}
541+
542+
template <typename T>
543+
static auto eOmegaczero(const T& candidate)
544+
{
545+
return candidate.e(o2::constants::physics::MassOmegaC0);
546+
}
547+
548+
template <typename T>
549+
static auto ctOmegaczero(const T& candidate)
550+
{
551+
return candidate.ct(o2::constants::physics::MassOmegaC0);
552+
}
553+
554+
template <typename T>
555+
static auto cosThetaStarOmegaczeroToXiPi(const T& candidate)
556+
{
557+
return candidate.cosThetaStar(std::array{o2::constants::physics::MassXiMinus, o2::constants::physics::MassPiPlus}, o2::constants::physics::MassOmegaC0, 1);
558+
}
559+
560+
template <typename T>
561+
static auto cosThetaStarOmegaczeroToOmegaPi(const T& candidate)
562+
{
563+
return candidate.cosThetaStar(std::array{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassPiPlus}, o2::constants::physics::MassOmegaC0, 1);
564+
}
565+
566+
template <typename T>
567+
static auto cosThetaStarOmegaczeroToOmegaK(const T& candidate)
568+
{
569+
return candidate.cosThetaStar(std::array{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassKPlus}, o2::constants::physics::MassOmegaC0, 1);
570+
}
571+
500572
// hf_cand_casc_lf_3prong
501573

502574
template <typename T>

‎PWGHF/Core/HfMlResponseOmegacToOmegaPiQa.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define PWGHF_CORE_HFMLRESPONSEOMEGACTOOMEGAPIQA_H_
2020

2121
#include "PWGHF/Core/HfMlResponse.h"
22-
#include "PWGHF/DataModel/CandidateReconstructionTablesQa.h"
22+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2323

2424
#include "Tools/ML/MlResponse.h"
2525

@@ -57,7 +57,7 @@
5757
// where GETTER is a method of HfHelper
5858
#define CHECK_AND_FILL_VEC_OMEGAC0_HFHELPER(OBJECT, FEATURE, GETTER) \
5959
case static_cast<uint8_t>(InputFeaturesOmegacToOmegaPiQa::FEATURE): { \
60-
inputFeatures.emplace_back(HfHelperQa::GETTER(OBJECT)); \
60+
inputFeatures.emplace_back(HfHelper::GETTER(OBJECT)); \
6161
break; \
6262
}
6363

‎PWGHF/Core/HfMlResponseXic0ToXiPiQa.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define PWGHF_CORE_HFMLRESPONSEXIC0TOXIPIQA_H_
1818

1919
#include "PWGHF/Core/HfMlResponse.h"
20-
#include "PWGHF/DataModel/CandidateReconstructionTablesQa.h"
20+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2121

2222
#include "Tools/ML/MlResponse.h"
2323

@@ -52,7 +52,7 @@
5252
// Variation of CHECK_AND_FILL_VEC_XIC0_FULL for HfHelper methods
5353
#define CHECK_AND_FILL_VEC_XIC0_HFHELPER(OBJECT, FEATURE, GETTER) \
5454
case static_cast<uint8_t>(InputFeaturesXic0ToXiPiQa::FEATURE): { \
55-
inputFeatures.emplace_back(HfHelperQa::GETTER(OBJECT)); \
55+
inputFeatures.emplace_back(HfHelper::GETTER(OBJECT)); \
5656
break; \
5757
}
5858

‎PWGHF/D2H/Tasks/taskOmegac0ToOmegaPiQa.cxx‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/// \author Maria Fernanda Torres Cabrera <maria.fernanda.torres.cabrera@cern.ch>, University of Houston
1717

1818
#include "PWGHF/Core/CentralityEstimation.h"
19-
#include "PWGHF/DataModel/CandidateReconstructionTablesQa.h"
19+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2020
#include "PWGHF/DataModel/CandidateSelectionTables.h"
2121
#include "PWGHF/DataModel/TrackIndexSkimmingTables.h"
2222
#include "PWGLF/DataModel/mcCentrality.h"
@@ -164,23 +164,23 @@ struct HfTaskOmegac0ToOmegaPiQa {
164164
void runDataAnalysis(const CandType& candidates)
165165
{
166166
for (const auto& candidate : candidates) {
167-
const auto yOmegac = HfHelperQa::yOmegaczero(candidate);
167+
const auto yOmegac = HfHelper::yOmegaczero(candidate);
168168
if (yCandRecoMax >= 0. && std::abs(yOmegac) > yCandRecoMax) {
169169
continue;
170170
}
171171

172172
if constexpr (ApplyMl) {
173-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.mlProbOmegaC0ToOmegaPi()[0]);
173+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.mlProbOmegaC0ToOmegaPi()[0]);
174174
} else {
175-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac);
175+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac);
176176
}
177177
}
178178
}
179179

180180
template <bool UseCentrality, bool ApplyMl, typename CandType, typename CollType>
181181
void runDataAnalysisCentPerCandidate(const CandType& candidate, CollType const& collision)
182182
{
183-
const double yOmegac = HfHelperQa::yOmegaczero(candidate);
183+
const double yOmegac = HfHelper::yOmegaczero(candidate);
184184
if (yCandRecoMax >= 0. && std::abs(yOmegac) > yCandRecoMax) {
185185
return;
186186
}
@@ -189,15 +189,15 @@ struct HfTaskOmegac0ToOmegaPiQa {
189189
if constexpr (UseCentrality) {
190190
float const cent = o2::hf_centrality::getCentralityColl(collision);
191191
if constexpr (ApplyMl) {
192-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, cent, numPvContributors, candidate.mlProbOmegaC0ToOmegaPi()[0]);
192+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, cent, numPvContributors, candidate.mlProbOmegaC0ToOmegaPi()[0]);
193193
} else {
194-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, cent, numPvContributors);
194+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, cent, numPvContributors);
195195
}
196196
} else {
197197
if constexpr (ApplyMl) {
198-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.mlProbOmegaC0ToOmegaPi()[0]);
198+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.mlProbOmegaC0ToOmegaPi()[0]);
199199
} else {
200-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac);
200+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac);
201201
}
202202
}
203203
}
@@ -207,15 +207,15 @@ struct HfTaskOmegac0ToOmegaPiQa {
207207
{
208208
// MC rec.
209209
for (const auto& candidate : candidates) {
210-
const double yOmegac = HfHelperQa::yOmegaczero(candidate);
210+
const double yOmegac = HfHelper::yOmegaczero(candidate);
211211
if (yCandRecoMax >= 0. && std::abs(yOmegac) > yCandRecoMax) {
212212
continue;
213213
}
214214

215215
if constexpr (ApplyMl) {
216-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), candidate.mlProbOmegaC0ToOmegaPi()[0]);
216+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), candidate.mlProbOmegaC0ToOmegaPi()[0]);
217217
} else {
218-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec());
218+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec());
219219
}
220220
}
221221

@@ -243,7 +243,7 @@ struct HfTaskOmegac0ToOmegaPiQa {
243243
{
244244
// MC rec.
245245
for (const auto& candidate : candidates) {
246-
const double yOmegac = HfHelperQa::yOmegaczero(candidate);
246+
const double yOmegac = HfHelper::yOmegaczero(candidate);
247247
if (yCandRecoMax >= 0. && std::abs(yOmegac) > yCandRecoMax) {
248248
continue;
249249
}
@@ -253,9 +253,9 @@ struct HfTaskOmegac0ToOmegaPiQa {
253253
float const mcCent = o2::hf_centrality::getCentralityColl(collision.template mcCollision_as<McCollisionWithCents>());
254254

255255
if constexpr (ApplyMl) {
256-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, mcCent, numPvContributors, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), candidate.mlProbOmegaC0ToOmegaPi()[0]);
256+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, mcCent, numPvContributors, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec(), candidate.mlProbOmegaC0ToOmegaPi()[0]);
257257
} else {
258-
registry.fill(HIST("hReco"), HfHelperQa::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, mcCent, numPvContributors, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec());
258+
registry.fill(HIST("hReco"), HfHelper::invMassOmegaczeroToOmegaPi(candidate), candidate.pt(), yOmegac, mcCent, numPvContributors, candidate.ptBhadMotherPart(), candidate.originMcRec(), candidate.flagMcMatchRec());
259259
}
260260
}
261261

0 commit comments

Comments
 (0)