diff --git a/PWGLF/DataModel/LFStrangenessTables.h b/PWGLF/DataModel/LFStrangenessTables.h index f2ed550228e..40ad9d5829a 100644 --- a/PWGLF/DataModel/LFStrangenessTables.h +++ b/PWGLF/DataModel/LFStrangenessTables.h @@ -16,6 +16,7 @@ #include "Common/Core/RecoDecay.h" #include "CommonConstants/PhysicsConstants.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/Qvectors.h" @@ -30,6 +31,8 @@ DECLARE_SOA_TABLE(StraCollisions, "AOD", "STRACOLLISION", //! basic collision pr DECLARE_SOA_TABLE(StraCents, "AOD", "STRACENTS", //! centrality percentiles cent::CentFT0M, cent::CentFT0A, cent::CentFT0C, cent::CentFV0A); +DECLARE_SOA_TABLE(StraRawCents, "AOD", "STRARAWCENTS", //! debug information + mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, mult::MultNTracksPVeta1); DECLARE_SOA_TABLE(StraEvSels, "AOD", "STRAEVSELS", //! event selection: sel8 evsel::Sel8); DECLARE_SOA_TABLE(StraFT0AQVs, "AOD", "STRAFT0AQVS", //! t0a Qvec diff --git a/PWGLF/TableProducer/strangederivedbuilder.cxx b/PWGLF/TableProducer/strangederivedbuilder.cxx index 537b5e429b6..fb3b01c3e13 100644 --- a/PWGLF/TableProducer/strangederivedbuilder.cxx +++ b/PWGLF/TableProducer/strangederivedbuilder.cxx @@ -65,6 +65,7 @@ struct strangederivedbuilder { // fundamental building blocks of derived data Produces strangeColl; // characterises collisions Produces strangeCents; // characterises collisions / centrality + Produces strangeRawCents; // characterises collisions / centrality Produces strangeEvSels; // characterises collisions / sel8 selection Produces strangeStamps; // provides timestamps, run numbers Produces v0collref; // references collisions from V0s @@ -138,6 +139,11 @@ struct strangederivedbuilder { Configurable roundNSigmaVariables{"roundNSigmaVariables", false, "round NSigma variables"}; Configurable precisionNSigmas{"precisionNSigmas", 0.1f, "precision to keep NSigmas"}; + Configurable fillRawFT0A{"fillRawFT0A", false, "Fill raw FT0A information for debug"}; + Configurable fillRawFT0C{"fillRawFT0C", true, "Fill raw FT0C information for debug"}; + Configurable fillRawFV0A{"fillRawFV0A", false, "Fill raw FV0A information for debug"}; + Configurable fillRawNTracksEta1{"fillRawNTracksEta1", true, "Fill raw NTracks |eta|<1 information for debug"}; + // For manual sliceBy Preslice V0perCollision = o2::aod::v0data::collisionId; Preslice CascperCollision = o2::aod::cascdata::collisionId; @@ -176,7 +182,7 @@ struct strangederivedbuilder { histos.add("h2dNVerticesVsCentrality", "h2dNVerticesVsCentrality", kTH2D, {axisCentrality, axisNVertices}); } - void processCollisionsV0sOnly(soa::Join const& collisions, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&) + void processCollisionsV0sOnly(soa::Join const& collisions, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&) { for (const auto& collision : collisions) { const uint64_t collIdx = collision.globalIndex(); @@ -190,13 +196,20 @@ struct strangederivedbuilder { strangeEvSels(collision.sel8()); auto bc = collision.bc_as(); strangeStamps(bc.runNumber(), bc.timestamp()); + + if (fillRawFT0C || fillRawFT0C || fillRawFV0A || fillRawNTracksEta1) { + strangeRawCents(collision.multFT0A() * static_cast(fillRawFT0A), + collision.multFT0C() * static_cast(fillRawFT0C), + collision.multFT0A() * static_cast(fillRawFV0A), + collision.multNTracksPVeta1() * static_cast(fillRawNTracksEta1)); + } } for (int i = 0; i < V0Table_thisColl.size(); i++) v0collref(strangeColl.lastIndex()); } } - void processCollisions(soa::Join const& collisions, aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, aod::BCsWithTimestamps const&) + void processCollisions(soa::Join const& collisions, aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, aod::BCsWithTimestamps const&) { for (const auto& collision : collisions) { const uint64_t collIdx = collision.globalIndex(); @@ -216,6 +229,13 @@ struct strangederivedbuilder { strangeEvSels(collision.sel8()); auto bc = collision.bc_as(); strangeStamps(bc.runNumber(), bc.timestamp()); + + if (fillRawFT0C || fillRawFT0C || fillRawFV0A || fillRawNTracksEta1) { + strangeRawCents(collision.multFT0A() * static_cast(fillRawFT0A), + collision.multFT0C() * static_cast(fillRawFT0C), + collision.multFT0A() * static_cast(fillRawFV0A), + collision.multNTracksPVeta1() * static_cast(fillRawNTracksEta1)); + } } for (int i = 0; i < V0Table_thisColl.size(); i++) v0collref(strangeColl.lastIndex()); diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 11ebfba7f2e..7e70ac564b9 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -9,15 +9,16 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // -// Example V0 analysis task -// ======================== +// V0 analysis task +// ================ // -// This code loops over a V0Data table and produces some +// This code loops over a V0Cores table and produces some // standard analysis output. It is meant to be run over // derived data. // // Comments, questions, complaints, suggestions? // Please write to: +// romain.schotter@cern.ch // david.dobrigkeit.chinellato@cern.ch // #include "Framework/runDataProcessing.h" @@ -32,6 +33,7 @@ #include "Common/Core/TrackSelection.h" #include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/PIDResponse.h" @@ -63,6 +65,11 @@ using v0MCCandidates = soa::Join analyseK0Short{"analyseK0Short", true, "process K0Short-like candidates"}; + Configurable analyseLambda{"analyseLambda", true, "process Lambda-like candidates"}; + Configurable analyseAntiLambda{"analyseAntiLambda", true, "process AntiLambda-like candidates"}; + // Selection criteria: acceptance Configurable rapidityCut{"rapidityCut", 0.5, "rapidity"}; Configurable daughterEtaCut{"daughterEtaCut", 0.8, "max eta for daughters"}; @@ -171,9 +178,12 @@ struct derivedlambdakzeroanalysis { histos.add("hEventCentrality", "hEventCentrality", kTH1F, {{100, 0.0f, +100.0f}}); // histograms versus mass - histos.add("h3dMassK0Short", "h3dMassK0Short", kTH3F, {axisCentrality, axisPt, axisK0Mass}); - histos.add("h3dMassLambda", "h3dMassLambda", kTH3F, {axisCentrality, axisPt, axisLambdaMass}); - histos.add("h3dMassAntiLambda", "h3dMassAntiLambda", kTH3F, {axisCentrality, axisPt, axisLambdaMass}); + if (analyseK0Short) + histos.add("h3dMassK0Short", "h3dMassK0Short", kTH3F, {axisCentrality, axisPt, axisK0Mass}); + if (analyseLambda) + histos.add("h3dMassLambda", "h3dMassLambda", kTH3F, {axisCentrality, axisPt, axisLambdaMass}); + if (analyseAntiLambda) + histos.add("h3dMassAntiLambda", "h3dMassAntiLambda", kTH3F, {axisCentrality, axisPt, axisLambdaMass}); // demo // fast histos.add("hMassK0Short", "hMassK0Short", kTH1F, {axisK0Mass}); @@ -181,20 +191,27 @@ struct derivedlambdakzeroanalysis { // QA histograms if requested if (doQA) { // initialize for K0short... - histos.add("K0Short/h4dPosDCAToPV", "h4dPosDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAtoPV}); - histos.add("K0Short/h4dNegDCAToPV", "h4dNegDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAtoPV}); - histos.add("K0Short/h4dDCADaughters", "h4dDCADaughters", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAdau}); - histos.add("K0Short/h4dPointingAngle", "h4dPointingAngle", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisPointingAngle}); - histos.add("K0Short/h4dV0Radius", "h4dV0Radius", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisV0Radius}); - - histos.add("Lambda/h4dPosDCAToPV", "h4dPosDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAtoPV}); - histos.add("Lambda/h4dNegDCAToPV", "h4dNegDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAtoPV}); - histos.add("Lambda/h4dDCADaughters", "h4dDCADaughters", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAdau}); - histos.add("Lambda/h4dPointingAngle", "h4dPointingAngle", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisPointingAngle}); - histos.add("Lambda/h4dV0Radius", "h4dV0Radius", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisV0Radius}); - - // identical axes for AntiLambda, please - histos.addClone("Lambda/", "AntiLambda/"); + if (analyseK0Short) { + histos.add("K0Short/h4dPosDCAToPV", "h4dPosDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAtoPV}); + histos.add("K0Short/h4dNegDCAToPV", "h4dNegDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAtoPV}); + histos.add("K0Short/h4dDCADaughters", "h4dDCADaughters", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisDCAdau}); + histos.add("K0Short/h4dPointingAngle", "h4dPointingAngle", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisPointingAngle}); + histos.add("K0Short/h4dV0Radius", "h4dV0Radius", kTHnF, {axisCentrality, axisPtCoarse, axisK0Mass, axisV0Radius}); + } + if (analyseLambda) { + histos.add("Lambda/h4dPosDCAToPV", "h4dPosDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAtoPV}); + histos.add("Lambda/h4dNegDCAToPV", "h4dNegDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAtoPV}); + histos.add("Lambda/h4dDCADaughters", "h4dDCADaughters", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAdau}); + histos.add("Lambda/h4dPointingAngle", "h4dPointingAngle", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisPointingAngle}); + histos.add("Lambda/h4dV0Radius", "h4dV0Radius", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisV0Radius}); + } + if (analyseAntiLambda) { + histos.add("AntiLambda/h4dPosDCAToPV", "h4dPosDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAtoPV}); + histos.add("AntiLambda/h4dNegDCAToPV", "h4dNegDCAToPV", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAtoPV}); + histos.add("AntiLambda/h4dDCADaughters", "h4dDCADaughters", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisDCAdau}); + histos.add("AntiLambda/h4dPointingAngle", "h4dPointingAngle", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisPointingAngle}); + histos.add("AntiLambda/h4dV0Radius", "h4dV0Radius", kTHnF, {axisCentrality, axisPtCoarse, axisLambdaMass, axisV0Radius}); + } // Check if doing the right thing in AP space please histos.add("GeneralQA/h2dArmenterosAll", "h2dArmenterosAll", kTH2F, {axisAPAlpha, axisAPQt}); @@ -294,56 +311,58 @@ struct derivedlambdakzeroanalysis { { // __________________________________________ // main analysis - if (verifyMask(selMap, maskSelectionK0Short)) { + if (verifyMask(selMap, maskSelectionK0Short) && analyseK0Short) { histos.fill(HIST("GeneralQA/h2dArmenterosSelected"), v0.alpha(), v0.qtarm()); // cross-check histos.fill(HIST("h3dMassK0Short"), collision.centFT0C(), v0.pt(), v0.mK0Short()); histos.fill(HIST("hMassK0Short"), v0.mK0Short()); } - if (verifyMask(selMap, maskSelectionLambda)) { + if (verifyMask(selMap, maskSelectionLambda) && analyseLambda) { histos.fill(HIST("h3dMassLambda"), collision.centFT0C(), v0.pt(), v0.mLambda()); } - if (verifyMask(selMap, maskSelectionAntiLambda)) { + if (verifyMask(selMap, maskSelectionAntiLambda) && analyseAntiLambda) { histos.fill(HIST("h3dMassAntiLambda"), collision.centFT0C(), v0.pt(), v0.mAntiLambda()); } // __________________________________________ // do systematics / qa plots if (doQA) { - // K0 systematic sweep block - if (verifyMask(selMap, maskTopoNoV0Radius | maskK0ShortSpecific)) - histos.fill(HIST("K0Short/h4dV0Radius"), collision.centFT0C(), v0.pt(), v0.mK0Short(), v0.v0radius()); - if (verifyMask(selMap, maskTopoNoDCAPosToPV | maskK0ShortSpecific)) - histos.fill(HIST("K0Short/h4dPosDCAToPV"), collision.centFT0C(), v0.pt(), v0.mK0Short(), TMath::Abs(v0.dcapostopv())); - if (verifyMask(selMap, maskTopoNoDCANegToPV | maskK0ShortSpecific)) - histos.fill(HIST("K0Short/h4dNegDCAToPV"), collision.centFT0C(), v0.pt(), v0.mK0Short(), TMath::Abs(v0.dcanegtopv())); - if (verifyMask(selMap, maskTopoNoCosPA | maskK0ShortSpecific)) - histos.fill(HIST("K0Short/h4dPointingAngle"), collision.centFT0C(), v0.pt(), v0.mK0Short(), TMath::ACos(v0.v0cosPA())); - if (verifyMask(selMap, maskTopoNoDCAV0Dau | maskK0ShortSpecific)) - histos.fill(HIST("K0Short/h4dDCADaughters"), collision.centFT0C(), v0.pt(), v0.mK0Short(), v0.dcaV0daughters()); - - // K0 systematic sweep block - if (verifyMask(selMap, maskTopoNoV0Radius | maskLambdaSpecific)) - histos.fill(HIST("Lambda/h4dV0Radius"), collision.centFT0C(), v0.pt(), v0.mLambda(), v0.v0radius()); - if (verifyMask(selMap, maskTopoNoDCAPosToPV | maskLambdaSpecific)) - histos.fill(HIST("Lambda/h4dPosDCAToPV"), collision.centFT0C(), v0.pt(), v0.mLambda(), TMath::Abs(v0.dcapostopv())); - if (verifyMask(selMap, maskTopoNoDCANegToPV | maskLambdaSpecific)) - histos.fill(HIST("Lambda/h4dNegDCAToPV"), collision.centFT0C(), v0.pt(), v0.mLambda(), TMath::Abs(v0.dcanegtopv())); - if (verifyMask(selMap, maskTopoNoCosPA | maskLambdaSpecific)) - histos.fill(HIST("Lambda/h4dPointingAngle"), collision.centFT0C(), v0.pt(), v0.mLambda(), TMath::ACos(v0.v0cosPA())); - if (verifyMask(selMap, maskTopoNoDCAV0Dau | maskLambdaSpecific)) - histos.fill(HIST("Lambda/h4dDCADaughters"), collision.centFT0C(), v0.pt(), v0.mLambda(), v0.dcaV0daughters()); - - // K0 systematic sweep block - if (verifyMask(selMap, maskTopoNoV0Radius | maskAntiLambdaSpecific)) - histos.fill(HIST("AntiLambda/h4dV0Radius"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), v0.v0radius()); - if (verifyMask(selMap, maskTopoNoDCAPosToPV | maskAntiLambdaSpecific)) - histos.fill(HIST("AntiLambda/h4dPosDCAToPV"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), TMath::Abs(v0.dcapostopv())); - if (verifyMask(selMap, maskTopoNoDCANegToPV | maskAntiLambdaSpecific)) - histos.fill(HIST("AntiLambda/h4dNegDCAToPV"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), TMath::Abs(v0.dcanegtopv())); - if (verifyMask(selMap, maskTopoNoCosPA | maskAntiLambdaSpecific)) - histos.fill(HIST("AntiLambda/h4dPointingAngle"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), TMath::ACos(v0.v0cosPA())); - if (verifyMask(selMap, maskTopoNoDCAV0Dau | maskAntiLambdaSpecific)) - histos.fill(HIST("AntiLambda/h4dDCADaughters"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), v0.dcaV0daughters()); + if (analyseK0Short) { + if (verifyMask(selMap, maskTopoNoV0Radius | maskK0ShortSpecific)) + histos.fill(HIST("K0Short/h4dV0Radius"), collision.centFT0C(), v0.pt(), v0.mK0Short(), v0.v0radius()); + if (verifyMask(selMap, maskTopoNoDCAPosToPV | maskK0ShortSpecific)) + histos.fill(HIST("K0Short/h4dPosDCAToPV"), collision.centFT0C(), v0.pt(), v0.mK0Short(), TMath::Abs(v0.dcapostopv())); + if (verifyMask(selMap, maskTopoNoDCANegToPV | maskK0ShortSpecific)) + histos.fill(HIST("K0Short/h4dNegDCAToPV"), collision.centFT0C(), v0.pt(), v0.mK0Short(), TMath::Abs(v0.dcanegtopv())); + if (verifyMask(selMap, maskTopoNoCosPA | maskK0ShortSpecific)) + histos.fill(HIST("K0Short/h4dPointingAngle"), collision.centFT0C(), v0.pt(), v0.mK0Short(), TMath::ACos(v0.v0cosPA())); + if (verifyMask(selMap, maskTopoNoDCAV0Dau | maskK0ShortSpecific)) + histos.fill(HIST("K0Short/h4dDCADaughters"), collision.centFT0C(), v0.pt(), v0.mK0Short(), v0.dcaV0daughters()); + } + + if (analyseLambda) { + if (verifyMask(selMap, maskTopoNoV0Radius | maskLambdaSpecific)) + histos.fill(HIST("Lambda/h4dV0Radius"), collision.centFT0C(), v0.pt(), v0.mLambda(), v0.v0radius()); + if (verifyMask(selMap, maskTopoNoDCAPosToPV | maskLambdaSpecific)) + histos.fill(HIST("Lambda/h4dPosDCAToPV"), collision.centFT0C(), v0.pt(), v0.mLambda(), TMath::Abs(v0.dcapostopv())); + if (verifyMask(selMap, maskTopoNoDCANegToPV | maskLambdaSpecific)) + histos.fill(HIST("Lambda/h4dNegDCAToPV"), collision.centFT0C(), v0.pt(), v0.mLambda(), TMath::Abs(v0.dcanegtopv())); + if (verifyMask(selMap, maskTopoNoCosPA | maskLambdaSpecific)) + histos.fill(HIST("Lambda/h4dPointingAngle"), collision.centFT0C(), v0.pt(), v0.mLambda(), TMath::ACos(v0.v0cosPA())); + if (verifyMask(selMap, maskTopoNoDCAV0Dau | maskLambdaSpecific)) + histos.fill(HIST("Lambda/h4dDCADaughters"), collision.centFT0C(), v0.pt(), v0.mLambda(), v0.dcaV0daughters()); + } + if (analyseAntiLambda) { + if (verifyMask(selMap, maskTopoNoV0Radius | maskAntiLambdaSpecific)) + histos.fill(HIST("AntiLambda/h4dV0Radius"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), v0.v0radius()); + if (verifyMask(selMap, maskTopoNoDCAPosToPV | maskAntiLambdaSpecific)) + histos.fill(HIST("AntiLambda/h4dPosDCAToPV"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), TMath::Abs(v0.dcapostopv())); + if (verifyMask(selMap, maskTopoNoDCANegToPV | maskAntiLambdaSpecific)) + histos.fill(HIST("AntiLambda/h4dNegDCAToPV"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), TMath::Abs(v0.dcanegtopv())); + if (verifyMask(selMap, maskTopoNoCosPA | maskAntiLambdaSpecific)) + histos.fill(HIST("AntiLambda/h4dPointingAngle"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), TMath::ACos(v0.v0cosPA())); + if (verifyMask(selMap, maskTopoNoDCAV0Dau | maskAntiLambdaSpecific)) + histos.fill(HIST("AntiLambda/h4dDCADaughters"), collision.centFT0C(), v0.pt(), v0.mAntiLambda(), v0.dcaV0daughters()); + } } // end systematics / qa }