139 label =
new TGLabel(frame,
"Parameter 1: ");
153 label =
new TGLabel(frame,
"Parameter 2: ");
169 label =
new TGLabel(frame,
"Confidence Level: ");
184 label =
new TGLabel(frame,
"Fill Colour: ");
221 label =
new TGLabel(frame,
"Parameter: ");
234 label =
new TGLabel(frame,
"Min: ");
248 label =
new TGLabel(frame,
"Max: ");
287 label =
new TGLabel(frame,
"Fill Colour: ");
313 fClose->
Connect(
"Clicked()",
"TAdvancedGraphicsDialog",
this,
"CloseWindow()");
314 fDraw->
Connect(
"Clicked()",
"TAdvancedGraphicsDialog",
this,
"DoDraw()");
317 fScanPar->
Connect(
"Selected(Int_t)",
"TAdvancedGraphicsDialog",
this,
"DoChangedScanPar(Int_t)");
363 if ( par1 == par2 ) {
364 Error(
"TAdvancedGraphicsDialog::DrawContour",
"Parameters cannot be the same");
373 graph->Draw( options.c_str() );
392 graph->SetLineWidth(2);
394 graph->GetYaxis()->SetTitle(
"FCN" );
410 Error(
"DrawConfidenceLevels",
"Unbinned data set cannot draw confidence levels.");
416 Error(
"DrawConfidenceLevels",
"Fit Function does not exist!");
420 std::vector<Double_t> ci(data->
Size());
423 if ( data->
NDim() == 1 )
426 for (
unsigned int i = 0; i < ci.size(); ++i)
430 g->SetPoint(i, *
x,
y);
431 g->SetPointError(i, 0, ci[i]);
433 std::ostringstream os;
436 g->SetTitle(os.str().c_str());
439 g->SetFillStyle(3001);
441 }
else if ( data->
NDim() == 2 )
444 for (
unsigned int i = 0; i < ci.size(); ++i)
448 g->SetPoint(i,
x[0],
x[1],
y);
449 g->SetPointError(i, 0, 0, ci[i]);
451 std::ostringstream os;
454 g->SetTitle(os.str().c_str());
457 g->SetFillStyle(3001);
include TDocParser_001 C image html pict1_TDocParser_001 png width
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
unsigned int Size() const
return number of fit points
unsigned int NDim() const
return coordinate data dimension
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
class containg the result of the fit and all the related information (fitted parameter values,...
void GetConfidenceIntervals(unsigned int n, unsigned int stride1, unsigned int stride2, const double *x, double *ci, double cl=0.95, bool norm=false) const
get confidence intervals for an array of n points x.
const IModelFunction * FittedFunction() const
fitting quantities
TBackCompFitter * fFitter
TGVerticalFrame * fContourFrame
void DoDraw()
Calls the correspoding method, depending on the selected tab.
void AddParameters(TGComboBox *)
void CreateScanFrame()
Create the frame that contains all the necessary information for the Scan method.
void CreateConfFrame()
Create the frame that contains all the necessary information for the Confidence Level method.
TGComboBox * fContourPar1
void ConnectSlots()
Connect the slots (buttons mainly + specific methods)
TGNumberEntry * fScanPoints
TGNumberEntry * fContourError
TGComboBox * fContourPar2
TGVerticalFrame * fMainFrame
TGColorSelect * fConfColor
TGVerticalFrame * fScanFrame
void CreateContourFrame()
Create the frame that contains all the necessary information for the Contour method.
void DrawContour()
Generates all necessary data for the Contour method from its tab.
TGNumberEntry * fConfLevel
~TAdvancedGraphicsDialog()
Cleanup dialog.
TAdvancedGraphicsDialog(const TAdvancedGraphicsDialog &)
TGVerticalFrame * fConfFrame
void DoChangedScanPar(Int_t selected)
Changes the Min and Max default values of the scan method, depending on the selected parameter.
TGColorSelect * fContourColor
void DrawScan()
Generates all necessary data for the Scan method from its tab.
void DrawConfidenceLevels()
Generates all necessary data for the Scan method from its tab.
TGCheckButton * fContourOver
TGNumberEntry * fContourPoints
Backward compatible implementation of TVirtualFitter.
const ROOT::Fit::FitResult & GetFitResult() const
virtual Double_t GetParError(Int_t ipar) const
Parameter error.
virtual Int_t GetNumberTotalParameters() const
Number of total parameters.
virtual Double_t GetParameter(Int_t ipar) const
Parameter value.
bool Contour(unsigned int ipar, unsigned int jpar, TGraph *gr, double confLevel=0.683)
Create a 2D contour around the minimum for the parameter ipar and jpar if a minimum does not exist or...
virtual const char * GetParName(Int_t ipar) const
Return name of parameter ipar.
const ROOT::Fit::FitData & GetFitData() const
bool Scan(unsigned int ipar, TGraph *gr, double xmin=0, double xmax=0)
Scan parameter ipar between value of xmin and xmax A graph must be given which will be on return fill...
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual Int_t GetSelected() const
virtual void AddEntry(TGString *s, Int_t id)
virtual TGListBox * GetListBox() const
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MapWindow()
map window
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetNumber(Double_t val)
TGNumberEntryField * GetNumberEntry() const
virtual Double_t GetNumber() const
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Graph 2D class with errors.
A TGraphErrors is a TGraph with error bars.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
Abstract Base Class for Fitting.
int main(int argc, char **argv)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Short_t Max(Short_t a, Short_t b)