diff --git a/PWGLF/Tasks/Resonances/kstarqa.cxx b/PWGLF/Tasks/Resonances/kstarqa.cxx index cb72f52ecb5..8d5a393b8e0 100644 --- a/PWGLF/Tasks/Resonances/kstarqa.cxx +++ b/PWGLF/Tasks/Resonances/kstarqa.cxx @@ -225,6 +225,8 @@ struct Kstarqa { rEventSelection.add("hEventCut", "No. of event after cuts", kTH1D, {{20, 0, 20}}); std::shared_ptr hEventSelection = rEventSelection.get(HIST("hEventCut")); + rEventSelection.add("hEventCutMC", "No. of event after cuts in MC", kTH1D, {{10, 0, 10}}); + std::shared_ptr hEventSelectionMC = rEventSelection.get(HIST("hEventCutMC")); rEventSelection.add("hTrackCut", "No. of tracks after cuts", kTH1D, {{20, 0, 20}}); std::shared_ptr hTrackSelection = rEventSelection.get(HIST("hTrackCut")); @@ -242,11 +244,24 @@ struct Kstarqa { std::string("IsGoodITSLayersAll") + check(configGp.isGoodITSLayersAll.value), std::string("isVertexITSTPC") + check(configGp.isVertexITSTPC.value), }; + + std::vector eveCutLabelsMC = { + "All Events", + "RecCollision", + "TimeFrameBorder", + "ITSROFrameBorder", + "Vz", + "TriggerTVX"}; + // assign labels for (size_t i = 0; i < eveCutLabels.size(); ++i) { hEventSelection->GetXaxis()->SetBinLabel(i + 1, eveCutLabels[i].c_str()); } + for (size_t i = 0; i < eveCutLabelsMC.size(); ++i) { + hEventSelectionMC->GetXaxis()->SetBinLabel(i + 1, eveCutLabelsMC[i].c_str()); + } + std::vector trackCutLabels = { "All Tracks", std::string("GlobalTracks") + check(configGp.isGlobalTracks.value), @@ -350,6 +365,7 @@ struct Kstarqa { if (doprocessEvtLossSigLossMC || doprocessEvtLossSigLossMCPhi) { hInvMass.add("MCcorrections/hSignalLossDenominator", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); + hInvMass.add("MCcorrections/hSignalLossDenominatorRec", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); hInvMass.add("MCcorrections/hSignalLossNumerator", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); hInvMass.add("MCcorrections/hSignalLossNumeratorINEL", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}}); hInvMass.add("MCcorrections/hImpactParameterRec", "Impact parameter in reconstructed MC", kTH1F, {impactParAxis}); @@ -1914,6 +1930,7 @@ struct Kstarqa { { // auto multiplicityRec = -1; bool isSelectedEvent = false; + bool isRecCollision = false; bool isSelectedEventINEL = false; auto multiplicity1 = -999.; @@ -1927,6 +1944,8 @@ struct Kstarqa { for (const auto& RecCollision : recCollisions) { if (!RecCollision.has_mcCollision()) continue; + isRecCollision = true; + if (!selectionEvent(RecCollision, false)) // don't fill event cut histogram continue; @@ -1962,8 +1981,8 @@ struct Kstarqa { if (configGp.isNoITSROFrameBorder && !RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder)) continue; - if (configGp.isSel8 && !RecCollision.sel8()) - continue; + // if (configGp.isSel8 && !RecCollision.sel8()) + // continue; if (rctCut.requireRCTFlagChecker && !rctChecker(RecCollision)) continue; @@ -1971,6 +1990,35 @@ struct Kstarqa { isSelectedEventINEL = true; } + for (const auto& RecCollision : recCollisions) { + rEventSelection.fill(HIST("hEventSelectionMC"), 0.5); + + if (!RecCollision.has_mcCollision()) + continue; + + rEventSelection.fill(HIST("hEventSelectionMC"), 1.5); + + if (configGp.isNoTimeFrameBorder && !RecCollision.selection_bit(aod::evsel::kNoTimeFrameBorder)) + continue; + + rEventSelection.fill(HIST("hEventSelectionMC"), 2.5); + + if (configGp.isNoITSROFrameBorder && !RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder)) + continue; + + rEventSelection.fill(HIST("hEventSelectionMC"), 3.5); + + if (std::abs(RecCollision.posZ()) > configGp.cutzvertex) + continue; + + rEventSelection.fill(HIST("hEventSelectionMC"), 4.5); + + if (configGp.isTriggerTVX && !RecCollision.selection_bit(aod::evsel::kIsTriggerTVX)) + continue; + + rEventSelection.fill(HIST("hEventSelectionMC"), 5.5); + } + bool isINELgt0true = false; if (pwglf::isINELgtNmc(mcParticles, 0, pdgDB)) { @@ -2003,6 +2051,10 @@ struct Kstarqa { continue; hInvMass.fill(HIST("MCcorrections/hSignalLossDenominator"), mcPart.pt(), multiplicityGen); + if (isRecCollision) { + hInvMass.fill(HIST("MCcorrections/hSignalLossDenominatorRec"), mcPart.pt(), multiplicityGen); + } + if (isSelectedEvent) { hInvMass.fill(HIST("MCcorrections/hSignalLossNumerator"), mcPart.pt(), multiplicityGen); }