Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
namespace stracollision
{
DECLARE_SOA_DYNAMIC_COLUMN(IsUPC, isUPC, //! check whether this is a UPC or hadronic collision
[](int value) -> bool { return value <= 2 ? true : false; });

Check failure on line 50 in PWGLF/DataModel/LFStrangenessTables.h

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.
DECLARE_SOA_DYNAMIC_COLUMN(TotalFV0AmplitudeA, totalFV0AmplitudeA, //! get the total sum of the FV0 A amplitudes
[](float value) -> float { return value; });
DECLARE_SOA_DYNAMIC_COLUMN(TotalFT0AmplitudeA, totalFT0AmplitudeA, //! get the total sum of the FT0 A amplitudes
Expand Down Expand Up @@ -364,7 +364,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(ITSClusterMap, itsClusterMap, //! ITS cluster map, one bit per layer, starting from the innermost
[](uint32_t itsClusterSizes) -> uint8_t {
uint8_t clmap = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 367 in PWGLF/DataModel/LFStrangenessTables.h

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.
if ((itsClusterSizes >> (layer * 4)) & 0xf) {
clmap |= (1 << layer);
}
Expand Down Expand Up @@ -1183,11 +1183,11 @@
// 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