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
2 changes: 1 addition & 1 deletion Common/TableProducer/eventSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1343,15 +1343,15 @@
double perBcRateTCE = static_cast<double>(mCounterTCE[i + 1] - mCounterTCE[i]) / nOrbits / nCollidingBCs;
double perBcRateZNC = static_cast<double>(mCounterZNC[i + 1] - mCounterZNC[i]) / nOrbits / nCollidingBCs;
double perBcRateZEM = static_cast<double>(mCounterZEM[i + 1] - mCounterZEM[i]) / nOrbits / nCollidingBCs;
double muTVX = (perBcRateTVX < 1 && perBcRateTVX > 1e-10) ? -std::log(1 - perBcRateTVX) : 0;

Check failure on line 1346 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
double muTCE = (perBcRateTCE < 1 && perBcRateTCE > 1e-10) ? -std::log(1 - perBcRateTCE) : 0;

Check failure on line 1347 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
double muZNC = (perBcRateZNC < 1 && perBcRateZNC > 1e-10) ? -std::log(1 - perBcRateZNC) : 0;

Check failure on line 1348 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
double muZEM = (perBcRateZEM < 1 && perBcRateZEM > 1e-10) ? -std::log(1 - perBcRateZEM) : 0;

Check failure on line 1349 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOGP(debug, "orbit={} muTVX={} muTCE={} muZNC={} muZEM={}", mOrbits[i], muTVX, muTCE, muZNC, muZEM);
mPileupCorrectionTVX.push_back(muTVX > 1e-10 ? muTVX / (1 - std::exp(-muTVX)) : 1);

Check failure on line 1351 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mPileupCorrectionTCE.push_back(muTCE > 1e-10 ? muTCE / (1 - std::exp(-muTCE)) : 1);

Check failure on line 1352 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mPileupCorrectionZNC.push_back(muZNC > 1e-10 ? muZNC / (1 - std::exp(-muZNC)) : 1);

Check failure on line 1353 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mPileupCorrectionZEM.push_back(muZEM > 1e-10 ? muZEM / (1 - std::exp(-muZEM)) : 1);

Check failure on line 1354 in Common/TableProducer/eventSelection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
}
// filling last orbit range using previous orbit range
mPileupCorrectionTVX.push_back(mPileupCorrectionTVX.back());
Expand All @@ -1363,7 +1363,7 @@
const char* srun = Form("%d", run);

