49   TString pname    = 
"purS_"         + methodTitle;
 
   50   TString epname   = 
"effpurS_"      + methodTitle;
 
   51   TString ssigname = 
"significance_" + methodTitle;
 
   53   sigE = (
TH1*)origSigE->
Clone(
"sigEffi");
 
   54   bgdE = (
TH1*)origBgdE->Clone(
"bgdEffi");
 
   56   Int_t nbins = sigE->GetNbinsX();
 
   57   Double_t low = sigE->GetBinLowEdge(1);
 
   58   Double_t high = sigE->GetBinLowEdge(nbins+1);
 
   59   purS    = 
new TH1F(pname, pname, nbins, low, high);
 
   60   sSig    = 
new TH1F(ssigname, ssigname, nbins, low, high);
 
   61   effpurS = 
new TH1F(epname, epname, nbins, low, high);        
 
   64   sigE->SetTitle( 
Form(
"Cut efficiencies for %s classifier", methodTitle.Data()) );
 
   70   sigE->SetFillStyle( 0 );
 
   71   bgdE->SetFillStyle( 0 );
 
   72   sSig->SetFillStyle( 0 );
 
   73   sigE->SetLineWidth( 3 );
 
   74   bgdE->SetLineWidth( 3 );
 
   75   sSig->SetLineWidth( 3 );
 
   78   purS->SetFillStyle( 0 );
 
   79   purS->SetLineWidth( 2 );
 
   80   purS->SetLineStyle( 5 );
 
   81   effpurS->SetFillStyle( 0 );
 
   82   effpurS->SetLineWidth( 2 );
 
   83   effpurS->SetLineStyle( 6 );
 
   88   fNSignal = fSigInput->GetNumber();
 
   93   fNBackground = fBkgInput->GetNumber();
 
   99   f.ReplaceAll(
"S",
"x");
 
  100   f.ReplaceAll(
"B",
"y");
 
  108   f.ReplaceAll(
"(",
"{");
 
  109   f.ReplaceAll(
")",
"}");
 
  110   f.ReplaceAll(
"sqrt",
"#sqrt");
 
  116   UpdateSignificanceHists();
 
  128      TIter next(fInfoList);
 
  138   fSigInput->Disconnect();
 
  139   fBkgInput->Disconnect();
 
  140   fDrawButton->Disconnect();
 
  141   fCloseButton->Disconnect();
 
  143   fMain->CloseWindow();
 
  199   fSigInput->
Connect(
"ValueSet(Long_t)",
"TMVA::StatDialogMVAEffs",
this, 
"SetNSignal()");
 
  200   fBkgInput->
Connect(
"ValueSet(Long_t)",
"TMVA::StatDialogMVAEffs",
this, 
"SetNBackground()");
 
  211   if (fInfoList==0) 
return;
 
  212   if (fInfoList->First()==0) 
return;
 
  218   TIter next(fInfoList);
 
  231   TIter next(fInfoList);
 
  234   if (cname.
Length() >  maxLenTitle)  maxLenTitle = cname.
Length();
 
  235   TString str = 
Form( 
"%*s   (  #signal, #backgr.)  Optimal-cut  %s      NSig      NBkg   EffSig   EffBkg", 
 
  236                       maxLenTitle, cname.
Data(), GetFormulaString().Data() );
 
  237   cout << 
"--- " << setfill(
'=') << setw(str.
Length()) << 
"" << setfill(
' ') << endl;
 
  238   cout << 
"--- " << str << endl;
 
  239   cout << 
