141 label =
new TGLabel(frame,
"Parameter 1: ");
155 label =
new TGLabel(frame,
"Parameter 2: ");
171 label =
new TGLabel(frame,
"Confidence Level: ");
186 label =
new TGLabel(frame,
"Fill Colour: ");
223 label =
new TGLabel(frame,
"Parameter: ");
236 label =
new TGLabel(frame,
"Min: ");
250 label =
new TGLabel(frame,
"Max: ");
289 label =
new TGLabel(frame,
"Fill Colour: ");
315 fClose->
Connect(
"Clicked()",
"TAdvancedGraphicsDialog",
this,
"CloseWindow()");
316 fDraw->
Connect(
"Clicked()",
"TAdvancedGraphicsDialog",
this,
"DoDraw()");
319 fScanPar->
Connect(
"Selected(Int_t)",
"TAdvancedGraphicsDialog",
this,
"DoChangedScanPar(Int_t)");
365 if ( par1 == par2 ) {
366 Error(
"TAdvancedGraphicsDialog::DrawContour",
"Parameters cannot be the same");
375 graph->Draw( options.c_str() );
394 graph->SetLineWidth(2);
396 graph->GetYaxis()->SetTitle(
"FCN" );
412 Error(
"DrawConfidenceLevels",
"Unbinned data set cannot draw confidence levels.");
418 Error(
"DrawConfidenceLevels",
"Fit Function does not exist!");
422 std::vector<Double_t> ci(data->
Size());
425 if ( data->
NDim() == 1 )
428 for (
unsigned int i = 0; i < ci.size(); ++i)
432 g->SetPoint(i, *
x,
y);
433 g->SetPointError(i, 0, ci[i]);
435 std::ostringstream os;
438 g->SetTitle(os.str().c_str());
441 g->SetFillStyle(3001);
443 }
else if ( data->
NDim() == 2 )
446 for (
unsigned int i = 0; i < ci.size(); ++i)
450 g->SetPoint(i,
x[0],
x[1],
y);
451 g->SetPointError(i, 0, 0, ci[i]);
453 std::ostringstream os;
456 g->SetTitle(os.str().c_str());
459 g->SetFillStyle(3001);
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
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
Fitter.
TGVerticalFrame * fContourFrame
Contour Frame.
TGNumberEntry * fScanMax
Max Value for Contour.
void DoDraw()
Calls the corresponding 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
Parameter 1 for Contour.
TGComboBox * fScanPar
Parameter for Scan.
void ConnectSlots()
Connect the slots (buttons mainly + specific methods)
TGNumberEntry * fScanPoints
Number of points for the graph.
TGNumberEntry * fContourError
Error Level for Contour.
TGTextButton * fDraw
ok button
TGComboBox * fContourPar2
Parameter 2 for Contour.
TGVerticalFrame * fMainFrame
Main Vertical Frame.
TGColorSelect * fConfColor
Color for the graph.
TGVerticalFrame * fScanFrame
Scan Frame.
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
Confidence Level.
TGTextButton * fClose
cancel button
~TAdvancedGraphicsDialog()
Cleanup dialog.
TAdvancedGraphicsDialog(const TAdvancedGraphicsDialog &)
TGTab * fTab
Tab containing the available methods.
TGNumberEntry * fScanMin
Min Value for Contour.
TGVerticalFrame * fConfFrame
Confidence Intervals Frame.
void DoChangedScanPar(Int_t selected)
Changes the Min and Max default values of the scan method, depending on the selected parameter.
TGColorSelect * fContourColor
Color for the graph.
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
Superimpose the graphics.
TGNumberEntry * fContourPoints
Number of points for the graph.
Backward compatible implementation of TVirtualFitter.
const ROOT::Fit::FitResult & GetFitResult() const
Get reference to Fit Result object (NOTE: it will be invalid when class is deleted)
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
Get reference to Fit Data object (NOTE: it will be invalid when class is deleted)
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",...
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
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...
The base class for composite widgets (menu bars, list boxes, etc.).
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
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
A listbox is a box, possibly with scrollbar, containing entries.
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.
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Yield an action as soon as it is clicked.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
Defines transient windows that typically are used for dialogs windows.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
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.
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.
Short_t Max(Short_t a, Short_t b)