From 6416658e0c79276d4b90313f3c50741f7ec6c23b Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Sun, 20 Jul 2025 14:21:13 +0200 Subject: [PATCH 1/8] Update trHeAnalysis.cxx --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 57 +++++++++++---------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 40378ba6df4..c3d988c80f3 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -219,8 +219,8 @@ struct TrHeAnalysis { Configurable cfgCutMinItsClusterSizeHe{"cfgCutMinItsClusterSizeHe", 1.f, "Minimum ITS Cluster Size for He"}; Configurable cfgCutMaxItsClusterSizeH3{"cfgCutMaxItsClusterSizeH3", 4.f, "Maximum ITS Cluster Size for Tr"}; Configurable cfgCutMinItsClusterSizeH3{"cfgCutMinItsClusterSizeH3", 1.f, "Minimum ITS Cluster Size for Tr"}; - Configurable cfgCutMinTofMassH3{"cfgCutMinTofMassH3", 2.24f, "Minimum Tof mass H3"}; - Configurable cfgCutMaxTofMassH3{"cfgCutMaxTofMassH3", 3.32f, "Maximum TOF mass H3"}; + Configurable cfgCutMinTofMassH3{"cfgCutMinTofMassH3", 5f, "Minimum Tof mass H3"}; + Configurable cfgCutMaxTofMassH3{"cfgCutMaxTofMassH3", 11f, "Maximum TOF mass H3"}; // Set the kinematic and PID cuts for tracks struct : ConfigurableGroup { Configurable pCut{"pCut", 0.6f, "Value of the p selection for spectra (default 0.3)"}; @@ -706,35 +706,36 @@ struct TrHeAnalysis { return hePID ? track.tpcInnerParam() / 2 : track.tpcInnerParam(); } template - float getMass(const T& track) - { - if (cfgMassMethod == 0) { - return track.mass(); - } - if (cfgMassMethod == 1) { - const float beta = track.beta(); - const float rigidity = getRigidity(track); - float gamma = 1 / std::sqrt(1 - beta * beta); - float mass = (rigidity / std::sqrt(gamma * gamma - 1.f)); - return mass; - } - if (cfgMassMethod == 2) { - const float rigidity = getRigidity(track); - float tofStartTime = track.evTimeForTrack(); - float tofTime = track.tofSignal(); - constexpr float CInCmPs = 2.99792458e-2f; - float length = track.length(); - float time = tofTime - tofStartTime; - if (time > 0.f && length > 0.f) { - float beta = length / (CInCmPs * time); - float gamma = 1 / std::sqrt(1 - beta * beta); - float mass = rigidity / std::sqrt(gamma * gamma - 1.f); - return mass; - } - return -1.f; +float getMassSquared(const T& track) +{ + if (cfgMassMethod == 0) { + float m = track.mass(); + return m * m; + } + if (cfgMassMethod == 1) { + const float beta = track.beta(); + const float rigidity = getRigidity(track); + float gamma = 1.f / std::sqrt(1.f - beta * beta); + float mass = rigidity / std::sqrt(gamma * gamma - 1.f); + return mass * mass; + } + if (cfgMassMethod == 2) { + const float rigidity = getRigidity(track); + float tofStartTime = track.evTimeForTrack(); + float tofTime = track.tofSignal(); + constexpr float CInCmPs = 2.99792458e-2f; + float length = track.length(); + float time = tofTime - tofStartTime; + if (time > 0.f && length > 0.f) { + float beta = length / (CInCmPs * time); + float gamma = 1.f / std::sqrt(1.f - beta * beta); + float mass = rigidity / std::sqrt(gamma * gamma - 1.f); + return mass * mass; } return -1.f; } + return -1.f; +} }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From e1204d1c4d86a8a5a0b31ebdf258f348cb5b6297 Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:06:17 +0200 Subject: [PATCH 2/8] add cfg for enabling/disabling tof mass cut --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index c3d988c80f3..d2b74f2af3d 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -194,6 +194,7 @@ struct TrHeAnalysis { Configurable cfgTPCPidMethod{"cfgTPCPidMethod", false, "Using own or built in bethe parametrization"}; // false for built in Configurable cfgMassMethod{"cfgMassMethod", 0, "0: Using built in 1: mass calculated with beta 2: mass calculated with the event time"}; Configurable cfgEnableItsClusterSizeCut{"cfgEnableItsClusterSizeCut", false, "Enable ITS cluster size cut"}; + Configurable cfgEnableTofMassCut{"cfgEnableTofMassCut", false, "Enable TOF mass cut"}; // Set the multiplity event limits Configurable cfgLowMultCut{"cfgLowMultCut", 0.0f, "Accepted multiplicity percentage lower limit"}; Configurable cfgHighMultCut{"cfgHighMultCut", 100.0f, "Accepted multiplicity percentage higher limit"}; @@ -399,9 +400,11 @@ struct TrHeAnalysis { continue; } } - if (getMass(track) < cfgCutMinTofMassH3 || getMass(track) > cfgCutMaxTofMassH3) { - histos.fill(HIST("histogram/cuts"), 13); - continue; + if (cfgEnableTofMassCut) { + if (getMass(track) < cfgCutMinTofMassH3 || getMass(track) > cfgCutMaxTofMassH3) { + histos.fill(HIST("histogram/cuts"), 13); + continue; + } } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), getRigidity(track) * track.sign(), @@ -562,9 +565,11 @@ struct TrHeAnalysis { continue; } } - if (getMass(track) < cfgCutMinTofMassH3 || getMass(track) > cfgCutMaxTofMassH3) { - histos.fill(HIST("histogram/cuts"), 13); - continue; + if (cfgEnableTofMassCut) { + if (getMass(track) < cfgCutMinTofMassH3 || getMass(track) > cfgCutMaxTofMassH3) { + histos.fill(HIST("histogram/cuts"), 13); + continue; + } } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), getRigidity(track) * (1.f * track.sign()), From e4dfcff10a5af36d9085f11b5d095232581b8ee9 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 22 Jul 2025 13:08:28 +0000 Subject: [PATCH 3/8] Please consider the following formatting changes --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index d2b74f2af3d..0b1664d2b7f 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -711,36 +711,36 @@ struct TrHeAnalysis { return hePID ? track.tpcInnerParam() / 2 : track.tpcInnerParam(); } template -float getMassSquared(const T& track) -{ - if (cfgMassMethod == 0) { - float m = track.mass(); - return m * m; - } - if (cfgMassMethod == 1) { - const float beta = track.beta(); - const float rigidity = getRigidity(track); - float gamma = 1.f / std::sqrt(1.f - beta * beta); - float mass = rigidity / std::sqrt(gamma * gamma - 1.f); - return mass * mass; - } - if (cfgMassMethod == 2) { - const float rigidity = getRigidity(track); - float tofStartTime = track.evTimeForTrack(); - float tofTime = track.tofSignal(); - constexpr float CInCmPs = 2.99792458e-2f; - float length = track.length(); - float time = tofTime - tofStartTime; - if (time > 0.f && length > 0.f) { - float beta = length / (CInCmPs * time); + float getMassSquared(const T& track) + { + if (cfgMassMethod == 0) { + float m = track.mass(); + return m * m; + } + if (cfgMassMethod == 1) { + const float beta = track.beta(); + const float rigidity = getRigidity(track); float gamma = 1.f / std::sqrt(1.f - beta * beta); float mass = rigidity / std::sqrt(gamma * gamma - 1.f); return mass * mass; } + if (cfgMassMethod == 2) { + const float rigidity = getRigidity(track); + float tofStartTime = track.evTimeForTrack(); + float tofTime = track.tofSignal(); + constexpr float CInCmPs = 2.99792458e-2f; + float length = track.length(); + float time = tofTime - tofStartTime; + if (time > 0.f && length > 0.f) { + float beta = length / (CInCmPs * time); + float gamma = 1.f / std::sqrt(1.f - beta * beta); + float mass = rigidity / std::sqrt(gamma * gamma - 1.f); + return mass * mass; + } + return -1.f; + } return -1.f; } - return -1.f; -} }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From abcd4893857d5e14c76968d8eec05549ea91c130 Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:18:54 +0200 Subject: [PATCH 4/8] Update trHeAnalysis.cxx --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 0b1664d2b7f..fbe193c9cdd 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -195,6 +195,7 @@ struct TrHeAnalysis { Configurable cfgMassMethod{"cfgMassMethod", 0, "0: Using built in 1: mass calculated with beta 2: mass calculated with the event time"}; Configurable cfgEnableItsClusterSizeCut{"cfgEnableItsClusterSizeCut", false, "Enable ITS cluster size cut"}; Configurable cfgEnableTofMassCut{"cfgEnableTofMassCut", false, "Enable TOF mass cut"}; + Configurable cfgTofMassCutPt{"cfgTofMassCutPt", 1.6f, "Pt value for which the TOF-cut starts to be used"}; // Set the multiplity event limits Configurable cfgLowMultCut{"cfgLowMultCut", 0.0f, "Accepted multiplicity percentage lower limit"}; Configurable cfgHighMultCut{"cfgHighMultCut", 100.0f, "Accepted multiplicity percentage higher limit"}; @@ -400,7 +401,7 @@ struct TrHeAnalysis { continue; } } - if (cfgEnableTofMassCut) { + if (cfgEnableTofMassCut && track.pt() > cfgTofMassCutPt) { if (getMass(track) < cfgCutMinTofMassH3 || getMass(track) > cfgCutMaxTofMassH3) { histos.fill(HIST("histogram/cuts"), 13); continue; @@ -565,7 +566,7 @@ struct TrHeAnalysis { continue; } } - if (cfgEnableTofMassCut) { + if (cfgEnableTofMassCut && track.pt() > cfgTofMassCutPt) { if (getMass(track) < cfgCutMinTofMassH3 || getMass(track) > cfgCutMaxTofMassH3) { histos.fill(HIST("histogram/cuts"), 13); continue; From 4fa92ca5623510af94d61ec3a6b7fe4c138eec87 Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Wed, 23 Jul 2025 07:06:54 +0200 Subject: [PATCH 5/8] fix1 --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index fbe193c9cdd..304cf89c897 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -221,8 +221,8 @@ struct TrHeAnalysis { Configurable cfgCutMinItsClusterSizeHe{"cfgCutMinItsClusterSizeHe", 1.f, "Minimum ITS Cluster Size for He"}; Configurable cfgCutMaxItsClusterSizeH3{"cfgCutMaxItsClusterSizeH3", 4.f, "Maximum ITS Cluster Size for Tr"}; Configurable cfgCutMinItsClusterSizeH3{"cfgCutMinItsClusterSizeH3", 1.f, "Minimum ITS Cluster Size for Tr"}; - Configurable cfgCutMinTofMassH3{"cfgCutMinTofMassH3", 5f, "Minimum Tof mass H3"}; - Configurable cfgCutMaxTofMassH3{"cfgCutMaxTofMassH3", 11f, "Maximum TOF mass H3"}; + Configurable cfgCutMinTofMassH3{"cfgCutMinTofMassH3", 5.f, "Minimum Tof mass H3"}; + Configurable cfgCutMaxTofMassH3{"cfgCutMaxTofMassH3", 11.f, "Maximum TOF mass H3"}; // Set the kinematic and PID cuts for tracks struct : ConfigurableGroup { Configurable pCut{"pCut", 0.6f, "Value of the p selection for spectra (default 0.3)"}; From 019535fe8a5efd1f4521ecd803f841e0533a5d46 Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:26:21 +0200 Subject: [PATCH 6/8] fix2 --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 304cf89c897..5e332590684 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -223,6 +223,9 @@ struct TrHeAnalysis { Configurable cfgCutMinItsClusterSizeH3{"cfgCutMinItsClusterSizeH3", 1.f, "Minimum ITS Cluster Size for Tr"}; Configurable cfgCutMinTofMassH3{"cfgCutMinTofMassH3", 5.f, "Minimum Tof mass H3"}; Configurable cfgCutMaxTofMassH3{"cfgCutMaxTofMassH3", 11.f, "Maximum TOF mass H3"}; + Configurable cfgMaxRigidity{"cfgMaxRigidity", 10.f, "Maximum rigidity value"}; + Configurable cfgMaxPt{"cfgMaxPt", 10.f, "Maximum pT value"}; + // Set the kinematic and PID cuts for tracks struct : ConfigurableGroup { Configurable pCut{"pCut", 0.6f, "Value of the p selection for spectra (default 0.3)"}; @@ -312,6 +315,8 @@ struct TrHeAnalysis { void process(soa::Join::iterator const& event, TracksFull const& tracks) { + template + float getMass(const T& track); bool trRapCut = kFALSE; bool heRapCut = kFALSE; histos.fill(HIST("event/eventSelection"), 0); @@ -347,6 +352,9 @@ struct TrHeAnalysis { histos.fill(HIST("histogram/cuts"), 2); continue; } + if (track.pt() > cfgMaxPt || getRigidity(track) > cfgMaxRigidity) { + continue; + } if (track.tpcNClsFound() < cfgCutTpcClusters) { histos.fill(HIST("histogram/cuts"), 3); continue; @@ -514,6 +522,9 @@ struct TrHeAnalysis { histos.fill(HIST("histogram/cuts"), 2); continue; } + if (track.pt() > cfgMaxPt || getRigidity(track) > cfgMaxRigidity) { + continue; + } if (track.tpcNClsFound() < cfgCutTpcClusters) { histos.fill(HIST("histogram/cuts"), 3); continue; From f00d366ea05fd3cfc0ae37e10700e58256a398d5 Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:36:30 +0200 Subject: [PATCH 7/8] Update trHeAnalysis.cxx --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 5e332590684..d228705b865 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -315,8 +315,6 @@ struct TrHeAnalysis { void process(soa::Join::iterator const& event, TracksFull const& tracks) { - template - float getMass(const T& track); bool trRapCut = kFALSE; bool heRapCut = kFALSE; histos.fill(HIST("event/eventSelection"), 0); From 4d71e2e463e33a369357162532c87990fd7919f0 Mon Sep 17 00:00:00 2001 From: mherzer <96999709+mherzer28@users.noreply.github.com> Date: Wed, 23 Jul 2025 22:46:28 +0200 Subject: [PATCH 8/8] Update trHeAnalysis.cxx --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index d228705b865..3d3e2b61d2c 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -721,7 +721,7 @@ struct TrHeAnalysis { return hePID ? track.tpcInnerParam() / 2 : track.tpcInnerParam(); } template - float getMassSquared(const T& track) + float getMass(const T& track) { if (cfgMassMethod == 0) { float m = track.mass();