30 cout <<
"No information about " << title <<
" available in directory " << dirName <<
" of file " << fin << endl;
47 xPad = 1; yPad = 1; width = 550; height = 0.90*width;
break;
49 xPad = 2; yPad = 1; width = 600; height = 0.50*width;
break;
51 xPad = 3; yPad = 1; width = 900; height = 0.4*width;
break;
53 xPad = 2; yPad = 2; width = 600; height = width;
break;
55 xPad = 3; yPad = 2; width = 800; height = 0.55*width;
break;
58 Int_t noPadPerCanv = xPad * yPad ;
61 Int_t countCanvas = 0;
69 while ((key = (
TKey*)next())) {
73 !(isRegression &&
TString(key->
GetName()).Contains(
"__Regression")))
continue;
82 if (countPad%noPadPerCanv==0) {
84 canv =
new TCanvas(
Form(
"canvas%d", countCanvas), title,
85 countCanvas*50+50, countCanvas*20, width, height );
90 TPad* cPad = (
TPad*)canv->
cd(countPad++%noPadPerCanv+1);
97 cout <<
"ERROR!!! couldn't find background histo for" << hname << endl;
120 if (countPad == 1) sc = 1.3;
127 bgd->Draw(
"histsame");
133 if (countPad == 1 && !isRegression) {
140 legend->
AddEntry(bgd,
"Background",
"F");
143 legend->
Draw(
"same");
147 sig->
Draw(
"sameaxis");
155 uoflow =
Form(
"U/O-flow: %.1f%% / %.1f%%",
159 uoflow =
Form(
"U/O-flow (S,B): (%.1f, %.1f)%% / (%.1f, %.1f)%%",
160 sig->
GetBinContent(0)*dxu*100, bgd->GetBinContent(0)*dxu*100,
161 sig->
GetBinContent(nbin+1)*dxo*100, bgd->GetBinContent(nbin+1)*dxo*100 );
166 t->SetTextSize( 0.040 );
167 t->SetTextAngle( 90 );
171 if (countPad%noPadPerCanv==0) {
178 createNewFig =
kTRUE;
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.
void imgconv(TCanvas *c, const TString &fname)
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetMaximum(Double_t maximum=-1111)
This class displays a legend box (TPaveText) containing several legend entries.
virtual TList * GetListOfKeys() const
Int_t GetNumberOfInputVariables(TDirectory *dir)
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
TString & ReplaceAll(const TString &s1, const TString &s2)
TFile * OpenFile(const TString &fin)
void NormalizeHists(TH1 *sig, TH1 *bkg=0)
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Short_t GetCycle() const
Return cycle number associated to this key.
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
virtual const char * GetClassName() const
void ToLower()
Change string to lower-case.
void SetMargin(Float_t margin)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Int_t GetNbinsX() const
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
const char * Data() const
Float_t GetTopMargin() const
Int_t GetNumberOfTargets(TDirectory *dir)
Base class for several text objects.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
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.
const char * GetTitle() const
Returns title of object.
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
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 Draw(Option_t *option="")
Draw a canvas.
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
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 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="")
Set the title of the TNamed.
void variables(TString dataset, TString fin="TMVA.root", TString dirName="InputVariables_Id", TString title="TMVA Input Variables", Bool_t isRegression=kFALSE, Bool_t useTMVAStyle=kTRUE)
virtual void SetBorderSize(Int_t bordersize=4)
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.