CMS 3D CMS Logo

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

◆ applies()

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  }

References EcalTangentSkim_cfg::o.

◆ postDraw()

virtual void PFTauRenderPlugin::postDraw ( TCanvas *  ,
const VisDQMObject &  ,
const VisDQMImgInfo &   
)
inlinevirtual

Definition at line 54 of file PFTauRenderPlugin.cc.

55  {
56  }

◆ preDraw()

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

Definition at line 30 of file PFTauRenderPlugin.cc.

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  }

References svgfig::canvas(), PDWG_TauSkim_cff::discriminator, SiStripPI::max, min(), EcalTangentSkim_cfg::o, getGTfromDQMFile::obj, and taus_updatedMVAIds_cff::variable.

◆ stripDicriminator()

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  }

References Skims_PA_cff::name.

◆ stripVar()

string PFTauRenderPlugin::stripVar ( string  name)
inlineprivate

Definition at line 64 of file PFTauRenderPlugin.cc.

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

References Skims_PA_cff::name.

svgfig.canvas
def canvas(*sub, **attr)
Definition: svgfig.py:482
PFTauRenderPlugin::stripDicriminator
string stripDicriminator(string name)
Definition: PFTauRenderPlugin.cc:60
min
T min(T a, T b)
Definition: MathUtil.h:58
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
PDWG_TauSkim_cff.discriminator
discriminator
Definition: PDWG_TauSkim_cff.py:7
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
PFTauRenderPlugin::stripVar
string stripVar(string name)
Definition: PFTauRenderPlugin.cc:64
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
taus_updatedMVAIds_cff.variable
variable
Definition: taus_updatedMVAIds_cff.py:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17