diff --git a/PWGLF/DataModel/LFStrangenessPIDTables.h b/PWGLF/DataModel/LFStrangenessPIDTables.h index 69a3c48fa28..0b7e95ce302 100644 --- a/PWGLF/DataModel/LFStrangenessPIDTables.h +++ b/PWGLF/DataModel/LFStrangenessPIDTables.h @@ -47,8 +47,8 @@ DECLARE_SOA_TABLE(DauTrackTOFPIDs, "AOD", "DAUTRACKTOFPID", // raw table (for po namespace v0data { -// define constants for NSigma operation -const float kNoTOFValue = -1e+6; +// define constants for NSigma operation +const float kNoTOFValue = -1e+6; const float kEpsilon = 1e-4; // ==== TOF INFORMATION === @@ -85,42 +85,42 @@ DECLARE_SOA_COLUMN(TOFNSigmaK0PiMinus, tofNSigmaK0PiMinus, float); //! negative // dynamics based on n-sigmas with use-only-if-tof-present logic DECLARE_SOA_DYNAMIC_COLUMN(TofLambdaCompatibility, tofLambdaCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas - [](float tofNSigmaLaPr, float tofNSigmaLaPi, float nsigma) -> float { - bool compatible = true; - if(std::abs(tofNSigmaLaPr-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaLaPr)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaLaPi-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaLaPi)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - return compatible; - }); + [](float tofNSigmaLaPr, float tofNSigmaLaPi, float nsigma) -> float { + bool compatible = true; + if (std::abs(tofNSigmaLaPr - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaLaPr) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaLaPi - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaLaPi) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + return compatible; + }); // dynamics based on n-sigmas with use-only-if-tof-present logic DECLARE_SOA_DYNAMIC_COLUMN(TofAntiLambdaCompatibility, tofAntiLambdaCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas - [](float tofNSigmaALaPr, float tofNSigmaALaPi, float nsigma) -> float { - bool compatible = true; - if(std::abs(tofNSigmaALaPr-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaALaPr)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaALaPi-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaALaPi)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - return compatible; - }); + [](float tofNSigmaALaPr, float tofNSigmaALaPi, float nsigma) -> float { + bool compatible = true; + if (std::abs(tofNSigmaALaPr - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaALaPr) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaALaPi - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaALaPi) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + return compatible; + }); // dynamics based on n-sigmas with use-only-if-tof-present logic DECLARE_SOA_DYNAMIC_COLUMN(TofK0ShortCompatibility, tofK0ShortCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas - [](float tofNSigmaK0PiPlus, float tofNSigmaK0PiMinus, float nsigma) -> float { - bool compatible = true; - if(std::abs(tofNSigmaK0PiPlus-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaK0PiPlus)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaK0PiMinus-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaK0PiMinus)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - return compatible; - }); + [](float tofNSigmaK0PiPlus, float tofNSigmaK0PiMinus, float nsigma) -> float { + bool compatible = true; + if (std::abs(tofNSigmaK0PiPlus - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaK0PiPlus) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaK0PiMinus - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaK0PiMinus) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + return compatible; + }); // beta values DECLARE_SOA_COLUMN(TofBetaLambda, tofBetaLambda, float); //! beta value with Lambda hypothesis @@ -170,8 +170,8 @@ DECLARE_SOA_TABLE(V0TOFNSigmas, "AOD", "V0TOFNSIGMA", // processed NSigma table namespace cascdata { -// define constants for NSigma operation -const float kNoTOFValue = -1e+6; +// define constants for NSigma operation +const float kNoTOFValue = -1e+6; const float kEpsilon = 1e-4; // lengths as stored in the AO2D for TOF calculations @@ -207,35 +207,34 @@ DECLARE_SOA_COLUMN(TOFNSigmaOmKa, tofNSigmaOmKa, float); //! bachelor track // dynamics based on n-sigmas with use-only-if-tof-present logic DECLARE_SOA_DYNAMIC_COLUMN(TofXiCompatibility, tofXiCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas - [](float tofNSigmaXiLaPr, float tofNSigmaXiLaPi, float tofNSigmaXiPi, float nsigma) -> float { - bool compatible = true; - if(std::abs(tofNSigmaXiLaPr-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaXiLaPr)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaXiLaPi-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaXiLaPi)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaXiPi-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaXiPi)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - return compatible; - }); + [](float tofNSigmaXiLaPr, float tofNSigmaXiLaPi, float tofNSigmaXiPi, float nsigma) -> float { + bool compatible = true; + if (std::abs(tofNSigmaXiLaPr - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaXiLaPr) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaXiLaPi - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaXiLaPi) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaXiPi - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaXiPi) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + return compatible; + }); DECLARE_SOA_DYNAMIC_COLUMN(TofOmegaCompatibility, tofOmegaCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas - [](float tofNSigmaOmLaPr, float tofNSigmaOmLaPi, float tofNSigmaOmKa, float nsigma) -> float { - bool compatible = true; - if(std::abs(tofNSigmaOmLaPr-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaOmLaPr)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaOmLaPi-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaOmLaPi)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - if(std::abs(tofNSigmaOmKa-kNoTOFValue)>kEpsilon && std::abs(tofNSigmaOmKa)>nsigma){ - compatible = false; // reject only if info present and incompatible - } - return compatible; - }); - + [](float tofNSigmaOmLaPr, float tofNSigmaOmLaPi, float tofNSigmaOmKa, float nsigma) -> float { + bool compatible = true; + if (std::abs(tofNSigmaOmLaPr - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaOmLaPr) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaOmLaPi - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaOmLaPi) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + if (std::abs(tofNSigmaOmKa - kNoTOFValue) > kEpsilon && std::abs(tofNSigmaOmKa) > nsigma) { + compatible = false; // reject only if info present and incompatible + } + return compatible; + }); } // namespace cascdata diff --git a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx index 7f783414457..75cb771dbea 100644 --- a/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx @@ -23,38 +23,40 @@ // (strange, weakly-decaying) particle. This task is meant to be a test, as // it hasn't been fully tested yet! Use at your own peril for now :-) -#include -#include -#include -#include -#include -#include - #include "TableHelper.h" -#include "Framework/runDataProcessing.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/AnalysisTask.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/ASoAHelpers.h" -#include "DCAFitter/DCAFitterN.h" -#include "ReconstructionDataFormats/Track.h" -#include "Common/Core/RecoDecay.h" -#include "Common/Core/trackUtilities.h" -#include "PWGLF/DataModel/LFStrangenessTables.h" -#include "PWGLF/DataModel/LFStrangenessPIDTables.h" #include "PWGLF/DataModel/LFParticleIdentification.h" +#include "PWGLF/DataModel/LFStrangenessPIDTables.h" +#include "PWGLF/DataModel/LFStrangenessTables.h" + +#include "Common/Core/RecoDecay.h" #include "Common/Core/TrackSelection.h" +#include "Common/Core/trackUtilities.h" +#include "Common/DataModel/PIDResponse.h" #include "Common/DataModel/TrackSelectionTables.h" -#include "DetectorsBase/Propagator.h" -#include "DetectorsBase/GeometryManager.h" -#include "DataFormatsParameters/GRPObject.h" -#include "DataFormatsParameters/GRPMagField.h" +#include "Common/TableProducer/PID/pidTOFBase.h" + #include "CCDB/BasicCCDBManager.h" -#include "DataFormatsCalibration/MeanVertexObject.h" #include "CommonConstants/PhysicsConstants.h" -#include "Common/TableProducer/PID/pidTOFBase.h" -#include "Common/DataModel/PIDResponse.h" +#include "DCAFitter/DCAFitterN.h" +#include "DataFormatsCalibration/MeanVertexObject.h" +#include "DataFormatsParameters/GRPMagField.h" +#include "DataFormatsParameters/GRPObject.h" +#include "DetectorsBase/GeometryManager.h" +#include "DetectorsBase/Propagator.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/runDataProcessing.h" +#include "ReconstructionDataFormats/Track.h" + +#include +#include +#include +#include +#include +#include using namespace o2; using namespace o2::framework; @@ -73,10 +75,10 @@ using CascDerivedDatas = soa::Join v0tofpid; // table with Nsigmas - Produces v0tofbeta; // table with betas - Produces v0tofdebugs; // table with extra debug information - Produces v0tofnsigmas; // table with nsigmas + Produces v0tofpid; // table with Nsigmas + Produces v0tofbeta; // table with betas + Produces v0tofdebugs; // table with extra debug information + Produces v0tofnsigmas; // table with nsigmas Produces casctofpids; // cascades: table with base info Produces casctofnsigmas; // cascades: table with Nsigmas @@ -87,7 +89,7 @@ struct strangenesstofpid { HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - // master switches + // master switches 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)"}; @@ -302,17 +304,17 @@ struct strangenesstofpid { void init(InitContext& initContext) { - if(calculateV0s.value<0){ + if (calculateV0s.value < 0) { // check if TOF information is required, enable if so calculateV0s.value = isTableRequiredInWorkflow(initContext, "V0TOFNSigmas"); - if(calculateV0s.value>0){ + if (calculateV0s.value > 0) { LOGF(info, "Strangeness TOF PID: V0 calculations enabled automatically"); } } - if(calculateCascades.value<0){ + if (calculateCascades.value < 0) { // check if TOF information is required, enable if so calculateCascades.value = isTableRequiredInWorkflow(initContext, "CascTOFNSigmas"); - if(calculateCascades.value>0){ + if (calculateCascades.value > 0) { LOGF(info, "Strangeness TOF PID: Cascade calculations enabled automatically"); } } @@ -356,7 +358,7 @@ struct strangenesstofpid { histos.add("hArcDebug", "hArcDebug", kTH2F, {axisP, {50, -5.0f, 10.0f}}); // standard deltaTime values - if(calculateV0s.value>0){ + if (calculateV0s.value > 0) { histos.add("h2dDeltaTimePositiveLambdaPi", "h2dDeltaTimePositiveLambdaPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dDeltaTimeNegativeLambdaPi", "h2dDeltaTimeNegativeLambdaPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dDeltaTimePositiveLambdaPr", "h2dDeltaTimePositiveLambdaPr", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); @@ -365,7 +367,7 @@ struct strangenesstofpid { histos.add("h2dDeltaTimeNegativeK0ShortPi", "h2dDeltaTimeNegativeK0ShortPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); } - if(calculateCascades.value>0){ + if (calculateCascades.value > 0) { histos.add("h2dposDeltaTimeAsXiPi", "h2dposDeltaTimeAsXiPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dposDeltaTimeAsXiPr", "h2dposDeltaTimeAsXiPr", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); histos.add("h2dnegDeltaTimeAsXiPi", "h2dnegDeltaTimeAsXiPi", {HistType::kTH3F, {axisP, axisEta, axisDeltaTime}}); @@ -383,7 +385,7 @@ struct strangenesstofpid { histos.add("h2dNegativeTOFProperties", "h2dNegativeTOFProperties", {HistType::kTH2F, {axisP, {4, -0.5, 3.5f}}}); if (doQANSigma) { - if(calculateV0s.value>0){ + if (calculateV0s.value > 0) { histos.add("h2dNSigmaPositiveLambdaPi", "h2dNSigmaPositiveLambdaPi", {HistType::kTH2F, {axisP, axisNSigma}}); histos.add("h2dNSigmaNegativeLambdaPi", "h2dNSigmaNegativeLambdaPi", {HistType::kTH2F, {axisP, axisNSigma}}); histos.add("h2dNSigmaPositiveLambdaPr", "h2dNSigmaPositiveLambdaPr", {HistType::kTH2F, {axisP, axisNSigma}}); @@ -392,7 +394,7 @@ struct strangenesstofpid { histos.add("h2dNSigmaNegativeK0ShortPi", "h2dNSigmaNegativeK0ShortPi", {HistType::kTH2F, {axisP, axisNSigma}}); } - if(calculateCascades.value>0){ + if (calculateCascades.value > 0) { histos.add("h2dNSigmaXiLaPi", "h2dNSigmaXiLaPi", {HistType::kTH2F, {axisP, axisNSigma}}); histos.add("h2dNSigmaXiLaPr", "h2dNSigmaXiLaPr", {HistType::kTH2F, {axisP, axisNSigma}}); histos.add("h2dNSigmaXiPi", "h2dNSigmaXiPi", {HistType::kTH2F, {axisP, axisNSigma}}); @@ -452,7 +454,7 @@ struct strangenesstofpid { LOGF(info, "loaded TList with this many objects: %i", nSigmaCalibObjects->GetEntries()); nSigmaCalibLoaded = true; // made it thus far, mark loaded - if(calculateV0s.value){ + if (calculateV0s.value) { hMeanPosLaPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosLaPi")); hMeanPosLaPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosLaPr")); hMeanNegLaPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegLaPi")); @@ -481,39 +483,39 @@ struct strangenesstofpid { LOG(info) << "Problems finding mean histogram hMeanNegK0Pi!"; if (!hSigmaPosK0Pi || !hSigmaNegK0Pi || !hSigmaPosLaPi || !hSigmaPosLaPr || !hSigmaNegLaPi || !hSigmaNegLaPr) { LOG(info) << "Problems finding sigma histograms!"; - } + } - if(calculateCascades.value){ - hMeanPosXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosXiPi")); - hMeanPosXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosXiPr")); - hMeanNegXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegXiPi")); - hMeanNegXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegXiPr")); - hMeanBachXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanBachXiPi")); - hMeanPosOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosOmPi")); - hMeanPosOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosOmPr")); - hMeanNegOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegOmPi")); - hMeanNegOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegOmPr")); - hMeanBachOmKa = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanBachOmKa")); - - hSigmaPosXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosXiPi")); - hSigmaPosXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosXiPr")); - hSigmaNegXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegXiPi")); - hSigmaNegXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegXiPr")); - hSigmaBachXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaBachXiPi")); - hSigmaPosOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosOmPi")); - hSigmaPosOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosOmPr")); - hSigmaNegOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegOmPi")); - hSigmaNegOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegOmPr")); - hSigmaBachOmKa = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaBachOmKa")); - - if (!hMeanPosXiPi || !hMeanPosXiPr || !hMeanNegXiPi || !hMeanNegXiPr || !hMeanBachXiPi) - LOG(info) << "Problems finding xi mean histograms!"; - if (!hMeanPosOmPi || !hMeanPosOmPr || !hMeanNegOmPi || !hMeanNegOmPr || !hMeanBachOmKa) - LOG(info) << "Problems finding omega sigma histograms!"; - if (!hSigmaPosXiPi || !hSigmaPosXiPr || !hSigmaNegXiPi || !hSigmaNegXiPr || !hSigmaBachXiPi) - LOG(info) << "Problems finding xi sigma histograms!"; - if (!hSigmaPosOmPi || !hSigmaPosOmPr || !hSigmaNegOmPi || !hSigmaNegOmPr || !hSigmaBachOmKa) - LOG(info) << "Problems finding omega sigma histograms!"; + if (calculateCascades.value) { + hMeanPosXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosXiPi")); + hMeanPosXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosXiPr")); + hMeanNegXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegXiPi")); + hMeanNegXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegXiPr")); + hMeanBachXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanBachXiPi")); + hMeanPosOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosOmPi")); + hMeanPosOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanPosOmPr")); + hMeanNegOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegOmPi")); + hMeanNegOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanNegOmPr")); + hMeanBachOmKa = reinterpret_cast(nSigmaCalibObjects->FindObject("hMeanBachOmKa")); + + hSigmaPosXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosXiPi")); + hSigmaPosXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosXiPr")); + hSigmaNegXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegXiPi")); + hSigmaNegXiPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegXiPr")); + hSigmaBachXiPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaBachXiPi")); + hSigmaPosOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosOmPi")); + hSigmaPosOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaPosOmPr")); + hSigmaNegOmPi = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegOmPi")); + hSigmaNegOmPr = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaNegOmPr")); + hSigmaBachOmKa = reinterpret_cast(nSigmaCalibObjects->FindObject("hSigmaBachOmKa")); + + if (!hMeanPosXiPi || !hMeanPosXiPr || !hMeanNegXiPi || !hMeanNegXiPr || !hMeanBachXiPi) + LOG(info) << "Problems finding xi mean histograms!"; + if (!hMeanPosOmPi || !hMeanPosOmPr || !hMeanNegOmPi || !hMeanNegOmPr || !hMeanBachOmKa) + LOG(info) << "Problems finding omega sigma histograms!"; + if (!hSigmaPosXiPi || !hSigmaPosXiPr || !hSigmaNegXiPi || !hSigmaNegXiPr || !hSigmaBachXiPi) + LOG(info) << "Problems finding xi sigma histograms!"; + if (!hSigmaPosOmPi || !hSigmaPosOmPr || !hSigmaNegOmPi || !hSigmaNegOmPr || !hSigmaBachOmKa) + LOG(info) << "Problems finding omega sigma histograms!"; } } } @@ -614,9 +616,12 @@ struct strangenesstofpid { float decayTimeAntiLambda = 0.5f * ((pTra.tofSignal() - timePositivePi) + (nTra.tofSignal() - timeNegativePr)) - evTimeMean; float decayTimeK0Short = 0.5f * ((pTra.tofSignal() - timePositivePi) + (nTra.tofSignal() - timeNegativePi)) - evTimeMean; - float betaLambda = o2::aod::cascdata::kNoTOFValue;; - float betaAntiLambda = o2::aod::cascdata::kNoTOFValue;; - float betaK0Short = o2::aod::cascdata::kNoTOFValue;; + float betaLambda = o2::aod::cascdata::kNoTOFValue; + ; + float betaAntiLambda = o2::aod::cascdata::kNoTOFValue; + ; + float betaK0Short = o2::aod::cascdata::kNoTOFValue; + ; if (nTra.hasTOF() && pTra.hasTOF()) { betaLambda = (lengthV0 / decayTimeLambda) / 0.0299792458; @@ -663,8 +668,8 @@ struct strangenesstofpid { if (std::abs(v0.mLambda() - 1.115683) < v0Group.qaMassWindow && fabs(pTra.tpcNSigmaPr()) < v0Group.qaTPCNSigma && fabs(nTra.tpcNSigmaPi()) < v0Group.qaTPCNSigma) { histos.fill(HIST("h2dDeltaTimePositiveLambdaPr"), v0.p(), v0.eta(), deltaTimePositiveLambdaPr); histos.fill(HIST("h2dProtonMeasuredVsExpected"), - (timeLambda + timePositivePr)/(pTra.tofSignal() - pTra.tofEvTime()), - positiveP, v0.positiveeta()); + (timeLambda + timePositivePr) / (pTra.tofSignal() - pTra.tofEvTime()), + positiveP, v0.positiveeta()); if (doQANSigma) histos.fill(HIST("h2dNSigmaPositiveLambdaPr"), v0.p(), nSigmaPositiveLambdaPr); } @@ -686,8 +691,8 @@ struct strangenesstofpid { if (std::abs(v0.mLambda() - 1.115683) < v0Group.qaMassWindow && fabs(pTra.tpcNSigmaPr()) < v0Group.qaTPCNSigma && fabs(nTra.tpcNSigmaPi()) < v0Group.qaTPCNSigma) { histos.fill(HIST("h2dDeltaTimeNegativeLambdaPi"), v0.p(), v0.eta(), deltaTimeNegativeLambdaPi); histos.fill(HIST("h2dPionMeasuredVsExpected"), - (timeLambda + timeNegativePi)/(nTra.tofSignal() - nTra.tofEvTime()), - negativeP, v0.negativeeta()); + (timeLambda + timeNegativePi) / (nTra.tofSignal() - nTra.tofEvTime()), + negativeP, v0.negativeeta()); if (doQANSigma) histos.fill(HIST("h2dNSigmaNegativeLambdaPi"), v0.p(), nSigmaNegativeLambdaPi); } @@ -708,7 +713,6 @@ struct strangenesstofpid { } } - template void processCascadeCandidate(TCollision const& collision, TCascade const& cascade, TTrack const& pTra, TTrack const& nTra, TTrack const& bTra) { @@ -736,7 +740,8 @@ struct strangenesstofpid { // calculate mother lengths float lengthV0 = std::hypot(cascade.xlambda() - cascade.x(), cascade.ylambda() - cascade.y(), cascade.zlambda() - cascade.z()); - float lengthCascade = o2::aod::cascdata::kNoTOFValue;; + float lengthCascade = o2::aod::cascdata::kNoTOFValue; + ; const o2::math_utils::Point3D collVtx{collision.getX(), collision.getY(), collision.getZ()}; bool successPropag = o2::base::Propagator::Instance()->propagateToDCA(collVtx, cascTrack, d_bz, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrNONE); float d = -1.0f, d3d = 0.0f; @@ -800,12 +805,18 @@ struct strangenesstofpid { posDeltaTimeAsXiPi, posDeltaTimeAsXiPr, negDeltaTimeAsXiPi, negDeltaTimeAsXiPr, bachDeltaTimeAsXiPi, posDeltaTimeAsOmPi, posDeltaTimeAsOmPr, negDeltaTimeAsOmPi, negDeltaTimeAsOmPr, bachDeltaTimeAsOmKa); - float nSigmaXiLaPr = o2::aod::cascdata::kNoTOFValue;; - float nSigmaXiLaPi = o2::aod::cascdata::kNoTOFValue;; - float nSigmaXiPi = o2::aod::cascdata::kNoTOFValue;; - float nSigmaOmLaPr = o2::aod::cascdata::kNoTOFValue;; - float nSigmaOmLaPi = o2::aod::cascdata::kNoTOFValue;; - float nSigmaOmKa = o2::aod::cascdata::kNoTOFValue;; + float nSigmaXiLaPr = o2::aod::cascdata::kNoTOFValue; + ; + float nSigmaXiLaPi = o2::aod::cascdata::kNoTOFValue; + ; + float nSigmaXiPi = o2::aod::cascdata::kNoTOFValue; + ; + float nSigmaOmLaPr = o2::aod::cascdata::kNoTOFValue; + ; + float nSigmaOmLaPi = o2::aod::cascdata::kNoTOFValue; + ; + float nSigmaOmKa = o2::aod::cascdata::kNoTOFValue; + ; // go for Nsigma values if requested if (doNSigmas && nSigmaCalibLoaded) { @@ -892,7 +903,7 @@ struct strangenesstofpid { } } - void processStandardData(aod::Collisions const& collisions, V0OriginalDatas const& V0s, CascOriginalDatas const& cascades,TracksWithAllExtras const&, aod::BCsWithTimestamps const& /*bcs*/) + void processStandardData(aod::Collisions const& collisions, V0OriginalDatas const& V0s, CascOriginalDatas const& cascades, TracksWithAllExtras const&, aod::BCsWithTimestamps const& /*bcs*/) { // Fire up CCDB with first collision in record. If no collisions, bypass if (useCustomRunNumber || collisions.size() < 1) { @@ -903,7 +914,7 @@ struct strangenesstofpid { initCCDB(bc.runNumber()); } - if(calculateV0s.value){ + if (calculateV0s.value) { for (const auto& V0 : V0s) { // for storing whatever is the relevant quantity for the PV o2::dataformats::VertexBase primaryVertex; @@ -921,7 +932,7 @@ struct strangenesstofpid { } } - if(calculateCascades.value){ + if (calculateCascades.value) { for (const auto& cascade : cascades) { // for storing whatever is the relevant quantity for the PV o2::dataformats::VertexBase primaryVertex; @@ -951,7 +962,7 @@ struct strangenesstofpid { initCCDB(collision.runNumber()); } - if(calculateV0s.value){ + if (calculateV0s.value) { for (const auto& V0 : V0s) { // for storing whatever is the relevant quantity for the PV o2::dataformats::VertexBase primaryVertex; @@ -970,7 +981,7 @@ struct strangenesstofpid { } } - if(calculateCascades.value){ + if (calculateCascades.value) { for (const auto& cascade : cascades) { // for storing whatever is the relevant quantity for the PV o2::dataformats::VertexBase primaryVertex; diff --git a/PWGLF/Tasks/QC/strangepidqa.cxx b/PWGLF/Tasks/QC/strangepidqa.cxx index f06f5ea00d9..2dd9c58b4e7 100644 --- a/PWGLF/Tasks/QC/strangepidqa.cxx +++ b/PWGLF/Tasks/QC/strangepidqa.cxx @@ -60,7 +60,7 @@ struct strangepidqa { AxisSpec massAxisOmega = {200, 1.572f, 1.772f, "Inv. Mass (GeV/c^{2})"}; // Invariant Mass - ConfigurableAxis axisK0ShortMass{"axisK0ShortMass", {200, 0.497f-0.050f, 0.497f+0.050f}, "M_{K0s} (GeV/c^{2})"}; + ConfigurableAxis axisK0ShortMass{"axisK0ShortMass", {200, 0.497f - 0.050f, 0.497f + 0.050f}, "M_{K0s} (GeV/c^{2})"}; ConfigurableAxis axisLambdaMass{"axisLambdaMass", {200, 1.08f, 1.16f}, "M_{#Lambda} (GeV/c^{2})"}; // time axes @@ -301,7 +301,7 @@ struct strangepidqa { // lambda case histos.fill(HIST("h3dMassLambda"), coll.centFT0C(), lambda.pt(), lambda.mLambda()); histos.fill(HIST("h1dMassLambda"), lambda.mLambda()); - if(lambda.tofLambdaCompatibility(tofNsigmaCompatibility.value)){ + if (lambda.tofLambdaCompatibility(tofNsigmaCompatibility.value)) { histos.fill(HIST("h3dMassCompatibleLambda"), coll.centFT0C(), lambda.pt(), lambda.mLambda()); histos.fill(HIST("h1dMassCompatibleLambda"), lambda.mLambda()); } @@ -311,7 +311,7 @@ struct strangepidqa { // lambda case histos.fill(HIST("h3dMassAntiLambda"), coll.centFT0C(), lambda.pt(), lambda.mAntiLambda()); histos.fill(HIST("h1dMassAntiLambda"), lambda.mAntiLambda()); - if(lambda.tofAntiLambdaCompatibility(tofNsigmaCompatibility.value)){ + if (lambda.tofAntiLambdaCompatibility(tofNsigmaCompatibility.value)) { histos.fill(HIST("h3dMassCompatibleAntiLambda"), coll.centFT0C(), lambda.pt(), lambda.mAntiLambda()); histos.fill(HIST("h1dMassCompatibleAntiLambda"), lambda.mAntiLambda()); } @@ -321,7 +321,7 @@ struct strangepidqa { // lambda case histos.fill(HIST("h3dMassK0Short"), coll.centFT0C(), lambda.pt(), lambda.mK0Short()); histos.fill(HIST("h1dMassK0Short"), lambda.mK0Short()); - if(lambda.tofK0ShortCompatibility(tofNsigmaCompatibility.value)){ + if (lambda.tofK0ShortCompatibility(tofNsigmaCompatibility.value)) { histos.fill(HIST("h3dMassCompatibleK0Short"), coll.centFT0C(), lambda.pt(), lambda.mK0Short()); histos.fill(HIST("h1dMassCompatibleK0Short"), lambda.mK0Short()); } @@ -465,16 +465,16 @@ struct strangepidqa { if (casc.sign() < 0) { if (TMath::Abs(posExtra.tpcNSigmaPr()) < tpcNsigmaProton && TMath::Abs(negExtra.tpcNSigmaPi()) < tpcNsigmaPion && TMath::Abs(bachExtra.tpcNSigmaPi()) < tpcNsigmaBachelor) { histos.fill(HIST("h3dMassXiMinus"), col.centFT0C(), casc.pt(), casc.mXi()); - histos.fill(HIST("h1dMassXiMinus"), casc.mXi()); - if(casc.tofXiCompatibility(tofNsigmaCompatibilityCascades.value)){ + histos.fill(HIST("h1dMassXiMinus"), casc.mXi()); + if (casc.tofXiCompatibility(tofNsigmaCompatibilityCascades.value)) { histos.fill(HIST("h3dMassCompatibleXiMinus"), col.centFT0C(), casc.pt(), casc.mXi()); - histos.fill(HIST("h1dMassCompatibleXiMinus"), casc.mXi()); + histos.fill(HIST("h1dMassCompatibleXiMinus"), casc.mXi()); } } if (TMath::Abs(posExtra.tpcNSigmaPr()) < tpcNsigmaProton && TMath::Abs(negExtra.tpcNSigmaPi()) < tpcNsigmaPion && TMath::Abs(bachExtra.tpcNSigmaKa()) < tpcNsigmaBachelor) { histos.fill(HIST("h3dMassOmegaMinus"), col.centFT0C(), casc.pt(), casc.mOmega()); histos.fill(HIST("h1dMassOmegaMinus"), casc.mOmega()); - if(casc.tofOmegaCompatibility(tofNsigmaCompatibilityCascades.value)){ + if (casc.tofOmegaCompatibility(tofNsigmaCompatibilityCascades.value)) { histos.fill(HIST("h3dMassCompatibleOmegaMinus"), col.centFT0C(), casc.pt(), casc.mOmega()); histos.fill(HIST("h1dMassCompatibleOmegaMinus"), casc.mOmega()); } @@ -483,7 +483,7 @@ struct strangepidqa { if (TMath::Abs(posExtra.tpcNSigmaPi()) < tpcNsigmaPion && TMath::Abs(negExtra.tpcNSigmaPr()) < tpcNsigmaProton && TMath::Abs(bachExtra.tpcNSigmaPi()) < tpcNsigmaBachelor) { histos.fill(HIST("h3dMassXiPlus"), col.centFT0C(), casc.pt(), casc.mXi()); histos.fill(HIST("h1dMassXiPlus"), casc.mXi()); - if(casc.tofXiCompatibility(tofNsigmaCompatibilityCascades.value)){ + if (casc.tofXiCompatibility(tofNsigmaCompatibilityCascades.value)) { histos.fill(HIST("h3dMassCompatibleXiPlus"), col.centFT0C(), casc.pt(), casc.mXi()); histos.fill(HIST("h1dMassCompatibleXiPlus"), casc.mXi()); } @@ -492,7 +492,7 @@ struct strangepidqa { if (TMath::Abs(posExtra.tpcNSigmaPi()) < tpcNsigmaPion && TMath::Abs(negExtra.tpcNSigmaPr()) < tpcNsigmaProton && TMath::Abs(bachExtra.tpcNSigmaKa()) < tpcNsigmaBachelor) { histos.fill(HIST("h3dMassOmegaPlus"), col.centFT0C(), casc.pt(), casc.mOmega()); histos.fill(HIST("h1dMassOmegaPlus"), casc.mOmega()); - if(casc.tofOmegaCompatibility(tofNsigmaCompatibilityCascades.value)){ + if (casc.tofOmegaCompatibility(tofNsigmaCompatibilityCascades.value)) { histos.fill(HIST("h3dMassCompatibleOmegaPlus"), col.centFT0C(), casc.pt(), casc.mOmega()); histos.fill(HIST("h1dMassCompatibleOmegaPlus"), casc.mOmega()); }