Skip to content

Commit 02196e5

Browse files
authored
Conditional filling of ZNC and ZNA centroids
Add checks isZN*Hit before filling Centroid histograms
1 parent d0d89de commit 02196e5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Common/TableProducer/zdcExtraTableProducer.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,12 @@ struct ZdcExtraTableProducer {
322322
centroidZNA[1] = 999.;
323323
}
324324
if (cfgSaveQaHistos) {
325-
registry.get<TH2>(HIST("ZNCCentroid"))->Fill(centroidZNC[0], centroidZNC[1]);
326-
registry.get<TH2>(HIST("ZNACentroid"))->Fill(centroidZNA[0], centroidZNA[1]);
325+
if (isZNChit) {
326+
registry.get<TH2>(HIST("ZNCCentroid"))->Fill(centroidZNC[0], centroidZNC[1]);
327+
}
328+
if (isZNAhit) {
329+
registry.get<TH2>(HIST("ZNACentroid"))->Fill(centroidZNA[0], centroidZNA[1]);
330+
}
327331
}
328332

329333
auto vz = collision.posZ();

0 commit comments

Comments
 (0)