162#include "RConfigure.h"
194 if ( strcmp(
f->GetName(),
name ) == 0 )
202 for (
fPrevFitIter it = look.first; it != look.second; ++it ) {
204 if ( strcmp(
f->GetName(),
name ) == 0 )
226 if (
dynamic_cast<TF3 *
>(
f) != 0 ) {
227 TF3* fnew = (
TF3 *)
f->IsA()->New();
234 }
else if (
dynamic_cast<TF2 *
>(
f) != 0 ) {
235 TF2* fnew = (
TF2 *)
f->IsA()->New();
244 TF1* fnew = (
TF1 *)
f->IsA()->New();
264 if (npar != (
int) pars.size() ) pars.resize(npar);
265 for (
Int_t i = 0; i < npar; ++i )
281 if (npar > (
int) pars.size() ) pars.resize(npar);
282 for (
Int_t i = 0; i < npar; ++i )
292template<
class FitObject>
296 if (100 == special || 400 == special) {
301 }
else if ( 110 == special || 410 == special ) {
317 if (!textEntry)
return;
321 variablesStr = nameStr(nameStr.
First(
'(') + 2, nameStr.
First(
',') - nameStr.
First(
'(') - 3);
323 cutsStr = nameStr( nameStr.
First(
',') + 3, nameStr.
First(
')') - nameStr.
First(
',') - 4 );
340 gROOT->MakeDefCanvas();
419 int parts[] = { 20, 20, 20, 20, 20 };
429 gROOT->GetListOfCleanups()->Add(
this);
453 std::vector<TObject*>
v;
488 if (cw + size.
fWidth < dw) {
489 Int_t gedx = 0, gedy = 0;
491 gedy = (cy > 20) ? cy-20 : 0;
515 this,
"SetFitObject(TVirtualPad *, TObject *, Int_t)");
516 gROOT->GetListOfCleanups()->Remove(
this);
578 bgr -> SetRadioButtonExclusive();
584 fNone -> SetToolTipText(
"No operation defined");
586 fAdd -> SetToolTipText(
"Addition");
588 fNormAdd -> SetToolTipText(
"NormAddition");
590 fConv -> SetToolTipText(
"Convolution");
640 gClient->GetColorByName(
"#336666", color);
930 #ifdef R__HAS_MATHMORE
948 "minimizers to be compiled");
987 TGLabel *errlabel =
new TGLabel(hsv1,
"Error definition (default = 1): ");
990 TGLabel *tollabel =
new TGLabel(hsv1,
"Max tolerance (precision): ");
993 TGLabel *itrlabel =
new TGLabel(hsv1,
"Max number of iterations: ");
1053 fDataSet ->
Connect(
"Selected(Int_t)",
"TFitEditor",
this,
"DoDataSet(Int_t)");
1055 fTypeFit ->
Connect(
"Selected(Int_t)",
"TFitEditor",
this,
"FillFunctionList(Int_t)");
1057 fFuncList ->
Connect(
"Selected(Int_t)",
"TFitEditor",
this,
"DoFunction(Int_t)");
1061 fSetParam ->
Connect(
"Clicked()",
"TFitEditor",
this,
"DoSetParameters()");
1063 fAdd ->
Connect(
"Toggled(Bool_t)",
"TFitEditor",
this,
"DoAddition(Bool_t)");
1068 fUseRange ->
Connect(
"Toggled(Bool_t)",
"TFitEditor",
this,
"DoUseFuncRange()");
1088 fSliderX ->
Connect(
"PositionChanged()",
"TFitEditor",
this,
"DoSliderXMoved()");
1089 fSliderXMax ->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderXChanged()");
1090 fSliderXMin ->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderXChanged()");
1094 fSliderY ->
Connect(
"PositionChanged()",
"TFitEditor",
this,
"DoSliderYMoved()");
1095 fSliderYMax ->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderYChanged()");
1096 fSliderYMin ->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderYChanged()");
1099 fSliderZ ->
Connect(
"PositionChanged()",
"TFitEditor",
this,
"DoSliderZMoved()");
1105 fLibMinuit ->
Connect(
"Toggled(Bool_t)",
"TFitEditor",
this,
"DoLibrary(Bool_t)");
1107 fLibFumili ->
Connect(
"Toggled(Bool_t)",
"TFitEditor",
this,
"DoLibrary(Bool_t)");
1108 fLibGSL ->
Connect(
"Toggled(Bool_t)",
"TFitEditor",
this,
"DoLibrary(Bool_t)");
1118 fOptQuiet ->
Connect(
"Toggled(Bool_t)",
"TFitEditor",
this,
"DoPrintOpt(Bool_t)");
1205 "SetFitObject(TVirtualPad *, TObject *, Int_t)");
1206 TQObject::Connect(
"TCanvas",
"Closed()",
"TFitEditor",
this,
"DoNoSelection()");
1221 this,
"SetFitObject(TVirtualPad *, TObject *, Int_t)");
1225 gROOT->GetListOfCleanups()->Remove(
this);
1233 if (!
gROOT->GetListOfCleanups()->FindObject(
this))
1234 gROOT->GetListOfCleanups()->Add(
this);
1314 Error(
"UpdateGUI",
"No hist is present - this should not happen, please report."
1315 "The FitPanel might be in an inconsistent state");
1334 if (ixmin > 1 || ixmax < ixrange) {
1353 fSliderX->
Connect(
"PositionChanged()",
"TFitEditor",
this,
"DoSliderXMoved()");
1354 fSliderXMax->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderXChanged()");
1355 fSliderXMin->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderXChanged()");
1368 Int_t iymin = 0, iymax = 0, iyrange = 0;
1386 if (iymin > 1 || iymax < iyrange) {
1405 fSliderY->
Connect(
"PositionChanged()",
"TFitEditor",
this,
"DoSliderYMoved()");
1406 fSliderYMax->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderYChanged()");
1407 fSliderYMin->
Connect(
"ValueSet(Long_t)",
"TFitEditor",
this,
"DoNumericSliderYChanged()");
1417 Int_t izmin = 0, izmax = 0, izrange = 0;
1435 if (izmin > 1 || izmax < izrange) {
1444 fSliderZ->
Connect(
"PositionChanged()",
"TFitEditor",
this,
"DoSliderZMoved()");
1482 if ( tmpStr.
Length() == 0 )
1554 if (
gROOT->GetListOfCanvases()->IsEmpty()) {
1591 "SetFitObject(TVirtualPad *, TObject *, Int_t)");
1685 if ( strncmp(
f->GetName(),
"PrevFit", 7) != 0 ) {
1692 if (
f->GetNdim() ==
fDim ||
fDim == 0) {
1701 else if(
fDim == 1 ) {
1704 }
else if(
fDim == 2 ) {
1716 for (
fPrevFitIter it = look.first; it != look.second; ++it ) {
1727 else if (
fDim == 2 )
1798 TIter canvasIter(canvases);
1803 if (
TPad* can =
dynamic_cast<TPad*
>(obj))
1806 else if (
dynamic_cast<TH1*
>(obj)
1807 ||
dynamic_cast<TGraph*
>(obj)
1810 ||
dynamic_cast<THStack*
>(obj)
1811 ||
dynamic_cast<TTree*
>(obj) ) {
1812 bool insertNew =
true;
1814 for ( std::vector<TObject*>::iterator i = objects.begin(); i != objects.end(); ++i )
1815 if ( (*i) == obj ) {
1821 if ( insertNew ) objects.push_back(obj);
1841 std::vector<TObject*> objects;
1849 while ( (obj = (
TObject*) next()) ) {
1851 if (
dynamic_cast<TH1*
>(obj) ||
1853 dynamic_cast<TTree*
>(obj) ) {
1854 objects.push_back(obj);
1869 for ( std::vector<TObject*>::iterator i = objects.begin(); i != objects.end(); ++i ) {
1874 if ( selEntryStr &&
name == selEntryStr )
1895 c->AddEntry(
"Unbinned Likelihood",
kFP_MUBIN);
1998 "Error...",
"2) Verify the entered function string!",
2030 static TF1 *fitFunc =
nullptr;
2037 std::cout <<
"TFitEditor::DoFit - using function " << fitFunc->
GetName() <<
" " << fitFunc << std::endl;
2040 Error(
"DoFit",
"This should have never happend, the fitfunc pointer is NULL! - Please Report" );
2066 FitObject(
gr, fitFunc, fitOpts, mopts, strDrawOpts, drange);
2073 FitObject(
mg, fitFunc, fitOpts, mopts, strDrawOpts, drange);
2081 FitObject(g2d, fitFunc, fitOpts, mopts, strDrawOpts, drange);
2104 if ( !
tree )
return;
2113 Error(
"DoFit",
"Player reference is NULL");
2119 Error(
"DoFit",
"Selector reference is NULL");
2126 Error(
"DoFit",
"NDIM == 0");
2130 std::vector<double *> vlist;
2131 for (
unsigned int i = 0; i < ndim; ++i) {
2132 double *
v = selector->
GetVal(i);
2133 if (
v != 0) vlist.push_back(
v);
2135 std::cerr <<
"pointer for variable " << i <<
" is zero" << std::endl;
2137 if (vlist.size() != ndim) {
2138 Error(
"DoFit",
"Vector is not complete");
2145 Error(
"DoFit",
"NROWS == 0");
2151 for (
int i = 0; i < std::min(
int(fitdata->
Size()),10); ++i) {
2153 for (
unsigned int j = 0; j < ndim; ++j) {
2154 printf(
" x_%d [%d] = %f \n", j, i,*(fitdata->
Coords(i)+j) );
2176 fitFunc->
Draw(
"same");
2186 if (!strstr(fitFunc->
GetName(),
"PrevFit"))
2192 float xmin = 0.f,
xmax = 0.f,
ymin = 0.f,
ymax = 0.f, zmin = 0.f, zmax = 0.f;
2218 if (save)
gPad = save;
2242 TF1 form(
"tmpCheck", fname);
2244 rvalue = form.
IsValid() ? 0 : -1;
2245 }
else if (
fDim == 2 ) {
2246 TF2 form(
"tmpCheck", fname);
2248 rvalue = form.
IsValid() ? 0 : -1;
2249 }
else if (
fDim == 3 ) {
2250 TF3 form(
"tmpCheck", fname);
2252 rvalue = form.
IsValid() ? 0 : -1;
2300 if (on)
Info(
"DoNormAddition",
"Normalized addition is selected");
2324 if (on)
Info(
"DoConvolution",
"Convolution is selected");
2339 if (!textEntry)
return;
2346 if ( className ==
"TTree" ) {
2352 lookStr =
name(0,
name.First(
' '));
2354 objSelected =
gROOT->FindObject(lookStr);
2369 char variables[256] = {0};
char cuts[256] = {0};
2380 TPad* currentPad = NULL;
2382 std::queue<TPad*> stPad;
2385 if (
dynamic_cast<TPad*
>(canvas) )
2386 stPad.push(
dynamic_cast<TPad*
>(canvas));
2389 while ( !stPad.empty() && !found ) {
2390 currentPad = stPad.front();
2394 if ( elem == objSelected ) {
2397 }
else if (
dynamic_cast<TPad*
>(elem) )
2398 stPad.push(
dynamic_cast<TPad*
>(elem) );
2429 bool editable =
false;
2564 "Error...",
"3) Verify the entered function string!",
2735 if (!fitFunc) {
Error(
"DoSetParameters",
"NUll function");
return; }
2811 static Int_t px1old, py1old, px2old, py2old;
2823 Int_t px1,py1,px2,py2;
2847 px1 =
gPad->XtoAbsPixel(xleft);
2849 px2 =
gPad->XtoAbsPixel(xright);
2852 if (
gPad->GetCanvas())
gPad->GetCanvas()->FeedbackMode(
kTRUE);
2853 gPad->SetLineWidth(1);
2854 gPad->SetLineColor(2);
2864 if(save)
gPad = save;
2937 "Info",
"Dialog of user method is not implemented yet",
3001 fDim = ((
TH1*)obj)->GetDimension();
3055 bool isTree =
false;
3062 isTree = strcmp(obj->
ClassName(),
"TTree") == 0;
3064 name =
"No object selected";
3071 if ( selectedEntry ) {
3074 selectedName = selectedName(0, selectedName.
First(
' '));
3075 if (
name.CompareTo(selectedName) == 0 ) {
3086 TString compareName = entry->GetText()->GetString();
3088 compareName = compareName(0, compareName.
First(
' '));
3089 if (
name.CompareTo(compareName) == 0 ) {
3116 while ((obj = next())) {
3290 while ((obj2 = next())) {
3299 if ( strcmp( func->
GetName(), it->second->GetName() ) == 0 )
3301 if ( strcmp( func->
GetName(),
"PrevFitTMP" ) == 0 )
3354 (tmpStr.Contains(
"pol") || tmpStr.Contains(
"++")) )
3497 TList *listOfFunctions = 0;
3502 listOfFunctions = ((
TH1 *)
fFitObject)->GetListOfFunctions();
3523 return listOfFunctions;
3539 const unsigned int nfuncs = 16;
3540 const char* fnames[nfuncs] = {
"gaus" ,
"gausn",
"expo",
"landau",
3541 "landaun",
"pol0",
"pol1",
"pol2",
3542 "pol3",
"pol4",
"pol5",
"pol6",
3543 "pol7",
"pol8",
"pol9",
"user"
3547 TIter functionsIter(
gROOT->GetListOfFunctions());
3549 while( ( obj = (
TObject*) functionsIter() ) ) {
3551 if (
TF1* func =
dynamic_cast<TF1*
>(obj) ) {
3552 bool addFunction =
true;
3554 for (
unsigned int i = 0; i < nfuncs; ++i ) {
3555 if ( strcmp( func->GetName(), fnames[i] ) == 0 ) {
3556 addFunction =
false;
3581 std::pair<fPrevFitIter, fPrevFitIter> look =
fPrevFit.equal_range(obj);
3582 for (
fPrevFitIter it = look.first; it != look.second; ++it ) {
3583 retList->
Add(it->second);
3604 "Error...",
"1) Verify the entered function string!",
3611 fitFunc = (
TF1*)tmpF1->IsA()->New();
3612 tmpF1->
Copy(*fitFunc);
3654 if (
fConv -> IsOn())
3663 else if (
fDim == 2 ) {
3666 else if (
fDim == 3 ) {
3679 if ( tmpF1 != 0 && fitFunc != 0 &&
3684 tmpF1->
Copy(*fitFunc);
std::multimap< TObject *, TF1 * >::iterator fPrevFitIter
const Bool_t kIterForward
TF1 * copyTF1(TF1 *f)
Copies f into a new TF1 to be stored in the fitpanel with it's own ownership.
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Stores the parameters of the given function into pars.
void InitParameters(TF1 *func, FitObject *fitobj)
Parameter initialization for the function.
void GetTreeVarsAndCuts(TGComboBox *dataSet, TString &variablesStr, TString &cutsStr)
Splits the entry in fDataSet to get the selected variables and cuts from the text.
void SetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Restore the parameters from pars into the function.
void SearchCanvases(TSeqCollection *canvases, std::vector< TObject * > &objects)
std::multimap< TObject *, TF1 * > FitFuncMap_t
R__EXTERN TPluginManager * gPluginMgr
R__EXTERN void * gTQSender
char * Form(const char *fmt,...)
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
class describing the range in the coordinates it supports multiple range in a coordinate.
void AddRange(unsigned int icoord, double xmin, double xmax)
add a range [xmin,xmax] for the new coordinate icoord Adding a range does not delete existing one,...
void GetRange(unsigned int irange, unsigned int icoord, double &xmin, double &xmax) const
get the i-th range for given coordinate.
unsigned int Size() const
return number of fit points
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
Class describing the unbinned data sets (just x coordinates values) of any dimensions.
void SetMaxFunctionCalls(unsigned int maxfcn)
set maximum of function calls
void SetMaxIterations(unsigned int maxiter)
set maximum iterations (one iteration can have many function calls)
void SetMinimizerType(const char *type)
set minimizer type
static double DefaultTolerance()
static const std::string & DefaultMinimizerType()
void SetErrorDef(double err)
set error def
static int DefaultMaxIterations()
static double DefaultErrorDef()
void SetMinimizerAlgorithm(const char *type)
set minimizer algorithm
void SetTolerance(double tol)
set the tolerance
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Int_t GetWindowTopY()
Returns current top y position of window on screen.
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
virtual void SetCursor(ECursor cursor)
Set cursor.
UInt_t GetWindowWidth() const
Class wrapping convolution of two functions.
const char * GetParName(Int_t ipar) const
Class adding two functions: c1*f1+c2*f2.
const char * GetParName(Int_t ipar) const
Int_t GetNpar() const
Return the number of (non constant) parameters including the coefficients: for 2 functions: c1,...
virtual Int_t GetNumber() const
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
virtual void Copy(TObject &f1) const
Copy this F1 to a new F1.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual void SetParent(TObject *p=0)
virtual Int_t GetNpar() const
virtual TString GetExpFormula(Option_t *option="") const
virtual Double_t * GetParameters() const
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
virtual void SetParName(Int_t ipar, const char *name)
Set name of parameter number ipar.
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual Bool_t IsValid() const
Return kTRUE if the function is valid.
virtual void SetParameters(const Double_t *params)
virtual void SetParameter(Int_t param, Double_t value)
virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
Save values of function in array fSave.
virtual Bool_t AddToGlobalList(Bool_t on=kTRUE)
Add to global list of functions (gROOT->GetListOfFunctions() ) return previous status (true if the fu...
virtual Double_t GetParameter(Int_t ipar) const
A 2-Dim function with parameters.
virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
Save values of function in array fSave.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
A 3-Dim function with parameters.
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
TGCheckButton * fBestErrors
TF1 * FindFunction()
This method looks among the functions stored by the fitpanel, the one that is currently selected in t...
TGDoubleHSlider * fSliderX
TFitEditor(const TFitEditor &)
TGComboBox * fMinMethodList
void CreateGeneralTab()
Create 'General' tab.
virtual void DoUpdate()
Easy here!
TGLayoutHints * fLayoutNormAdd
TGNumberEntry * fSliderXMax
virtual void DoConvolution(Bool_t on)
Slot connected to addition of predefined functions.
TGNumberEntry * fSliderXMin
virtual void SetFitObject(TVirtualPad *pad, TObject *obj, Int_t event)
Slot called when the user clicks on an object inside a canvas.
virtual void DoEnteredFunction()
Slot connected to entered function in text entry.
virtual void DoNormAddition(Bool_t on)
Slot connected to addition of predefined functions.
virtual void DoPrintOpt(Bool_t on)
Slot connected to print option settings.
std::vector< TF1 * > fSystemFuncs
TGCheckButton * fDrawSame
TGRadioButton * fLibMinuit
TGRadioButton * fOptDefault
TGCheckButton * fLinearFit
TGRadioButton * fLibMinuit2
virtual void DoMinMethod(Int_t)
Set selected minimization method in use.
TF1 * HasFitFunction()
Look in the list of function for TF1.
void UpdateGUI()
Set the fit panel GUI according to the selected object.
TGCheckButton * fUseRange
virtual void DoSliderXMoved()
Slot connected to range settings on x-axis.
TGTextButton * fDrawAdvanced
virtual void DoReset()
Reset all fit parameters.
TGNumberEntryField * fTolerance
TGCheckButton * fNoDrawing
void SetEditable(Bool_t)
Switch ON/OFF edit mode.
TGHorizontalFrame * fSliderZParent
virtual void DoSetParameters()
Open set parameters dialog.
TGCompositeFrame * fMinimization
virtual void DoLinearFit()
Slot connected to linear fit settings.
void FillFunctionList(Int_t selected=-1)
Fills the list of functions depending on the type of fit selected.
virtual void Show(TVirtualPad *pad, TObject *obj)
Show the fit panel (possible only via context menu).
virtual void DoNumericSliderYChanged()
syncronize the numeric slider with the graphical one.
virtual void DoClose()
Close the fit panel.
TGDoubleHSlider * fSliderY
void ShowObjectName(TObject *obj)
Show object name on the top.
static TFitEditor * fgFitDialog
virtual void RecursiveRemove(TObject *obj)
When obj is deleted, clear fFitObject if fFitObject = obj.
TList * GetFitObjectListOfFunctions()
virtual void DoAdvancedOptions()
Slot connected to advanced option button (opens a dialog).
TGRadioButton * fLibFumili
virtual void DoDataSet(Int_t sel)
Selects the data set to be fitted.
TGComboBox * BuildMethodList(TGFrame *parent, Int_t id)
Create method list in a combo box.
void CreateMinimizationTab()
Create 'Minimization' tab.
TGRadioButton * fLibGenetics
TGCheckButton * fImproveResults
TF1Convolution * fConvFunc
TF1NormSum object.
TGCheckButton * fUseGradient
virtual Option_t * GetDrawOption() const
Get draw options of the selected object.
virtual void SetCanvas(TCanvas *c)
Connect to another canvas.
TGNumberEntryField * fIterations
TGCompositeFrame * fTabContainer
virtual void DoFunction(Int_t sel)
Slot connected to predefined fit function settings.
virtual void DoUseFuncRange()
virtual ~TFitEditor()
Fit editor destructor.
virtual void ConnectSlots()
Connect GUI signals to fit panel slots.
virtual void DoFit()
Perform a fit with current parameters' settings.
TGRadioButton * fOptVerbose
virtual void SetFunction(const char *function)
Set the function to be used in performed fit.
virtual void Terminate()
Called to delete the fit panel.
TGTextButton * fUserButton
TGDoubleHSlider * fSliderZ
TGTextButton * fFitButton
virtual void DoMaxIterations()
Set the maximum number of iterations.
virtual void DoLibrary(Bool_t on)
Set selected minimization library in use.
void FillDataSetList()
Create a combo box with all the possible objects to be fitted.
virtual void DoEmptyBinsAllWeights1()
Slot connected to 'include emtry bins and forse all weights to 1' setting.
virtual void DoSliderYMoved()
Slot connected to range settings on y-axis.
void RetrieveOptions(Foption_t &, TString &, ROOT::Math::MinimizerOptions &, Int_t)
Retrieve the fitting options from all the widgets.
std::vector< FuncParamData_t > fFuncPars
TGHorizontalFrame * fSliderYParent
virtual void DoNoStoreDrawing()
Slot connected to 'no storing, no drawing' settings.
void MakeTitle(TGCompositeFrame *parent, const char *title)
Create section title in the GUI.
virtual void DoNoSelection()
Slot called when users close a TCanvas or when the user select no object.
TList * GetListOfFittingFunctions(TObject *obj=0)
TGTextButton * fUpdateButton
TGTextEntry * fEnteredFunc
TGCheckButton * fIntegral
virtual void DoAllWeights1()
Slot connected to 'set all weights to 1' setting.
Bool_t SetObjectType(TObject *obj)
Check whether the object suitable for fitting and set its type, dimension and method combo box accord...
virtual void Hide()
Hide the fit panel and set it to non-active state.
TGNumberEntryField * fErrorScale
std::vector< FuncParamData_t > FuncParams_t
TGLayoutHints * fLayoutAdd
TGHorizontalFrame * fSliderXParent
void ProcessTreeInput(TObject *objSelected, Int_t selected, TString variables, TString cuts)
TGCheckButton * fEnableRobust
void DrawSelection(bool restore=false)
Draws the square around the object showing where the limits for fitting are.
TGCheckButton * fEmptyBinsWghts1
virtual void DoSliderZMoved()
Slot connected to range settings on z-axis.
TGNumberEntry * fSliderYMin
void GetRanges(ROOT::Fit::DataRange &)
std::multimap< TObject *, TF1 * > fPrevFit
TGNumberEntry * fRobustValue
static TFitEditor * GetInstance(TVirtualPad *pad=0, TObject *obj=0)
Static method - opens the fit panel.
TGNumberEntry * fSliderYMax
virtual void DoNoChi2()
Slot connected to 'no chi2' option settings.
TGCheckButton * fAdd2FuncList
TGCompositeFrame * fGeneral
virtual void DisconnectSlots()
Disconnect GUI signals from fit panel slots.
void GetFunctionsFromSystem()
TGRadioButton * fOptQuiet
void FillMinMethodList(Int_t selected=-1)
Fills the list of methods depending on the minimization library selected.
TGCheckButton * fNoStoreDrawing
TGCheckButton * fAllWeights1
TGLayoutHints * fLayoutConv
TGTextButton * fResetButton
void CreateFunctionGroup()
Creates the Frame that contains oll the information about the function.
TGLayoutHints * fLayoutNone
Int_t CheckFunctionString(const char *str)
Check entered function string.
virtual void DoRobustFit()
Slot connected to 'robust fitting' option settings.
virtual void CloseWindow()
Close fit panel window.
TGTextButton * fCloseButton
virtual void DoAddition(Bool_t on)
Slot connected to addition of predefined functions.
virtual void DoUserDialog()
Open a dialog for getting a user defined method.
virtual void DoNumericSliderXChanged()
Sincronize the numeric sliders with the graphical one.
const TGWindow * GetRoot() const
Returns current root (i.e.
UInt_t GetDisplayWidth() const
Get display width.
virtual Int_t GetSelected() const
virtual TGLBEntry * GetSelectedEntry() const
virtual void AddEntry(TGString *s, Int_t id)
virtual void RemoveAll()
Remove all entries from combo box.
virtual void RemoveEntry(Int_t id=-1)
Remove entry. If id == -1, the currently selected entry is removed.
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 InsertEntry(TGString *s, Int_t id, Int_t afterID)
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual Int_t GetNumberOfEntries() const
TGCompositeFrame(const TGCompositeFrame &)
Int_t GetState(TGFrame *f) const
Get state of sub frame.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void Layout()
Layout the elements of the composite frame.
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual Float_t GetMaxPosition() const
virtual void GetPosition(Float_t &min, Float_t &max) const
virtual Float_t GetMinPosition() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetScale(Int_t scale)
virtual void SetPosition(Float_t min, Float_t max)
virtual UInt_t GetDefaultHeight() const
virtual UInt_t GetOptions() const
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual void UnmapWindow()
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void SetText(TGString *newText)
Set new text in label.
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual Int_t GetNumberOfEntries() const
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position 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 Long_t GetIntNumber() const
Get the numeric value (integer representation).
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
virtual void ReturnPressed()
Return was pressed.
virtual void SetIntNumber(Long_t val)
Set the numeric value (integer representation).
virtual void SetNumber(Double_t val)
Set the numeric value (floating point representation).
virtual void SetNumber(Double_t val)
TGNumberEntryField * GetNumberEntry() const
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
virtual Double_t GetNumber() const
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
const char * GetString() const
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
const char * GetText() const
virtual const char * GetTitle() const
Returns title of object.
virtual void SelectAll()
Selects all text (i.e.
virtual void SetAlignment(ETextJustification mode=kTextLeft)
Sets the alignment of the text entry.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
const TGString * GetText() const
virtual const char * GetTitle() const
Returns title of object.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Graphics object made of three arrays X, Y and Z with the same number of points each.
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual Int_t GetDimension() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
The Histogram stack class.
Option_t * GetOption() const
Returns the object option stored in the list.
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
A TMultiGraph is a collection of TGraph (or derived) objects.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
The most important graphics class in the ROOT system.
TList * GetListOfPrimitives() const
TPluginHandler * FindHandler(const char *base, const char *uri=0)
Returns the handler if there exists a handler for the specified URI.
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.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
A specialized TSelector for TTree::Draw.
virtual Double_t * GetVal(Int_t i) const
Return the last values corresponding to the i-th component of the formula being processed (where the ...
Sequenceable collection abstract base class.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual Int_t Sizeof() const
Returns size string will occupy on I/O buffer.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Implement some of the functionality of the class TTree requiring access to extra libraries (Histogram...
TSelector * GetSelector() const
virtual Long64_t GetSelectedRows() const
virtual Int_t GetDimension() const
A TTree represents a columnar dataset.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void Modified(Bool_t flag=1)=0
virtual Int_t YtoAbsPixel(Double_t y) const =0
virtual Double_t GetUymax() const =0
virtual TList * GetListOfPrimitives() const =0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Int_t XtoAbsPixel(Double_t x) const =0
virtual Double_t GetUxmax() const =0
virtual Double_t GetUymin() const =0
virtual Double_t GetUxmin() const =0
virtual TCanvas * GetCanvas() const =0
leg AddEntry(h1,"Histogram filled with random numbers","f")
TFitResultPtr FitObject(TH1 *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
fitting function for a TH1 (called from TH1::Fit)
void Init2DGaus(const ROOT::Fit::BinData &data, TF1 *f1)
compute initial parameter for 2D gaussian function given the fit data Set the sigma limits for zero t...
TFitResultPtr UnBinFit(ROOT::Fit::UnBinData *data, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption)
fit an unbin data set (from tree or from histogram buffer) using a TF1 pointer and fit options.
void FillData(BinData &dv, const TH1 *hist, TF1 *func=0)
fill the data vector from a TH1.
void InitGaus(const ROOT::Fit::BinData &data, TF1 *f1)
compute initial parameter for gaussian function given the fit data Set the sigma limits for zero top ...
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
static constexpr double s
static constexpr double mg
void variables(TString dataset, TString fin="TMVA.root", TString dirName="InputVariables_Id", TString title="TMVA Input Variables", Bool_t isRegression=kFALSE, Bool_t useTMVAStyle=kTRUE)