77 UInt_t width = 0, height = 0;
80 frame->
Resize((width + 20) * 2, height);
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() );
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)
433 std::ostringstream os;
441 }
else if ( data->
NDim() == 2 )
444 for (
unsigned int i = 0; i < ci.size(); ++i)
451 std::ostringstream os;
void DoChangedScanPar(Int_t selected)
Changes the Min and Max default values of the scan method, depending on the selected parameter...
void DrawConfidenceLevels()
Generates all necessary data for the Scan method from its tab.
TGComboBox * fContourPar1
TGColorSelect * fConfColor
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 Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual void Draw(Option_t *option="")
Specific drawing options can be used to paint a TGraph2D:
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...
void ConnectSlots()
Connect the slots (buttons mainly + specific methods)
void GetConfidenceIntervals(unsigned int n, unsigned int stride1, unsigned int stride2, const double *x, double *ci, double cl=0.95, bool norm=true) const
get confidence intervals for an array of n points x.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
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...
~TAdvancedGraphicsDialog()
Cleanup dialog.
virtual void SetNumber(Double_t val)
TAxis * GetYaxis() const
Get y axis of the graph.
TGVerticalFrame * fMainFrame
TGColorSelect * fContourColor
Backward compatible implementation of TVirtualFitter.
virtual UInt_t GetDefaultHeight() const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetTitle(const char *title="")
Set graph title.
const IModelFunction * FittedFunction() const
fitting quantities
void CreateContourFrame()
Create the frame that contains all the necessary information for the Contour method.
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
virtual Double_t GetParError(Int_t ipar) const
Parameter error.
TGCheckButton * fContourOver
virtual void SetTitle(const char *title="")
Sets graph title.
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.
virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez)
Set ex, ey and ez values for point number i.
void CreateScanFrame()
Create the frame that contains all the necessary information for the Scan method. ...
void DoDraw()
Calls the correspoding method, depending on the selected tab.
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 Int_t GetNumberTotalParameters() const
Number of total parameters.
const ROOT::Fit::FitData & GetFitData() const
TGNumberEntry * fConfLevel
TGNumberEntry * fContourPoints
unsigned int Size() const
return number of fit points
const ROOT::Fit::FitResult & GetFitResult() const
TAdvancedGraphicsDialog(const TAdvancedGraphicsDialog &)
virtual TGListBox * GetListBox() const
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...
virtual UInt_t GetDefaultWidth() const
TGComboBox * fContourPar2
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
void CreateConfFrame()
Create the frame that contains all the necessary information for the Confidence Level method...
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
void DrawContour()
Generates all necessary data for the Contour method from its tab.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual UInt_t GetDefaultWidth() const
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
TAxis * GetXaxis() const
Get x axis of the graph.
TGNumberEntry * fScanPoints
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
virtual UInt_t GetDefaultHeight() const
class containg the result of the fit and all the related information (fitted parameter values...
virtual void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z)
Set x, y and z values for point number i.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void AddEntry(TGString *s, Int_t id)
virtual Double_t GetNumber() const
TGVerticalFrame * fContourFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Abstract Base Class for Fitting.
TGVerticalFrame * fScanFrame
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual Int_t GetSelected() const
TGNumberEntryField * GetNumberEntry() const
TBackCompFitter * fFitter
Short_t Max(Short_t a, Short_t b)
TGNumberEntry * fContourError
A Graph is a graphics object made of two arrays X and Y with npoints each.
A TGraphErrors is a TGraph with error bars.
TGVerticalFrame * fConfFrame
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
virtual const char * GetParName(Int_t ipar) const
Return name of parameter ipar.
void DrawScan()
Generates all necessary data for the Scan method from its tab.
unsigned int NDim() const
return coordinate data dimension
virtual void SetPointError(Double_t ex, Double_t ey)
Set ex and ey values for point pointed by the mouse.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void AddParameters(TGComboBox *)
int main(int argc, char **argv)
Graph 2D class with errors.
virtual Double_t GetParameter(Int_t ipar) const
Parameter value.