Skip to content

Commit 43444b7

Browse files
committed
Fix
1 parent 34bc87d commit 43444b7

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
//
12+
/// \file hadronnucleicorrelation.cxx
1213
/// \brief Hadron-nuclei correlation analysis task
1314
/// \author Francesca Ercolessi
1415
/// \since 21 April 2024
@@ -450,12 +451,12 @@ struct HadronNucleiCorrelation {
450451
{
451452
bool isProton = false;
452453

453-
bool isTPCPID = std::abs(track.tpcNSigmaPr()) < nsigmaTPC;
454-
bool isTOFPID = std::abs(track.tofNSigmaPr()) < nsigmaTOF;
455-
bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrprTPCEl && track.tpcNSigmaEl() >= nsigmaElPr;
456-
bool isITSPID = track.itsNSigmaPr() > nsigmaITSPr;
454+
const bool isTPCPID = std::abs(track.tpcNSigmaPr()) < nsigmaTPC;
455+
const bool isTOFPID = std::abs(track.tofNSigmaPr()) < nsigmaTOF;
456+
const bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrprTPCEl && track.tpcNSigmaEl() >= nsigmaElPr;
457+
const bool isITSPID = track.itsNSigmaPr() > nsigmaITSPr;
457458

458-
bool isQuadraticPID = TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + track.tofNSigmaPr() * track.tofNSigmaPr()) < nsigmaTPC;
459+
const bool isQuadraticPID = std::hypot(track.tpcNSigmaPr(), track.tofNSigmaPr()) < nsigmaTPC;
459460

460461
if (!doQuadraticPID) {
461462
if (isTPCPID) {
@@ -547,12 +548,12 @@ struct HadronNucleiCorrelation {
547548
bool IsDeuteron(Type const& track, int sign)
548549
{
549550
bool isDeuteron = false;
550-
bool isTPCPID = std::abs(track.tpcNSigmaDe()) < nsigmaTPC;
551-
bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF;
552-
bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrdeTPCEl && track.tpcNSigmaEl() >= nsigmaElDe;
553-
bool isITSPID = track.itsNSigmaDe() > nsigmaITSDe;
551+
const bool isTPCPID = std::abs(track.tpcNSigmaDe()) < nsigmaTPC;
552+
const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF;
553+
const bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrdeTPCEl && track.tpcNSigmaEl() >= nsigmaElDe;
554+
const bool isITSPID = track.itsNSigmaDe() > nsigmaITSDe;
554555

555-
bool isQuadraticPID = TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + track.tofNSigmaDe() * track.tofNSigmaDe()) < nsigmaTPC;
556+
const bool isQuadraticPID = std::hypot(track.tpcNSigmaDe(), track.tofNSigmaDe()) < nsigmaTPC;
556557

557558
if (!doQuadraticPID) {
558559
if (isTPCPID) {

0 commit comments

Comments
 (0)