56 fTab->Associate(
this);
72 fDraw->Associate(
this);
79 UInt_t width = 0, height = 0;
80 height =
fClose->GetDefaultHeight();
82 frame->
Resize((width + 20) * 2, height);
136 fContourPoints->GetNumberEntry()->SetToolTipText(
"Sets the number of points used for the contour");
141 label =
new TGLabel(frame,
"Parameter 1: ");
155 label =
new TGLabel(frame,
"Parameter 2: ");
171 label =
new TGLabel(frame,
"Confidence Level: ");
179 fContourError->GetNumberEntry()->SetToolTipText(
"Sets the contour confidence level");
186 label =
new TGLabel(frame,
"Fill Colour: ");
193 fContourOver->SetToolTipText(
"If checked, the new contour will overlap the previous one");
217 fScanPoints->GetNumberEntry()->SetToolTipText(
"Sets the number of points used in the scan");
223 label =
new TGLabel(frame,
"Parameter: ");
236 label =
new TGLabel(frame,
"Min: ");
247 fScanMin->GetNumberEntry()->SetToolTipText(
"Sets the minimum parameter value");
250 label =
new TGLabel(frame,
"Max: ");
258 fScanMax->GetNumberEntry()->SetToolTipText(
"Sets the maximum parameter value");
283 fConfLevel->GetNumberEntry()->SetToolTipText(
"Sets the value of the confidence level");
289 label =
new TGLabel(frame,
"Fill Colour: ");
303 for (
Int_t i = 0; i <
fFitter->GetNumberTotalParameters(); ++i ) {
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)");
339 if (
fTab->GetCurrent() == 0 ) {
341 }
else if (
fTab->GetCurrent() == 1 ) {
343 }
else if (
fTab->GetCurrent() == 2 ) {
354 static TGraph * graph = 0;
365 if ( par1 == par2 ) {
366 Error(
"TAdvancedGraphicsDialog::DrawContour",
"Parameters cannot be the same");
371 fFitter->Contour( par1, par2, graph, cl);
375 graph->
Draw( options.c_str() );
385 static TGraph * graph = 0;
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;
436 os <<
"Confidence Intervals with " <<
fConfLevel->GetNumber()
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;
454 os <<
"Confidence Intervals with " <<
fConfLevel->GetNumber()
456 g->SetTitle(os.str().c_str());
459 g->SetFillStyle(3001);
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
double Double_t
Double 8 bytes.
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
class containing the result of the fit and all the related information (fitted parameter values,...
ROOT::Math::IParamMultiFunction IModelFunction
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.
~TAdvancedGraphicsDialog() override
Cleanup dialog.
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(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.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Backward compatible implementation of TVirtualFitter.
static Int_t GetColor(const char *hexcolor)
static ULong_t Number2Pixel(Int_t ci)
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 void AddEntry(TGString *s, Int_t id)
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=nullptr)
Add frame to the composite frame using the specified layout hints.
UInt_t GetDefaultWidth() const override
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
TGCompositeFrame(const TGCompositeFrame &)=delete
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void MapWindow() override
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.
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
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.
TGNumberEntry is a number entry input widget with up/down buttons.
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Yield an action as soon as it is clicked.
TGTransientFrame(const TGTransientFrame &)=delete
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.
void Draw(Option_t *chopt="") override
Default Draw method for all objects.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Abstract Base Class for Fitting.
int main(int argc, char **argv)
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.