8#include "CorrFitFunc3D.h"
14 CorrFitFunc3D::CorrFitFunc3D(e3DMode mode, Int_t par, Int_t dim) : CorrFitFunc(par, dim), fMode(mode) {
16 case e3DMode::kNormal3R: {
22 fRoutsideParIndex = -1;
23 fRoutlongParIndex = -1;
24 fRsidelongParIndex = -1;
25 SetParameterName(fRsideParIndex,
"R_{side}");
26 SetParameterName(fRlongParIndex,
"R_{long}");
28 case e3DMode::kPlus3R: {
34 fRoutsideParIndex = -1;
35 fRoutlongParIndex = -1;
36 fRsidelongParIndex = -1;
37 SetParameterName(fRsideParIndex,
"R_{#Delta side}");
38 SetParameterName(fRlongParIndex,
"R_{#Delta long}");
40 case e3DMode::kRatio3R: {
46 fRoutsideParIndex = -1;
47 fRoutlongParIndex = -1;
48 fRsidelongParIndex = -1;
49 SetParameterName(fRsideParIndex,
"R_{#times side}");
50 SetParameterName(fRlongParIndex,
"R_{#times long}");
52 case e3DMode::kNormal6R: {
58 fRoutsideParIndex = 3;
59 fRoutlongParIndex = 4;
60 fRsidelongParIndex = 5;
61 SetParameterName(fRsideParIndex,
"R_{side}");
62 SetParameterName(fRlongParIndex,
"R_{long}");
63 SetParameterName(fRoutsideParIndex,
"R_{out-side}");
64 SetParameterName(fRoutlongParIndex,
"R_{out-long}");
65 SetParameterName(fRsidelongParIndex,
"R_{side-long}");
68 case e3DMode::kRatio6R: {
74 fRoutsideParIndex = 3;
75 fRoutlongParIndex = 4;
76 fRsidelongParIndex = 5;
78 SetParameterName(fRsideParIndex,
"R_{#times side}");
79 SetParameterName(fRlongParIndex,
"R_{#times long}");
80 SetParameterName(fRoutsideParIndex,
"R_{out-side}");
81 SetParameterName(fRoutlongParIndex,
"R_{out-long}");
82 SetParameterName(fRsidelongParIndex,
"R_{side-long}");
85 case e3DMode::kPlus6R: {
91 fRoutsideParIndex = 3;
92 fRoutlongParIndex = 4;
93 fRsidelongParIndex = 5;
94 SetParameterName(fRsideParIndex,
"R_{#Delta side}");
95 SetParameterName(fRlongParIndex,
"R_{#Delta long+}");
96 SetParameterName(fRoutsideParIndex,
"R_{out-side}");
97 SetParameterName(fRoutlongParIndex,
"R_{out-long}");
98 SetParameterName(fRsidelongParIndex,
"R_{side-long}");
103 SetParameterName(fLambdaParIndex,
"#lambda");
104 SetParameterName(fNormParIndex,
"N");
105 SetParameterName(fRoutParIndex,
"R_{out}");
108 Double_t CorrFitFunc3D::GetRout()
const {
return GetParameter(fRoutParIndex); }
110 Double_t CorrFitFunc3D::GetRoutError()
const {
return GetParError(fRoutParIndex); }
112 Double_t CorrFitFunc3D::GetRside()
const {
113 int idx = fRsideParIndex;
115 case e3DMode::kNormal3R: {
116 return GetParameter(idx);
118 case e3DMode::kNormal6R: {
119 return GetParameter(idx);
121 case e3DMode::kRatio3R: {
122 return GetParameter(fRoutParIndex) * GetParameter(idx);
124 case e3DMode::kRatio6R: {
125 return GetParameter(fRoutParIndex) * GetParameter(idx);
127 case e3DMode::kPlus3R: {
128 return GetParameter(fRoutParIndex) + GetParameter(idx);
130 case e3DMode::kPlus6R: {
131 return GetParameter(fRoutParIndex) + GetParameter(idx);
139 Double_t CorrFitFunc3D::GetRsideError()
const {
140 int idx = fRsideParIndex;
142 case e3DMode::kNormal3R: {
143 return GetParError(idx);
145 case e3DMode::kNormal6R: {
146 return GetParError(idx);
148 case e3DMode::kRatio3R: {
149 return ErrorCalc::SumError(
150 {GetParError(fRoutParIndex) * GetParameter(idx), GetParameter(fRoutParIndex) * GetParError(idx)});
153 case e3DMode::kRatio6R: {
154 return ErrorCalc::SumError(
155 {GetParError(fRoutParIndex) * GetParameter(idx), GetParameter(fRoutParIndex) * GetParError(idx)});
157 case e3DMode::kPlus3R: {
158 return ErrorCalc::SumError({GetParameter(fRoutParIndex), GetParError(idx)});
160 case e3DMode::kPlus6R: {
161 return ErrorCalc::SumError({GetParameter(fRoutParIndex), GetParError(idx)});
169 Double_t CorrFitFunc3D::GetRlong()
const {
170 int idx = fRlongParIndex;
172 case e3DMode::kNormal3R: {
173 return GetParameter(idx);
175 case e3DMode::kNormal6R: {
176 return GetParameter(idx);
178 case e3DMode::kRatio3R: {
179 return GetParameter(fRoutParIndex) * GetParameter(idx);
181 case e3DMode::kRatio6R: {
182 return GetParameter(fRoutParIndex) * GetParameter(idx);
184 case e3DMode::kPlus3R: {
185 return GetParameter(fRoutParIndex) + GetParameter(idx);
187 case e3DMode::kPlus6R: {
188 return GetParameter(fRoutParIndex) + GetParameter(idx);
196 Double_t CorrFitFunc3D::GetRlongError()
const {
197 int idx = fRlongParIndex;
199 case e3DMode::kNormal3R: {
200 return GetParError(idx);
202 case e3DMode::kNormal6R: {
203 return GetParError(idx);
205 case e3DMode::kRatio3R: {
206 return ErrorCalc::SumError(
207 {GetParError(fRoutParIndex) * GetParameter(idx), GetParameter(fRoutParIndex) * GetParError(idx)});
210 case e3DMode::kRatio6R: {
211 return ErrorCalc::SumError(
212 {GetParError(fRoutParIndex) * GetParameter(idx), GetParameter(fRoutParIndex) * GetParError(idx)});
214 case e3DMode::kPlus3R: {
215 return ErrorCalc::SumError({GetParameter(fRoutParIndex), GetParError(idx)});
217 case e3DMode::kPlus6R: {
218 return ErrorCalc::SumError({GetParameter(fRoutParIndex), GetParError(idx)});
226 void CorrFitFunc3D::SetRsideLimits(Double_t min, Double_t max) {
227 if (fMode == e3DMode::kNormal3R || fMode == e3DMode::kNormal6R) {
228 SetParLimits(RsideID(), min, max);
234 void CorrFitFunc3D::SetRlongLimits(Double_t min, Double_t max) {
235 if (fMode == e3DMode::kNormal3R || fMode == e3DMode::kNormal6R) {
236 SetParLimits(RlongID(), min, max);
static void PrintInfo(TString text, Hal::EInfo status)