FitVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <limits>
4 
5 #include "CAFAna/Core/IFitVar.h"
7 
8 namespace ana
9 {
10  /// \f$ \theta_{13} \f$
11  class FitTheta13: virtual public IFitVar
12  {
13  public:
14  FitTheta13() : IFitVar("th13", "#theta_{13}") {};
15 
16  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
17  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
18  };
19 
20  /// \f$ \theta_{13} \f$
21  extern const FitTheta13 kFitTheta13;
22 
23  //----------------------------------------------------------------------
24 
25  /// \f$ \sin^22\theta_{13} \f$
26  class FitSinSq2Theta13: virtual public IConstrainedFitVar
27  {
28  public:
29  FitSinSq2Theta13() : IConstrainedFitVar("ss2th13", "sin^{2}2#theta_{13}") {};
30 
31  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
32  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
33 
34  double LowLimit() const override {return 0;};
35  double HighLimit() const override {return 1;};
36  };
37 
38  /// \f$ \sin^22\theta_{13} \f$
40 
41  //----------------------------------------------------------------------
42 
43  /// \f$ \delta_{CP}/\pi \f$
44  class FitDeltaInPiUnits: virtual public StanFitSupport<IFitVar>
45  {
46  public:
47  FitDeltaInPiUnits() : StanFitSupport<IFitVar>("delta(pi)", "#delta / #pi") {};
48 
50  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
51  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
52  void SetValue(osc::IOscCalcAdjustableStan* osc, stan::math::var val) const override;
53  };
54 
55  /// \f$ \delta_{CP}/\pi \f$
57 
58  //----------------------------------------------------------------------
59 
60  /// \f$ \sin^2\theta_{23} \f$
61  class FitSinSqTheta23: virtual public StanFitSupport<IConstrainedFitVar>
62  {
63  public:
65  : StanFitSupport<IConstrainedFitVar>("ssth23", "sin^{2}#theta_{23}")
66  {}
67 
68  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
69  stan::math::var GetValue(const osc::IOscCalcAdjustableStan* osc) const override;
70 
71  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
72  void SetValue(osc::IOscCalcAdjustableStan* osc, stan::math::var val) const override;
73 
74  double LowLimit() const override {return 0;};
75  double HighLimit() const override {return 1;};
76  };
77 
78  /// \f$ \sin^2\theta_{23} \f$
79  extern const FitSinSqTheta23 kFitSinSqTheta23;
80 
81  //----------------------------------------------------------------------
82  /// \f$ \sin^2\theta_{23} Upper Octant\f$
83  class FitSinSqTheta23UpperOctant: virtual public StanFitSupport<IConstrainedFitVar>
84  {
85  public:
87  : StanFitSupport<IConstrainedFitVar>("ssth23_uo", "sin^{2}#theta_{23} Upper Octant")
88  {}
89 
90  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
91  stan::math::var GetValue(const osc::IOscCalcAdjustableStan* osc) const override;
92 
93  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
94  void SetValue(osc::IOscCalcAdjustableStan* osc, stan::math::var val) const override;
95 
96  double LowLimit() const override {return 0.5;};
97  double HighLimit() const override {return 1;};
98  };
99 
100  /// \f$ \sin^2\theta_{23} UpperOctant \f$
102 
103  //----------------------------------------------------------------------
104  /// \f$ \sin^2\theta_{23} Lower Octant\f$
105  class FitSinSqTheta23LowerOctant: virtual public StanFitSupport<IConstrainedFitVar>
106  {
107  public:
109  : StanFitSupport<IConstrainedFitVar>("ssth23_lo", "sin^{2}#theta_{23} Lower Octant")
110  {}
111 
112  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
113  stan::math::var GetValue(const osc::IOscCalcAdjustableStan* osc) const override;
114 
115  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
116  void SetValue(osc::IOscCalcAdjustableStan* osc, stan::math::var val) const override;
117 
118  double LowLimit() const override {return 0;};
119  double HighLimit() const override {return 0.5;};
120  };
121 
122  /// \f$ \sin^2\theta_{23} Lower Octant \f$
124 
125  //----------------------------------------------------------------------
126 
127  /// \f$ \sin^22\theta_{23} \f$
128  class FitSinSq2Theta23: virtual public IConstrainedFitVar
129  {
130  public:
131  FitSinSq2Theta23() : IConstrainedFitVar("ss2th23", "sin^{2}2#theta_{23}") {};
132 
133  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
134  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
135 
136 
137  double LowLimit() const override {return 0;};
138  double HighLimit() const override {return 1;};
139  };
140 
141  /// \f$ \sin^22\theta_{23} \f$
142  extern const FitSinSq2Theta23 kFitSinSq2Theta23;
143 
144  //----------------------------------------------------------------------
145 
146  /// \f$ \Delta m^2_{32} \f$
147  class FitDmSq32: virtual public IConstrainedFitVar
148  {
149  public:
150  FitDmSq32() : IConstrainedFitVar("dmsq32", "#Deltam^{2}_{32}") {};
151 
152  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
153  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
154 
155  // "1eV^2 splitting should be enough for anyone"
156  // OscCalcPMNS freaks out at large splittings
157  double LowLimit() const override {return -1;};
158  double HighLimit() const override {return +1;};
159  };
160 
161  /// \f$ \Delta m^2_{32} \f$
162  extern const FitDmSq32 kFitDmSq32;
163 
164  //-------------------------------------------------------------------------
165 
166  /// \f$ \Delta m^2_{32}\times10^3{\rm eV}^2 \f$
167  class FitDmSq32Scaled: virtual public StanFitSupport<IConstrainedFitVar>
168  {
169  public:
171  : StanFitSupport<IConstrainedFitVar>("dmsq32scaled", "#Deltam^{2}_{32} (10^{-3} eV^{2})")
172  {}
173 
174  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
175  stan::math::var GetValue(const osc::IOscCalcAdjustableStan* osc) const override;
176 
177  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
178  void SetValue(osc::IOscCalcAdjustableStan* osc, stan::math::var val) const override;
179 
180  // "1eV^2 splitting should be enough for anyone"
181  // OscCalcPMNS freaks out at large splittings
182  double LowLimit() const override {return -1000;};
183  double HighLimit() const override {return +1000;};
184  };
185 
186  /// \f$ \Delta m^2_{32}\times10^3{\rm eV}^2 \f$
187  extern const FitDmSq32Scaled kFitDmSq32Scaled;
188 
189  //---------------------------------------------------------------------
191  {
192  public:
193  FitDmSq32NormalHierarchy() : IConstrainedFitVar("dmsq32NH", "#Deltam^{2}_{32} NH") {};
194 
195  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
196  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
197 
198  // constrain this var to Normal Hierarchy and within a reasonable range
199  // in eV
200  double LowLimit() const override {return 0;};
201  double HighLimit() const override { return 0.05;};
202  };
204 
205  //---------------------------------------------------------------------
206  class FitDmSq32ScaledNH: virtual public IConstrainedFitVar
207  {
208  public:
209  FitDmSq32ScaledNH() : IConstrainedFitVar("dmsq32ScaledNH", "#Deltam^{2}_{32} NH (10^{-3} eV^{2})") {};
210 
211  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
212  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
213 
214  // vonstrain this var to Normal Hierarchy and within a reasonable range in 10^-3 eV
215  double LowLimit() const override {return 0;};
216  double HighLimit() const override {return 50;};
217  };
219 
220  //----------------------------------------------------------------------
221  class FitDmSq32ScaledIH: virtual public IConstrainedFitVar
222  {
223  public:
224  FitDmSq32ScaledIH() : IConstrainedFitVar("dmsq32ScaledIH", "#Deltam^{2}_{32} IH (10^{-3} eV^{2})") {};
225 
226  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
227  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
228 
229  // vonstrain this var to Normal Hierarchy and within a reasonable range in 10^-3 eV
230  double LowLimit() const override {return -50;};
231  double HighLimit() const override {return 0;};
232  };
234 
235  //---------------------------------------------------------------------
237  {
238  public:
239  FitDmSq32InvertedHierarchy() : IConstrainedFitVar("dmsq32IH", "#Deltam^{2}_{32} IH") {};
240 
241  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
242  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
243 
244  // constrain this var to Normal Hierarchy and within a reasonable range
245  // in eV
246  double LowLimit() const override {return -0.05;};
247  double HighLimit() const override { return 0;};
248  };
250 
251 
252  //----------------------------------------------------------------------
253 
254  /// \f$ \tan^2\theta_{12} \f$
255  class FitTanSqTheta12: virtual public IConstrainedFitVar
256  {
257  public:
258  FitTanSqTheta12() : IConstrainedFitVar("tsth12", "tan^{2}#theta_{12}") {};
259 
260  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
261  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
262 
263  double LowLimit() const override {return 0;};
264  double HighLimit() const override {return std::numeric_limits<double>::max();};
265  };
266 
267  /// \f$ \tan^2\theta_{12} \f$
268  extern const FitTanSqTheta12 kFitTanSqTheta12;
269 
270  //----------------------------------------------------------------------
271 
272  /// \f$ \sin^22\theta_{12} \f$
273  class FitSinSq2Theta12: virtual public IConstrainedFitVar
274  {
275  public:
276  FitSinSq2Theta12() : IConstrainedFitVar("ss2th12", "sin^{2}2#theta_{12}") {};
277 
278  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
279  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
280 
281  double LowLimit() const override {return 0;};
282  double HighLimit() const override {return 1;};
283  };
284 
285  /// \f$ \sin^22\theta_{12} \f$
286  extern const FitSinSq2Theta12 kFitSinSq2Theta12;
287 
288  //----------------------------------------------------------------------
289 
290  /// \f$ \Delta m^2_{21} \f$
291  class FitDmSq21: virtual public IConstrainedFitVar
292  {
293  public:
294  FitDmSq21() : IConstrainedFitVar("dmsq21", "#Deltam^{2}_{21}") {};
295 
296  double GetValue(const osc::IOscCalcAdjustable* osc) const override;
297  void SetValue(osc::IOscCalcAdjustable* osc, double val) const override;
298 
299  // "1eV^2 splitting should be enough for anyone"
300  // OscCalcPMNS freaks out at large splittings
301  double LowLimit() const override {return -1;};
302  double HighLimit() const override {return +1;};
303  };
304 
305  /// \f$ \Delta m^2_{21} \f$
306  extern const FitDmSq21 kFitDmSq21;
307 } // namespace
const FitSinSq2Theta12 kFitSinSq2Theta12
Definition: FitVars.cxx:25
double HighLimit() const override
Definition: FitVars.h:231
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const FitTheta13 kFitTheta13
Definition: FitVars.cxx:12
const FitDmSq32 kFitDmSq32
Definition: FitVars.cxx:18
const FitDmSq32ScaledNH kFitDmSq32ScaledNH
Definition: FitVars.cxx:21
const FitSinSq2Theta23 kFitSinSq2Theta23
const FitSinSqTheta23UpperOctant kFitSinSqTheta23UpperOctant
Definition: FitVars.cxx:16
double HighLimit() const override
Definition: FitVars.h:158
double LowLimit() const override
Definition: FitVars.h:96
double LowLimit() const override
Definition: FitVars.h:246
double HighLimit() const override
Definition: FitVars.h:138
const FitDmSq21 kFitDmSq21
Definition: FitVars.cxx:26
double HighLimit() const override
Definition: FitVars.h:216
double LowLimit() const override
Definition: FitVars.h:215
double HighLimit() const override
Definition: FitVars.h:97
double LowLimit() const override
Definition: FitVars.h:118
double HighLimit() const override
Definition: FitVars.h:35
double GetValue(const osc::IOscCalcAdjustable *osc) const override
Definition: FitVars.cxx:30
double LowLimit() const override
Definition: FitVars.h:263
double HighLimit() const override
Definition: FitVars.h:264
double HighLimit() const override
Definition: FitVars.h:201
double LowLimit() const override
Definition: FitVars.h:200
double LowLimit() const override
Definition: FitVars.h:74
const ConstrainedFitVarWithPrior fitDmSq32Scaled_UniformPrior & kFitDmSq32Scaled
double HighLimit() const override
Definition: FitVars.h:302
Oscillation probability calculators.
Definition: Calcs.h:5
double LowLimit() const override
Definition: FitVars.h:157
const FitDmSq32ScaledIH kFitDmSq32ScaledIH
Definition: FitVars.cxx:22
double LowLimit() const override
Definition: FitVars.h:281
const FitSinSqTheta23LowerOctant kFitSinSqTheta23LowerOctant
Definition: FitVars.cxx:17
double LowLimit() const override
Definition: FitVars.h:230
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
double LowLimit() const override
Definition: FitVars.h:34
Interface definition for fittable variables.
Definition: IFitVar.h:16
void SetValue(osc::IOscCalcAdjustable *osc, double val) const override
Definition: FitVars.cxx:36
double HighLimit() const override
Definition: FitVars.h:75
double HighLimit() const override
Definition: FitVars.h:119
const FitSinSq2Theta13 kFitSinSq2Theta13
Definition: FitVars.cxx:13
double HighLimit() const override
Definition: FitVars.h:282
const FitDmSq32InvertedHierarchy kFitDmSq32InvertedHierarchy
Definition: FitVars.cxx:23
double LowLimit() const override
Definition: FitVars.h:301
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
const FitVarWithPrior fitDeltaInPiUnits_UniformPriordCP & kFitDeltaInPiUnits
const FitDmSq32NormalHierarchy kFitDmSq32NormalHierarchy
Definition: FitVars.cxx:20
double LowLimit() const override
Definition: FitVars.h:137
double HighLimit() const override
Definition: FitVars.h:183
const FitTanSqTheta12 kFitTanSqTheta12
Definition: FitVars.cxx:24
double HighLimit() const override
Definition: FitVars.h:247
double LowLimit() const override
Definition: FitVars.h:182