Logo ROOT   6.10/09
Reference Guide
ModelInspector.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_roostats
3 /// RooStats Model Inspector
4 ///
5 /// Usage:
6 /// The usage is the same as the StandardXxxDemo.C macros.
7 /// The macro expects a root file containing a workspace with a ModelConfig and a dataset
8 ///
9 /// ~~~{.cpp}
10 /// $ root
11 /// .L ModelInspector.C+
12 /// ModelInspector(fileName, workspaceName, modelConfigName, dataSetName);
13 /// ~~~
14 ///
15 /// Drag the sliders to adjust the parameters of the model.
16 /// the min and max range of the sliders are used to define the upper & lower variation
17 /// the pointer position of the slider is the central blue curve.
18 ///
19 /// Click the FIT button to
20 ///
21 /// To Do:
22 /// - check boxes to specify which nuisance parameters used in making variation
23 /// - a button to make the profile inspector plots
24 /// - a check button to use MINOS errors
25 /// - have fit button show the covariance matrix from the fit
26 /// - a button to make the log likelihood plots
27 /// - a dialog to open the desired file
28 /// - ability to see the signal and background contributions?
29 ///
30 /// \macro_code
31 ///
32 /// - Version 1, October 2011
33 /// - based on tutorial macro by Bertrand Bellenot, Ilka Antcheva
34 /// - Version 2, November 2011
35 /// - fixes from Bertrand Bellenot for scrolling window for many parameters
36 ///
37 /// \author Kyle Cranmer
38 
39 #include "TGButton.h"
40 #include "TRootEmbeddedCanvas.h"
41 #include "TGLayout.h"
42 #include "TF1.h"
43 #include "TMath.h"
44 #include "TSystem.h"
45 #include "TCanvas.h"
46 #include "TGTextEntry.h"
47 #include "TGLabel.h"
48 #include "TGTripleSlider.h"
49 #include "RooWorkspace.h"
50 #include "RooStats/ModelConfig.h"
51 #include "TFile.h"
52 #include "RooArgSet.h"
53 #include "TList.h"
54 #include "RooAbsPdf.h"
55 #include "RooRealVar.h"
56 #include "RooPlot.h"
57 #include "TGButton.h"
58 #include <map>
59 #include "RooFitResult.h"
60 #include "TROOT.h"
61 #include <TApplication.h>
62 #include "RooSimultaneous.h"
63 #include "RooCategory.h"
64 
66  HId1,
67  HId2,
68  HId3,
69  HCId1,
70  HCId2,
71 
72  HSId1
73 };
74 
75 using namespace RooFit;
76 using namespace RooStats;
77 class ModelInspectorGUI : public TGMainFrame {
78 
79 private:
80  TRootEmbeddedCanvas *fCanvas;
81  TGLayoutHints *fLcan;
82  TF1 *fFitFcn;
83  RooPlot* fPlot;
84  RooWorkspace* fWS;
85  TFile* fFile;
86  ModelConfig* fMC;
87  RooAbsData* fData;
88  RooFitResult* fFitRes;
89 
90  TList fSliderList;
91  TList fFrameList;
92  vector<RooPlot*> fPlotList;
93  map<TGTripleHSlider*,const char*> fSliderMap;
94  map<TGTripleHSlider*,TGLabel*> fLabelMap;
95 
96  TGButton* fFitButton;
97  TGTextButton *fExitButton;
98 
99  // BB: a TGCanvas and a vertical frame are needed for using scrollbars
100  TGCanvas *fCan;
101  TGVerticalFrame *fVFrame;
102 
103  TGHorizontalFrame *fHframe0, *fHframe1, *fHframe2;
104  TGLayoutHints *fBly, *fBfly1, *fBfly2, *fBfly3;
105  TGTripleHSlider *fHslider1;
106  TGTextBuffer *fTbh1, *fTbh2, *fTbh3;
107  TGCheckButton *fCheck1, *fCheck2;
108 
109 public:
110  ModelInspectorGUI(RooWorkspace*, ModelConfig*, RooAbsData*);
111  virtual ~ModelInspectorGUI();
112 
113  void CloseWindow();
114  void DoText(const char *text);
115  void DoSlider();
116  void DoSlider(const char*);
117  void DoFit();
118  void DoExit();
119  void HandleButtons();
120 
121  ClassDef(ModelInspectorGUI, 0)
122 };
123 
124 //______________________________________________________________________________
125 ModelInspectorGUI::ModelInspectorGUI(RooWorkspace* w, ModelConfig* mc, RooAbsData* data)
126  : TGMainFrame(gClient->GetRoot(), 100, 100)
127 {
128 
130  fWS = w;
131  fMC = mc;
132  fData = data;
133  RooSimultaneous* simPdf = NULL;
134  Int_t numCats = 1;
135  if(strcmp(fMC->GetPdf()->ClassName(),"RooSimultaneous")==0){
136  cout <<"Is a simultaneous PDF"<< endl;
137  simPdf = (RooSimultaneous*)(fMC->GetPdf());
138  RooCategory* channelCat = (RooCategory*) (&simPdf->indexCat());
139  cout <<" with " << channelCat->numTypes() << " categories"<<endl;
140  numCats = channelCat->numTypes();
141  } else {
142  cout <<"Is not a simultaneous PDF"<<endl;
143  }
144  fFitRes=0;
145 
146  SetCleanup(kDeepCleanup);
147 
148  // Create an embedded canvas and add to the main frame, centered in x and y
149  // and with 30 pixel margins all around
150  fCanvas = new TRootEmbeddedCanvas("Canvas", this, 600, 400);
151  fLcan = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10, 10, 10, 10);
152  AddFrame(fCanvas, fLcan);
153  fPlotList.resize(numCats);
154  if(numCats>1){
155  fCanvas->GetCanvas()->Divide(numCats);
156  for(int i=0; i<numCats; ++i){
157  fCanvas->GetCanvas()->cd(i+1)->SetBorderMode(0);
158  fCanvas->GetCanvas()->cd(i+1)->SetGrid();
159  }
160  }
161 
162  fHframe0 = new TGHorizontalFrame(this, 0, 0, 0);
163 
164  fCheck1 = new TGCheckButton(fHframe0, "&Constrained", HCId1);
165  fCheck2 = new TGCheckButton(fHframe0, "&Relative", HCId2);
166  fCheck1->SetState(kButtonUp);
167  fCheck2->SetState(kButtonUp);
168  fCheck1->SetToolTipText("Pointer position constrained to slider sides");
169  fCheck2->SetToolTipText("Pointer position relative to slider position");
170 
171  fHframe0->Resize(200, 50);
172 
173  fHframe2 = new TGHorizontalFrame(this, 0, 0, 0);
174 
175  fFitButton = new TGTextButton(fHframe2,"Fit");
176  fFitButton->Connect("Clicked()","ModelInspectorGUI",this,"DoFit()");
177  fExitButton = new TGTextButton(fHframe2, "Exit ");
178  fExitButton->Connect("Clicked()", "ModelInspectorGUI", this, "DoExit()");
179 
180  fCheck1->Connect("Clicked()", "ModelInspectorGUI", this,
181  "HandleButtons()");
182  fCheck2->Connect("Clicked()", "ModelInspectorGUI", this,
183  "HandleButtons()");
184 
185  fHframe2->Resize(100, 25);
186 
187  //--- layout for buttons: top align, equally expand horizontally
188  fBly = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5);
189 
190  //--- layout for the frame: place at bottom, right aligned
191  fBfly1 = new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 5, 5);
192  fBfly2 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
193  fBfly3 = new TGLayoutHints(kLHintsTop | kLHintsRight, 5, 5, 5, 5);
194 
195  fHframe2->AddFrame(fFitButton, fBfly2);
196  fHframe2->AddFrame(fExitButton, fBfly3);
197 
198  AddFrame(fHframe0, fBly);
199  AddFrame(fHframe2, fBly);
200 
201  // Loop over POI & NP, create slider
202  // need maps of NP->slider? or just slider->NP
203  RooArgSet parameters;
204  parameters.add(*fMC->GetParametersOfInterest());
205  parameters.add(*fMC->GetNuisanceParameters());
206  TIterator* it = parameters.createIterator();
207  RooRealVar* param=NULL;
208 
209  // BB: This is the part needed in order to have scrollbars
210  fCan = new TGCanvas(this, 100, 100, kFixedSize);
211  AddFrame(fCan, new TGLayoutHints(kLHintsExpandY | kLHintsExpandX));
212  fVFrame = new TGVerticalFrame(fCan->GetViewPort(), 10, 10);
213  fCan->SetContainer(fVFrame);
214  // And that't it!
215  // Obviously, the parent of other subframes is now fVFrame instead of "this"...
216 
217  while( (param=(RooRealVar*)it->Next()) ){
218  cout <<"Adding Slider for "<<param->GetName()<<endl;
219  TGHorizontalFrame* hframek = new TGHorizontalFrame(fVFrame, 0, 0, 0);
220 
221  TGLabel* hlabel = new TGLabel(hframek,Form("%s = %.3f +%.3f",param->GetName(),param->getVal(),param->getError()));
222  TGTripleHSlider* hsliderk = new TGTripleHSlider(hframek, 190, kDoubleScaleBoth, HSId1,
224  GetDefaultFrameBackground(),
226  hsliderk->Connect("PointerPositionChanged()", "ModelInspectorGUI",
227  this, "DoSlider()");
228  hsliderk->Connect("PositionChanged()", "ModelInspectorGUI",
229  this, "DoSlider()");
230  hsliderk->SetRange(param->getMin(),param->getMax());
231 
232  hframek->Resize(200, 25);
233  fSliderList.Add(hsliderk);
234  fFrameList.Add(hframek);
235 
236  hsliderk->SetPosition(param->getVal()-param->getError(),param->getVal()+param->getError());
237  hsliderk->SetPointerPosition(param->getVal());
238 
239  hframek->AddFrame(hlabel, fBly);
240  hframek->AddFrame(hsliderk, fBly);
241  fVFrame->AddFrame(hframek, fBly);
242  fSliderMap[hsliderk]=param->GetName();
243  fLabelMap[hsliderk]=hlabel;
244  }
245 
246  // Set main frame name, map sub windows (buttons), initialize layout
247  // algorithm via Resize() and map main frame
248  SetWindowName("RooFit/RooStats Model Inspector");
249  MapSubwindows();
250  Resize(GetDefaultSize());
251  MapWindow();
252 
253  DoSlider();
254 }
255 
256 //______________________________________________________________________________
257 ModelInspectorGUI::~ModelInspectorGUI()
258 {
259  // Clean up
260 
261  Cleanup();
262 }
263 
264 //______________________________________________________________________________
265 void ModelInspectorGUI::CloseWindow()
266 {
267  // Called when window is closed via the window manager.
268 
269  delete this;
270 }
271 
272 //______________________________________________________________________________
273 void ModelInspectorGUI::DoText(const char * /*text*/)
274 {
275  // Handle text entry widgets.
276 
278  Int_t id = te->WidgetId();
279 
280  switch (id) {
281  case HId1:
282  fHslider1->SetPosition(atof(fTbh1->GetString()),
283  fHslider1->GetMaxPosition());
284  break;
285  case HId2:
286  fHslider1->SetPointerPosition(atof(fTbh2->GetString()));
287  break;
288  case HId3:
289  fHslider1->SetPosition(fHslider1->GetMinPosition(),
290  atof(fTbh1->GetString()));
291  break;
292  default:
293  break;
294  }
295  DoSlider();
296 }
297 
298 //______________________________________________________________________________
300 {
301  fFitRes = fMC->GetPdf()->fitTo(*fData,Save());
302  map<TGTripleHSlider*,const char*>::iterator it;;
303  it = fSliderMap.begin();
304  for(; it!=fSliderMap.end(); ++it){
305  RooRealVar* param=fWS->var(it->second);
306  param = (RooRealVar*) fFitRes->floatParsFinal().find(it->second);
307  it->first->SetPosition(param->getVal()-param->getError(),param->getVal()+param->getError());
308  it->first->SetPointerPosition(param->getVal());
309  }
310  DoSlider();
311 
312 }
313 
314 //______________________________________________________________________________
315 void ModelInspectorGUI::DoSlider(const char* text)
316 {
317  cout << "." << text <<endl;
318 }
319 
320 //______________________________________________________________________________
321 void ModelInspectorGUI::DoSlider()
322 {
323  // Handle slider widgets.
324 
325  //char buf[32];
326 
327  RooSimultaneous* simPdf = NULL;
328  Int_t numCats = 0;
329  if(strcmp(fMC->GetPdf()->ClassName(),"RooSimultaneous")==0){
330  simPdf = (RooSimultaneous*)(fMC->GetPdf());
331  RooCategory* channelCat = (RooCategory*) (&simPdf->indexCat());
332  numCats = channelCat->numTypes();
333  } else {
334  }
335 
336 
337  /////////////////////////////////////////////
338  if(!simPdf){
339  /////////////////////////////////////////////
340  // if not SimPdf
341  /////////////////////////////////////////////
342 
343  // pre loop
344  map<TGTripleHSlider*,const char*>::iterator it;;
345  delete fPlot;
346  fPlot = ((RooRealVar*)fMC->GetObservables()->first())->frame();
347  fData->plotOn(fPlot);
348  double normCount;
349 
350  // high loop
351  it = fSliderMap.begin();
352  for(; it!=fSliderMap.end(); ++it){
353  const char* name = it->second;
354  fWS->var(name)->setVal(it->first->GetMaxPosition());
355  RooRealVar* param = fWS->var(name);
356  fLabelMap[it->first]->SetText(Form("%s = %.3f [%.3f,%.3f]",param->GetName(),it->first->GetPointerPosition(),it->first->GetMinPosition(),it->first->GetMaxPosition()));
357  }
358  normCount = fMC->GetPdf()->expectedEvents(*fMC->GetObservables());
359  fMC->GetPdf()->plotOn(fPlot,LineColor(kRed),Normalization(normCount,RooAbsReal::NumEvent));
360 
361  // low loop
362  it = fSliderMap.begin();
363  for(; it!=fSliderMap.end(); ++it){
364  const char* name = it->second;
365  fWS->var(name)->setVal(it->first->GetMinPosition());
366  }
367  normCount = fMC->GetPdf()->expectedEvents(*fMC->GetObservables());
368  fMC->GetPdf()->plotOn(fPlot,LineColor(kGreen),Normalization(normCount,RooAbsReal::NumEvent));
369 
370  // central oop
371  it = fSliderMap.begin();
372  for(; it!=fSliderMap.end(); ++it){
373  const char* name = it->second;
374  fWS->var(name)->setVal(it->first->GetPointerPosition());
375  }
376  normCount = fMC->GetPdf()->expectedEvents(*fMC->GetObservables());
377  fMC->GetPdf()->plotOn(fPlot,LineColor(kBlue),Normalization(normCount,RooAbsReal::NumEvent));
378  fPlot->Draw();
379 
380  fCanvas->GetCanvas()->Modified();
381  fCanvas->GetCanvas()->Update();
382  ////////////////////////////////////////////////////////////////////////////
383  } else {
384  ////////////////////////////////////////////////////////////////////////////
385  // else (is simpdf)
386  ////////////////////////////////////////////////////////////////////////////
387  RooCategory* channelCat = (RooCategory*) (&simPdf->indexCat());
388  // TIterator* iter = simPdf->indexCat().typeIterator() ;
389  TIterator* iter = channelCat->typeIterator() ;
390  RooCatType* tt = NULL;
391  Int_t frameIndex = 0;
392  while((tt=(RooCatType*) iter->Next())) {
393  ++frameIndex;
394  fCanvas->GetCanvas()->cd(frameIndex);
395 
396  // pre loop
397  RooAbsPdf* pdftmp = simPdf->getPdf(tt->GetName()) ;
398  RooArgSet* obstmp = pdftmp->getObservables(*fMC->GetObservables()) ;
399  RooRealVar* obs = ((RooRealVar*)obstmp->first());
400 
401  fPlot = fPlotList.at(frameIndex-1);
402  if(fPlot) delete fPlot;
403  fPlot = obs->frame();
404  fPlotList.at(frameIndex-1) = fPlot;
405 
408  fData->plotOn(fPlot,MarkerSize(1),Cut(Form("%s==%s::%s",channelCat->GetName(),channelCat->GetName(),tt->GetName())),DataError(RooAbsData::None));
410 
411 
412  map<TGTripleHSlider*,const char*>::iterator it;;
413  double normCount;
414 
415  // high loop
416  it = fSliderMap.begin();
417  for(; it!=fSliderMap.end(); ++it){
418  const char* name = it->second;
419  fWS->var(name)->setVal(it->first->GetMaxPosition());
420  RooRealVar* param = fWS->var(name);
421  fLabelMap[it->first]->SetText(Form("%s = %.3f [%.3f,%.3f]",param->GetName(),it->first->GetPointerPosition(),it->first->GetMinPosition(),it->first->GetMaxPosition()));
422  }
423  normCount = pdftmp->expectedEvents(*obs);
424  pdftmp->plotOn(fPlot,LineColor(kRed),LineWidth(2.),Normalization(normCount,RooAbsReal::NumEvent)) ;
425 
426 
427  // low loop
428  it = fSliderMap.begin();
429  for(; it!=fSliderMap.end(); ++it){
430  const char* name = it->second;
431  fWS->var(name)->setVal(it->first->GetMinPosition());
432  RooRealVar* param = fWS->var(name);
433  fLabelMap[it->first]->SetText(Form("%s = %.3f [%.3f,%.3f]",param->GetName(),it->first->GetPointerPosition(),it->first->GetMinPosition(),it->first->GetMaxPosition()));
434  }
435  normCount = pdftmp->expectedEvents(*obs);
436  pdftmp->plotOn(fPlot,LineColor(kGreen),LineWidth(2.),Normalization(normCount,RooAbsReal::NumEvent)) ;
437 
438  // central loop
439  it = fSliderMap.begin();
440  for(; it!=fSliderMap.end(); ++it){
441  const char* name = it->second;
442  fWS->var(name)->setVal(it->first->GetPointerPosition());
443  RooRealVar* param = fWS->var(name);
444  fLabelMap[it->first]->SetText(Form("%s = %.3f [%.3f,%.3f]",param->GetName(),it->first->GetPointerPosition(),it->first->GetMinPosition(),it->first->GetMaxPosition()));
445  }
446  normCount = pdftmp->expectedEvents(*obs);
447  if(!fFitRes)
448  pdftmp->plotOn(fPlot,LineColor(kBlue),LineWidth(2.),Normalization(normCount,RooAbsReal::NumEvent)) ;
449  else{
450  pdftmp->plotOn(fPlot,Normalization(normCount,RooAbsReal::NumEvent),VisualizeError(*fFitRes,*fMC->GetNuisanceParameters()),FillColor(kYellow)) ;
451  pdftmp->plotOn(fPlot,LineColor(kBlue),LineWidth(2.),Normalization(normCount,RooAbsReal::NumEvent)) ;
454  fData->plotOn(fPlot,MarkerSize(1),Cut(Form("%s==%s::%s",channelCat->GetName(),channelCat->GetName(),tt->GetName())),DataError(RooAbsData::None));
456  }
457  fPlot->Draw();
458  }
459  fCanvas->GetCanvas()->Modified();
460  fCanvas->GetCanvas()->Update();
461  ///////////////////////////////////////////
462  // end if(simPdf)
463  }
464 
465 
466 }
467 
468 //______________________________________________________________________________
469 void ModelInspectorGUI::HandleButtons()
470 {
471  // Handle different buttons.
472 
473  TGButton *btn = (TGButton *) gTQSender;
474  Int_t id = btn->WidgetId();
475 
476  switch (id) {
477  case HCId1:
478  fHslider1->SetConstrained(fCheck1->GetState());
479  break;
480  case HCId2:
481  fHslider1->SetRelative(fCheck2->GetState());
482  break;
483  default:
484  break;
485  }
486 }
487 void ModelInspectorGUI::DoExit()
488 {
489  printf("Exit application...");
491 }
492 
493 
494 void ModelInspector(const char* infile = "",
495  const char* workspaceName = "combined",
496  const char* modelConfigName = "ModelConfig",
497  const char* dataName = "obsData"){
498 
499 
500  // -------------------------------------------------------
501  // First part is just to access a user-defined file
502  // or create the standard example file if it doesn't exist
503 
504 
505  const char* filename = "";
506  if (!strcmp(infile,"")) {
507  filename = "results/example_combined_GaussExample_model.root";
508  bool fileExist = !gSystem->AccessPathName(filename); // note opposite return code
509  // if file does not exists generate with histfactory
510  if (!fileExist) {
511 #ifdef _WIN32
512  cout << "HistFactory file cannot be generated on Windows - exit" << endl;
513  return;
514 #endif
515  // Normally this would be run on the command line
516  cout <<"will run standard hist2workspace example"<<endl;
517  gROOT->ProcessLine(".! prepareHistFactory .");
518  gROOT->ProcessLine(".! hist2workspace config/example.xml");
519  cout <<"\n\n---------------------"<<endl;
520  cout <<"Done creating example input"<<endl;
521  cout <<"---------------------\n\n"<<endl;
522  }
523 
524  }
525  else
526  filename = infile;
527 
528  // Try to open the file
529  TFile *file = TFile::Open(filename);
530 
531  // if input file was specified byt not found, quit
532  if(!file ){
533  cout <<"StandardRooStatsDemoMacro: Input file " << filename << " is not found" << endl;
534  return;
535  }
536 
537  // -------------------------------------------------------
538  // Tutorial starts here
539  // -------------------------------------------------------
540 
541  // get the workspace out of the file
542  RooWorkspace* w = (RooWorkspace*) file->Get(workspaceName);
543  if(!w){
544  cout <<"workspace not found" << endl;
545  return;
546  }
547 
548  // get the modelConfig out of the file
549  ModelConfig* mc = (ModelConfig*) w->obj(modelConfigName);
550 
551  // get the modelConfig out of the file
552  RooAbsData* data = w->data(dataName);
553 
554  // make sure ingredients are found
555  if(!data || !mc){
556  w->Print();
557  cout << "data or ModelConfig was not found" <<endl;
558  return;
559  }
560 
561  new ModelInspectorGUI(w,mc,data);
562 }
563 
virtual Double_t getMin(const char *name=0) const
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1272
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg(), const RooCmdArg &arg10=RooCmdArg()) const
Plot (project) PDF on specified frame.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
Definition: ModelConfig.h:30
virtual Double_t getMax(const char *name=0) const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Definition: RooArgSet.h:86
RooCmdArg Cut(const char *cutSpec)
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Definition: RooAbsArg.h:194
RooCmdArg LineColor(Color_t color)
RooCmdArg VisualizeError(const RooDataSet &paramData, Double_t Z=1)
Definition: Rtypes.h:56
R__EXTERN void * gTQSender
Definition: TQObject.h:45
Double_t getVal(const RooArgSet *set=0) const
Definition: RooAbsReal.h:64
Int_t WidgetId() const
Definition: TGWidget.h:80
void DoFit(THnSparse *s, TF1 *f, ROOT::Fit::BinData &bd)
Definition: SparseFit4.cxx:162
Definition: guitest.h:63
Definition: guitest.h:60
RooFit::MsgLevel globalKillBelow() const
#define gROOT
Definition: TROOT.h:375
#define gClient
Definition: TGClient.h:166
int Int_t
Definition: RtypesCore.h:41
StreamConfig & getStream(Int_t id)
Definition: guitest.h:58
void removeTopic(RooFit::MsgTopic oldTopic)
Definition: Rtypes.h:56
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
Definition: Rtypes.h:56
static RooMsgService & instance()
Return reference to singleton instance.
virtual void SetRange(Float_t min, Float_t max)
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Plot (project) PDF on specified frame.
Definition: RooAbsPdf.h:105
#define NULL
Definition: RtypesCore.h:88
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
Iterator abstract base class.
Definition: TIterator.h:30
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Definition: TFile.cxx:3909
ETestCommandIdentifiers
Definition: guitest.h:37
Int_t numTypes(const char *=0) const
#define ClassDef(name, id)
Definition: Rtypes.h:297
TText * tt
Definition: textangle.C:16
RooCmdArg MarkerSize(Size_t size)
RooCmdArg DataError(Int_t)
virtual void SetPointerPosition(Float_t pos)
Set pointer position in scaled (real) value.
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
Definition: RooCatType.h:22
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
Definition: RooAbsPdf.cxx:2930
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
A doubly linked list.
Definition: TList.h:43
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
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...
Definition: TQObject.cxx:867
R__EXTERN TSystem * gSystem
Definition: TSystem.h:539
TIterator * typeIterator() const
Return iterator over all defined states.
virtual const Text_t * GetName() const
Returns name of object.
Definition: RooCatType.h:44
const RooAbsCategoryLValue & indexCat() const
RooAbsArg * first() const
char * Form(const char *fmt,...)
void setGlobalKillBelow(RooFit::MsgLevel level)
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
RooCategory represents a fundamental (non-derived) discrete value object.
Definition: RooCategory.h:24
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
TObject * obj(const char *name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name) ...
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
Definition: RooPlot.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:92
Namespace for the RooStats classes.
Definition: Asimov.h:20
RooCmdArg FillColor(Color_t color)
TText * text
RooCmdArg Normalization(Double_t scaleFactor)
RooCmdArg LineWidth(Width_t width)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
RooCmdArg Save(Bool_t flag=kTRUE)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
Definition: file.py:1
1-Dim function class
Definition: TF1.h:150
virtual TObject * Next()=0
virtual void SetPosition(Float_t min, Float_t max)
Definition: Rtypes.h:56
Double_t getError() const
Definition: RooRealVar.h:53
void Print(Option_t *opts=0) const
Print contents of the workspace.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:42
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
Definition: RooPlot.cxx:559