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, Clamp(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  return osc::DowncastToSterile(osc)->GetDelta(2, 4) / M_PI;
118  }
119 
120  //----------------------------------------------------------------------
122  {
123  osc::DowncastToSterile(osc)->SetDelta(2, 4, M_PI*Clamp(val));
124  }
125 
126  //---------------------------------------------------------------------------
128  {
129  return osc::DowncastToSterile(osc)->GetAngle(1,3);
130  }
131 
132  //----------------------------------------------------------------------
134  {
135  osc::DowncastToSterile(osc)->SetAngle(1, 3, Clamp(val));
136  }
137 
138  //----------------------------------------------------------------------
140  {
141  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(1,3)));
142  }
143 
144  //----------------------------------------------------------------------
146  {
147  osc::DowncastToSterile(osc)->SetAngle(1, 3, asin(sqrt(Clamp(val))));
148  }
149 
150  //----------------------------------------------------------------------
152  {
153  return util::sqr(sin(2*osc::DowncastToSterile(osc)->GetAngle(1,3)));
154  }
155 
156  //----------------------------------------------------------------------
158  {
159  osc::DowncastToSterile(osc)->SetAngle(1, 3, 0.5*asin(sqrt(Clamp(val))));
160  }
161 
162  //---------------------------------------------------------------------------
164  {
165  return osc::DowncastToSterile(osc)->GetAngle(2,3);
166  }
167 
168  //----------------------------------------------------------------------
170  {
171  osc::DowncastToSterile(osc)->SetAngle(2, 3, Clamp(val));
172  }
173 
174  //----------------------------------------------------------------------
176  {
177  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(2,3)));
178  }
179 
180  //----------------------------------------------------------------------
182  {
183  osc::DowncastToSterile(osc)->SetAngle(2, 3, asin(sqrt(Clamp(val))));
184  }
185 
186  //---------------------------------------------------------------------------
188  {
189  return osc::DowncastToSterile(osc)->GetAngle(1,4);
190  }
191 
192  //----------------------------------------------------------------------
194  {
195  osc::DowncastToSterile(osc)->SetAngle(1, 4, Clamp(val));
196  }
197 
198  //----------------------------------------------------------------------
200  {
201  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(1,4)));
202  }
203 
204  //----------------------------------------------------------------------
206  {
207  osc::DowncastToSterile(osc)->SetAngle(1, 4, asin(sqrt(Clamp(val))));
208  }
209 
210  //---------------------------------------------------------------------------
212  {
213  return osc::DowncastToSterile(osc)->GetAngle(2,4);
214  }
215 
216  //----------------------------------------------------------------------
218  {
219  osc::DowncastToSterile(osc)->SetAngle(2, 4, Clamp(val));
220  }
221 
222  //----------------------------------------------------------------------
224  {
225  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(2,4)));
226  }
227 
228  //----------------------------------------------------------------------
230  {
231  osc::DowncastToSterile(osc)->SetAngle(2, 4, asin(sqrt(Clamp(val))));
232  }
233 
234  //---------------------------------------------------------------------------
236  {
237  return osc::DowncastToSterile(osc)->GetAngle(3,4);
238  }
239 
240  //----------------------------------------------------------------------
242  {
243  osc::DowncastToSterile(osc)->SetAngle(3, 4, Clamp(val));
244  }
245 
246  //----------------------------------------------------------------------
248  {
249  return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(3,4)));
250  }
251 
252  //----------------------------------------------------------------------
254  {
255  osc::DowncastToSterile(osc)->SetAngle(3, 4, asin(sqrt(Clamp(val))));
256  }
257 
258  //---------------------------------------------------------------------------
260  {
261  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(1,3);
262  }
263 
264  //----------------------------------------------------------------------
266  {
267  osc::DowncastToSterile(osc)->SetAngle(1, 3, TMath::DegToRad()*Clamp(val));
268  }
269 
270  //---------------------------------------------------------------------------
272  {
273  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(2,3);
274  }
275 
276  //----------------------------------------------------------------------
278  {
279  osc::DowncastToSterile(osc)->SetAngle(2, 3, TMath::DegToRad()*Clamp(val));
280  }
281 
282  //---------------------------------------------------------------------------
284  {
285  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(1,4);
286  }
287 
288  //----------------------------------------------------------------------
290  {
291  osc::DowncastToSterile(osc)->SetAngle(1, 4, TMath::DegToRad()*Clamp(val));
292  }
293 
294  //---------------------------------------------------------------------------
296  {
297  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(2,4);
298  }
299 
300  //----------------------------------------------------------------------
302  {
303  osc::DowncastToSterile(osc)->SetAngle(2, 4, TMath::DegToRad()*Clamp(val));
304  }
305 
306  //---------------------------------------------------------------------------
308  {
309  return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(3,4);
310  }
311 
312  //----------------------------------------------------------------------
314  {
315  osc::DowncastToSterile(osc)->SetAngle(3, 4, TMath::DegToRad()*Clamp(val));
316  }
317 
318 } // 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
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