for (const auto& bc : bcs) {
auto& selection = bc.selection_raw();
auto selection = bc.selection_raw();
if (bcPatternB[bc.globalBC() % nBCsPerOrbit] == 0) // skip non-colliding bcs
continue;

Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ struct HfCandidateCreatorXicToXiPiPi {
// create KFParticle
KFParticle kfXi;
float massXi = casc.mXi();
kfXi.Create(parPosMom, casc.kfTrackCovMat(), casc.sign(), massXi);
kfXi.Create(parPosMom, casc.kfTrackCovMat().data(), casc.sign(), massXi);
if (useXiMassConstraint) {
kfXi.SetNonlinearMassConstraint(MassXiMinus);
}
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

HfHelper hfHelper;
SliceCache cache;
static constexpr double mass{o2::constants::physics::MassB0};

Check failure on line 83 in PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".

using CollisionsWCentMult = soa::Join<aod::Collisions, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::PVMultZeqs>;
using CollisionsWMcCentMult = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::PVMultZeqs>;
Expand Down Expand Up @@ -124,7 +124,7 @@

template <typename T, typename U, typename V>
void fillTablesCandidate(const T& candidate, const U& prongCharm, const V& prongBachelor, int candFlag, double invMass,
double ct, double y, int8_t flagMc, int8_t origin, float mlScore, const std::vector<float>& mlScoresCharm)
double ct, double y, int8_t flagMc, int8_t origin, float mlScore, std::vector<float>& mlScoresCharm)
{
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

HfHelper hfHelper;
SliceCache cache;
static constexpr double mass{o2::constants::physics::MassBPlus};

Check failure on line 83 in PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".

using CollisionsWCentMult = soa::Join<aod::Collisions, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::PVMultZeqs>;
using CollisionsWMcCentMult = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::PVMultZeqs>;
Expand Down Expand Up @@ -124,7 +124,7 @@

template <typename T, typename U, typename V>
void fillTablesCandidate(const T& candidate, const U& prongCharm, const V& prongBachelor, int candFlag, double invMass,
double ct, double y, int8_t flagMc, int8_t origin, float mlScore, const std::vector<float>& mlScoresCharm)
double ct, double y, int8_t flagMc, int8_t origin, float mlScore, std::vector<float>& mlScoresCharm)
{
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct HfDerivedDataCreatorD0ToKPi {

template <typename T>
void fillTablesCandidate(const T& candidate, int candFlag, double invMass, double cosThetaStar, double topoChi2,
double ct, double y, int8_t flagMc, int8_t origin, const std::vector<float>& mlScores)
double ct, double y, int8_t flagMc, int8_t origin, std::vector<float>& mlScores)
{
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {

template <typename T>
void fillTablesCandidate(const T& candidate, int candFlag, double invMass,
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, const std::vector<float>& mlScores)
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, std::vector<float>& mlScores)
{
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {

template <typename T, typename U>
void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass,
double y, int8_t flagMc, int8_t origin, const std::vector<float>& mlScores)
double y, int8_t flagMc, int8_t origin, std::vector<float>& mlScores)
{
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct HfDerivedDataCreatorLcToPKPi {

template <typename T>
void fillTablesCandidate(const T& candidate, int candFlag, double invMass,
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, const std::vector<float>& mlScores)
double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, std::vector<float>& mlScores)
{
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
Expand Down
4 changes: 2 additions & 2 deletions PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -1183,11 +1183,11 @@ DECLARE_SOA_COLUMN(BachX, bachX, float); //! bachelor track X at min
// REGULAR COLUMNS FOR CASCCOVS
// Saved from finding: covariance matrix of parent track (on request)
DECLARE_SOA_DYNAMIC_COLUMN(PositionCovMat, positionCovMat, //! for transparent handling
[](const float covMat[21]) -> std::vector<float> {
[](std::span<const float> covMat) -> std::vector<float> {
std::vector<float> posCovMat { covMat[0], covMat[1], covMat[2], covMat[3], covMat[4], covMat[5] };
return posCovMat; });
DECLARE_SOA_DYNAMIC_COLUMN(MomentumCovMat, momentumCovMat, //! for transparent handling
[](const float covMat[21]) -> std::vector<float> {
[](std::span<const float> covMat) -> std::vector<float> {
std::vector<float> momCovMat { covMat[9], covMat[13], covMat[14], covMat[18], covMat[19], covMat[20] };
return momCovMat; });
DECLARE_SOA_COLUMN(KFTrackCovMat, kfTrackCovMat, float[21]); //! covariance matrix elements for KF method (Cascade)
Expand Down
6 changes: 2 additions & 4 deletions PWGUD/Core/UDHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,14 @@ float FT0AmplitudeC(TFT0 ft0)
template <typename TFDD>
float FDDAmplitudeA(TFDD fdd)
{
std::vector<int16_t> ampsA(fdd.chargeA(), fdd.chargeA() + 8);
return std::accumulate(ampsA.begin(), ampsA.end(), 0);
return std::accumulate(fdd.chargeA().begin(), fdd.chargeA().end(), 0);
}

// -----------------------------------------------------------------------------
template <typename TFDD>
float FDDAmplitudeC(TFDD fdd)
{
std::vector<int16_t> ampsC(fdd.chargeC(), fdd.chargeC() + 8);
return std::accumulate(ampsC.begin(), ampsC.end(), 0);
return std::accumulate(fdd.chargeC().begin(), fdd.chargeC().end(), 0);
}

// -----------------------------------------------------------------------------
Expand Down
Loading