Skip to content

Commit ed873d1

Browse files
victor-gonzalezVictor
andauthored
[PWGCF] DptDpt - DeltaPhi tracking, limited acceptance compensation (AliceO2Group#10584)
Co-authored-by: Victor <[email protected]>
1 parent 3dc60f2 commit ed873d1

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

PWGCF/TableProducer/dptdptfilter.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ struct DptDptTrackSelection {
254254
{
255255
maxDcazPtDep = ptDepCut;
256256
}
257+
void setRequirePvContributor(bool pvc = true)
258+
{
259+
requirePvContributor = pvc;
260+
}
257261

258262
template <typename TrackObject>
259263
bool isSelected(TrackObject const& track) const
@@ -366,11 +370,13 @@ struct DptDptTrackSelection {
366370
globalRun3->stdTrackSelection->SetTrackType(o2::aod::track::TrackTypeEnum::Track);
367371
globalRun3->stdTrackSelection->ResetITSRequirements();
368372
globalRun3->stdTrackSelection->SetRequireHitsInITSLayers(1, {0, 1, 2});
373+
globalRun3->setRequirePvContributor(true);
369374
DptDptTrackSelection* globalSDDRun3 = new DptDptTrackSelection(new TrackSelection(getGlobalTrackSelection()), outputList, "TType10Sdd");
370375
globalSDDRun3->stdTrackSelection->SetTrackType(o2::aod::track::TrackTypeEnum::Track);
371376
globalSDDRun3->stdTrackSelection->ResetITSRequirements();
372377
globalSDDRun3->stdTrackSelection->SetRequireNoHitsInITSLayers({0, 1, 2});
373378
globalSDDRun3->stdTrackSelection->SetRequireHitsInITSLayers(1, {3});
379+
globalSDDRun3->setRequirePvContributor(true);
374380
addTrackFilter(globalRun3);
375381
addTrackFilter(globalSDDRun3);
376382
} break;

PWGCF/TwoParticleCorrelations/Tasks/dptDptEfficiencyAndQc.cxx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ struct QAExtraDataCollectingEngine {
587587
/* pairs histograms */
588588
std::vector<std::vector<std::vector<std::shared_ptr<TH2>>>> fhPhiPhiA{2, {nsp, {nsp, nullptr}}};
589589
std::vector<std::vector<std::vector<std::shared_ptr<TH2>>>> fhEtaEtaA{2, {nsp, {nsp, nullptr}}};
590+
std::vector<std::vector<std::vector<std::shared_ptr<TH2>>>> fhN2VsDeltaEtaVsDeltaPhi{2, {nsp, {nsp, nullptr}}};
590591
TAxis ptAxis{analysis::dptdptfilter::ptbins, analysis::dptdptfilter::ptlow, analysis::dptdptfilter::ptup};
591592
std::vector<int> ptOfInterestBinMap{analysis::dptdptfilter::ptbins + 1, -1};
592593
std::vector<std::vector<std::vector<std::shared_ptr<THnSparse>>>> fhInSectorDeltaPhiVsPhiPhiPerPtBinA{2, {nsp, {nsp, nullptr}}};
@@ -601,6 +602,7 @@ struct QAExtraDataCollectingEngine {
601602
AxisSpec phiAxis = {phibins, 0.0f, constants::math::TwoPI, "#varphi"};
602603
AxisSpec phiSectorAxis = {72, 0.0f, kTpcPhiSectorWidth, "#varphi (mod(2#pi/18)) (rad)"};
603604
AxisSpec deltaPhiAxis = {phibins, 0.0f, constants::math::TwoPI, "#Delta#varphi (rad)"};
605+
AxisSpec deltaEtaAxis = {2 * etabins - 1, etalow - etaup, etaup - etalow, "#Delta#eta"};
604606
AxisSpec deltaPhiInSectorAxis = {144, -kTpcPhiSectorWidth, kTpcPhiSectorWidth, "#Delta#varphi (rad)"};
605607
AxisSpec etaAxis = {etabins, etalow, etaup, "#eta"};
606608
AxisSpec ptOfInterestAxis = {static_cast<int>(ptBinsOfInterest.size()), 0.5f, static_cast<float>(ptBinsOfInterest.size()) + 0.5f, "#it{p}_{T} (GeV/#it{c})"};
@@ -622,7 +624,8 @@ struct QAExtraDataCollectingEngine {
622624
HTITLESTRING("%s%s pairs", tnames[isp].c_str(), tnames[jsp].c_str()), kTH2F, {phiAxis, phiAxis});
623625
fhEtaEtaA[kindOfData][isp][jsp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, recogen.c_str(), "After"), HNAMESTRING("EtaEta_%s%s", tnames[isp].c_str(), tnames[jsp].c_str()),
624626
HTITLESTRING("%s%s pairs", tnames[isp].c_str(), tnames[jsp].c_str()), kTH2F, {etaAxis, etaAxis});
625-
/* first resize them to the actual configured size */
627+
fhN2VsDeltaEtaVsDeltaPhi[kindOfData][isp][jsp] = ADDHISTOGRAM(TH2, DIRECTORYSTRING("%s/%s/%s", dirname, recogen.c_str(), "After"), HNAMESTRING("N2VsDeltaEtaDeltaPhi_%s%s", tnames[isp].c_str(), tnames[jsp].c_str()),
628+
HTITLESTRING("%s%s pairs", tnames[isp].c_str(), tnames[jsp].c_str()), kTH2F, {deltaEtaAxis, deltaPhiAxis});
626629
fhInSectorDeltaPhiVsPhiPhiPerPtBinA[kindOfData][isp][jsp] = ADDHISTOGRAM(THnSparse, DIRECTORYSTRING("%s/%s/%s", dirname, recogen.c_str(), "After"), HNAMESTRING("DeltaPhiVsPhiPhiPt_%s%s", tnames[isp].c_str(), tnames[jsp].c_str()),
627630
HTITLESTRING("%s%s pairs, #it{p}_{T}: %s", tnames[isp].c_str(), tnames[jsp].c_str(), hPtRangesOfInterestTitle.c_str()),
628631
kTHnSparseF, {phiSectorAxis, phiSectorAxis, deltaPhiInSectorAxis, ptOfInterestAxis, ptOfInterestAxis});
@@ -638,6 +641,7 @@ struct QAExtraDataCollectingEngine {
638641
{
639642
using namespace efficiencyandqatask;
640643
using namespace analysis::dptdptfilter;
644+
float deltaEtaSpan = etaup - etalow;
641645

642646
/* we should only receive accepted tracks */
643647
for (auto const& track1 : tracks1) {
@@ -655,16 +659,21 @@ struct QAExtraDataCollectingEngine {
655659
}
656660
int ptBin2 = binForPt(track2);
657661
if (ptBin2 > 0) {
658-
fhPhiPhiA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(track1.phi(), track2.phi());
662+
float deltaPhi = RecoDecay::constrainAngle(track1.phi() - track2.phi());
663+
float deltaEta = track1.eta() - track2.eta();
664+
float preWeight = 1 - std::abs(deltaEta) / deltaEtaSpan;
665+
float weight = preWeight != 0 ? 1.0f / preWeight : 0.0f;
666+
fhPhiPhiA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(track1.phi(), track2.phi(), weight);
659667
fhEtaEtaA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(track1.eta(), track2.eta());
668+
fhN2VsDeltaEtaVsDeltaPhi[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(deltaEta, deltaPhi, weight);
660669
if (static_cast<int>(track1.phi() / kTpcPhiSectorWidth) == static_cast<int>(track2.phi() / kTpcPhiSectorWidth)) {
661670
/* only if, for sure, both tracks are within the same sector */
662671
float inTpcSectorPhi2 = std::fmod(track2.phi(), kTpcPhiSectorWidth);
663-
float deltaPhi = inTpcSectorPhi1 - inTpcSectorPhi2;
664-
double values[] = {inTpcSectorPhi1, inTpcSectorPhi2, deltaPhi, static_cast<float>(ptBin1), static_cast<float>(ptBin2)};
665-
fhInSectorDeltaPhiVsPhiPhiPerPtBinA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(values);
672+
float inTpcSectorDeltaPhi = inTpcSectorPhi1 - inTpcSectorPhi2;
673+
double values[] = {inTpcSectorPhi1, inTpcSectorPhi2, inTpcSectorDeltaPhi, static_cast<float>(ptBin1), static_cast<float>(ptBin2)};
674+
fhInSectorDeltaPhiVsPhiPhiPerPtBinA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(values, weight);
666675
values[0] = track1.eta(), values[1] = track2.eta();
667-
fhInSectorDeltaPhiVsEtaEtaPerPtBinA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(values);
676+
fhInSectorDeltaPhiVsEtaEtaPerPtBinA[kindOfData][track1.trackacceptedid()][track2.trackacceptedid()]->Fill(values, weight);
668677
}
669678
}
670679
}

0 commit comments

Comments
 (0)