From b521cd71a03e10b9a270a23a4bea9f3fc2cc45af Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Mon, 14 Apr 2025 14:48:02 +0200 Subject: [PATCH 1/8] added tof mass cut --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index ca7ced2677c..925a2502dae 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -208,6 +208,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"}; // Set the kinematic and PID cuts for tracks struct : ConfigurableGroup { Configurable pCut{"pCut", 0.3f, "Value of the p selection for spectra (default 0.3)"}; @@ -273,7 +275,7 @@ struct TrHeAnalysis { h->GetXaxis()->SetBinLabel(6, "Sel8 cut"); h->GetXaxis()->SetBinLabel(7, "Z-vert Cut"); histos.add("histogram/cuts", "cuts", HistType::kTH1D, - {{12, -0.5, 11.5}}); + {{13, -0.5, 12.5}}); auto hCuts = histos.get(HIST("histogram/cuts")); hCuts->GetXaxis()->SetBinLabel(1, "total"); hCuts->GetXaxis()->SetBinLabel(2, "p cut"); @@ -287,6 +289,7 @@ struct TrHeAnalysis { hCuts->GetXaxis()->SetBinLabel(10, "TPC refit"); hCuts->GetXaxis()->SetBinLabel(11, "ITS refit"); hCuts->GetXaxis()->SetBinLabel(12, "ITS cluster size"); + hCuts->GetXaxis()->SetBinLabel(13, "TOF mass cut"); for (int i = 0; i < nParticles; i++) { particles.push_back(Particle(particleNames.at(i), particlePdgCodes.at(i), particleMasses.at(i), particleCharge.at(i), @@ -382,6 +385,10 @@ struct TrHeAnalysis { histos.fill(HIST("histogram/cuts"), 12); continue; } + if (track.mass() < cfgCutMinTofMassH3 || track.mass() > cfgCutMaxTofMassH3) { + histos.fill(HIST("histogram/cuts"), 13); + continue; + } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), track.tpcInnerParam() / (1.f * track.sign()), track.tpcSignal()); @@ -531,6 +538,10 @@ struct TrHeAnalysis { histos.fill(HIST("histogram/cuts"), 12); continue; } + if (track.mass() < cfgCutMinTofMassH3 || track.mass() > cfgCutMaxTofMassH3) { + histos.fill(HIST("histogram/cuts"), 13); + continue; + } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), track.tpcInnerParam() / (1.f * track.sign()), track.tpcSignal()); From fc4591c8cc896ce5fc1ea7103aa75a279d9e42a2 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 14 Apr 2025 12:52:55 +0000 Subject: [PATCH 2/8] Please consider the following formatting changes --- 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 925a2502dae..bc402c3579b 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -386,7 +386,7 @@ struct TrHeAnalysis { continue; } if (track.mass() < cfgCutMinTofMassH3 || track.mass() > cfgCutMaxTofMassH3) { - histos.fill(HIST("histogram/cuts"), 13); + histos.fill(HIST("histogram/cuts"), 13); continue; } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), @@ -539,7 +539,7 @@ struct TrHeAnalysis { continue; } if (track.mass() < cfgCutMinTofMassH3 || track.mass() > cfgCutMaxTofMassH3) { - histos.fill(HIST("histogram/cuts"), 13); + histos.fill(HIST("histogram/cuts"), 13); continue; } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), From 30819977c56e02d00cd450e995f23dabc1c2432a Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Sun, 25 May 2025 15:41:26 +0200 Subject: [PATCH 3/8] rebase --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 42 +++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 592c992f0ac..7545fd18bab 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -136,7 +136,7 @@ class Particle int charge; float resolution; std::vector betheParams; - static constexpr int kNumBetheParams = 5; + static constexpr int nNumBetheParams = 5; Particle(const std::string name_, int pdgCode_, float mass_, int charge_, LabeledArray bethe) @@ -150,7 +150,7 @@ class Particle bethe.get(name, "resolution"); // Access the "resolution" parameter betheParams.clear(); - for (int i = 0; i < kNumBetheParams; ++i) { + for (int i = 0; i < nNumBetheParams; ++i) { betheParams.push_back(bethe.get(name, i)); } } @@ -366,10 +366,11 @@ struct TrHeAnalysis { histos.fill(HIST("histogram/pT"), track.pt()); histos.fill(HIST("histogram/p"), track.p()); histos.fill(HIST("histogram/TPCsignVsTPCmomentum"), - getRigidity(track), + getRigidity(track) * track.sign(), track.tpcSignal()); histos.fill(HIST("histogram/TOFbetaVsP"), - getRigidity(track), track.beta()); + getRigidity(track) * track.sign(), + track.beta()); if (enableTr && trRapCut) { if (std::abs(getTPCnSigma(track, particles.at(0))) < nsigmaTPCvar.nsigmaTPCTr) { @@ -391,10 +392,11 @@ struct TrHeAnalysis { continue; } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), - getRigidity(track), + getRigidity(track) * track.sign(), track.tpcSignal()); histos.fill(HIST("histogram/H3/H3-TOFbetaVsP"), - getRigidity(track), track.beta()); + getRigidity(track) * track.sign(), + track.beta()); float tPt = track.pt(); float tEta = track.eta(); float tPhi = track.phi(); @@ -437,10 +439,11 @@ struct TrHeAnalysis { continue; } histos.fill(HIST("histogram/He/He-TPCsignVsTPCmomentum"), - getRigidity(track), + getRigidity(track) * track.sign(), track.tpcSignal()); histos.fill(HIST("histogram/He/He-TOFbetaVsP"), - getRigidity(track), track.beta()); + getRigidity(track) * track.sign(), + track.beta()); float tPt = track.pt(); float tEta = track.eta(); float tPhi = track.phi(); @@ -520,10 +523,10 @@ struct TrHeAnalysis { histos.fill(HIST("histogram/pT"), track.pt()); histos.fill(HIST("histogram/p"), track.p()); histos.fill(HIST("histogram/TPCsignVsTPCmomentum"), - getRigidity(track) / (1.f * track.sign()), + getRigidity(track) * (1.f * track.sign()), track.tpcSignal()); histos.fill(HIST("histogram/TOFbetaVsP"), - track.p() / (1.f * track.sign()), track.beta()); + track.p() * (1.f * track.sign()), track.beta()); if (enableTr && trRapCut) { if (std::abs(track.tpcNSigmaTr()) < nsigmaTPCvar.nsigmaTPCTr) { if (track.itsChi2NCl() > cfgCutMaxChi2ItsH3) { @@ -544,10 +547,10 @@ struct TrHeAnalysis { continue; } histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"), - getRigidity(track) / (1.f * track.sign()), + getRigidity(track) * (1.f * track.sign()), track.tpcSignal()); histos.fill(HIST("histogram/H3/H3-TOFbetaVsP"), - track.p() / (1.f * track.sign()), track.beta()); + track.p() * (1.f * track.sign()), track.beta()); float tPt = track.pt(); float tEta = track.eta(); float tPhi = track.phi(); @@ -589,10 +592,11 @@ struct TrHeAnalysis { continue; } histos.fill(HIST("histogram/He/He-TPCsignVsTPCmomentum"), - getRigidity(track), + getRigidity(track) * track.sign(), track.tpcSignal()); histos.fill(HIST("histogram/He/He-TOFbetaVsP"), - getRigidity(track), track.beta()); + getRigidity(track) * track.sign(), + track.beta()); float tPt = track.pt(); float tEta = track.eta(); float tPhi = track.phi(); @@ -643,12 +647,12 @@ struct TrHeAnalysis { template float getMeanItsClsSize(T const& track) { - constexpr int kNumLayers = 8; - constexpr int kBitsPerLayer = 4; - constexpr int kBitMask = (1 << kBitsPerLayer) - 1; + constexpr int nNumLayers = 8; + constexpr int nBitsPerLayer = 4; + constexpr int nBitMask = (1 << nBitsPerLayer) - 1; int sum = 0, n = 0; - for (int i = 0; i < kNumLayers; i++) { - int clsSize = (track.itsClusterSizes() >> (kBitsPerLayer * i)) & kBitMask; + for (int i = 0; i < nNumLayers; i++) { + int clsSize = (track.itsClusterSizes() >> (nBitsPerLayer * i)) & nBitMask; sum += clsSize; if (clsSize) n++; From efb57490890dacb94b3150beb137768e02036e66 Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Sun, 25 May 2025 15:46:09 +0200 Subject: [PATCH 4/8] minor linter fix --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 7545fd18bab..781a0af29ff 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -550,7 +550,8 @@ struct TrHeAnalysis { getRigidity(track) * (1.f * track.sign()), track.tpcSignal()); histos.fill(HIST("histogram/H3/H3-TOFbetaVsP"), - track.p() * (1.f * track.sign()), track.beta()); + track.p() * (1.f * track.sign()), + track.beta()); float tPt = track.pt(); float tEta = track.eta(); float tPhi = track.phi(); From cbfa1634780463d954912ad145fd39575103e94e Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Sun, 25 May 2025 15:49:47 +0200 Subject: [PATCH 5/8] linter fix --- PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx index 781a0af29ff..5d63da61d5d 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -136,7 +136,7 @@ class Particle int charge; float resolution; std::vector betheParams; - static constexpr int nNumBetheParams = 5; + static constexpr int NNumBetheParams = 5; Particle(const std::string name_, int pdgCode_, float mass_, int charge_, LabeledArray bethe) @@ -648,9 +648,9 @@ struct TrHeAnalysis { template float getMeanItsClsSize(T const& track) { - constexpr int nNumLayers = 8; - constexpr int nBitsPerLayer = 4; - constexpr int nBitMask = (1 << nBitsPerLayer) - 1; + constexpr int NNumLayers = 8; + constexpr int NBitsPerLayer = 4; + constexpr int NBitMask = (1 << nBitsPerLayer) - 1; int sum = 0, n = 0; for (int i = 0; i < nNumLayers; i++) { int clsSize = (track.itsClusterSizes() >> (nBitsPerLayer * i)) & nBitMask; From 4199ba537ed6bcb20a690b8a11994fd73df74e5e Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Sun, 25 May 2025 15:50:32 +0200 Subject: [PATCH 6/8] linter fix 2 --- 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 5d63da61d5d..aefed262fc8 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -650,10 +650,10 @@ struct TrHeAnalysis { { constexpr int NNumLayers = 8; constexpr int NBitsPerLayer = 4; - constexpr int NBitMask = (1 << nBitsPerLayer) - 1; + constexpr int NBitMask = (1 << NBitsPerLayer) - 1; int sum = 0, n = 0; for (int i = 0; i < nNumLayers; i++) { - int clsSize = (track.itsClusterSizes() >> (nBitsPerLayer * i)) & nBitMask; + int clsSize = (track.itsClusterSizes() >> (NBitsPerLayer * i)) & NBitMask; sum += clsSize; if (clsSize) n++; From 8f73d714b48925cea8d5eba8d3456f59c46c63b3 Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Sun, 25 May 2025 15:50:58 +0200 Subject: [PATCH 7/8] fix --- 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 aefed262fc8..ab86ba1133d 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -150,7 +150,7 @@ class Particle bethe.get(name, "resolution"); // Access the "resolution" parameter betheParams.clear(); - for (int i = 0; i < nNumBetheParams; ++i) { + for (int i = 0; i < NNumBetheParams; ++i) { betheParams.push_back(bethe.get(name, i)); } } From 6771246c5895a27d703b2b8a044780db82b4c8e3 Mon Sep 17 00:00:00 2001 From: mherzer28 Date: Sun, 25 May 2025 17:48:27 +0200 Subject: [PATCH 8/8] fix error --- 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 ab86ba1133d..e3c2dd88225 100644 --- a/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx +++ b/PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx @@ -652,7 +652,7 @@ struct TrHeAnalysis { constexpr int NBitsPerLayer = 4; constexpr int NBitMask = (1 << NBitsPerLayer) - 1; int sum = 0, n = 0; - for (int i = 0; i < nNumLayers; i++) { + for (int i = 0; i < NNumLayers; i++) { int clsSize = (track.itsClusterSizes() >> (NBitsPerLayer * i)) & NBitMask; sum += clsSize; if (clsSize)