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())) {
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);
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 cname += countCanvas + 1;
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;
206 title.ReplaceAll(
"signal",
"");
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) {
252 c[countCanvas]->Update();
261 if (countPad <= noPad) {
262 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 SetLineWidth(Width_t lwidth)
Set the line width.
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
virtual void SetLimits(Double_t xmin, Double_t xmax)
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.
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
1-D histogram with a float per channel (see TH1 documentation)
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 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)
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)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
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)
void Initialize(Bool_t useTMVAStyle=kTRUE)
TKey * NextKey(TIter &keyIter, TString className)
TDirectory * GetInputVariablesDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=nullptr)
TFile * OpenFile(const TString &fin)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
TDirectory * GetCorrelationPlotsDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=nullptr)
void imgconv(TCanvas *c, const TString &fname)
void rulevisHists(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.