From 806f30aa88c714e4ef2de45fa8f55ca26a90476f Mon Sep 17 00:00:00 2001 From: chiarapinto Date: Fri, 26 Sep 2025 11:46:23 +0200 Subject: [PATCH 1/2] [PWGLF] added custom nsigma calibration for He3 --- PWGLF/Tasks/Nuspex/antinucleiInJets.cxx | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx index 672afbec1a6..c9314b2fe53 100644 --- a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx +++ b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx @@ -44,6 +44,7 @@ #include "ReconstructionDataFormats/DCA.h" #include "ReconstructionDataFormats/PID.h" #include "ReconstructionDataFormats/Track.h" +#include "DataFormatsTPC/BetheBlochAleph.h" #include "TGrid.h" #include @@ -138,7 +139,9 @@ struct AntinucleiInJets { Configurable nSigmaItsMin{"nSigmaItsMin", -3.0, "nSigmaITS min"}; Configurable nSigmaItsMax{"nSigmaItsMax", +3.0, "nSigmaITS max"}; Configurable setMCDefaultItsParams{"setMCDefaultItsParams", false, "set MC default parameters"}; - + Configurable cfgCompensatePIDinTracking{"cfgCompensatePIDinTracking", false, "If true, divide tpcInnerParam by the electric charge"}; + Configurable> cfgBetheBlochParams{"cfgBetheBlochParams", {0.6539, 1.591, 0.8225, 2.363, 0.09}, "TPC Bethe-Bloch parameterisation for He3"}; + // CCDB manager service for accessing condition data Service ccdb; @@ -246,6 +249,11 @@ struct AntinucleiInJets { // nsigmaITS for antiproton candidates registryData.add("antiproton_nsigma_its_data", "antiproton_nsigma_its_data", HistType::kTH2F, {{nbins, min, max, "#it{p}_{T} (GeV/#it{c})"}, {400, -20.0, 20.0, "n#sigma_{ITS}"}}); + + // custom nsigma for He3 - needed for 24 pp data + registryData.add("tpcsignal_data", "Specific energy loss", HistType::kTH2F, {{600, -6., 6., "#it{p} (GeV/#it{c})"}, {1400, 0, 1400, "d#it{E} / d#it{X} (a. u.)"}}); + registryData.add("antihelium3_jet_tpc_custom", "antihelium3_jet_tpc_custom", HistType::kTH2F, {{nbins, 3 * min, 3 * max, "#it{p}_{T} (GeV/#it{c})"}, {400, -20.0, 20.0, "n#sigma_{TPC} custom"}}); + registryData.add("antihelium3_ue_tpc_custom", "antihelium3_ue_tpc_custom", HistType::kTH2F, {{nbins, 3 * min, 3 * max, "#it{p}_{T} (GeV/#it{c})"}, {400, -20.0, 20.0, "n#sigma_{TPC} custom"}}); } // Generated antiproton spectra in jets and UE from MC truth @@ -783,6 +791,12 @@ struct AntinucleiInJets { fastjet::PseudoJet fourMomentum(track.px(), track.py(), track.pz(), track.energy(MassPionCharged)); fourMomentum.set_user_index(id); fjParticles.emplace_back(fourMomentum); + + // Fill TPC signal vs p*sign for PID calibration + bool heliumPID = track.pidForTracking() == o2::track::PID::Helium3; + float correctedTpcInnerParam = (heliumPID && cfgCompensatePIDinTracking) ? track.tpcInnerParam() / 2 : track.tpcInnerParam(); + registryData.fill(HIST("tpcsignal_data"), correctedTpcInnerParam * track.sign(), track.tpcSignal()); + } // Reject empty events @@ -893,6 +907,12 @@ struct AntinucleiInJets { } if (passedItsPidHel) { registryData.fill(HIST("antihelium3_jet_tpc"), 2.0 * pt, nsigmaTPCHe); + //custom nsigma He3 based on bethe bloch fit of TPC signal + double tpcSignal = track.tpcSignal(); + double expectedSignalHe3 = tpc::BetheBlochAleph(static_cast(track.tpcInnerParam() * 2. / o2::constants::physics::MassHelium3), cfgBetheBlochParams.value[0], cfgBetheBlochParams.value[1], cfgBetheBlochParams.value[2], cfgBetheBlochParams.value[3], cfgBetheBlochParams.value[4]); + double sigmaHe3 = expectedSignalHe3 * cfgBetheBlochParams.value[4]; + double nSigmaTPCHe3Custom = (tpcSignal - expectedSignalHe3) / sigmaHe3; + registryData.fill(HIST("antihelium3_jet_tpc_custom"), 2.0 * pt, nSigmaTPCHe3Custom); } } @@ -983,6 +1003,12 @@ struct AntinucleiInJets { } if (passedItsPidHel) { registryData.fill(HIST("antihelium3_ue_tpc"), 2.0 * pt, nsigmaTPCHe); + //custom nsigma He3 based on bethe bloch fit of TPC signal + double tpcSignal = track.tpcSignal(); + double expectedSignalHe3 = tpc::BetheBlochAleph(static_cast(track.tpcInnerParam() * 2. / o2::constants::physics::MassHelium3), cfgBetheBlochParams.value[0], cfgBetheBlochParams.value[1], cfgBetheBlochParams.value[2], cfgBetheBlochParams.value[3], cfgBetheBlochParams.value[4]); + double sigmaHe3 = expectedSignalHe3 * cfgBetheBlochParams.value[4]; + double nSigmaTPCHe3Custom = (tpcSignal - expectedSignalHe3) / sigmaHe3; + registryData.fill(HIST("antihelium3_ue_tpc_custom"), 2.0 * pt, nSigmaTPCHe3Custom); } } From 49a1f020297434fafc0249ffb3fbcac53aa2b08f Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 26 Sep 2025 09:48:18 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGLF/Tasks/Nuspex/antinucleiInJets.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx index c9314b2fe53..6b699b6fff6 100644 --- a/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx +++ b/PWGLF/Tasks/Nuspex/antinucleiInJets.cxx @@ -32,6 +32,7 @@ #include "CCDB/BasicCCDBManager.h" #include "CCDB/CcdbApi.h" +#include "DataFormatsTPC/BetheBlochAleph.h" #include "Framework/ASoA.h" #include "Framework/ASoAHelpers.h" #include "Framework/AnalysisDataModel.h" @@ -44,7 +45,6 @@ #include "ReconstructionDataFormats/DCA.h" #include "ReconstructionDataFormats/PID.h" #include "ReconstructionDataFormats/Track.h" -#include "DataFormatsTPC/BetheBlochAleph.h" #include "TGrid.h" #include @@ -141,7 +141,7 @@ struct AntinucleiInJets { Configurable setMCDefaultItsParams{"setMCDefaultItsParams", false, "set MC default parameters"}; Configurable cfgCompensatePIDinTracking{"cfgCompensatePIDinTracking", false, "If true, divide tpcInnerParam by the electric charge"}; Configurable> cfgBetheBlochParams{"cfgBetheBlochParams", {0.6539, 1.591, 0.8225, 2.363, 0.09}, "TPC Bethe-Bloch parameterisation for He3"}; - + // CCDB manager service for accessing condition data Service ccdb; @@ -249,7 +249,7 @@ struct AntinucleiInJets { // nsigmaITS for antiproton candidates registryData.add("antiproton_nsigma_its_data", "antiproton_nsigma_its_data", HistType::kTH2F, {{nbins, min, max, "#it{p}_{T} (GeV/#it{c})"}, {400, -20.0, 20.0, "n#sigma_{ITS}"}}); - + // custom nsigma for He3 - needed for 24 pp data registryData.add("tpcsignal_data", "Specific energy loss", HistType::kTH2F, {{600, -6., 6., "#it{p} (GeV/#it{c})"}, {1400, 0, 1400, "d#it{E} / d#it{X} (a. u.)"}}); registryData.add("antihelium3_jet_tpc_custom", "antihelium3_jet_tpc_custom", HistType::kTH2F, {{nbins, 3 * min, 3 * max, "#it{p}_{T} (GeV/#it{c})"}, {400, -20.0, 20.0, "n#sigma_{TPC} custom"}}); @@ -796,7 +796,6 @@ struct AntinucleiInJets { bool heliumPID = track.pidForTracking() == o2::track::PID::Helium3; float correctedTpcInnerParam = (heliumPID && cfgCompensatePIDinTracking) ? track.tpcInnerParam() / 2 : track.tpcInnerParam(); registryData.fill(HIST("tpcsignal_data"), correctedTpcInnerParam * track.sign(), track.tpcSignal()); - } // Reject empty events @@ -907,7 +906,7 @@ struct AntinucleiInJets { } if (passedItsPidHel) { registryData.fill(HIST("antihelium3_jet_tpc"), 2.0 * pt, nsigmaTPCHe); - //custom nsigma He3 based on bethe bloch fit of TPC signal + // custom nsigma He3 based on bethe bloch fit of TPC signal double tpcSignal = track.tpcSignal(); double expectedSignalHe3 = tpc::BetheBlochAleph(static_cast(track.tpcInnerParam() * 2. / o2::constants::physics::MassHelium3), cfgBetheBlochParams.value[0], cfgBetheBlochParams.value[1], cfgBetheBlochParams.value[2], cfgBetheBlochParams.value[3], cfgBetheBlochParams.value[4]); double sigmaHe3 = expectedSignalHe3 * cfgBetheBlochParams.value[4]; @@ -1003,7 +1002,7 @@ struct AntinucleiInJets { } if (passedItsPidHel) { registryData.fill(HIST("antihelium3_ue_tpc"), 2.0 * pt, nsigmaTPCHe); - //custom nsigma He3 based on bethe bloch fit of TPC signal + // custom nsigma He3 based on bethe bloch fit of TPC signal double tpcSignal = track.tpcSignal(); double expectedSignalHe3 = tpc::BetheBlochAleph(static_cast(track.tpcInnerParam() * 2. / o2::constants::physics::MassHelium3), cfgBetheBlochParams.value[0], cfgBetheBlochParams.value[1], cfgBetheBlochParams.value[2], cfgBetheBlochParams.value[3], cfgBetheBlochParams.value[4]); double sigmaHe3 = expectedSignalHe3 * cfgBetheBlochParams.value[4];