From e00f2dde291bf94537849a46ff184a5360459dc6 Mon Sep 17 00:00:00 2001 From: Lucia Anna Tarasovicova Date: Thu, 25 Apr 2024 11:27:48 +0200 Subject: [PATCH 1/4] momentum thr for TOF usage --- .../Strangeness/derivedcascadeanalysis.cxx | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx index af9ce69646b..8efe31e1eeb 100644 --- a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx @@ -421,7 +421,7 @@ struct derivedCascadeAnalysis { } template - bool IsCascadeCandidateAccepted(TCascade casc, int counter, float /*centrality*/) + bool IsCascadeCandidateAccepted(TCascade casc, int counter, float centrality) { float cut = masswin; histos.fill(HIST("hCutValue"), 2, cut); @@ -667,27 +667,31 @@ struct derivedCascadeAnalysis { cut = ctau; histos.fill(HIST("hCutValue"), 22, cut); + double fullmomentum; + if (posExtra.hasTOF()) { + fullmomentum = TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2)); if (doNTOFSigmaProtonCut && casc.sign() < 0) { - histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2)), coll.centFT0C()); - if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr) + histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), fullmomentum, coll.centFT0C()); + if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr && fullmomentum > 0.6) continue; } if (doNTOFSigmaV0PionCut && casc.sign() > 0) { - histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2)), coll.centFT0C()); + histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), fullmomentum, coll.centFT0C()); if (TMath::Abs(casc.tofNSigmaXiLaPi()) > nsigmatofPion) continue; } } if (negExtra.hasTOF()) { + fullmomentum = TMath::Sqrt(TMath::Power(casc.pxneg(), 2) + TMath::Power(casc.pyneg(), 2) + TMath::Power(casc.pzneg(), 2)); if (doNTOFSigmaProtonCut && casc.sign() > 0) { - histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), TMath::Sqrt(TMath::Power(casc.pxneg(), 2) + TMath::Power(casc.pyneg(), 2) + TMath::Power(casc.pzneg(), 2)), coll.centFT0C()); - if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr) + histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), fullmomentum, coll.centFT0C()); + if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr && fullmomentum > 0.6) continue; } if (doNTOFSigmaV0PionCut && casc.sign() < 0) { - histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), TMath::Sqrt(TMath::Power(casc.pxneg(), 2) + TMath::Power(casc.pyneg(), 2) + TMath::Power(casc.pzneg(), 2)), coll.centFT0C()); + histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), fullmomentum, coll.centFT0C()); if (TMath::Abs(casc.tofNSigmaXiLaPi()) > nsigmatofPion) continue; } @@ -888,28 +892,31 @@ struct derivedCascadeAnalysis { float cascpos = std::hypot(casc.x() - coll.posX(), casc.y() - coll.posY(), casc.z() - coll.posZ()); float cascptotmom = std::hypot(casc.px(), casc.py(), casc.pz()); float ctau = -10; + double fullmomentum; if (posExtra.hasTOF()) { + fullmomentum = TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2)); if (doNTOFSigmaProtonCut && casc.sign() < 0) { - histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2)), coll.centFT0C()); - if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr) + histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), fullmomentum, coll.centFT0C()); + if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr && fullmomentum > 0.6) continue; } if (doNTOFSigmaV0PionCut && casc.sign() > 0) { - histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2)), coll.centFT0C()); + histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), fullmomentum, coll.centFT0C()); if (TMath::Abs(casc.tofNSigmaXiLaPi()) > nsigmatofPion) continue; } } if (negExtra.hasTOF()) { + fullmomentum = TMath::Sqrt(TMath::Power(casc.pxneg(), 2) + TMath::Power(casc.pyneg(), 2) + TMath::Power(casc.pzneg(), 2)); if (doNTOFSigmaProtonCut && casc.sign() > 0) { - histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), TMath::Sqrt(TMath::Power(casc.pxneg(), 2) + TMath::Power(casc.pyneg(), 2) + TMath::Power(casc.pzneg(), 2)), coll.centFT0C()); - if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr) + histos.fill(HIST("hNsigmaTOFProton"), casc.tofNSigmaXiLaPr(), fullmomentum, coll.centFT0C()); + if (TMath::Abs(casc.tofNSigmaXiLaPr()) > nsigmatofPr && fullmomentum > 0.6) continue; } if (doNTOFSigmaV0PionCut && casc.sign() < 0) { - histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), TMath::Sqrt(TMath::Power(casc.pxneg(), 2) + TMath::Power(casc.pyneg(), 2) + TMath::Power(casc.pzneg(), 2)), coll.centFT0C()); + histos.fill(HIST("hNsigmaTOFV0Pion"), casc.tofNSigmaXiLaPi(), fullmomentum, coll.centFT0C()); if (TMath::Abs(casc.tofNSigmaXiLaPi()) > nsigmatofPion) continue; } From aeaf05f978d0d67530246eea1b654fc5c6b394eb Mon Sep 17 00:00:00 2001 From: Lucia Anna Tarasovicova Date: Thu, 25 Apr 2024 13:22:33 +0200 Subject: [PATCH 2/4] MegaLinter fix --- .../Strangeness/derivedcascadeanalysis.cxx | 51 ++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx index 8efe31e1eeb..b505cc5bbc5 100644 --- a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx @@ -462,8 +462,9 @@ struct derivedCascadeAnalysis { return false; } histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (doDCAV0DauCut) { cut = dcav0dau; @@ -471,8 +472,9 @@ struct derivedCascadeAnalysis { if (casc.dcaV0daughters() > dcav0dau) return false; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (doCascadeRadiusCut) { if (doPtDepCascRadiusCut) { @@ -491,8 +493,9 @@ struct derivedCascadeAnalysis { if (casc.cascradius() > maxRadius) return false; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { counter += 2; + } if (doV0RadiusCut) { if (doPtDepV0RadiusCut) { @@ -510,8 +513,9 @@ struct derivedCascadeAnalysis { if (casc.v0radius() > maxV0Radius) return false; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { counter += 2; + } cut = lambdaMassWin; histos.fill(HIST("hCutValue"), 10, cut); @@ -526,15 +530,17 @@ struct derivedCascadeAnalysis { return false; } histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (doV0CosPaCut) { if (!IsCosPAAccepted(casc, casc.x(), casc.y(), casc.z(), doPtDepV0CosPaCut, false)) return false; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } cut = rejcomp; histos.fill(HIST("hCutValue"), 13, cut); @@ -562,8 +568,9 @@ struct derivedCascadeAnalysis { if (casc.sign() < 0 && (TMath::Abs(casc.dcapostopv()) < dcaBaryonToPV || TMath::Abs(casc.dcanegtopv()) < dcaMesonToPV)) return false; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } return true; } @@ -613,8 +620,9 @@ struct derivedCascadeAnalysis { if (!IsCosPAAccepted(casc, coll.posX(), coll.posY(), coll.posZ(), doPtDepCosPaCut, true)) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } cut = dcaV0ToPV; histos.fill(HIST("hCutValue"), 17, cut); @@ -622,8 +630,9 @@ struct derivedCascadeAnalysis { if (TMath::Abs(casc.dcav0topv(coll.posX(), coll.posY(), coll.posZ())) < dcaV0ToPV) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (doNTPCSigmaCut) { if (casc.sign() < 0) { @@ -639,8 +648,9 @@ struct derivedCascadeAnalysis { continue; histos.fill(HIST("hCandidate"), ++counter); } - } else + } else { ++counter; + } if (posExtra.tpcCrossedRows() < mintpccrrows || negExtra.tpcCrossedRows() < mintpccrrows || bachExtra.tpcCrossedRows() < mintpccrrows) continue; @@ -729,8 +739,9 @@ struct derivedCascadeAnalysis { if (TMath::Abs(bachExtra.tpcNSigmaKa()) > nsigmatpcKa) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (bachExtra.hasTOF() && doNTOFSigmaBachelorCut) { histos.fill(HIST("hNsigmaTOFBachelorKaon"), casc.tofNSigmaOmKa(), TMath::Sqrt(TMath::Power(casc.pxbach(), 2) + TMath::Power(casc.pybach(), 2) + TMath::Power(casc.pzbach(), 2)), coll.centFT0C()); @@ -743,8 +754,9 @@ struct derivedCascadeAnalysis { if (ctau > proplifetime) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } } if (casc.sign() < 0) { @@ -843,15 +855,17 @@ struct derivedCascadeAnalysis { if (!IsCosPAAccepted(casc, coll.posX(), coll.posY(), coll.posZ(), doPtDepCosPaCut, true)) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (doDCAV0ToPVCut) { if (TMath::Abs(casc.dcav0topv(coll.posX(), coll.posY(), coll.posZ())) < dcaV0ToPV) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (doNTPCSigmaCut) { if (casc.sign() < 0) { @@ -867,8 +881,9 @@ struct derivedCascadeAnalysis { continue; histos.fill(HIST("hCandidate"), ++counter); } - } else + } else { ++counter; + } if (posExtra.tpcCrossedRows() < mintpccrrows || negExtra.tpcCrossedRows() < mintpccrrows || bachExtra.tpcCrossedRows() < mintpccrrows) continue; @@ -931,8 +946,9 @@ struct derivedCascadeAnalysis { if (TMath::Abs(bachExtra.tpcNSigmaPi()) > nsigmatpcPi) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (bachExtra.hasTOF() && doNTOFSigmaBachelorCut) { histos.fill(HIST("hNsigmaTOFBachelorPion"), casc.tofNSigmaXiPi(), TMath::Sqrt(TMath::Power(casc.pxbach(), 2) + TMath::Power(casc.pybach(), 2) + TMath::Power(casc.pzbach(), 2)), coll.centFT0C()); @@ -970,8 +986,9 @@ struct derivedCascadeAnalysis { if (ctau > proplifetime) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } invmass = casc.mOmega(); } From d19bebc7efb859ee48a97c9c71eb8938fd811245 Mon Sep 17 00:00:00 2001 From: Lucia Anna Tarasovicova Date: Thu, 25 Apr 2024 13:27:17 +0200 Subject: [PATCH 3/4] MegaLinter fix_2 --- PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx index b505cc5bbc5..1caeb5b22a0 100644 --- a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx @@ -716,8 +716,9 @@ struct derivedCascadeAnalysis { if (TMath::Abs(bachExtra.tpcNSigmaPi()) > nsigmatpcPi) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (bachExtra.hasTOF() && doNTOFSigmaBachelorCut) { histos.fill(HIST("hNsigmaTOFBachelorPion"), casc.tofNSigmaXiPi(), TMath::Sqrt(TMath::Power(casc.pxbach(), 2) + TMath::Power(casc.pybach(), 2) + TMath::Power(casc.pzbach(), 2)), coll.centFT0C()); @@ -972,8 +973,9 @@ struct derivedCascadeAnalysis { if (TMath::Abs(bachExtra.tpcNSigmaKa()) > nsigmatpcKa) continue; histos.fill(HIST("hCandidate"), ++counter); - } else + } else { ++counter; + } if (bachExtra.hasTOF() && doNTOFSigmaBachelorCut) { histos.fill(HIST("hNsigmaTOFBachelorKaon"), casc.tofNSigmaOmKa(), TMath::Sqrt(TMath::Power(casc.pxbach(), 2) + TMath::Power(casc.pybach(), 2) + TMath::Power(casc.pzbach(), 2)), coll.centFT0C()); From 9ccf0d82ba1fc8f223c380653ecfcb6b4ed0ee79 Mon Sep 17 00:00:00 2001 From: Lucia Anna Tarasovicova Date: Thu, 25 Apr 2024 13:34:12 +0200 Subject: [PATCH 4/4] MegaLinter fix_3 --- PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx index 1caeb5b22a0..264f9b49b48 100644 --- a/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedcascadeanalysis.cxx @@ -32,13 +32,8 @@ #include #include #include -#include #include #include -#include -#include -#include -#include "Framework/ASoAHelpers.h" // constants const float ctauxiPDG = 4.91; // from PDG