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"))
40 std::size_t
pos = subfolder.rfind(
'/');
41 if(pos == std::string::npos)
44 if(subfolder.compare(pos, 4,
"HLT_") == 0) {
45 LogDebug(
"HLTTauDQMOffline") <<
"Processing path " << subfolder.substr(pos);
54 if(!eventsPerFilter) {
55 LogDebug(
"HLTTauDQMOffline") <<
"ME " << folder <<
"/EventsPerFilter not found";
63 const TAxis *xaxis = eventsPerFilter->
getTH1F()->GetXaxis();
72 LogDebug(
"HLTTauDQMOffline") <<
"HLTTauPostProcessor: Encountered denominator < numerator with efficiency plot EfficiencyRefPrevious in folder " << folder <<
", bin " <<
i <<
" numerator " << eventsPerFilter->
getBinContent(
i) <<
" denominator " << eventsPerFilter->
getBinContent(
i-1);
76 const float efficiency = std::get<0>(effErr);
77 const float err = std::get<1>(effErr);
79 prev->SetBinContent(
i-1, efficiency);
80 prev->SetBinEntries(
i-1, 1);
81 prev->SetBinError(
i-1,
std::sqrt(efficiency*efficiency + err*err));
TProfile * getTProfile() const
~HLTTauPostProcessor() override
MonitorElement * bookProfile(Args &&...args)
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 setCurrentFolder(std::string const &fullpath)
void dqmEndJob(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
HLTTauPostProcessor(const edm::ParameterSet &)
void setCurrentFolder(std::string const &fullpath)
MonitorElement * get(std::string const &path)
bin
set the eta bin as selection string.
void plotFilterEfficiencies(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &folder) const
bool dirExists(std::string const &path)
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
int getNbinsX() 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_