From 8979c392a6f73d31d715f2e350c0ea346738d899 Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Sat, 24 Sep 2022 01:56:28 +0530 Subject: [PATCH 1/9] first 1d pion analysis added --- .../FemtoWorld/DataModel/FemtoWorldDerived.h | 6 + .../TableProducer/femtoWorldProducerTask.cxx | 28 ++ PWGCF/FemtoWorld/Tasks/CMakeLists.txt | 5 + .../femtoWorldPionPairTaskTrackTrack.cxx | 388 ++++++++++++++++++ 4 files changed, 427 insertions(+) create mode 100644 PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx diff --git a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h index f536077ce95..81ef0410aa9 100644 --- a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h +++ b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h @@ -107,6 +107,8 @@ DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, uint8_t); DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! Number of TPC crossed rows DECLARE_SOA_COLUMN(TPCNSigmaKaon, tpcNSigmaKaon, float); //! TPCNSigmaKaon DECLARE_SOA_COLUMN(TOFNSigmaKaon, tofNSigmaKaon, float); //! TOFNSigmaKaon +DECLARE_SOA_COLUMN(TPCNSigmaPion,tpcNSigmaPion,float); //! TPCNSigmaPion +DECLARE_SOA_COLUMN(TOFNSigmaPion,tofNSigmaPion,float); //! TOFNSigmaPion DECLARE_SOA_COLUMN(ITSNCls, itsNCls, uint8_t); //! Number of ITS clusters DECLARE_SOA_COLUMN(ITSNClsInnerBarrel, itsNClsInnerBarrel, uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal DECLARE_SOA_DYNAMIC_COLUMN(TPCCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over findable TPC clusters @@ -120,6 +122,7 @@ DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon +DECLARE_SOA_COLUMN(MPion, mPion, float); //! The invariant mass of V0 candidate, assuming pion } // namespace femtoworldparticle @@ -148,6 +151,8 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", femtoworldparticle::TPCChi2NCl, femtoworldparticle::TPCNSigmaKaon, femtoworldparticle::TOFNSigmaKaon, + femtoworldparticle::TPCNSigmaPion, + femtoworldparticle::TOFNSigmaPion, femtoworldparticle::TPCNClsFound, track::TPCNClsFindable, femtoworldparticle::TPCNClsCrossedRows, @@ -174,6 +179,7 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", femtoworldparticle::DecayVtxY, femtoworldparticle::DecayVtxZ, femtoworldparticle::MKaon, + femtoworldparticle::MPion, femtoworldparticle::TPCCrossedRowsOverFindableCls, pidtpc_tiny::TPCNSigmaEl, pidtpc_tiny::TPCNSigmaPi, diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 0dabb80c819..75f872004ee 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -152,9 +152,14 @@ struct femtoWorldProducerTask { Configurable ConfInvMassUpLimit{"ConfInvMassUpLimit", 1.035, "Upper limit of the V0 invariant mass"}; Configurable ConfRejectKaons{"ConfRejectKaons", false, "Switch to reject kaons"}; + Configurable ConfRejectPions{"ConfRejectPions", false, "Switch to reject pions"}; + Configurable ConfInvKaonMassLowLimit{"ConfInvKaonMassLowLimit", 0.48, "Lower limit of the V0 invariant mass for Kaon rejection"}; Configurable ConfInvKaonMassUpLimit{"ConfInvKaonMassUpLimit", 0.515, "Upper limit of the V0 invariant mass for Kaon rejection"}; + Configurable ConfInvPionMassLowLimit{"ConfInvPionMassLowLimit", 0.12, "Lower limit of the V0 invariant mass for Pion rejection"}; + Configurable ConfInvPionMassUpLimit{"ConfInvPionMassUpLimit", 0.14, "Upper limit of the V0 invariant mass for Pion rejection"}; + // PHI Daughters (Kaons) Configurable ConfInvMassLowLimitPhi{"ConfInvMassLowLimitPhi", 1.011, "Lower limit of the Phi invariant mass"}; // change that to do invariant mass cut Configurable ConfInvMassUpLimitPhi{"ConfInvMassUpLimitPhi", 1.027, "Upper limit of the Phi invariant mass"}; @@ -273,6 +278,8 @@ struct femtoWorldProducerTask { if (ConfRejectKaons) { v0Cuts.setKaonInvMassLimits(ConfInvKaonMassLowLimit, ConfInvKaonMassUpLimit); } + // ! todo similar action for pions + if (ConfRejectITSHitandTOFMissing) { o2PhysicsTrackSelection = new TrackSelection(getGlobalTrackSelection()); o2PhysicsTrackSelection->SetRequireHitsInITSLayers(1, {0, 1, 2, 3}); @@ -458,6 +465,8 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), + track.tpcNSigmaPi(), + track.tofNSigmaPi(), (uint8_t)track.tpcNClsFound(), track.tpcNClsFindable(), (uint8_t)track.tpcNClsCrossedRows(), @@ -483,6 +492,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); tmpIDtrack.push_back(track.globalIndex()); } @@ -534,6 +544,8 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), + postrack.tpcNSigmaPi(), + postrack.tofNSigmaPi(), (uint8_t)postrack.tpcNClsFound(), postrack.tpcNClsFindable(), (uint8_t)postrack.tpcNClsCrossedRows(), @@ -559,6 +571,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); const int rowOfPosTrack = outputParts.lastIndex(); int negtrackID = v0.negTrackId(); @@ -585,6 +598,8 @@ struct femtoWorldProducerTask { negtrack.tpcChi2NCl(), negtrack.tpcNSigmaKa(), negtrack.tofNSigmaKa(), + negtrack.tpcNSigmaPi(), + negtrack.tofNSigmaPi(), (uint8_t)negtrack.tpcNClsFound(), negtrack.tpcNClsFindable(), (uint8_t)negtrack.tpcNClsCrossedRows(), @@ -610,6 +625,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); const int rowOfNegTrack = outputParts.lastIndex(); int indexChildID[2] = {rowOfPosTrack, rowOfNegTrack}; @@ -632,6 +648,8 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), + postrack.tpcNSigmaPi(), + postrack.tofNSigmaPi(), (uint8_t)postrack.tpcNClsFound(), postrack.tpcNClsFindable(), (uint8_t)postrack.tpcNClsCrossedRows(), @@ -657,6 +675,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); } } @@ -732,6 +751,8 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), + p1.tpcNSigmaPi(), + p1.tofNSigmaPi(), (uint8_t)p1.tpcNClsFound(), p1.tpcNClsFindable(), (uint8_t)p1.tpcNClsCrossedRows(), @@ -757,6 +778,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); const int rowOfPosTrack = outputParts.lastIndex(); int negtrackID = p2.globalIndex(); @@ -783,6 +805,8 @@ struct femtoWorldProducerTask { p2.tpcChi2NCl(), p2.tpcNSigmaKa(), p2.tofNSigmaKa(), + p2.tpcNSigmaPi(), + p2.tofNSigmaPi(), (uint8_t)p2.tpcNClsFound(), p2.tpcNClsFindable(), (uint8_t)p2.tpcNClsCrossedRows(), @@ -808,6 +832,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); const int rowOfNegTrack = outputParts.lastIndex(); @@ -837,6 +862,8 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), + p1.tpcNSigmaPi(), + p1.tofNSigmaPi(), (uint8_t)p1.tpcNClsFound(), 0, // p1.tpcNClsFindable(), 0, //(uint8_t)p1.tpcNClsCrossedRows(), @@ -862,6 +889,7 @@ struct femtoWorldProducerTask { -999., -999., -999., + -999., -999.); } } diff --git a/PWGCF/FemtoWorld/Tasks/CMakeLists.txt b/PWGCF/FemtoWorld/Tasks/CMakeLists.txt index 30f7e2d471f..107a18c14a4 100644 --- a/PWGCF/FemtoWorld/Tasks/CMakeLists.txt +++ b/PWGCF/FemtoWorld/Tasks/CMakeLists.txt @@ -17,4 +17,9 @@ o2physics_add_dpl_workflow(femto-world-pair-track-track o2physics_add_dpl_workflow(femto-world-pair-track-phi SOURCES femtoWorldPairTaskTrackPhi.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(femto-world-pion-pair-track-track + SOURCES femtoWorldPionPairTaskTrackTrack.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) \ No newline at end of file diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx new file mode 100644 index 00000000000..c57bda6e066 --- /dev/null +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx @@ -0,0 +1,388 @@ +// 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 femtoWorldPairTaskTrackTrack.cxx +/// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de +/// \author Zuzanna Chochulska, WUT Warsaw, zchochul@cern.ch +/// \author Deependra Sharma, IITB, deependra.sharma@cern.ch + +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/StepTHn.h" + +#include "PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldContainer.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldUtils.h" + +using namespace o2; +using namespace o2::analysis::femtoWorld; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +namespace o2::aod +{ +// using FemtoWorldParticlesMerged = soa::Join; +using FemtoWorldParticlesMerged = aod::FemtoWorldParticles; +using FemtoWorldParticleMerged = FemtoWorldParticlesMerged::iterator; +} // namespace o2::aod + +struct femtoWorldPairTaskTrackTrack { + // for filling phi candidates table + // Produces outputCollision; + // Produces outputPhiCan; + // std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + /// Particle selection part + + // Configurables for cuts + // First particle + Configurable cfgPtLowPart1{"cfgPtLowPart1", 0.14, "Lower limit for Pt for the first particle"}; + Configurable cfgPtHighPart1{"cfgPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; + Configurable cfgEtaLowPart1{"cfgEtaLowPart1", -0.8, "Lower limit for Eta for the first particle"}; + Configurable cfgEtaHighPart1{"cfgEtaHighPart1", 0.8, "Higher limit for Eta for the first particle"}; + Configurable cfgDcaXYPart1{"cfgDcaXYPart1", 2.4, "Value for DCA_XY for the first particle"}; + Configurable cfgDcaZPart1{"cfgDcaZPart1", 3.2, "Value for DCA_Z for the first particle"}; + Configurable cfgTpcClPart1{"cfgTpcClPart1", 88, "Number of tpc clasters for the first particle"}; // min number of found TPC clusters + Configurable cfgTpcCrosRoPart1{"cfgTpcCrosRoPart1", 70, "Number of tpc crossed rows for the first particle"}; // min number of crossed rows + Configurable cfgChi2TpcPart1{"cfgChi2TpcPart1", 4.0, "Chi2 / cluster for the TPC track segment for the first particle"}; + Configurable cfgChi2ItsPart1{"cfgChi2ItsPart1", 36.0, "Chi2 / cluster for the ITS track segment for the first particle"}; + // Second particle + Configurable cfgPtLowPart2{"cfgPtLowPart2", 0.14, "Lower limit for Pt for the second particle"}; + Configurable cfgPtHighPart2{"cfgPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; + Configurable cfgEtaLowPart2{"cfgEtaLowPart2", -0.8, "Lower limit for Eta for the second particle"}; + Configurable cfgEtaHighPart2{"cfgEtaHighPart2", 0.8, "Higher limit for Eta for the second particle"}; + Configurable cfgDcaXYPart2{"cfgDcaXYPart2", 2.4, "Value for DCA_XY for the second particle"}; + Configurable cfgDcaZPart2{"cfgDcaZPart2", 3.2, "Value for DCA_Z for the second particle"}; + Configurable cfgTpcClPart2{"cfgTpcClPart2", 88, "Number of tpc clasters for the second particle"}; // min number of found TPC clusters + Configurable cfgTpcCrosRoPart2{"cfgTpcCrosRoPart2", 70, "Number of tpc crossed rows for the second particle"}; // min number of crossed rows + Configurable cfgChi2TpcPart2{"cfgChi2TpcPart2", 4.0, "Chi2 / cluster for the TPC track segment for the second particle"}; + Configurable cfgChi2ItsPart2{"cfgChi2ItsPart2", 36.0, "Chi2 / cluster for the ITS track segment for the second particle"}; + + /// Particle 1 Pi+ + Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 321, "Particle 1 - PDG code"}; + Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> + + /// Partition for particle 1 + Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts + && (o2::aod::track::dcaXY < cfgDcaXYPart1) && (o2::aod::track::dcaZ < cfgDcaZPart1) // DCA cuts for XY and Z + && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts + && (aod::femtoworldparticle::sign > int8_t(0)) // Sign (K+) + // todo: globaltrack cut + ; + + Partition partsOneFailed = //~(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut + ((aod::femtoworldparticle::pt > cfgPtHighPart1) || (aod::femtoworldparticle::pt < cfgPtLowPart1)) || // pT cuts + ((aod::femtoworldparticle::eta > cfgEtaHighPart1) || (aod::femtoworldparticle::eta < cfgEtaLowPart1)) || // Eta cuts + (o2::aod::track::dcaXY > cfgDcaXYPart1) || (o2::aod::track::dcaZ > cfgDcaZPart1) || // DCA cuts for XY and Z + (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart1) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart1) || // Crossed rows TPC + (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart1) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart1) || //&& // chi2 cuts + (aod::femtoworldparticle::sign < int8_t(0)); + /// Histogramming for particle 1 + FemtoWorldParticleHisto trackHistoPartOne; + FemtoWorldParticleHisto trackHistoPartOneFailed; + + /// Particle 2 Pi- + Configurable ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"}; + Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 321, "Particle 2 - PDG code"}; + Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> + + /// Partition for particle 2 + Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts + && (o2::aod::track::dcaXY < cfgDcaXYPart2) && (o2::aod::track::dcaZ < cfgDcaZPart2) // DCA cuts for XY and Z + && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart2) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart2) // Crossed rows TPC + && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart2) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart2) // // chi2 cuts + && (aod::femtoworldparticle::sign < int8_t(0)) // Sign (K-) + // todo: globaltrack cut + ; + Partition partsTwoFailed = //(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut + ((aod::femtoworldparticle::pt > cfgPtHighPart2) || (aod::femtoworldparticle::pt < cfgPtLowPart2)) || // pT cuts + ((aod::femtoworldparticle::eta > cfgEtaHighPart2) || (aod::femtoworldparticle::eta < cfgEtaLowPart2)) || // Eta cuts + (o2::aod::track::dcaXY > cfgDcaXYPart2) || (o2::aod::track::dcaZ > cfgDcaZPart2) || // DCA cuts for XY and Z + (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart2) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart2) || // Crossed rows TPC + (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart2) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart2) //&& // chi2 cuts + ; + /// Histogramming for particle 2 + FemtoWorldParticleHisto trackHistoPartTwo; + FemtoWorldParticleHisto trackHistoPartTwoFailed; + + /// Histogramming for Event + FemtoWorldEventHisto eventHisto; + + /// The configurables need to be passed to an std::vector + std::vector vPIDPartOne, vPIDPartTwo; + + /// Correlation part + // ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task + ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; + ConfigurableAxis CfgVtxBins{"CfgVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + + ColumnBinningPolicy colBinning{{CfgVtxBins, CfgMultBins}, true}; + + ConfigurableAxis CfgkstarBins{"CfgkstarBins", {1500, 0., 6.}, "binning kstar"}; + ConfigurableAxis CfgkTBins{"CfgkTBins", {150, 0., 9.}, "binning kT"}; + ConfigurableAxis CfgmTBins{"CfgmTBins", {225, 0., 7.5}, "binning mT"}; + Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; + Configurable ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"}; + Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable ConfPhiBins{"ConfPhiBins", 15, "Number of phi bins in deta dphi"}; + Configurable ConfEtaBins{"ConfEtaBins", 15, "Number of eta bins in deta dphi"}; + Configurable ConfMInvBins{"ConfMInvBins", 1000, "Number of bins in mInv distribution"}; + + FemtoWorldContainer sameEventCont; + FemtoWorldContainer mixedEventCont; + FemtoWorldPairCleaner pairCleaner; + FemtoWorldDetaDphiStar pairCloseRejection; + /// Histogram output + HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; + // HistogramRegistry qaRegistryFail{"TrackQAFailed", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry MixQaRegistry{"MixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; + + void init(InitContext&) + { + eventHisto.init(&qaRegistry); + trackHistoPartOne.init(&qaRegistry); + trackHistoPartOneFailed.init(&qaRegistry); + if (!ConfIsSame) { + trackHistoPartTwo.init(&qaRegistry); + trackHistoPartTwoFailed.init(&qaRegistry); + } + + MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + + sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins, ConfMInvBins); + sameEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins, ConfMInvBins); + mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + pairCleaner.init(&qaRegistry); + if (ConfIsCPR) { + pairCloseRejection.init(&resultRegistry, &qaRegistry, 0.01, 0.01, ConfCPRPlotPerRadii); /// \todo add config for Δη and ΔΦ cut values + } + + vPIDPartOne = ConfPIDPartOne; + vPIDPartTwo = ConfPIDPartTwo; + } + + // PID + // Need to be modified + // bool IsPionTPCdEdxNSigma(float mom, float nsigmap) + // { + // if(mom>=0.5 && TMath::Abs(nsigmap)<3.0) + // return true; + + // return false; + // } + + // bool IsPionTOFNSigma(float mom, float nsigmap) + // { + // if(mom>0.5 && TMath::Abs(nsigmap)<3.0) + // return true; + + // return false; + // } + + bool IsPionNSigma(float nsigmap) + { + if(TMath::Abs(nsigmap)<3.0) + return true; + return false; + } + + /// This function processes the same event and takes care of all the histogramming + /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + void processSameEvent(o2::aod::FemtoWorldCollision& col, + o2::aod::FemtoWorldParticlesMerged& parts) + { + // Partition Phiparts = (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts + //; + // auto groupPhiParts = Phiparts->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsOne = partsOne->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsOneFailed = partsOneFailed->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsTwoFailed = partsTwoFailed->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + + const auto& magFieldTesla = col.magField(); + const int multCol = col.multV0M(); + eventHisto.fillQA(col); + MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multV0M()})); + /// Histogramming same event + for (auto& part : groupPartsOne) { + if ((part.p() > (float)0.45)) { + + float NSigmaPion=TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion())+TMath::Sq(part.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + + } else if ((part.p() <= (float)0.45)) { + float NSigmaPion=part.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + } + trackHistoPartOne.fillQA(part); + } + for (auto& part : groupPartsOneFailed) { + + trackHistoPartOneFailed.fillQA(part); + } + if (!ConfIsSame) { + for (auto& part : groupPartsTwo) { + if ((part.p() > (float)0.45)) { + + float NSigmaPion=TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion())+TMath::Sq(part.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + + } else if ((part.p() <= (float)0.45)) { + float NSigmaPion=part.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + } + trackHistoPartTwo.fillQA(part); + } + for (auto& part : groupPartsTwoFailed) { + + trackHistoPartTwoFailed.fillQA(part); + } + } + /// Now build the combinations + for (auto& [p1, p2] : combinations(groupPartsOne, groupPartsTwo)) { + + if ((p1.p() > (float)0.45)) { + float NSigmaPion1=TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion())+TMath::Sq(p1.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + + } else if ((p1.p() <= (float)0.45)) { + float NSigmaPion1=p1.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + } + if ((p2.p() > (float)0.45)) { + float NSigmaPion2=TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion())+TMath::Sq(p2.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + + } else if ((p2.p() <= (float)0.45)) { + float NSigmaPion2=p2.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + } + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla)) { + continue; + } + } + // track cleaning + if (!pairCleaner.isCleanPair(p1, p2, parts)) { + continue; + } + sameEventCont.setPair(p1, p2, multCol); + } + } + + PROCESS_SWITCH(femtoWorldPairTaskTrackTrack, processSameEvent, "Enable processing same event", true); + + /// This function processes the mixed event + /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + void processMixedEvent(o2::aod::FemtoWorldCollisions& cols, + o2::aod::FemtoWorldParticlesMerged& parts) + { + + for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), collision1.multV0M()})); + + auto groupPartsOne = partsOne->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, collision1.globalIndex()); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, collision2.globalIndex()); + + const auto& magFieldTesla1 = collision1.magField(); + const auto& magFieldTesla2 = collision2.magField(); + + if (magFieldTesla1 != magFieldTesla2) { + continue; + } + + /// \todo before mixing we should check whether both collisions contain a pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; + + for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if ((p1.p() > (float)0.45)) { + float NSigmaPion1=TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion())+TMath::Sq(p1.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + + } else if ((p1.p() <= (float)0.45)) { + float NSigmaPion1=p1.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + } + if ((p2.p() > (float)0.45)) { + float NSigmaPion2=TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion())+TMath::Sq(p2.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + + } else if ((p2.p() <= (float)0.45)) { + float NSigmaPion2=p2.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + } + + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1)) { + continue; + } + } + mixedEventCont.setPair(p1, p2, collision1.multV0M()); + } + } + } + + PROCESS_SWITCH(femtoWorldPairTaskTrackTrack, processMixedEvent, "Enable processing mixed events", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + WorkflowSpec workflow{ + adaptAnalysisTask(cfgc), + }; + return workflow; +} From 429c9b1eba63d382a4fea59e3a16b40c7faaa15f Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Wed, 28 Sep 2022 17:47:56 +0530 Subject: [PATCH 2/9] Corrected Configurable default value and removed MPion variable --- PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h | 2 -- .../TableProducer/femtoWorldProducerTask.cxx | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h index 81ef0410aa9..aa2236361b7 100644 --- a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h +++ b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h @@ -122,7 +122,6 @@ DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon -DECLARE_SOA_COLUMN(MPion, mPion, float); //! The invariant mass of V0 candidate, assuming pion } // namespace femtoworldparticle @@ -179,7 +178,6 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", femtoworldparticle::DecayVtxY, femtoworldparticle::DecayVtxZ, femtoworldparticle::MKaon, - femtoworldparticle::MPion, femtoworldparticle::TPCCrossedRowsOverFindableCls, pidtpc_tiny::TPCNSigmaEl, pidtpc_tiny::TPCNSigmaPi, diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 75f872004ee..2ea71207342 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -152,14 +152,10 @@ struct femtoWorldProducerTask { Configurable ConfInvMassUpLimit{"ConfInvMassUpLimit", 1.035, "Upper limit of the V0 invariant mass"}; Configurable ConfRejectKaons{"ConfRejectKaons", false, "Switch to reject kaons"}; - Configurable ConfRejectPions{"ConfRejectPions", false, "Switch to reject pions"}; Configurable ConfInvKaonMassLowLimit{"ConfInvKaonMassLowLimit", 0.48, "Lower limit of the V0 invariant mass for Kaon rejection"}; Configurable ConfInvKaonMassUpLimit{"ConfInvKaonMassUpLimit", 0.515, "Upper limit of the V0 invariant mass for Kaon rejection"}; - Configurable ConfInvPionMassLowLimit{"ConfInvPionMassLowLimit", 0.12, "Lower limit of the V0 invariant mass for Pion rejection"}; - Configurable ConfInvPionMassUpLimit{"ConfInvPionMassUpLimit", 0.14, "Upper limit of the V0 invariant mass for Pion rejection"}; - // PHI Daughters (Kaons) Configurable ConfInvMassLowLimitPhi{"ConfInvMassLowLimitPhi", 1.011, "Lower limit of the Phi invariant mass"}; // change that to do invariant mass cut Configurable ConfInvMassUpLimitPhi{"ConfInvMassUpLimitPhi", 1.027, "Upper limit of the Phi invariant mass"}; @@ -278,7 +274,6 @@ struct femtoWorldProducerTask { if (ConfRejectKaons) { v0Cuts.setKaonInvMassLimits(ConfInvKaonMassLowLimit, ConfInvKaonMassUpLimit); } - // ! todo similar action for pions if (ConfRejectITSHitandTOFMissing) { o2PhysicsTrackSelection = new TrackSelection(getGlobalTrackSelection()); @@ -492,7 +487,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); tmpIDtrack.push_back(track.globalIndex()); } @@ -571,7 +565,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); const int rowOfPosTrack = outputParts.lastIndex(); int negtrackID = v0.negTrackId(); @@ -625,7 +618,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); const int rowOfNegTrack = outputParts.lastIndex(); int indexChildID[2] = {rowOfPosTrack, rowOfNegTrack}; @@ -675,7 +667,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); } } @@ -778,7 +769,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); const int rowOfPosTrack = outputParts.lastIndex(); int negtrackID = p2.globalIndex(); @@ -832,7 +822,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); const int rowOfNegTrack = outputParts.lastIndex(); @@ -889,7 +878,6 @@ struct femtoWorldProducerTask { -999., -999., -999., - -999., -999.); } } From 7ac5f49824396c7aab3c80d6ce44547672140a35 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 27 Sep 2022 13:41:54 +0000 Subject: [PATCH 3/9] Please consider the following formatting changes --- .../FemtoWorld/DataModel/FemtoWorldDerived.h | 17 +- .../TableProducer/femtoWorldProducerTask.cxx | 2 - PWGCF/FemtoWorld/Tasks/CMakeLists.txt | 5 + .../Tasks/femtoWorldPionAllPairTask.cxx | 451 ++++++++++++++++++ .../femtoWorldPionPairTaskTrackTrack.cxx | 114 ++--- 5 files changed, 521 insertions(+), 68 deletions(-) create mode 100644 PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx diff --git a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h index aa2236361b7..e0c77e203fb 100644 --- a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h +++ b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h @@ -9,9 +9,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef FEMTOWORLDDERIVED_H_ -#define FEMTOWORLDDERIVED_H_ +#ifndef PWGCF_FEMTOWORLD_DATAMODEL_FEMTOWORLDDERIVED_H_ +#define PWGCF_FEMTOWORLD_DATAMODEL_FEMTOWORLDDERIVED_H_ +#include #include "Framework/ASoA.h" #include "MathUtils/Utils.h" #include "Framework/DataTypes.h" @@ -20,7 +21,6 @@ #include "Framework/Expressions.h" #include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/PIDResponse.h" -#include namespace o2::aod { @@ -107,8 +107,8 @@ DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, uint8_t); DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! Number of TPC crossed rows DECLARE_SOA_COLUMN(TPCNSigmaKaon, tpcNSigmaKaon, float); //! TPCNSigmaKaon DECLARE_SOA_COLUMN(TOFNSigmaKaon, tofNSigmaKaon, float); //! TOFNSigmaKaon -DECLARE_SOA_COLUMN(TPCNSigmaPion,tpcNSigmaPion,float); //! TPCNSigmaPion -DECLARE_SOA_COLUMN(TOFNSigmaPion,tofNSigmaPion,float); //! TOFNSigmaPion +DECLARE_SOA_COLUMN(TPCNSigmaPion, tpcNSigmaPion, float); //! TPCNSigmaPion +DECLARE_SOA_COLUMN(TOFNSigmaPion, tofNSigmaPion, float); //! TOFNSigmaPion DECLARE_SOA_COLUMN(ITSNCls, itsNCls, uint8_t); //! Number of ITS clusters DECLARE_SOA_COLUMN(ITSNClsInnerBarrel, itsNClsInnerBarrel, uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal DECLARE_SOA_DYNAMIC_COLUMN(TPCCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over findable TPC clusters @@ -122,7 +122,6 @@ DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon - } // namespace femtoworldparticle DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", @@ -150,8 +149,8 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", femtoworldparticle::TPCChi2NCl, femtoworldparticle::TPCNSigmaKaon, femtoworldparticle::TOFNSigmaKaon, - femtoworldparticle::TPCNSigmaPion, - femtoworldparticle::TOFNSigmaPion, + femtoworldparticle::TPCNSigmaPion, + femtoworldparticle::TOFNSigmaPion, femtoworldparticle::TPCNClsFound, track::TPCNClsFindable, femtoworldparticle::TPCNClsCrossedRows, @@ -199,4 +198,4 @@ DECLARE_SOA_TABLE(FemtoHashes, "AOD", "HASH", femtohash::FemtoBin); using FemtoHash = FemtoHashes::iterator; } // namespace o2::aod -#endif /* FEMTOWORLDDERIVED_H_ */ +#endif // PWGCF_FEMTOWORLD_DATAMODEL_FEMTOWORLDDERIVED_H_ diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 2ea71207342..15706765097 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -152,7 +152,6 @@ struct femtoWorldProducerTask { Configurable ConfInvMassUpLimit{"ConfInvMassUpLimit", 1.035, "Upper limit of the V0 invariant mass"}; Configurable ConfRejectKaons{"ConfRejectKaons", false, "Switch to reject kaons"}; - Configurable ConfInvKaonMassLowLimit{"ConfInvKaonMassLowLimit", 0.48, "Lower limit of the V0 invariant mass for Kaon rejection"}; Configurable ConfInvKaonMassUpLimit{"ConfInvKaonMassUpLimit", 0.515, "Upper limit of the V0 invariant mass for Kaon rejection"}; @@ -274,7 +273,6 @@ struct femtoWorldProducerTask { if (ConfRejectKaons) { v0Cuts.setKaonInvMassLimits(ConfInvKaonMassLowLimit, ConfInvKaonMassUpLimit); } - if (ConfRejectITSHitandTOFMissing) { o2PhysicsTrackSelection = new TrackSelection(getGlobalTrackSelection()); o2PhysicsTrackSelection->SetRequireHitsInITSLayers(1, {0, 1, 2, 3}); diff --git a/PWGCF/FemtoWorld/Tasks/CMakeLists.txt b/PWGCF/FemtoWorld/Tasks/CMakeLists.txt index 107a18c14a4..5e9016953f8 100644 --- a/PWGCF/FemtoWorld/Tasks/CMakeLists.txt +++ b/PWGCF/FemtoWorld/Tasks/CMakeLists.txt @@ -22,4 +22,9 @@ o2physics_add_dpl_workflow(femto-world-pair-track-phi o2physics_add_dpl_workflow(femto-world-pion-pair-track-track SOURCES femtoWorldPionPairTaskTrackTrack.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(femto-world-pion-all-pair-track-track + SOURCES femtoWorldPionAllPairTask.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) \ No newline at end of file diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx new file mode 100644 index 00000000000..36c285ad235 --- /dev/null +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx @@ -0,0 +1,451 @@ +// 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 FemtoWorldPionAllPair.cxx +/// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks +/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de +/// \author Zuzanna Chochulska, WUT Warsaw, zchochul@cern.ch +/// \author Deependra Sharma, IITB, deependra.sharma@cern.ch + +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/StepTHn.h" + +#include "PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldEventHisto.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldContainer.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldUtils.h" + +using namespace o2; +using namespace o2::analysis::femtoWorld; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +namespace o2::aod +{ +// using FemtoWorldParticlesMerged = soa::Join; +using FemtoWorldParticlesMerged = aod::FemtoWorldParticles; +using FemtoWorldParticleMerged = FemtoWorldParticlesMerged::iterator; +} // namespace o2::aod + +// Particle Sign +enum SignofPair { + MinusSign = -1, + PlusSign = 1, + NSigns +}; + +struct FemtoWorldPionAllPair { + // for filling phi candidates table + // Produces outputCollision; + // Produces outputPhiCan; + // std::vector tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index + + /// @brief read configurable and sets corresponding cuts + /// @tparam T type of configurable + /// @param cut local variable corresponding configurable to be set + template + void SetChargePair(T& cut1, T& cut2) + { + ChargePair.push_back(cut1); + ChargePair.push_back(cut2); + } + + Configurable cfgSignPartOne{"cfgSignPartOne", PlusSign, "Sign of Firts particle"}; + Configurable cfgSignPartTwo{"cfgSignPartTwo", MinusSign, "Sign of Second particle"}; + + std::vector ChargePair; + /// Particle selection part + + // Configurables for cuts + // First particle + Configurable cfgPtLowPart1{"cfgPtLowPart1", 0.14, "Lower limit for Pt for the first particle"}; + Configurable cfgPtHighPart1{"cfgPtHighPart1", 1.5, "Higher limit for Pt for the first particle"}; + Configurable cfgEtaLowPart1{"cfgEtaLowPart1", -0.8, "Lower limit for Eta for the first particle"}; + Configurable cfgEtaHighPart1{"cfgEtaHighPart1", 0.8, "Higher limit for Eta for the first particle"}; + Configurable cfgDcaXYPart1{"cfgDcaXYPart1", 2.4, "Value for DCA_XY for the first particle"}; + Configurable cfgDcaZPart1{"cfgDcaZPart1", 3.2, "Value for DCA_Z for the first particle"}; + Configurable cfgTpcClPart1{"cfgTpcClPart1", 88, "Number of tpc clasters for the first particle"}; // min number of found TPC clusters + Configurable cfgTpcCrosRoPart1{"cfgTpcCrosRoPart1", 70, "Number of tpc crossed rows for the first particle"}; // min number of crossed rows + Configurable cfgChi2TpcPart1{"cfgChi2TpcPart1", 4.0, "Chi2 / cluster for the TPC track segment for the first particle"}; + Configurable cfgChi2ItsPart1{"cfgChi2ItsPart1", 36.0, "Chi2 / cluster for the ITS track segment for the first particle"}; + // Second particle + Configurable cfgPtLowPart2{"cfgPtLowPart2", 0.14, "Lower limit for Pt for the second particle"}; + Configurable cfgPtHighPart2{"cfgPtHighPart2", 1.5, "Higher limit for Pt for the second particle"}; + Configurable cfgEtaLowPart2{"cfgEtaLowPart2", -0.8, "Lower limit for Eta for the second particle"}; + Configurable cfgEtaHighPart2{"cfgEtaHighPart2", 0.8, "Higher limit for Eta for the second particle"}; + Configurable cfgDcaXYPart2{"cfgDcaXYPart2", 2.4, "Value for DCA_XY for the second particle"}; + Configurable cfgDcaZPart2{"cfgDcaZPart2", 3.2, "Value for DCA_Z for the second particle"}; + Configurable cfgTpcClPart2{"cfgTpcClPart2", 88, "Number of tpc clasters for the second particle"}; // min number of found TPC clusters + Configurable cfgTpcCrosRoPart2{"cfgTpcCrosRoPart2", 70, "Number of tpc crossed rows for the second particle"}; // min number of crossed rows + Configurable cfgChi2TpcPart2{"cfgChi2TpcPart2", 4.0, "Chi2 / cluster for the TPC track segment for the second particle"}; + Configurable cfgChi2ItsPart2{"cfgChi2ItsPart2", 36.0, "Chi2 / cluster for the ITS track segment for the second particle"}; + + /// Particle 1 Pi+ + Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 321, "Particle 1 - PDG code"}; + Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> + + /// Partition for particle 1 + Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart1) && (aod::femtoworldparticle::eta > cfgEtaLowPart1) // Eta cuts + && (nabs(o2::aod::track::dcaXY) < cfgDcaXYPart1) && (nabs(o2::aod::track::dcaZ) < cfgDcaZPart1) // DCA cuts for XY and Z + && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart1) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart1) // Crossed rows TPC + && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart1) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart1) //&& // chi2 cuts + && (aod::femtoworldparticle::sign == (int8_t)cfgSignPartOne); // todo: globaltrack cut + + Partition partsOneFailed = //~(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut + ((aod::femtoworldparticle::pt > cfgPtHighPart1) || (aod::femtoworldparticle::pt < cfgPtLowPart1)) || // pT cuts + ((aod::femtoworldparticle::eta > cfgEtaHighPart1) || (aod::femtoworldparticle::eta < cfgEtaLowPart1)) || // Eta cuts + (nabs(o2::aod::track::dcaXY) > cfgDcaXYPart1) || (nabs(o2::aod::track::dcaZ) > cfgDcaZPart1) || // DCA cuts for XY and Z + (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart1) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart1) || // Crossed rows TPC + (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart1) || (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart1) || //&& // chi2 cuts + (aod::femtoworldparticle::sign != (int8_t)cfgSignPartOne); + /// Histogramming for particle 1 + FemtoWorldParticleHisto trackHistoPartOne; + FemtoWorldParticleHisto trackHistoPartOneFailed; + + /// Particle 2 Pi- + Configurable ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"}; + Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 321, "Particle 2 - PDG code"}; + Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> + + /// Partition for particle 2 + Partition partsTwo = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut + && (aod::femtoworldparticle::pt < cfgPtHighPart2) && (aod::femtoworldparticle::pt > cfgPtLowPart2) // pT cuts + && (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts + && (nabs(o2::aod::track::dcaXY) < cfgDcaXYPart2) && (nabs(o2::aod::track::dcaZ) < cfgDcaZPart2) // DCA cuts for XY and Z + && (aod::femtoworldparticle::tpcNClsFound > (uint8_t)cfgTpcClPart2) // Number of found TPC clusters + && (aod::femtoworldparticle::tpcNClsCrossedRows > (uint8_t)cfgTpcCrosRoPart2) // Crossed rows TPC + && (aod::femtoworldparticle::itsChi2NCl < cfgChi2ItsPart2) && (aod::femtoworldparticle::tpcChi2NCl < cfgChi2TpcPart2) // // chi2 cuts + && (aod::femtoworldparticle::sign == (int8_t)cfgSignPartTwo); + // todo: globaltrack cut + Partition partsTwoFailed = //(aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) || // particle type cut + ((aod::femtoworldparticle::pt > cfgPtHighPart2) || (aod::femtoworldparticle::pt < cfgPtLowPart2)) || // pT cuts + ((aod::femtoworldparticle::eta > cfgEtaHighPart2) || (aod::femtoworldparticle::eta < cfgEtaLowPart2)) || // Eta cuts + (nabs(o2::aod::track::dcaXY) > cfgDcaXYPart2) || (nabs(o2::aod::track::dcaZ) > cfgDcaZPart2) || // DCA cuts for XY and Z + (aod::femtoworldparticle::tpcNClsFound < (uint8_t)cfgTpcClPart2) || // Number of found TPC clusters + (aod::femtoworldparticle::tpcNClsCrossedRows < (uint8_t)cfgTpcCrosRoPart2) || // Crossed rows TPC + (aod::femtoworldparticle::itsChi2NCl > cfgChi2ItsPart2) || + (aod::femtoworldparticle::tpcChi2NCl > cfgChi2TpcPart2) || //&& // chi2 cuts + (aod::femtoworldparticle::sign != (int8_t)cfgSignPartTwo); + + /// Histogramming for particle 2 + FemtoWorldParticleHisto trackHistoPartTwo; + FemtoWorldParticleHisto trackHistoPartTwoFailed; + + /// Histogramming for Event + FemtoWorldEventHisto eventHisto; + + /// The configurables need to be passed to an std::vector + std::vector vPIDPartOne, vPIDPartTwo; + + /// Correlation part + // ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; // \todo to be obtained from the hash task + ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0f, 20.0f, 40.0f, 60.0f, 80.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity"}; + ConfigurableAxis CfgVtxBins{"CfgVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; + + ColumnBinningPolicy colBinning{{CfgVtxBins, CfgMultBins}, true}; + + ConfigurableAxis CfgkstarBins{"CfgkstarBins", {1500, 0., 6.}, "binning kstar"}; + ConfigurableAxis CfgkTBins{"CfgkTBins", {150, 0., 9.}, "binning kT"}; + ConfigurableAxis CfgmTBins{"CfgmTBins", {225, 0., 7.5}, "binning mT"}; + Configurable ConfNEventsMix{"ConfNEventsMix", 5, "Number of events for mixing"}; + Configurable ConfIsCPR{"ConfIsCPR", true, "Close Pair Rejection"}; + Configurable ConfCPRPlotPerRadii{"ConfCPRPlotPerRadii", false, "Plot CPR per radii"}; + Configurable ConfPhiBins{"ConfPhiBins", 15, "Number of phi bins in deta dphi"}; + Configurable ConfEtaBins{"ConfEtaBins", 15, "Number of eta bins in deta dphi"}; + Configurable ConfMInvBins{"ConfMInvBins", 1000, "Number of bins in mInv distribution"}; + + FemtoWorldContainer sameEventCont; + FemtoWorldContainer mixedEventCont; + FemtoWorldPairCleaner pairCleaner; + FemtoWorldDetaDphiStar pairCloseRejection; + /// Histogram output + HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; + // HistogramRegistry qaRegistryFail{"TrackQAFailed", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry MixQaRegistry{"MixQaRegistry", {}, OutputObjHandlingPolicy::AnalysisObject}; + + void init(InitContext&) + { + SetChargePair(cfgSignPartOne, cfgSignPartOne); + eventHisto.init(&qaRegistry); + trackHistoPartOne.init(&qaRegistry); + trackHistoPartOneFailed.init(&qaRegistry); + if (!ConfIsSame) { + trackHistoPartTwo.init(&qaRegistry); + trackHistoPartTwoFailed.init(&qaRegistry); + } + + MixQaRegistry.add("MixingQA/hSECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + MixQaRegistry.add("MixingQA/hMECollisionBins", ";bin;Entries", kTH1F, {{120, -0.5, 119.5}}); + + sameEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins, ConfMInvBins); + sameEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + mixedEventCont.init(&resultRegistry, CfgkstarBins, CfgMultBins, CfgkTBins, CfgmTBins, ConfPhiBins, ConfEtaBins, ConfMInvBins); + mixedEventCont.setPDGCodes(ConfPDGCodePartOne, ConfPDGCodePartTwo); + pairCleaner.init(&qaRegistry); + if (ConfIsCPR) { + pairCloseRejection.init(&resultRegistry, &qaRegistry, 0.01, 0.01, ConfCPRPlotPerRadii); /// \todo add config for Δη and ΔΦ cut values + } + + vPIDPartOne = ConfPIDPartOne; + vPIDPartTwo = ConfPIDPartTwo; + } + + // PID + // Need to be modified + // bool IsPionTPCdEdxNSigma(float mom, float nsigmap) + // { + // if(mom>=0.5 && TMath::Abs(nsigmap)<3.0) + // return true; + + // return false; + // } + + // bool IsPionTOFNSigma(float mom, float nsigmap) + // { + // if(mom>0.5 && TMath::Abs(nsigmap)<3.0) + // return true; + + // return false; + // } + + bool IsPionNSigma(float nsigmap) + { + if (TMath::Abs(nsigmap) < 3.0) + return true; + return false; + } + + /// This function processes the same event and takes care of all the histogramming + /// \todo the trivial loops over the tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + void processSameEvent(o2::aod::FemtoWorldCollision& col, + o2::aod::FemtoWorldParticlesMerged& parts) + { + + // Partition Phiparts = (aod::femtoworldparticle::eta < cfgEtaHighPart2) && (aod::femtoworldparticle::eta > cfgEtaLowPart2) // Eta cuts + //; + // auto groupPhiParts = Phiparts->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsOne = partsOne->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsOneFailed = partsOneFailed->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + auto groupPartsTwoFailed = partsTwoFailed->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, col.globalIndex()); + + const auto& magFieldTesla = col.magField(); + const int multCol = col.multV0M(); + eventHisto.fillQA(col); + MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multV0M()})); + /// Histogramming same event + for (auto& part : groupPartsOne) { + if ((part.p() > 0.50)) { + + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + + } else if ((part.p() <= 0.50)) { + float NSigmaPion = part.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + } + trackHistoPartOne.fillQA(part); + } + for (auto& part : groupPartsOneFailed) { + + trackHistoPartOneFailed.fillQA(part); + } + if (!ConfIsSame) { + for (auto& part : groupPartsTwo) { + if ((part.p() > 0.50)) { + + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + + } else if ((part.p() <= 0.50)) { + float NSigmaPion = part.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + } + trackHistoPartTwo.fillQA(part); + } + for (auto& part : groupPartsTwoFailed) { + + trackHistoPartTwoFailed.fillQA(part); + } + } + if ((ChargePair[0] == PlusSign && ChargePair[1] == MinusSign) || (ChargePair[0] == MinusSign && ChargePair[1] == PlusSign)) { // Unlike Sign Condition + for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if ((p1.p() > 0.50)) { + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + + } else if ((p1.p() <= 0.50)) { + float NSigmaPion1 = p1.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + } + if ((p2.p() > 0.50)) { + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + + } else if ((p2.p() <= 0.50)) { + float NSigmaPion2 = p2.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + } + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla)) { + continue; + } + } + // track cleaning + if (!pairCleaner.isCleanPair(p1, p2, parts)) { + continue; + } + + sameEventCont.setPair(p1, p2, multCol); + } + } else if ((ChargePair[0] == PlusSign && ChargePair[1] == PlusSign) || (ChargePair[0] == MinusSign && ChargePair[1] == MinusSign)) { // Like Sign Condition + for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if ((p1.p() > 0.50)) { + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + + } else if ((p1.p() <= 0.50)) { + float NSigmaPion1 = p1.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + } + if ((p2.p() > 0.50)) { + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + + } else if ((p2.p() <= 0.50)) { + float NSigmaPion2 = p2.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + } + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla)) { + continue; + } + } + // track cleaning + if (!pairCleaner.isCleanPair(p1, p2, parts)) { + continue; + } + sameEventCont.setPair(p1, p2, multCol); + } + } + } + + PROCESS_SWITCH(FemtoWorldPionAllPair, processSameEvent, "Enable processing same event", true); + + /// This function processes the mixed event + /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... + void processMixedEvent(o2::aod::FemtoWorldCollisions& cols, + o2::aod::FemtoWorldParticlesMerged& parts) + { + + for (auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + + MixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), collision1.multV0M()})); + + auto groupPartsOne = partsOne->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, collision1.globalIndex()); + auto groupPartsTwo = partsTwo->sliceByCached(aod::femtoworldparticle::femtoWorldCollisionId, collision2.globalIndex()); + + const auto& magFieldTesla1 = collision1.magField(); + const auto& magFieldTesla2 = collision2.magField(); + + if (magFieldTesla1 != magFieldTesla2) { + continue; + } + + /// \todo before mixing we should check whether both collisions contain a pair of particles! + // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; + + for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + + if ((p1.p() > 0.50)) { + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + + } else if ((p1.p() <= 0.50)) { + float NSigmaPion1 = p1.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + } + if ((p2.p() > 0.50)) { + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + + } else if ((p2.p() <= 0.50)) { + float NSigmaPion2 = p2.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } + } + + if (ConfIsCPR) { + if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1)) { + continue; + } + } + mixedEventCont.setPair(p1, p2, collision1.multV0M()); + } + } + } + + PROCESS_SWITCH(FemtoWorldPionAllPair, processMixedEvent, "Enable processing mixed events", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + WorkflowSpec workflow{ + adaptAnalysisTask(cfgc), + }; + return workflow; +} diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx index c57bda6e066..e68ae07ffb8 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file femtoWorldPairTaskTrackTrack.cxx +/// \file femtoWorldPionPairTaskTrackTrack.cxx /// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks /// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de /// \author Zuzanna Chochulska, WUT Warsaw, zchochul@cern.ch @@ -43,7 +43,7 @@ using FemtoWorldParticlesMerged = aod::FemtoWorldParticles; using FemtoWorldParticleMerged = FemtoWorldParticlesMerged::iterator; } // namespace o2::aod -struct femtoWorldPairTaskTrackTrack { +struct femtoWorldPionPairTaskTrackTrack { // for filling phi candidates table // Produces outputCollision; // Produces outputPhiCan; @@ -75,9 +75,9 @@ struct femtoWorldPairTaskTrackTrack { Configurable cfgChi2ItsPart2{"cfgChi2ItsPart2", 36.0, "Chi2 / cluster for the ITS track segment for the second particle"}; /// Particle 1 Pi+ - Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 321, "Particle 1 - PDG code"}; + Configurable ConfPDGCodePartOne{"ConfPDGCodePartOne", 211, "Particle 1 - PDG code"}; Configurable> ConfPIDPartOne{"ConfPIDPartOne", std::vector{2}, "Particle 1 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector>int>> - + /// Partition for particle 1 Partition partsOne = (aod::femtoworldparticle::partType == uint8_t(aod::femtoworldparticle::ParticleType::kTrack)) // particle type cut && (aod::femtoworldparticle::pt < cfgPtHighPart1) && (aod::femtoworldparticle::pt > cfgPtLowPart1) // simple pT cuts @@ -104,7 +104,7 @@ struct femtoWorldPairTaskTrackTrack { /// Particle 2 Pi- Configurable ConfIsSame{"ConfIsSame", false, "Pairs of the same particle"}; - Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 321, "Particle 2 - PDG code"}; + Configurable ConfPDGCodePartTwo{"ConfPDGCodePartTwo", 211, "Particle 2 - PDG code"}; Configurable> ConfPIDPartTwo{"ConfPIDPartTwo", std::vector{2}, "Particle 2 - Read from json file"}; // we also need the possibility to specify whether the bit is true/false ->std>>vector> /// Partition for particle 2 @@ -195,7 +195,7 @@ struct femtoWorldPairTaskTrackTrack { // { // if(mom>=0.5 && TMath::Abs(nsigmap)<3.0) // return true; - + // return false; // } @@ -203,13 +203,13 @@ struct femtoWorldPairTaskTrackTrack { // { // if(mom>0.5 && TMath::Abs(nsigmap)<3.0) // return true; - + // return false; // } bool IsPionNSigma(float nsigmap) { - if(TMath::Abs(nsigmap)<3.0) + if (TMath::Abs(nsigmap) < 3.0) return true; return false; } @@ -233,15 +233,15 @@ struct femtoWorldPairTaskTrackTrack { MixQaRegistry.fill(HIST("MixingQA/hSECollisionBins"), colBinning.getBin({col.posZ(), col.multV0M()})); /// Histogramming same event for (auto& part : groupPartsOne) { - if ((part.p() > (float)0.45)) { - - float NSigmaPion=TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion())+TMath::Sq(part.tofNSigmaPion())); + if ((part.p() > 0.50)) { + + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); if (!IsPionNSigma(NSigmaPion)) { continue; } - } else if ((part.p() <= (float)0.45)) { - float NSigmaPion=part.tpcNSigmaPion(); + } else if ((part.p() <= 0.50)) { + float NSigmaPion = part.tpcNSigmaPion(); if (!IsPionNSigma(NSigmaPion)) { continue; } @@ -254,19 +254,19 @@ struct femtoWorldPairTaskTrackTrack { } if (!ConfIsSame) { for (auto& part : groupPartsTwo) { - if ((part.p() > (float)0.45)) { - - float NSigmaPion=TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion())+TMath::Sq(part.tofNSigmaPion())); - if (!IsPionNSigma(NSigmaPion)) { - continue; - } + if ((part.p() > 0.50)) { - } else if ((part.p() <= (float)0.45)) { - float NSigmaPion=part.tpcNSigmaPion(); - if (!IsPionNSigma(NSigmaPion)) { - continue; + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } + + } else if ((part.p() <= 0.50)) { + float NSigmaPion = part.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion)) { + continue; + } } - } trackHistoPartTwo.fillQA(part); } for (auto& part : groupPartsTwoFailed) { @@ -276,27 +276,27 @@ struct femtoWorldPairTaskTrackTrack { } /// Now build the combinations for (auto& [p1, p2] : combinations(groupPartsOne, groupPartsTwo)) { - - if ((p1.p() > (float)0.45)) { - float NSigmaPion1=TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion())+TMath::Sq(p1.tofNSigmaPion())); + + if ((p1.p() > 0.50)) { + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); if (!IsPionNSigma(NSigmaPion1)) { continue; } - } else if ((p1.p() <= (float)0.45)) { - float NSigmaPion1=p1.tpcNSigmaPion(); + } else if ((p1.p() <= 0.50)) { + float NSigmaPion1 = p1.tpcNSigmaPion(); if (!IsPionNSigma(NSigmaPion1)) { continue; } } - if ((p2.p() > (float)0.45)) { - float NSigmaPion2=TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion())+TMath::Sq(p2.tofNSigmaPion())); + if ((p2.p() > 0.50)) { + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); if (!IsPionNSigma(NSigmaPion2)) { continue; } - } else if ((p2.p() <= (float)0.45)) { - float NSigmaPion2=p2.tpcNSigmaPion(); + } else if ((p2.p() <= 0.50)) { + float NSigmaPion2 = p2.tpcNSigmaPion(); if (!IsPionNSigma(NSigmaPion2)) { continue; } @@ -314,7 +314,7 @@ struct femtoWorldPairTaskTrackTrack { } } - PROCESS_SWITCH(femtoWorldPairTaskTrackTrack, processSameEvent, "Enable processing same event", true); + PROCESS_SWITCH(femtoWorldPionPairTaskTrackTrack, processSameEvent, "Enable processing same event", true); /// This function processes the mixed event /// \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ... @@ -340,31 +340,31 @@ struct femtoWorldPairTaskTrackTrack { // if (partsOne.size() == 0 || nPart2Evt1 == 0 || nPart1Evt2 == 0 || partsTwo.size() == 0 ) continue; for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - - if ((p1.p() > (float)0.45)) { - float NSigmaPion1=TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion())+TMath::Sq(p1.tofNSigmaPion())); - if (!IsPionNSigma(NSigmaPion1)) { - continue; - } - } else if ((p1.p() <= (float)0.45)) { - float NSigmaPion1=p1.tpcNSigmaPion(); - if (!IsPionNSigma(NSigmaPion1)) { - continue; - } - } - if ((p2.p() > (float)0.45)) { - float NSigmaPion2=TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion())+TMath::Sq(p2.tofNSigmaPion())); - if (!IsPionNSigma(NSigmaPion2)) { - continue; + if ((p1.p() > 0.50)) { + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } + + } else if ((p1.p() <= 0.50)) { + float NSigmaPion1 = p1.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion1)) { + continue; + } } + if ((p2.p() > 0.50)) { + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } - } else if ((p2.p() <= (float)0.45)) { - float NSigmaPion2=p2.tpcNSigmaPion(); - if (!IsPionNSigma(NSigmaPion2)) { - continue; + } else if ((p2.p() <= 0.50)) { + float NSigmaPion2 = p2.tpcNSigmaPion(); + if (!IsPionNSigma(NSigmaPion2)) { + continue; + } } - } if (ConfIsCPR) { if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla1)) { @@ -376,13 +376,13 @@ struct femtoWorldPairTaskTrackTrack { } } - PROCESS_SWITCH(femtoWorldPairTaskTrackTrack, processMixedEvent, "Enable processing mixed events", true); + PROCESS_SWITCH(femtoWorldPionPairTaskTrackTrack, processMixedEvent, "Enable processing mixed events", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{ - adaptAnalysisTask(cfgc), + adaptAnalysisTask(cfgc), }; return workflow; } From d5c2bc9beecca3b5de9df1c609e608b2bd92d1f6 Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Wed, 28 Sep 2022 18:21:13 +0530 Subject: [PATCH 4/9] removed MPion variable --- PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h index e0c77e203fb..6f68c6c05f2 100644 --- a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h +++ b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h @@ -122,6 +122,7 @@ DECLARE_SOA_COLUMN(DecayVtxX, decayVtxX, float); //! X position of the decay DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon + } // namespace femtoworldparticle DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", From d2d728e04ceb20854652d9ff5c2aa37fd352c2ae Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Tue, 3 Jan 2023 23:19:08 +0530 Subject: [PATCH 5/9] updating all sign pion pair --- PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx index 36c285ad235..78db56165c2 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx @@ -449,3 +449,11 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) }; return workflow; } + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + WorkflowSpec workflow{ + adaptAnalysisTask(cfgc), + }; + return workflow; +} \ No newline at end of file From 23e3aeef0261bdf550faac5bf0db7ecaeeb275e7 Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Wed, 4 Jan 2023 18:40:23 +0530 Subject: [PATCH 6/9] after comparing with original repo --- PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 15706765097..3eb373689fa 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -888,4 +888,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; return workflow; -} +} \ No newline at end of file From 529e606ee47b94f355b756b88ad0909eef6a333d Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Fri, 6 Jan 2023 18:48:37 +0530 Subject: [PATCH 7/9] putting new line character at the end of file --- PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx | 2 +- PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 3eb373689fa..15706765097 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -888,4 +888,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; return workflow; -} \ No newline at end of file +} diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx index 78db56165c2..4972144afbd 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx @@ -456,4 +456,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) adaptAnalysisTask(cfgc), }; return workflow; -} \ No newline at end of file +} From 91cdb8479d8396040dc03f81407e143f51559049 Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Tue, 10 Jan 2023 01:56:14 +0530 Subject: [PATCH 8/9] set charge pair correctly --- PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx index 4972144afbd..212fa86bb56 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx @@ -186,7 +186,7 @@ struct FemtoWorldPionAllPair { void init(InitContext&) { - SetChargePair(cfgSignPartOne, cfgSignPartOne); + SetChargePair(cfgSignPartOne, cfgSignPartTwo); eventHisto.init(&qaRegistry); trackHistoPartOne.init(&qaRegistry); trackHistoPartOneFailed.init(&qaRegistry); From 256d9921802e46c72102362f90f3c6d40ede1499 Mon Sep 17 00:00:00 2001 From: Deependra Sharma Date: Sat, 14 Jan 2023 23:29:29 +0530 Subject: [PATCH 9/9] Restoring original Datamodel and TableProducer --- .../FemtoWorld/DataModel/FemtoWorldDerived.h | 4 -- .../TableProducer/femtoWorldProducerTask.cxx | 14 ------ .../Tasks/femtoWorldPionAllPairTask.cxx | 49 ++++++++----------- .../femtoWorldPionPairTaskTrackTrack.cxx | 24 ++++----- 4 files changed, 33 insertions(+), 58 deletions(-) diff --git a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h index 6f68c6c05f2..4d7f2e7aca5 100644 --- a/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h +++ b/PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h @@ -107,8 +107,6 @@ DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, uint8_t); DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //! Number of TPC crossed rows DECLARE_SOA_COLUMN(TPCNSigmaKaon, tpcNSigmaKaon, float); //! TPCNSigmaKaon DECLARE_SOA_COLUMN(TOFNSigmaKaon, tofNSigmaKaon, float); //! TOFNSigmaKaon -DECLARE_SOA_COLUMN(TPCNSigmaPion, tpcNSigmaPion, float); //! TPCNSigmaPion -DECLARE_SOA_COLUMN(TOFNSigmaPion, tofNSigmaPion, float); //! TOFNSigmaPion DECLARE_SOA_COLUMN(ITSNCls, itsNCls, uint8_t); //! Number of ITS clusters DECLARE_SOA_COLUMN(ITSNClsInnerBarrel, itsNClsInnerBarrel, uint8_t); //! Number of ITS clusters in the inner barrel //! TPC signal DECLARE_SOA_DYNAMIC_COLUMN(TPCCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, //! Compute the number of crossed rows over findable TPC clusters @@ -150,8 +148,6 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS", femtoworldparticle::TPCChi2NCl, femtoworldparticle::TPCNSigmaKaon, femtoworldparticle::TOFNSigmaKaon, - femtoworldparticle::TPCNSigmaPion, - femtoworldparticle::TOFNSigmaPion, femtoworldparticle::TPCNClsFound, track::TPCNClsFindable, femtoworldparticle::TPCNClsCrossedRows, diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 15706765097..0dabb80c819 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -458,8 +458,6 @@ struct femtoWorldProducerTask { track.tpcChi2NCl(), track.tpcNSigmaKa(), track.tofNSigmaKa(), - track.tpcNSigmaPi(), - track.tofNSigmaPi(), (uint8_t)track.tpcNClsFound(), track.tpcNClsFindable(), (uint8_t)track.tpcNClsCrossedRows(), @@ -536,8 +534,6 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), - postrack.tpcNSigmaPi(), - postrack.tofNSigmaPi(), (uint8_t)postrack.tpcNClsFound(), postrack.tpcNClsFindable(), (uint8_t)postrack.tpcNClsCrossedRows(), @@ -589,8 +585,6 @@ struct femtoWorldProducerTask { negtrack.tpcChi2NCl(), negtrack.tpcNSigmaKa(), negtrack.tofNSigmaKa(), - negtrack.tpcNSigmaPi(), - negtrack.tofNSigmaPi(), (uint8_t)negtrack.tpcNClsFound(), negtrack.tpcNClsFindable(), (uint8_t)negtrack.tpcNClsCrossedRows(), @@ -638,8 +632,6 @@ struct femtoWorldProducerTask { postrack.tpcChi2NCl(), postrack.tpcNSigmaKa(), postrack.tofNSigmaKa(), - postrack.tpcNSigmaPi(), - postrack.tofNSigmaPi(), (uint8_t)postrack.tpcNClsFound(), postrack.tpcNClsFindable(), (uint8_t)postrack.tpcNClsCrossedRows(), @@ -740,8 +732,6 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), - p1.tpcNSigmaPi(), - p1.tofNSigmaPi(), (uint8_t)p1.tpcNClsFound(), p1.tpcNClsFindable(), (uint8_t)p1.tpcNClsCrossedRows(), @@ -793,8 +783,6 @@ struct femtoWorldProducerTask { p2.tpcChi2NCl(), p2.tpcNSigmaKa(), p2.tofNSigmaKa(), - p2.tpcNSigmaPi(), - p2.tofNSigmaPi(), (uint8_t)p2.tpcNClsFound(), p2.tpcNClsFindable(), (uint8_t)p2.tpcNClsCrossedRows(), @@ -849,8 +837,6 @@ struct femtoWorldProducerTask { p1.tpcChi2NCl(), p1.tpcNSigmaKa(), p1.tofNSigmaKa(), - p1.tpcNSigmaPi(), - p1.tofNSigmaPi(), (uint8_t)p1.tpcNClsFound(), 0, // p1.tpcNClsFindable(), 0, //(uint8_t)p1.tpcNClsCrossedRows(), diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx index 212fa86bb56..b290011a1c2 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionAllPairTask.cxx @@ -66,8 +66,8 @@ struct FemtoWorldPionAllPair { ChargePair.push_back(cut2); } - Configurable cfgSignPartOne{"cfgSignPartOne", PlusSign, "Sign of Firts particle"}; - Configurable cfgSignPartTwo{"cfgSignPartTwo", MinusSign, "Sign of Second particle"}; + Configurable cfgSignPartOne{"cfgSignPartOne", static_cast(PlusSign), "Sign of Firts particle"}; + Configurable cfgSignPartTwo{"cfgSignPartTwo", static_cast(PlusSign), "Sign of Second particle"}; std::vector ChargePair; /// Particle selection part @@ -258,13 +258,13 @@ struct FemtoWorldPionAllPair { for (auto& part : groupPartsOne) { if ((part.p() > 0.50)) { - float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPi()) + TMath::Sq(part.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion)) { continue; } } else if ((part.p() <= 0.50)) { - float NSigmaPion = part.tpcNSigmaPion(); + float NSigmaPion = part.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion)) { continue; } @@ -279,13 +279,13 @@ struct FemtoWorldPionAllPair { for (auto& part : groupPartsTwo) { if ((part.p() > 0.50)) { - float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPi()) + TMath::Sq(part.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion)) { continue; } } else if ((part.p() <= 0.50)) { - float NSigmaPion = part.tpcNSigmaPion(); + float NSigmaPion = part.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion)) { continue; } @@ -297,29 +297,29 @@ struct FemtoWorldPionAllPair { trackHistoPartTwoFailed.fillQA(part); } } - if ((ChargePair[0] == PlusSign && ChargePair[1] == MinusSign) || (ChargePair[0] == MinusSign && ChargePair[1] == PlusSign)) { // Unlike Sign Condition + if ((ChargePair[0] == static_cast(PlusSign) && ChargePair[1] == static_cast(MinusSign)) || (ChargePair[0] == static_cast(MinusSign) && ChargePair[1] == static_cast(PlusSign))) { // Unlike Sign Condition for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { if ((p1.p() > 0.50)) { - float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPi()) + TMath::Sq(p1.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion1)) { continue; } } else if ((p1.p() <= 0.50)) { - float NSigmaPion1 = p1.tpcNSigmaPion(); + float NSigmaPion1 = p1.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion1)) { continue; } } if ((p2.p() > 0.50)) { - float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPi()) + TMath::Sq(p2.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion2)) { continue; } } else if ((p2.p() <= 0.50)) { - float NSigmaPion2 = p2.tpcNSigmaPion(); + float NSigmaPion2 = p2.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion2)) { continue; } @@ -336,29 +336,30 @@ struct FemtoWorldPionAllPair { sameEventCont.setPair(p1, p2, multCol); } - } else if ((ChargePair[0] == PlusSign && ChargePair[1] == PlusSign) || (ChargePair[0] == MinusSign && ChargePair[1] == MinusSign)) { // Like Sign Condition + } else if ((ChargePair[0] == static_cast(PlusSign) && ChargePair[1] == static_cast(PlusSign)) || (ChargePair[0] == static_cast(MinusSign) && ChargePair[1] == static_cast(MinusSign))) { // Like Sign Condition for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) { + // for (auto& [p1, p2] : combinations(groupPartsOne, groupPartsTwo)) { if ((p1.p() > 0.50)) { - float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPi()) + TMath::Sq(p1.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion1)) { continue; } } else if ((p1.p() <= 0.50)) { - float NSigmaPion1 = p1.tpcNSigmaPion(); + float NSigmaPion1 = p1.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion1)) { continue; } } if ((p2.p() > 0.50)) { - float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPi()) + TMath::Sq(p2.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion2)) { continue; } } else if ((p2.p() <= 0.50)) { - float NSigmaPion2 = p2.tpcNSigmaPion(); + float NSigmaPion2 = p2.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion2)) { continue; } @@ -405,25 +406,25 @@ struct FemtoWorldPionAllPair { for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { if ((p1.p() > 0.50)) { - float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPi()) + TMath::Sq(p1.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion1)) { continue; } } else if ((p1.p() <= 0.50)) { - float NSigmaPion1 = p1.tpcNSigmaPion(); + float NSigmaPion1 = p1.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion1)) { continue; } } if ((p2.p() > 0.50)) { - float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPi()) + TMath::Sq(p2.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion2)) { continue; } } else if ((p2.p() <= 0.50)) { - float NSigmaPion2 = p2.tpcNSigmaPion(); + float NSigmaPion2 = p2.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion2)) { continue; } @@ -449,11 +450,3 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) }; return workflow; } - -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) -{ - WorkflowSpec workflow{ - adaptAnalysisTask(cfgc), - }; - return workflow; -} diff --git a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx index e68ae07ffb8..4959ce90fe0 100644 --- a/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx +++ b/PWGCF/FemtoWorld/Tasks/femtoWorldPionPairTaskTrackTrack.cxx @@ -235,13 +235,13 @@ struct femtoWorldPionPairTaskTrackTrack { for (auto& part : groupPartsOne) { if ((part.p() > 0.50)) { - float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPi()) + TMath::Sq(part.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion)) { continue; } } else if ((part.p() <= 0.50)) { - float NSigmaPion = part.tpcNSigmaPion(); + float NSigmaPion = part.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion)) { continue; } @@ -256,13 +256,13 @@ struct femtoWorldPionPairTaskTrackTrack { for (auto& part : groupPartsTwo) { if ((part.p() > 0.50)) { - float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPion()) + TMath::Sq(part.tofNSigmaPion())); + float NSigmaPion = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(part.tpcNSigmaPi()) + TMath::Sq(part.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion)) { continue; } } else if ((part.p() <= 0.50)) { - float NSigmaPion = part.tpcNSigmaPion(); + float NSigmaPion = part.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion)) { continue; } @@ -278,25 +278,25 @@ struct femtoWorldPionPairTaskTrackTrack { for (auto& [p1, p2] : combinations(groupPartsOne, groupPartsTwo)) { if ((p1.p() > 0.50)) { - float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPi()) + TMath::Sq(p1.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion1)) { continue; } } else if ((p1.p() <= 0.50)) { - float NSigmaPion1 = p1.tpcNSigmaPion(); + float NSigmaPion1 = p1.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion1)) { continue; } } if ((p2.p() > 0.50)) { - float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPi()) + TMath::Sq(p2.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion2)) { continue; } } else if ((p2.p() <= 0.50)) { - float NSigmaPion2 = p2.tpcNSigmaPion(); + float NSigmaPion2 = p2.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion2)) { continue; } @@ -342,25 +342,25 @@ struct femtoWorldPionPairTaskTrackTrack { for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { if ((p1.p() > 0.50)) { - float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPion()) + TMath::Sq(p1.tofNSigmaPion())); + float NSigmaPion1 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p1.tpcNSigmaPi()) + TMath::Sq(p1.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion1)) { continue; } } else if ((p1.p() <= 0.50)) { - float NSigmaPion1 = p1.tpcNSigmaPion(); + float NSigmaPion1 = p1.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion1)) { continue; } } if ((p2.p() > 0.50)) { - float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPion()) + TMath::Sq(p2.tofNSigmaPion())); + float NSigmaPion2 = TMath::Sqrt(2.0) * TMath::Sqrt(TMath::Sq(p2.tpcNSigmaPi()) + TMath::Sq(p2.tofNSigmaPi())); if (!IsPionNSigma(NSigmaPion2)) { continue; } } else if ((p2.p() <= 0.50)) { - float NSigmaPion2 = p2.tpcNSigmaPion(); + float NSigmaPion2 = p2.tpcNSigmaPi(); if (!IsPionNSigma(NSigmaPion2)) { continue; }