Skip to content

Commit 248669a

Browse files
committed
Fill histogram for efficiency correction
1 parent c3b0ad1 commit 248669a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

PWGLF/Tasks/Resonances/phipbpb.cxx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <TDatabasePDG.h>
4747
#include <TDirectory.h>
4848
#include <TFile.h>
49+
#include <TGenPhaseSpace.h>
4950
#include <TH1F.h>
5051
#include <TH2F.h>
5152
#include <THn.h>
@@ -230,6 +231,12 @@ struct phipbpb {
230231
histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{400, -20.0, 20.0}});
231232

232233
if (!fillv1) {
234+
235+
histos.add("hKaonpIsotropic", "hKaonpIsotropic", HistType::kTHnSparseD, {{8, 0.0, 80.0}, {100, 0.0, 10.0}, {8, -0.8, 0.8}, {36, 0.0, TMath::Pi()}});
236+
histos.add("hKaonpData", "hKaonpData", HistType::kTHnSparseD, {{8, 0.0, 80.0}, {100, 0.0, 10.0}, {8, -0.8, 0.8}, {36, 0.0, TMath::Pi()}});
237+
histos.add("hKaonmIsotropic", "hKaonmIsotropic", HistType::kTHnSparseD, {{8, 0.0, 80.0}, {100, 0.0, 10.0}, {8, -0.8, 0.8}, {36, 0.0, TMath::Pi()}});
238+
histos.add("hKaonmData", "hKaonmData", HistType::kTHnSparseD, {{8, 0.0, 80.0}, {100, 0.0, 10.0}, {8, -0.8, 0.8}, {36, 0.0, TMath::Pi()}});
239+
233240
histos.add("hTPCglobalmomcorr", "Momentum correlation", kTH3F, {{200, -10.0f, 10.0f}, {200, -10.0f, 10.0f}, {8, 0.0f, 80.0f}});
234241
histos.add("hpTvsRapidity", "pT vs Rapidity", kTH2F, {{100, 0.0f, 10.0f}, {300, -1.5f, 1.5f}});
235242
histos.add("hFTOCvsTPCNoCut", "Mult correlation FT0C vs. TPC without any cut", kTH2F, {{80, 0.0f, 80.0f}, {100, -0.5f, 5999.5f}});
@@ -501,6 +508,24 @@ struct phipbpb {
501508
return false;
502509
}
503510

511+
void fillHisoWithTGenPS(const ROOT::Math::PxPyPzMVector& Pphi_lab, double psi2, double ptMin, double etaMax, double centrality)
512+
{
513+
TLorentzVector parent;
514+
double masses[2] = {0.493, 0.493};
515+
parent.SetPxPyPzE(Pphi_lab.Px(), Pphi_lab.Py(), Pphi_lab.Pz(), Pphi_lab.E());
516+
TGenPhaseSpace gen;
517+
gen.SetDecay(parent, 2, masses);
518+
gen.Generate();
519+
520+
TLorentzVector* K1 = gen.GetDecay(0);
521+
TLorentzVector* K2 = gen.GetDecay(1);
522+
523+
if (K1->Pt() > ptMin && std::abs(K1->Eta()) < etaMax)
524+
histos.fill(HIST("hKaonpIsotropic"), centrality, K1->Pt(), K1->Eta(), GetPhiInRange(K1->Phi() - psi2));
525+
if (K2->Pt() > ptMin && std::abs(K2->Eta()) < etaMax)
526+
histos.fill(HIST("hKaonmIsotropic"), centrality, K2->Pt(), K2->Eta(), GetPhiInRange(K2->Phi() - psi2));
527+
}
528+
504529
ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for bin"};
505530
ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {20, 0, 100}, "multiplicity percentile for bin"};
506531
ConfigurableAxis axisEPAngle{"axisEPAngle", {6, -TMath::Pi() / 2, TMath::Pi() / 2}, "event plane angle"};
@@ -728,6 +753,11 @@ struct phipbpb {
728753
histos.fill(HIST("hSparseV2SameEventCosDeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2, centrality);
729754
histos.fill(HIST("hSparseV2SameEventCos2DeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2acc, centrality);
730755
}
756+
757+
histos.fill(HIST("hKaonpData"), centrality, KaonPlus.Pt(), KaonPlus.Eta(), GetPhiInRange(KaonPlus.Phi() - psiFT0C));
758+
histos.fill(HIST("hKaonmData"), centrality, KaonMinus.Pt(), KaonMinus.Eta(), GetPhiInRange(KaonMinus.Phi() - psiFT0C));
759+
fillHisoWithTGenPS(PhiMesonMother, psiFT0C, cfgCutPT, cfgCutEta, centrality);
760+
731761
histos.fill(HIST("hSparseV2SameEventCosDeltaPhiSquare"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * v2, centrality);
732762
histos.fill(HIST("hSparseV2SameEventCosDeltaPhiCube"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * v2 * v2, centrality);
733763
histos.fill(HIST("hSparseV2SameEventSinDeltaPhi"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2sin * QFT0C, centrality);

0 commit comments

Comments
 (0)