From a8bfbdceeb9db8e734a4049fc2e374a3ffa8659b Mon Sep 17 00:00:00 2001 From: Maria Paula Martins Palhares Date: Fri, 26 Apr 2024 17:50:19 +0200 Subject: [PATCH 1/5] Corrections for the Triton identification and expBethePos to Triton --- PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx index f597aefcadc..da26beae181 100644 --- a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx @@ -50,8 +50,8 @@ constexpr double betheBlochDefault[1][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32 static const std::vector betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; static const std::vector particleNames{"3H"}; -constexpr int h3DauPdg{1000010030}; -constexpr int lnnPdg{1010000030}; +constexpr int h3DauPdg{1000010030}; //PDG Triton +constexpr int lnnPdg{1010000030}; //PDG Lnn std::shared_ptr hEvents; std::shared_ptr hZvtx; @@ -119,7 +119,7 @@ struct lnnRecoTask { Configurable masswidth{"lnnmasswidth", 0.06, "Mass width (GeV/c^2)"}; Configurable dcav0dau{"lnndcaDau", 1.0, "DCA V0 Daughters"}; Configurable ptMin{"ptMin", 0.5, "Minimum pT of the lnncandidate"}; - Configurable TPCRigidityMin3H{"TPCRigidityMin3H", 0.5, "Minimum rigidity of the triton candidate"}; + Configurable TPCRigidityMin3H{"TPCRigidityMin3H", 1, "Minimum rigidity of the triton candidate"}; Configurable etaMax{"eta", 1., "eta daughter"}; Configurable nSigmaMax3H{"nSigmaMax3H", 5, "triton dEdx cut (n sigma)"}; Configurable nTPCClusMin3H{"nTPCClusMin3H", 80, "triton NTPC clusters cut"}; @@ -197,7 +197,7 @@ struct lnnRecoTask { hNsigma3HSel = qaRegistry.add("hNsigma3HSel", "; p_{TPC}/z (GeV/#it{c}); n_{#sigma} ({}^{3}H)", HistType::kTH2F, {rigidityAxis, nSigma3HAxis}); hdEdx3HSel = qaRegistry.add("hdEdx3HSel", ";p_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dEdxAxis}); hdEdxTot = qaRegistry.add("hdEdxTot", ";p_{TPC}/z (GeV/#it{c}); dE/dx", HistType::kTH2F, {rigidityAxis, dEdxAxis}); - hEvents = qaRegistry.add("hEvents", ";Events; ", HistType::kTH1D, {{3, -0.5, 2.5}}); + hEvents = qaRegistry.add("hEvents", ";Events; ", HistType::kTH1D, {{2, -0.5, 1.5}}); hEvents->GetXaxis()->SetBinLabel(1, "All"); hEvents->GetXaxis()->SetBinLabel(2, "sel8"); hEvents->GetXaxis()->SetBinLabel(3, "z vtx"); @@ -291,6 +291,7 @@ struct lnnRecoTask { // Bethe-Bloch calcution for 3H double expBethePos{tpc::BetheBlochAleph(static_cast(posRigidity * 2 / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; + double expBetheNeg{tpc::BetheBlochAleph(static_cast(negRigidity * 2 / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; // nSigma calculation @@ -470,7 +471,7 @@ struct lnnRecoTask { initCCDB(bc); hEvents->Fill(0.); - if (!collision.sel8() || std::abs(collision.posZ()) > 10) + if (!collision.sel8() || std::abs(collision.posZ()) > 10 || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) continue; hEvents->Fill(1.); hZvtx->Fill(collision.posZ()); @@ -515,7 +516,7 @@ struct lnnRecoTask { initCCDB(bc); hEvents->Fill(0.); - if (!collision.sel8() || std::abs(collision.posZ()) > 10) + if (!collision.sel8() || std::abs(collision.posZ()) > 10 || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) continue; hEvents->Fill(1.); hZvtx->Fill(collision.posZ()); From 28d9a8d3af737dc1ce7942855be23abe16514179 Mon Sep 17 00:00:00 2001 From: Maria Paula Martins Palhares Date: Fri, 26 Apr 2024 17:56:45 +0200 Subject: [PATCH 2/5] Changes of the Triton identification and expBethePos declaration --- PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx index da26beae181..a34a58c8a05 100644 --- a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx @@ -283,16 +283,16 @@ struct lnnRecoTask { // temporary fix: tpcInnerParam() returns the momentum in all the software tags before: https://github.com/AliceO2Group/AliceO2/pull/12521 bool posTritonPID = posTrack.pidForTracking() == o2::track::PID::Triton; bool negTritonPID = negTrack.pidForTracking() == o2::track::PID::Triton; - float posRigidity = posTritonPID ? posTrack.tpcInnerParam() / 2 : posTrack.tpcInnerParam(); - float negRigidity = negTritonPID ? negTrack.tpcInnerParam() / 2 : negTrack.tpcInnerParam(); + float posRigidity = posTrack.tpcInnerParam(); + float negRigidity = negTrack.tpcInnerParam(); hdEdxTot->Fill(posRigidity, posTrack.tpcSignal()); hdEdxTot->Fill(-negRigidity, negTrack.tpcSignal()); // Bethe-Bloch calcution for 3H - double expBethePos{tpc::BetheBlochAleph(static_cast(posRigidity * 2 / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; + double expBethePos{tpc::BetheBlochAleph(static_cast(posRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; - double expBetheNeg{tpc::BetheBlochAleph(static_cast(negRigidity * 2 / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; + double expBetheNeg{tpc::BetheBlochAleph(static_cast(negRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; // nSigma calculation double expSigmaPos{expBethePos * mBBparams3H[5]}; @@ -347,11 +347,6 @@ struct lnnRecoTask { h3PropTrack.getPxPyPzGlo(lnnCand.mom3H); piPropTrack.getPxPyPzGlo(lnnCand.momPi); - // the momentum has to be multiplied by 2 (charge) - for (int i = 0; i < 3; i++) { - lnnCand.mom3H[i] *= 2; - } - // Definition of relativistic momentum and energy to triton and pion and total energy float h3P2 = lnnCand.mom3H[0] * lnnCand.mom3H[0] + lnnCand.mom3H[1] * lnnCand.mom3H[1] + lnnCand.mom3H[2] * lnnCand.mom3H[2]; float piP2 = lnnCand.momPi[0] * lnnCand.momPi[0] + lnnCand.momPi[1] * lnnCand.momPi[1] + lnnCand.momPi[2] * lnnCand.momPi[2]; From ffda42fa7ab02b9ca96aba0f604a1ce99a6c6535 Mon Sep 17 00:00:00 2001 From: Maria Paula Martins Palhares Date: Mon, 29 Apr 2024 15:15:17 +0200 Subject: [PATCH 3/5] Remove tf selection (included in sel8) --- PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx index a34a58c8a05..47fd03cbfe2 100644 --- a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx @@ -466,7 +466,7 @@ struct lnnRecoTask { initCCDB(bc); hEvents->Fill(0.); - if (!collision.sel8() || std::abs(collision.posZ()) > 10 || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) + if (!collision.sel8() || std::abs(collision.posZ()) > 10) continue; hEvents->Fill(1.); hZvtx->Fill(collision.posZ()); @@ -511,7 +511,7 @@ struct lnnRecoTask { initCCDB(bc); hEvents->Fill(0.); - if (!collision.sel8() || std::abs(collision.posZ()) > 10 || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) + if (!collision.sel8() || std::abs(collision.posZ()) > 10) continue; hEvents->Fill(1.); hZvtx->Fill(collision.posZ()); From 3e245f1523a4ca283e8a400074e5ecadb20970fb Mon Sep 17 00:00:00 2001 From: Maria Paula Martins Palhares Date: Mon, 29 Apr 2024 16:11:37 +0200 Subject: [PATCH 4/5] posTritonPID and negTritonPID variables to hdEdx plotting --- PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx index 47fd03cbfe2..15a995a5520 100644 --- a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx @@ -280,14 +280,20 @@ struct lnnRecoTask { if (std::abs(posTrack.eta()) > etaMax || std::abs(negTrack.eta()) > etaMax) continue; + // temporary fix: tpcInnerParam() returns the momentum in all the software tags before: https://github.com/AliceO2Group/AliceO2/pull/12521 bool posTritonPID = posTrack.pidForTracking() == o2::track::PID::Triton; bool negTritonPID = negTrack.pidForTracking() == o2::track::PID::Triton; float posRigidity = posTrack.tpcInnerParam(); float negRigidity = negTrack.tpcInnerParam(); - hdEdxTot->Fill(posRigidity, posTrack.tpcSignal()); - hdEdxTot->Fill(-negRigidity, negTrack.tpcSignal()); + if (posTritonPID) { + hdEdxTot->Fill(posRigidity, posTrack.tpcSignal()); + } + + if (negTritonPID) { + hdEdxTot->Fill(-negRigidity, negTrack.tpcSignal()); + } // Bethe-Bloch calcution for 3H double expBethePos{tpc::BetheBlochAleph(static_cast(posRigidity / constants::physics::MassTriton), mBBparams3H[0], mBBparams3H[1], mBBparams3H[2], mBBparams3H[3], mBBparams3H[4])}; @@ -380,6 +386,7 @@ struct lnnRecoTask { continue; } + std::array primVtx = {collision.posX(), collision.posY(), collision.posZ()}; double cosPA = RecoDecay::cpa(primVtx, lnnCand.decVtx, lnnMom); @@ -387,6 +394,7 @@ struct lnnRecoTask { continue; } + for (int i = 0; i < 3; i++) { lnnCand.decVtx[i] = lnnCand.decVtx[i] - primVtx[i]; } From 94cf9b7f113ca9abe6d78bc49de56da4c9f62dc0 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 29 Apr 2024 14:13:30 +0000 Subject: [PATCH 5/5] Please consider the following formatting changes --- PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx index 15a995a5520..f9843fcee95 100644 --- a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx @@ -50,8 +50,8 @@ constexpr double betheBlochDefault[1][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32 static const std::vector betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; static const std::vector particleNames{"3H"}; -constexpr int h3DauPdg{1000010030}; //PDG Triton -constexpr int lnnPdg{1010000030}; //PDG Lnn +constexpr int h3DauPdg{1000010030}; // PDG Triton +constexpr int lnnPdg{1010000030}; // PDG Lnn std::shared_ptr hEvents; std::shared_ptr hZvtx; @@ -280,11 +280,10 @@ struct lnnRecoTask { if (std::abs(posTrack.eta()) > etaMax || std::abs(negTrack.eta()) > etaMax) continue; - // temporary fix: tpcInnerParam() returns the momentum in all the software tags before: https://github.com/AliceO2Group/AliceO2/pull/12521 bool posTritonPID = posTrack.pidForTracking() == o2::track::PID::Triton; bool negTritonPID = negTrack.pidForTracking() == o2::track::PID::Triton; - float posRigidity = posTrack.tpcInnerParam(); + float posRigidity = posTrack.tpcInnerParam(); float negRigidity = negTrack.tpcInnerParam(); if (posTritonPID) { @@ -386,7 +385,6 @@ struct lnnRecoTask { continue; } - std::array primVtx = {collision.posX(), collision.posY(), collision.posZ()}; double cosPA = RecoDecay::cpa(primVtx, lnnCand.decVtx, lnnMom); @@ -394,7 +392,6 @@ struct lnnRecoTask { continue; } - for (int i = 0; i < 3; i++) { lnnCand.decVtx[i] = lnnCand.decVtx[i] - primVtx[i]; } @@ -519,7 +516,7 @@ struct lnnRecoTask { initCCDB(bc); hEvents->Fill(0.); - if (!collision.sel8() || std::abs(collision.posZ()) > 10) + if (!collision.sel8() || std::abs(collision.posZ()) > 10) continue; hEvents->Fill(1.); hZvtx->Fill(collision.posZ());