5 #include "TEfficiency.h"
11 std::tuple<float, float> calcEfficiency(
float num,
float denom) {
13 return std::make_tuple(0.0
f, 0.0
f);
17 const float eff = num/denom;
18 const float errDown = TEfficiency::ClopperPearson(denom, num, cl,
false);
19 const float errUp = TEfficiency::ClopperPearson(denom, num, cl,
true);
22 return std::make_tuple(eff,
std::max(eff-errDown, errUp-eff));
27 dqmBaseFolder_(ps.getUntrackedParameter<std::
string>(
"DQMBaseFolder"))
41 std::size_t pos = subfolder.rfind(
"/");
42 if(pos == std::string::npos)
45 if(subfolder.compare(pos, 4,
"HLT_") == 0) {
46 LogDebug(
"HLTTauDQMOffline") <<
"Processing path " << subfolder.substr(pos);
55 if(!eventsPerFilter) {
56 LogDebug(
"HLTTauDQMOffline") <<
"ME " << folder <<
"/EventsPerFilter not found";
64 const TAxis *xaxis = eventsPerFilter->
getTH1F()->GetXaxis();
73 LogDebug(
"HLTTauDQMOffline") <<
"HLTTauPostProcessor: Encountered denominator < numerator with efficiency plot EfficiencyRefPrevious in folder " << folder <<
", bin " <<
i <<
" numerator " << eventsPerFilter->
getBinContent(
i) <<
" denominator " << eventsPerFilter->
getBinContent(
i-1);
77 const float efficiency = std::get<0>(effErr);
78 const float err = std::get<1>(effErr);
80 prev->SetBinContent(
i-1, efficiency);
81 prev->SetBinEntries(
i-1, 1);
82 prev->SetBinError(
i-1,
std::sqrt(efficiency*efficiency + err*err));
MonitorElement * bookProfile(Args &&...args)
MonitorElement * get(const std::string &path)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void dqmEndJob(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
HLTTauPostProcessor(const edm::ParameterSet &)
const T & max(const T &a, const T &b)
bool dirExists(const std::string &path)
void setCurrentFolder(const std::string &fullpath)
void plotFilterEfficiencies(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &folder) const
TH1F * getTH1F(void) const
std::vector< std::string > getSubdirs(void)
void setCurrentFolder(const std::string &fullpath)
double getBinContent(int binx) const
get content of bin (1-D)
TProfile * getTProfile(void) const
int getNbinsX(void) const
get # of bins in X-axis
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const std::string dqmBaseFolder_