Skip to content

Commit

Permalink
[PWGDQ] add LS histograms to output of MC selected signals
Browse files Browse the repository at this point in the history
  • Loading branch information
feisenhu committed Sep 13, 2024
1 parent aa69c6b commit d25a5e4
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions PWGDQ/Tasks/dqEfficiency_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit d25a5e4

Please sign in to comment.