From 21d5a9f7a8bb90803aae9166769f340153ef2708 Mon Sep 17 00:00:00 2001 From: jikim1290 Date: Wed, 12 Feb 2025 21:05:13 +0900 Subject: [PATCH 1/2] initial commit for heptaquark search --- PWGLF/DataModel/ReducedHeptaQuarkTables.h | 91 ++++ PWGLF/TableProducer/Resonances/CMakeLists.txt | 5 + .../Resonances/HeptaQuarktable.cxx | 401 ++++++++++++++++++ 3 files changed, 497 insertions(+) create mode 100644 PWGLF/DataModel/ReducedHeptaQuarkTables.h create mode 100644 PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx diff --git a/PWGLF/DataModel/ReducedHeptaQuarkTables.h b/PWGLF/DataModel/ReducedHeptaQuarkTables.h new file mode 100644 index 00000000000..2b785739294 --- /dev/null +++ b/PWGLF/DataModel/ReducedHeptaQuarkTables.h @@ -0,0 +1,91 @@ +// 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. + +/// +/// \author Junlee Kim + +#ifndef PWGLF_DATAMODEL_REDUCEDHEPTAQUARKTABLES_H_ +#define PWGLF_DATAMODEL_REDUCEDHEPTAQUARKTABLES_H_ + +#include + +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponse.h" +#include "Common/Core/RecoDecay.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/ASoA.h" + +namespace o2::aod +{ +namespace redhqevent +{ +DECLARE_SOA_COLUMN(NumPhi, numPhi, int); //! Number of negative K +DECLARE_SOA_COLUMN(NumLambda, numLambda, int); //! Number of lambda +} // namespace redhqevent +DECLARE_SOA_TABLE(RedHQEvents, "AOD", "REDHQEVENT", + o2::soa::Index<>, + bc::GlobalBC, + bc::RunNumber, + timestamp::Timestamp, + collision::PosZ, + collision::NumContrib, + redhqevent::NumPhi, + redhqevent::NumLambda); +using RedHQEvent = RedHQEvents::iterator; + +namespace hqtrack +{ +DECLARE_SOA_INDEX_COLUMN(RedHQEvent, redHQEvent); +DECLARE_SOA_COLUMN(HQId, hqId, int); //! HQ ID +DECLARE_SOA_COLUMN(HQPx, hqPx, float); //! HQ Px +DECLARE_SOA_COLUMN(HQPy, hqPy, float); //! HQ Py +DECLARE_SOA_COLUMN(HQPz, hqPz, float); //! HQ Pz +DECLARE_SOA_COLUMN(HQd1Px, hqd1Px, float); //! HQ d1 Px +DECLARE_SOA_COLUMN(HQd1Py, hqd1Py, float); //! HQ d1 Py +DECLARE_SOA_COLUMN(HQd1Pz, hqd1Pz, float); //! HQ d1 Pz +DECLARE_SOA_COLUMN(HQd2Px, hqd2Px, float); //! HQ d2 Px +DECLARE_SOA_COLUMN(HQd2Py, hqd2Py, float); //! HQ d2 Py +DECLARE_SOA_COLUMN(HQd2Pz, hqd2Pz, float); //! HQ d2 Pz +DECLARE_SOA_COLUMN(HQMass, hqMass, float); //! HQ Mass +DECLARE_SOA_COLUMN(HQd1Index, hqd1Index, int64_t); //! HQ d1 index +DECLARE_SOA_COLUMN(HQd2Index, hqd2Index, int64_t); //! HQ d2 index +DECLARE_SOA_COLUMN(HQd1Charge, hqd1Charge, float); //! HQ d1 charge +DECLARE_SOA_COLUMN(HQd2Charge, hqd2Charge, float); //! HQ d1 charge +DECLARE_SOA_COLUMN(HQd1TPC, hqd1TPC, float); //! TPC nsigma d1 +DECLARE_SOA_COLUMN(HQd2TPC, hqd2TPC, float); //! TPC nsigma d2 + +} // namespace hqtrack +DECLARE_SOA_TABLE(HQTracks, "AOD", "HQTRACK", + o2::soa::Index<>, + hqtrack::RedHQEventId, + hqtrack::HQId, + hqtrack::HQPx, + hqtrack::HQPy, + hqtrack::HQPz, + hqtrack::HQd1Px, + hqtrack::HQd1Py, + hqtrack::HQd1Pz, + hqtrack::HQd2Px, + hqtrack::HQd2Py, + hqtrack::HQd2Pz, + hqtrack::HQMass, + hqtrack::HQd1Index, + hqtrack::HQd2Index, + hqtrack::HQd1Charge, + hqtrack::HQd2Charge, + hqtrack::HQd1TPC, + hqtrack::HQd2TPC); + +using HQTrack = HQTracks::iterator; +} // namespace o2::aod +#endif // PWGLF_DATAMODEL_REDUCEDHEPTAQUARKTABLES_H_ diff --git a/PWGLF/TableProducer/Resonances/CMakeLists.txt b/PWGLF/TableProducer/Resonances/CMakeLists.txt index 236ac38e2d9..a914e69a3f7 100644 --- a/PWGLF/TableProducer/Resonances/CMakeLists.txt +++ b/PWGLF/TableProducer/Resonances/CMakeLists.txt @@ -44,3 +44,8 @@ o2physics_add_dpl_workflow(reso2mergedf SOURCES LFResonanceMergeDF.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsBase COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(heptaquarktable + SOURCES HeptaQuarktable.cxx + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsVertexing + COMPONENT_NAME Analysis) diff --git a/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx b/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx new file mode 100644 index 00000000000..082f66bbd15 --- /dev/null +++ b/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx @@ -0,0 +1,401 @@ +// 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 heptaquarktable.cxx +/// \brief Selection of events with triplets and pairs for femtoscopic studies +/// +/// \author Junlee Kim, (junlee.kim@cern.ch) + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "EventFiltering/Zorro.h" +#include "EventFiltering/ZorroSummary.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/runDataProcessing.h" + +#include "CommonConstants/MathConstants.h" +#include "Common/Core/TrackSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/PIDResponseITS.h" + +#include "CCDB/BasicCCDBManager.h" +#include "CCDB/CcdbApi.h" + +#include "PWGLF/DataModel/ReducedHeptaQuarkTables.h" +#include "PWGLF/DataModel/LFStrangenessTables.h" + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; + +struct heptaquarktable { + + // Produce derived tables + Produces redHQEvents; + Produces hqTrack; + + // events + Configurable cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"}; + + Configurable cfgUseGlobalTrack{"cfgUseGlobalTrack", true, "use Global track"}; + Configurable cfgCutCharge{"cfgCutCharge", 0.0, "cut on Charge"}; + Configurable cfgCutPt{"cfgCutPt", 0.2, "PT cut on daughter track"}; + Configurable cfgCutEta{"cfgCutEta", 0.8, "Eta cut on daughter track"}; + Configurable cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"}; + Configurable cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"}; + Configurable cfgNsigmaTPCKa{"cfgNsigmaTPCKa", 3.0, "Value of the TPC Nsigma cut for kaon"}; + Configurable cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"}; + Configurable cfgTPCcluster{"cfgTPCcluster", 70, "Number of TPC cluster"}; + + Configurable cfgMinPhiMass{"cfgMinPhiMass", 1.01, "Minimum phi mass"}; + Configurable cfgMaxPhiMass{"cfgMaxPhiMass", 1.03, "Maximum phi mass"}; + Configurable cfgDeepAngleFlag{"cfgDeepAngleFlag", true, "Deep Angle cut"}; + Configurable cfgDeepAngle{"cfgDeepAngle", 0.04, "Deep Angle cut value"}; + + Configurable cfgv0radiusMin{"cfgv0radiusMin", 1.2, "minimum decay radius"}; + Configurable cfgDCAPosToPVMin{"cfgDCAPosToPVMin", 0.05, "minimum DCA to PV for positive track"}; + Configurable cfgDCANegToPVMin{"cfgDCANegToPVMin", 0.2, "minimum DCA to PV for negative track"}; + Configurable cfgv0CosPA{"cfgv0CosPA", 0.995, "minimum v0 cosine"}; + Configurable cfgDCAV0Dau{"cfgDCAV0Dau", 1.0, "maximum DCA between daughters"}; + + Configurable cfgV0PtMin{"cfgV0PtMin", 0, "minimum pT for lambda"}; + Configurable cfgV0EtaMin{"cfgV0EtaMin", -0.5, "maximum rapidity"}; + Configurable cfgV0EtaMax{"cfgV0EtaMax", 0.5, "maximum rapidity"}; + Configurable cfgV0LifeTime{"cfgV0LifeTime", 30., "maximum lambda lifetime"}; + + Configurable cfgDaughTPCnclsMin{"cfgDaughTPCnclsMin", 70, "minimum fired crossed rows"}; + Configurable cfgDaughPIDCutsTPCPr{"cfgDaughPIDCutsTPCPr", 3, "proton nsigma for TPC"}; + Configurable cfgDaughPIDCutsTPCPi{"cfgDaughPIDCutsTPCPi", 3, "pion nsigma for TPC"}; + Configurable cfgDaughEtaMin{"cfgDaughEtaMin", -0.8, "minimum daughter eta"}; + Configurable cfgDaughEtaMax{"cfgDaughEtaMax", 0.8, "maximum daughter eta"}; + Configurable cfgDaughPrPt{"cfgDaughPrPt", 0.5, "minimum daughter proton pt"}; + Configurable cfgDaughPiPt{"cfgDaughPiPt", 0.5, "minimum daughter pion pt"}; + + Configurable cfgMinLambdaMass{"cfgMinLambdaMass", 1.105, "Minimum lambda mass"}; + Configurable cfgMaxLambdaMass{"cfgMaxLambdaMass", 1.125, "Maximum lambda mass"}; + + ConfigurableAxis massAxis{"massAxis", {200, 3.0, 3.4}, "Invariant mass axis"}; + ConfigurableAxis ptAxis{"ptAxis", {VARIABLE_WIDTH, 0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.5, 8.0, 10.0, 100.0}, "Transverse momentum bins"}; + ConfigurableAxis centAxis{"centAxis", {VARIABLE_WIDTH, 0, 20, 50, 100}, "Centrality interval"}; + ConfigurableAxis vertexAxis{"vertexAxis", {10, -10, 10}, "vertex axis for mixing"}; + + Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex; + Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPt); + Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + + using EventCandidates = soa::Filtered>; + using TrackCandidates = soa::Filtered>; + + HistogramRegistry histos{ + "histos", + {}, + OutputObjHandlingPolicy::AnalysisObject}; + + SliceCache cache; + Partition posTracks = aod::track::signed1Pt > cfgCutCharge; + Partition negTracks = aod::track::signed1Pt < cfgCutCharge; + + double massLambda = o2::constants::physics::MassLambda; + double massPr = o2::constants::physics::MassProton; + double massPi = o2::constants::physics::MassPionCharged; + double massKa = o2::constants::physics::MassKPlus; + + void init(o2::framework::InitContext&) + { + histos.add("hEventstat", "", {HistType::kTH1F, {{2, 0, 2}}}); + } + + template + bool selectionTrack(const T& candidate) + { + if (cfgUseGlobalTrack && !(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster)) { + return false; + } + return true; + } + + template + bool selectionPID(const T& candidate, int pid) + { + if (pid == 0) { + if (std::abs(candidate.tpcNSigmaPi()) > cfgDaughPIDCutsTPCPi) { + return false; + } + } else if (pid == 1) { + if (std::abs(candidate.tpcNSigmaKa()) > cfgNsigmaTPCKa) { + return false; + } + } else if (pid == 2) { + if (std::abs(candidate.tpcNSigmaPr()) > cfgDaughPIDCutsTPCPr) { + return false; + } + } + return true; + } + + template + bool selectionPair(const T1& candidate1, const T2& candidate2) + { + double pt1, pt2, pz1, pz2, p1, p2, angle; + pt1 = candidate1.pt(); + pt2 = candidate2.pt(); + pz1 = candidate1.pz(); + pz2 = candidate2.pz(); + p1 = candidate1.p(); + p2 = candidate2.p(); + angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2)); + if (cfgDeepAngleFlag && angle < cfgDeepAngle) { + return false; + } + return true; + } + + template + bool selectionV0(TCollision const& collision, V0 const& candidate) + { + if (candidate.v0radius() < cfgv0radiusMin) + return false; + if (std::abs(candidate.dcapostopv()) < cfgDCAPosToPVMin) + return false; + if (std::abs(candidate.dcanegtopv()) < cfgDCANegToPVMin) + return false; + if (candidate.v0cosPA() < cfgv0CosPA) + return false; + if (std::abs(candidate.dcaV0daughters()) > cfgDCAV0Dau) + return false; + if (candidate.pt() < cfgV0PtMin) + return false; + if (candidate.yLambda() < cfgV0EtaMin) + return false; + if (candidate.yLambda() > cfgV0EtaMax) + return false; + if (candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda > cfgV0LifeTime) + return false; + + return true; + } + + template + bool selectionV0Daughter(T const& track, int pid) // pid 0: proton, pid 1: pion + { + if (track.tpcNClsFound() < cfgDaughTPCnclsMin) + return false; + if (pid == 0 && std::abs(track.tpcNSigmaPr()) > cfgDaughPIDCutsTPCPr) + return false; + if (pid == 1 && std::abs(track.tpcNSigmaPi()) > cfgDaughPIDCutsTPCPi) + return false; + if (track.eta() > cfgDaughEtaMax) + return false; + if (track.eta() < cfgDaughEtaMin) + return false; + if (pid == 0 && track.pt() < cfgDaughPrPt) + return false; + if (pid == 1 && track.pt() < cfgDaughPiPt) + return false; + + return true; + } + + ROOT::Math::PxPyPzMVector DauVec1, DauVec2, HQMesonMother, HQVectorDummy, HQd1dummy, HQd2dummy; + + void processHQReducedTable(EventCandidates::iterator const& collision, TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&) + { + o2::aod::ITSResponse itsResponse; + bool keepEventDoubleHQ = false; + int numberPhi = 0; + int numberLambda = 0; + auto currentRunNumber = collision.bc_as().runNumber(); + auto bc = collision.bc_as(); + + std::vector HQId = {}; + + std::vector HQd1Index = {}; + std::vector HQd2Index = {}; + + std::vector HQd1Charge = {}; + std::vector HQd2Charge = {}; + + std::vector HQd1TPC = {}; + std::vector HQd2TPC = {}; + + std::vector hqresonance, hqresonanced1, hqresonanced2; + + if (!(collision.sel8() && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))) + return; + + auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); + for (auto track1 : posThisColl) { + if (!selectionTrack(track1)) + continue; + + if (!selectionPID(track1, 1)) + continue; + + if (!(itsResponse.nSigmaITS(track1) > -3.0 && itsResponse.nSigmaITS(track1) < 3.0)) + continue; + +/* + qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), track1.tpcNSigmaKa(), track1.pt()); + if (track1.hasTOF()) { + qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt()); + } +*/ + auto track1ID = track1.globalIndex(); + for (auto track2 : negThisColl) { + if (!selectionTrack(track2)) + continue; + + if (!selectionPID(track2, 1)) + continue; + + if (!(itsResponse.nSigmaITS(track2) > -3.0 && itsResponse.nSigmaITS(track2) < 3.0)) + continue; + + auto track2ID = track2.globalIndex(); + if (track2ID == track1ID) + continue; + + if (!selectionPair(track1, track2)) + continue; + + DauVec1 = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa); + DauVec2 = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa); + HQMesonMother = DauVec1 + DauVec2; + if (!(HQMesonMother.M() > cfgMinPhiMass && HQMesonMother.M() < cfgMaxPhiMass)) + continue; + + numberPhi++; + ROOT::Math::PtEtaPhiMVector temp1(track1.pt(), track1.eta(), track1.phi(), massKa); + ROOT::Math::PtEtaPhiMVector temp2(track2.pt(), track2.eta(), track2.phi(), massKa); + ROOT::Math::PtEtaPhiMVector temp3(HQMesonMother.pt(), HQMesonMother.eta(), HQMesonMother.phi(), HQMesonMother.M()); + + hqresonanced1.push_back(temp1); + hqresonanced2.push_back(temp2); + hqresonance.push_back(temp3); + + HQId.push_back(333); + + HQd1Index.push_back(track1.globalIndex()); + HQd2Index.push_back(track2.globalIndex()); + + HQd1Charge.push_back(track1.sign()); + HQd2Charge.push_back(track2.sign()); + + HQd1TPC.push_back(track1.tpcNSigmaKa()); + HQd2TPC.push_back(track2.tpcNSigmaKa()); + } + } + for (auto& v0 : V0s) { + auto postrack_v0 = v0.template posTrack_as(); + auto negtrack_v0 = v0.template negTrack_as(); + + int LambdaTag = 0; + int aLambdaTag = 0; + + if (selectionV0Daughter(postrack_v0, 0) && selectionV0Daughter(negtrack_v0, 1)) + LambdaTag = 1; + + if (selectionV0Daughter(negtrack_v0, 0) && selectionV0Daughter(postrack_v0, 1)) + aLambdaTag = 1; + + if (LambdaTag == aLambdaTag) + continue; + + if (!selectionV0(collision, v0)) + continue; + + if (LambdaTag) { + if (v0.mLambda() < cfgMinLambdaMass || v0.mLambda() > cfgMaxLambdaMass) { + continue; + } + DauVec1 = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); + DauVec2 = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); + + HQId.push_back(3122); + } else if (aLambdaTag) { + if (v0.mAntiLambda() < cfgMinLambdaMass || v0.mAntiLambda() > cfgMaxLambdaMass) { + continue; + } + DauVec1 = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); + DauVec2 = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr); + HQId.push_back(-3122); + } + numberLambda++; + + HQMesonMother = DauVec1 + DauVec2; + + ROOT::Math::PtEtaPhiMVector temp1(DauVec1.Pt(), DauVec1.Eta(), DauVec1.Phi(), DauVec1.M()); + ROOT::Math::PtEtaPhiMVector temp2(DauVec2.Pt(), DauVec2.Eta(), DauVec2.Phi(), DauVec2.M()); + ROOT::Math::PtEtaPhiMVector temp3(HQMesonMother.Pt(), HQMesonMother.Eta(), HQMesonMother.Phi(), HQMesonMother.M()); + + hqresonanced1.push_back(temp1); + hqresonanced2.push_back(temp2); + hqresonance.push_back(temp3); + + HQd1Index.push_back(postrack_v0.globalIndex()); + HQd2Index.push_back(negtrack_v0.globalIndex()); + + HQd1Charge.push_back(postrack_v0.sign()); + HQd2Charge.push_back(negtrack_v0.sign()); + + HQd1TPC.push_back(postrack_v0.tpcNSigmaKa()); + HQd2TPC.push_back(negtrack_v0.tpcNSigmaKa()); + } // select collision + if (numberPhi < 2 || numberLambda < 1) + return; + + keepEventDoubleHQ = true; + + histos.fill(HIST("hEventstat"), 0.5); + if (keepEventDoubleHQ && numberPhi > 1 && numberLambda > 0 && (hqresonance.size() == hqresonanced1.size()) && (hqresonance.size() == hqresonanced2.size())) { + histos.fill(HIST("hEventstat"), 1.5); + /////////// Fill collision table/////////////// + redHQEvents(bc.globalBC(), currentRunNumber, bc.timestamp(), collision.posZ(), collision.numContrib(), numberPhi, numberLambda); + auto indexEvent = redHQEvents.lastIndex(); + //// Fill track table for HQ////////////////// + for (auto if1 = hqresonance.begin(); if1 != hqresonance.end(); ++if1) { + auto i5 = std::distance(hqresonance.begin(), if1); + HQVectorDummy = hqresonance.at(i5); + HQd1dummy = hqresonanced1.at(i5); + HQd2dummy = hqresonanced2.at(i5); + hqTrack(indexEvent, HQId.at(i5), HQVectorDummy.Px(), HQVectorDummy.Py(), HQVectorDummy.Pz(), + HQd1dummy.Px(), HQd1dummy.Py(), HQd1dummy.Pz(), HQd2dummy.Px(), HQd2dummy.Py(), HQd2dummy.Pz(), + HQVectorDummy.M(), + HQd1Index.at(i5), HQd2Index.at(i5), + HQd1Charge.at(i5), HQd2Charge.at(i5), + HQd1TPC.at(i5), HQd2TPC.at(i5)); + } + } + } // process + PROCESS_SWITCH(heptaquarktable, processHQReducedTable, "Process table creation for double hq", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfg) +{ + return WorkflowSpec{adaptAnalysisTask(cfg)}; +} From eb1cf41e71cd32c46986249c7e2f583ee08425a1 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 12 Feb 2025 12:06:20 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGLF/DataModel/ReducedHeptaQuarkTables.h | 2 +- .../Resonances/HeptaQuarktable.cxx | 50 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/PWGLF/DataModel/ReducedHeptaQuarkTables.h b/PWGLF/DataModel/ReducedHeptaQuarkTables.h index 2b785739294..54ad99884da 100644 --- a/PWGLF/DataModel/ReducedHeptaQuarkTables.h +++ b/PWGLF/DataModel/ReducedHeptaQuarkTables.h @@ -29,7 +29,7 @@ namespace o2::aod { namespace redhqevent { -DECLARE_SOA_COLUMN(NumPhi, numPhi, int); //! Number of negative K +DECLARE_SOA_COLUMN(NumPhi, numPhi, int); //! Number of negative K DECLARE_SOA_COLUMN(NumLambda, numLambda, int); //! Number of lambda } // namespace redhqevent DECLARE_SOA_TABLE(RedHQEvents, "AOD", "REDHQEVENT", diff --git a/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx b/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx index 082f66bbd15..91d5fce5081 100644 --- a/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx +++ b/PWGLF/TableProducer/Resonances/HeptaQuarktable.cxx @@ -159,18 +159,18 @@ struct heptaquarktable { template bool selectionPair(const T1& candidate1, const T2& candidate2) - { + { double pt1, pt2, pz1, pz2, p1, p2, angle; pt1 = candidate1.pt(); pt2 = candidate2.pt(); - pz1 = candidate1.pz(); + pz1 = candidate1.pz(); pz2 = candidate2.pz(); p1 = candidate1.p(); p2 = candidate2.p(); angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2)); if (cfgDeepAngleFlag && angle < cfgDeepAngle) { return false; - } + } return true; } @@ -259,12 +259,12 @@ struct heptaquarktable { if (!(itsResponse.nSigmaITS(track1) > -3.0 && itsResponse.nSigmaITS(track1) < 3.0)) continue; -/* - qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), track1.tpcNSigmaKa(), track1.pt()); - if (track1.hasTOF()) { - qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt()); - } -*/ + /* + qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), track1.tpcNSigmaKa(), track1.pt()); + if (track1.hasTOF()) { + qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt()); + } + */ auto track1ID = track1.globalIndex(); for (auto track2 : negThisColl) { if (!selectionTrack(track2)) @@ -290,7 +290,7 @@ struct heptaquarktable { continue; numberPhi++; - ROOT::Math::PtEtaPhiMVector temp1(track1.pt(), track1.eta(), track1.phi(), massKa); + ROOT::Math::PtEtaPhiMVector temp1(track1.pt(), track1.eta(), track1.phi(), massKa); ROOT::Math::PtEtaPhiMVector temp2(track2.pt(), track2.eta(), track2.phi(), massKa); ROOT::Math::PtEtaPhiMVector temp3(HQMesonMother.pt(), HQMesonMother.eta(), HQMesonMother.phi(), HQMesonMother.M()); @@ -331,19 +331,19 @@ struct heptaquarktable { if (LambdaTag) { if (v0.mLambda() < cfgMinLambdaMass || v0.mLambda() > cfgMaxLambdaMass) { - continue; - } - DauVec1 = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); - DauVec2 = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); + continue; + } + DauVec1 = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); + DauVec2 = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); - HQId.push_back(3122); + HQId.push_back(3122); } else if (aLambdaTag) { if (v0.mAntiLambda() < cfgMinLambdaMass || v0.mAntiLambda() > cfgMaxLambdaMass) { - continue; - } - DauVec1 = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); - DauVec2 = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr); - HQId.push_back(-3122); + continue; + } + DauVec1 = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); + DauVec2 = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr); + HQId.push_back(-3122); } numberLambda++; @@ -384,11 +384,11 @@ struct heptaquarktable { HQd1dummy = hqresonanced1.at(i5); HQd2dummy = hqresonanced2.at(i5); hqTrack(indexEvent, HQId.at(i5), HQVectorDummy.Px(), HQVectorDummy.Py(), HQVectorDummy.Pz(), - HQd1dummy.Px(), HQd1dummy.Py(), HQd1dummy.Pz(), HQd2dummy.Px(), HQd2dummy.Py(), HQd2dummy.Pz(), - HQVectorDummy.M(), - HQd1Index.at(i5), HQd2Index.at(i5), - HQd1Charge.at(i5), HQd2Charge.at(i5), - HQd1TPC.at(i5), HQd2TPC.at(i5)); + HQd1dummy.Px(), HQd1dummy.Py(), HQd1dummy.Pz(), HQd2dummy.Px(), HQd2dummy.Py(), HQd2dummy.Pz(), + HQVectorDummy.M(), + HQd1Index.at(i5), HQd2Index.at(i5), + HQd1Charge.at(i5), HQd2Charge.at(i5), + HQd1TPC.at(i5), HQd2TPC.at(i5)); } } } // process