Skip to content

Commit a29b8ce

Browse files
MarcellocostiMarcello Di Costanzo
andauthored
[PWGHF] derivedDataCreatorCorrelationsReduced: fix histogram filling in Mixed Event (#18470)
Co-authored-by: Marcello Di Costanzo <mdicosta@aliceml.cern.ch>
1 parent 07cb26a commit a29b8ce

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

‎PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,12 @@ struct HfDerivedDataCreatorCorrelationsReduced {
442442

443443
/// Fill track tables for mixed-event
444444
/// \param assTrks are the associated tracks
445-
/// \param collCentrality is the collision centrality
445+
/// \param cent is the collision centrality
446+
/// \param mult is the collision multiplicity
446447
template <typename TAssocTrks>
447448
void fillTrkMixedEvent(TAssocTrks const& assTrks,
448-
const float collCentrality)
449+
const float cent,
450+
const float mult)
449451
{
450452
bool first = true;
451453
for (const auto& assTrk : assTrks) {
@@ -461,15 +463,17 @@ struct HfDerivedDataCreatorCorrelationsReduced {
461463
}
462464
if (!first && downSampleTrksFactor < 1.) { // skip downsampling for the first track to avoid empty tables
463465
float const pseudoRndm = assTrkPt * 1000. - static_cast<int64_t>(assTrkPt * 1000);
464-
if (assTrkPt < ptMaxForDownSample && collCentrality < centMaxForDownSample && pseudoRndm >= downSampleTrksFactor) {
466+
if (assTrkPt < ptMaxForDownSample && cent < centMaxForDownSample && pseudoRndm >= downSampleTrksFactor) {
465467
continue;
466468
}
467469
}
468470
first = false;
469471
registry.fill(HIST("hPhiVsPtAssoc"), RecoDecay::constrainAngle(assTrk.phi(), -o2::constants::math::PIHalf), assTrkPt);
470472
registry.fill(HIST("hEtaVsPtAssoc"), assTrk.eta(), assTrkPt);
471-
registry.fill(HIST("hDcaXYVsPtAssoc"), assTrk.dcaXY(), assTrkPt);
472-
registry.fill(HIST("hDcaZVsPtAssoc"), assTrk.dcaZ(), assTrkPt);
473+
registry.fill(HIST("hDcaXYVsPtVsCentAssoc"), assTrkPt, assTrk.dcaXY(), cent);
474+
registry.fill(HIST("hDcaZVsPtVsCentAssoc"), assTrkPt, assTrk.dcaZ(), cent);
475+
registry.fill(HIST("hDcaXYVsPtVsMultAssoc"), assTrkPt, assTrk.dcaXY(), mult);
476+
registry.fill(HIST("hDcaZVsPtVsMultAssoc"), assTrkPt, assTrk.dcaZ(), mult);
473477
rowAssocBases(rowCollisions.lastIndex(), assTrk.phi(), assTrk.eta(), assTrkPt);
474478
rowAssocTrkSels(assTrk.tpcNClsCrossedRows(), assTrk.itsClusterMap(), assTrk.itsNCls(), assTrk.dcaXY(), assTrk.dcaZ());
475479
}
@@ -506,7 +510,7 @@ struct HfDerivedDataCreatorCorrelationsReduced {
506510
}
507511
rowCollisions(mult, coll.numContrib(), cent, coll.posZ());
508512
fillCharmMixedEvent<CandidateType::DplusToPiKPi>(candsDplus);
509-
fillTrkMixedEvent(tracks, cent);
513+
fillTrkMixedEvent(tracks, cent, mult);
510514
}
511515
PROCESS_SWITCH(HfDerivedDataCreatorCorrelationsReduced, processDplusMixedEvent, "Process Mixed Event for Dplus candidates", false);
512516

@@ -547,7 +551,7 @@ struct HfDerivedDataCreatorCorrelationsReduced {
547551
rowCollisions(mult, coll.numContrib(), cent, coll.posZ());
548552
fillCharmMixedEvent<CandidateType::DsToPiKK>(candsDsToPiKK);
549553
fillCharmMixedEvent<CandidateType::DsToKKPi>(candsDsToKKPi);
550-
fillTrkMixedEvent(tracks, cent);
554+
fillTrkMixedEvent(tracks, cent, mult);
551555
}
552556
PROCESS_SWITCH(HfDerivedDataCreatorCorrelationsReduced, processDsMixedEvent, "Process Mixed Event for Ds candidates", false);
553557

@@ -588,7 +592,7 @@ struct HfDerivedDataCreatorCorrelationsReduced {
588592
rowCollisions(mult, coll.numContrib(), cent, coll.posZ());
589593
fillCharmMixedEvent<CandidateType::D0ToPiK>(candsD0ToPiK);
590594
fillCharmMixedEvent<CandidateType::D0ToKPi>(candsD0ToKPi);
591-
fillTrkMixedEvent(tracks, cent);
595+
fillTrkMixedEvent(tracks, cent, mult);
592596
}
593597
PROCESS_SWITCH(HfDerivedDataCreatorCorrelationsReduced, processD0MixedEvent, "Process Mixed Event for D0 candidates", false);
594598

@@ -629,7 +633,7 @@ struct HfDerivedDataCreatorCorrelationsReduced {
629633
rowCollisions(mult, coll.numContrib(), cent, coll.posZ());
630634
fillCharmMixedEvent<CandidateType::LcToPKPi>(candsLcToPKPi);
631635
fillCharmMixedEvent<CandidateType::LcToPiKP>(candsLcToPiKP);
632-
fillTrkMixedEvent(tracks, cent);
636+
fillTrkMixedEvent(tracks, cent, mult);
633637
}
634638
PROCESS_SWITCH(HfDerivedDataCreatorCorrelationsReduced, processLcMixedEvent, "Process Mixed Event for Lc candidates", false);
635639

@@ -655,7 +659,7 @@ struct HfDerivedDataCreatorCorrelationsReduced {
655659
return;
656660
}
657661
rowCollisions(mult, coll.numContrib(), cent, coll.posZ());
658-
fillTrkMixedEvent(tracks, cent);
662+
fillTrkMixedEvent(tracks, cent, mult);
659663
}
660664
PROCESS_SWITCH(HfDerivedDataCreatorCorrelationsReduced, processHadronHadronMixedEvent, "Process Mixed Event for hadron candidates", false);
661665
};

0 commit comments

Comments
 (0)