GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitComponent.h
Go to the documentation of this file.
1 // $Id: TGo4FitComponent.h 1927 2016-06-30 08:03:38Z linev $
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 für 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 
24 class TCutG;
25 
30  public:
31 
36 
40  TGo4FitComponent(const char* iName, const char* iTitle);
41 
45  virtual ~TGo4FitComponent();
46 
52 
57  const char* GetAmplName();
58 
63  const char* GetAmplFullName();
64 
69  Double_t GetAmplValue();
70 
74  void SetAmplValue(Double_t iAmpl);
75 
80  Double_t GetAmplError();
81 
85  void SetAmplError(Double_t iError);
86 
91  Bool_t MakeAmpl(Bool_t isFixed = kFALSE);
92 
96  Bool_t RemoveAmpl();
97 
101  virtual Bool_t CanAmplTouch() { return kFALSE; }
102 
107  void SetRange(Int_t naxis, Double_t min, Double_t max);
108 
112  void ExcludeRange(Int_t naxis, Double_t min, Double_t max);
113 
118  void SetRangeMin(Int_t naxis, Double_t value);
119 
124  void SetRangeMax(Int_t naxis, Double_t value);
125 
130  void AddRangeCut(TCutG* cut, Bool_t exclude = kFALSE);
131 
136  void ClearRanges(Int_t naxis = -1);
137 
141  Bool_t IsAnyRangeLimits();
142 
147  Bool_t GetRangeMin(Int_t naxis, Double_t& value);
148 
153  Bool_t GetRangeMax(Int_t naxis, Double_t& value);
154 
158  Int_t GetNumRangeCondition() const { return fxRangeAxis.GetSize()/2; }
159 
169  void GetRangeCondition(Int_t n, Int_t& typ, Int_t& naxis, Double_t& left, Double_t& right) const;
170 
176  void SetRangeCondition(Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right);
177 
182  void AddRangeCondition(Int_t typ, Int_t naxis, Double_t left, Double_t right);
183 
187  void RemoveRangeCondition(Int_t n);
188 
192  Int_t GetNumRangeCut() const;
193 
197  TCutG* GetRangeCut(Int_t n) const;
198 
202  Bool_t IsRangeCutExcluding(Int_t n);
203 
207  void SetRangeCutExcluding(Int_t n, Bool_t exclude = kTRUE);
208 
212  void RemoveRangeCut(Int_t n);
213 
217  Bool_t CheckRangeConditions(const Double_t* values, Int_t numaxis);
218 
224  virtual void CollectParsTo(TGo4FitParsList& list);
225 
230  void SetUseBuffers(Bool_t iUse) { fbUseBuffers = iUse; }
231 
236  Bool_t GetUseBuffers() { return fbUseBuffers; }
237 
241  virtual void Print(Option_t* option) const;
242 
243  protected:
244 
248  TGo4FitParameter* NewParameter(const char* Name, const char* Title, Double_t iValue = 0., Bool_t Fixed = kFALSE, Int_t AtIndx = -1);
249 
253  TGo4FitParameter* NewAmplitude(const char* Name = 0, Double_t iValue = 0., Bool_t IsFixed = kFALSE, Int_t AtIndx = 0);
254 
258  Int_t GetAmplIndex() { return fiAmplIndex; }
259 
263  void SetAmplIndex(Int_t iAmplIndex = -1) { fiAmplIndex = iAmplIndex; }
264 
265  private:
266 
270  TArrayI fxRangeAxis;
271 
275  TArrayD fxRangeValue;
276 
280  TObjArray fxCuts;
281 
285  Int_t fiAmplIndex;
286 
290  Bool_t fbUseBuffers;
291 
293 };
294 
295 #endif // TGO4FITCOMPONENT_H
virtual void Print(Option_t *option) const
void SetUseBuffers(Bool_t iUse)
Bool_t CheckRangeConditions(const Double_t *values, Int_t numaxis)
Int_t GetNumRangeCut() const
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 GetNumRangeCondition() const
const char * GetAmplFullName()
void SetRangeCutExcluding(Int_t n, Bool_t exclude=kTRUE)
void SetRangeMin(Int_t naxis, Double_t value)
virtual Bool_t CanAmplTouch()
void SetAmplError(Double_t iError)
TGo4FitParameter * NewParameter(const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
void SetAmplValue(Double_t iAmpl)
TGo4FitParameter * NewAmplitude(const char *Name=0, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0)
void SetAmplIndex(Int_t iAmplIndex=-1)
TCutG * GetRangeCut(Int_t n) const
void SetRange(Int_t naxis, Double_t min, Double_t max)
void AddRangeCut(TCutG *cut, Bool_t exclude=kFALSE)
ClassDef(TGo4FitSlotList, 1)
void SetRangeMax(Int_t naxis, Double_t value)
void GetRangeCondition(Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
virtual void CollectParsTo(TGo4FitParsList &list)
void RemoveRangeCut(Int_t n)
Bool_t IsRangeCutExcluding(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)
Bool_t GetRangeMin(Int_t naxis, Double_t &value)
const char * GetAmplName()
void ExcludeRange(Int_t naxis, Double_t min, Double_t max)
virtual ~TGo4FitComponent()
Bool_t GetRangeMax(Int_t naxis, Double_t &value)
TGo4FitParameter * GetAmplPar()