130 if ((naxis1 < 0) && (naxis2 > 0)) {
135 }
else if ((naxis1 > 0) && (naxis2 < 0)) {
140 }
else if (naxis1 < 0) {
145 }
else if (naxis1 > 0) {
157 Int_t naxis1, naxis2;
158 Double_t value1, value2;
162 naxis1 = -(naxis + 1);
164 naxis2 = +(naxis + 1);
168 naxis1 = +(naxis + 1);
170 naxis2 = -(naxis + 1);
174 naxis1 = -(naxis + 1);
180 naxis1 = +(naxis + 1);
245 Int_t indx = 0, dindx = 0;
247 if (TMath::Abs(
fxRangeAxis[indx]) != (naxis + 1)) {
258 if ((naxis == 0) || (naxis == 1))
276 return fxCuts.GetLast() + 1;
281 return (n >= 0) && (n <=
fxCuts.GetLast()) ?
dynamic_cast<TCutG *
>(
fxCuts.At(n)) :
nullptr;
309 Bool_t isany = kFALSE;
310 for (Int_t indx = 0; indx <
fxRangeAxis.GetSize(); indx += 2)
313 if ((!isany) || (zn < value))
322 Double_t *arr = (naxis == 0) ? cut->GetX() : cut->GetY();
323 Double_t zn = arr[0];
324 for (Int_t i = 1; i < cut->GetN(); i++)
327 if ((!isany) || (zn < value))
337 Bool_t isany = kFALSE;
339 for (Int_t indx = 0; indx <
fxRangeAxis.GetSize(); indx += 2) {
346 if ((!isany) || (zn > value))
355 Double_t *arr = naxis == 0 ? cut->GetX() : cut->GetY();
357 for (Int_t i = 1; i < cut->GetN(); i++)
360 if ((!isany) || (zn > value))
375 Bool_t res1 = kTRUE, res2 = kTRUE;
377 Bool_t isanycond = kFALSE;
379 for (Int_t naxis = 0; naxis < numaxis; naxis++) {
380 Char_t resaxis1 = kTRUE, resaxis2 = kFALSE;
381 Bool_t isany = kFALSE;
382 for (Int_t ncond = 0; ncond < condsize; ncond++) {
384 Int_t typ, axisnumber;
385 Double_t left, right;
388 if (axisnumber != naxis)
394 if ((values[naxis] >= left) && (values[naxis] <= right))
398 if ((values[naxis] >= left) && (values[naxis] <= right))
402 if (values[naxis] < left)
406 if (values[naxis] > right)
412 res1 = res1 && resaxis1;
415 res2 = res2 && resaxis2;
416 isanycond = isanycond || isany;
421 if (res1 && !(isanycond && res2) && (numaxis > 1) && (
GetNumRangeCut() > 0)) {
425 if (cut->IsInside(values[0], values[1])) {
443 for (Int_t n = 0; n <
NumSlots(); n++) {
455 std::cout <<
"***************************************************************************" << std::endl;
458 std::cout <<
" Amplitude index: " <<
fiAmplIndex << std::endl;
462 std::cout <<
" Range selection: " << std::endl;
464 Double_t left, right;
467 std::cout <<
" axis " << naxis <<
" ";
470 case 0: std::cout <<
" select range from " << left <<
" to " << right;
break;
471 case 1: std::cout <<
" exclude range from " << left <<
" to " << right;
break;
472 case 2: std::cout <<
" set left bound to " << left;
break;
473 case 3: std::cout <<
" set right bound to " << right;
break;
476 std::cout << std::endl;
482 std::cout <<
" Exclude";
484 std::cout <<
" Include";
485 std::cout <<
" axes ranges, using TCutG object " << std::endl;
TCutG * GetRangeCut(Int_t n) const
Returns specified range cut.
void SetRangeCondition(Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right)
Change specified range condition.
TGo4FitParameter * GetAmplPar()
Return amplitude parameter object.
Bool_t GetRangeMax(Int_t naxis, Double_t &value) const
Defines maximum allowed value for given range.
void SetAmplIndex(Int_t iAmplIndex=-1)
Set index of amplitude parameter.
Int_t GetNumRangeCondition() const
Returns number of range condition (exclude range cuts).
void SetRange(Int_t naxis, Double_t min, Double_t max)
Includes axis range in consideration.
Bool_t fbUseBuffers
Specify usage of buffers after initialization.
Bool_t CheckRangeConditions(const Double_t *values, Int_t numaxis)
Check all range conditions for specified point.
TObjArray fxCuts
Array of TCutG objects, used for range selection.
void GetRangeCondition(Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
Return value for specified range condition.
void ClearRanges(Int_t naxis=-1)
Clear all range conditions for given axis.
Double_t GetAmplError()
Return error of amplitude parameter.
const char * GetAmplFullName()
Returns full name of amplitude parameter.
void SetRangeMin(Int_t naxis, Double_t value)
Set minimum axis value, taken into consideration.
void CollectParsTo(TGo4FitParsList &list) override
Collect all parameters to provided parameters list object.
Bool_t MakeAmpl(Bool_t isFixed=kFALSE)
Create amplitude parameter and adds it to parameters list.
Bool_t IsRangeCutExcluding(Int_t n) const
Return kTRUE if cut exclude range.
void SetAmplError(Double_t iError)
Set error of amplitude parameter.
Int_t GetNumRangeCut() const
Returns number of range cuts, assigned to object.
Int_t GetAmplIndex() const
Returns index of amplitude parameter.
void ExcludeRange(Int_t naxis, Double_t min, Double_t max)
Exclude axis range from consideration.
Int_t fiAmplIndex
Index of amplitude parameter (-1 if none)
TArrayD fxRangeValue
Array for range values storage.
TGo4FitParameter * NewAmplitude(const char *Name=nullptr, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0)
Create amplitude parameter with specified properties.
TGo4FitComponent()
Default constructor.
Bool_t IsAnyRangeLimits() const
Return kTRUE, if any range conditions were introduced.
const char * GetAmplName()
Returns name of amplitude parameter.
void SetRangeCutExcluding(Int_t n, Bool_t exclude=kTRUE)
Set type of range cut (excluding or including)
Bool_t GetRangeMin(Int_t naxis, Double_t &value) const
Defines minimum allowed value for given range.
void RemoveRangeCondition(Int_t n)
Removes specified range condition.
void AddRangeCondition(Int_t typ, Int_t naxis, Double_t left, Double_t right)
Add new range condition.
void SetRangeMax(Int_t naxis, Double_t value)
Set maximum axis value, taken into consideration.
void RemoveRangeCut(Int_t n)
Delete range cut with specified index.
Double_t GetAmplValue()
Return value of amplitude parameter.
TGo4FitParameter * NewParameter(const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
Create new parameter with provided properties and add to parameters list.
void SetAmplValue(Double_t iAmpl)
Set value of amplitude parameter.
void Print(Option_t *option="") const override
Print info about object on standard output.
void AddRangeCut(TCutG *cut, Bool_t exclude=kFALSE)
Add TCutG object as range condition for two-dimensional case.
Bool_t RemoveAmpl()
Remove amplitude parameter from parameters list.
virtual ~TGo4FitComponent()
Destroys TGo4FitComponent object.
TArrayI fxRangeAxis
Array for range conditions storage (axis indexes)
void Print(Option_t *option="") const override
const char * GetFullName()
Returns full name of object.
Model and data objects parameter.
Double_t GetValue() const
Return parameter value.
Double_t GetError() const
Get value of parameter error.
void SetError(Double_t iError)
Set value of parameter error.
void SetValue(Double_t iValue)
Set parameter value.
void SetFixed(Bool_t iFixed)
Set status of parameter fixed or not.
Bool_t RemoveParByIndex(Int_t indx)
virtual void CollectParsTo(TGo4FitParsList &list)
Add all parameters to provided TGo4FitParsList object.
virtual TGo4FitParameter * Get(Int_t n)
void Print(Option_t *option="") const override
Default print method.
TGo4FitParsList()
Default constructor.
TGo4FitParameter * GetPar(Int_t n)
Return parameter according given index.
virtual Int_t NumPars()
Return number of parameters in list.
TGo4FitParameter * InsertPar(TGo4FitParameter *par, Int_t indx)
TGo4FitParameter * AddPar(TGo4FitParameter *par)
Int_t NumSlots()
Returns number of slots in list.
TGo4FitSlot * GetSlot(Int_t nslot)
Returns slots from list with specified index.
Managing pointers on specific objects.
Bool_t GetOwned() const
Return ownership flag.
TObject * GetObject() const
Return pointer on assigned object.