Skip to content

Commit e144b37

Browse files
committed
Added ThnSparse for efficiency correction in same and mixed event
1 parent d42e00f commit e144b37

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

PWGEM/PhotonMeson/Tasks/photonhbt.cxx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,11 @@ struct photonhbt {
626626
fRegistry.add("Pair/same/CF_1D", "diphoton correlation 1D (qinv)", kTH2D, {axisQinv, axisKt}, true);
627627
}
628628

629-
fRegistry.add("Pair/same/hDeltaRCosOA",
630-
"distance between 2 conversion points / cos(#theta_{op}/2);#Delta r / cos(#theta_{op}/2) (cm);counts",
631-
kTH1D, {{100, 0, 100}}, true);
629+
fRegistry.add("Pair/same/hDeltaRCosOA", "distance between 2 conversion points / cos(#theta_{op}/2);#Delta r / cos(#theta_{op}/2) (cm);counts", kTH1D, {{100, 0, 100}}, true);
630+
fRegistry.add("Pair/same/hSparse_DEtaDPhi_kT",
631+
"same-event (#Delta#eta,#Delta#phi,q_{inv},k_{T}) for efficiency reweighting;"
632+
"#Delta#eta;#Delta#phi (rad);q_{inv} (GeV/c);k_{T} (GeV/c)",
633+
kTHnSparseD, {axisDeltaEta, axisDeltaPhi, axisKt}, true);
632634

633635
addQAHistogramsForStep("Pair/same/QA/Before/");
634636
addQAHistogramsForStep("Pair/same/QA/AfterDRCosOA/");
@@ -750,6 +752,17 @@ struct photonhbt {
750752
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("CF_1D"),
751753
hbtanalysis.cfgUseLCMS ? qabs_lcms : qinv, kt, weight);
752754
}
755+
float deta_pair = v1.Eta() - v2.Eta();
756+
float dphi_pair = v1.Phi() - v2.Phi();
757+
while (dphi_pair > o2::constants::math::PI)
758+
dphi_pair -= o2::constants::math::TwoPI;
759+
while (dphi_pair < -o2::constants::math::PI)
760+
dphi_pair += o2::constants::math::TwoPI;
761+
if constexpr (ev_id == 0) {
762+
fRegistry.fill(HIST("Pair/same/hSparse_DEtaDPhi_qinv_kT"), deta_pair, dphi_pair, qinv, kt, weight);
763+
} else {
764+
fRegistry.fill(HIST("Pair/mix/hSparse_DEtaDPhi_qinv_kT"), deta_pair, dphi_pair, qinv, kt, weight);
765+
}
753766
}
754767

755768
template <int ev_id, PairTruthType TruthT, typename TCollision>
@@ -809,6 +822,17 @@ struct photonhbt {
809822
} else {
810823
fRegistryPairMC.fill(HIST(mcDir) + HIST("CF_1D"), hbtanalysis.cfgUseLCMS ? qabs_lcms : qinv, kt, weight);
811824
}
825+
float deta_pair = v1.Eta() - v2.Eta();
826+
float dphi_pair = v1.Phi() - v2.Phi();
827+
while (dphi_pair > o2::constants::math::PI)
828+
dphi_pair -= o2::constants::math::TwoPI;
829+
while (dphi_pair < -o2::constants::math::PI)
830+
dphi_pair += o2::constants::math::TwoPI;
831+
if constexpr (ev_id == 0) {
832+
fRegistry.fill(HIST("Pair/same/hSparse_DEtaDPhi_qinv_kT"), deta_pair, dphi_pair, qinv, kt, weight);
833+
} else {
834+
fRegistry.fill(HIST("Pair/mix/hSparse_DEtaDPhi_qinv_kT"), deta_pair, dphi_pair, qinv, kt, weight);
835+
}
812836
}
813837

814838
template <typename TG1, typename TG2>

0 commit comments

Comments
 (0)