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;
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;
209 if (countPad==2) sc = 1.3;
219 hrf->
Draw(
"colz ah");
222 sig->
Draw(
"same ah");
223 bgd->
Draw(
"same ah");
229 hrf->
Draw(
"same axis");
241 legend->
AddEntry(bgd,
"Background",
"F");
242 legend->
Draw(
"same");
250 if (countPad > noPad) {
252 TString fname =
Form(
"plots/%s_c%i", outputName.
Data(), countCanvas+1 );
260 if (countPad <= noPad) {
262 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 * GetTitle() const
Returns title of object.
virtual void SetLineWidth(Width_t lwidth)
void imgconv(TCanvas *c, const TString &fname)
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)
virtual TList * GetListOfKeys() const
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
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)
TKey * NextKey(TIter &keyIter, TString className)
TDirectory * GetCorrelationPlotsDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
const char * Data() const
virtual TKey * GetKey(const char *, Short_t=9999) const
Float_t GetTopMargin() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void SetLineColor(Color_t lcolor)
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)
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,...)
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
Float_t GetLeftMargin() 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.
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.
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)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void rulevisHists(TString fin="TMVA.root", TMVAGlob::TypeOfPlot type=TMVAGlob::kNorm, bool useTMVAStyle=kTRUE)
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void SetTitle(const char *title)
Change (i.e.
virtual void Update()
Update canvas pad buffers.
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...
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
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 void SetBorderSize(Int_t bordersize=4)
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)