5#ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFillerEfficiency_h
6#define AthenaMonitoringKernel_HistogramFiller_HistogramFillerEfficiency_h
8#include "TEfficiency.h"
24 if (
ATH_UNLIKELY( vars[0] ==
nullptr or vars[1] ==
nullptr ) )
return 0;
27 const size_t maskSize = vars.
cut->
size();
29 if (maskSize == 0 || (maskSize == 1 && !vars.
cut->
get(0))) {
return 0; }
30 if (
ATH_UNLIKELY(maskSize > 1 && maskSize != vars[0]->size())) {
32 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
33 << maskSize <<
" " << vars[0]->
size() <<
endmsg;
38 const TH1* efftot =
efficiency->GetTotalHistogram();
40 const unsigned nMonVar = vars.
size();
41 const size_t var0Size = vars[0]->
size();
43 for (
unsigned i = 0; i < var0Size; ++i) {
44 if (vars.
cut==
nullptr || vars.
cut->
get(i)) {
50 }
else if ( nMonVar==3 ) {
51 for (
unsigned i = 0; i < var0Size; ++i) {
52 if (vars.
cut==
nullptr || vars.
cut->
get(i)) {
59 }
else if ( nMonVar==4 ) {
60 for (
unsigned i = 0; i < var0Size; ++i) {
61 if (vars.
cut==
nullptr || vars.
cut->
get(i)) {
HistogramFillerEfficiency(const HistogramDef &definition, std::shared_ptr< IHistogramProvider > provider)
virtual unsigned fill(const HistogramFiller::VariablesPack &vars) const override
Method that actually fills the ROOT object.
HistogramFiller(const HistogramDef &histDef, std::shared_ptr< IHistogramProvider > histogramProvider)
Default constructor.
virtual double get(size_t) const =0
virtual size_t size() const =0
gives size of vector representation
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
IMessageSvc * getMessageSvc(bool quiet=false)
double getFillValue(const H *hist, const IMonitoredVariable *var, size_t i)
Return value for filling i'th entry of var into AXIS for hist.
Generic monitoring tool for athena components.
the internal class used to keep parsed Filler properties
helper class to pass variables to fillers
const Monitored::IMonitoredVariable * cut
pointer to cut mask variable, typically absent
size_t size() const
number of variables in the pack ( not counting the weight and mask )