GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitComponent.h
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#ifndef TGO4FITCOMPONENT_H
15#define TGO4FITCOMPONENT_H
16
17#include "TGo4FitParsList.h"
18#include "TGo4FitSlot.h"
19
20#include "TArrayD.h"
21#include "TArrayI.h"
22#include "TObjArray.h"
23
24class TCutG;
25
31 public:
32
37
41 TGo4FitComponent(const char *iName, const char *iTitle);
42
46 virtual ~TGo4FitComponent();
47
53
58 const char *GetAmplName();
59
64 const char *GetAmplFullName();
65
70 Double_t GetAmplValue();
71
75 void SetAmplValue(Double_t iAmpl);
76
81 Double_t GetAmplError();
82
86 void SetAmplError(Double_t iError);
87
92 Bool_t MakeAmpl(Bool_t isFixed = kFALSE);
93
97 Bool_t RemoveAmpl();
98
102 virtual Bool_t CanAmplTouch() { return kFALSE; }
103
108 void SetRange(Int_t naxis, Double_t min, Double_t max);
109
113 void ExcludeRange(Int_t naxis, Double_t min, Double_t max);
114
119 void SetRangeMin(Int_t naxis, Double_t value);
120
125 void SetRangeMax(Int_t naxis, Double_t value);
126
131 void AddRangeCut(TCutG *cut, Bool_t exclude = kFALSE);
132
137 void ClearRanges(Int_t naxis = -1);
138
142 Bool_t IsAnyRangeLimits() const;
143
148 Bool_t GetRangeMin(Int_t naxis, Double_t& value) const;
149
154 Bool_t GetRangeMax(Int_t naxis, Double_t& value) const;
155
159 Int_t GetNumRangeCondition() const { return fxRangeAxis.GetSize()/2; }
160
170 void GetRangeCondition(Int_t n, Int_t &typ, Int_t &naxis, Double_t& left, Double_t& right) const;
171
177 void SetRangeCondition(Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right);
178
183 void AddRangeCondition(Int_t typ, Int_t naxis, Double_t left, Double_t right);
184
188 void RemoveRangeCondition(Int_t n);
189
193 Int_t GetNumRangeCut() const;
194
198 TCutG *GetRangeCut(Int_t n) const;
199
203 Bool_t IsRangeCutExcluding(Int_t n) const;
204
208 void SetRangeCutExcluding(Int_t n, Bool_t exclude = kTRUE);
209
213 void RemoveRangeCut(Int_t n);
214
218 Bool_t CheckRangeConditions(const Double_t *values, Int_t numaxis);
219
225 void CollectParsTo(TGo4FitParsList &list) override;
226
231 void SetUseBuffers(Bool_t iUse) { fbUseBuffers = iUse; }
232
237 Bool_t GetUseBuffers() const { return fbUseBuffers; }
238
242 void Print(Option_t *option = "") const override;
243
244 protected:
245
249 TGo4FitParameter *NewParameter(const char *Name, const char *Title, Double_t iValue = 0., Bool_t Fixed = kFALSE, Int_t AtIndx = -1);
250
254 TGo4FitParameter *NewAmplitude(const char *Name = nullptr, Double_t iValue = 0., Bool_t IsFixed = kFALSE, Int_t AtIndx = 0);
255
259 Int_t GetAmplIndex() const { return fiAmplIndex; }
260
264 void SetAmplIndex(Int_t iAmplIndex = -1) { fiAmplIndex = iAmplIndex; }
265
266 private:
267
271 TArrayI fxRangeAxis;
272
277
281 TObjArray fxCuts;
282
286 Int_t fiAmplIndex{0};
287
291 Bool_t fbUseBuffers{kFALSE};
292
293 ClassDefOverride(TGo4FitComponent,1)
294};
295
296#endif // TGO4FITCOMPONENT_H
Basic abstract class, combining common properties of data and model.
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.
Bool_t GetUseBuffers() const
Returns flag of usage of additional buffers.
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.
void SetUseBuffers(Bool_t iUse)
Sets usage of additional buffers.
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.
virtual Bool_t CanAmplTouch()
Signals, if amplitude parameter can be removed from or introduced to object.
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)
Model and data objects parameter.
List of TGo4FitParameter objects.
TGo4FitParsList()
Default constructor.