From ea922750a23c4dbe567e5656b78af6066e4e8e9b Mon Sep 17 00:00:00 2001 From: scattaru Date: Mon, 21 Oct 2024 17:31:07 +0200 Subject: [PATCH 01/12] Implementation of derived data for Ds-h corelation for ME --- .../DataModel/DerivedDataCorrelationTables.h | 90 +++++++++++++++++++ .../HFC/TableProducer/correlatorDsHadrons.cxx | 23 +++++ 2 files changed, 113 insertions(+) create mode 100644 PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h new file mode 100644 index 00000000000..0ba0cf8fc51 --- /dev/null +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -0,0 +1,90 @@ +// 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 DerivedDataCorrelations.h +/// \brief Tables for producing derived data for correlation analysis +/// \author Samuele Cattaruzzi + +#ifndef PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONS_H_ +#define PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONS_H_ + +#include "Framework/AnalysisDataModel.h" + +namespace o2::aod +{ +namespace hf_collisions_reduced +{ +DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Event multiplicity +DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Primary vertex z position +DECLARE_SOA_COLUMN(OriginalCollisionCount, originalCollisionCount, int); //! Size of collision table processed +} // namespace hf_collisions_reduced +DECLARE_SOA_TABLE(HfRedCollisions, "AOD", "COLLREDUCED", //! Table with collision info + soa::Index<>, + aod::hf_collisions_reduced::Multiplicity, + aod::hf_collisions_reduced::PosZ); + +using HfRedCollision = HfRedCollisions::iterator; + +//DECLARE_SOA_TABLE(HfCandColCounts, "AOD", "HFCANDCOLCOUNT", //! Table with number of collisions which contain at least one candidate +// aod::hf_collisions_reduced::OriginalCollisionCount); + +namespace hf_candidate_reduced +{ +DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index +DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index +DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate +DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate +DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate +DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of the pointing angle +DECLARE_SOA_COLUMN(CosPaXY, cosPaXY, float); //! Cosine of the pointing angle XY +DECLARE_SOA_COLUMN(DecayLength, decayLength, float); //! Decay length +DECLARE_SOA_COLUMN(NormDecayLengthXY, normDecayLengthXY, float); //! Normalised decay length XY +DECLARE_SOA_COLUMN(ImpactParameterXY, impactParameterXY, float); //! Impact parameter XY +DECLARE_SOA_COLUMN(DeltaMassPhiDsToKKPi, deltaMassPhiDsToKKPi, float); //! Delta mass Phi for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(DeltaMassPhiDsToPiKK, deltaMassPhiDsToPiKK, float); //! Delta mass Phi for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(Cos3PiKDsToKKPi, cos3PiKDsToKKPi, float); //! Cos3 between the pion and the kaon for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(Cos3PiKDsToPiKK, cos3PiKDsToPiKK, float); //! Cos3 between the pion and the kaon for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(SelFlagDsToKKPi, selFlagDsToKKPi, int); //! Selection flag Ds -> KKPi +DECLARE_SOA_COLUMN(SelFlagDsToPiKK, selFlagDsToPiKK, int); //! Selection flag Ds -> PiKK +DECLARE_SOA_COLUMN(BdtScoreClass0DsToKKPi, bdtScoreClass0DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(BdtScoreClass1DsToKKPi, bdtScoreClass1DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(BdtScoreClass2DsToKKPi, bdtScoreClass2DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(BdtScoreClass0DsToPiKK, bdtScoreClass0DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(BdtScoreClass1DsToPiKK, bdtScoreClass1DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(BdtScoreClass2DsToPiKK, bdtScoreClass2DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(InvMassDsToKKPi, invMassDsToKKPi, float); //! Invariant mass of candidate for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(InvMassDsToPiKK, invMassDsToPiKK, float); //! Invariant mass of candidate for the Ds -> PiKK hypothesis +} // namespace hf_candidate_reduced +DECLARE_SOA_TABLE(DsCandReduced, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info (rectangular selection) + soa::Index<>, + aod::hf_candidate_reduced::HfRedCollisionId, + aod::hf_candidate_reduced::PhiCand, + aod::hf_candidate_reduced::EtaCand, + aod::hf_candidate_reduced::PtCand); + +namespace hf_assoc_track_reduced +{ +DECLARE_SOA_COLUMN(TrackId, trackId, int); //! Original track index +DECLARE_SOA_COLUMN(EtaAssocTrack, etaAssocTrack, float); //! Eta of the track +DECLARE_SOA_COLUMN(PhiAssocTrack, phiAssocTrack, float); //! Phi of the track +DECLARE_SOA_COLUMN(PtAssocTrack, ptAssocTrack, float); //! Pt of the track +} // namespace hf_assoc_track_reduced +DECLARE_SOA_TABLE(AssocTrackReduced, "AOD", "TRACKREDUCED", //! Table with associated track info + soa::Index<>, + aod::hf_candidate_reduced::HfRedCollisionId, + aod::hf_assoc_track_reduced::PhiAssocTrack, + aod::hf_assoc_track_reduced::EtaAssocTrack, + aod::hf_assoc_track_reduced::PtAssocTrack) +} // namespace o2::aod + +#endif // PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONS_H_ diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 016c672f50e..fea0663ded6 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -29,6 +29,7 @@ #include "PWGHF/DataModel/CandidateReconstructionTables.h" #include "PWGHF/DataModel/CandidateSelectionTables.h" #include "PWGHF/HFC/DataModel/CorrelationTables.h" +#include "PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h" using namespace o2; using namespace o2::analysis; @@ -135,6 +136,9 @@ struct HfCorrelatorDsHadrons { Produces entryDsCandRecoInfo; Produces entryDsCandGenInfo; Produces entryTrackRecoInfo; + Produces collReduced; + Produces candReduced; + Produces assocTrackReduced; Configurable fillHistoData{"fillHistoData", true, "Flag for filling histograms in data processes"}; Configurable fillHistoMcRec{"fillHistoMcRec", true, "Flag for filling histograms in MC Rec processes"}; @@ -679,6 +683,25 @@ struct HfCorrelatorDsHadrons { } // end loop generated collision } PROCESS_SWITCH(HfCorrelatorDsHadrons, processMcGen, "Process MC Gen mode", false); + + void processDerivedDataDs(SelCollisionsWithDs::iterator const& collision, + CandDsData const& candidates, + MyTracksData const& tracks) + { + collReduced(collision.multFV0M(), collision.posZ()); + // Ds fill histograms and Ds candidates information stored + for (const auto& candidate : candidates) { + + // candidate selected with rectangular selections + candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt()); + + // tracks information + for (const auto& track : tracks) { + assocTrackReduced(collReduced.lastIndex(), track.phi(), track.eta(), track.pt()); + } + } + } + PROCESS_SWITCH(HfCorrelatorDsHadrons, processDerivedDataDs, "Process derived data Ds", false); // Event Mixing void processDataME(SelCollisionsWithDs const& collisions, From 2d3368023b81f298f07c3932c6ed65ddf95bfbe1 Mon Sep 17 00:00:00 2001 From: scattaru Date: Mon, 21 Oct 2024 17:38:05 +0200 Subject: [PATCH 02/12] Fix loop error --- PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index fea0663ded6..889e85e86c0 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -689,16 +689,17 @@ struct HfCorrelatorDsHadrons { MyTracksData const& tracks) { collReduced(collision.multFV0M(), collision.posZ()); + + int counterDs = 0; // Ds fill histograms and Ds candidates information stored - for (const auto& candidate : candidates) { - - // candidate selected with rectangular selections + for (const auto& candidate : candidates) { + // candidate selected candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt()); - - // tracks information - for (const auto& track : tracks) { - assocTrackReduced(collReduced.lastIndex(), track.phi(), track.eta(), track.pt()); - } + } + + // tracks information + for (const auto& track : tracks) { + assocTrackReduced(collReduced.lastIndex(), track.phi(), track.eta(), track.pt()); } } PROCESS_SWITCH(HfCorrelatorDsHadrons, processDerivedDataDs, "Process derived data Ds", false); From 8736f8a4efdecec4233f7799b99fd10e124c4efc Mon Sep 17 00:00:00 2001 From: scattaru Date: Mon, 21 Oct 2024 17:38:41 +0200 Subject: [PATCH 03/12] Remove not necessary int --- PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 889e85e86c0..f60504cbd79 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -690,7 +690,6 @@ struct HfCorrelatorDsHadrons { { collReduced(collision.multFV0M(), collision.posZ()); - int counterDs = 0; // Ds fill histograms and Ds candidates information stored for (const auto& candidate : candidates) { // candidate selected From c72c2c4f7a15a99102633d60d8624ab0a1279460 Mon Sep 17 00:00:00 2001 From: scattaru Date: Mon, 21 Oct 2024 17:54:41 +0200 Subject: [PATCH 04/12] Add GlobaltrackWoDCA check --- PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index f60504cbd79..760eb3dc989 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -698,6 +698,9 @@ struct HfCorrelatorDsHadrons { // tracks information for (const auto& track : tracks) { + if (!track.isGlobalTrackWoDCA()) { + continue; + } assocTrackReduced(collReduced.lastIndex(), track.phi(), track.eta(), track.pt()); } } From 21b0c58228de4131cefdc3bc725a945681814abc Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 21 Oct 2024 15:55:30 +0000 Subject: [PATCH 05/12] Please consider the following formatting changes --- .../DataModel/DerivedDataCorrelationTables.h | 44 +++++++++---------- .../HFC/TableProducer/correlatorDsHadrons.cxx | 8 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index 0ba0cf8fc51..2fb5ed63e6b 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -33,37 +33,37 @@ DECLARE_SOA_TABLE(HfRedCollisions, "AOD", "COLLREDUCED", //! Table with collisio using HfRedCollision = HfRedCollisions::iterator; -//DECLARE_SOA_TABLE(HfCandColCounts, "AOD", "HFCANDCOLCOUNT", //! Table with number of collisions which contain at least one candidate -// aod::hf_collisions_reduced::OriginalCollisionCount); +// DECLARE_SOA_TABLE(HfCandColCounts, "AOD", "HFCANDCOLCOUNT", //! Table with number of collisions which contain at least one candidate +// aod::hf_collisions_reduced::OriginalCollisionCount); namespace hf_candidate_reduced { -DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index -DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index -DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate -DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate -DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate -DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of the pointing angle -DECLARE_SOA_COLUMN(CosPaXY, cosPaXY, float); //! Cosine of the pointing angle XY -DECLARE_SOA_COLUMN(DecayLength, decayLength, float); //! Decay length -DECLARE_SOA_COLUMN(NormDecayLengthXY, normDecayLengthXY, float); //! Normalised decay length XY -DECLARE_SOA_COLUMN(ImpactParameterXY, impactParameterXY, float); //! Impact parameter XY -DECLARE_SOA_COLUMN(DeltaMassPhiDsToKKPi, deltaMassPhiDsToKKPi, float); //! Delta mass Phi for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(DeltaMassPhiDsToPiKK, deltaMassPhiDsToPiKK, float); //! Delta mass Phi for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(Cos3PiKDsToKKPi, cos3PiKDsToKKPi, float); //! Cos3 between the pion and the kaon for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(Cos3PiKDsToPiKK, cos3PiKDsToPiKK, float); //! Cos3 between the pion and the kaon for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(SelFlagDsToKKPi, selFlagDsToKKPi, int); //! Selection flag Ds -> KKPi -DECLARE_SOA_COLUMN(SelFlagDsToPiKK, selFlagDsToPiKK, int); //! Selection flag Ds -> PiKK +DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index +DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index +DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index +DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate +DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate +DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate +DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of the pointing angle +DECLARE_SOA_COLUMN(CosPaXY, cosPaXY, float); //! Cosine of the pointing angle XY +DECLARE_SOA_COLUMN(DecayLength, decayLength, float); //! Decay length +DECLARE_SOA_COLUMN(NormDecayLengthXY, normDecayLengthXY, float); //! Normalised decay length XY +DECLARE_SOA_COLUMN(ImpactParameterXY, impactParameterXY, float); //! Impact parameter XY +DECLARE_SOA_COLUMN(DeltaMassPhiDsToKKPi, deltaMassPhiDsToKKPi, float); //! Delta mass Phi for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(DeltaMassPhiDsToPiKK, deltaMassPhiDsToPiKK, float); //! Delta mass Phi for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(Cos3PiKDsToKKPi, cos3PiKDsToKKPi, float); //! Cos3 between the pion and the kaon for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(Cos3PiKDsToPiKK, cos3PiKDsToPiKK, float); //! Cos3 between the pion and the kaon for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(SelFlagDsToKKPi, selFlagDsToKKPi, int); //! Selection flag Ds -> KKPi +DECLARE_SOA_COLUMN(SelFlagDsToPiKK, selFlagDsToPiKK, int); //! Selection flag Ds -> PiKK DECLARE_SOA_COLUMN(BdtScoreClass0DsToKKPi, bdtScoreClass0DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis DECLARE_SOA_COLUMN(BdtScoreClass1DsToKKPi, bdtScoreClass1DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis DECLARE_SOA_COLUMN(BdtScoreClass2DsToKKPi, bdtScoreClass2DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis DECLARE_SOA_COLUMN(BdtScoreClass0DsToPiKK, bdtScoreClass0DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis DECLARE_SOA_COLUMN(BdtScoreClass1DsToPiKK, bdtScoreClass1DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis DECLARE_SOA_COLUMN(BdtScoreClass2DsToPiKK, bdtScoreClass2DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(InvMassDsToKKPi, invMassDsToKKPi, float); //! Invariant mass of candidate for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(InvMassDsToPiKK, invMassDsToPiKK, float); //! Invariant mass of candidate for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(InvMassDsToKKPi, invMassDsToKKPi, float); //! Invariant mass of candidate for the Ds -> KKPi hypothesis +DECLARE_SOA_COLUMN(InvMassDsToPiKK, invMassDsToPiKK, float); //! Invariant mass of candidate for the Ds -> PiKK hypothesis } // namespace hf_candidate_reduced DECLARE_SOA_TABLE(DsCandReduced, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info (rectangular selection) soa::Index<>, diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 760eb3dc989..3602739cdf2 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -683,19 +683,19 @@ struct HfCorrelatorDsHadrons { } // end loop generated collision } PROCESS_SWITCH(HfCorrelatorDsHadrons, processMcGen, "Process MC Gen mode", false); - + void processDerivedDataDs(SelCollisionsWithDs::iterator const& collision, CandDsData const& candidates, MyTracksData const& tracks) { collReduced(collision.multFV0M(), collision.posZ()); - + // Ds fill histograms and Ds candidates information stored - for (const auto& candidate : candidates) { + for (const auto& candidate : candidates) { // candidate selected candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt()); } - + // tracks information for (const auto& track : tracks) { if (!track.isGlobalTrackWoDCA()) { From de6a229c2b0faaf403d231af6d5b4410aa2600b3 Mon Sep 17 00:00:00 2001 From: scattaru Date: Mon, 21 Oct 2024 18:22:15 +0200 Subject: [PATCH 06/12] Fix MegaLinter --- PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index 2fb5ed63e6b..fc1d32895f6 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -13,8 +13,8 @@ /// \brief Tables for producing derived data for correlation analysis /// \author Samuele Cattaruzzi -#ifndef PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONS_H_ -#define PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONS_H_ +#ifndef PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONTABLES_H_ +#define PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONTABLES_H_ #include "Framework/AnalysisDataModel.h" From 42000cb7f9108459d24a61dccab918f7d4251fbe Mon Sep 17 00:00:00 2001 From: scattaru Date: Mon, 21 Oct 2024 18:31:17 +0200 Subject: [PATCH 07/12] Fix MegaLinter --- PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index fc1d32895f6..c0698b4d212 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -87,4 +87,4 @@ DECLARE_SOA_TABLE(AssocTrackReduced, "AOD", "TRACKREDUCED", //! Table with assoc aod::hf_assoc_track_reduced::PtAssocTrack) } // namespace o2::aod -#endif // PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONS_H_ +#endif // PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONTABLES_H_ From 06c83f9a279e225f336123cc2347b8a70c43d064 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 21 Oct 2024 16:31:56 +0000 Subject: [PATCH 08/12] Please consider the following formatting changes --- PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index c0698b4d212..5eba9c79b8a 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -87,4 +87,4 @@ DECLARE_SOA_TABLE(AssocTrackReduced, "AOD", "TRACKREDUCED", //! Table with assoc aod::hf_assoc_track_reduced::PtAssocTrack) } // namespace o2::aod -#endif // PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONTABLES_H_ +#endif // PWGHF_HFC_DATAMODEL_DERIVEDDATACORRELATIONTABLES_H_ From 5de8c201dfbbcad17cffe928214e52132190c24e Mon Sep 17 00:00:00 2001 From: scattaru Date: Thu, 24 Oct 2024 10:06:29 +0200 Subject: [PATCH 09/12] Use multFT0M --- PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 3602739cdf2..cb1bbe780ce 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -688,7 +688,7 @@ struct HfCorrelatorDsHadrons { CandDsData const& candidates, MyTracksData const& tracks) { - collReduced(collision.multFV0M(), collision.posZ()); + collReduced(collision.multFT0M(), collision.posZ()); // Ds fill histograms and Ds candidates information stored for (const auto& candidate : candidates) { From ab7fc473025f489ff91f78b5068d6dc4c1efa352 Mon Sep 17 00:00:00 2001 From: scattaru Date: Thu, 24 Oct 2024 10:45:07 +0200 Subject: [PATCH 10/12] Add invariant mass and remove not necessary columns --- .../DataModel/DerivedDataCorrelationTables.h | 26 +++---------------- .../HFC/TableProducer/correlatorDsHadrons.cxx | 6 ++++- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index 5eba9c79b8a..20a6afd9144 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -39,38 +39,18 @@ using HfRedCollision = HfRedCollisions::iterator; namespace hf_candidate_reduced { DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index -DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Original track index -DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Original track index DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate -DECLARE_SOA_COLUMN(CosPa, cosPa, float); //! Cosine of the pointing angle -DECLARE_SOA_COLUMN(CosPaXY, cosPaXY, float); //! Cosine of the pointing angle XY -DECLARE_SOA_COLUMN(DecayLength, decayLength, float); //! Decay length -DECLARE_SOA_COLUMN(NormDecayLengthXY, normDecayLengthXY, float); //! Normalised decay length XY -DECLARE_SOA_COLUMN(ImpactParameterXY, impactParameterXY, float); //! Impact parameter XY -DECLARE_SOA_COLUMN(DeltaMassPhiDsToKKPi, deltaMassPhiDsToKKPi, float); //! Delta mass Phi for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(DeltaMassPhiDsToPiKK, deltaMassPhiDsToPiKK, float); //! Delta mass Phi for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(Cos3PiKDsToKKPi, cos3PiKDsToKKPi, float); //! Cos3 between the pion and the kaon for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(Cos3PiKDsToPiKK, cos3PiKDsToPiKK, float); //! Cos3 between the pion and the kaon for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(SelFlagDsToKKPi, selFlagDsToKKPi, int); //! Selection flag Ds -> KKPi -DECLARE_SOA_COLUMN(SelFlagDsToPiKK, selFlagDsToPiKK, int); //! Selection flag Ds -> PiKK -DECLARE_SOA_COLUMN(BdtScoreClass0DsToKKPi, bdtScoreClass0DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(BdtScoreClass1DsToKKPi, bdtScoreClass1DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(BdtScoreClass2DsToKKPi, bdtScoreClass2DsToKKPi, float); //! Bdt score for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(BdtScoreClass0DsToPiKK, bdtScoreClass0DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(BdtScoreClass1DsToPiKK, bdtScoreClass1DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(BdtScoreClass2DsToPiKK, bdtScoreClass2DsToPiKK, float); //! Bdt score for the Ds -> PiKK hypothesis -DECLARE_SOA_COLUMN(InvMassDsToKKPi, invMassDsToKKPi, float); //! Invariant mass of candidate for the Ds -> KKPi hypothesis -DECLARE_SOA_COLUMN(InvMassDsToPiKK, invMassDsToPiKK, float); //! Invariant mass of candidate for the Ds -> PiKK hypothesis +DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate } // namespace hf_candidate_reduced DECLARE_SOA_TABLE(DsCandReduced, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info (rectangular selection) soa::Index<>, aod::hf_candidate_reduced::HfRedCollisionId, aod::hf_candidate_reduced::PhiCand, aod::hf_candidate_reduced::EtaCand, - aod::hf_candidate_reduced::PtCand); + aod::hf_candidate_reduced::PtCand, + aod::hf_candidate_reduced::InvMassDs); namespace hf_assoc_track_reduced { diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index cb1bbe780ce..d0f5b10bcc7 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -693,7 +693,11 @@ struct HfCorrelatorDsHadrons { // Ds fill histograms and Ds candidates information stored for (const auto& candidate : candidates) { // candidate selected - candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt()); + if (candidate.isSelDsToKKPi() >= selectionFlagDs) { + candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); + } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { + candReduced(collReduced.lastIndex(), candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + } } // tracks information From 0988a221c17959dadbda6d951ace71e281ae78a6 Mon Sep 17 00:00:00 2001 From: scattaru Date: Thu, 24 Oct 2024 10:46:07 +0200 Subject: [PATCH 11/12] Remove not necessary columns --- PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index 20a6afd9144..1cd4877eab0 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -24,7 +24,7 @@ namespace hf_collisions_reduced { DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Event multiplicity DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Primary vertex z position -DECLARE_SOA_COLUMN(OriginalCollisionCount, originalCollisionCount, int); //! Size of collision table processed + } // namespace hf_collisions_reduced DECLARE_SOA_TABLE(HfRedCollisions, "AOD", "COLLREDUCED", //! Table with collision info soa::Index<>, From 801fb7f316e7c297cc6b1c9d8d06935d7d392b6f Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 24 Oct 2024 08:46:54 +0000 Subject: [PATCH 12/12] Please consider the following formatting changes --- PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index 1cd4877eab0..9c192fa3129 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -22,8 +22,8 @@ namespace o2::aod { namespace hf_collisions_reduced { -DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Event multiplicity -DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Primary vertex z position +DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Event multiplicity +DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Primary vertex z position } // namespace hf_collisions_reduced DECLARE_SOA_TABLE(HfRedCollisions, "AOD", "COLLREDUCED", //! Table with collision info @@ -38,11 +38,11 @@ using HfRedCollision = HfRedCollisions::iterator; namespace hf_candidate_reduced { -DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index -DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate -DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate -DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate -DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate +DECLARE_SOA_INDEX_COLUMN(HfRedCollision, hfRedCollision); //! ReducedCollision index +DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate +DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate +DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate +DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate } // namespace hf_candidate_reduced DECLARE_SOA_TABLE(DsCandReduced, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info (rectangular selection) soa::Index<>,