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 22 of file PFTauRenderPlugin.cc.

Member Function Documentation

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

Definition at line 25 of file PFTauRenderPlugin.cc.

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

Definition at line 54 of file PFTauRenderPlugin.cc.

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

Definition at line 30 of file PFTauRenderPlugin.cc.

References MuTauSkim_cff::discriminator, bookConverter::max, min(), and getGTfromDQMFile::obj.

31  {
32  canvas->cd();
33  TH1* obj = dynamic_cast<TH1*>( o.object );
34  if(!obj) return; //nothing to do for TH2
35  //general setings
36  //drawing options
37  gStyle->SetOptStat(0);
38  renderInfo.drawOptions = "E0";
39  if(o.name.find( "Rejection" ) != std::string::npos ) canvas->SetLogy();
40  if(o.name.find( "RealData" ) != std::string::npos ) canvas->SetLogy();
41 
42  //titles and axis
43  string discriminator = stripDicriminator(o.name);
44  string variable = stripVar(o.name);
45  obj->SetTitle((discriminator+" fake rate vs "+variable).c_str());
46  obj->GetXaxis()->SetTitle(variable.c_str());
47  obj->GetYaxis()->SetTitle("fake rate");
48  double min = (canvas->GetLogy() ) ? 0.001 : 0.;
49  double max = (canvas->GetLogy() ) ? 2. : 1.2;
50  obj->GetYaxis()->SetRangeUser(min,max);
51  obj->SetMarkerStyle(20);
52  }
tuple discriminator
def canvas
Definition: svgfig.py:481
string stripVar(string name)
T min(T a, T b)
Definition: MathUtil.h:58
string stripDicriminator(string name)
string PFTauRenderPlugin::stripDicriminator ( string  name)
inlineprivate

Definition at line 60 of file PFTauRenderPlugin.cc.

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

Definition at line 64 of file PFTauRenderPlugin.cc.

65  {
66  return name.substr(name.rfind("Eff")+3);
67  }