13 TString outfname = dirName;
20 TString htitle = title;
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())) {
72 if (!TString(key->
GetName()).Contains(
"__Signal") &&
73 !(isRegression && TString(key->
GetName()).Contains(
"__Regression")))
continue;
78 TH1 *sig = (TH1*)key->
ReadObj();
82 if (countPad%noPadPerCanv==0) {
85 countCanvas*50+50, countCanvas*20, width, height );
90 TPad* cPad = (TPad*)canv->
cd(countPad++%noPadPerCanv+1);
93 TString bgname = hname;
95 TH1 *bgd = (TH1*)dir->
Get(bgname);
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");
159 uoflow =
TString::Format(
"U/O-flow (S,B): (%.1f, %.1f)%% / (%.1f, %.1f)%%",
164 TText* t =
new TText( 0.98, 0.14, uoflow );
171 if (countPad%noPadPerCanv==0) {
178 createNewFig =
kTRUE;
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
Float_t GetLeftMargin() const
Float_t GetTopMargin() const
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
const char * GetTitle() const override
Returns title of object.
void Draw(Option_t *option="") override
Draw a canvas.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual Bool_t cd()
Change current directory to "this" directory.
virtual TList * GetListOfKeys() const
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 Int_t GetNbinsX() const
virtual void SetMaximum(Double_t maximum=-1111)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
virtual const char * GetClassName() const
Short_t GetCycle() const
Return cycle number associated to this key.
virtual TObject * ReadObj()
To read a TObject* from the file.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
void Draw(Option_t *option="") override
Draw this box 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.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
void ToLower()
Change string to lower-case.
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
virtual void SetNDC(Bool_t isNDC=kTRUE)
void Initialize(Bool_t useTMVAStyle=kTRUE)
Int_t GetNumberOfInputVariables(TDirectory *dir)
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=nullptr)
TFile * OpenFile(const TString &fin)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
void NormalizeHists(TH1 *sig, TH1 *bkg=nullptr)
Int_t GetNumberOfTargets(TDirectory *dir)
void imgconv(TCanvas *c, const TString &fname)
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)