Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<>,
Expand Down
6 changes: 3 additions & 3 deletions PWGHF/HFC/TableProducer/correlatorFlowCharmHadronsReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -282,7 +282,7 @@ struct HfCorrelatorFlowCharmHadronsReduced {
if (downSamplePairsME < 1.) {
float pseudoRndm = ptAssoc * 1000. - static_cast<int64_t>(ptAssoc * 1000);
if (ptTrig < ptMaxForDownSampleME && trigColl.centrality() < centMaxForDownSampleME &&
assocColl.centrality() < centMaxForDownSampleME && pseudoRndm >= downSamplePairsME) {
assocColl.centrality() < centMaxForDownSampleME && pseudoRndm >= downSamplePairsME) {
continue;
}
}
Expand All @@ -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 {
Expand Down
22 changes: 11 additions & 11 deletions PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ enum CandType {

/// Code to select collisions with at least one Ds meson
struct HfDerivedDataCreatorCorrelationsReduced {
Produces<aod::HfcRedCorrColls> rowCollisions; // Table with reduced collision info
Produces<aod::HfcRedSEPairs> rowSEPairs; // Table with same-event pairs info
Produces<aod::HfcRedTrkAssocs> rowAssocTrks; // Table with associated track info
Produces<aod::HfcRedTrkSels> rowAssocTrkSels; // Table with associated track selection info
Produces<aod::HfcRedTrigs> rowTrigs; // Table with charm candidate info
Produces<aod::HfcRedTrigCharms> rowTrigCharms; // Table with charm trigger candidate info
Produces<aod::HfcRedTrigHads> rowTrigHads; // Table with hadron trigger candidate info
Produces<aod::HfcRedCorrColls> rowCollisions; // Table with reduced collision info
Produces<aod::HfcRedSEPairs> rowSEPairs; // Table with same-event pairs info
Produces<aod::HfcRedTrkAssocs> rowAssocTrks; // Table with associated track info
Produces<aod::HfcRedTrkSels> rowAssocTrkSels; // Table with associated track selection info
Produces<aod::HfcRedTrigs> rowTrigs; // Table with charm candidate info
Produces<aod::HfcRedTrigCharms> rowTrigCharms; // Table with charm trigger candidate info
Produces<aod::HfcRedTrigHads> rowTrigHads; // Table with hadron trigger candidate info

Configurable<int> centEstimator{"centEstimator", 2, "Centrality estimation (FT0A: 1, FT0C: 2, FT0M: 3, FV0A: 4)"};
Configurable<int> selectionFlag{"selectionFlag", 15, "Selection Flag for hadron (ML score tables are required to run the task)"};
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<int64_t>(assTrkPt * 1000);
if (assTrkPt < ptMaxForDownSample && collCentrality < centMaxForDownSample && pseudoRndm >= downSampleTrksFactor) {
continue;
Expand Down
Loading