34 TString dirname=
"Method_RuleFit";
43 while ((key = (
TKey*)next())) {
45 if (!
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory"))
continue;
52 TIter keyIter(&titles);
64 if (vardir==0)
return;
65 if (corrdir==0)
return;
68 const TString maintitle = rfName +
" : Rule Importance, 2D";
69 const TString rfNameOpt =
"_RF2D_";
73 "rulevisCorr_gaussdecorr" };
93 if (valmax>rfmax) rfmax = valmax;
94 if (valmin<rfmin) rfmin = valmin;
101 cout <<
"ERROR: no RF2D plots found..." << endl;
106 Double_t targetrange = maxrange - minrange;
108 const Int_t nContours = 100;
112 for (
Int_t i=0; i<nContours; i++) {
113 contourLevels[i] = rfmin+dcl*
Double_t(i);
121 Int_t noPlots = (noVars*(noVars+1)/2) - noVars;
142 Int_t noPad = xPad * yPad ;
145 const Int_t noCanvas = 1 + (
Int_t)((noPlots - 0.001)/noPad);
147 for (
Int_t ic=0; ic<noCanvas; ic++)
c[ic] = 0;
150 Int_t countCanvas = 0;
160 while ((key = (
TKey*)next())) {
171 if ((
c[countCanvas]==NULL) || (countPad>noPad)) {
173 cname += countCanvas + 1;
177 countCanvas*50+200, countCanvas*20,
width,
height );
179 c[countCanvas]->Divide(xPad,yPad);
183 TPad *cPad = (
TPad *)(
c[countCanvas]->GetPad(countPad));
184 c[countCanvas]->
cd(countPad);
193 cout <<
"ERROR!!! couldn't find background histo for" << hname << endl;
213 hrf2->
SetContour(nContours,&contourLevels[0]);
225 title.ReplaceAll(
"signal",
"");
235 hrf2->
Draw(
"colz ah");
237 if (countPad==2) sc = 1.3;
241 sig->
Scale(1.0/smax);
243 sig->
Draw(
"same cont3");
246 bgd->
Scale(1.0/smax);
248 bgd->
Draw(
"same cont3");
255 sig->
Draw(
"sameaxis");
267 legend->
AddEntry(bgd,
"Background",
"F");
268 legend->
Draw(
"same");
276 if (countPad > noPad) {
277 c[countCanvas]->Update();
286 if (countPad <= noPad) {
287 c[countCanvas]->Update();
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Float_t GetLeftMargin() const
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
Float_t GetTopMargin() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
Describe directory structure in memory.
virtual Bool_t cd()
Change current directory to "this" directory.
virtual TKey * GetKey(const char *, Short_t=9999) const
virtual TList * GetListOfKeys() const
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
void SetTitle(const char *title) override
Change/set the title.
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 SetMaximum(Double_t maximum=-1111)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetMinimum(Double_t minimum=-1111)
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
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...
2-D histogram with a float per channel (see TH1 documentation)
virtual TH2 * Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *newname="")
Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
void Draw(Option_t *option="") override
Draw this legend with its current attributes.
void SetMargin(Float_t margin)
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
The most important graphics class in the ROOT system.
void Update() override
Update pad.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
TKey * NextKey(TIter &keyIter, TString className)
TFile * OpenFile(const TString &fin)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
void imgconv(TCanvas *c, const TString &fname)
void rulevisCorr(TString fin="TMVA.root", TMVAGlob::TypeOfPlot type=TMVAGlob::kNorm, bool useTMVAStyle=kTRUE)
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.