53 const Int_t width = 600;
59 Int_t countCanvas = 0;
70 cout <<
"--- Probas.C: no methods found!" << endl;
87 cout <<
"+++ No titles found for classifier: " << methodName << endl;
90 TIter nextTitle(&titles);
95 while ( (instkey = (
TKey *)nextTitle()) ) {
100 if (nhists==0) cout <<
"*** No histograms found!" << endl;
101 TIter nextInDir(&h1hists);
105 while ( (hkey = (
TKey*)nextInDir()) ) {
114 sig = (
TH1*)instDir->
Get( hnameS );
115 bgd = (
TH1*)instDir->
Get( hnameB );
117 if (sig == 0 || bgd == 0) {
118 cout <<
"*** probas.C: big troubles in probas.... histogram: " << hname <<
" not found" << endl;
125 for (
int i=0; i<= 5; i++) {
126 TString hspline = hnameS +
Form(
"_smoothed_hist_from_spline%i",i);
127 sigF = (
TH1*)instDir->
Get( hspline );
136 sigF = (
TH1*)instDir->
Get( hspline );
144 cout <<
"*** probas.C: big troubles - did not find probability histograms" << endl;
155 sig->
SetTitle(
TString(
"TMVA output for classifier: ") + methodTitle );
158 cout <<
"--- Book canvas no: " << countCanvas << endl;
160 sprintf( cn,
"canvas%d", countCanvas+1 );
161 c =
new TCanvas( cn,
Form(
"TMVA Output Fit Variables %s",methodTitle.
Data()),
162 countCanvas*50+200, countCanvas*20, width, width*0.78 );
179 if (Draw_CFANN_Logy && methodName ==
"CFANN") ymin = 0.01;
192 if (Draw_CFANN_Logy && methodName ==
"CFANN") c->
SetLogy();
210 sigF->
Draw(
"samehist");
211 bkgF->
Draw(
"samehist");
214 frame->
Draw(
"sameaxis");
219 legend->
AddEntry(sig,
"Signal data",
"P");
220 legend->
AddEntry(sigF,
"Signal PDF",
"L");
221 legend->
AddEntry(bgd,
"Background data",
"P");
222 legend->
AddEntry(bkgF,
"Background PDF",
"L");
223 legend->
Draw(
"same");
230 sprintf( fname,
"plots/mva_pdf_%s_c%i", methodTitle.
Data(), countCanvas+1 );
239 cout <<
"--- No PDFs found for method " << methodTitle <<
". Did you request \"CreateMVAPdfs\" in the option string?" << endl;
virtual const char * GetTitle() const
Returns title of object.
virtual void SetLineWidth(Width_t lwidth)
void imgconv(TCanvas *c, const TString &fname)
This class displays a legend box (TPaveText) containing several legend entries.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
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.
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
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)
virtual void SetFillStyle(Style_t fstyle)
const char * Data() const
Float_t GetTopMargin() const
virtual void SetMarkerColor(Color_t mcolor=1)
void GetMethodTitle(TString &name, TKey *ikey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void probas(TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)
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.
std::string GetMethodName(TCppMethod_t)
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)}
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
virtual void SetMarkerStyle(Style_t mstyle=1)
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
Double_t GetRMS(Int_t axis=1) const
virtual void SetMarkerSize(Size_t msize=1)
Float_t GetLeftMargin() const
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
static Int_t c_SignalLine
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 TObject * ReadObj()
To read a TObject* from the file.
Short_t Max(Short_t a, Short_t b)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetTitle(const char *title)
Change (i.e.
static Int_t c_BackgroundLine
virtual void Update()
Update canvas pad buffers.
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="")
Change (i.e. set) the title of the TNamed.
virtual void SetBorderSize(Int_t bordersize=4)
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.