FitVarsSterile.cxx
Go to the documentation of this file.
2 
4 
5 #include "Utilities/func/MathUtil.h"
6 
7 namespace ana
8 {
9  // declared as 'extern' in FitVarsSterile.cxx
32 
33 
34  //---------------------------------------------------------------------------
36  {
37  const osc::OscCalcSterile* sterile = osc::DowncastToSterile(osc);
38  double dm221 = sterile->GetDm(2);
39  double dm231 = sterile->GetDm(3);
40  return dm231 - dm221;
41  }
42 
43  //---------------------------------------------------------------------------
45  {
47  double dm221 = sterile->GetDm(2);
48  double dm231 = val + dm221;
49  sterile->SetDm(3, dm231);
50  }
51 
52  //---------------------------------------------------------------------------
54  {
55  return osc::DowncastToSterile(osc)->GetDm(4);
56  }
57 
58  //---------------------------------------------------------------------------
60  {
61  osc::DowncastToSterile(osc)->SetDm(4, val);
62  }
63 
64  //---------------------------------------------------------------------------
66  {
67  const osc::OscCalcSterile* sterile = osc::DowncastToSterile(osc);
68  double dm241 = sterile->GetDm(4);
69  double dm231 = sterile->GetDm(3);
70  return dm241 - dm231;
71  }
72 
73  //---------------------------------------------------------------------------
75  {
77  double dm231 = sterile->GetDm(3);
78  double dm241 = val + dm231;
79  sterile->SetDm(4, dm241);
80  }
81 
82  //----------------------------------------------------------------------
84  {
85  const osc::OscCalcSterile* sterile = osc::DowncastToSterile(osc);
86  double ret = sterile->GetDelta(1, 3)/M_PI;
87  while(ret < 0) ret += 2;
88  while(ret > 2) ret -= 2;
89  return ret;
90  }
91 
92  //----------------------------------------------------------------------
94  {
95  osc::DowncastToSterile(osc)->SetDelta(1, 3, M_PI*val);
96  }
97 
98  //----------------------------------------------------------------------
100  {
101  const osc::OscCalcSterile* sterile = osc::DowncastToSterile(osc);
102  double ret = sterile->GetDelta(1, 4)/M_PI;
103  while(ret < 0) ret += 2;
104  while(ret > 2) ret -= 2;
105  return ret;
106  }
107 
108  //----------------------------------------------------------------------
110  {
111  osc::DowncastToSterile(osc)->SetDelta(1, 4, M_PI*val);
112  }
113 
114  //----------------------------------------------------------------------
116  {
117  const osc::OscCalcSterile* sterile = osc::DowncastToSterile(osc);
118  double ret = sterile->GetDelta(2, 4)/M_PI;
119  if (abs(ret) > 10)
120  return -1.;
121  while(ret < 0) ret += 2;
122  while(ret > 2) ret -= 2;
123  return ret;
124  }
125 
126  //----------------------------------------------------------------------
128  {
129  osc::DowncastToSterile(osc)->SetDelta(2, 4, M_PI*val);
130  }
131 
132  //---------------------------------------------------------------------------
134  {
135  return osc::DowncastToSterile(osc)->GetAngle(1,3);
136  }
137 
138  //----------------------------------------------------------------------
140  {
141  osc::DowncastToSterile(osc)->SetAngle(1, 3, Clamp(val));
142  }
143 
144  //----------------------------------------------------------------------
146  {
147  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(1,3)));
148  }
149 
150  //----------------------------------------------------------------------
152  {
153  osc::DowncastToSterile(osc)->SetAngle(1, 3, asin(sqrt(Clamp(val))));
154  }
155 
156  //----------------------------------------------------------------------
158  {
159  return util::sqr(sin(2*osc::DowncastToSterile(osc)->GetAngle(1,3)));
160  }
161 
162  //----------------------------------------------------------------------
164  {
165  osc::DowncastToSterile(osc)->SetAngle(1, 3, 0.5*asin(sqrt(Clamp(val))));
166  }
167 
168  //---------------------------------------------------------------------------
170  {
171  return osc::DowncastToSterile(osc)->GetAngle(2,3);
172  }
173 
174  //----------------------------------------------------------------------
176  {
177  osc::DowncastToSterile(osc)->SetAngle(2, 3, Clamp(val));
178  }
179 
180  //----------------------------------------------------------------------
182  {
183  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(2,3)));
184  }
185 
186  //----------------------------------------------------------------------
188  {
189  osc::DowncastToSterile(osc)->SetAngle(2, 3, asin(sqrt(Clamp(val))));
190  }
191 
192  //---------------------------------------------------------------------------
194  {
195  return osc::DowncastToSterile(osc)->GetAngle(1,4);
196  }
197 
198  //----------------------------------------------------------------------
200  {
201  osc::DowncastToSterile(osc)->SetAngle(1, 4, Clamp(val));
202  }
203 
204  //----------------------------------------------------------------------
206  {
207  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(1,4)));
208  }
209 
210  //----------------------------------------------------------------------
212  {
213  osc::DowncastToSterile(osc)->SetAngle(1, 4, asin(sqrt(Clamp(val))));
214  }
215 
216  //---------------------------------------------------------------------------
218  {
219  return osc::DowncastToSterile(osc)->GetAngle(2,4);
220  }
221 
222  //----------------------------------------------------------------------
224  {
225  osc::DowncastToSterile(osc)->SetAngle(2, 4, Clamp(val));
226  }
227 
228  //----------------------------------------------------------------------
230  {
231  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(2,4)));
232  }
233 
234  //----------------------------------------------------------------------
236  {
237  osc::DowncastToSterile(osc)->SetAngle(2, 4, asin(sqrt(Clamp(val))));
238  }
239 
240  //---------------------------------------------------------------------------
242  {
243  return osc::DowncastToSterile(osc)->GetAngle(3,4);
244  }
245 
246  //----------------------------------------------------------------------
248  {
249  osc::DowncastToSterile(osc)->SetAngle(3, 4, Clamp(val));
250  }
251 
252  //----------------------------------------------------------------------
254  {
255  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(3,4)));
256  }
257 
258  //----------------------------------------------------------------------
260  {
261  osc::DowncastToSterile(osc)->SetAngle(3, 4, asin(sqrt(Clamp(val))));
262  }
263 
264  //---------------------------------------------------------------------------
266  {
267  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(1,3);
268  }
269 
270  //----------------------------------------------------------------------
272  {
273  osc::DowncastToSterile(osc)->SetAngle(1, 3, TMath::DegToRad()*Clamp(val));
274  }
275 
276  //---------------------------------------------------------------------------
278  {
279  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(2,3);
280  }
281 
282  //----------------------------------------------------------------------
284  {
285  osc::DowncastToSterile(osc)->SetAngle(2, 3, TMath::DegToRad()*Clamp(val));
286  }
287 
288  //---------------------------------------------------------------------------
290  {
291  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(1,4);
292  }
293 
294  //----------------------------------------------------------------------
296  {
297  osc::DowncastToSterile(osc)->SetAngle(1, 4, TMath::DegToRad()*Clamp(val));
298  }
299 
300  //---------------------------------------------------------------------------
302  {
303  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(2,4);
304  }
305 
306  //----------------------------------------------------------------------
308  {
309  osc::DowncastToSterile(osc)->SetAngle(2, 4, TMath::DegToRad()*Clamp(val));
310  }
311 
312  //---------------------------------------------------------------------------
314  {
315  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(3,4);
316  }
317 
318  //----------------------------------------------------------------------
320  {
321  osc::DowncastToSterile(osc)->SetAngle(3, 4, TMath::DegToRad()*Clamp(val));
322  }
323 
324 } // namespace
const FitTheta14InDegreesSterile kFitTheta14InDegreesSterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitSinSqTheta24Sterile kFitSinSqTheta24Sterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetDelta(int i, int j) const
const FitTheta13InDegreesSterile kFitTheta13InDegreesSterile
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
double GetValue(const osc::IOscCalcAdjustable *osc) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
T sqrt(T number)
Definition: d0nt_math.hpp:156
void SetDelta(int i, int j, double delta)
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
const FitSinSqTheta14Sterile kFitSinSqTheta14Sterile
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
Adapt the PMNS_Sterile calculator to standard interface.
const FitTheta23InDegreesSterile kFitTheta23InDegreesSterile
const FitDmSq32Sterile kFitDmSq32Sterile
void abs(TH1 *hist)
const FitTheta24Sterile kFitTheta24Sterile
const FitTheta34Sterile kFitTheta34Sterile
const FitTheta24InDegreesSterile kFitTheta24InDegreesSterile
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
const FitSinSqTheta34Sterile kFitSinSqTheta34Sterile
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
#define M_PI
Definition: SbMath.h:34
double GetValue(const osc::IOscCalcAdjustable *osc) const override
int Clamp(int x)
const FitDelta24InPiUnitsSterile kFitDelta24InPiUnitsSterile
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
const FitDelta14InPiUnitsSterile kFitDelta14InPiUnitsSterile
const FitTheta14Sterile kFitTheta14Sterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitSinSqTheta13Sterile kFitSinSqTheta13Sterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitDmSq43Sterile kFitDmSq43Sterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitSinSq2Theta13Sterile kFitSinSq2Theta13Sterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitDelta13InPiUnitsSterile kFitDelta13InPiUnitsSterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Oscillation probability calculators.
Definition: Calcs.h:5
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const OscCalcSterile * DowncastToSterile(const IOscCalc *calc)
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetAngle(int i, int j, double th)
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
T sin(T number)
Definition: d0nt_math.hpp:132
void SetDm(int i, double dm)
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
const FitSinSqTheta23Sterile kFitSinSqTheta23Sterile
double GetValue(const osc::IOscCalcAdjustable *osc) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitTheta34InDegreesSterile kFitTheta34InDegreesSterile
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
double GetDm(int i) const
double GetValue(const osc::IOscCalcAdjustable *osc) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
const FitTheta13Sterile kFitTheta13Sterile
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
const FitDmSq41Sterile kFitDmSq41Sterile
double GetAngle(int i, int j) const
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
double GetValue(const osc::IOscCalcAdjustable *osc) const override
T asin(T number)
Definition: d0nt_math.hpp:60
const FitTheta23Sterile kFitTheta23Sterile