Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b8da914
DhCorrelationExtraction.cxx: Fix initializer order
vkucera Sep 24, 2025
c20e574
taskCharmPolarisation.cxx: Fix redundant condition
vkucera Sep 24, 2025
9483d01
Fix missing initialisation
vkucera Sep 25, 2025
cf5e5a7
Fix const
vkucera Sep 26, 2025
b8ab7f0
Fix performance
vkucera Sep 26, 2025
b5c5976
Modernise
vkucera Sep 26, 2025
b5abdc6
Fix readability
vkucera Sep 26, 2025
2ad6d6b
Fix names
vkucera Sep 27, 2025
3065eab
Fix names and macro compilation
vkucera Sep 29, 2025
29f6665
Fix readability in macros
vkucera Sep 29, 2025
ab76bd0
dataCreatorCharmResoReduced.cxx: Simplify return condition
vkucera Sep 30, 2025
a618ddc
Mass fitter: Fix nullptr dereference. Remove unused code.
vkucera Sep 30, 2025
2f65eef
utilsCorrelations.h: Fix wrong mass
vkucera Sep 30, 2025
3c04fec
treeCreatorLcToK0sP.cxx: Fix table filling
vkucera Sep 30, 2025
c9831f7
correlatorDsHadrons.cxx: Fix histogram filling
vkucera Sep 30, 2025
282f9a7
taskMcValidation.cxx: Simplify getting rejection mask
vkucera Sep 30, 2025
320d443
HFInvMassFitter: Fix integer division
vkucera Sep 30, 2025
9007f34
Modernise macros
vkucera Sep 30, 2025
d336e35
Fix misc
vkucera Sep 30, 2025
4be695a
Fix includes
vkucera Sep 30, 2025
db5c993
Fix const
vkucera Sep 30, 2025
a34ca0c
Merge branch 'master' into hf-clang-tidy
vkucera Oct 2, 2025
c5e72f8
taskElectronWeakBoson.cxx: Reapply fixes after merge.
vkucera Oct 2, 2025
82bb54a
Fix names in correlatorLcScHadrons.cxx
vkucera Oct 2, 2025
097b009
Please consider the following formatting changes to #13206 (#134)
alibuild Oct 2, 2025
be0fc82
Merge branch 'master' into hf-clang-tidy
vkucera Oct 4, 2025
5f8e5a9
Merge branch 'master' into hf-clang-tidy
vkucera Oct 5, 2025
d0c56ec
Consistent order
vkucera Oct 6, 2025
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
30 changes: 16 additions & 14 deletions PWGHF/Core/CentralityEstimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include <Framework/Logger.h>

#include <cstdint>

