GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitParameter.cxx
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#include "TGo4FitParameter.h"
15
16#include <iostream>
17
21
22TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue) : TGo4FitNamed(name,title) {
23 Reset();
24 fdValue = iValue;
25}
26
27TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax) : TGo4FitNamed(name,title) {
28 Reset();
29 fdValue = iValue;
30 SetRange(iRangeMin,iRangeMax);
31}
32
33TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue, Double_t iEpsilon) : TGo4FitNamed(name,title) {
34 Reset();
35 fdValue = iValue;
36 SetEpsilon(iEpsilon);
37}
38
39TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax, Double_t iEpsilon) : TGo4FitNamed(name,title) {
40 Reset();
41 fdValue = iValue;
42 SetRange(iRangeMin,iRangeMax);
43 SetEpsilon(iEpsilon);
44}
45
46void TGo4FitParameter::SetRange(Double_t iRangeMin, Double_t iRangeMax) {
47 fbRange=kTRUE;
48 fdRangeMin = iRangeMin;
49 fdRangeMax = iRangeMax;
50 if (fdRangeMin==fdRangeMax) { fdValue = fdRangeMin; fbFixed = kTRUE; } else
53}
54
57
58void TGo4FitParameter::Print(Option_t *option) const
59{
60 std::cout << " Name: " << const_cast<TGo4FitParameter *>(this)->GetFullName();
61 std::cout << " value=" << fdValue << " error = " << fdError;
62 if (GetFixed()) std::cout << " fixed";
63 if (fbRange) std::cout << " range=[" << fdRangeMin << "," << fdRangeMax << "]";
64 if (fbEpsilon) std::cout << " epsilon=" << fdEpsilon;
65 std::cout << std::endl;
66}
67
69{
70 fdValue = 0.;
71 fdError = 0.;
72 fbFixed = kFALSE;
73 fbEpsilon = kFALSE;
74 fdEpsilon = .000001;
75 fbRange = kFALSE;
76 fdRangeMin = 0.;
77 fdRangeMax = 0.;
78 fbBlocked = kFALSE;
80}
TGo4FitNamed()
Default constructor.
const char * GetFullName()
Returns full name of object.
void SetEpsilon(Double_t iEpsilon)
Return epsilon value of parameter.
void SetRange(Double_t iRangeMin, Double_t iRangeMax)
Set range minimum and maximum values.
void Print(Option_t *option="") const override
Print TGo4FitParameter object to standard output.
Bool_t GetFixed() const
Return status, if parameter fixed or not.
TGo4FitParameter()
Default constructor.
virtual ~TGo4FitParameter()
Destroy TGo4FitParameter object.