3 #include "OscLib/IOscCalc.h"
4 #include "OscLib/OscCalcSterile.h"
16 const osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
17 double dm221 = sterile->GetDm(2);
18 double dm231 = sterile->GetDm(3);
25 osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
26 double dm221 = sterile->GetDm(2);
27 double dm231 = val + dm221;
28 sterile->SetDm(3, dm231);
34 return osc::DowncastToSterile(osc)->GetDm(4);
40 osc::DowncastToSterile(osc)->SetDm(4, val);
46 const osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
47 double dm241 = sterile->GetDm(4);
48 double dm231 = sterile->GetDm(3);
55 osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
56 double dm231 = sterile->GetDm(3);
57 double dm241 = val + dm231;
58 sterile->SetDm(4, dm241);
64 const osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
65 double ret = sterile->GetDelta(1, 3)/M_PI;
66 while(ret < 0) ret += 2;
67 while(ret > 2) ret -= 2;
74 osc::DowncastToSterile(osc)->SetDelta(1, 3, M_PI*val);
80 const osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
81 double ret = sterile->GetDelta(1, 4)/M_PI;
82 while(ret < 0) ret += 2;
83 while(ret > 2) ret -= 2;
90 osc::DowncastToSterile(osc)->SetDelta(1, 4, M_PI*val);
96 const osc::IOscCalcSterile* sterile = osc::DowncastToSterile(osc);
97 double ret = sterile->GetDelta(2, 4)/M_PI;
98 while(ret < 0) ret += 2;
99 while(ret > 2) ret -= 2;
106 osc::DowncastToSterile(osc)->SetDelta(2, 4, M_PI*val);
112 return osc::DowncastToSterile(osc)->GetAngle(1,3);
118 osc::DowncastToSterile(osc)->SetAngle(1, 3,
Clamp(val));
124 return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(1,3)));
130 osc::DowncastToSterile(osc)->SetAngle(1, 3, asin(sqrt(
Clamp(val))));
136 return osc::DowncastToSterile(osc)->GetAngle(2,3);
142 osc::DowncastToSterile(osc)->SetAngle(2, 3,
Clamp(val));
148 return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(2,3)));
154 osc::DowncastToSterile(osc)->SetAngle(2, 3, asin(sqrt(
Clamp(val))));
160 return osc::DowncastToSterile(osc)->GetAngle(1,4);
166 osc::DowncastToSterile(osc)->SetAngle(1, 4,
Clamp(val));
172 return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(1,4)));
178 osc::DowncastToSterile(osc)->SetAngle(1, 4, asin(sqrt(
Clamp(val))));
184 return util::sqr(sin(2*osc::DowncastToSterile(osc)->GetAngle(1,4)));
190 osc::DowncastToSterile(osc)->SetAngle(1,4, asin(sqrt(
Clamp(val)))/2);
196 return osc::DowncastToSterile(osc)->GetAngle(2,4);
202 osc::DowncastToSterile(osc)->SetAngle(2, 4,
Clamp(val));
208 return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(2,4)));
214 osc::DowncastToSterile(osc)->SetAngle(2, 4, asin(sqrt(
Clamp(val))));
220 return util::sqr(sin(2*osc::DowncastToSterile(osc)->GetAngle(2,4)));
226 osc::DowncastToSterile(osc)->SetAngle(2,4, asin(sqrt(
Clamp(val)))/2);
232 return osc::DowncastToSterile(osc)->GetAngle(3,4);
238 osc::DowncastToSterile(osc)->SetAngle(3, 4,
Clamp(val));
244 return util::sqr(sin(osc::DowncastToSterile(osc)->GetAngle(3,4)));
250 osc::DowncastToSterile(osc)->SetAngle(3, 4, asin(sqrt(
Clamp(val))));
256 return util::sqr(sin(2*osc::DowncastToSterile(osc)->GetAngle(3,4)));
262 osc::DowncastToSterile(osc)->SetAngle(3,4, asin(sqrt(
Clamp(val)))/2);
268 return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(1,3);
274 osc::DowncastToSterile(osc)->SetAngle(1, 3, TMath::DegToRad()*
Clamp(val));
280 return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(2,3);
286 osc::DowncastToSterile(osc)->SetAngle(2, 3, TMath::DegToRad()*
Clamp(val));
292 return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(1,4);
298 osc::DowncastToSterile(osc)->SetAngle(1, 4, TMath::DegToRad()*
Clamp(val));
304 return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(2,4);
310 osc::DowncastToSterile(osc)->SetAngle(2, 4, TMath::DegToRad()*
Clamp(val));
316 return TMath::RadToDeg()*osc::DowncastToSterile(osc)->GetAngle(3,4);
322 osc::DowncastToSterile(osc)->SetAngle(3, 4, TMath::DegToRad()*
Clamp(val));
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
process_name opflashCryoW ana
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
T sqr(T x)
More efficient square function than pow(x,2)
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
double Clamp(double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const