diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index 23ad203d9a8..8766b203891 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -77,21 +77,21 @@ DECLARE_SOA_TABLE(DsCandSelInfos, "AOD", "DSCANDSELINFO", //! Table with Ds cand namespace hf_correlation_trigger_reduced { -DECLARE_SOA_INDEX_COLUMN(HfcRedCorrColl, hfcRedCorrColl); //! ReducedCollision index -DECLARE_SOA_COLUMN(PhiTrig, phiTrig, float); //! Phi of the trigger candidate -DECLARE_SOA_COLUMN(EtaTrig, etaTrig, float); //! Eta of the trigger candidate -DECLARE_SOA_COLUMN(PtTrig, ptTrig, float); //! Pt of the trigger candidate -DECLARE_SOA_COLUMN(InvMassTrig, invMassTrig, float); //! Invariant mass of Charm trigger candidate -DECLARE_SOA_COLUMN(BdtScore0Trig, bdtScore0Trig, float); //! First BDT output score -DECLARE_SOA_COLUMN(BdtScore1Trig, bdtScore1Trig, float); //! Second BDT output score -DECLARE_SOA_COLUMN(NTpcCrossedRowsTrig, nTpcCrossedRowsTrig, int); //! Number of crossed TPC Rows -DECLARE_SOA_COLUMN(ItsClusterMapTrig, itsClusterMapTrig, int); //! ITS cluster map, one bit per a layer, starting from the innermost -DECLARE_SOA_COLUMN(ItsNClsTrig, itsNClsTrig, int); //! Number of ITS clusters -DECLARE_SOA_COLUMN(EtaTrigTrack, etaTrigTrack, float); //! Eta of the track -DECLARE_SOA_COLUMN(PhiTrigTrack, phiTrigTrack, float); //! Phi of the track -DECLARE_SOA_COLUMN(PtTrigTrack, ptTrigTrack, float); //! Pt of the track -DECLARE_SOA_COLUMN(DcaXYTrig, dcaXYTrig, float); //! Impact parameter in XY of the track to the primary vertex -DECLARE_SOA_COLUMN(DcaZTrig, dcaZTrig, float); //! Impact parameter in Z of the track to the primary vertex +DECLARE_SOA_INDEX_COLUMN(HfcRedCorrColl, hfcRedCorrColl); //! ReducedCollision index +DECLARE_SOA_COLUMN(PhiTrig, phiTrig, float); //! Phi of the trigger candidate +DECLARE_SOA_COLUMN(EtaTrig, etaTrig, float); //! Eta of the trigger candidate +DECLARE_SOA_COLUMN(PtTrig, ptTrig, float); //! Pt of the trigger candidate +DECLARE_SOA_COLUMN(InvMassTrig, invMassTrig, float); //! Invariant mass of Charm trigger candidate +DECLARE_SOA_COLUMN(BdtScore0Trig, bdtScore0Trig, float); //! First BDT output score +DECLARE_SOA_COLUMN(BdtScore1Trig, bdtScore1Trig, float); //! Second BDT output score +DECLARE_SOA_COLUMN(NTpcCrossedRowsTrig, nTpcCrossedRowsTrig, int); //! Number of crossed TPC Rows +DECLARE_SOA_COLUMN(ItsClusterMapTrig, itsClusterMapTrig, int); //! ITS cluster map, one bit per a layer, starting from the innermost +DECLARE_SOA_COLUMN(ItsNClsTrig, itsNClsTrig, int); //! Number of ITS clusters +DECLARE_SOA_COLUMN(EtaTrigTrack, etaTrigTrack, float); //! Eta of the track +DECLARE_SOA_COLUMN(PhiTrigTrack, phiTrigTrack, float); //! Phi of the track +DECLARE_SOA_COLUMN(PtTrigTrack, ptTrigTrack, float); //! Pt of the track +DECLARE_SOA_COLUMN(DcaXYTrig, dcaXYTrig, float); //! Impact parameter in XY of the track to the primary vertex +DECLARE_SOA_COLUMN(DcaZTrig, dcaZTrig, float); //! Impact parameter in Z of the track to the primary vertex } // namespace hf_correlation_trigger_reduced DECLARE_SOA_TABLE(HfcRedTrigs, "AOD", "HFCREDTRIG", //! Table with charm hadron candidate info @@ -115,15 +115,15 @@ DECLARE_SOA_TABLE(HfcRedTrigHads, "AOD", "HFCREDTRIGHAD", //! Table with Same Ev namespace hf_assoc_track_reduced { -DECLARE_SOA_COLUMN(OriginTrackId, originTrackId, int); //! Original track index -DECLARE_SOA_COLUMN(NTpcCrossedRows, nTpcCrossedRows, int); //! Number of crossed TPC Rows -DECLARE_SOA_COLUMN(ItsClusterMap, itsClusterMap, int); //! ITS cluster map, one bit per a layer, starting from the innermost -DECLARE_SOA_COLUMN(ItsNCls, itsNCls, int); //! Number of ITS clusters -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 -DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); //! Impact parameter in XY of the track to the primary vertex -DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); //! Impact parameter in Z of the track to the primary vertex +DECLARE_SOA_COLUMN(OriginTrackId, originTrackId, int); //! Original track index +DECLARE_SOA_COLUMN(NTpcCrossedRows, nTpcCrossedRows, int); //! Number of crossed TPC Rows +DECLARE_SOA_COLUMN(ItsClusterMap, itsClusterMap, int); //! ITS cluster map, one bit per a layer, starting from the innermost +DECLARE_SOA_COLUMN(ItsNCls, itsNCls, int); //! Number of ITS clusters +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 +DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); //! Impact parameter in XY of the track to the primary vertex +DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); //! Impact parameter in Z of the track to the primary vertex } // namespace hf_assoc_track_reduced DECLARE_SOA_TABLE(AssocTrackReds, "AOD", "ASSOCTRACKRED", //! Table with associated track info soa::Index<>, diff --git a/PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx b/PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx index 56ebaaa0494..fa132c4233c 100644 --- a/PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx +++ b/PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx @@ -237,7 +237,7 @@ struct HfCorrelatorFlowCharmHadronsReduced { entryCorrPair(poolBin, pair.ptTrig(), pair.ptAssocTrack(), pair.deltaEta(), pair.deltaPhi()); } if constexpr (fillSparses) { - if constexpr (requires{ pair.bdtScore0Trig(); }) { // Separate Charm-Had and Had-Had cases + if constexpr (requires { pair.bdtScore0Trig(); }) { // Separate Charm-Had and Had-Had cases registry.fill(HIST("hSparseCorrelationsSECharmHad"), poolBin, pair.ptTrig(), pair.ptAssocTrack(), pair.deltaEta(), pair.deltaPhi(), pair.bdtScore0Trig(), pair.bdtScore1Trig(), pair.invMassTrig()); } else { @@ -282,7 +282,7 @@ struct HfCorrelatorFlowCharmHadronsReduced { if (downSamplePairsME < 1.) { float pseudoRndm = ptAssoc * 1000. - static_cast(ptAssoc * 1000); if (ptTrig < ptMaxForDownSampleME && trigColl.centrality() < centMaxForDownSampleME && - assocColl.centrality() < centMaxForDownSampleME && pseudoRndm >= downSamplePairsME) { + assocColl.centrality() < centMaxForDownSampleME && pseudoRndm >= downSamplePairsME) { continue; } } @@ -291,7 +291,7 @@ struct HfCorrelatorFlowCharmHadronsReduced { entryCorrPair(poolBinTrig, ptTrig, ptAssoc, deltaEta, deltaPhi); } if constexpr (fillSparses) { - if constexpr (requires{ trigCand.bdtScore0Trig(); }) { // Separate Charm-Had and Had-Had cases + if constexpr (requires { trigCand.bdtScore0Trig(); }) { // Separate Charm-Had and Had-Had cases registry.fill(HIST("hSparseCorrelationsMECharmHad"), poolBinTrig, ptTrig, ptAssoc, deltaEta, deltaPhi, trigCand.bdtScore0Trig(), trigCand.bdtScore1Trig(), trigCand.invMassTrig()); } else { diff --git a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx index c9d94417f56..9d384471401 100644 --- a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx +++ b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx @@ -62,13 +62,13 @@ enum CandType { /// Code to select collisions with at least one Ds meson struct HfDerivedDataCreatorCorrelationsReduced { - Produces rowCollisions; // Table with reduced collision info - Produces rowSEPairs; // Table with same-event pairs info - Produces rowAssocTrks; // Table with associated track info - Produces rowAssocTrkSels; // Table with associated track selection info - Produces rowTrigs; // Table with charm candidate info - Produces rowTrigCharms; // Table with charm trigger candidate info - Produces rowTrigHads; // Table with hadron trigger candidate info + Produces rowCollisions; // Table with reduced collision info + Produces rowSEPairs; // Table with same-event pairs info + Produces rowAssocTrks; // Table with associated track info + Produces rowAssocTrkSels; // Table with associated track selection info + Produces rowTrigs; // Table with charm candidate info + Produces rowTrigCharms; // Table with charm trigger candidate info + Produces rowTrigHads; // Table with hadron trigger candidate info Configurable centEstimator{"centEstimator", 2, "Centrality estimation (FT0A: 1, FT0C: 2, FT0M: 3, FV0A: 4)"}; Configurable selectionFlag{"selectionFlag", 15, "Selection Flag for hadron (ML score tables are required to run the task)"}; @@ -270,14 +270,14 @@ struct HfDerivedDataCreatorCorrelationsReduced { return false; } - if constexpr (candType == CandType::Hadron) { + if constexpr (candType == CandType::Hadron) { if (!cand.isGlobalTrackWoDCA() || cand.tpcNClsCrossedRows() < tpcNClsCrossedRowsMin) { return false; } if (assTrk.globalIndex() == cand.globalIndex()) { return false; // skip self-correlation for hadron-hadron } - } else { // Remove Daughter-Cand pairs for charm-hadron correlations + } else { // Remove Daughter-Cand pairs for charm-hadron correlations if constexpr ((requires { cand.prong2Id(); })) { // Check 3-prong return (assTrk.globalIndex() == cand.prong0Id() || assTrk.globalIndex() == cand.prong1Id() || assTrk.globalIndex() == cand.prong2Id()); } else { // Check 2-prong @@ -312,7 +312,7 @@ struct HfDerivedDataCreatorCorrelationsReduced { } registry.fill(HIST("hPhiVsPtTrigAssoc"), RecoDecay::constrainAngle(assTrk.phi(), -o2::constants::math::PIHalf), trigCand.pt(), assTrkPt); registry.fill(HIST("hEtaVsPtAssoc"), assTrk.eta(), trigCand.pt(), assTrkPt); - + double deltaEta = assTrk.eta() - trigCand.eta(); double deltaPhi = RecoDecay::constrainAngle(assTrk.phi() - trigCand.phi(), -o2::constants::math::PIHalf); rowSEPairs(rowCollisions.lastIndex(), trigCand.pt(), assTrkPt, deltaEta, deltaPhi); @@ -355,7 +355,7 @@ struct HfDerivedDataCreatorCorrelationsReduced { continue; } double assTrkPt = assTrk.pt(); - if (!first && downSampleTrksFactor < 1.) { // skip downsampling for the first track to avoid empty tables + if (!first && downSampleTrksFactor < 1.) { // skip downsampling for the first track to avoid empty tables float pseudoRndm = assTrkPt * 1000. - static_cast(assTrkPt * 1000); if (assTrkPt < ptMaxForDownSample && collCentrality < centMaxForDownSample && pseudoRndm >= downSampleTrksFactor) { continue;