5 name_ =
"HLTTauDQMSummaryPlotter";
15 edm::LogInfo(
"HLTTauDQMSummaryPlotter::HLTTauDQMSummaryPlotter") << e.
what() << std::endl;
22 if (
type_ ==
"Path" ) {
27 if (
type_ ==
"LitePath" ) {
35 if (
type_ ==
"L1" ) {
49 if (
type_ ==
"Calo" ) {
60 if (
type_ ==
"Track" ) {
77 if (
type_ ==
"Path" ) {
82 if (
type_ ==
"LitePath" ) {
90 if (
type_ ==
"L1" ) {
112 if (
type_ ==
"Calo" ) {
123 if (
type_ ==
"Track" ) {
156 if ( effnum && effdenom && eff ) {
157 for (
int i = 1;
i <= effnum->
getTH1F()->GetNbinsX(); ++
i ) {
176 if ( refH && evC && eff ) {
178 float nGenerated = evC->
getTH1F()->GetBinContent(bin);
182 int nbins = histo->GetNbinsX();
183 double integral = histo->GetBinContent(nbins+1);
184 if (nGenerated<=0.0) nGenerated=1.0;
185 for (
int i = nbins;
i >= 1;
i-- ) {
186 double thisBin = histo->GetBinContent(
i);
189 double integralError;
190 integralEff = (integral / nGenerated);
194 integralError = (
sqrt(integral) / nGenerated);
196 eff->
getTProfile()->SetBinError(
i,
sqrt(integralEff*integralEff+integralError*integralError));
224 if ( eff && effRefTruth && effRefL1 && effRefPrevious ) {
230 effRefTruth->
getTProfile()->SetBinContent(
i-1,efficiency);
232 effRefTruth->
getTProfile()->SetBinError(
i-1,
sqrt(efficiency*efficiency+err*err));
243 effRefL1->
getTProfile()->SetBinError(
i-2,
sqrt(efficiency*efficiency+err*err));
251 effRefPrevious->
getTProfile()->SetBinContent(
i-1,efficiency);
253 effRefPrevious->
getTProfile()->SetBinError(
i-1,
sqrt(efficiency*efficiency+err*err));
261 if ( denom != 0.0 ) {
262 return std::pair<double,double>(num/denom,
sqrt(num/denom*(1.0-num/denom)/denom));
264 return std::pair<double,double>(0.0,0.0);
virtual char const * what() const
T getUntrackedParameter(std::string const &, T const &) const
void plotTriggerBitEfficiencyHistos(std::string folder, std::string histo)
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)
U second(std::pair< T, U > const &p)
void bookTriggerBitEfficiencyHistos(std::string folder, std::string histo)
std::string triggerTagAlias_
~HLTTauDQMSummaryPlotter()
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Integral< F, X >::type integral(const F &f)
void plotEfficiencyHisto(std::string folder, std::string name, std::string hist1, std::string hist2)
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
bool dirExists(const std::string &path) const
true if directory exists
void bookEfficiencyHisto(std::string folder, std::string name, std::string hist1)
TH1F * getTH1F(void) const
std::vector< std::vector< double > > tmp
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
std::pair< double, double > calcEfficiency(float num, float denom)
HLTTauDQMSummaryPlotter(const edm::ParameterSet &, std::string)
void plotIntegratedEffHisto(std::string folder, std::string name, std::string refHisto, std::string evCount, int bin)
void setCurrentFolder(const std::string &fullpath)
std::string dqmBaseFolder_