namespace o2::hf_centrality
{
// centrality selection estimators
Expand All @@ -32,34 +34,34 @@ enum CentralityEstimator {
};

template <typename T>
concept hasFT0ACent = requires(T collision) {
concept HasFT0ACent = requires(T collision) {
collision.centFT0A();
};

template <typename T>
concept hasFT0CCent = requires(T collision) {
concept HasFT0CCent = requires(T collision) {
collision.centFT0C();
};

template <typename T>
concept hasFT0MCent = requires(T collision) {
concept HasFT0MCent = requires(T collision) {
collision.centFT0M();
};

template <typename T>
concept hasFV0ACent = requires(T collision) {
concept HasFV0ACent = requires(T collision) {
collision.centFV0A();
};

template <typename T>
concept hasNTracksPVCent = requires(T collision) {
concept HasNTracksPvCent = requires(T collision) {
collision.centNTPV();
};

/// Evaluate centrality/multiplicity percentile using FT0A estimator
/// \param candidate is candidate
/// \return centrality/multiplicity percentile of the collision
template <hasFT0ACent TCollision>
template <HasFT0ACent TCollision>
float getCentralityColl(const TCollision& collision)
{
return collision.centFT0A();
Expand All @@ -68,7 +70,7 @@ float getCentralityColl(const TCollision& collision)
/// Evaluate centrality/multiplicity percentile using FT0C estimator
/// \param candidate is candidate
/// \return centrality/multiplicity percentile of the collision
template <hasFT0CCent TCollision>
template <HasFT0CCent TCollision>
float getCentralityColl(const TCollision& collision)
{
return collision.centFT0C();
Expand All @@ -77,7 +79,7 @@ float getCentralityColl(const TCollision& collision)
/// Evaluate centrality/multiplicity percentile using FT0M estimator
/// \param candidate is candidate
/// \return centrality/multiplicity percentile of the collision
template <hasFT0MCent TCollision>
template <HasFT0MCent TCollision>
float getCentralityColl(const TCollision& collision)
{
return collision.centFT0M();
Expand All @@ -86,7 +88,7 @@ float getCentralityColl(const TCollision& collision)
/// Evaluate centrality/multiplicity percentile using FV0A estimator
/// \param candidate is candidate
/// \return centrality/multiplicity percentile of the collision
template <hasFV0ACent TCollision>
template <HasFV0ACent TCollision>
float getCentralityColl(const TCollision& collision)
{
return collision.centFV0A();
Expand All @@ -95,7 +97,7 @@ float getCentralityColl(const TCollision& collision)
/// Evaluate centrality/multiplicity percentile using NTracksPV estimator
/// \param candidate is candidate
/// \return centrality/multiplicity percentile of the collision
template <hasNTracksPVCent TCollision>
template <HasNTracksPvCent TCollision>
float getCentralityColl(const TCollision& collision)
{
return collision.centNTPV();
Expand All @@ -119,25 +121,25 @@ float getCentralityColl(const TCollision& collision, const int centEstimator)
{
switch (centEstimator) {
case CentralityEstimator::FT0A:
if constexpr (hasFT0ACent<TCollision>) {
if constexpr (HasFT0ACent<TCollision>) {
return collision.centFT0A();
}
LOG(fatal) << "Collision does not have centFT0A().";
break;
case CentralityEstimator::FT0C:
if constexpr (hasFT0CCent<TCollision>) {
if constexpr (HasFT0CCent<TCollision>) {
return collision.centFT0C();
}
LOG(fatal) << "Collision does not have centFT0C().";
break;
case CentralityEstimator::FT0M:
if constexpr (hasFT0MCent<TCollision>) {
if constexpr (HasFT0MCent<TCollision>) {
return collision.centFT0M();
}
LOG(fatal) << "Collision does not have centFT0M().";
break;
case CentralityEstimator::FV0A:
if constexpr (hasFV0ACent<TCollision>) {
if constexpr (HasFV0ACent<TCollision>) {
return collision.centFV0A();
}
LOG(fatal) << "Collision does not have centFV0A().";
Expand Down
20 changes: 10 additions & 10 deletions PWGHF/Core/HfHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ class HfHelper
auto cosPiKPhiRestFrame(const T& candidate, int option)
{
// Ported from AliAODRecoDecayHF3Prong::CosPiKPhiRFrame
std::array<float, 3> momPi;
std::array<float, 3> momK1;
std::array<float, 3> momK2;
std::array<float, 3> momPi{};
std::array<float, 3> momK1{};
std::array<float, 3> momK2{};

if (option == 0) { // KKPi
momPi = candidate.pVectorProng2();
Expand All @@ -304,12 +304,12 @@ class HfHelper
momK2 = candidate.pVectorProng2();
}

ROOT::Math::PxPyPzMVector vecPi(momPi[0], momPi[1], momPi[2], o2::constants::physics::MassPiPlus);
ROOT::Math::PxPyPzMVector vecK1(momK1[0], momK1[1], momK1[2], o2::constants::physics::MassKPlus);
ROOT::Math::PxPyPzMVector vecK2(momK2[0], momK2[1], momK2[2], o2::constants::physics::MassKPlus);
ROOT::Math::PxPyPzMVector vecPhi = vecK1 + vecK2;
ROOT::Math::PxPyPzMVector const vecPi(momPi[0], momPi[1], momPi[2], o2::constants::physics::MassPiPlus);
ROOT::Math::PxPyPzMVector const vecK1(momK1[0], momK1[1], momK1[2], o2::constants::physics::MassKPlus);
ROOT::Math::PxPyPzMVector const vecK2(momK2[0], momK2[1], momK2[2], o2::constants::physics::MassKPlus);
ROOT::Math::PxPyPzMVector const vecPhi = vecK1 + vecK2;

ROOT::Math::Boost boostToPhiRestFrame(vecPhi.BoostToCM());
ROOT::Math::Boost const boostToPhiRestFrame(vecPhi.BoostToCM());
auto momPiPhiRestFrame = boostToPhiRestFrame(vecPi).Vect();
auto momK1PhiRestFrame = boostToPhiRestFrame(vecK1).Vect();

Expand Down Expand Up @@ -522,8 +522,8 @@ class HfHelper
phiPi = RecoDecay::phi(candidate.pxProng2(), candidate.pyProng2());
}

double deltaEta = etaJpsi - etaPi;
double deltaPhi = RecoDecay::constrainAngle(phiJpsi - phiPi, -o2::constants::math::PI);
double const deltaEta = etaJpsi - etaPi;
double const deltaPhi = RecoDecay::constrainAngle(phiJpsi - phiPi, -o2::constants::math::PI);

return RecoDecay::sqrtSumOfSquares(deltaEta, deltaPhi);
}
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/Core/HfMlResponseBplusToD0Pi.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "Tools/ML/MlResponse.h"

#include <CommonConstants/PhysicsConstants.h>

#include <cstdint>
#include <vector>

Expand Down Expand Up @@ -63,7 +65,7 @@
// where OBJECT is named candidateD , FEATURE = GETTER and INDEX is the index of the vector
#define CHECK_AND_FILL_VEC_D0_INDEX(FEATURE, GETTER1, GETTER2, INDEX) \
case static_cast<uint8_t>(InputFeaturesBplusToD0Pi::FEATURE): { \
if (pdgCode == o2::constants::physics::kD0) { \
if (pdgCode == o2::constants::physics::Pdg::kD0) { \
inputFeatures.emplace_back((candidateD0.GETTER1())[INDEX]); \
} else { \
inputFeatures.emplace_back((candidateD0.GETTER2())[INDEX]); \
Expand Down
2 changes: 2 additions & 0 deletions PWGHF/Core/HfMlResponseBplusToJpsiKReduced.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "Tools/ML/MlResponse.h"

#include <CommonConstants/PhysicsConstants.h>

#include <cstdint>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions PWGHF/Core/HfMlResponseBsToJpsiPhiReduced.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "Tools/ML/MlResponse.h"

#include <CommonConstants/PhysicsConstants.h>

#include <cstdint>
#include <vector>

Expand Down
Loading
Loading