24 TString dirname =
"Method_RuleFit";
30 if (vardir==0)
return;
33 if (corrdir==0)
return;
36 TIter keyIter(&titles);
48 if (vardir==0)
return;
49 if (corrdir==0)
return;
52 const TString maintitle = rfName +
" : Rule Importance";
53 const TString rfNameOpt =
"_RF2D_";
55 "rulevisHists_decorr",
57 "rulevisCorr_gaussdecorr" };
67 while ((rfkey = (
TKey*)rfnext())) {
69 TClass *cl =
gROOT->GetClass(rfkey->GetClassName());
81 if (valmax>rfmax) rfmax=valmax;
82 if (valmin<rfmin) rfmin=valmin;
88 cout <<
"ERROR: no RF plots found..." << endl;
92 const Int_t nContours = 100;
96 for (
Int_t i=0; i<nContours; i++) {
97 contourLevels[i] = rfmin+dcl*
Double_t(i);
114 xPad = 1; yPad = 1; width = 500; height = 0.7*
width;
break;
116 xPad = 2; yPad = 1; width = 600; height = 0.7*
width;
break;
118 xPad = 3; yPad = 1; width = 900; height = 0.4*
width;
break;
120 xPad = 2; yPad = 2; width = 600; height =
width;
break;
122 xPad = 3; yPad = 2; width = 800; height = 0.7*
width;
break;
124 Int_t noPad = xPad * yPad ;
127 const Int_t noCanvas = 1 + (
Int_t)((noPlots - 0.001)/noPad);
129 for (
Int_t ic=0; ic<noCanvas; ic++) c[ic] = 0;
132 Int_t countCanvas = 0;
141 while ((key = (
TKey*)next())) {
152 if ((c[countCanvas]==NULL) || (countPad>noPad)) {
154 sprintf( cn,
"rulehist%d_", countCanvas+1 );
157 c[countCanvas] =
new TCanvas( cname, maintitle,
158 countCanvas*50+200, countCanvas*20, width, height );
160 c[countCanvas]->
Divide(xPad,yPad);
165 TPad *cPad = (
TPad *)(c[countCanvas]->GetPad(countPad));
166 c[countCanvas]->
cd(countPad);
175 cout <<
"ERROR!!! couldn't find backgroung histo for" << hname << endl;
210 if (countPad==2) sc = 1.3;
220 hrf->
Draw(
"colz ah");
223 sig->
Draw(
"same ah");
224 bgd->
Draw(
"same ah");
230 hrf->
Draw(
"same axis");
242 legend->
AddEntry(bgd,
"Background",
"F");
243 legend->
Draw(
"same");
251 if (countPad > noPad) {
253 TString fname =
Form(
"plots/%s_c%i", outputName.
Data(), countCanvas+1 );
261 if (countPad <= noPad) {
263 TString fname =
Form(
"plots/%s_c%i", outputName.
Data(), countCanvas+1 );
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
virtual const char * GetName() const
Returns name of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
void imgconv(TCanvas *c, const TString &fname)
Float_t GetLeftMargin() const
virtual TList * GetListOfKeys() const
virtual void SetMaximum(Double_t maximum=-1111)
This class displays a legend box (TPaveText) containing several legend entries.
virtual void SetLimits(Double_t xmin, Double_t xmax)
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
TFile * OpenFile(const TString &fin)
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual void SetMinimum(Double_t minimum=-1111)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
1-D histogram with a float per channel (see TH1 documentation)}
virtual void Update()
Update pad.
void SetMargin(Float_t margin)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
TKey * NextKey(TIter &keyIter, TString className)
TDirectory * GetCorrelationPlotsDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TDirectory * GetInputVariablesDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
2-D histogram with a float per channel (see TH1 documentation)}
The most important graphics class in the ROOT system.
char * Form(const char *fmt,...)
The ROOT global object gROOT contains a list of all defined classes.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual TKey * GetKey(const char *, Short_t=9999) const
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Describe directory structure in memory.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual TObject * ReadObj()
To read a TObject* from the file.
Float_t GetTopMargin() const
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Short_t Max(Short_t a, Short_t b)
void rulevisHists(TString fin="TMVA.root", TMVAGlob::TypeOfPlot type=TMVAGlob::kNorm, bool useTMVAStyle=kTRUE)
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual void Update()
Update canvas pad buffers.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetBorderSize(Int_t bordersize=4)
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)