62 purS =
new TH1F(pname, pname, nbins, low, high);
63 sSig =
new TH1F(ssigname, ssigname, nbins, low, high);
64 effpurS =
new TH1F(epname, epname, nbins, low, high);
91 fNSignal = fSigInput->GetNumber();
96 fNBackground = fBkgInput->GetNumber();
119 UpdateSignificanceHists();
131 TIter next(fInfoList);
141 fSigInput->Disconnect();
142 fBkgInput->Disconnect();
143 fDrawButton->Disconnect();
144 fCloseButton->Disconnect();
146 fMain->CloseWindow();
202 fSigInput->
Connect(
"ValueSet(Long_t)",
"TMVA::StatDialogMVAEffs",
this,
"SetNSignal()");
203 fBkgInput->
Connect(
"ValueSet(Long_t)",
"TMVA::StatDialogMVAEffs",
this,
"SetNBackground()");
238 TString str =
Form(
"%*s ( #signal, #backgr.) Optimal-cut %s NSig NBkg EffSig EffBkg",
240 cout <<
"--- " << setfill(
'=') << setw(str.
Length()) <<
"" << setfill(
' ') << endl;
241 cout <<
"--- " << str << endl;
242 cout <<
"--- " << setfill(
'-') << setw(str.
Length()) <<
"" << setfill(
' ') << endl;
256 maxSigErr = sig *
sqrt( 1./S + 1./(2.*B));
270 cout <<
"--- " << setfill(
'-') << setw(str.
Length()) <<
"" << setfill(
' ') << endl << endl;
289 while( (key = (
TKey*)next()) ) {
291 if (!
TString(key->GetName()).BeginsWith(
"Method_"))
continue;
292 if( !
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory") )
continue;
294 cout <<
"--- Found directory: " << ((
TDirectory*)key->ReadObj())->
GetName() << endl;
300 while((titkey = (
TKey*)keyIt())) {
301 if( !
gROOT->GetClass(titkey->GetClassName())->InheritsFrom(
"TDirectory") )
continue;
311 cout <<
"--- Classifier: " << info->
methodTitle << endl;
313 info->
sig =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_S" ));
314 info->
bgd =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_B" ));
315 info->
origSigE =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_effS" ));
316 info->
origBgdE =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_effB" ));
329 Int_t countCanvas = 0;
332 const Int_t width = 600;
342 countCanvas*50+200, countCanvas*20, width,
Int_t(width*0.78) );
390 legend1->
AddEntry(info->
bgdE,
"Background efficiency",
"L");
391 legend1->
Draw(
"same");
401 legend2->
Draw(
"same");
433 tl.
DrawLatex( 0.13, 0.77,
"Method Cuts provides a bundle of cut selections, each tuned to a");
434 tl.
DrawLatex(0.13, 0.74,
"different signal efficiency. Shown is the purity for each cut selection.");
465 if (info->
line1 !=0 )
468 if (info->
line2 !=0 ) {
470 info->
line2->
SetText( 0.15, 0.15,
Form(
"%3.2g +- %3.2g when cutting at %3.2g",
483 TString opt =
Form(
"%%%is: (%%9.8g,%%9.8g) %%9.4f %%10.6g %%8.7g %%8.7g %%8.4g %%8.4g",
497 TString opt =
Form(
"%%%is: (%%9.8g,%%9.8g) %%9.4f (%%8.3g +-%%6.3g) %%8.7g %%8.7g %%8.4g %%8.4g",
std::string GetName(const std::string &scope_name)
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
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 SetTickx(Int_t value=1)
void imgconv(TCanvas *c, const TString &fname)
TGNumberEntry * fBkgInput
Float_t GetLeftMargin() const
virtual TList * GetListOfKeys() const
virtual void SetMaximum(Double_t maximum=-1111)
This class displays a legend box (TPaveText) containing several legend entries.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
void mvaeffs(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")
void SetTitleColor(Int_t titlecolor)
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
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.
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
virtual void SetTitle(const char *title="")
Change the title of the axis.
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
void SetMargin(Float_t margin)
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Double_t GetUxmax() const
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual ~StatDialogMVAEffs()
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
void UpdateSignificanceHists()
void SetTitleSize(Float_t titlesize)
virtual void SetText(Double_t x, Double_t y, const char *text)
virtual void Paint(Option_t *option="")
Paint canvas.
TGTextButton * fDrawButton
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
To draw Mathematical Formula.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
void GetMethodTitle(TString &name, TKey *ikey)
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
std::vector< std::vector< double > > Data
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
void GetMethodName(TString &name, TKey *mkey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TString GetFormulaString()
TStyle objects may be created to define special styles.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
RooArgSet S(const RooAbsArg &v1)
void PrintResults(const MethodInfo *info)
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
TGNumberEntry * fSigInput
virtual void SetTicky(Int_t value=1)
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
char * Form(const char *fmt,...)
void ReadHistograms(TFile *file)
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
void SetWmax(Double_t wmax)
void SetFormula(const TString &f)
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 Float_t GetTitleSize() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
TGTextButton * fCloseButton
StatDialogMVAEffs(TString ds, const TGWindow *p, Float_t ns, Float_t nb)
Double_t GetUymax() const
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Float_t GetTopMargin() const
virtual void Add(TObject *obj)
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
TGHorizontalFrame * fButtons
void SetLabelColor(Int_t labelcolor)
virtual void SetTitle(const char *title)
Change (i.e.
virtual Int_t GetNbinsX() const
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void Update()
Update canvas pad buffers.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Double_t GetUymin() const
Float_t GetRightMargin() const
void Modified(Bool_t flag=1)
virtual void SetBorderSize(Int_t bordersize=4)
const char * Data() const
Double_t maxSignificanceErr
TString GetLatexFormula()