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;
Double_t GetValue() const
void Print(Option_t *option="") const override
void CollectParsTo(TGo4FitParsList &list) override
TGo4FitParameter * InsertPar(TGo4FitParameter *par, Int_t indx)
Bool_t CheckRangeConditions(const Double_t *values, Int_t numaxis)
TCutG * GetRangeCut(Int_t n) const
TGo4FitSlot * GetSlot(Int_t nslot)
void ClearRanges(Int_t naxis=-1)
void SetRangeCondition(Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right)
Int_t GetNumRangeCut() const
const char * GetAmplFullName()
void SetRangeCutExcluding(Int_t n, Bool_t exclude=kTRUE)
void SetRangeMin(Int_t naxis, Double_t value)
TGo4FitParameter * GetPar(Int_t n)
void SetAmplError(Double_t iError)
Int_t GetAmplIndex() const
TGo4FitParameter * NewAmplitude(const char *Name=nullptr, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0)
Int_t GetNumRangeCondition() const
TGo4FitParameter * NewParameter(const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
const char * GetFullName()
void SetAmplValue(Double_t iAmpl)
void SetAmplIndex(Int_t iAmplIndex=-1)
void GetRangeCondition(Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
Double_t GetError() const
Bool_t GetRangeMax(Int_t naxis, Double_t &value) const
void SetRange(Int_t naxis, Double_t min, Double_t max)
Bool_t IsAnyRangeLimits() const
void AddRangeCut(TCutG *cut, Bool_t exclude=kFALSE)
Bool_t IsRangeCutExcluding(Int_t n) const
void SetRangeMax(Int_t naxis, Double_t value)
Bool_t RemoveParByIndex(Int_t indx)
void Print(Option_t *option="") const override
void SetValue(Double_t iValue)
void RemoveRangeCut(Int_t n)
void RemoveRangeCondition(Int_t n)
void AddRangeCondition(Int_t typ, Int_t naxis, Double_t left, Double_t right)
Bool_t MakeAmpl(Bool_t isFixed=kFALSE)
const char * GetAmplName()
TObject * GetObject() const
virtual TGo4FitParameter * Get(Int_t n)
void ExcludeRange(Int_t naxis, Double_t min, Double_t max)
void Print(Option_t *option="") const override
void SetFixed(Bool_t iFixed)
Bool_t GetRangeMin(Int_t naxis, Double_t &value) const
virtual void CollectParsTo(TGo4FitParsList &list)
TGo4FitParameter * AddPar(TGo4FitParameter *par)
virtual ~TGo4FitComponent()
void SetError(Double_t iError)
TGo4FitParameter * GetAmplPar()