52 const Int_t width = 600;
58 Int_t countCanvas = 0;
69 cout <<
"--- Probas.C: no methods found!" << endl;
79 while ( (key = (
TKey*)next()) ) {
86 cout <<
"+++ No titles found for classifier: " << methodName << endl;
89 TIter nextTitle(&titles);
94 while ( (instkey = (
TKey *)nextTitle()) ) {
99 if (nhists==0) cout <<
"*** No histograms found!" << endl;
100 TIter nextInDir(&h1hists);
104 while ( (hkey = (
TKey*)nextInDir()) ) {
113 sig = (
TH1*)instDir->
Get( hnameS );
114 bgd = (
TH1*)instDir->
Get( hnameB );
116 if (sig == 0 || bgd == 0) {
117 cout <<
"*** probas.C: big troubles in probas.... histogram: " << hname <<
" not found" << endl;
124 for (
int i=0; i<= 5; i++) {
125 TString hspline = hnameS +
Form(
"_smoothed_hist_from_spline%i",i);
126 sigF = (
TH1*)instDir->
Get( hspline );
135 sigF = (
TH1*)instDir->
Get( hspline );
143 cout <<
"*** probas.C: big troubles - did not find probability histograms" << endl;
154 sig->
SetTitle(
TString(
"TMVA output for classifier: ") + methodTitle );
157 cout <<
"--- Book canvas no: " << countCanvas << endl;
159 sprintf( cn,
"canvas%d", countCanvas+1 );
160 c =
new TCanvas( cn,
Form(
"TMVA Output Fit Variables %s",methodTitle.
Data()),
161 countCanvas*50+200, countCanvas*20, width, width*0.78 );
178 if (Draw_CFANN_Logy && methodName ==
"CFANN") ymin = 0.01;
191 if (Draw_CFANN_Logy && methodName ==
"CFANN") c->
SetLogy();
209 sigF->
Draw(
"samehist");
210 bkgF->
Draw(
"samehist");
213 frame->
Draw(
"sameaxis");
218 legend->
AddEntry(sig,
"Signal data",
"P");
219 legend->
AddEntry(sigF,
"Signal PDF",
"L");
220 legend->
AddEntry(bgd,
"Background data",
"P");
221 legend->
AddEntry(bkgF,
"Background PDF",
"L");
222 legend->
Draw(
"same");
229 sprintf( fname,
"%s/plots/mva_pdf_%s_c%i",dataset.
Data(), methodTitle.
Data(), countCanvas+1 );
238 cout <<
"--- No PDFs found for method " << methodTitle <<
". Did you request \"CreateMVAPdfs\" in the option string?" << endl;
virtual const char * GetName() const
Returns name of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
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...
void imgconv(TCanvas *c, const TString &fname)
Float_t GetLeftMargin() const
This class displays a legend box (TPaveText) containing several legend entries.
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)
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...
void probas(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
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.
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
Short_t Min(Short_t a, Short_t b)
void SetMargin(Float_t margin)
Double_t GetRMS(Int_t axis=1) const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Int_t getBackgroundLine()
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
void GetMethodTitle(TString &name, TKey *ikey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
std::string GetMethodName(TCppMethod_t)
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
tomato 2-D histogram with a float per channel (see TH1 documentation)}
char * Form(const char *fmt,...)
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
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".
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Describe directory structure in memory.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual TObject * ReadObj()
To read a TObject* from the file.
Float_t GetTopMargin() const
Short_t Max(Short_t a, Short_t b)
virtual void SetTitle(const char *title)
Change (i.e.
virtual void Update()
Update canvas pad buffers.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
THist< 2, float, THistStatContent, THistStatUncertainty > TH2F
virtual void SetBorderSize(Int_t bordersize=4)
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.