CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
PFTauRenderPlugin Class Reference
Inheritance diagram for PFTauRenderPlugin:

Public Member Functions

virtual bool applies (const VisDQMObject &o, const VisDQMImgInfo &)
 
virtual void postDraw (TCanvas *, const VisDQMObject &, const VisDQMImgInfo &)
 
virtual void preDraw (TCanvas *canvas, const VisDQMObject &o, const VisDQMImgInfo &, VisDQMRenderInfo &renderInfo)
 

Private Member Functions

string stripDicriminator (string name)
 
string stripVar (string name)
 

Detailed Description

Definition at line 24 of file PFTauRenderPlugin.cc.

Member Function Documentation

virtual bool PFTauRenderPlugin::applies ( const VisDQMObject &  o,
const VisDQMImgInfo &   
)
inlinevirtual

Definition at line 27 of file PFTauRenderPlugin.cc.

28  {
29  return ((o.name.find( "RecoTauV/" ) != std::string::npos ) && (o.name.find( "Eff" ) != std::string::npos ) ); //Size and SumPt are already configured
30  }
virtual void PFTauRenderPlugin::postDraw ( TCanvas *  ,
const VisDQMObject &  ,
const VisDQMImgInfo &   
)
inlinevirtual

Definition at line 56 of file PFTauRenderPlugin.cc.

57  {
58  }
virtual void PFTauRenderPlugin::preDraw ( TCanvas *  canvas,
const VisDQMObject &  o,
const VisDQMImgInfo &  ,
VisDQMRenderInfo &  renderInfo 
)
inlinevirtual

Definition at line 32 of file PFTauRenderPlugin.cc.

References max(), min, and getGTfromDQMFile::obj.

33  {
34  canvas->cd();
35  TH1* obj = dynamic_cast<TH1*>( o.object );
36  if(!obj) return; //nothing to do for TH2
37  //general setings
38  //drawing options
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();
43 
44  //titles and axis
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);
54  }
#define min(a, b)
Definition: mlp_lapack.h:161
def canvas
Definition: svgfig.py:481
const T & max(const T &a, const T &b)
string stripVar(string name)
string stripDicriminator(string name)
string PFTauRenderPlugin::stripDicriminator ( string  name)
inlineprivate

Definition at line 62 of file PFTauRenderPlugin.cc.

63  {
64  return name.substr(name.rfind("/")+1,name.rfind("Eff")-name.rfind("/")-1);
65  }
string PFTauRenderPlugin::stripVar ( string  name)
inlineprivate

Definition at line 66 of file PFTauRenderPlugin.cc.

67  {
68  return name.substr(name.rfind("Eff")+3);
69  }