"--- " << setfill(
'-') << setw(str.
Length()) << 
"" << setfill(
' ') << endl;
 
  252            if (GetFormulaString() == 
"S/sqrt(B)") {
 
  253               maxSigErr = sig * 
sqrt( 1./
S + 1./(2.*
B));
 
  265      PrintResults( info );
 
  267   cout << 
"--- " << setfill(
'-') << setw(str.
Length()) << 
"" << setfill(
' ') << endl << endl;
 
  273      TIter next(fInfoList);
 
  281   fInfoList = 
new TList;
 
  284   TIter next(
file->GetDirectory(dataset.Data())->GetListOfKeys());
 
  286   while( (key = (
TKey*)next()) ) {
 
  289      if( ! 
gROOT->GetClass(key->
GetClassName())->InheritsFrom(
"TDirectory") ) 
continue;
 
  297      while((titkey = (
TKey*)keyIt())) {
 
  298         if( ! 
gROOT->GetClass(titkey->
GetClassName())->InheritsFrom(
"TDirectory") ) 
continue;
 
  308         cout << 
"--- Classifier: " << info->
methodTitle << endl;
 
  310         info->
sig = 
dynamic_cast<TH1*
>(titDir->
Get( hname + 
"_S" ));
 
  311         info->
bgd = 
dynamic_cast<TH1*
>(titDir->
Get( hname + 
"_B" ));
 
  312         info->
origSigE = 
dynamic_cast<TH1*
>(titDir->
Get( hname + 
"_effS" ));
 
  313         info->
origBgdE = 
dynamic_cast<TH1*
>(titDir->
Get( hname + 
"_effB" ));      
 
  317         fInfoList->Add(info);
 
  326   Int_t countCanvas = 0;
 
  332   TIter next(fInfoList);
 
  365      c->SetRightMargin ( 2.0 );
 
  384                                     c->GetLeftMargin() + 0.4, 1 - 
c->GetTopMargin() + 0.12 );
 
  387      legend1->
AddEntry(info->
bgdE,
"Background efficiency",
"L");
 
  388      legend1->
Draw(
"same");
 
  392      TLegend *legend2= 
new TLegend( 
c->GetLeftMargin() + 0.4, 1 - 
c->GetTopMargin(), 
 
  393                                     1 - 
c->GetRightMargin(), 1 - 
c->GetTopMargin() + 0.12 );
 
  397      legend2->
AddEntry(info->
sSig,GetLatexFormula().Data(),
"L");
 
  398      legend2->
Draw(
"same");
 
  413      info->
line1 = tl.
DrawLatex( 0.15, 0.23, 
Form(
"For %1.0f signal and %1.0f background", fNSignal, fNBackground));
 
  414      tl.
DrawLatex( 0.15, 0.19, 
"events the maximum "+GetLatexFormula()+
" is");
 
  430         tl.
DrawLatex( 0.13, 0.77, 
"Method Cuts provides a bundle of cut selections, each tuned to a");
 
  431         tl.
DrawLatex(0.13, 0.74, 
"different signal efficiency. Shown is the purity for each cut selection.");
 
  462   if (info->
line1 !=0 )
 
  463      info->
line1->
SetText( 0.15, 0.23, 
Form(
"For %1.0f signal and %1.0f background", fNSignal, fNBackground));
 
  465   if (info->
line2 !=0 ) {
 
  467         info->
line2->
SetText( 0.15, 0.15, 
Form(
"%3.2g +- %3.2g when cutting at %3.2g", 
 
  480      TString opt = 
Form( 
"%%%is:  (%%9.8g,%%9.8g)    %%9.4f   %%10.6g  %%8.7g  %%8.7g %%8.4g %%8.4g", 
 
  494      TString opt = 
Form( 
"%%%is:  (%%9.8g,%%9.8g)    %%9.4f   (%%8.3g  +-%%6.3g)  %%8.7g  %%8.7g %%8.4g %%8.4g", 
 
  516   if (graphicsClient == 
nullptr) {
 
  522   StatDialogMVAEffs* gGui = 
new StatDialogMVAEffs(dataset, 
 
  523      graphicsClient->
GetRoot(), 1000, 1000);
 
  527   gGui->ReadHistograms(
file);
 
  528   gGui->SetFormula(formula);
 
  529   gGui->UpdateSignificanceHists();
 
  530   gGui->DrawHistograms();
 
include TDocParser_001 C image html pict1_TDocParser_001 png width
char * Form(const char *fmt,...)
virtual Float_t GetTitleSize() const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual void Paint(Option_t *option="")
Paint canvas.
virtual void Update()
Update canvas pad buffers.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Describe directory structure in memory.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
const TGWindow * GetRoot() const
Returns current root (i.e.
static TGClient * Instance()
Returns global gClient (initialize graphics first, if not already done)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
void SetTitleSize(Float_t titlesize)
virtual void SetTitle(const char *title="")
Change the title of the axis.
void SetWmax(Double_t wmax)
void SetLabelColor(Int_t labelcolor)
void SetTitleColor(Int_t titlecolor)
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
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
virtual void SetMaximum(Double_t maximum=-1111)
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...
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
To draw Mathematical Formula.
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.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
void SetMargin(Float_t margin)
Double_t maxSignificanceErr
void UpdateSignificanceHists()
TGTextButton * fCloseButton
void ReadHistograms(TFile *file)
virtual ~StatDialogMVAEffs()
void PrintResults(const MethodInfo *info)
TGHorizontalFrame * fButtons
StatDialogMVAEffs(TString ds, const TGWindow *p, Float_t ns, Float_t nb)
TGNumberEntry * fSigInput
TGTextButton * fDrawButton
TString GetLatexFormula()
TGNumberEntry * fBkgInput
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetName() const
Returns name of object.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
void Modified(Bool_t flag=1)
virtual void SetBorderSize(Int_t bordersize=4)
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.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
void Clone(Ssiz_t nc)
Make self a distinct copy with capacity of at least tot, where tot cannot be smaller than the current...
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TStyle objects may be created to define special styles.
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
virtual void SetText(Double_t x, Double_t y, const char *text)
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
std::string GetName(const std::string &scope_name)
RooArgSet S(const RooAbsArg &v1)
static constexpr double ns
void Initialize(Bool_t useTMVAStyle=kTRUE)
void GetMethodTitle(TString &name, TKey *ikey)
TFile * OpenFile(const TString &fin)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
void GetMethodName(TString &name, TKey *mkey)
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
void imgconv(TCanvas *c, const TString &fname)
void mvaeffs(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")