30 }
else if (type == 3) {
45 Float_t x0L = 0.107, y0H = 0.899;
46 Float_t dxL = 0.457-x0L, dyH = 0.22;
49 y0H = 1 - y0H + dyH + 0.07;
56 TString xtit =
"Signal efficiency";
57 TString ytit =
"Background efficiency";
58 if (type == 2) ytit =
"Background rejection";
59 if (type == 3) ytit =
"1/(Background eff.)";
60 TString ftit = ytit +
" versus " + xtit;
63 if (type == 2) hNameRef =
"rejBvsS";
64 if (type == 3) hNameRef =
"invBeffvsSeff";
76 cout <<
"ups .. no methods found in to plot ROC curve for ... give up" << endl;
79 TIter xnext(&xmethods);
82 while ((xkey = (
TKey*)xnext())) {
86 if (ninst==0) cout <<
"hmm... sorry, but this printout was supposed to be only to keep the compiler quite.. never supposed to happen :(" << endl;
87 TIter nextTitle(&titles);
97 TH1 *
h = (
TH1*)hkey2->ReadObj();
108 if(
gROOT->FindObject(
"frame")!=0)
gROOT->FindObject(
"frame")->Delete();
109 TH2F* frame =
new TH2F(
"frame", ftit, 500, x1, x2, 500, y1, y2 );
124 cout <<
"ups .. no methods found in to plot ROC curve for ... give up" << endl;
135 if (ninst==0) cout <<
"hmm... sorry, but this printout was supposed to be only to keep the compiler quite.. never supposed to happen :(" << endl;
136 TIter nextTitle(&titles);
146 TH1 *
h = (
TH1*)hkey2->ReadObj();
151 color++;
if (color == 5 || color == 10 || color == 11) color++;
164 TH1* histWithLargestInt(0);
165 while ((hist = (
TH1*)hIt())!=0) {
167 if (integral>largestInt) {
168 largestInt = integral;
169 histWithLargestInt = hist;
172 if (histWithLargestInt == 0) {
173 cout <<
"ERROR - unknown hist \"histWithLargestInt\" --> serious problem in ROOT file" << endl;
177 hists.
Remove(histWithLargestInt);
183 dyH *= (1.0 +
Float_t(nmva - 3.0)/4.0);
184 legend->
SetY1( y0H - dyH );
188 legend->
SetY2( y0H + dyH);
192 frame->
Draw(
"sameaxis");
193 legend->
Draw(
"same");
203 TString fname =
"plots/" + hNameRef;
207 fname =
"plots/" + fprepend +
"_" + hNameRef;
224 if (!file || !file->
IsOpen()) {
225 file =
new TFile(fin);
virtual const char * GetTitle() const
Returns title of object.
virtual void SetLineWidth(Width_t lwidth)
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
void imgconv(TCanvas *c, const TString &fname)
This class displays a legend box (TPaveText) containing several legend entries.
virtual TList * GetListOfKeys() const
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
TString & ReplaceAll(const TString &s1, const TString &s2)
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 SetFrameStyle(TH1 *frame, Float_t scale=1.0)
Short_t Min(Short_t a, Short_t b)
void SetMargin(Float_t margin)
TKey * NextKey(TIter &keyIter, TString className)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual void SetY2(Double_t y2)
Set the Y2 value.
static const double x2[5]
virtual Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
void GetMethodTitle(TString &name, TKey *ikey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void efficiencies(TString fin="TMVA.root", Int_t type=2, Bool_t useTMVAStyle=kTRUE)
virtual void SetLineColor(Color_t lcolor)
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
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)}
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual const char * GetName() const
Returns name of object.
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
virtual void SetY1(Double_t y1)
Set the Y1 value.
virtual Int_t GetSize() const
static const double x1[5]
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.
void plot_efficiencies(TFile *file, Int_t type=2, TDirectory *BinDir=0)
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual void Add(TObject *obj)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetHeader(const char *header="")
Sets the header, which is the "title" that appears at the top of the legend.
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.
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)