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);
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")) {}
38 std::size_t
pos = subfolder.rfind(
'/');
39 if (
pos == std::string::npos)
42 if (subfolder.compare(
pos, 4,
"HLT_") == 0) {
43 LogDebug(
"HLTTauDQMOffline") <<
"Processing path " << subfolder.substr(
pos);
54 if (!eventsPerFilter) {
55 LogDebug(
"HLTTauDQMOffline") <<
"ME " <<
folder <<
"/EventsPerFilter not found";
62 "Efficiency to previous filter",
70 const TAxis*
xaxis = eventsPerFilter->
getTH1F()->GetXaxis();
77 for (
int i = 2;
i <= eventsPerFilter->
getNbinsX(); ++
i) {
79 LogDebug(
"HLTTauDQMOffline") <<
"HLTTauPostProcessor: Encountered denominator < numerator with efficiency plot " 80 "EfficiencyRefPrevious in folder " 85 const std::tuple<float, float> effErr =
88 const float err = std::get<1>(effErr);
91 prev->SetBinEntries(
i - 1, 1);
~HLTTauPostProcessor() override
virtual void setCurrentFolder(std::string const &fullpath)
virtual bool dirExists(std::string const &path) const
void dqmEndJob(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
HLTTauPostProcessor(const edm::ParameterSet &)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
#define DEFINE_FWK_MODULE(type)
void plotFilterEfficiencies(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &folder) const
virtual TH1F * getTH1F() const
virtual MonitorElement * get(std::string const &fullpath) const
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinContent(int binx) const
get content of bin (1-D)
const std::string dqmBaseFolder_
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const