diff --git a/PWGLF/DataModel/LFSigmaTables.h b/PWGLF/DataModel/LFSigmaTables.h index 69ff56bcc5f..9f2bf428352 100644 --- a/PWGLF/DataModel/LFSigmaTables.h +++ b/PWGLF/DataModel/LFSigmaTables.h @@ -790,6 +790,8 @@ DECLARE_SOA_COLUMN(PhotonMCPz, photonmcpz, float); DECLARE_SOA_COLUMN(IsPhotonPrimary, isPhotonPrimary, bool); DECLARE_SOA_COLUMN(PhotonPDGCode, photonPDGCode, int); DECLARE_SOA_COLUMN(PhotonPDGCodeMother, photonPDGCodeMother, int); +DECLARE_SOA_COLUMN(PhotonPDGCodeGrandMother, photonPDGCodeGrandMother, int); +DECLARE_SOA_COLUMN(PhotonGlobalIndexGrandMother, photonGlobalIndexGrandMother, int); DECLARE_SOA_COLUMN(PhotonIsCorrectlyAssoc, photonIsCorrectlyAssoc, bool); DECLARE_SOA_COLUMN(KShortMCPx, kshortmcpx, float); @@ -798,6 +800,8 @@ DECLARE_SOA_COLUMN(KShortMCPz, kshortmcpz, float); DECLARE_SOA_COLUMN(IsKShortPrimary, isKShortPrimary, bool); DECLARE_SOA_COLUMN(KShortPDGCode, kshortPDGCode, int); DECLARE_SOA_COLUMN(KShortPDGCodeMother, kshortPDGCodeMother, int); +DECLARE_SOA_COLUMN(KShortPDGCodeGrandMother, kshortPDGCodeGrandMother, int); +DECLARE_SOA_COLUMN(KShortGlobalIndexGrandMother, kshortGlobalIndexGrandMother, int); DECLARE_SOA_COLUMN(KShortIsCorrectlyAssoc, kshortIsCorrectlyAssoc, bool); DECLARE_SOA_DYNAMIC_COLUMN(IsKStar, isKStar, //! IsSigma0 @@ -903,10 +907,10 @@ DECLARE_SOA_TABLE(KStarMCCores, "AOD", "KSTARMCCORES", kstarMCCore::MCradius, kstarMCCore::PDGCode, kstarMCCore::PDGCodeMother, kstarMCCore::MCprocess, kstarMCCore::IsProducedByGenerator, kstarMCCore::PhotonMCPx, kstarMCCore::PhotonMCPy, kstarMCCore::PhotonMCPz, - kstarMCCore::IsPhotonPrimary, kstarMCCore::PhotonPDGCode, kstarMCCore::PhotonPDGCodeMother, kstarMCCore::PhotonIsCorrectlyAssoc, + kstarMCCore::IsPhotonPrimary, kstarMCCore::PhotonPDGCode, kstarMCCore::PhotonPDGCodeMother, kstarMCCore::PhotonPDGCodeGrandMother, kstarMCCore::PhotonGlobalIndexGrandMother, kstarMCCore::PhotonIsCorrectlyAssoc, kstarMCCore::KShortMCPx, kstarMCCore::KShortMCPy, kstarMCCore::KShortMCPz, - kstarMCCore::IsKShortPrimary, kstarMCCore::KShortPDGCode, kstarMCCore::KShortPDGCodeMother, kstarMCCore::KShortIsCorrectlyAssoc, + kstarMCCore::IsKShortPrimary, kstarMCCore::KShortPDGCode, kstarMCCore::KShortPDGCodeMother, kstarMCCore::KShortPDGCodeGrandMother, kstarMCCore::KShortGlobalIndexGrandMother, kstarMCCore::KShortIsCorrectlyAssoc, // Dynamic columns kstarMCCore::IsKStar, diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index 41519c50498..6a363942d5f 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -811,6 +811,10 @@ struct sigma0builder { int V02PDGCode = 0; int V01PDGCodeMother = 0; int V02PDGCodeMother = 0; + int V01PDGCodeGrandMother = 0; + int V02PDGCodeGrandMother = 0; + int V01GlobalIndexGrandMother = 0; + int V02GlobalIndexGrandMother = 0; int V0PairPDGCode = 0; int V0PairPDGCodeMother = 0; int V0PairMCProcess = -1; @@ -956,6 +960,46 @@ struct sigma0builder { auto const& MCMother_v01 = MCMothersList_v01.front(); // First mother auto const& MCMother_v02 = MCMothersList_v02.front(); // First mother + // Add the grandmothers + auto const& GrandMothersList_v01 = MCMother_v01.template mothers_as(); + if (!GrandMothersList_v01.empty()) { + MCinfo.V01PDGCodeGrandMother = GrandMothersList_v01.front().pdgCode(); + MCinfo.V01GlobalIndexGrandMother = GrandMothersList_v01.front().globalIndex(); + } + + auto const& GrandMothersList_v02 = MCMother_v02.template mothers_as(); + if (!GrandMothersList_v02.empty()) { + MCinfo.V02PDGCodeGrandMother = GrandMothersList_v02.front().pdgCode(); + MCinfo.V02GlobalIndexGrandMother = GrandMothersList_v02.front().globalIndex(); + } + + // check grandmothers and fill histograms + int kShortMotherCode = 0; + int photonMotherCode = 0; + if ((std::abs(MCParticle_v01.pdgCode()) == PDG_t::kGamma) && (std::abs(MCParticle_v02.pdgCode()) == PDG_t::kK0Short) && (!fIsKStar)) { + + kShortMotherCode = MCMother_v02.pdgCode(); + + // If the KShort mother is a (anti)Kaon, use the grandmother instead + if (std::abs(kShortMotherCode) == PDG_t::kK0) { + auto const& kShortGrandMothers = MCMother_v02.template mothers_as(); + if (!kShortGrandMothers.empty()) { + kShortMotherCode = kShortGrandMothers.front().pdgCode(); + } + } + + photonMotherCode = MCMother_v01.pdgCode(); + // If the photon mother is a pi0, climb to grandmother + if (std::abs(photonMotherCode) == PDG_t::kPi0) { + auto const& photonGrandMothers = MCMother_v01.template mothers_as(); + if (!photonGrandMothers.empty()) { + photonMotherCode = photonGrandMothers.front().pdgCode(); + } + } + + histos.fill(HIST("MCQA/h2dTrueDaughtersMatrix"), kShortMotherCode, photonMotherCode); + } + if (MCMother_v01.globalIndex() == MCMother_v02.globalIndex()) { // Is it the same mother? MCinfo.fV0PairProducedByGenerator = MCMother_v01.producedByGenerator(); @@ -1330,13 +1374,11 @@ struct sigma0builder { if (eventSelections.maxIR >= 0 && interactionRate > eventSelections.maxIR) { return false; } - if (fillHists) + if (fillHists) { histos.fill(HIST("hEventSelection"), 19 /* Above max IR */); - - // Fill centrality histogram after event selection - if (fillHists) + // Fill centrality histogram after event selection histos.fill(HIST("hEventCentrality"), centrality); - + } return true; } @@ -2561,9 +2603,9 @@ struct sigma0builder { kstarmccores(kstarMCInfo.V0PairMCRadius, kstarMCInfo.V0PairPDGCode, kstarMCInfo.V0PairPDGCodeMother, kstarMCInfo.V0PairMCProcess, kstarMCInfo.fV0PairProducedByGenerator, kstarMCInfo.V01MCpx, kstarMCInfo.V01MCpy, kstarMCInfo.V01MCpz, - kstarMCInfo.fIsV01Primary, kstarMCInfo.V01PDGCode, kstarMCInfo.V01PDGCodeMother, kstarMCInfo.fIsV01CorrectlyAssign, + kstarMCInfo.fIsV01Primary, kstarMCInfo.V01PDGCode, kstarMCInfo.V01PDGCodeMother, kstarMCInfo.V01PDGCodeGrandMother, kstarMCInfo.V01GlobalIndexGrandMother, kstarMCInfo.fIsV01CorrectlyAssign, kstarMCInfo.V02MCpx, kstarMCInfo.V02MCpy, kstarMCInfo.V02MCpz, - kstarMCInfo.fIsV02Primary, kstarMCInfo.V02PDGCode, kstarMCInfo.V02PDGCodeMother, kstarMCInfo.fIsV02CorrectlyAssign); + kstarMCInfo.fIsV02Primary, kstarMCInfo.V02PDGCode, kstarMCInfo.V02PDGCodeMother, kstarMCInfo.V02PDGCodeGrandMother, kstarMCInfo.V02GlobalIndexGrandMother, kstarMCInfo.fIsV02CorrectlyAssign); } // KStar -> stracollisions link @@ -2765,9 +2807,9 @@ struct sigma0builder { } } - //_______________________________________________ - // KStar loop if constexpr (!soa::is_table) { // Don't use EMCal clusters here + //_______________________________________________ + // KStar loop if (fillKStarTables) { auto gamma1 = fullV0s.rawIteratorAt(bestGammasArray[i]); for (size_t j = 0; j < bestKShortsArray.size(); ++j) { @@ -2778,11 +2820,9 @@ struct sigma0builder { continue; } } - } - //_______________________________________________ - // pi0 loop - if constexpr (!soa::is_table) { // Don't use EMCal clusters here + //_______________________________________________ + // pi0 loop if (fillPi0Tables) { auto gamma1 = fullV0s.rawIteratorAt(bestGammasArray[i]); for (size_t j = i + 1; j < bestGammasArray.size(); ++j) { diff --git a/PWGLF/Tasks/Resonances/k892hadronphoton.cxx b/PWGLF/Tasks/Resonances/k892hadronphoton.cxx index 6833059f0b6..839079331fd 100644 --- a/PWGLF/Tasks/Resonances/k892hadronphoton.cxx +++ b/PWGLF/Tasks/Resonances/k892hadronphoton.cxx @@ -383,11 +383,9 @@ struct k892hadronphoton { histos.add(histodir + "/MC/KStar/hDCAPairDauVsPt", "hDCAPairDauVsPt", kTH2D, {axisDCAdau, axisPt}); // 1/pT Resolution: - if (fillResoQAhistos && histodir == "BeforeSel") { - + if (fillResoQAhistos) { histos.add(histodir + "/MC/Reso/h2dKShortPtResolution", "h2dKShortPtResolution", kTH2D, {axisInvPt, axisDeltaPt}); - histos.add(histodir + "/MC/Reso/h3dKShortPtResoVsTPCCR", "h3dKShortPtResoVsTPCCR", kTH3D, {axisInvPt, axisDeltaPt, axisTPCrows}); - histos.add(histodir + "/MC/Reso/h3dKShortPtResoVsTPCCR", "h3dKShortPtResoVsTPCCR", kTH3D, {axisInvPt, axisDeltaPt, axisTPCrows}); + histos.add(histodir + "/MC/Reso/h2dGammaPtResolution", "h2dGammaPtResolution", kTH2D, {axisInvPt, axisDeltaPt}); histos.add(histodir + "/MC/Reso/h2dKStarPtResolution", "h2dKStarPtResolution", kTH2D, {axisInvPt, axisDeltaPt}); histos.add(histodir + "/MC/Reso/h2dKStarRadiusResolution", "h2dKStarRadiusResolution", kTH2D, {axisPt, axisDeltaPt}); } @@ -396,10 +394,16 @@ struct k892hadronphoton { if (fillBkgQAhistos) { histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_All", "h2dPtVsMassKStar_All", kTH2D, {axisPt, axisKStarMass}); histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_TrueDaughters", "h2dPtVsMassKStar_TrueDaughters", kTH2D, {axisPt, axisKStarMass}); - histos.add(histodir + "/MC/BkgStudy/h2dTrueDaughtersMatrix", "h2dTrueDaughtersMatrix", kTHnSparseD, {{10001, -5000.5f, +5000.5f}, {10001, -5000.5f, +5000.5f}}); + histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_PhotonOmega", "h2dPtVsMassKStar_PhotonOmega", kTH2D, {axisPt, axisKStarMass}); + histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_PhotonRho", "h2dPtVsMassKStar_PhotonRho", kTH2D, {axisPt, axisKStarMass}); + histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_PhotonEta", "h2dPtVsMassKStar_PhotonEta", kTH2D, {axisPt, axisKStarMass}); + histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_KShortKCharged", "h2dPtVsMassKStar_KShortKCharged", kTH2D, {axisPt, axisKStarMass}); + histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_KStarPionKaon", "h2dPtVsMassKStar_KStarPionKaon", kTH2D, {axisPt, axisKStarMass}); histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_TrueGammaFakeKShort", "h2dPtVsMassKStar_TrueGammaFakeKShort", kTH2D, {axisPt, axisKStarMass}); histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_FakeGammaTrueKShort", "h2dPtVsMassKStar_FakeGammaTrueKShort", kTH2D, {axisPt, axisKStarMass}); histos.add(histodir + "/MC/BkgStudy/h2dPtVsMassKStar_FakeDaughters", "h2dPtVsMassKStar_FakeDaughters", kTH2D, {axisPt, axisKStarMass}); + histos.add(histodir + "/MC/BkgStudy/h2dTrueDaughtersMatrix", "h2dTrueDaughtersMatrix", kTHnSparseD, {{10001, -5000.5f, +5000.5f}, {10001, -5000.5f, +5000.5f}}); + histos.add(histodir + "/MC/BkgStudy/h2dTrueDaughtersMatrixGrandMother", "h2dTrueDaughtersMatrixGrandMother", kTHnSparseD, {{10001, -5000.5f, +5000.5f}, {10001, -5000.5f, +5000.5f}}); } } } @@ -575,12 +579,12 @@ struct k892hadronphoton { if (eventSelections.maxIR >= 0 && interactionRate > eventSelections.maxIR) { return false; } - if (fillHists) - histos.fill(HIST("hEventSelection"), 19 /* Above max IR */); - // Fill centrality histogram after event selection - if (fillHists) + if (fillHists) { + histos.fill(HIST("hEventSelection"), 19 /* Above max IR */); + // Fill centrality histogram after event selection histos.fill(HIST("hEventCentrality"), centrality); + } return true; } @@ -761,17 +765,18 @@ struct k892hadronphoton { return trkCode; } - template + template void getResolution(TKStarObject const& kstar) { + // Check whether it is before or after selections + static constexpr std::string_view MainDir[] = {"BeforeSel", "AfterSel"}; //_______________________________________ // Gamma MC association if (std::abs(kstar.photonPDGCode()) == PDG_t::kGamma) { if (kstar.photonmcpt() > 0) { - histos.fill(HIST("BeforeSel/MC/Reso/h3dGammaPtResoVsTPCCR"), 1.f / kstar.kshortmcpt(), 1.f / kstar.kshortPt() - 1.f / kstar.kshortmcpt(), -1 * kstar.photonNegTPCCrossedRows()); // 1/pT resolution - histos.fill(HIST("BeforeSel/MC/Reso/h3dGammaPtResoVsTPCCR"), 1.f / kstar.kshortmcpt(), 1.f / kstar.kshortPt() - 1.f / kstar.kshortmcpt(), kstar.photonPosTPCCrossedRows()); // 1/pT resolution - histos.fill(HIST("BeforeSel/MC/Reso/h2dGammaPtResolution"), 1.f / kstar.photonmcpt(), 1.f / kstar.photonPt() - 1.f / kstar.photonmcpt()); // pT resolution + // histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dGammaPtResolution"), 1.f / kstar.photonmcpt(), kstar.photonPt() - kstar.photonmcpt()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dGammaPtResolution"), 1.f / kstar.photonmcpt(), (kstar.photonPt() - kstar.photonmcpt()) / kstar.photonmcpt()); } } @@ -779,18 +784,17 @@ struct k892hadronphoton { // KShort MC association if (std::abs(kstar.kshortPDGCode()) == PDG_t::kK0Short) { if (kstar.kshortmcpt() > 0) { - histos.fill(HIST("BeforeSel/MC/Reso/h2dKShortPtResolution"), 1.f / kstar.kshortmcpt(), 1.f / kstar.kshortPt() - 1.f / kstar.kshortmcpt()); // 1/pT resolution - histos.fill(HIST("BeforeSel/MC/Reso/h3dKShortPtResoVsTPCCR"), 1.f / kstar.kshortmcpt(), 1.f / kstar.kshortPt() - 1.f / kstar.kshortmcpt(), -1 * kstar.kshortNegTPCCrossedRows()); // 1/pT resolution - histos.fill(HIST("BeforeSel/MC/Reso/h3dKShortPtResoVsTPCCR"), 1.f / kstar.kshortmcpt(), 1.f / kstar.kshortPt() - 1.f / kstar.kshortmcpt(), kstar.kshortPosTPCCrossedRows()); // 1/pT resolution + // histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dKShortPtResolution"), 1.f / kstar.kshortmcpt(), kstar.kshortPt() - kstar.kshortmcpt()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dKShortPtResolution"), 1.f / kstar.kshortmcpt(), (kstar.kshortPt() - kstar.kshortmcpt()) / kstar.kshortmcpt()); } } //_______________________________________ // KStar MC association if (kstar.isKStar()) { - histos.fill(HIST("BeforeSel/MC/Reso/h2dKStarRadiusResolution"), kstar.mcpt(), kstar.radius() - kstar.mcradius()); // pT resolution + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dKStarRadiusResolution"), kstar.mcpt(), kstar.radius() - kstar.mcradius()); // pT resolution if (kstar.mcpt() > 0) - histos.fill(HIST("BeforeSel/MC/Reso/h2dKStarPtResolution"), 1.f / kstar.mcpt(), 1.f / kstar.pt() - 1.f / kstar.mcpt()); // pT resolution + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dKStarPtResolution"), 1.f / kstar.mcpt(), (1.f / kstar.pt() - 1.f / kstar.mcpt()) / (1.f / kstar.mcpt())); // pT resolution } } @@ -804,18 +808,40 @@ struct k892hadronphoton { bool fIsKStar = kstar.isKStar(); int photonPDGCode = kstar.photonPDGCode(); int photonPDGCodeMother = kstar.photonPDGCodeMother(); + int photonPDGCodeGrandMother = kstar.photonPDGCodeGrandMother(); + int photonGlobalIndexGrandMother = kstar.photonGlobalIndexGrandMother(); int kshortPDGCode = kstar.kshortPDGCode(); int kshortPDGCodeMother = kstar.kshortPDGCodeMother(); + int kshortPDGCodeGrandMother = kstar.kshortPDGCodeGrandMother(); + int kshortGlobalIndexGrandMother = kstar.kshortGlobalIndexGrandMother(); float kstarpT = kstar.pt(); float kstarMass = kstar.kstarMass(); histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_All"), kstarpT, kstarMass); //_______________________________________ - // Real Gamma x Real KShort - but not from the same kstar! - if ((!fIsKStar)) { //(std::abs(photonPDGCode) == PDG_t::kGamma) && (std::abs(KShortPDGCode) == PDG_t::kK0Short) && + // Real Gamma x Real KShort - but not direct decays from the same kstar! + if ((!fIsKStar) && (std::abs(photonPDGCode) == PDG_t::kGamma) && (std::abs(kshortPDGCode) == PDG_t::kK0Short)) { histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_TrueDaughters"), kstarpT, kstarMass); histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dTrueDaughtersMatrix"), kshortPDGCodeMother, photonPDGCodeMother); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dTrueDaughtersMatrixGrandMother"), kshortPDGCodeGrandMother, photonPDGCodeGrandMother); + + // coming from the same kstar (coupled), but via a different decay channel (K* -> K0 pi0 -> K0s gamma) + if (std::abs(kshortPDGCodeGrandMother) == o2::constants::physics::Pdg::kK0Star892 && std::abs(photonPDGCodeGrandMother) == o2::constants::physics::Pdg::kK0Star892 && (photonGlobalIndexGrandMother == kshortGlobalIndexGrandMother)) // K*(892)0 + histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_KStarPionKaon"), kstarpT, kstarMass); + + // Break down of different photon / kshort sources + if (std::abs(photonPDGCodeGrandMother) == o2::constants::physics::Pdg::kOmega) // omega(782) + histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_PhotonOmega"), kstarpT, kstarMass); + + if (std::abs(photonPDGCodeGrandMother) == PDG_t::kRho770Plus) // rho+-(770) + histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_PhotonRho"), kstarpT, kstarMass); + + if (std::abs(photonPDGCodeMother) == o2::constants::physics::Pdg::kEta) // eta + histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_PhotonEta"), kstarpT, kstarMass); + + if (std::abs(kshortPDGCodeGrandMother) == o2::constants::physics::Pdg::kKPlusStar892) // K*(892)+- + histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassKStar_KShortKCharged"), kstarpT, kstarMass); } //_______________________________________ @@ -978,8 +1004,8 @@ struct k892hadronphoton { //_______________________________________ // pT resolution histos - if ((mode == 0) && fillResoQAhistos) - getResolution(kstar); + if (fillResoQAhistos) + getResolution(kstar); } } } diff --git a/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx b/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx index a3615f47e69..93549ebc1c4 100644 --- a/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx +++ b/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx @@ -90,6 +90,7 @@ struct k892hadronphotonBkg { Configurable kstarMaxRap{"kstarMaxRap", 0.5f, "Max |y(K*)|"}; Configurable nBkgRot{"nBkgRot", 3, "Rotations per pair (rotational bkg)"}; Configurable rotationalCut{"rotationalCut", 10, "theta band: [pi - pi/cut, pi + pi/cut]"}; + Configurable rotationalFactor{"rotationalFactor", 1.f, "Factor to scale the angle of rotation (rotationalFactor * PI)"}; } kstarBkgConfig; ConfigurableAxis axisVertexMixBkg{"axisVertexMixBkg", {VARIABLE_WIDTH, -10.f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "z-vertex bins for mixing"}; @@ -385,13 +386,11 @@ struct k892hadronphotonBkg { if (eventSelections.maxIR >= 0 && interactionRate > eventSelections.maxIR) { return false; } - if (fillHists) + if (fillHists) { histos.fill(HIST("hEventSelection"), 19 /* Above max IR */); - - // Fill centrality histogram after event selection - if (fillHists) + // Fill centrality histogram after event selection histos.fill(HIST("hEventCentrality"), centrality); - + } return true; } @@ -595,8 +594,8 @@ struct k892hadronphotonBkg { 0.0); for (int irot = 0; irot < kstarBkgConfig.nBkgRot; ++irot) { - float theta = rotRng.Uniform(o2::constants::math::PI - o2::constants::math::PI / kstarBkgConfig.rotationalCut, - o2::constants::math::PI + o2::constants::math::PI / kstarBkgConfig.rotationalCut); + float theta = rotRng.Uniform(kstarBkgConfig.rotationalFactor * o2::constants::math::PI - o2::constants::math::PI / kstarBkgConfig.rotationalCut, + kstarBkgConfig.rotationalFactor * o2::constants::math::PI + o2::constants::math::PI / kstarBkgConfig.rotationalCut); ROOT::Math::PtEtaPhiMVector kRot(kshort.pt(), kshort.eta(), kshort.phi() + theta, o2::constants::physics::MassK0Short);