diff --git a/PWGCF/Femto/FemtoNuclei/DataModel/HadronNucleiTables.h b/PWGCF/Femto/FemtoNuclei/DataModel/HadronNucleiTables.h new file mode 100644 index 00000000000..0ae1d298e1c --- /dev/null +++ b/PWGCF/Femto/FemtoNuclei/DataModel/HadronNucleiTables.h @@ -0,0 +1,121 @@ +// 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 HadronNucleiTables.h +/// \brief Slim tables for piNuclei +/// \author CMY +/// \date 2025-04-10 + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" + +#ifndef PWGCF_FEMTO_FEMTONUCLEI_DATAMODEL_HADRONNUCLEITABLES_H_ +#define PWGCF_FEMTO_FEMTONUCLEI_DATAMODEL_HADRONNUCLEITABLES_H_ + +namespace o2::aod +{ +namespace hadron_nuclei_tables +{ + +DECLARE_SOA_COLUMN(PtNu, ptNu, float); +DECLARE_SOA_COLUMN(EtaNu, etaNu, float); +DECLARE_SOA_COLUMN(PhiNu, phiNu, float); +DECLARE_SOA_COLUMN(PtHyp, ptHyp, float); +DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); +DECLARE_SOA_COLUMN(EtaHyp, etaHyp, float); +DECLARE_SOA_COLUMN(EtaHe3, etaHe3, float); +DECLARE_SOA_COLUMN(PhiHyp, phiHyp, float); +DECLARE_SOA_COLUMN(PtHad, ptHad, float); +DECLARE_SOA_COLUMN(EtaHad, etaHad, float); +DECLARE_SOA_COLUMN(PhiHad, phiHad, float); + +DECLARE_SOA_COLUMN(DcaxyNu, dcaxyNu, float); +DECLARE_SOA_COLUMN(DcazNu, dcazNu, float); +DECLARE_SOA_COLUMN(DcaxyHad, dcaxyHad, float); +DECLARE_SOA_COLUMN(DcazHad, dcazHad, float); + +DECLARE_SOA_COLUMN(SignalTPCNu, signalTPCNu, float); +DECLARE_SOA_COLUMN(InnerParamTPCNu, innerParamTPCNu, float); +DECLARE_SOA_COLUMN(SignalTPCHad, signalTPCHad, float); +DECLARE_SOA_COLUMN(InnerParamTPCHad, innerParamTPCHad, float); +DECLARE_SOA_COLUMN(NClsTPCNu, nClsTPCNu, uint8_t); +DECLARE_SOA_COLUMN(NSigmaTPCNu, nSigmaTPCNu, float); +DECLARE_SOA_COLUMN(NSigmaTPCHad, nSigmaTPCHad, float); +DECLARE_SOA_COLUMN(Chi2TPCNu, chi2TPCNu, float); +DECLARE_SOA_COLUMN(Chi2TPCHad, chi2TPCHad, float); +DECLARE_SOA_COLUMN(MassTOFNu, massTOFNu, float); +DECLARE_SOA_COLUMN(MassTOFHad, massTOFHad, float); +DECLARE_SOA_COLUMN(HaddTrkNu, pidTrkNu, uint32_t); +DECLARE_SOA_COLUMN(HaddTrkHad, pidTrkHad, uint32_t); +DECLARE_SOA_COLUMN(TrackIDHad, trackIDHad, int); +DECLARE_SOA_COLUMN(TrackIDNu, trackIDNu, int); + +DECLARE_SOA_COLUMN(ItsClusterSizeNu, itsClusterSizeNu, uint32_t); +DECLARE_SOA_COLUMN(ItsClusterSizeHad, itsClusterSizeHad, uint32_t); + +DECLARE_SOA_COLUMN(SharedClustersNu, sharedClustersNu, uint8_t); +DECLARE_SOA_COLUMN(SharedClustersHad, sharedClustersHad, uint8_t); + +DECLARE_SOA_COLUMN(IsBkgUS, isBkgUS, bool); +DECLARE_SOA_COLUMN(IsBkgEM, isBkgEM, bool); + +DECLARE_SOA_COLUMN(CollisionId, collisionId, int64_t); +DECLARE_SOA_COLUMN(ZVertex, zVertex, float); +DECLARE_SOA_COLUMN(Multiplicity, multiplicity, uint16_t); +DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); +DECLARE_SOA_COLUMN(MultiplicityFT0C, multiplicityFT0C, float); + +} // namespace hadron_nuclei_tables + +DECLARE_SOA_TABLE(HadronNucleiTable, "AOD", "HADNUCLEITABLE", + hadron_nuclei_tables::PtHad, + hadron_nuclei_tables::PtNu, + hadron_nuclei_tables::InnerParamTPCHad, + hadron_nuclei_tables::InnerParamTPCNu, + hadron_nuclei_tables::TrackIDHad, + hadron_nuclei_tables::TrackIDNu) +DECLARE_SOA_TABLE(HadronHyperTable, "AOD", "HADHYPERTABLE", + hadron_nuclei_tables::PtHyp, + hadron_nuclei_tables::EtaHyp, + hadron_nuclei_tables::PtHe3, + hadron_nuclei_tables::EtaHe3, + hadron_nuclei_tables::PhiHyp, + hadron_nuclei_tables::PtHad, + hadron_nuclei_tables::EtaHad, + hadron_nuclei_tables::PhiHad, + hadron_nuclei_tables::DcaxyHad, + hadron_nuclei_tables::DcazHad, + hadron_nuclei_tables::SignalTPCHad, + hadron_nuclei_tables::SignalTPCNu, + hadron_nuclei_tables::InnerParamTPCHad, + hadron_nuclei_tables::NSigmaTPCHad, + hadron_nuclei_tables::NSigmaTPCNu, + hadron_nuclei_tables::Chi2TPCHad, + hadron_nuclei_tables::Chi2TPCNu, + hadron_nuclei_tables::MassTOFHad, + hadron_nuclei_tables::HaddTrkHad, + hadron_nuclei_tables::ItsClusterSizeHad, + hadron_nuclei_tables::ItsClusterSizeNu, + hadron_nuclei_tables::SharedClustersHad, + hadron_nuclei_tables::TrackIDHad, + hadron_nuclei_tables::IsBkgUS, + hadron_nuclei_tables::IsBkgEM) +DECLARE_SOA_TABLE(HadronNucleiMult, "AOD", "HADNUCLEIMULT", + hadron_nuclei_tables::CollisionId, + hadron_nuclei_tables::ZVertex, + hadron_nuclei_tables::Multiplicity, + hadron_nuclei_tables::CentFT0C, + hadron_nuclei_tables::MultiplicityFT0C) + +} // namespace o2::aod + +#endif // PWGCF_FEMTO_FEMTONUCLEI_DATAMODEL_HADRONNUCLEITABLES_H_ diff --git a/PWGCF/Femto/FemtoNuclei/DataModel/PionNucleiTables.h b/PWGCF/Femto/FemtoNuclei/DataModel/PionNucleiTables.h deleted file mode 100644 index 1859c40b895..00000000000 --- a/PWGCF/Femto/FemtoNuclei/DataModel/PionNucleiTables.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// -/// \file PionNucleiTables.h -/// \brief Slim tables for piNuclei -/// \author CMY -/// \date 2025-04-10 - -#include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" - -#ifndef PWGCF_FEMTO_FEMTONUCLEI_DATAMODEL_PIONNUCLEITABLES_H_ -#define PWGCF_FEMTO_FEMTONUCLEI_DATAMODEL_PIONNUCLEITABLES_H_ - -namespace o2::aod -{ -namespace pion_nuclei_tables -{ - -DECLARE_SOA_COLUMN(PtNu, ptNu, float); -DECLARE_SOA_COLUMN(EtaNu, etaNu, float); -DECLARE_SOA_COLUMN(PhiNu, phiNu, float); -DECLARE_SOA_COLUMN(PtHyp, ptHyp, float); -DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); -DECLARE_SOA_COLUMN(EtaHyp, etaHyp, float); -DECLARE_SOA_COLUMN(EtaHe3, etaHe3, float); -DECLARE_SOA_COLUMN(PhiHyp, phiHyp, float); -DECLARE_SOA_COLUMN(PtPi, ptPi, float); -DECLARE_SOA_COLUMN(EtaPi, etaPi, float); -DECLARE_SOA_COLUMN(PhiPi, phiPi, float); - -DECLARE_SOA_COLUMN(DcaxyNu, dcaxyNu, float); -DECLARE_SOA_COLUMN(DcazNu, dcazNu, float); -DECLARE_SOA_COLUMN(DcaxyPi, dcaxyPi, float); -DECLARE_SOA_COLUMN(DcazPi, dcazPi, float); - -DECLARE_SOA_COLUMN(SignalTPCNu, signalTPCNu, float); -DECLARE_SOA_COLUMN(InnerParamTPCNu, innerParamTPCNu, float); -DECLARE_SOA_COLUMN(SignalTPCPi, signalTPCPi, float); -DECLARE_SOA_COLUMN(InnerParamTPCPi, innerParamTPCPi, float); -DECLARE_SOA_COLUMN(NClsTPCNu, nClsTPCNu, uint8_t); -DECLARE_SOA_COLUMN(NSigmaTPCNu, nSigmaTPCNu, float); -DECLARE_SOA_COLUMN(NSigmaTPCPi, nSigmaTPCPi, float); -DECLARE_SOA_COLUMN(Chi2TPCNu, chi2TPCNu, float); -DECLARE_SOA_COLUMN(Chi2TPCPi, chi2TPCPi, float); -DECLARE_SOA_COLUMN(MassTOFNu, massTOFNu, float); -DECLARE_SOA_COLUMN(MassTOFPi, massTOFPi, float); -DECLARE_SOA_COLUMN(PidTrkNu, pidTrkNu, uint32_t); -DECLARE_SOA_COLUMN(PidTrkPi, pidTrkPi, uint32_t); -DECLARE_SOA_COLUMN(TrackIDPi, trackIDPi, int); -DECLARE_SOA_COLUMN(TrackIDNu, trackIDNu, int); - -DECLARE_SOA_COLUMN(ItsClusterSizeNu, itsClusterSizeNu, uint32_t); -DECLARE_SOA_COLUMN(ItsClusterSizePi, itsClusterSizePi, uint32_t); - -DECLARE_SOA_COLUMN(SharedClustersNu, sharedClustersNu, uint8_t); -DECLARE_SOA_COLUMN(SharedClustersPi, sharedClustersPi, uint8_t); - -DECLARE_SOA_COLUMN(IsBkgUS, isBkgUS, bool); -DECLARE_SOA_COLUMN(IsBkgEM, isBkgEM, bool); - -DECLARE_SOA_COLUMN(CollisionId, collisionId, int64_t); -DECLARE_SOA_COLUMN(ZVertex, zVertex, float); -DECLARE_SOA_COLUMN(Multiplicity, multiplicity, uint16_t); -DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); -DECLARE_SOA_COLUMN(MultiplicityFT0C, multiplicityFT0C, float); - -} // namespace pion_nuclei_tables - -DECLARE_SOA_TABLE(PionNucleiTable, "AOD", "PINUCLEITABLE", - pion_nuclei_tables::PtPi, - pion_nuclei_tables::PtNu, - pion_nuclei_tables::InnerParamTPCPi, - pion_nuclei_tables::InnerParamTPCNu, - pion_nuclei_tables::TrackIDPi, - pion_nuclei_tables::TrackIDNu) -DECLARE_SOA_TABLE(PionHyperTable, "AOD", "PIHYPERTABLE", - pion_nuclei_tables::PtHyp, - pion_nuclei_tables::EtaHyp, - pion_nuclei_tables::PtHe3, - pion_nuclei_tables::EtaHe3, - pion_nuclei_tables::PhiHyp, - pion_nuclei_tables::PtPi, - pion_nuclei_tables::EtaPi, - pion_nuclei_tables::PhiPi, - pion_nuclei_tables::DcaxyPi, - pion_nuclei_tables::DcazPi, - pion_nuclei_tables::SignalTPCPi, - pion_nuclei_tables::SignalTPCNu, - pion_nuclei_tables::InnerParamTPCPi, - pion_nuclei_tables::NSigmaTPCPi, - pion_nuclei_tables::NSigmaTPCNu, - pion_nuclei_tables::Chi2TPCPi, - pion_nuclei_tables::Chi2TPCNu, - pion_nuclei_tables::MassTOFPi, - pion_nuclei_tables::PidTrkPi, - pion_nuclei_tables::ItsClusterSizePi, - pion_nuclei_tables::ItsClusterSizeNu, - pion_nuclei_tables::SharedClustersPi, - pion_nuclei_tables::TrackIDPi, - pion_nuclei_tables::IsBkgUS, - pion_nuclei_tables::IsBkgEM) -DECLARE_SOA_TABLE(PionNucleiMult, "AOD", "PINUCLEIMULT", - pion_nuclei_tables::CollisionId, - pion_nuclei_tables::ZVertex, - pion_nuclei_tables::Multiplicity, - pion_nuclei_tables::CentFT0C, - pion_nuclei_tables::MultiplicityFT0C) - -} // namespace o2::aod - -#endif // PWGCF_FEMTO_FEMTONUCLEI_DATAMODEL_PIONNUCLEITABLES_H_ diff --git a/PWGCF/Femto/FemtoNuclei/TableProducer/CMakeLists.txt b/PWGCF/Femto/FemtoNuclei/TableProducer/CMakeLists.txt index 4c6576278a5..8bd460b485f 100644 --- a/PWGCF/Femto/FemtoNuclei/TableProducer/CMakeLists.txt +++ b/PWGCF/Femto/FemtoNuclei/TableProducer/CMakeLists.txt @@ -9,7 +9,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -o2physics_add_dpl_workflow(pinucleifemto - SOURCES PiNucleiFemto.cxx +o2physics_add_dpl_workflow(hadnucleifemto + SOURCES HadNucleiFemto.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils COMPONENT_NAME Analysis) diff --git a/PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx b/PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx similarity index 68% rename from PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx rename to PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx index 1aff6d7fad8..73a2d246bc4 100644 --- a/PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx +++ b/PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx @@ -10,12 +10,12 @@ // or submit itself to any jurisdiction. // -/// \file PiNucleiFemto.cxx -/// \brief Analysis task for Nuclei-Pion femto analysis +/// \file HadNucleiFemto.cxx +/// \brief Analysis task for Nuclei-Hadron femto analysis /// \author CMY /// \date 2025-04-10 -#include "PWGCF/Femto/FemtoNuclei/DataModel/PionNucleiTables.h" +#include "PWGCF/Femto/FemtoNuclei/DataModel/HadronNucleiTables.h" #include "PWGCF/FemtoWorld/Core/FemtoWorldMath.h" #include "PWGLF/DataModel/EPCalibrationTables.h" #include "PWGLF/DataModel/LFHypernucleiTables.h" @@ -78,7 +78,7 @@ using std::array; using CollBracket = o2::math_utils::Bracket; using CollisionsFull = soa::Join; using CollisionsFullMC = soa::Join; -using TrackCandidates = soa::Join; +using TrackCandidates = soa::Join; namespace { @@ -92,58 +92,60 @@ enum Selections { kAll }; +float MassHad = 0; + } // namespace -struct PiNucandidate { +struct HadNucandidate { float recoPtNu() const { return signNu * std::hypot(momNu[0], momNu[1]); } float recoPhiNu() const { return std::atan2(momNu[1], momNu[0]); } float recoEtaNu() const { return std::asinh(momNu[2] / std::abs(recoPtNu())); } - float recoPtPi() const { return signPi * std::hypot(momPi[0], momPi[1]); } - float recoPhiPi() const { return std::atan2(momPi[1], momPi[0]); } - float recoEtaPi() const { return std::asinh(momPi[2] / std::abs(recoPtPi())); } + float recoPtHad() const { return signHad * std::hypot(momHad[0], momHad[1]); } + float recoPhiHad() const { return std::atan2(momHad[1], momHad[0]); } + float recoEtaHad() const { return std::asinh(momHad[2] / std::abs(recoPtHad())); } std::array momNu = {99.f, 99.f, 99.f}; - std::array momPi = {99.f, 99.f, 99.f}; + std::array momHad = {99.f, 99.f, 99.f}; float ptHe3 = 1.f; float etaHe3 = 1.f; float signNu = 1.f; - float signPi = 1.f; + float signHad = 1.f; float invMass = -10.f; float dcaxyNu = -10.f; float dcazNu = -10.f; - float dcaxyPi = -10.f; - float dcazPi = -10.f; + float dcaxyHad = -10.f; + float dcazHad = -10.f; uint16_t tpcSignalNu = 0u; - uint16_t tpcSignalPi = 0u; + uint16_t tpcSignalHad = 0u; float momNuTPC = -99.f; - float momPiTPC = -99.f; + float momHadTPC = -99.f; uint8_t nTPCClustersNu = 0u; uint8_t sharedClustersNu = 0u; - uint8_t sharedClustersPi = 0u; + uint8_t sharedClustersHad = 0u; float chi2TPCNu = -10.f; - float chi2TPCPi = -10.f; + float chi2TPCHad = -10.f; float nSigmaNu = -10.f; - float nSigmaPi = -10.f; + float nSigmaHad = -10.f; float tpcPrnsigma = -10.f; float tofPrnsigma = -10.f; uint32_t pidTrkNu = 0xFFFFF; // PID in tracking - uint32_t pidTrkPi = 0xFFFFF; + uint32_t pidTrkHad = 0xFFFFF; float massTOFNu = -10; - float massTOFPi = -10; + float massTOFHad = -10; uint32_t itsClSizeNu = 0u; - uint32_t itsClSizePi = 0u; + uint32_t itsClSizeHad = 0u; uint8_t nClsItsNu = 0u; - uint8_t nClsItsPi = 0u; + uint8_t nClsItsHad = 0u; bool isBkgUS = false; // unlike sign bool isBkgEM = false; // event mixing int trackIDNu = -1; - int trackIDPi = -1; + int trackIDHad = -1; float kstar = 1.f; float mT = 1.f; @@ -153,13 +155,15 @@ struct PiNucandidate { float cent = 1.f; }; -struct PiNucleiFemto { +struct HadNucleiFemto { - Produces mOutputDataTable; - Produces mOutputHyperDataTable; - Produces mOutputMultiplicityTable; + Produces mOutputDataTable; + Produces mOutputHyperDataTable; + Produces mOutputMultiplicityTable; // Selections + Configurable settingHadPDGCode{"settingHadPDGCode", 211, "Hadron - PDG code"}; + Configurable settingCutVertex{"settingCutVertex", 10.0f, "Accepted z-vertex range"}; Configurable settingCutPinMinDe{"settingCutPinMinDe", 0.0f, "Minimum Pin for De"}; Configurable settingCutEta{"settingCutEta", 0.8f, "Eta cut on daughter track"}; @@ -175,24 +179,25 @@ struct PiNucleiFemto { Configurable settingCutAverClsSizeHe{"settingCutAverClsSizeHe", 0.0f, "Minimum averClusSizeHe for Hyper He3"}; Configurable settingCutChi2NClITS{"settingCutChi2NClITS", 999.f, "Maximum ITS Chi2 for tracks"}; Configurable settingCutChi2NClITSPion{"settingCutChi2NClITSPion", 36.f, "Maximum ITS Chi2 for tracks only for pion"}; - Configurable settingCutNsigmaTPCPi{"settingCutNsigmaTPCPi", 3.0f, "Value of the TPC Nsigma cut on Pi"}; + Configurable settingCutNsigmaTPCHad{"settingCutNsigmaTPCHad", 3.0f, "Value of the TPC Nsigma cut on Had"}; + Configurable settingCutNsigmaTOFHad{"settingCutNsigmaTOFHad", 3.0f, "Value of the hsdron TOF Nsigma cut"}; Configurable settingCutNsigmaTPCDe{"settingCutNsigmaTPCDe", 2.5f, "Value of the TPC Nsigma cut on De"}; Configurable settingCutNsigmaITSDe{"settingCutNsigmaITSDe", 2.5f, "Value of the ITD Nsigma cut on De"}; - Configurable settingCutPinMinTOFPi{"settingCutPinMinTOFPi", 0.5f, "Minimum Pin to apply the TOF cut on Pions"}; + Configurable settingCutPinMinTOFHad{"settingCutPinMinTOFHad", 0.5f, "Minimum Pin to apply the TOF cut on hadrons"}; Configurable settingCutPinMinTOFITSDe{"settingCutPinMinTOFITSDe", 1.2f, "Minimum p to apply the TOF ITS cut on De"}; - Configurable settingCutNsigmaTOFTPCDe{"settingCutNsigmaTOFTPCDe", 2.5f, "Value of the De TOF TPC Nsigma cut"}; - Configurable settingCutNsigmaTOFTPCPi{"settingCutNsigmaTOFTPCPi", 3.0f, "Value of the Pion TOF TPC Nsigma cut"}; + Configurable settingCutNsigmaTOFTPCDe{"settingCutNsigmaTOFTPCDe", 2.5f, "Value of the De TOF TPC combNsigma cut"}; + Configurable settingCutNsigmaTOFTPCHad{"settingCutNsigmaTOFTPCHad", 3.0f, "Value of the hsdron TOF TPC combNsigma cut"}; Configurable settingNoMixedEvents{"settingNoMixedEvents", 5, "Number of mixed events per event"}; Configurable settingEnableBkgUS{"settingEnableBkgUS", false, "Enable US background"}; Configurable settingSaferME{"settingSaferME", false, "For Safer ME"}; Configurable settingFillTable{"settingFillTable", false, "Enable table filling"}; - Configurable settingCutPiptMin{"settingCutPiptMin", 0.14f, "Minimum PT cut on Pi"}; - Configurable settingCutPiptMax{"settingCutPiptMax", 4.0f, "Maximum PT cut on Pi"}; + Configurable settingCutHadptMin{"settingCutHadptMin", 0.14f, "Minimum PT cut on Had"}; + Configurable settingCutHadptMax{"settingCutHadptMax", 4.0f, "Maximum PT cut on Had"}; Configurable settingCutDeptMin{"settingCutDeptMin", 0.6f, "Minimum PT cut on De"}; Configurable settingCutDeptMax{"settingCutDeptMax", 1.6f, "Maximum PT cut on De"}; - Configurable settingCutPiDCAxyMin{"settingCutPiDCAxyMin", 0.3f, "DCAxy Min for Pi"}; - Configurable settingCutPiDCAzMin{"settingCutPiDCAzMin", 0.3f, "DCAz Min for Pi"}; + Configurable settingCutHadDCAxyMin{"settingCutHadDCAxyMin", 0.3f, "DCAxy Min for Had"}; + Configurable settingCutHadDCAzMin{"settingCutHadDCAzMin", 0.3f, "DCAz Min for Had"}; Configurable settingCutDeDCAzMin{"settingCutDeDCAzMin", 0.2f, "DCAxy Min for De"}; Configurable settingCutNsigTPCPrMin{"settingCutNsigTPCPrMin", 3.0f, "Minimum TPC Pr Nsigma cut on Pi"}; Configurable settingCutNsigTOFPrMin{"settingCutNsigTOFPrMin", 3.0f, "Minimum TOF Pr Nsigma cut on Pi"}; @@ -256,36 +261,36 @@ struct PiNucleiFemto { {"hdcazNu", ";DCA_{z} (cm)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, {"hdcazNu_min", ";DCA_{z}-min (cm)", {HistType::kTH1F, {{20, -1.0f, 1.0f}}}}, {"hNClsNuITS", ";N_{ITS} Cluster", {HistType::kTH1F, {{20, -10.0f, 10.0f}}}}, - {"hNClsPiITS", ";N_{ITS} Cluster", {HistType::kTH1F, {{20, -10.0f, 10.0f}}}}, - {"hNuPitInvMass", "; M(Nu + p) (GeV/#it{c}^{2})", {HistType::kTH1F, {{300, 3.74f, 4.34f}}}}, + {"hNClsHadITS", ";N_{ITS} Cluster", {HistType::kTH1F, {{20, -10.0f, 10.0f}}}}, + {"hNuHadtInvMass", "; M(Nu + p) (GeV/#it{c}^{2})", {HistType::kTH1F, {{300, 3.74f, 4.34f}}}}, {"hNuPt", "#it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{240, -6.0f, 6.0f}}}}, - {"hPiPt", "Pt distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}}, + {"hHadPt", "Pt distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}}, {"hSingleNuPt", "#it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{240, -6.0f, 6.0f}}}}, {"hNuPin", "#it{p} distribution; #it{p} (GeV/#it{c})", {HistType::kTH1F, {{240, -6.0f, 6.0f}}}}, - {"hPiPin", "P distribution; #it{p} (GeV/#it{c})", {HistType::kTH1F, {{120, -4.0f, 4.0f}}}}, + {"hHadPin", "P distribution; #it{p} (GeV/#it{c})", {HistType::kTH1F, {{120, -4.0f, 4.0f}}}}, {"hSingleNuPin", "#it{p} distribution; #it{p} (GeV/#it{c})", {HistType::kTH1F, {{240, -6.0f, 6.0f}}}}, {"hHe3TPCnsigma", "NsigmaHe3 TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(He3)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {200, -5.0f, 5.0f}}}}, {"hHe3P", "Pin distribution; p (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}}, {"hHe3P_preselected", "Pin distribution_preselected; p (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}}, {"hNuEta", "eta distribution; #eta(Nu)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, - {"hPiEta", "eta distribution; #eta(#pi)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, + {"hHadEta", "eta distribution; #eta(had)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, {"hNuPhi", "phi distribution; phi(Nu)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}}, - {"hPiPhi", "phi distribution; phi(#pi)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}}, + {"hHadPhi", "phi distribution; phi(had)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}}, {"h2dEdxNucandidates", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}}, {"h2dEdx", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}}, {"h2NsigmaNuTPC", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {200, -5.0f, 5.0f}}}}, {"h2NsigmaNuComb", "NsigmaNu TPCTOF comb distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{comb}(Nu)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {100, 0.0f, 5.0f}}}}, - {"h2NsigmaPiComb", "NsigmaPi TPCTOF comb distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{comb}(#pi)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {100, 0.0f, 5.0f}}}}, + {"h2NsigmaHadComb", "NsigmaHad TPCTOF comb distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{comb}(had)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {100, 0.0f, 5.0f}}}}, {"h2NsigmaNuTPC_preselection", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, {"h2NsigmaNuTPC_preselecComp", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, {"h2NSigmaNuITS_preselection", "NsigmaNu ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} Nu", {HistType::kTH2F, {{50, -5.0f, 5.0f}, {120, -3.0f, 3.0f}}}}, {"h2NSigmaNuITS", "NsigmaNu ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} Nu", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {120, -3.0f, 3.0f}}}}, - {"h2NsigmaPiTPC", "NsigmaPi TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, - {"h2NsigmaPiTPC_preselection", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, - {"h2NsigmaPiTOF", "NsigmaPi TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, + {"h2NsigmaHadTPC", "NsigmaHad TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, + {"h2NsigmaHadTPC_preselection", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, + {"h2NsigmaHadTOF", "NsigmaHad TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, {"h2NsigmaNuTOF", "NsigmaNu TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(Nu)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, - {"h2NsigmaPiTOF_preselection", "NsigmaPi TOF distribution; #iit{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, + {"h2NsigmaHadTOF_preselection", "NsigmaHad TOF distribution; #iit{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, {"hkStaVsmTVsCent_LS_M", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2, 3.2}, {100, 0.0f, 100.0f}}}}, {"hkStaVsmTVsCent_LS_A", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2, 3.2}, {100, 0.0f, 100.0f}}}}, {"hkStaVsmTVsCent_US_M", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2, 3.2}, {100, 0.0f, 100.0f}}}}, @@ -300,8 +305,8 @@ struct PiNucleiFemto { {"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, {"hkStar_US_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, {"hkStar_US_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"h2NsigmaPiPrTPC", "NsigmaPi TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}}, - {"h2NsigmaPiPrTOF", "NsigmaPi TOF distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}}, + {"h2NsigmaHadPrTPC", "NsigmaHad TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}}, + {"h2NsigmaHadPrTOF", "NsigmaHad TOF distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}}, {"hisBkgEM", "; isBkgEM;", {HistType::kTH1F, {{3, -1, 2}}}}}, OutputObjHandlingPolicy::AnalysisObject, false, @@ -486,48 +491,104 @@ struct PiNucleiFemto { return true; } + template + bool selectionPIDKaon(const Ttrack& candidate) + { + if (abs(candidate.dcaXY()) > settingCutHadDCAxyMin || abs(candidate.dcaZ()) > settingCutHadDCAzMin) + return false; + + auto tpcNSigmaKa = candidate.tpcNSigmaKa(); + mQaRegistry.fill(HIST("h2NsigmaHadTPC_preselection"), candidate.tpcInnerParam(), tpcNSigmaKa); + if (std::abs(candidate.pt()) < settingCutHadptMin || std::abs(candidate.pt()) > settingCutHadptMax) + return false; + + if (candidate.hasTOF() && candidate.tpcInnerParam() >= settingCutPinMinTOFHad) { + auto tofNSigmaKa = candidate.tofNSigmaKa(); + + mQaRegistry.fill(HIST("h2NsigmaHadTOF_preselection"), candidate.pt(), tofNSigmaKa); + if (std::abs(tofNSigmaKa) > settingCutNsigmaTOFHad) { + return false; + } + if (std::abs(tpcNSigmaKa) > settingCutNsigmaTPCHad) { + return false; + } + mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaKa); + mQaRegistry.fill(HIST("h2NsigmaHadTOF"), candidate.sign() * candidate.pt(), tofNSigmaKa); + return true; + } else if (candidate.tpcInnerParam() < settingCutPinMinTOFHad) { + if (std::abs(tpcNSigmaKa) > settingCutNsigmaTPCHad) { + return false; + } + mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaKa); + return true; + } + return false; + } + template bool selectionPIDPion(const Ttrack& candidate) { if (candidate.tpcChi2NCl() > settingCutChi2tpcHighPion || candidate.tpcChi2NCl() < settingCutChi2tpcLowPion || candidate.itsChi2NCl() > settingCutChi2NClITSPion) return false; - if (abs(candidate.dcaXY()) > settingCutPiDCAxyMin || abs(candidate.dcaZ()) > settingCutPiDCAzMin) + if (abs(candidate.dcaXY()) > settingCutHadDCAxyMin || abs(candidate.dcaZ()) > settingCutHadDCAzMin) return false; auto tpcNSigmaPi = candidate.tpcNSigmaPi(); - mQaRegistry.fill(HIST("h2NsigmaPiTPC_preselection"), candidate.tpcInnerParam(), tpcNSigmaPi); - if (std::abs(candidate.pt()) < settingCutPiptMin || std::abs(candidate.pt()) > settingCutPiptMax) + mQaRegistry.fill(HIST("h2NsigmaHadTPC_preselection"), candidate.tpcInnerParam(), tpcNSigmaPi); + if (std::abs(candidate.pt()) < settingCutHadptMin || std::abs(candidate.pt()) > settingCutHadptMax) return false; // reject protons if (std::abs(candidate.tpcNSigmaPr()) < settingCutNsigTPCPrMin) return false; - mQaRegistry.fill(HIST("h2NsigmaPiPrTPC"), candidate.tpcNSigmaPr()); + mQaRegistry.fill(HIST("h2NsigmaHadPrTPC"), candidate.tpcNSigmaPr()); if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPr()) < settingCutNsigTOFPrMin) return false; - mQaRegistry.fill(HIST("h2NsigmaPiPrTOF"), candidate.tofNSigmaPr()); + mQaRegistry.fill(HIST("h2NsigmaHadPrTOF"), candidate.tofNSigmaPr()); - if (candidate.hasTOF() && candidate.tpcInnerParam() >= settingCutPinMinTOFPi) { + if (candidate.hasTOF() && candidate.tpcInnerParam() >= settingCutPinMinTOFHad) { auto tofNSigmaPi = candidate.tofNSigmaPi(); auto combNsigma = std::sqrt(tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi); - mQaRegistry.fill(HIST("h2NsigmaPiTOF_preselection"), candidate.pt(), tofNSigmaPi); - if (combNsigma > settingCutNsigmaTOFTPCPi) { + mQaRegistry.fill(HIST("h2NsigmaHadTOF_preselection"), candidate.pt(), tofNSigmaPi); + // if (combNsigma > settingCutNsigmaTOFTPCHad) { + // return false; + // } + if (std::abs(tofNSigmaPi) > settingCutNsigmaTOFHad) { + return false; + } + if (std::abs(tpcNSigmaPi) > settingCutNsigmaTPCHad) { return false; } - mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi); - mQaRegistry.fill(HIST("h2NsigmaPiTOF"), candidate.sign() * candidate.pt(), tofNSigmaPi); - mQaRegistry.fill(HIST("h2NsigmaPiComb"), candidate.sign() * candidate.pt(), combNsigma); + mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi); + mQaRegistry.fill(HIST("h2NsigmaHadTOF"), candidate.sign() * candidate.pt(), tofNSigmaPi); + mQaRegistry.fill(HIST("h2NsigmaHadComb"), candidate.sign() * candidate.pt(), combNsigma); return true; - } else if (candidate.tpcInnerParam() < settingCutPinMinTOFPi) { - if (std::abs(tpcNSigmaPi) > settingCutNsigmaTPCPi) { + } else if (candidate.tpcInnerParam() < settingCutPinMinTOFHad) { + if (std::abs(tpcNSigmaPi) > settingCutNsigmaTPCHad) { return false; } - mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi); + mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi); return true; } return false; } + template + bool selectionPIDHadron(const Ttrack& candidate) + { + bool PID = false; + if (settingHadPDGCode == PDG_t::kPiPlus) { + PID = selectionPIDPion(candidate); + MassHad = o2::constants::physics::MassPiPlus; + } else if (settingHadPDGCode == PDG_t::kKPlus) { + PID = selectionPIDKaon(candidate); + MassHad = o2::constants::physics::MassKPlus; + } else { + LOG(info) << "invalid PDG code"; + } + return PID; + } + template float computeNSigmaDe(const Ttrack& candidate) { @@ -628,15 +689,15 @@ struct PiNucleiFemto { // ================================================================================================================== template - bool fillCandidateInfo(const Ttrack& trackDe, const Ttrack& trackPi, const CollBracket& collBracket, const Tcollisions& collisions, PiNucandidate& piNucand, const Ttracks& /*trackTable*/, bool isMixedEvent) + bool fillCandidateInfo(const Ttrack& trackDe, const Ttrack& trackHad, const CollBracket& collBracket, const Tcollisions& collisions, HadNucandidate& hadNucand, const Ttracks& /*trackTable*/, bool isMixedEvent) { const int numCoordinates = 3; if (!isMixedEvent) { auto trackCovDe = getTrackParCov(trackDe); - auto trackCovPi = getTrackParCov(trackPi); + auto trackCovHad = getTrackParCov(trackHad); int nCand = 0; try { - nCand = mFitter.process(trackCovDe, trackCovPi); + nCand = mFitter.process(trackCovDe, trackCovHad); } catch (...) { LOG(error) << "Exception caught in DCA fitter process call!"; mQaRegistry.fill(HIST("hSkipReasons"), 0); @@ -669,88 +730,88 @@ struct PiNucleiFemto { mQaRegistry.fill(HIST("hSkipReasons"), 2); return false; } - piNucand.collisionID = collIdxMin; + hadNucand.collisionID = collIdxMin; } else { - piNucand.collisionID = collBracket.getMin(); + hadNucand.collisionID = collBracket.getMin(); } - piNucand.momNu = std::array{trackDe.px(), trackDe.py(), trackDe.pz()}; - piNucand.momPi = std::array{trackPi.px(), trackPi.py(), trackPi.pz()}; + hadNucand.momNu = std::array{trackDe.px(), trackDe.py(), trackDe.pz()}; + hadNucand.momHad = std::array{trackHad.px(), trackHad.py(), trackHad.pz()}; float invMass = 0; - invMass = RecoDecay::m(std::array{piNucand.momNu, piNucand.momPi}, std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassPiPlus}); + invMass = RecoDecay::m(std::array, 2>{hadNucand.momNu, hadNucand.momHad}, std::array{static_cast(o2::constants::physics::MassDeuteron), MassHad}); if (settingCutInvMass > 0 && invMass > settingCutInvMass) { mQaRegistry.fill(HIST("hSkipReasons"), 3); return false; } - float ptDePi = std::hypot(piNucand.momNu[0] + piNucand.momPi[0], piNucand.momNu[1] + piNucand.momPi[1]); - if (ptDePi < settingCutPtMinDePi) { + float ptDeHad = std::hypot(hadNucand.momNu[0] + hadNucand.momHad[0], hadNucand.momNu[1] + hadNucand.momHad[1]); + if (ptDeHad < settingCutPtMinDePi) { mQaRegistry.fill(HIST("hSkipReasons"), 4); return false; } - piNucand.signNu = trackDe.sign(); - piNucand.signPi = trackPi.sign(); + hadNucand.signNu = trackDe.sign(); + hadNucand.signHad = trackHad.sign(); - piNucand.dcaxyNu = trackDe.dcaXY(); - piNucand.dcaxyPi = trackPi.dcaXY(); + hadNucand.dcaxyNu = trackDe.dcaXY(); + hadNucand.dcaxyHad = trackHad.dcaXY(); - piNucand.dcazNu = trackDe.dcaZ(); - piNucand.dcazPi = trackPi.dcaZ(); + hadNucand.dcazNu = trackDe.dcaZ(); + hadNucand.dcazHad = trackHad.dcaZ(); - piNucand.tpcSignalNu = trackDe.tpcSignal(); - piNucand.momNuTPC = trackDe.tpcInnerParam(); - piNucand.tpcSignalPi = trackPi.tpcSignal(); - piNucand.momPiTPC = trackPi.tpcInnerParam(); + hadNucand.tpcSignalNu = trackDe.tpcSignal(); + hadNucand.momNuTPC = trackDe.tpcInnerParam(); + hadNucand.tpcSignalHad = trackHad.tpcSignal(); + hadNucand.momHadTPC = trackHad.tpcInnerParam(); - piNucand.nTPCClustersNu = trackDe.tpcNClsFound(); - piNucand.nSigmaNu = computeNSigmaDe(trackDe); - piNucand.nSigmaPi = trackPi.tpcNSigmaPi(); + hadNucand.nTPCClustersNu = trackDe.tpcNClsFound(); + hadNucand.nSigmaNu = computeNSigmaDe(trackDe); + hadNucand.nSigmaHad = trackHad.tpcNSigmaPi(); - piNucand.chi2TPCNu = trackDe.tpcChi2NCl(); - piNucand.chi2TPCPi = trackPi.tpcChi2NCl(); + hadNucand.chi2TPCNu = trackDe.tpcChi2NCl(); + hadNucand.chi2TPCHad = trackHad.tpcChi2NCl(); - piNucand.pidTrkNu = trackDe.pidForTracking(); - piNucand.pidTrkPi = trackPi.pidForTracking(); + hadNucand.pidTrkNu = trackDe.pidForTracking(); + hadNucand.pidTrkHad = trackHad.pidForTracking(); - piNucand.itsClSizeNu = trackDe.itsClusterSizes(); - piNucand.itsClSizePi = trackPi.itsClusterSizes(); + hadNucand.itsClSizeNu = trackDe.itsClusterSizes(); + hadNucand.itsClSizeHad = trackHad.itsClusterSizes(); - piNucand.nClsItsNu = trackDe.itsNCls(); - piNucand.nClsItsPi = trackPi.itsNCls(); + hadNucand.nClsItsNu = trackDe.itsNCls(); + hadNucand.nClsItsHad = trackHad.itsNCls(); - piNucand.sharedClustersNu = trackDe.tpcNClsShared(); - piNucand.sharedClustersPi = trackPi.tpcNClsShared(); + hadNucand.sharedClustersNu = trackDe.tpcNClsShared(); + hadNucand.sharedClustersHad = trackHad.tpcNClsShared(); - piNucand.isBkgUS = trackDe.sign() * trackPi.sign() < 0; - piNucand.isBkgEM = isMixedEvent; + hadNucand.isBkgUS = trackDe.sign() * trackHad.sign() < 0; + hadNucand.isBkgEM = isMixedEvent; - piNucand.invMass = invMass; + hadNucand.invMass = invMass; - piNucand.trackIDNu = trackDe.globalIndex(); - piNucand.trackIDPi = trackPi.globalIndex(); + hadNucand.trackIDNu = trackDe.globalIndex(); + hadNucand.trackIDHad = trackHad.globalIndex(); if (trackDe.hasTOF()) { float beta = o2::pid::tof::Beta::GetBeta(trackDe); beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked float tpcInnerParamDe = trackDe.tpcInnerParam(); - piNucand.massTOFNu = tpcInnerParamDe * std::sqrt(1.f / (beta * beta) - 1.f); + hadNucand.massTOFNu = tpcInnerParamDe * std::sqrt(1.f / (beta * beta) - 1.f); } - if (trackPi.hasTOF()) { - float beta = o2::pid::tof::Beta::GetBeta(trackPi); + if (trackHad.hasTOF()) { + float beta = o2::pid::tof::Beta::GetBeta(trackHad); beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked - piNucand.massTOFPi = trackPi.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f); + hadNucand.massTOFHad = trackHad.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f); } - piNucand.kstar = o2::analysis::femtoWorld::FemtoWorldMath::getkstar(trackPi, o2::constants::physics::MassPiPlus, trackDe, o2::constants::physics::MassDeuteron); - piNucand.mT = o2::analysis::femtoWorld::FemtoWorldMath::getmT(trackPi, o2::constants::physics::MassPiPlus, trackDe, o2::constants::physics::MassDeuteron); + hadNucand.kstar = o2::analysis::femtoWorld::FemtoWorldMath::getkstar(trackHad, MassHad, trackDe, o2::constants::physics::MassDeuteron); + hadNucand.mT = o2::analysis::femtoWorld::FemtoWorldMath::getmT(trackHad, MassHad, trackDe, o2::constants::physics::MassDeuteron); return true; } template - bool fillCandidateInfoHyper(const aod::DataHypCandsWColl::iterator& V0Hyper, const Ttrack& trackPi, PiNucandidate& piHypercand, bool isMixedEvent) + bool fillCandidateInfoHyper(const aod::DataHypCandsWColl::iterator& V0Hyper, const Ttrack& trackHad, HadNucandidate& hadHypercand, bool isMixedEvent) { - piHypercand.collisionID = V0Hyper.collisionId(); + hadHypercand.collisionID = V0Hyper.collisionId(); // get hypertriton information // constexpr double mHe3 = o2::constants::physics::MassHelium3; // constexpr double mPi = o2::constants::physics::MassPiPlus; @@ -770,48 +831,48 @@ struct PiNucleiFemto { float px = pxHe3 + pxPi; float py = pyHe3 + pyPi; float pz = pzHe3 + pzPi; - piHypercand.momNu = std::array{px, py, pz}; - piHypercand.momPi = std::array{trackPi.px(), trackPi.py(), trackPi.pz()}; + hadHypercand.momNu = std::array{px, py, pz}; + hadHypercand.momHad = std::array{trackHad.px(), trackHad.py(), trackHad.pz()}; float invMass = 0; - invMass = RecoDecay::m(std::array{piHypercand.momNu, piHypercand.momPi}, std::array{o2::constants::physics::MassHelium3, o2::constants::physics::MassPiPlus}); + invMass = RecoDecay::m(std::array, 2>{hadHypercand.momNu, hadHypercand.momHad}, std::array{static_cast(o2::constants::physics::MassHelium3), MassHad}); if (settingCutInvMass > 0 && invMass > settingCutInvMass) { return false; } - piHypercand.signPi = trackPi.sign(); + hadHypercand.signHad = trackHad.sign(); if (V0Hyper.isMatter()) { - piHypercand.signNu = 1; + hadHypercand.signNu = 1; } else { - piHypercand.signNu = -1; + hadHypercand.signNu = -1; } - piHypercand.etaHe3 = V0Hyper.etaHe3(); - piHypercand.ptHe3 = V0Hyper.ptHe3(); - piHypercand.dcaxyPi = trackPi.dcaXY(); - piHypercand.dcazPi = trackPi.dcaZ(); - piHypercand.tpcSignalPi = trackPi.tpcSignal(); - piHypercand.tpcSignalNu = V0Hyper.tpcSignalHe(); - piHypercand.momPiTPC = trackPi.tpcInnerParam(); - piHypercand.nSigmaPi = trackPi.tpcNSigmaPi(); - piHypercand.nSigmaNu = V0Hyper.nSigmaHe(); - piHypercand.chi2TPCPi = trackPi.tpcChi2NCl(); - piHypercand.chi2TPCNu = V0Hyper.tpcChi2He(); - piHypercand.pidTrkPi = trackPi.pidForTracking(); - piHypercand.itsClSizePi = trackPi.itsClusterSizes(); - piHypercand.itsClSizeNu = V0Hyper.itsClusterSizesHe(); - piHypercand.nClsItsPi = trackPi.itsNCls(); - piHypercand.sharedClustersPi = trackPi.tpcNClsShared(); - - piHypercand.isBkgUS = piHypercand.signNu * trackPi.sign() < 0; - piHypercand.isBkgEM = isMixedEvent; - piHypercand.invMass = invMass; - - piHypercand.trackIDPi = trackPi.globalIndex(); - - if (trackPi.hasTOF()) { - float beta = o2::pid::tof::Beta::GetBeta(trackPi); + hadHypercand.etaHe3 = V0Hyper.etaHe3(); + hadHypercand.ptHe3 = V0Hyper.ptHe3(); + hadHypercand.dcaxyHad = trackHad.dcaXY(); + hadHypercand.dcazHad = trackHad.dcaZ(); + hadHypercand.tpcSignalHad = trackHad.tpcSignal(); + hadHypercand.tpcSignalNu = V0Hyper.tpcSignalHe(); + hadHypercand.momHadTPC = trackHad.tpcInnerParam(); + hadHypercand.nSigmaHad = trackHad.tpcNSigmaPi(); + hadHypercand.nSigmaNu = V0Hyper.nSigmaHe(); + hadHypercand.chi2TPCHad = trackHad.tpcChi2NCl(); + hadHypercand.chi2TPCNu = V0Hyper.tpcChi2He(); + hadHypercand.pidTrkHad = trackHad.pidForTracking(); + hadHypercand.itsClSizeHad = trackHad.itsClusterSizes(); + hadHypercand.itsClSizeNu = V0Hyper.itsClusterSizesHe(); + hadHypercand.nClsItsHad = trackHad.itsNCls(); + hadHypercand.sharedClustersHad = trackHad.tpcNClsShared(); + + hadHypercand.isBkgUS = hadHypercand.signNu * trackHad.sign() < 0; + hadHypercand.isBkgEM = isMixedEvent; + hadHypercand.invMass = invMass; + + hadHypercand.trackIDHad = trackHad.globalIndex(); + + if (trackHad.hasTOF()) { + float beta = o2::pid::tof::Beta::GetBeta(trackHad); beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked - piHypercand.massTOFPi = trackPi.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f); + hadHypercand.massTOFHad = trackHad.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f); } return true; } @@ -850,7 +911,7 @@ struct PiNucleiFemto { } } - if (!selectTrack(track1) || !selectionPIDPion(track1)) { + if (!selectTrack(track1) || !selectionPIDHadron(track1)) { continue; } @@ -866,29 +927,29 @@ struct PiNucleiFemto { } template - void pairTracksSameEventHyper(const Ttrack& piTracks, const Thypers& V0Hypers) + void pairTracksSameEventHyper(const Ttrack& hadTracks, const Thypers& V0Hypers) { for (const auto& V0Hyper : V0Hypers) { if (!selectionPIDHyper(V0Hyper)) { continue; } - for (const auto& piTrack : piTracks) { + for (const auto& hadTrack : hadTracks) { mQaRegistry.fill(HIST("hTrackSel"), Selections::kNoCuts); - if (!selectTrack(piTrack)) { + if (!selectTrack(hadTrack)) { continue; } mQaRegistry.fill(HIST("hTrackSel"), Selections::kTrackCuts); - if (!selectionPIDPion(piTrack)) { + if (!selectionPIDHadron(hadTrack)) { continue; } mQaRegistry.fill(HIST("hTrackSel"), Selections::kPID); SVCand pair; pair.tr0Idx = V0Hyper.globalIndex(); - pair.tr1Idx = piTrack.globalIndex(); + pair.tr1Idx = hadTrack.globalIndex(); const int collIdx = V0Hyper.collisionId(); CollBracket collBracket{collIdx, collIdx}; pair.collBracket = collBracket; @@ -898,20 +959,20 @@ struct PiNucleiFemto { } template - void pairTracksEventMixing(T& DeCands, T& pionCands) + void pairTracksEventMixing(T& DeCands, T& hadCands) { for (const auto& DeCand : DeCands) { if (!selectTrack(DeCand) || !selectionPIDDe(DeCand)) { continue; } - for (const auto& pionCand : pionCands) { - if (!selectTrack(pionCand) || !selectionPIDPion(pionCand)) { + for (const auto& hadCand : hadCands) { + if (!selectTrack(hadCand) || !selectionPIDHadron(hadCand)) { continue; } SVCand trackPair; trackPair.tr0Idx = DeCand.globalIndex(); - trackPair.tr1Idx = pionCand.globalIndex(); + trackPair.tr1Idx = hadCand.globalIndex(); const int collIdx = DeCand.collisionId(); CollBracket collBracket{collIdx, collIdx}; trackPair.collBracket = collBracket; @@ -921,20 +982,20 @@ struct PiNucleiFemto { } template - void pairHyperEventMixing(T1& pionCands, T2& hypCands) + void pairHyperEventMixing(T1& hadCands, T2& hypCands) { for (const auto& hypCand : hypCands) { if (!selectionPIDHyper(hypCand)) { continue; } - for (const auto& pionCand : pionCands) { - if (!selectTrack(pionCand) || !selectionPIDPion(pionCand)) { + for (const auto& hadCand : hadCands) { + if (!selectTrack(hadCand) || !selectionPIDHadron(hadCand)) { continue; } SVCand pair; pair.tr0Idx = hypCand.globalIndex(); - pair.tr1Idx = pionCand.globalIndex(); + pair.tr1Idx = hadCand.globalIndex(); const int collIdx = hypCand.collisionId(); CollBracket collBracket{collIdx, collIdx}; pair.collBracket = collBracket; @@ -944,15 +1005,15 @@ struct PiNucleiFemto { } template - void fillTable(const PiNucandidate& piNucand, const Tcoll& collision) + void fillTable(const HadNucandidate& hadNucand, const Tcoll& collision) { mOutputDataTable( - piNucand.recoPtPi(), - piNucand.recoPtNu(), - piNucand.momPiTPC, - piNucand.momNuTPC, - piNucand.trackIDPi, - piNucand.trackIDNu); + hadNucand.recoPtHad(), + hadNucand.recoPtNu(), + hadNucand.momHadTPC, + hadNucand.momNuTPC, + hadNucand.trackIDHad, + hadNucand.trackIDNu); if (settingFillMultiplicity) { mOutputMultiplicityTable( collision.globalIndex(), @@ -964,34 +1025,34 @@ struct PiNucleiFemto { } template - void fillTableHyper(const PiNucandidate& piNucand, const Tcoll& collision) + void fillTableHyper(const HadNucandidate& hadNucand, const Tcoll& collision) { mOutputHyperDataTable( - piNucand.recoPtNu(), - piNucand.recoEtaNu(), - piNucand.ptHe3, - piNucand.etaHe3, - piNucand.recoPhiNu(), - piNucand.recoPtPi(), - piNucand.recoEtaPi(), - piNucand.recoPhiPi(), - piNucand.dcaxyPi, - piNucand.dcazPi, - piNucand.tpcSignalPi, - piNucand.tpcSignalNu, - piNucand.momPiTPC, - piNucand.nSigmaPi, - piNucand.nSigmaNu, - piNucand.chi2TPCPi, - piNucand.chi2TPCNu, - piNucand.massTOFPi, - piNucand.pidTrkPi, - piNucand.itsClSizePi, - piNucand.itsClSizeNu, - piNucand.sharedClustersPi, - piNucand.trackIDPi, - piNucand.isBkgUS, - piNucand.isBkgEM); + hadNucand.recoPtNu(), + hadNucand.recoEtaNu(), + hadNucand.ptHe3, + hadNucand.etaHe3, + hadNucand.recoPhiNu(), + hadNucand.recoPtHad(), + hadNucand.recoEtaHad(), + hadNucand.recoPhiHad(), + hadNucand.dcaxyHad, + hadNucand.dcazHad, + hadNucand.tpcSignalHad, + hadNucand.tpcSignalNu, + hadNucand.momHadTPC, + hadNucand.nSigmaHad, + hadNucand.nSigmaNu, + hadNucand.chi2TPCHad, + hadNucand.chi2TPCNu, + hadNucand.massTOFHad, + hadNucand.pidTrkHad, + hadNucand.itsClSizeHad, + hadNucand.itsClSizeNu, + hadNucand.sharedClustersHad, + hadNucand.trackIDHad, + hadNucand.isBkgUS, + hadNucand.isBkgEM); if (settingFillMultiplicity) { mOutputMultiplicityTable( collision.globalIndex(), @@ -1002,47 +1063,47 @@ struct PiNucleiFemto { } } - void fillHistograms(const PiNucandidate& piNucand) + void fillHistograms(const HadNucandidate& hadNucand) { - mQaRegistry.fill(HIST("hNuPt"), piNucand.recoPtNu()); - mQaRegistry.fill(HIST("hPiPt"), piNucand.recoPtPi()); - mQaRegistry.fill(HIST("hNuPin"), piNucand.momNuTPC * piNucand.signNu); - mQaRegistry.fill(HIST("hPiPin"), piNucand.momPiTPC * piNucand.signPi); - mQaRegistry.fill(HIST("hNuEta"), piNucand.recoEtaNu()); - mQaRegistry.fill(HIST("hPiEta"), piNucand.recoEtaPi()); - mQaRegistry.fill(HIST("hNuPhi"), piNucand.recoPhiNu()); - mQaRegistry.fill(HIST("hPiPhi"), piNucand.recoPhiPi()); - mQaRegistry.fill(HIST("hNuPitInvMass"), piNucand.invMass); - mQaRegistry.fill(HIST("hdcaxyNu"), piNucand.dcaxyNu); - mQaRegistry.fill(HIST("hdcazNu"), piNucand.dcazNu); - mQaRegistry.fill(HIST("hdcazNu_min"), (abs(piNucand.dcazNu) - settingCutDeDCAzMin)); - mQaRegistry.fill(HIST("hNClsNuITS"), piNucand.nClsItsNu); - mQaRegistry.fill(HIST("hNClsPiITS"), piNucand.nClsItsPi); - mQaRegistry.fill(HIST("hisBkgEM"), piNucand.isBkgEM); + mQaRegistry.fill(HIST("hNuPt"), hadNucand.recoPtNu()); + mQaRegistry.fill(HIST("hHadPt"), hadNucand.recoPtHad()); + mQaRegistry.fill(HIST("hNuPin"), hadNucand.momNuTPC * hadNucand.signNu); + mQaRegistry.fill(HIST("hHadPin"), hadNucand.momHadTPC * hadNucand.signHad); + mQaRegistry.fill(HIST("hNuEta"), hadNucand.recoEtaNu()); + mQaRegistry.fill(HIST("hHadEta"), hadNucand.recoEtaHad()); + mQaRegistry.fill(HIST("hNuPhi"), hadNucand.recoPhiNu()); + mQaRegistry.fill(HIST("hHadPhi"), hadNucand.recoPhiHad()); + mQaRegistry.fill(HIST("hNuHadtInvMass"), hadNucand.invMass); + mQaRegistry.fill(HIST("hdcaxyNu"), hadNucand.dcaxyNu); + mQaRegistry.fill(HIST("hdcazNu"), hadNucand.dcazNu); + mQaRegistry.fill(HIST("hdcazNu_min"), (abs(hadNucand.dcazNu) - settingCutDeDCAzMin)); + mQaRegistry.fill(HIST("hNClsNuITS"), hadNucand.nClsItsNu); + mQaRegistry.fill(HIST("hNClsHadITS"), hadNucand.nClsItsHad); + mQaRegistry.fill(HIST("hisBkgEM"), hadNucand.isBkgEM); } template - void fillKstar(const PiNucandidate& piNucand, const Tcoll& collision) + void fillKstar(const HadNucandidate& hadNucand, const Tcoll& collision) { - if (piNucand.isBkgUS == 0) { - if (piNucand.recoPtNu() > 0) { - mQaRegistry.fill(HIST("hkStar_LS_M"), piNucand.kstar); - mQaRegistry.fill(HIST("hkStaVsmTVsCent_LS_M"), piNucand.kstar, piNucand.mT, collision.centFT0C()); - mQaRegistry.fill(HIST("hkStaVsmT_LS_M"), piNucand.kstar, piNucand.mT); + if (hadNucand.isBkgUS == 0) { + if (hadNucand.recoPtNu() > 0) { + mQaRegistry.fill(HIST("hkStar_LS_M"), hadNucand.kstar); + mQaRegistry.fill(HIST("hkStaVsmTVsCent_LS_M"), hadNucand.kstar, hadNucand.mT, collision.centFT0C()); + mQaRegistry.fill(HIST("hkStaVsmT_LS_M"), hadNucand.kstar, hadNucand.mT); } else { - mQaRegistry.fill(HIST("hkStar_LS_A"), piNucand.kstar); - mQaRegistry.fill(HIST("hkStaVsmTVsCent_LS_A"), piNucand.kstar, piNucand.mT, collision.centFT0C()); - mQaRegistry.fill(HIST("hkStaVsmT_LS_A"), piNucand.kstar, piNucand.mT); + mQaRegistry.fill(HIST("hkStar_LS_A"), hadNucand.kstar); + mQaRegistry.fill(HIST("hkStaVsmTVsCent_LS_A"), hadNucand.kstar, hadNucand.mT, collision.centFT0C()); + mQaRegistry.fill(HIST("hkStaVsmT_LS_A"), hadNucand.kstar, hadNucand.mT); } } else { - if (piNucand.recoPtNu() > 0) { - mQaRegistry.fill(HIST("hkStar_US_M"), piNucand.kstar); - mQaRegistry.fill(HIST("hkStaVsmTVsCent_US_M"), piNucand.kstar, piNucand.mT, collision.centFT0C()); - mQaRegistry.fill(HIST("hkStaVsmT_US_M"), piNucand.kstar, piNucand.mT); + if (hadNucand.recoPtNu() > 0) { + mQaRegistry.fill(HIST("hkStar_US_M"), hadNucand.kstar); + mQaRegistry.fill(HIST("hkStaVsmTVsCent_US_M"), hadNucand.kstar, hadNucand.mT, collision.centFT0C()); + mQaRegistry.fill(HIST("hkStaVsmT_US_M"), hadNucand.kstar, hadNucand.mT); } else { - mQaRegistry.fill(HIST("hkStar_US_A"), piNucand.kstar); - mQaRegistry.fill(HIST("hkStaVsmTVsCent_US_A"), piNucand.kstar, piNucand.mT, collision.centFT0C()); - mQaRegistry.fill(HIST("hkStaVsmT_US_A"), piNucand.kstar, piNucand.mT); + mQaRegistry.fill(HIST("hkStar_US_A"), hadNucand.kstar); + mQaRegistry.fill(HIST("hkStaVsmTVsCent_US_A"), hadNucand.kstar, hadNucand.mT, collision.centFT0C()); + mQaRegistry.fill(HIST("hkStaVsmT_US_A"), hadNucand.kstar, hadNucand.mT); } } } @@ -1055,52 +1116,52 @@ struct PiNucleiFemto { for (const auto& trackPair : mTrackPairs) { auto deTrack = tracks.rawIteratorAt(trackPair.tr0Idx); - auto piTrack = tracks.rawIteratorAt(trackPair.tr1Idx); + auto hadTrack = tracks.rawIteratorAt(trackPair.tr1Idx); auto collBracket = trackPair.collBracket; - PiNucandidate piNucand; - if (!fillCandidateInfo(deTrack, piTrack, collBracket, collisions, piNucand, tracks, isMixedEvent)) { + HadNucandidate hadNucand; + if (!fillCandidateInfo(deTrack, hadTrack, collBracket, collisions, hadNucand, tracks, isMixedEvent)) { continue; } - auto collision = collisions.rawIteratorAt(piNucand.collisionID); - fillKstar(piNucand, collision); - fillHistograms(piNucand); + auto collision = collisions.rawIteratorAt(hadNucand.collisionID); + fillKstar(hadNucand, collision); + fillHistograms(hadNucand); if (settingFillTable) { - fillTable(piNucand, collision); + fillTable(hadNucand, collision); } } } template - void fillPairsHyper(const Tcollisions& collisions, const Ttracks& piTracks, const o2::aod::DataHypCandsWColl& V0Hypers, const bool isMixedEvent) + void fillPairsHyper(const Tcollisions& collisions, const Ttracks& hadTracks, const o2::aod::DataHypCandsWColl& V0Hypers, const bool isMixedEvent) { for (const auto& trackPair : mTrackHypPairs) { auto v0hyper = V0Hypers.rawIteratorAt(trackPair.tr0Idx); - auto piTrack = piTracks.rawIteratorAt(trackPair.tr1Idx); + auto hadTrack = hadTracks.rawIteratorAt(trackPair.tr1Idx); // auto collBracket = trackPair.collBracket; - PiNucandidate piNucand; - if (!fillCandidateInfoHyper(v0hyper, piTrack, piNucand, isMixedEvent)) { + HadNucandidate hadNucand; + if (!fillCandidateInfoHyper(v0hyper, hadTrack, hadNucand, isMixedEvent)) { continue; } - mQaRegistry.fill(HIST("hNuPt"), piNucand.recoPtNu()); - mQaRegistry.fill(HIST("hPiPt"), piNucand.recoPtPi()); - mQaRegistry.fill(HIST("hNuEta"), piNucand.recoEtaNu()); - mQaRegistry.fill(HIST("hPiEta"), piNucand.recoEtaPi()); - mQaRegistry.fill(HIST("hNuPhi"), piNucand.recoPhiNu()); - mQaRegistry.fill(HIST("hPiPhi"), piNucand.recoPhiPi()); - mQaRegistry.fill(HIST("hNuPitInvMass"), piNucand.invMass); - mQaRegistry.fill(HIST("hNClsPiITS"), piNucand.nClsItsPi); - mQaRegistry.fill(HIST("hisBkgEM"), piNucand.isBkgEM); + mQaRegistry.fill(HIST("hNuPt"), hadNucand.recoPtNu()); + mQaRegistry.fill(HIST("hHadPt"), hadNucand.recoPtHad()); + mQaRegistry.fill(HIST("hNuEta"), hadNucand.recoEtaNu()); + mQaRegistry.fill(HIST("hHadEta"), hadNucand.recoEtaHad()); + mQaRegistry.fill(HIST("hNuPhi"), hadNucand.recoPhiNu()); + mQaRegistry.fill(HIST("hHadPhi"), hadNucand.recoPhiHad()); + mQaRegistry.fill(HIST("hNuHadtInvMass"), hadNucand.invMass); + mQaRegistry.fill(HIST("hNClsHadITS"), hadNucand.nClsItsHad); + mQaRegistry.fill(HIST("hisBkgEM"), hadNucand.isBkgEM); - auto collision = collisions.rawIteratorAt(piNucand.collisionID); + auto collision = collisions.rawIteratorAt(hadNucand.collisionID); if (settingFillTable) { - fillTableHyper(piNucand, collision); + fillTableHyper(hadNucand, collision); } } } @@ -1134,9 +1195,9 @@ struct PiNucleiFemto { fillPairs(collisions, tracks, /*isMixedEvent*/ false); } } - PROCESS_SWITCH(PiNucleiFemto, processSameEvent, "Process Same event", false); + PROCESS_SWITCH(HadNucleiFemto, processSameEvent, "Process Same event", false); - void processSameEventHyper(const CollisionsFull& collisions, const TrackCandidates& pitracks, o2::aod::DataHypCandsWColl const& V0Hypers, const aod::BCsWithTimestamps& bcs) + void processSameEventHyper(const CollisionsFull& collisions, const TrackCandidates& hadtracks, o2::aod::DataHypCandsWColl const& V0Hypers, const aod::BCsWithTimestamps& bcs) { mGoodCollisions.clear(); mGoodCollisions.resize(collisions.size(), false); @@ -1152,9 +1213,9 @@ struct PiNucleiFemto { mGoodCollisions[collision.globalIndex()] = true; const uint64_t collIdx = collision.globalIndex(); - auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collIdx); + auto trackTableThisCollision = hadtracks.sliceBy(mPerCol, collIdx); auto hypdTableThisCollision = V0Hypers.sliceBy(hypPerCol, collIdx); - trackTableThisCollision.bindExternalIndices(&pitracks); + trackTableThisCollision.bindExternalIndices(&hadtracks); hypdTableThisCollision.bindExternalIndices(&V0Hypers); pairTracksSameEventHyper(trackTableThisCollision, hypdTableThisCollision); @@ -1163,10 +1224,10 @@ struct PiNucleiFemto { continue; } - fillPairsHyper(collisions, pitracks, V0Hypers, /*isMixedEvent*/ false); + fillPairsHyper(collisions, hadtracks, V0Hypers, /*isMixedEvent*/ false); } } - PROCESS_SWITCH(PiNucleiFemto, processSameEventHyper, "Process Same event", false); + PROCESS_SWITCH(HadNucleiFemto, processSameEventHyper, "Process Same event", false); void processMixedEvent(const CollisionsFull& collisions, const TrackCandidates& tracks) { @@ -1187,9 +1248,9 @@ struct PiNucleiFemto { fillPairs(collisions, tracks, /*isMixedEvent*/ true); } - PROCESS_SWITCH(PiNucleiFemto, processMixedEvent, "Process Mixed event", false); + PROCESS_SWITCH(HadNucleiFemto, processMixedEvent, "Process Mixed event", false); - /*void processMixedEventHyper(const CollisionsFull& collisions, o2::aod::DataHypCandsWColl const& V0Hypers, const TrackCandidates& pitracks) + /*void processMixedEventHyper(const CollisionsFull& collisions, o2::aod::DataHypCandsWColl const& V0Hypers, const TrackCandidates& hadtracks) { LOG(debug) << "Processing mixed event for hypertriton"; mTrackHypPairs.clear(); @@ -1206,9 +1267,9 @@ struct PiNucleiFemto { pairHyperEventMixing(tracks1, V0Hypers2); } } -PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", false);*/ +PROCESS_SWITCH(HadNucleiFemto, processMixedEventHyper, "Process Mixed event", false);*/ - void processMixedEventHyperPool(const CollisionsFull& collisions, o2::aod::DataHypCandsWColl const& V0Hypers, const TrackCandidates& pitracks) + void processMixedEventHyperPool(const CollisionsFull& collisions, o2::aod::DataHypCandsWColl const& V0Hypers, const TrackCandidates& hadtracks) { mTrackHypPairs.clear(); if (!isInitialized) { @@ -1224,15 +1285,15 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal mQaRegistry.fill(HIST("hCentrality"), collision.centFT0C()); mQaRegistry.fill(HIST("hVtxZ"), collision.posZ()); - int poolIndexPi = where_pool(collision.posZ(), collision.centFT0C()); - if (poolIndexPi < 0 || static_cast(poolIndexPi) >= All_Event_pool.size()) { + int poolIndexHad = where_pool(collision.posZ(), collision.centFT0C()); + if (poolIndexHad < 0 || static_cast(poolIndexHad) >= All_Event_pool.size()) { continue; } - auto& pool = All_Event_pool[poolIndexPi]; + auto& pool = All_Event_pool[poolIndexHad]; - const uint64_t collIdxPi = collision.globalIndex(); - auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collIdxPi); - trackTableThisCollision.bindExternalIndices(&pitracks); + const uint64_t collIdxHad = collision.globalIndex(); + auto trackTableThisCollision = hadtracks.sliceBy(mPerCol, collIdxHad); + trackTableThisCollision.bindExternalIndices(&hadtracks); for (auto const& storedEvent : pool.events) { const uint64_t collIdxHyp = storedEvent.collisionId; @@ -1252,7 +1313,7 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal auto firstHyp = hypdTablepreviousCollision.iteratorAt(0); int poolIndexHyp = where_pool(firstHyp.zPrimVtx(), firstHyp.centralityFT0C()); - if (poolIndexHyp != poolIndexPi) { + if (poolIndexHyp != poolIndexHad) { mQaRegistry.fill(HIST("hSkipReasons"), 2); continue; } @@ -1264,15 +1325,15 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal if (static_cast(pool.events.size()) >= settingNoMixedEvents) { pool.events.pop_front(); } - pool.events.push_back({collIdxPi}); + pool.events.push_back({collIdxHad}); } - fillPairsHyper(collisions, pitracks, V0Hypers, /*isMixedEvent*/ true); + fillPairsHyper(collisions, hadtracks, V0Hypers, /*isMixedEvent*/ true); } - PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyperPool, "Process Mixed event", false); + PROCESS_SWITCH(HadNucleiFemto, processMixedEventHyperPool, "Process Mixed event", false); }; WorkflowSpec defineDataProcessing(const ConfigContext& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc)}; }