5 #ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFillerEfficiency_h
6 #define AthenaMonitoringKernel_HistogramFiller_HistogramFillerEfficiency_h
8 #include "TEfficiency.h"
29 if (cutMaskValuePair.first == 0) {
return 0; }
30 if (
ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != vars.
var[0]->size())) {
32 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
33 << cutMaskValuePair.first <<
" " << vars.
var[0]->size() <<
endmsg;
35 auto cutMaskAccessor = cutMaskValuePair.second;
37 TEfficiency*
efficiency = this->histogram<TEfficiency>();
38 const TH1* efftot =
efficiency->GetTotalHistogram();
40 const unsigned nMonVar = vars.
size();
41 const size_t var0Size = vars.
var[0]->size();
43 for (
unsigned i = 0;
i < var0Size; ++
i) {
44 if (cutMaskAccessor(
i)) {
46 detail::getFillValue<Axis::X>(efftot, vars.
var[1],
i));
50 }
else if ( nMonVar==3 ) {
51 for (
unsigned i = 0;
i < var0Size; ++
i) {
52 if (cutMaskAccessor(
i)) {
54 detail::getFillValue<Axis::X>(efftot, vars.
var[1],
i),
55 detail::getFillValue<Axis::Y>(efftot, vars.
var[2],
i));
59 }
else if ( nMonVar==4 ) {
60 for (
unsigned i = 0;
i < var0Size; ++
i) {
61 if (cutMaskAccessor(
i)) {
63 detail::getFillValue<Axis::X>(efftot, vars.
var[1],
i),
64 detail::getFillValue<Axis::Y>(efftot, vars.
var[2],
i),
65 detail::getFillValue<Axis::Z>(efftot, vars.
var[3],
i));