9 #include "DQM/DQMRenderPlugin.h"
12 #include "TProfile2D.h"
15 #include "TGraphPolar.h"
27 virtual bool applies(
const VisDQMObject &
o,
const VisDQMImgInfo & )
29 return ((o.name.find(
"RecoTauV/" ) != std::string::npos ) && (o.name.find(
"Eff" ) != std::string::npos ) );
32 virtual void preDraw( TCanvas *
canvas,
const VisDQMObject &
o,
const VisDQMImgInfo & , VisDQMRenderInfo & renderInfo)
35 TH1*
obj =
dynamic_cast<TH1*
>( o.object );
39 gStyle->SetOptStat(0);
40 renderInfo.drawOptions =
"E0";
41 if(o.name.find(
"Rejection" ) != std::string::npos ) canvas->SetLogy();
42 if(o.name.find(
"RealData" ) != std::string::npos ) canvas->SetLogy();
45 string discriminator = stripDicriminator(o.name);
46 string variable = stripVar(o.name);
47 obj->SetTitle((discriminator+
" fake rate vs "+variable).c_str());
48 obj->GetXaxis()->SetTitle(variable.c_str());
49 obj->GetYaxis()->SetTitle(
"fake rate");
50 double min = (canvas->GetLogy() ) ? 0.001 : 0.;
51 double max = (canvas->GetLogy() ) ? 2. : 1.2;
52 obj->GetYaxis()->SetRangeUser(min,max);
53 obj->SetMarkerStyle(20);
56 virtual void postDraw( TCanvas *,
const VisDQMObject &,
const VisDQMImgInfo & )
64 return name.substr(name.rfind(
"/")+1,name.rfind(
"Eff")-name.rfind(
"/")-1);
68 return name.substr(name.rfind(
"Eff")+3);
virtual void postDraw(TCanvas *, const VisDQMObject &, const VisDQMImgInfo &)
static PFTauRenderPlugin instance
virtual void preDraw(TCanvas *canvas, const VisDQMObject &o, const VisDQMImgInfo &, VisDQMRenderInfo &renderInfo)
const T & max(const T &a, const T &b)
virtual bool applies(const VisDQMObject &o, const VisDQMImgInfo &)
string stripVar(string name)
string stripDicriminator(string name)