6#define CheckDerivedPlots 0
13 cout <<
"=== Compare histograms of two files ===" << endl;
14 cout <<
" File-1: " <<
finAn << endl;
15 cout <<
" File-2: " <<
finApp << endl;
37 while ( (key = (
TKey*)next()) ) {
40 if (
dirname.Contains(
"Cuts" )) {
41 cout <<
"--- Found directory: " <<
dirname <<
" --> ignoring" << endl;
44 cout <<
"--- Found directory: " <<
dirname
45 <<
" --> going in" << endl;
50 cout <<
"--- Method: " << methodName << endl;
70 if (sig==0 || bgd==0)
continue;
74 if (
htype == kProbaType)
76 else if (
htype == kRarityType)
82 (
htype == kProbaType) ?
88 (
htype == kProbaType) ?
127 c->GetPad(0)->SetLeftMargin( 0.105 );
134 c->GetLeftMargin() + 0.3, 1 -
c->GetTopMargin() );
135 legend->SetFillStyle( 1 );
136 legend->AddEntry(sig,
"Signal",
"F");
137 legend->AddEntry(bgd,
"Background",
"F");
143 sig->
Draw(
"samehist");
144 bgd->
Draw(
"samehist");
148 cout <<
"--- Searching for histogram: " <<
hStem.Data() <<
" in application file" << endl;
152 cout <<
"--> Found application histogram: " <<
testHist->GetName() <<
" --> superimpose it" << endl;
161 frame->
Draw(
"sameaxis");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Bool_t cd() override
Change current directory to "this" directory.
Describe directory structure in memory.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
TH1 is the base class of all histogram classes in ROOT.
void SetTitle(const char *title) override
Change/set the title.
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
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
void Draw(Option_t *option="") override
Draw this histogram with options.
Double_t GetRMS(Int_t axis=1) const
This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RM...
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.
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 TObject * ReadObj()
To read a TObject* from the file.
This class displays a legend box (TPaveText) containing several legend entries.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetTitle() const override
Returns title of object.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Base class for several text objects.
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
#define CheckDerivedPlots
void Initialize(Bool_t useTMVAStyle=kTRUE)
TKey * NextKey(TIter &keyIter, TString className)
void GetMethodTitle(TString &name, TKey *ikey)
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)
void GetMethodName(TString &name, TKey *mkey)
void imgconv(TCanvas *c, const TString &fname)
void compareanapp(TString finAn="TMVA.root", TString finApp="TMVApp.root", HistType htype=kMVAType, bool useTMVAStyle=kTRUE)
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.