From d25a5e4fe30ec030f4e589cd716f51a3aa217281 Mon Sep 17 00:00:00 2001 From: feisenhu Date: Fri, 13 Sep 2024 11:00:52 +0200 Subject: [PATCH] [PWGDQ] add LS histograms to output of MC selected signals --- PWGDQ/Tasks/dqEfficiency_withAssoc.cxx | 36 ++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx index 0272bfb1e0e..8e56ed5d16b 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx @@ -1208,6 +1208,8 @@ struct AnalysisSameEventPairing { if (fConfigQA) { names = { Form("PairsBarrelSEPM_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), + Form("PairsBarrelSEPP_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), + Form("PairsBarrelSEMM_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), Form("PairsBarrelSEPMCorrectAssoc_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), Form("PairsBarrelSEPMIncorrectAssoc_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), Form("PairsBarrelSEPM_ambiguousInBunch_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), @@ -1216,11 +1218,13 @@ struct AnalysisSameEventPairing { Form("PairsBarrelSEPM_ambiguousOutOfBunch_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), Form("PairsBarrelSEPM_ambiguousOutOfBunchCorrectAssoc_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), Form("PairsBarrelSEPM_ambiguousOutOfBunchIncorrectAssoc_%s_%s", objArray->At(icut)->GetName(), sig.GetName())}; - histNames += Form("%s;%s;%s;%s;%s;%s;%s;%s;%s;", names[0].Data(), names[1].Data(), names[2].Data(), names[3].Data(), names[4].Data(), names[5].Data(), names[6].Data(), names[7].Data(), names[8].Data()); + histNames += Form("%s;%s;%s;%s;%s;%s;%s;%s;%s;", names[0].Data(), names[1].Data(), names[2].Data(), names[3].Data(), names[4].Data(), names[5].Data(), names[6].Data(), names[7].Data(), names[8].Data(), names[9].Data(), names[10].Data()); } else { names = { - Form("PairsBarrelSEPM_%s_%s", objArray->At(icut)->GetName(), sig.GetName())}; - histNames += Form("%s;", names[0].Data()); + Form("PairsBarrelSEPM_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), + Form("PairsBarrelSEPP_%s_%s", objArray->At(icut)->GetName(), sig.GetName()), + Form("PairsBarrelSEMM_%s_%s", objArray->At(icut)->GetName(), sig.GetName())}; + histNames += Form("%s;%s;%s;", names[0].Data(), names[1].Data(), names[2].Data()); } fBarrelHistNamesMCmatched.try_emplace(icut * fRecMCSignals.size() + isig, names); } // end loop over MC signals @@ -1582,24 +1586,24 @@ struct AnalysisSameEventPairing { if (fConfigQA) { fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size()].Data(), VarManager::fgValues); // matched signal if (isCorrectAssoc_leg1 && isCorrectAssoc_leg2) { // correct track-collision association - fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 1].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 3].Data(), VarManager::fgValues); } else { // incorrect track-collision association - fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 2].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 4].Data(), VarManager::fgValues); } if (isAmbiInBunch) { // ambiguous in bunch - fHistMan->FillHistClass(histNames[icut][isig * fRecMCSignals.size() + 3].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNames[icut][isig * fRecMCSignals.size() + 5].Data(), VarManager::fgValues); if (isCorrectAssoc_leg1 && isCorrectAssoc_leg2) { - fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 4].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 6].Data(), VarManager::fgValues); } else { - fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 5].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 7].Data(), VarManager::fgValues); } } if (isAmbiOutOfBunch) { // ambiguous out of bunch - fHistMan->FillHistClass(histNames[icut][isig * fRecMCSignals.size() + 6].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNames[icut][isig * fRecMCSignals.size() + 8].Data(), VarManager::fgValues); if (isCorrectAssoc_leg1 && isCorrectAssoc_leg2) { - fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 7].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 9].Data(), VarManager::fgValues); } else { - fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 8].Data(), VarManager::fgValues); + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 10].Data(), VarManager::fgValues); } } } else { @@ -1610,6 +1614,11 @@ struct AnalysisSameEventPairing { } else { if (sign1 > 0) { // ++ pairs fHistMan->FillHistClass(histNames[icut][1].Data(), VarManager::fgValues); + for (unsigned int isig = 0; isig < fRecMCSignals.size(); isig++) { // loop over MC signals + if (mcDecision & (uint32_t(1) << isig)) { + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 1].Data(), VarManager::fgValues); + } + } if (fConfigQA) { if (isAmbiInBunch) { fHistMan->FillHistClass(histNames[icut][4].Data(), VarManager::fgValues); @@ -1620,6 +1629,11 @@ struct AnalysisSameEventPairing { } } else { // -- pairs fHistMan->FillHistClass(histNames[icut][2].Data(), VarManager::fgValues); + for (unsigned int isig = 0; isig < fRecMCSignals.size(); isig++) { // loop over MC signals + if (mcDecision & (uint32_t(1) << isig)) { + fHistMan->FillHistClass(histNamesMC[icut][isig * fRecMCSignals.size() + 2].Data(), VarManager::fgValues); + } + } if (fConfigQA) { if (isAmbiInBunch) { fHistMan->FillHistClass(histNames[icut][5].Data(), VarManager::fgValues);