From 264c6c9d097fe1000cb15e3f7ef6d66ae7f93e09 Mon Sep 17 00:00:00 2001 From: David Dobrigkeit Chinellato Date: Mon, 15 Sep 2025 10:50:20 +0200 Subject: [PATCH 1/3] [PWGLF] Remove lf-propagation-service --- .../TableProducer/Strangeness/CMakeLists.txt | 7 +- .../Strangeness/propagationService.cxx | 156 ------------------ 2 files changed, 1 insertion(+), 162 deletions(-) delete mode 100644 PWGLF/TableProducer/Strangeness/propagationService.cxx diff --git a/PWGLF/TableProducer/Strangeness/CMakeLists.txt b/PWGLF/TableProducer/Strangeness/CMakeLists.txt index b9ae33532f2..7a7366043d2 100644 --- a/PWGLF/TableProducer/Strangeness/CMakeLists.txt +++ b/PWGLF/TableProducer/Strangeness/CMakeLists.txt @@ -165,9 +165,4 @@ o2physics_add_dpl_workflow(stracents o2physics_add_dpl_workflow(lambdaspincorrelation SOURCES lambdaspincorrelation.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore - COMPONENT_NAME Analysis) - -o2physics_add_dpl_workflow(propagationservice - SOURCES propagationService.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::TPCDriftManager - COMPONENT_NAME Analysis) + COMPONENT_NAME Analysis) \ No newline at end of file diff --git a/PWGLF/TableProducer/Strangeness/propagationService.cxx b/PWGLF/TableProducer/Strangeness/propagationService.cxx deleted file mode 100644 index 191b920d9ef..00000000000 --- a/PWGLF/TableProducer/Strangeness/propagationService.cxx +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// \file propagationService.cxx -/// \brief -/// \author ALICE - -//=============================================================== -// -// Merged track propagation + strangeness building task -// -// Provides a common task to deal with track propagation and -// strangeness building in a single DPL device that is particularly -// adequate for pipelining. -// -// Currently meant for testing and performance check -// -//=============================================================== - -#include "PWGLF/Utils/strangenessBuilderModule.h" - -#include "Common/Core/trackUtilities.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/Tools/StandardCCDBLoader.h" -#include "Common/Tools/TrackPropagationModule.h" -#include "Common/Tools/TrackTuner.h" - -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "CommonConstants/GeomConstants.h" -#include "CommonUtils/NameConf.h" -#include "DataFormatsParameters/GRPMagField.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/Propagator.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/DCA.h" - -#include - -using namespace o2; -using namespace o2::framework; -// using namespace o2::framework::expressions; - -// use parameters + cov mat non-propagated, aux info + (extension propagated) -using FullTracksExt = soa::Join; -using FullTracksExtIU = soa::Join; -using FullTracksExtWithPID = soa::Join; -using FullTracksExtIUWithPID = soa::Join; -using FullTracksExtLabeled = soa::Join; -using FullTracksExtLabeledIU = soa::Join; -using FullTracksExtLabeledWithPID = soa::Join; -using FullTracksExtLabeledIUWithPID = soa::Join; -using TracksWithExtra = soa::Join; - -// For dE/dx association in pre-selection -using TracksExtraWithPID = soa::Join; - -struct propagationService { - // CCDB boilerplate declarations - o2::framework::Configurable ccdburl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Service ccdb; - - // propagation stuff - o2::common::StandardCCDBLoaderConfigurables standardCCDBLoaderConfigurables; - o2::common::StandardCCDBLoader ccdbLoader; - - // boilerplate: strangeness builder stuff - o2::pwglf::strangenessbuilder::products products; - o2::pwglf::strangenessbuilder::coreConfigurables baseOpts; - o2::pwglf::strangenessbuilder::v0Configurables v0BuilderOpts; - o2::pwglf::strangenessbuilder::cascadeConfigurables cascadeBuilderOpts; - o2::pwglf::strangenessbuilder::preSelectOpts preSelectOpts; - o2::pwglf::strangenessbuilder::BuilderModule strangenessBuilderModule; - - // the track tuner object -> needs to be here as it inherits from ConfigurableGroup (+ has its own copy of ccdbApi) - TrackTuner trackTunerObj; - - // track propagation - o2::common::TrackPropagationProducts trackPropagationProducts; - o2::common::TrackPropagationConfigurables trackPropagationConfigurables; - o2::common::TrackPropagationModule trackPropagation; - - // registry - HistogramRegistry histos{"histos"}; - - void init(o2::framework::InitContext& initContext) - { - // CCDB boilerplate init - ccdb->setCaching(true); - ccdb->setLocalObjectValidityChecking(); - ccdb->setURL(ccdburl.value); - - // task-specific - trackPropagation.init(trackPropagationConfigurables, trackTunerObj, histos, initContext); - strangenessBuilderModule.init(baseOpts, v0BuilderOpts, cascadeBuilderOpts, preSelectOpts, histos, initContext); - } - - void processRealData(soa::Join const& collisions, aod::V0s const& v0s, aod::Cascades const& cascades, aod::TrackedCascades const& trackedCascades, FullTracksExtIU const& tracks, aod::BCsWithTimestamps const& bcs) - { - ccdbLoader.initCCDBfromBCs(standardCCDBLoaderConfigurables, ccdb, bcs); - trackPropagation.fillTrackTables(trackPropagationConfigurables, trackTunerObj, ccdbLoader, collisions, tracks, trackPropagationProducts, histos); - strangenessBuilderModule.dataProcess(ccdb, histos, collisions, static_cast(nullptr), v0s, cascades, trackedCascades, tracks, bcs, static_cast(nullptr), products); - } - - void processMonteCarlo(soa::Join const& collisions, aod::McCollisions const& mccollisions, aod::V0s const& v0s, aod::Cascades const& cascades, aod::TrackedCascades const& trackedCascades, FullTracksExtLabeledIU const& tracks, aod::BCsWithTimestamps const& bcs, aod::McParticles const& mcParticles) - { - ccdbLoader.initCCDBfromBCs(standardCCDBLoaderConfigurables, ccdb, bcs); - trackPropagation.fillTrackTables(trackPropagationConfigurables, trackTunerObj, ccdbLoader, collisions, tracks, trackPropagationProducts, histos); - strangenessBuilderModule.dataProcess(ccdb, histos, collisions, mccollisions, v0s, cascades, trackedCascades, tracks, bcs, mcParticles, products); - } - - // FIXME: the part below is only viable if TPC PID - // switches to using TracksIU (circular dependency) - // - // void processRealDataWithPID(soa::Join const& collisions, aod::V0s const& v0s, aod::Cascades const& cascades, aod::TrackedCascades const& trackedCascades, FullTracksExtIUWithPID const& tracks, aod::BCsWithTimestamps const& bcs) - // { - // ccdbLoader.initCCDBfromBCs(standardCCDBLoaderConfigurables, ccdb, bcs); - // trackPropagation.fillTrackTables(trackPropagationConfigurables, ccdbLoader, collisions, tracks, trackPropagationProducts, histos); - // strangenessBuilderModule.dataProcess(ccdb, histos, collisions, static_cast(nullptr), v0s, cascades, trackedCascades, tracks, bcs, static_cast(nullptr), products); - // } - - // void processMonteCarloWithPID(soa::Join const& collisions, aod::McCollisions const& mccollisions, aod::V0s const& v0s, aod::Cascades const& cascades, aod::TrackedCascades const& trackedCascades, FullTracksExtLabeledIUWithPID const& tracks, aod::BCsWithTimestamps const& bcs, aod::McParticles const& mcParticles) - // { - // ccdbLoader.initCCDBfromBCs(standardCCDBLoaderConfigurables, ccdb, bcs); - // trackPropagation.fillTrackTables(trackPropagationConfigurables, ccdbLoader, collisions, tracks, trackPropagationProducts, histos); - // strangenessBuilderModule.dataProcess(ccdb, histos, collisions, mccollisions, v0s, cascades, trackedCascades, tracks, bcs, mcParticles, products); - // } - - PROCESS_SWITCH(propagationService, processRealData, "process real data", true); - PROCESS_SWITCH(propagationService, processMonteCarlo, "process monte carlo", false); - // PROCESS_SWITCH(propagationService, processRealDataWithPID, "process real data", false); - // PROCESS_SWITCH(propagationService, processMonteCarloWithPID, "process monte carlo", false); -}; - -//**************************************************************************************** -/** - * Workflow definition. - */ -//**************************************************************************************** -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ - WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; - return workflow; -} From bc3c5cbd083b680ce9d14b130a25757ebb80e131 Mon Sep 17 00:00:00 2001 From: David Dobrigkeit Chinellato Date: Wed, 17 Sep 2025 13:08:50 +0200 Subject: [PATCH 2/3] [PWGLF] extra QA plots for TOF PID --- .../Strangeness/strangenesstofpid.cxx | 209 +++++++++++++++++- PWGLF/Utils/strangenessBuilderModule.h | 6 + 2 files changed, 203 insertions(+), 12 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 12234489158..207b751e11d 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -100,6 +100,12 @@ struct strangenesstofpid { Configurable calculateV0s{"calculateV0s", -1, "calculate V0-related TOF PID (0: no, 1: yes, -1: auto)"}; Configurable calculateCascades{"calculateCascades", -1, "calculate cascade-related TOF PID (0: no, 1: yes, -1: auto)"}; + // auxiliary / debug tables as desired + Configurable calculateV0TOFPIDs{"calculateV0TOFPIDs", -1, "calculate V0TOFPIDs table (0: no, 1: yes, -1: auto)"}; + Configurable calculateV0TOFBetas{"calculateV0TOFBetas", -1, "calculate V0TOFBetas table (0: no, 1: yes, -1: auto)"}; + Configurable calculateV0TOFDebugs{"calculateV0TOFDebugs", -1, "calculate V0TOFDebugs table (0: no, 1: yes, -1: auto)"}; + Configurable calculateCascTOFPIDs{"calculateCascTOFPIDs", -1, "calculate CascTOFPIDs table (0: no, 1: yes, -1: auto)"}; + // Operation and minimisation criteria struct : ConfigurableGroup { Configurable d_bz_input{"d_bz", -999, "bz field, -999 is automatic"}; @@ -149,6 +155,7 @@ struct strangenesstofpid { ConfigurableAxis axisPosition{"axisPosition", {400, -400.f, +400.f}, "position (cm)"}; ConfigurableAxis axisEta{"axisEta", {20, -1.0f, +1.0f}, "#eta"}; ConfigurableAxis axisDeltaTime{"axisDeltaTime", {2000, -1000.0f, +1000.0f}, "delta-time (ps)"}; + ConfigurableAxis axisDeltaTimeVsPrimaryCalculation{"axisDeltaTimeVsPrimaryCalculation", {500, -500.0f, +500.0f}, "delta-time (ps)"}; ConfigurableAxis axisTime{"axisTime", {400, 10000.0f, +50000.0f}, "T (ps)"}; ConfigurableAxis axisNSigma{"axisNSigma", {200, -10.0f, +10.0f}, "N(#sigma)"}; ConfigurableAxis axisRatioMethods{"axisRatioMethods", {400, 0.9f, 1.9f}, "T_{method 1}/T_{method 0}"}; @@ -335,6 +342,34 @@ struct strangenesstofpid { LOGF(info, "Strangeness TOF PID: Cascade calculations enabled automatically"); } } + if (calculateV0TOFPIDs.value < 0) { + // check if TOF information is required, enable if so + calculateV0TOFPIDs.value = isTableRequiredInWorkflow(initContext, "V0TOFPIDs"); + if (calculateV0TOFPIDs.value > 0) { + LOGF(info, "Strangeness TOF PID: V0TOFPIDs calculations enabled automatically"); + } + } + if (calculateV0TOFBetas.value < 0) { + // check if TOF information is required, enable if so + calculateV0TOFBetas.value = isTableRequiredInWorkflow(initContext, "V0TOFBetas"); + if (calculateV0TOFBetas.value > 0) { + LOGF(info, "Strangeness TOF PID: V0TOFBetas calculations enabled automatically"); + } + } + if (calculateV0TOFDebugs.value < 0) { + // check if TOF information is required, enable if so + calculateV0TOFDebugs.value = isTableRequiredInWorkflow(initContext, "V0TOFDebugs"); + if (calculateV0TOFDebugs.value > 0) { + LOGF(info, "Strangeness TOF PID: V0TOFDebugs calculations enabled automatically"); + } + } + if (calculateCascTOFPIDs.value < 0) { + // check if TOF information is required, enable if so + calculateCascTOFPIDs.value = isTableRequiredInWorkflow(initContext, "CascTOFPIDs"); + if (calculateCascTOFPIDs.value > 0) { + LOGF(info, "Strangeness TOF PID: CascTOFPIDs calculations enabled automatically"); + } + } nSigmaCalibLoaded = false; nSigmaCalibObjects = nullptr; @@ -376,6 +411,22 @@ struct strangenesstofpid { histos.add("h2dDeltaTimeNegativeLambdaPr", "h2dDeltaTimeNegativeLambdaPr", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dDeltaTimePositiveK0ShortPi", "h2dDeltaTimePositiveK0ShortPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dDeltaTimeNegativeK0ShortPi", "h2dDeltaTimeNegativeK0ShortPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); + + // delta time with respect to primary-like calculation + histos.add("h2dDiffFromPrimCalcPositiveLambdaPi", "h2dDiffFromPrimCalcPositiveLambdaPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dDiffFromPrimCalcNegativeLambdaPi", "h2dDiffFromPrimCalcNegativeLambdaPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dDiffFromPrimCalcPositiveLambdaPr", "h2dDiffFromPrimCalcPositiveLambdaPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dDiffFromPrimCalcNegativeLambdaPr", "h2dDiffFromPrimCalcNegativeLambdaPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dDiffFromPrimCalcPositiveK0ShortPi", "h2dDiffFromPrimCalcPositiveK0ShortPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dDiffFromPrimCalcNegativeK0ShortPi", "h2dDiffFromPrimCalcNegativeK0ShortPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + + // QA collision reassociation fraction (from track -> V0/cascade coll index) + histos.add("h2dCorrectAssocPositiveLambdaPi", "h2dCorrectAssocPositiveLambdaPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dCorrectAssocNegativeLambdaPi", "h2dCorrectAssocNegativeLambdaPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dCorrectAssocPositiveLambdaPr", "h2dCorrectAssocPositiveLambdaPr", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dCorrectAssocNegativeLambdaPr", "h2dCorrectAssocNegativeLambdaPr", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dCorrectAssocPositiveK0ShortPi", "h2dCorrectAssocPositiveK0ShortPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dCorrectAssocNegativeK0ShortPi", "h2dCorrectAssocNegativeK0ShortPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); } if (calculateCascades.value > 0) { @@ -390,6 +441,32 @@ struct strangenesstofpid { histos.add("h2dnegDeltaTimeAsOmPi", "h2dnegDeltaTimeAsOmPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dnegDeltaTimeAsOmPr", "h2dnegDeltaTimeAsOmPr", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dbachDeltaTimeAsOmKa", "h2dbachDeltaTimeAsOmKa", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); + + // delta time with respect to primary-like calculation + histos.add("h2dposDiffFromPrimCalcAsXiPi", "h2dposDiffFromPrimCalcAsXiPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dposDiffFromPrimCalcAsXiPr", "h2dposDiffFromPrimCalcAsXiPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dnegDiffFromPrimCalcAsXiPi", "h2dnegDiffFromPrimCalcAsXiPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dnegDiffFromPrimCalcAsXiPr", "h2dnegDiffFromPrimCalcAsXiPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dbachDiffFromPrimCalcAsXiPi", "h2dbachDiffFromPrimCalcAsXiPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + + histos.add("h2dposDiffFromPrimCalcAsOmPi", "h2dposDiffFromPrimCalcAsOmPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dposDiffFromPrimCalcAsOmPr", "h2dposDiffFromPrimCalcAsOmPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dnegDiffFromPrimCalcAsOmPi", "h2dnegDiffFromPrimCalcAsOmPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dnegDiffFromPrimCalcAsOmPr", "h2dnegDiffFromPrimCalcAsOmPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + histos.add("h2dbachDiffFromPrimCalcAsOmKa", "h2dbachDiffFromPrimCalcAsOmKa", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); + + // QA collision reassociation fraction (from track -> V0/cascade coll index) + histos.add("h2dposCorrectAssocAsXiPi", "h2dposCorrectAssocAsXiPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dposCorrectAssocAsXiPr", "h2dposCorrectAssocAsXiPr", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dnegCorrectAssocAsXiPi", "h2dnegCorrectAssocAsXiPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dnegCorrectAssocAsXiPr", "h2dnegCorrectAssocAsXiPr", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dbachCorrectAssocAsXiPi", "h2dbachCorrectAssocAsXiPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + + histos.add("h2dposCorrectAssocAsOmPi", "h2dposCorrectAssocAsOmPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dposCorrectAssocAsOmPr", "h2dposCorrectAssocAsOmPr", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dnegCorrectAssocAsOmPi", "h2dnegCorrectAssocAsOmPi", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dnegCorrectAssocAsOmPr", "h2dnegCorrectAssocAsOmPr", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); + histos.add("h2dbachCorrectAssocAsOmKa", "h2dbachCorrectAssocAsOmKa", {HistType::kTH2F, {axisP, {2, -0.5f, 1.5f}}}); } histos.add("h2dPositiveTOFProperties", "h2dPositiveTOFProperties", {HistType::kTH2F, {axisP, {4, -0.5, 3.5f}}}); @@ -554,11 +631,18 @@ struct strangenesstofpid { // structs to hold information struct v0TofInfo { // holds processed information regarding TOF for V0s + float timeK0Short = o2::aod::v0data::kNoTOFValue; + float timeLambda = o2::aod::v0data::kNoTOFValue; float timePositivePr = o2::aod::v0data::kNoTOFValue; float timePositivePi = o2::aod::v0data::kNoTOFValue; float timeNegativePr = o2::aod::v0data::kNoTOFValue; float timeNegativePi = o2::aod::v0data::kNoTOFValue; + float timeAsPrimaryPositivePr = o2::aod::v0data::kNoTOFValue; + float timeAsPrimaryPositivePi = o2::aod::v0data::kNoTOFValue; + float timeAsPrimaryNegativePr = o2::aod::v0data::kNoTOFValue; + float timeAsPrimaryNegativePi = o2::aod::v0data::kNoTOFValue; + float deltaTimePositiveLambdaPi = o2::aod::v0data::kNoTOFValue; float deltaTimeNegativeLambdaPi = o2::aod::v0data::kNoTOFValue; float deltaTimePositiveLambdaPr = o2::aod::v0data::kNoTOFValue; @@ -572,6 +656,15 @@ struct strangenesstofpid { float nSigmaNegativeLambdaPr = o2::aod::v0data::kNoTOFValue; float nSigmaPositiveK0ShortPi = o2::aod::v0data::kNoTOFValue; float nSigmaNegativeK0ShortPi = o2::aod::v0data::kNoTOFValue; + + // extra auxiliary variables + float deltaDecayTimeLambda = o2::aod::v0data::kNoTOFValue; + float deltaDecayTimeAntiLambda = o2::aod::v0data::kNoTOFValue; + float deltaDecayTimeK0Short = o2::aod::v0data::kNoTOFValue; + + float betaLambda = o2::aod::v0data::kNoTOFValue; + float betaAntiLambda = o2::aod::v0data::kNoTOFValue; + float betaK0Short = o2::aod::v0data::kNoTOFValue; }; // structs to hold information @@ -583,6 +676,13 @@ struct strangenesstofpid { float bachFlightPi = o2::aod::cascdata::kNoTOFValue; float bachFlightKa = o2::aod::cascdata::kNoTOFValue; + float posFlightAsPrimaryPi = o2::aod::cascdata::kNoTOFValue; + float posFlightAsPrimaryPr = o2::aod::cascdata::kNoTOFValue; + float negFlightAsPrimaryPi = o2::aod::cascdata::kNoTOFValue; + float negFlightAsPrimaryPr = o2::aod::cascdata::kNoTOFValue; + float bachFlightAsPrimaryPi = o2::aod::cascdata::kNoTOFValue; + float bachFlightAsPrimaryKa = o2::aod::cascdata::kNoTOFValue; + float posDeltaTimeAsXiPi = o2::aod::cascdata::kNoTOFValue, posDeltaTimeAsXiPr = o2::aod::cascdata::kNoTOFValue; float negDeltaTimeAsXiPi = o2::aod::cascdata::kNoTOFValue, negDeltaTimeAsXiPr = o2::aod::cascdata::kNoTOFValue; float bachDeltaTimeAsXiPi = o2::aod::cascdata::kNoTOFValue; @@ -635,8 +735,8 @@ struct strangenesstofpid { float lengthV0 = std::hypot(v0.x() - collision.posX(), v0.y() - collision.posY(), v0.z() - collision.posZ()); float velocityK0Short = velocity(v0.p(), o2::constants::physics::MassKaonNeutral); float velocityLambda = velocity(v0.p(), o2::constants::physics::MassLambda); - float timeK0Short = lengthV0 / velocityK0Short; // in picoseconds - float timeLambda = lengthV0 / velocityLambda; // in picoseconds + v0tof.timeK0Short = lengthV0 / velocityK0Short; // in picoseconds + v0tof.timeLambda = lengthV0 / velocityLambda; // in picoseconds //_____________________________________________________________________________________________ // define simple checks @@ -678,13 +778,17 @@ struct strangenesstofpid { lengthPositive = pTof.length - ltIntegral.getL(); v0tof.timePositivePr = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, lengthPositive, o2::constants::physics::MassProton * o2::constants::physics::MassProton); v0tof.timePositivePi = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, lengthPositive, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); + + // as primary + v0tof.timeAsPrimaryPositivePr = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length, o2::constants::physics::MassProton * o2::constants::physics::MassProton); + v0tof.timeAsPrimaryPositivePi = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); } } } if (lengthPositive > 0.0f) { - v0tof.deltaTimePositiveLambdaPr = (pTof.tofSignal - pTof.tofEvTime) - (timeLambda + v0tof.timePositivePr); - v0tof.deltaTimePositiveLambdaPi = (pTof.tofSignal - pTof.tofEvTime) - (timeLambda + v0tof.timePositivePi); - v0tof.deltaTimePositiveK0ShortPi = (pTof.tofSignal - pTof.tofEvTime) - (timeK0Short + v0tof.timePositivePi); + v0tof.deltaTimePositiveLambdaPr = (pTof.tofSignal - pTof.tofEvTime) - (v0tof.timeLambda + v0tof.timePositivePr); + v0tof.deltaTimePositiveLambdaPi = (pTof.tofSignal - pTof.tofEvTime) - (v0tof.timeLambda + v0tof.timePositivePi); + v0tof.deltaTimePositiveK0ShortPi = (pTof.tofSignal - pTof.tofEvTime) - (v0tof.timeK0Short + v0tof.timePositivePi); // de facto nsigma if (nSigmaCalibLoaded) { @@ -698,12 +802,18 @@ struct strangenesstofpid { if (passesQAcuts) { if (lambdaCandidate) { histos.fill(HIST("h2dDeltaTimePositiveLambdaPr"), v0.p(), v0.eta(), v0tof.deltaTimePositiveLambdaPr); + histos.fill(HIST("h2dCorrectAssocPositiveLambdaPr"), v0.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dDiffFromPrimCalcPositiveLambdaPr"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePr); } if (antiLambdaCandidate) { histos.fill(HIST("h2dDeltaTimePositiveLambdaPi"), v0.p(), v0.eta(), v0tof.deltaTimePositiveLambdaPi); + histos.fill(HIST("h2dCorrectAssocPositiveLambdaPi"), v0.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dDiffFromPrimCalcPositiveLambdaPi"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePi); } if (k0ShortCandidate) { histos.fill(HIST("h2dDeltaTimePositiveK0ShortPi"), v0.p(), v0.eta(), v0tof.deltaTimePositiveK0ShortPi); + histos.fill(HIST("h2dCorrectAssocPositiveK0ShortPi"), v0.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dDiffFromPrimCalcPositiveK0ShortPi"), v0.p(), (pTof.tofSignal - pTof.tofEvTime) - v0tof.timeAsPrimaryPositivePi); } } } @@ -732,15 +842,19 @@ struct strangenesstofpid { bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(trackVertex, negTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE, nullptr, <Integral); if (successPropag) { lengthNegative = nTof.length - ltIntegral.getL(); - v0tof.timeNegativePr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length - ltIntegral.getL(), o2::constants::physics::MassProton * o2::constants::physics::MassProton); - v0tof.timeNegativePi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length - ltIntegral.getL(), o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); + v0tof.timeNegativePr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, lengthNegative, o2::constants::physics::MassProton * o2::constants::physics::MassProton); + v0tof.timeNegativePi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, lengthNegative, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); + + // as primary + v0tof.timeAsPrimaryNegativePr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length, o2::constants::physics::MassProton * o2::constants::physics::MassProton); + v0tof.timeAsPrimaryNegativePi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); } } } if (lengthNegative > 0.0f) { - v0tof.deltaTimeNegativeLambdaPr = (nTof.tofSignal - nTof.tofEvTime) - (timeLambda + v0tof.timeNegativePr); - v0tof.deltaTimeNegativeLambdaPi = (nTof.tofSignal - nTof.tofEvTime) - (timeLambda + v0tof.timeNegativePi); - v0tof.deltaTimeNegativeK0ShortPi = (nTof.tofSignal - nTof.tofEvTime) - (timeK0Short + v0tof.timeNegativePi); + v0tof.deltaTimeNegativeLambdaPr = (nTof.tofSignal - nTof.tofEvTime) - (v0tof.timeLambda + v0tof.timeNegativePr); + v0tof.deltaTimeNegativeLambdaPi = (nTof.tofSignal - nTof.tofEvTime) - (v0tof.timeLambda + v0tof.timeNegativePi); + v0tof.deltaTimeNegativeK0ShortPi = (nTof.tofSignal - nTof.tofEvTime) - (v0tof.timeK0Short + v0tof.timeNegativePi); // de facto nsigma if (nSigmaCalibLoaded) { @@ -754,16 +868,39 @@ struct strangenesstofpid { if (passesQAcuts) { if (lambdaCandidate) { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPi"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeLambdaPi); + histos.fill(HIST("h2dCorrectAssocNegativeLambdaPi"), v0.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dDiffFromPrimCalcNegativeLambdaPi"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePi); } if (antiLambdaCandidate) { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPr"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeLambdaPr); + histos.fill(HIST("h2dCorrectAssocNegativeLambdaPr"), v0.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dDiffFromPrimCalcNegativeLambdaPr"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePr); } if (k0ShortCandidate) { histos.fill(HIST("h2dDeltaTimeNegativeK0ShortPi"), v0.p(), v0.eta(), v0tof.deltaTimeNegativeK0ShortPi); + histos.fill(HIST("h2dCorrectAssocNegativeK0ShortPi"), v0.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dDiffFromPrimCalcNegativeK0ShortPi"), v0.p(), (nTof.tofSignal - nTof.tofEvTime) - v0tof.timeAsPrimaryNegativePi); } } } } + + // calculation of delta-decay-time (no reliance on event time) + if (nTof.hasTOF && pTof.hasTOF > 0) { // does not depend on event time + v0tof.deltaDecayTimeLambda = (pTof.tofSignal - v0tof.timePositivePr) - (nTof.tofSignal - v0tof.timeNegativePi); + v0tof.deltaDecayTimeAntiLambda = (pTof.tofSignal - v0tof.timePositivePi) - (nTof.tofSignal - v0tof.timeNegativePr); + v0tof.deltaDecayTimeK0Short = (pTof.tofSignal - v0tof.timePositivePi) - (nTof.tofSignal - v0tof.timeNegativePi); + + float evTimeMean = 0.5f * (pTof.tofEvTime + nTof.tofEvTime); + float decayTimeLambda = 0.5f * ((pTof.tofSignal - v0tof.timePositivePr) + (nTof.tofSignal - v0tof.timeNegativePi)) - evTimeMean; + float decayTimeAntiLambda = 0.5f * ((pTof.tofSignal - v0tof.timePositivePi) + (nTof.tofSignal - v0tof.timeNegativePr)) - evTimeMean; + float decayTimeK0Short = 0.5f * ((pTof.tofSignal - v0tof.timePositivePi) + (nTof.tofSignal - v0tof.timeNegativePi)) - evTimeMean; + + constexpr float lightSpeed = 0.0299792458; // in cm/ps + v0tof.betaLambda = (lengthV0 / decayTimeLambda) / lightSpeed; + v0tof.betaAntiLambda = (lengthV0 / decayTimeAntiLambda) / lightSpeed; + v0tof.betaK0Short = (lengthV0 / decayTimeK0Short) / lightSpeed; + } } return v0tof; @@ -869,6 +1006,10 @@ struct strangenesstofpid { lengthPositive = pTof.length - ltIntegral.getL(); casctof.posFlightPr = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length - ltIntegral.getL(), o2::constants::physics::MassProton * o2::constants::physics::MassProton); casctof.posFlightPi = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length - ltIntegral.getL(), o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); + + // as primary + casctof.posFlightAsPrimaryPr = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length, o2::constants::physics::MassProton * o2::constants::physics::MassProton); + casctof.posFlightAsPrimaryPi = o2::framework::pid::tof::MassToExpTime(pTof.tofExpMom, pTof.length, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); } } } @@ -894,15 +1035,23 @@ struct strangenesstofpid { if (passesQAcuts) { if (xiMinusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsXiPr"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsXiPr); + histos.fill(HIST("h2dposCorrectAssocAsXiPr"), cascade.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dposDiffFromPrimCalcAsXiPr"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPr); } if (xiPlusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsXiPi); + histos.fill(HIST("h2dposCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dposDiffFromPrimCalcAsXiPi"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPi); } if (omegaMinusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsOmPr"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsOmPr); + histos.fill(HIST("h2dposCorrectAssocAsOmPr"), cascade.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dposDiffFromPrimCalcAsOmPr"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPr); } if (omegaPlusCandidate) { histos.fill(HIST("h2dposDeltaTimeAsOmPi"), cascade.p(), cascade.eta(), casctof.posDeltaTimeAsOmPi); + histos.fill(HIST("h2dposCorrectAssocAsOmPi"), cascade.p(), static_cast(collisionId == pTof.collisionId)); + histos.fill(HIST("h2dposDiffFromPrimCalcAsOmPi"), cascade.p(), (pTof.tofSignal - pTof.tofEvTime) - casctof.posFlightAsPrimaryPi); } } } @@ -934,6 +1083,10 @@ struct strangenesstofpid { lengthNegative = nTof.length - ltIntegral.getL(); casctof.negFlightPr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length - ltIntegral.getL(), o2::constants::physics::MassProton * o2::constants::physics::MassProton); casctof.negFlightPi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length - ltIntegral.getL(), o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); + + // as primary + casctof.negFlightAsPrimaryPr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length, o2::constants::physics::MassProton * o2::constants::physics::MassProton); + casctof.negFlightAsPrimaryPi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); } } } @@ -959,15 +1112,23 @@ struct strangenesstofpid { if (passesQAcuts) { if (xiMinusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsXiPi); + histos.fill(HIST("h2dnegCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dnegDiffFromPrimCalcAsXiPi"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPi); } if (xiPlusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsXiPr"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsXiPr); + histos.fill(HIST("h2dnegCorrectAssocAsXiPr"), cascade.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dnegDiffFromPrimCalcAsXiPr"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPr); } if (omegaMinusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsOmPi"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsOmPi); + histos.fill(HIST("h2dnegCorrectAssocAsOmPi"), cascade.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dnegDiffFromPrimCalcAsOmPi"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPi); } if (omegaPlusCandidate) { histos.fill(HIST("h2dnegDeltaTimeAsOmPr"), cascade.p(), cascade.eta(), casctof.negDeltaTimeAsOmPr); + histos.fill(HIST("h2dnegCorrectAssocAsOmPr"), cascade.p(), static_cast(collisionId == nTof.collisionId)); + histos.fill(HIST("h2dnegDiffFromPrimCalcAsOmPr"), cascade.p(), (nTof.tofSignal - nTof.tofEvTime) - casctof.negFlightAsPrimaryPr); } } } @@ -999,6 +1160,10 @@ struct strangenesstofpid { lengthBachelor = bTof.length - ltIntegral.getL(); casctof.bachFlightPi = o2::framework::pid::tof::MassToExpTime(bTof.tofExpMom, bTof.length - ltIntegral.getL(), o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); casctof.bachFlightKa = o2::framework::pid::tof::MassToExpTime(bTof.tofExpMom, bTof.length - ltIntegral.getL(), o2::constants::physics::MassKaonCharged * o2::constants::physics::MassKaonCharged); + + // as primary + casctof.bachFlightAsPrimaryPi = o2::framework::pid::tof::MassToExpTime(bTof.tofExpMom, bTof.length, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); + casctof.bachFlightAsPrimaryKa = o2::framework::pid::tof::MassToExpTime(bTof.tofExpMom, bTof.length, o2::constants::physics::MassKaonCharged * o2::constants::physics::MassKaonCharged); } } } @@ -1022,15 +1187,23 @@ struct strangenesstofpid { if (passesQAcuts) { if (xiMinusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsXiPi); + histos.fill(HIST("h2dbachCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == bTof.collisionId)); + histos.fill(HIST("h2dbachDiffFromPrimCalcAsXiPi"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryPi); } if (xiPlusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsXiPi"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsXiPi); + histos.fill(HIST("h2dbachCorrectAssocAsXiPi"), cascade.p(), static_cast(collisionId == bTof.collisionId)); + histos.fill(HIST("h2dbachDiffFromPrimCalcAsXiPi"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryPi); } if (omegaMinusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsOmKa"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsOmKa); + histos.fill(HIST("h2dbachCorrectAssocAsOmKa"), cascade.p(), static_cast(collisionId == bTof.collisionId)); + histos.fill(HIST("h2dbachDiffFromPrimCalcAsOmKa"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryKa); } if (omegaPlusCandidate) { histos.fill(HIST("h2dbachDeltaTimeAsOmKa"), cascade.p(), cascade.eta(), casctof.bachDeltaTimeAsOmKa); + histos.fill(HIST("h2dbachCorrectAssocAsOmKa"), cascade.p(), static_cast(collisionId == bTof.collisionId)); + histos.fill(HIST("h2dbachDiffFromPrimCalcAsOmKa"), cascade.p(), (bTof.tofSignal - bTof.tofEvTime) - casctof.bachFlightAsPrimaryKa); } } } @@ -1107,6 +1280,20 @@ struct strangenesstofpid { v0tof.nSigmaNegativeLambdaPr, v0tof.nSigmaPositiveLambdaPi, v0tof.nSigmaPositiveK0ShortPi, v0tof.nSigmaNegativeK0ShortPi); } + if(calculateV0TOFPIDs.value){ + v0tofpid(v0tof.deltaTimePositiveLambdaPi, v0tof.deltaTimePositiveLambdaPr, + v0tof.deltaTimeNegativeLambdaPi, v0tof.deltaTimeNegativeLambdaPr, + v0tof.deltaTimePositiveK0ShortPi, v0tof.deltaTimeNegativeK0ShortPi, + v0tof.deltaDecayTimeLambda, v0tof.deltaDecayTimeAntiLambda, v0tof.deltaDecayTimeK0Short); + } + if(calculateV0TOFBetas.value){ + v0tofbeta(v0tof.betaLambda, v0tof.betaAntiLambda, v0tof.betaK0Short); + } + if(calculateV0TOFDebugs.value){ + v0tofdebugs(v0tof.timeLambda, v0tof.timeK0Short, + v0tof.timePositivePr, v0tof.timePositivePi, + v0tof.timeNegativePr, v0tof.timeNegativePi); + } } } @@ -1171,8 +1358,6 @@ struct strangenesstofpid { auto firstTOFPID = dauTrackTOFPIDs.rawIteratorAt(0); bool isNewTOFFormat = firstTOFPID.straCollisionId() < 0 ? false : true; - LOGF(info, "Processing derived data. Is this the new TOF info format? %i", isNewTOFFormat); - if (!isNewTOFFormat && calculationMethod.value > 0) { LOGF(fatal, "Using the old derived data format with the new calculation method is not viable due to lack of needed info! Crashing."); } diff --git a/PWGLF/Utils/strangenessBuilderModule.h b/PWGLF/Utils/strangenessBuilderModule.h index e5ed9214869..e49ed71f14b 100644 --- a/PWGLF/Utils/strangenessBuilderModule.h +++ b/PWGLF/Utils/strangenessBuilderModule.h @@ -277,6 +277,9 @@ struct coreConfigurables : o2::framework::ConfigurableGroup { o2::framework::Configurable useV0BufferForCascades{"useV0BufferForCascades", false, "store array of V0s for cascades or not. False (default): save RAM, use more CPU; true: save CPU, use more RAM"}; o2::framework::Configurable mc_findableMode{"mc_findableMode", 0, "0: disabled; 1: add findable-but-not-found to existing V0s from AO2D; 2: reset V0s and generate only findable-but-not-found"}; + + // test the possibility of refitting with material corrections (DCA Fitter option) + o2::framework::Configurable refitWithMaterialCorrection{"refitWithMaterialCorrection", false, "do refit after material corrections were applied"}; }; // strangenessBuilder: V0 building options @@ -697,6 +700,9 @@ class BuilderModule straHelper.cascadeselections.dcacascdau = cascadeBuilderOpts.dcacascdau; straHelper.cascadeselections.lambdaMassWindow = cascadeBuilderOpts.lambdaMassWindow; straHelper.cascadeselections.maxDaughterEta = cascadeBuilderOpts.maxDaughterEta; + + // Set option to refit with material corrections + straHelper.fitter.setRefitWithMatCorr(baseOpts.refitWithMaterialCorrection.value); } // for sorting From 872c28b550337f048967d80cbf8177ee56a7eb7c Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Wed, 17 Sep 2025 13:12:04 +0200 Subject: [PATCH 3/3] Please consider the following formatting changes (#480) --- .../Strangeness/strangenesstofpid.cxx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 207b751e11d..db9565fc5b7 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -412,7 +412,7 @@ struct strangenesstofpid { histos.add("h2dDeltaTimePositiveK0ShortPi", "h2dDeltaTimePositiveK0ShortPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dDeltaTimeNegativeK0ShortPi", "h2dDeltaTimeNegativeK0ShortPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); - // delta time with respect to primary-like calculation + // delta time with respect to primary-like calculation histos.add("h2dDiffFromPrimCalcPositiveLambdaPi", "h2dDiffFromPrimCalcPositiveLambdaPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); histos.add("h2dDiffFromPrimCalcNegativeLambdaPi", "h2dDiffFromPrimCalcNegativeLambdaPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); histos.add("h2dDiffFromPrimCalcPositiveLambdaPr", "h2dDiffFromPrimCalcPositiveLambdaPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); @@ -442,7 +442,7 @@ struct strangenesstofpid { histos.add("h2dnegDeltaTimeAsOmPr", "h2dnegDeltaTimeAsOmPr", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dbachDeltaTimeAsOmKa", "h2dbachDeltaTimeAsOmKa", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); - // delta time with respect to primary-like calculation + // delta time with respect to primary-like calculation histos.add("h2dposDiffFromPrimCalcAsXiPi", "h2dposDiffFromPrimCalcAsXiPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); histos.add("h2dposDiffFromPrimCalcAsXiPr", "h2dposDiffFromPrimCalcAsXiPr", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); histos.add("h2dnegDiffFromPrimCalcAsXiPi", "h2dnegDiffFromPrimCalcAsXiPi", {HistType::kTH2F, {axisP, axisDeltaTimeVsPrimaryCalculation}}); @@ -657,7 +657,7 @@ struct strangenesstofpid { float nSigmaPositiveK0ShortPi = o2::aod::v0data::kNoTOFValue; float nSigmaNegativeK0ShortPi = o2::aod::v0data::kNoTOFValue; - // extra auxiliary variables + // extra auxiliary variables float deltaDecayTimeLambda = o2::aod::v0data::kNoTOFValue; float deltaDecayTimeAntiLambda = o2::aod::v0data::kNoTOFValue; float deltaDecayTimeK0Short = o2::aod::v0data::kNoTOFValue; @@ -845,7 +845,7 @@ struct strangenesstofpid { v0tof.timeNegativePr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, lengthNegative, o2::constants::physics::MassProton * o2::constants::physics::MassProton); v0tof.timeNegativePi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, lengthNegative, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); - // as primary + // as primary v0tof.timeAsPrimaryNegativePr = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length, o2::constants::physics::MassProton * o2::constants::physics::MassProton); v0tof.timeAsPrimaryNegativePi = o2::framework::pid::tof::MassToExpTime(nTof.tofExpMom, nTof.length, o2::constants::physics::MassPionCharged * o2::constants::physics::MassPionCharged); } @@ -1280,18 +1280,18 @@ struct strangenesstofpid { v0tof.nSigmaNegativeLambdaPr, v0tof.nSigmaPositiveLambdaPi, v0tof.nSigmaPositiveK0ShortPi, v0tof.nSigmaNegativeK0ShortPi); } - if(calculateV0TOFPIDs.value){ + if (calculateV0TOFPIDs.value) { v0tofpid(v0tof.deltaTimePositiveLambdaPi, v0tof.deltaTimePositiveLambdaPr, - v0tof.deltaTimeNegativeLambdaPi, v0tof.deltaTimeNegativeLambdaPr, - v0tof.deltaTimePositiveK0ShortPi, v0tof.deltaTimeNegativeK0ShortPi, - v0tof.deltaDecayTimeLambda, v0tof.deltaDecayTimeAntiLambda, v0tof.deltaDecayTimeK0Short); + v0tof.deltaTimeNegativeLambdaPi, v0tof.deltaTimeNegativeLambdaPr, + v0tof.deltaTimePositiveK0ShortPi, v0tof.deltaTimeNegativeK0ShortPi, + v0tof.deltaDecayTimeLambda, v0tof.deltaDecayTimeAntiLambda, v0tof.deltaDecayTimeK0Short); } - if(calculateV0TOFBetas.value){ + if (calculateV0TOFBetas.value) { v0tofbeta(v0tof.betaLambda, v0tof.betaAntiLambda, v0tof.betaK0Short); } - if(calculateV0TOFDebugs.value){ - v0tofdebugs(v0tof.timeLambda, v0tof.timeK0Short, - v0tof.timePositivePr, v0tof.timePositivePi, + if (calculateV0TOFDebugs.value) { + v0tofdebugs(v0tof.timeLambda, v0tof.timeK0Short, + v0tof.timePositivePr, v0tof.timePositivePi, v0tof.timeNegativePr, v0tof.timeNegativePi); } }