From 00a7e70b0bac40d2e3446b398c0fa30f4ed9d42b Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Thu, 11 Jan 2024 10:47:17 +0100 Subject: [PATCH] Please consider the following formatting changes (#213) --- PWGLF/DataModel/LFStrangenessPIDTables.h | 22 +-- PWGLF/TableProducer/lambdakzeropid.cxx | 70 ++++----- PWGLF/Tasks/QC/strangepidqa.cxx | 177 +++++++++++++---------- 3 files changed, 147 insertions(+), 122 deletions(-) diff --git a/PWGLF/DataModel/LFStrangenessPIDTables.h b/PWGLF/DataModel/LFStrangenessPIDTables.h index 3a1161e2bb8..fdef30d1d1f 100644 --- a/PWGLF/DataModel/LFStrangenessPIDTables.h +++ b/PWGLF/DataModel/LFStrangenessPIDTables.h @@ -63,11 +63,11 @@ DECLARE_SOA_COLUMN(PosTOFDeltaTK0Pi, posTOFDeltaTK0Pi, float); //! positive trac DECLARE_SOA_COLUMN(NegTOFDeltaTK0Pi, negTOFDeltaTK0Pi, float); //! positive track TOFDeltaT from pion <- k0short expectation // delta-decay-times (event-time-independent) -DECLARE_SOA_COLUMN(DeltaDecayTimeLambda, deltaDecayTimeLambda, float); //! delta-decay time estimate from proton/pion from Lambda +DECLARE_SOA_COLUMN(DeltaDecayTimeLambda, deltaDecayTimeLambda, float); //! delta-decay time estimate from proton/pion from Lambda DECLARE_SOA_COLUMN(DeltaDecayTimeAntiLambda, deltaDecayTimeAntiLambda, float); //! delta-decay time estimate from pion/proton from AntiLambda -DECLARE_SOA_COLUMN(DeltaDecayTimeK0Short, deltaDecayTimeK0Short, float); //! delta-decay time estimate from pion/pion from K0Short +DECLARE_SOA_COLUMN(DeltaDecayTimeK0Short, deltaDecayTimeK0Short, float); //! delta-decay time estimate from pion/pion from K0Short -// n-sigmas - unused as of now +// n-sigmas - unused as of now DECLARE_SOA_COLUMN(PosNSigmaLaPi, posNSigmaLaPi, float); //! positive track NSigma from pion <- lambda expectation DECLARE_SOA_COLUMN(PosNSigmaLaPr, posNSigmaLaPr, float); //! positive track NSigma from proton <- lambda expectation DECLARE_SOA_COLUMN(NegNSigmaLaPi, negNSigmaLaPi, float); //! negative track NSigma from pion <- lambda expectation @@ -81,12 +81,12 @@ DECLARE_SOA_COLUMN(TofBetaAntiLambda, tofBetaAntiLambda, float); //! beta value DECLARE_SOA_COLUMN(TofBetaK0Short, tofBetaK0Short, float); //! beta value with K0Short hypothesis // debug quantities -DECLARE_SOA_COLUMN(V0LifetimeLambda, v0LifetimeLambda, float); //! lifetime of V0 assuming lambda mass (ps) -DECLARE_SOA_COLUMN(V0LifetimeK0Short, v0LifetimeK0Short, float); //! lifetime of V0 assuming K0 mass (ps) -DECLARE_SOA_COLUMN(PosLifetimePr, posLifetimePr, float); //! lifetime (to TOF) of pos prong assuming proton mass (ps) -DECLARE_SOA_COLUMN(PosLifetimePi, posLifetimePi, float); //! lifetime (to TOF) of pos prong assuming pion mass (ps) -DECLARE_SOA_COLUMN(NegLifetimePr, negLifetimePr, float); //! lifetime (to TOF) of neg prong assuming proton mass (ps) -DECLARE_SOA_COLUMN(NegLifetimePi, negLifetimePi, float); //! lifetime (to TOF) of neg prong assuming pion mass (ps) +DECLARE_SOA_COLUMN(V0LifetimeLambda, v0LifetimeLambda, float); //! lifetime of V0 assuming lambda mass (ps) +DECLARE_SOA_COLUMN(V0LifetimeK0Short, v0LifetimeK0Short, float); //! lifetime of V0 assuming K0 mass (ps) +DECLARE_SOA_COLUMN(PosLifetimePr, posLifetimePr, float); //! lifetime (to TOF) of pos prong assuming proton mass (ps) +DECLARE_SOA_COLUMN(PosLifetimePi, posLifetimePi, float); //! lifetime (to TOF) of pos prong assuming pion mass (ps) +DECLARE_SOA_COLUMN(NegLifetimePr, negLifetimePr, float); //! lifetime (to TOF) of neg prong assuming proton mass (ps) +DECLARE_SOA_COLUMN(NegLifetimePi, negLifetimePi, float); //! lifetime (to TOF) of neg prong assuming pion mass (ps) } // namespace v0data DECLARE_SOA_TABLE(V0TOFs, "AOD", "V0TOF", // raw information table (for debug, etc) @@ -98,8 +98,8 @@ DECLARE_SOA_TABLE(V0TOFPIDs, "AOD", "V0TOFPID", // processed info table (for ana v0data::PosTOFDeltaTLaPi, v0data::PosTOFDeltaTLaPr, v0data::NegTOFDeltaTLaPi, v0data::NegTOFDeltaTLaPr, v0data::PosTOFDeltaTK0Pi, v0data::NegTOFDeltaTK0Pi, - v0data::DeltaDecayTimeLambda, - v0data::DeltaDecayTimeAntiLambda, + v0data::DeltaDecayTimeLambda, + v0data::DeltaDecayTimeAntiLambda, v0data::DeltaDecayTimeK0Short); DECLARE_SOA_TABLE(V0TOFDebugs, "AOD", "V0TOFDEBUG", // table with intermediate information solely for debugging diff --git a/PWGLF/TableProducer/lambdakzeropid.cxx b/PWGLF/TableProducer/lambdakzeropid.cxx index 94390a9da54..bdda2efffab 100644 --- a/PWGLF/TableProducer/lambdakzeropid.cxx +++ b/PWGLF/TableProducer/lambdakzeropid.cxx @@ -75,13 +75,13 @@ using TaggedV0s = soa::Join; // For MC association in pre-selection using LabeledTracksExtra = soa::Join; -// Cores with references and TOF pid +// Cores with references and TOF pid using V0FullCores = soa::Join; struct lambdakzeropid { // TOF pid for strangeness (recalculated with topology) Produces v0tofpid; // table with Nsigmas - Produces v0tofbeta; // table with betas + Produces v0tofbeta; // table with betas Produces v0tofdebugs; // table with extra debug information Service ccdb; @@ -235,7 +235,7 @@ struct lambdakzeropid { if (thisLength < length && thisLength > 0) length = thisLength; } - if ( length > 1e+5 ) + if (length > 1e+5) length = -100; // force negative to avoid misunderstandings return length; } @@ -253,14 +253,14 @@ struct lambdakzeropid { ccdb->setFatalWhenNull(false); // per event - histos.add("hCandidateCounter", "hCandidateCounter", kTH1F, {{500,-0.5f,499.5f}}); + histos.add("hCandidateCounter", "hCandidateCounter", kTH1F, {{500, -0.5f, 499.5f}}); // measured vs expected total time QA - if(doQA){ + if (doQA) { histos.add("h2dProtonMeasuredVsExpected", "h2dProtonMeasuredVsExpected", {HistType::kTH2F, {axisTime, axisTime}}); histos.add("h2dPionMeasuredVsExpected", "h2dPionMeasuredVsExpected", {HistType::kTH2F, {axisTime, axisTime}}); - // delta lambda decay time + // delta lambda decay time histos.add("h2dLambdaDeltaDecayTime", "h2dLambdaDeltaDecayTime", {HistType::kTH2F, {axisPt, axisDeltaTime}}); } } @@ -331,8 +331,8 @@ struct lambdakzeropid { float timeLambda = lengthV0 / velocityLambda; // in picoseconds // initialize from V0 position and momenta - o2::track::TrackPar posTrack = o2::track::TrackPar({v0.x(), v0.y(), v0.z()}, {v0.pxpos(), v0.pypos(), v0.pzpos()}, +1); - o2::track::TrackPar negTrack = o2::track::TrackPar({v0.x(), v0.y(), v0.z()}, {v0.pxneg(), v0.pyneg(), v0.pzneg()}, -1); + o2::track::TrackPar posTrack = o2::track::TrackPar({v0.x(), v0.y(), v0.z()}, {v0.pxpos(), v0.pypos(), v0.pzpos()}, +1); + o2::track::TrackPar negTrack = o2::track::TrackPar({v0.x(), v0.y(), v0.z()}, {v0.pxneg(), v0.pyneg(), v0.pzneg()}, -1); float deltaTimePositiveLambdaPi = -1e+6; float deltaTimeNegativeLambdaPi = -1e+6; @@ -353,12 +353,12 @@ struct lambdakzeropid { float timeNegativePr = lengthNegative / velocityNegativePr; float timeNegativePi = lengthNegative / velocityNegativePi; - if( v0.posTOFSignal() > 0 && v0.posTOFEventTime() > 0 && lengthPositive > 0){ + if (v0.posTOFSignal() > 0 && v0.posTOFEventTime() > 0 && lengthPositive > 0) { deltaTimePositiveLambdaPr = (v0.posTOFSignal() - v0.posTOFEventTime()) - (timeLambda + timePositivePr); deltaTimePositiveLambdaPi = (v0.posTOFSignal() - v0.posTOFEventTime()) - (timeLambda + timePositivePi); deltaTimePositiveK0ShortPi = (v0.posTOFSignal() - v0.posTOFEventTime()) - (timeK0Short + timeNegativePi); } - if( v0.negTOFSignal() > 0 && v0.negTOFEventTime() > 0 && lengthNegative > 0){ + if (v0.negTOFSignal() > 0 && v0.negTOFEventTime() > 0 && lengthNegative > 0) { deltaTimeNegativeLambdaPr = (v0.negTOFSignal() - v0.negTOFEventTime()) - (timeLambda + timeNegativePr); deltaTimeNegativeLambdaPi = (v0.negTOFSignal() - v0.negTOFEventTime()) - (timeLambda + timeNegativePi); deltaTimeNegativeK0ShortPi = (v0.negTOFSignal() - v0.negTOFEventTime()) - (timeK0Short + timeNegativePi); @@ -366,29 +366,29 @@ struct lambdakzeropid { float deltaDecayTimeLambda = -10e+4; float deltaDecayTimeAntiLambda = -10e+4; float deltaDecayTimeK0Short = -10e+4; - if( v0.posTOFSignal() > 0 && v0.negTOFSignal() > 0 && lengthPositive > 0 && lengthNegative > 0){ // does not depend on event time - deltaDecayTimeLambda = (v0.posTOFSignal() - timePositivePr) - (v0.negTOFSignal() - timeNegativePi); - deltaDecayTimeAntiLambda = (v0.posTOFSignal() - timePositivePi) - (v0.negTOFSignal() - timeNegativePr); - deltaDecayTimeK0Short = (v0.posTOFSignal() - timePositivePi) - (v0.negTOFSignal() - timeNegativePi); + if (v0.posTOFSignal() > 0 && v0.negTOFSignal() > 0 && lengthPositive > 0 && lengthNegative > 0) { // does not depend on event time + deltaDecayTimeLambda = (v0.posTOFSignal() - timePositivePr) - (v0.negTOFSignal() - timeNegativePi); + deltaDecayTimeAntiLambda = (v0.posTOFSignal() - timePositivePi) - (v0.negTOFSignal() - timeNegativePr); + deltaDecayTimeK0Short = (v0.posTOFSignal() - timePositivePi) - (v0.negTOFSignal() - timeNegativePi); } // calculate betas - float evTimeMean = 0.5f*(v0.posTOFEventTime() + v0.negTOFEventTime()); - float decayTimeLambda = 0.5f*((v0.posTOFSignal() - timePositivePr) + (v0.negTOFSignal() - timeNegativePi)) - evTimeMean; - float decayTimeAntiLambda = 0.5f*((v0.posTOFSignal() - timePositivePi) + (v0.negTOFSignal() - timeNegativePr)) - evTimeMean; - float decayTimeK0Short = 0.5f*((v0.posTOFSignal() - timePositivePi) + (v0.negTOFSignal() - timeNegativePi)) - evTimeMean; + float evTimeMean = 0.5f * (v0.posTOFEventTime() + v0.negTOFEventTime()); + float decayTimeLambda = 0.5f * ((v0.posTOFSignal() - timePositivePr) + (v0.negTOFSignal() - timeNegativePi)) - evTimeMean; + float decayTimeAntiLambda = 0.5f * ((v0.posTOFSignal() - timePositivePi) + (v0.negTOFSignal() - timeNegativePr)) - evTimeMean; + float decayTimeK0Short = 0.5f * ((v0.posTOFSignal() - timePositivePi) + (v0.negTOFSignal() - timeNegativePi)) - evTimeMean; float betaLambda = -1e+6; float betaAntiLambda = -1e+6; float betaK0Short = -1e+6; - - if( v0.posTOFSignal() > 0 && v0.negTOFSignal() > 0 && v0.posTOFEventTime() > 0 && v0.negTOFEventTime() > 0){ - betaLambda = (lengthV0/decayTimeLambda)/0.0299792458; - betaAntiLambda = (lengthV0/decayTimeAntiLambda)/0.0299792458; - betaK0Short = (lengthV0/decayTimeK0Short)/0.0299792458; + + if (v0.posTOFSignal() > 0 && v0.negTOFSignal() > 0 && v0.posTOFEventTime() > 0 && v0.negTOFEventTime() > 0) { + betaLambda = (lengthV0 / decayTimeLambda) / 0.0299792458; + betaAntiLambda = (lengthV0 / decayTimeAntiLambda) / 0.0299792458; + betaK0Short = (lengthV0 / decayTimeK0Short) / 0.0299792458; } - + v0tofpid(lengthPositive, lengthNegative, deltaTimePositiveLambdaPi, deltaTimePositiveLambdaPr, deltaTimeNegativeLambdaPi, deltaTimeNegativeLambdaPr, @@ -397,17 +397,17 @@ struct lambdakzeropid { v0tofbeta(betaLambda, betaAntiLambda, betaK0Short); v0tofdebugs(timeLambda, timeK0Short, timePositivePr, timePositivePi, timeNegativePr, timeNegativePi); - if(doQA){ - if(v0.posTOFSignal()>0 && v0.posTOFEventTime()>0) - histos.fill(HIST("h2dProtonMeasuredVsExpected"), - (timeLambda + timePositivePr), - (v0.posTOFSignal() - v0.posTOFEventTime())); - if(v0.negTOFSignal()>0 && v0.negTOFEventTime()>0) - histos.fill(HIST("h2dPionMeasuredVsExpected"), - (timeLambda + timeNegativePi), - (v0.negTOFSignal() - v0.negTOFEventTime())); - - // delta lambda decay time + if (doQA) { + if (v0.posTOFSignal() > 0 && v0.posTOFEventTime() > 0) + histos.fill(HIST("h2dProtonMeasuredVsExpected"), + (timeLambda + timePositivePr), + (v0.posTOFSignal() - v0.posTOFEventTime())); + if (v0.negTOFSignal() > 0 && v0.negTOFEventTime() > 0) + histos.fill(HIST("h2dPionMeasuredVsExpected"), + (timeLambda + timeNegativePi), + (v0.negTOFSignal() - v0.negTOFEventTime())); + + // delta lambda decay time histos.fill(HIST("h2dLambdaDeltaDecayTime"), v0.pt(), deltaDecayTimeLambda); } } diff --git a/PWGLF/Tasks/QC/strangepidqa.cxx b/PWGLF/Tasks/QC/strangepidqa.cxx index 0d07ca830ce..5dc7173b1a3 100644 --- a/PWGLF/Tasks/QC/strangepidqa.cxx +++ b/PWGLF/Tasks/QC/strangepidqa.cxx @@ -46,7 +46,7 @@ using std::array; using std::cout; using std::endl; -struct strangepidqa{ +struct strangepidqa { HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; ConfigurableAxis vertexZ{"vertexZ", {30, -15.0f, 15.0f}, ""}; @@ -68,7 +68,7 @@ struct strangepidqa{ // TOF cut axis ConfigurableAxis axisTOFCut{"axisTOFCut", {100, 0.0f, +10000.0f}, "TOF compat. cut (ps)"}; - // TOF selection matters + // TOF selection matters Configurable requireTOFsignalPion{"requireTOFsignalPion", true, "require that pion prongs have TOF"}; Configurable requireTOFsignalProton{"requireTOFsignalProton", true, "require that proton prongs have TOF"}; Configurable requireTOFEventTimePion{"requireTOFEventTimePion", true, "require that pion prongs have TOF event time"}; @@ -86,7 +86,7 @@ struct strangepidqa{ Configurable minPtV0{"minPtV0", 1.0, "min pT for integrated mass histograms"}; Configurable maxPtV0{"maxPtV0", 3.0, "max pT for integrated mass histograms"}; - + void init(InitContext const&) { // Event counter @@ -143,7 +143,7 @@ struct strangepidqa{ histos.add("h2dLambdaMassVsPt_AllTOF", "hLambdaMassVsPtAllTOF", {HistType::kTH2F, {axisPt, axisLambdaMass}}); histos.add("h2dLambdaMassVsPt_DeltaDecayTime", "hLambdaMassVsPtDeltaDecayTime", {HistType::kTH2F, {axisPt, axisLambdaMass}}); -// Invariant Mass with TOF selections + // Invariant Mass with TOF selections histos.add("hLambdaMass_InvertProtonTOF", "hLambdaMass_InvertProtonTOF", {HistType::kTH1F, {axisLambdaMass}}); histos.add("hLambdaMass_InvertPionTOF", "hLambdaMass_InvertPionTOF", {HistType::kTH1F, {axisLambdaMass}}); histos.add("hLambdaMass_InvertAllTOF", "hLambdaMass_InvertAllTOF", {HistType::kTH1F, {axisLambdaMass}}); @@ -165,27 +165,27 @@ struct strangepidqa{ histos.add("h2dPionDeltaTimeVsPt", "h2dPionDeltaTimeVsPt", {HistType::kTH2F, {axisPt, axisDeltaTime}}); histos.add("h2dPionDeltaTimeVsRadius", "h2dPionDeltaTimeVsRadius", {HistType::kTH2F, {axisRadius, axisDeltaTime}}); - // TOF PID testing for prongs + // TOF PID testing for prongs histos.add("h2dProtonDeltaTimeVsPt_MassSelected", "h2dProtonDeltaTimeVsPt_MassSelected", {HistType::kTH2F, {axisPt, axisDeltaTime}}); histos.add("h2dProtonDeltaTimeVsRadius_MassSelected", "h2dProtonDeltaTimeVsRadius_MassSelected", {HistType::kTH2F, {axisRadius, axisDeltaTime}}); histos.add("h2dPionDeltaTimeVsPt_MassSelected", "h2dPionDeltaTimeVsPt_MassSelected", {HistType::kTH2F, {axisPt, axisDeltaTime}}); histos.add("h2dPionDeltaTimeVsRadius_MassSelected", "h2dPionDeltaTimeVsRadius_MassSelected", {HistType::kTH2F, {axisRadius, axisDeltaTime}}); - // delta lambda decay time + // delta lambda decay time histos.add("h2dLambdaDeltaDecayTime", "h2dLambdaDeltaDecayTime", {HistType::kTH2F, {axisPt, axisDeltaTime}}); histos.add("h2dLambdaDeltaDecayTime_MassSelected", "h2dLambdaDeltaDecayTime_MassSelected", {HistType::kTH2F, {axisPt, axisDeltaTime}}); - // beta plots + // beta plots histos.add("h2dLambdaBeta", "h2dLambdaBeta", {HistType::kTH2F, {axisPt, axisBeta}}); histos.add("h2dLambdaBeta_MassSelected", "h2dLambdaBeta_MassSelected", {HistType::kTH2F, {axisPt, axisBeta}}); - - // length vs time for prongs / debug + + // length vs time for prongs / debug histos.add("h2dTimeVsLengthProtonProng", "h2dTimeVsLengthProtonProng", {HistType::kTH2F, {axisLength, axisTime}}); histos.add("h2dTimeVsLengthPionProng", "h2dTimeVsLengthPionProng", {HistType::kTH2F, {axisLength, axisTime}}); // --- ASSOCIATED --- // V0 Radius - if(doprocessSim){ + if (doprocessSim) { histos.add("h2dAssocLambdaRadiusVsPt", "hLambdaRadiusVsPt", {HistType::kTH2F, {axisPt, axisRadius}}); // Invariant Mass @@ -205,46 +205,59 @@ struct strangepidqa{ histos.add("h2dAssocPionDeltaTimeVsPt", "h2dAssocPionDeltaTimeVsPt", {HistType::kTH2F, {axisPt, axisDeltaTime}}); histos.add("h2dAssocPionDeltaTimeVsRadius", "h2dAssocPionDeltaTimeVsRadius", {HistType::kTH2F, {axisRadius, axisDeltaTime}}); - // delta lambda decay time + // delta lambda decay time histos.add("h2dAssocLambdaDeltaDecayTime", "h2dAssocLambdaDeltaDecayTime", {HistType::kTH2F, {axisPt, axisDeltaTime}}); histos.add("h2dAssocLambdaDeltaDecayTime_MassSelected", "h2dAssocLambdaDeltaDecayTime_MassSelected", {HistType::kTH2F, {axisPt, axisDeltaTime}}); - } } - + void processReal(soa::Join::iterator const& coll, soa::Join const& v0s) { histos.fill(HIST("hEventVertexZ"), coll.posZ()); - if(coll.centFT0C() > maxCentrality || coll.centFT0C() < minCentrality) return; - - for (auto& lambda: v0s) { // selecting photons from Sigma0 + if (coll.centFT0C() > maxCentrality || coll.centFT0C() < minCentrality) + return; + + for (auto& lambda : v0s) { // selecting photons from Sigma0 - if(TMath::Abs(lambda.eta())>0.5) continue; + if (TMath::Abs(lambda.eta()) > 0.5) + continue; - if(TMath::Abs(lambda.mLambda()-1.115683)<0.01 && lambda.v0cosPA() > minCosPA){ + if (TMath::Abs(lambda.mLambda() - 1.115683) < 0.01 && lambda.v0cosPA() > minCosPA) { histos.fill(HIST("hPositiveStatus"), 0.0f); - if(lambda.posTOFSignal()>1e-5 && lambda.posTOFEventTime()<0.0f) histos.fill(HIST("hPositiveStatus"), 1.0f); - if(lambda.posTOFSignal()<0.0f && lambda.posTOFEventTime()>1e-5) histos.fill(HIST("hPositiveStatus"), 2.0f); - if(lambda.posTOFSignal()>1e-5 && lambda.posTOFEventTime()>1e-5) histos.fill(HIST("hPositiveStatus"), 3.0f); + if (lambda.posTOFSignal() > 1e-5 && lambda.posTOFEventTime() < 0.0f) + histos.fill(HIST("hPositiveStatus"), 1.0f); + if (lambda.posTOFSignal() < 0.0f && lambda.posTOFEventTime() > 1e-5) + histos.fill(HIST("hPositiveStatus"), 2.0f); + if (lambda.posTOFSignal() > 1e-5 && lambda.posTOFEventTime() > 1e-5) + histos.fill(HIST("hPositiveStatus"), 3.0f); histos.fill(HIST("hNegativeStatus"), 0.0f); - if(lambda.negTOFSignal()>1e-5 && lambda.negTOFEventTime()<0.0f) histos.fill(HIST("hNegativeStatus"), 1.0f); - if(lambda.negTOFSignal()<0.0f && lambda.negTOFEventTime()>1e-5) histos.fill(HIST("hNegativeStatus"), 2.0f); - if(lambda.negTOFSignal()>1e-5 && lambda.negTOFEventTime()>1e-5) histos.fill(HIST("hNegativeStatus"), 3.0f); - - if(lambda.posTOFLength()>0.0f){ + if (lambda.negTOFSignal() > 1e-5 && lambda.negTOFEventTime() < 0.0f) + histos.fill(HIST("hNegativeStatus"), 1.0f); + if (lambda.negTOFSignal() < 0.0f && lambda.negTOFEventTime() > 1e-5) + histos.fill(HIST("hNegativeStatus"), 2.0f); + if (lambda.negTOFSignal() > 1e-5 && lambda.negTOFEventTime() > 1e-5) + histos.fill(HIST("hNegativeStatus"), 3.0f); + + if (lambda.posTOFLength() > 0.0f) { histos.fill(HIST("hPositiveStatusReachedTOF"), 0.0f); - if(lambda.posTOFSignal()>1e-5 && lambda.posTOFEventTime()<0.0f) histos.fill(HIST("hPositiveStatusReachedTOF"), 1.0f); - if(lambda.posTOFSignal()<0.0f && lambda.posTOFEventTime()>1e-5) histos.fill(HIST("hPositiveStatusReachedTOF"), 2.0f); - if(lambda.posTOFSignal()>1e-5 && lambda.posTOFEventTime()>1e-5) histos.fill(HIST("hPositiveStatusReachedTOF"), 3.0f); + if (lambda.posTOFSignal() > 1e-5 && lambda.posTOFEventTime() < 0.0f) + histos.fill(HIST("hPositiveStatusReachedTOF"), 1.0f); + if (lambda.posTOFSignal() < 0.0f && lambda.posTOFEventTime() > 1e-5) + histos.fill(HIST("hPositiveStatusReachedTOF"), 2.0f); + if (lambda.posTOFSignal() > 1e-5 && lambda.posTOFEventTime() > 1e-5) + histos.fill(HIST("hPositiveStatusReachedTOF"), 3.0f); } - if(lambda.negTOFLength()>0.0f){ + if (lambda.negTOFLength() > 0.0f) { histos.fill(HIST("hNegativeStatusReachedTOF"), 0.0f); - if(lambda.negTOFSignal()>1e-5 && lambda.negTOFEventTime()<0.0f) histos.fill(HIST("hNegativeStatusReachedTOF"), 1.0f); - if(lambda.negTOFSignal()<0.0f && lambda.negTOFEventTime()>1e-5) histos.fill(HIST("hNegativeStatusReachedTOF"), 2.0f); - if(lambda.negTOFSignal()>1e-5 && lambda.negTOFEventTime()>1e-5) histos.fill(HIST("hNegativeStatusReachedTOF"), 3.0f); + if (lambda.negTOFSignal() > 1e-5 && lambda.negTOFEventTime() < 0.0f) + histos.fill(HIST("hNegativeStatusReachedTOF"), 1.0f); + if (lambda.negTOFSignal() < 0.0f && lambda.negTOFEventTime() > 1e-5) + histos.fill(HIST("hNegativeStatusReachedTOF"), 2.0f); + if (lambda.negTOFSignal() > 1e-5 && lambda.negTOFEventTime() > 1e-5) + histos.fill(HIST("hNegativeStatusReachedTOF"), 3.0f); } // properties of the positive and negative prongs / debug @@ -255,34 +268,39 @@ struct strangepidqa{ histos.fill(HIST("h2dLambdaMassVsTOFCut"), lambda.mLambda(), TMath::Abs(lambda.posTOFDeltaTLaPr())); histos.fill(HIST("h2dLambdaMassVsTOFCutMeson"), lambda.mLambda(), TMath::Abs(lambda.negTOFDeltaTLaPi())); - if(lambda.v0radius() minCosPA){ + if (TMath::Abs(lambda.mLambda() - 1.115683) < 0.01 && lambda.v0cosPA() > minCosPA) { histos.fill(HIST("h2dLambdaDeltaDecayTime_MassSelected"), lambda.pt(), lambda.deltaDecayTimeLambda()); } - if(lambda.posTOFEventTime()<0 && requireTOFEventTimeProton) continue; - if(lambda.negTOFEventTime()<0 && requireTOFEventTimePion) continue; + if (lambda.posTOFEventTime() < 0 && requireTOFEventTimeProton) + continue; + if (lambda.negTOFEventTime() < 0 && requireTOFEventTimePion) + continue; histos.fill(HIST("h2dLambdaMassVsTOFCutWithSignals"), lambda.mLambda(), TMath::Abs(lambda.posTOFDeltaTLaPr())); histos.fill(HIST("h2dLambdaMassVsTOFCutMesonWithSignals"), lambda.mLambda(), TMath::Abs(lambda.negTOFDeltaTLaPi())); - if(lambda.pt()>minPtV0 && lambda.pt() < maxPtV0) + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass"), lambda.mLambda()); - + histos.fill(HIST("h2dLambdaRadiusVsPt"), lambda.pt(), lambda.v0radius()); histos.fill(HIST("h2dLambdaMassVsPt"), lambda.pt(), lambda.mLambda()); - + histos.fill(HIST("h2dProtonDeltaTimeVsPt"), lambda.pt(), lambda.posTOFDeltaTLaPr()); histos.fill(HIST("h2dProtonDeltaTimeVsRadius"), lambda.v0radius(), lambda.posTOFDeltaTLaPr()); histos.fill(HIST("h2dPionDeltaTimeVsPt"), lambda.pt(), lambda.negTOFDeltaTLaPi()); histos.fill(HIST("h2dPionDeltaTimeVsRadius"), lambda.v0radius(), lambda.negTOFDeltaTLaPi()); histos.fill(HIST("h2dLambdaBeta"), lambda.p(), lambda.tofBetaLambda()); - if(TMath::Abs(lambda.mLambda()-1.115683)<0.01 && lambda.v0cosPA() > minCosPA){ + if (TMath::Abs(lambda.mLambda() - 1.115683) < 0.01 && lambda.v0cosPA() > minCosPA) { histos.fill(HIST("h2dProtonDeltaTimeVsPt_MassSelected"), lambda.pt(), lambda.posTOFDeltaTLaPr()); histos.fill(HIST("h2dProtonDeltaTimeVsRadius_MassSelected"), lambda.v0radius(), lambda.posTOFDeltaTLaPr()); histos.fill(HIST("h2dPionDeltaTimeVsPt_MassSelected"), lambda.pt(), lambda.negTOFDeltaTLaPi()); @@ -297,64 +315,74 @@ struct strangepidqa{ histos.fill(HIST("h2dPionLengthVsLengthToPV"), lambda.negTOFLengthToPV(), lambda.negTOFLength()); // Standard selection of time - if(TMath::Abs(lambda.deltaDecayTimeLambda())minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_DeltaDecayTime"), lambda.mLambda()); + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_DeltaDecayTime"), lambda.mLambda()); } - if(TMath::Abs(lambda.posTOFDeltaTLaPr())minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_ProtonTOF"), lambda.mLambda()); + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_ProtonTOF"), lambda.mLambda()); } - if(TMath::Abs(lambda.negTOFDeltaTLaPi())minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_PionTOF"), lambda.mLambda()); - if(TMath::Abs(lambda.posTOFDeltaTLaPr()) minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_PionTOF"), lambda.mLambda()); + if (TMath::Abs(lambda.posTOFDeltaTLaPr()) < maxDeltaTimeProton) { histos.fill(HIST("h2dLambdaMassVsPt_AllTOF"), lambda.pt(), lambda.mLambda()); - if(lambda.pt()>minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_AllTOF"), lambda.mLambda()); + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_AllTOF"), lambda.mLambda()); } } - // Inversion of time selection for debug - // if(TMath::Abs(lambda.deltaDecayTimeLambda())>maxDeltaTimeDecay && TMath::Abs(lambda.deltaDecayTimeLambda()) < 5e+4){ + // Inversion of time selection for debug + // if(TMath::Abs(lambda.deltaDecayTimeLambda())>maxDeltaTimeDecay && TMath::Abs(lambda.deltaDecayTimeLambda()) < 5e+4){ // histos.fill(HIST("h2dLambdaMassVsPt_DeltaDecayTime"), lambda.pt(), lambda.mLambda()); // if(lambda.pt()>minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_DeltaDecayTime"), lambda.mLambda()); // } - if(TMath::Abs(lambda.posTOFDeltaTLaPr())>maxDeltaTimeProton && TMath::Abs(lambda.posTOFDeltaTLaPr()) < 5e+4){ + if (TMath::Abs(lambda.posTOFDeltaTLaPr()) > maxDeltaTimeProton && TMath::Abs(lambda.posTOFDeltaTLaPr()) < 5e+4) { histos.fill(HIST("h2dLambdaMassVsPt_InvertProtonTOF"), lambda.pt(), lambda.mLambda()); - if(lambda.pt()>minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_InvertProtonTOF"), lambda.mLambda()); + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_InvertProtonTOF"), lambda.mLambda()); } - if(TMath::Abs(lambda.negTOFDeltaTLaPi())>maxDeltaTimeProton && TMath::Abs(lambda.negTOFDeltaTLaPi()) < 5e+4){ + if (TMath::Abs(lambda.negTOFDeltaTLaPi()) > maxDeltaTimeProton && TMath::Abs(lambda.negTOFDeltaTLaPi()) < 5e+4) { histos.fill(HIST("h2dLambdaMassVsPt_InvertPionTOF"), lambda.pt(), lambda.mLambda()); - if(lambda.pt()>minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_InvertPionTOF"), lambda.mLambda()); - if(TMath::Abs(lambda.posTOFDeltaTLaPr())>maxDeltaTimeProton && TMath::Abs(lambda.posTOFDeltaTLaPr()) < 5e+4){ + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_InvertPionTOF"), lambda.mLambda()); + if (TMath::Abs(lambda.posTOFDeltaTLaPr()) > maxDeltaTimeProton && TMath::Abs(lambda.posTOFDeltaTLaPr()) < 5e+4) { histos.fill(HIST("h2dLambdaMassVsPt_InvertAllTOF"), lambda.pt(), lambda.mLambda()); - if(lambda.pt()>minPtV0 && lambda.pt() < maxPtV0) histos.fill(HIST("hLambdaMass_InvertAllTOF"), lambda.mLambda()); + if (lambda.pt() > minPtV0 && lambda.pt() < maxPtV0) + histos.fill(HIST("hLambdaMass_InvertAllTOF"), lambda.mLambda()); } } - } } - void processSim(aod::StraCollision const& coll, soa::Join const& v0s) + void processSim(aod::StraCollision const& coll, soa::Join const& v0s) { - for (auto& lambda: v0s) { // selecting photons from Sigma0 - if (lambda.pdgCode()!=3122) continue; - if (!lambda.isPhysicalPrimary()) continue; - if (lambda.pdgCodePositive()!=2212) continue; - if (lambda.pdgCodeNegative()!=-211) continue; + for (auto& lambda : v0s) { // selecting photons from Sigma0 + if (lambda.pdgCode() != 3122) + continue; + if (!lambda.isPhysicalPrimary()) + continue; + if (lambda.pdgCodePositive() != 2212) + continue; + if (lambda.pdgCodeNegative() != -211) + continue; histos.fill(HIST("hAssocLambdaMass"), lambda.mLambda()); - if (TMath::Abs(lambda.negTOFDeltaTLaPi())>800){ - histos.fill(HIST("hAssocLambdaMassGoodTime"), lambda.mLambda()); - }else{ + if (TMath::Abs(lambda.negTOFDeltaTLaPi()) > 800) { + histos.fill(HIST("hAssocLambdaMassGoodTime"), lambda.mLambda()); + } else { histos.fill(HIST("hAssocLambdaMassBadTime"), lambda.mLambda()); } - + histos.fill(HIST("h2dAssocLambdaRadiusVsPt"), lambda.pt(), lambda.v0radius()); histos.fill(HIST("h2dAssocLambdaMassVsPt"), lambda.pt(), lambda.mLambda()); - + histos.fill(HIST("h2dAssocProtonDeltaTimeVsPt"), lambda.pt(), lambda.posTOFDeltaTLaPr()); histos.fill(HIST("h2dAssocProtonDeltaTimeVsRadius"), lambda.v0radius(), lambda.posTOFDeltaTLaPr()); histos.fill(HIST("h2dAssocPionDeltaTimeVsPt"), lambda.pt(), lambda.negTOFDeltaTLaPi()); @@ -366,11 +394,11 @@ struct strangepidqa{ histos.fill(HIST("h2dAssocProtonLengthVsLengthToPV"), lambda.posTOFLengthToPV(), lambda.posTOFLength()); histos.fill(HIST("h2dAssocPionLengthVsLengthToPV"), lambda.negTOFLengthToPV(), lambda.negTOFLength()); - // delta lambda decay time + // delta lambda decay time histos.fill(HIST("h2dAssocLambdaDeltaDecayTime"), lambda.pt(), lambda.deltaDecayTimeLambda()); } } - + PROCESS_SWITCH(strangepidqa, processReal, "Produce real information", true); PROCESS_SWITCH(strangepidqa, processSim, "Produce simulated information", true); }; @@ -378,7 +406,4 @@ struct strangepidqa{ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; - } - -