Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
osc::OscCalc Class Referenceabstract

#include "/cvmfs/nova.opensciencegrid.org/externals/osclib/v00.07/src/OscLib/OscCalc.h"

Inheritance diagram for osc::OscCalc:
osc::_IOscCalcAdjustable< T > osc::_IOscCalc< T >

Public Member Functions

 OscCalc ()
 
virtual ~OscCalc ()
 
virtual IOscCalcAdjustableCopy () const override
 
double P (int flavBefore, int flavAfter, double E) override
 E in GeV; flavors as PDG codes (so, neg==>antinu) More...
 
double P_me (double E, bool antinu=false)
 
double P_mm (double E, bool antinu=false)
 
double P_mt (double E, bool antinu=false)
 
double P_ee (double E, bool antinu=false)
 
double P_em (double E, bool antinu=false)
 
double P_et (double E, bool antinu=false)
 
double P_te (double E, bool antinu=false)
 
double P_tm (double E, bool antinu=false)
 
double P_tt (double E, bool antinu=false)
 
double P_null (double, bool)
 
void SetL (double L) override
 
void SetRho (double rho) override
 
void SetDmsq21 (const double &dmsq21) override
 
void SetDmsq32 (const double &dmsq32) override
 
void SetTh12 (const double &th12) override
 
void SetTh13 (const double &th13) override
 
void SetTh23 (const double &th23) override
 
void SetdCP (const double &dCP) override
 
TF1 * GetTF1 (int flavBefore, int flavAfter)
 
double P_wrapper (double *x, double *p)
 
virtual TMD5 * GetParamsHash () const override
 Use to check two calculators are in the same state. More...
 
virtual void SetDmsq21 (const T &dmsq21)=0
 
virtual void SetDmsq32 (const T &dmsq32)=0
 
virtual void SetTh12 (const T &th12)=0
 
virtual void SetTh13 (const T &th13)=0
 
virtual void SetTh23 (const T &th23)=0
 
virtual void SetdCP (const T &dCP)=0
 
virtual double GetL () const
 
virtual double GetRho () const
 
virtual T GetDmsq21 () const
 
virtual T GetDmsq32 () const
 
virtual T GetTh12 () const
 
virtual T GetTh13 () const
 
virtual T GetTh23 () const
 
virtual T GetdCP () const
 
virtual void InvalidateCache ()
 Invalidate any caching used internally by the calculator. More...
 
virtual Eigen::Array< T, Eigen::Dynamic, 1 > P (int flavBefore, int flavAfter, const std::vector< double > &E)
 
virtual Eigen::Array< T, Eigen::Dynamic, 1 > P (int flavBefore, int flavAfter, const Eigen::ArrayXd &E)
 

Protected Member Functions

TMD5 * GetParamsHashDefault (const std::string &txt) const
 This is only a safe implementation if your calculator only depends on these eight parameters. More...
 

Protected Attributes

double fRho
 
double fL
 
T fDmsq21
 
T fDmsq32
 
T fTh12
 
T fTh13
 
T fTh23
 
T fdCP
 

Private Member Functions

void UpdateBasic ()
 
void UpdateEDep (double E, bool antinu, bool fliptime)
 
double P_internal_ee (double E, bool antinu, bool fliptime)
 
double P_internal_me (double E, bool antinu, bool fliptime)
 
double P_internal_te (double E, bool antinu, bool fliptime)
 
double P_internal_mt (double E, bool antinu, bool fliptime)
 

Private Attributes

bool fUpdated
 
double fDmsq31
 
double fsin_th12
 
double fsin_th13
 
double fsin_th23
 
double fcos_th12
 
double fcos_th13
 
double fcos_th23
 
double fsin_2th12
 
double fsin_2th13
 
double fsin_2th23
 
double fcos_2th12
 
double fcos_2th13
 
double fcos_2th23
 
double fsin_sq_th12
 
double fsin_sq_th13
 
double fsin_sq_th23
 
double fcos_sq_th12
 
double fcos_sq_th13
 
double fcos_sq_th23
 
double fsin_sq_2th12
 
double fsin_sq_2th13
 
double fsin_sq_2th23
 
double fcos_sq_2th12
 
double fcos_sq_2th13
 
double fcos_sq_2th23
 
double falpha
 
double fV
 
double fA
 
double fD
 
double fC12
 
double fC13
 
double fdCPproxy
 
double fsin_dCPproxy
 
double fcos_dCPproxy
 

Detailed Description

Definition at line 21 of file OscCalc.h.

Constructor & Destructor Documentation

osc::OscCalc::OscCalc ( )

Definition at line 21 of file OscCalc.cxx.

References osc::_IOscCalcAdjustable< T >::fdCP, osc::_IOscCalcAdjustable< T >::fDmsq21, osc::_IOscCalcAdjustable< T >::fDmsq32, osc::_IOscCalcAdjustable< T >::fL, osc::_IOscCalcAdjustable< T >::fRho, osc::_IOscCalcAdjustable< T >::fTh12, osc::_IOscCalcAdjustable< T >::fTh13, osc::_IOscCalcAdjustable< T >::fTh23, and fUpdated.

Referenced by Copy().

22  {
23 
24  // put some sensible defaults here...
25 
26  fRho = 2.75; // g/cm^3
27  fL = 810; // km
28  fDmsq21 = 7.59E-5; // eV^2
29  fDmsq32 = 2.43E-3; //eV^2
30  fTh12 = 0.601;
31  fTh13 = 0.0;
32  fTh23 = 7.85398163397448279e-01; // pi/4
33  fdCP = 0;
34 
35  fUpdated = false;
36  }
bool fUpdated
Definition: OscCalc.h:83
osc::OscCalc::~OscCalc ( )
virtual

Definition at line 39 of file OscCalc.cxx.

40  {
41  }

Member Function Documentation

IOscCalcAdjustable * osc::OscCalc::Copy ( ) const
overridevirtual

Implements osc::_IOscCalcAdjustable< T >.

Definition at line 44 of file OscCalc.cxx.

References OscCalc().

45  {
46  return new OscCalc(*this);
47  }
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetdCP ( ) const
inlinevirtualinherited
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetDmsq21 ( ) const
inlinevirtualinherited
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetDmsq32 ( ) const
inlinevirtualinherited
template<typename T>
virtual double osc::_IOscCalcAdjustable< T >::GetL ( ) const
inlinevirtualinherited
virtual TMD5* osc::OscCalc::GetParamsHash ( ) const
inlineoverridevirtual

Use to check two calculators are in the same state.

Returns
Null means not implemented for this calculator

Reimplemented from osc::_IOscCalc< T >.

Definition at line 67 of file OscCalc.h.

References osc::_IOscCalcAdjustable< double >::GetParamsHashDefault(), P_internal_ee(), P_internal_me(), P_internal_mt(), P_internal_te(), UpdateBasic(), and UpdateEDep().

68  {
70  }
TMD5 * GetParamsHashDefault(const std::string &txt) const
This is only a safe implementation if your calculator only depends on these eight parameters...
template<typename T >
TMD5 * osc::_IOscCalcAdjustable< T >::GetParamsHashDefault ( const std::string txt) const
protectedinherited

This is only a safe implementation if your calculator only depends on these eight parameters.

Parameters
txtA string to uniquely identify your calculator class

Definition at line 49 of file IOscCalc.cxx.

References runNovaSAM::ret, and T.

Referenced by osc::_OscCalcPMNS< T >::GetParamsHash(), osc::_OscCalcPMNSOpt< T >::GetParamsHash(), and osc::analytic::_OscCalc< T >::GetParamsHash().

50  {
51  TMD5* ret = new TMD5;
52  ret->Update((unsigned char*)txt.c_str(), txt.size());
53  const int kNumParams = 8;
54  T buf[kNumParams] = {fRho, fL, fDmsq21, fDmsq32,
55  fTh12, fTh13, fTh23, fdCP};
56  ret->Update((unsigned char*)buf, sizeof(T)*kNumParams);
57  ret->Final();
58  return ret;
59  }
double T
Definition: Xdiff_gwt.C:5
template<typename T>
virtual double osc::_IOscCalcAdjustable< T >::GetRho ( ) const
inlinevirtualinherited

Reimplemented in osc::OscCalcCPT, and osc::OscCalcSterile.

Definition at line 89 of file IOscCalc.h.

Referenced by osc::CopyParams(), osc::OscCalcCPT::GetRho(), ana::ResetSterileCalcToDefault(), and ana::SaveTo().

89 { return fRho ; }
TF1 * osc::OscCalc::GetTF1 ( int  flavBefore,
int  flavAfter 
)

Definition at line 82 of file OscCalc.cxx.

References P_wrapper().

Referenced by SetdCP().

83  {
84  TF1 *theTF1 = new TF1(Form("OscCalcFunction_%d_%d_%p",flavBefore,flavAfter,(void*)this),
85  this,&osc::OscCalc::P_wrapper,0,120,2,"OscCalc","P_wrapper");
86  theTF1->SetParameters(flavBefore,flavAfter);
87  theTF1->SetNpx(1000);
88  return theTF1;
89  }
double P_wrapper(double *x, double *p)
Definition: OscCalc.cxx:92
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetTh12 ( ) const
inlinevirtualinherited
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetTh13 ( ) const
inlinevirtualinherited
template<typename T>
virtual T osc::_IOscCalcAdjustable< T >::GetTh23 ( ) const
inlinevirtualinherited
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::InvalidateCache ( )
inlinevirtualinherited

Invalidate any caching used internally by the calculator.

Some calculators use a cache that can become stale in ways that the calculator may not know about (e.g., Stan var clearing). Default implementation does nothing.

Reimplemented in osc::_OscCalcDMP< T >.

Definition at line 102 of file IOscCalc.h.

102 {};
double osc::OscCalc::P ( int  flavBefore,
int  flavAfter,
double  E 
)
overridevirtual

E in GeV; flavors as PDG codes (so, neg==>antinu)

Implements osc::_IOscCalc< T >.

Definition at line 50 of file OscCalc.cxx.

References P_ee(), P_em(), P_et(), P_me(), P_mm(), P_mt(), P_te(), P_tm(), and P_tt().

51  {
52  bool antinu = (flavBefore<0&&flavAfter<0);
53  if (antinu) {
54  flavBefore *= -1;
55  flavAfter *= -1;
56  }
57  if (flavBefore==12&&flavAfter==12) return P_ee(E,antinu);
58  else if (flavBefore==12&&flavAfter==14) return P_em(E,antinu);
59  else if (flavBefore==12&&flavAfter==16) return P_et(E,antinu);
60  else if (flavBefore==14&&flavAfter==12) return P_me(E,antinu);
61  else if (flavBefore==14&&flavAfter==14) return P_mm(E,antinu);
62  else if (flavBefore==14&&flavAfter==16) return P_mt(E,antinu);
63  else if (flavBefore==16&&flavAfter==12) return P_te(E,antinu);
64  else if (flavBefore==16&&flavAfter==14) return P_tm(E,antinu);
65  else if (flavBefore==16&&flavAfter==16) return P_tt(E,antinu);
66  else return 0;
67  }
double P_mt(double E, bool antinu=false)
Definition: OscCalc.cxx:75
double P_tm(double E, bool antinu=false)
Definition: OscCalc.cxx:78
double P_ee(double E, bool antinu=false)
Definition: OscCalc.cxx:69
double P_te(double E, bool antinu=false)
Definition: OscCalc.cxx:77
double P_tt(double E, bool antinu=false)
Definition: OscCalc.cxx:79
double P_me(double E, bool antinu=false)
Definition: OscCalc.cxx:73
Float_t E
Definition: plot.C:20
double P_et(double E, bool antinu=false)
Definition: OscCalc.cxx:71
double P_em(double E, bool antinu=false)
Definition: OscCalc.cxx:70
double P_mm(double E, bool antinu=false)
Definition: OscCalc.cxx:74
template<class T >
Eigen::Array< T, Eigen::Dynamic, 1 > osc::_IOscCalc< T >::P ( int  flavBefore,
int  flavAfter,
const std::vector< double > &  E 
)
virtualinherited

Default implementation forwards to non-vector version using a simple loop. Override if your calculator has a more efficient implementation.

Reimplemented in osc::analytic::_OscCalc< T >, osc::OscCalcPMNSOptEigen, and osc::_OscCalcDMP< T >.

Definition at line 27 of file IOscCalc.cxx.

References MECModelEnuComparisons::i, osc::_IOscCalc< T >::P(), runNovaSAM::ret, and submit_hadd::u.

Referenced by osc::_IOscCalc< T >::P().

28  {
29  Eigen::Matrix<T,Eigen::Dynamic,1> ret(E.size());
30  for(auto i = 0u; i < E.size(); i++) {
31  ret(i) = this->P(flavBefore, flavAfter, E[i]);
32  }
33  return ret.array().isNaN().select(0, ret);
34  }
Float_t E
Definition: plot.C:20
virtual T P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
template<class T >
Eigen::Array< T, Eigen::Dynamic, 1 > osc::_IOscCalc< T >::P ( int  flavBefore,
int  flavAfter,
const Eigen::ArrayXd &  E 
)
virtualinherited

Default implementation forawrds to vector<double> version. Override if your calculator has a more efficient implementation.

Reimplemented in osc::analytic::_OscCalc< T >.

Definition at line 37 of file IOscCalc.cxx.

References P.

38  {
39  return P(flavBefore, flavAfter, std::vector<double>(&E[0], &E[0]+E.size()));
40  }
Float_t E
Definition: plot.C:20
virtual T P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
double osc::OscCalc::P_ee ( double  E,
bool  antinu = false 
)

Definition at line 69 of file OscCalc.cxx.

References P_internal_ee().

Referenced by P(), and P_wrapper().

69 { return P_internal_ee(E,antinu,0); }
Float_t E
Definition: plot.C:20
double P_internal_ee(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:332
double osc::OscCalc::P_em ( double  E,
bool  antinu = false 
)

Definition at line 70 of file OscCalc.cxx.

References P_internal_me().

Referenced by P(), and P_wrapper().

70 { return P_internal_me(E,antinu,1); }
double P_internal_me(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:192
Float_t E
Definition: plot.C:20
double osc::OscCalc::P_et ( double  E,
bool  antinu = false 
)

Definition at line 71 of file OscCalc.cxx.

References P_internal_te().

Referenced by P(), and P_wrapper().

71 { return P_internal_te(E,antinu,1); }
double P_internal_te(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:262
Float_t E
Definition: plot.C:20
double osc::OscCalc::P_internal_ee ( double  E,
bool  antinu,
bool  fliptime 
)
private

Definition at line 332 of file OscCalc.cxx.

References std::cos(), fA, stan::math::fabs(), falpha, fC12, fC13, fcos_2th13, fD, fsin_sq_2th12, fsin_sq_2th13, fsin_th12, plot_validation_datamc::p1, plot_validation_datamc::p2, std::sin(), UpdateBasic(), and UpdateEDep().

Referenced by GetParamsHash(), and P_ee().

333  {
334  UpdateBasic();
335  UpdateEDep(E,antinu,fliptime);
336 
337  double cosC13D = cos(fC13*fD);
338  double sinC13D = sin(fC13*fD);
339  double sinaC12D = sin(falpha*fC12*fD);
340 
341  // This is coming straight from the MINOS NueAna package...
342 
343  // First we calculate the terms for the alpha expansion (good to all orders in th13)
344 
345  // Leading order term
346  double p1 = 1 - fsin_sq_2th13*sinC13D*sinC13D/(fC13*fC13);
347 
348  // Terms that appear at order alpha
349  double p2Inner =
350  fD*cosC13D*(1-fA*fcos_2th13)/fC13 -
351  fA*sinC13D*(fcos_2th13-fA)/(fC13*fC13);
352 
353  double p2 = 2*fsin_th12*fsin_th12*fsin_sq_2th13*sinC13D/(fC13*fC13)*p2Inner*falpha;
354 
355  // p1 + p2 is the complete contribution for this expansion
356 
357  // Now for the expansion in orders of sin(th13) (good to all order alpha)
358 
359  double pa1 = 1.0, pa2 = 0.0;
360  if (fabs(falpha)>1E-10) {
361  // leading order term
362  pa1 = 1 - fsin_sq_2th12*sinaC12D*sinaC12D/(fC12*fC12);
363  }
364  // pa1 is the complete contribution from this expansion, there is no order s13^1 term
365 
366  // Now we need to add the two expansions and subtract off the terms that are
367  // in both (falpha^1, s13^1)
368 
369  double repeated = 1;
370 
371  // Calculate the total probability
372  double totalP = p1+p2 + (pa1+pa2) - repeated;
373  return totalP;
374  }
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
double falpha
Definition: OscCalc.h:111
double fD
Definition: OscCalc.h:116
void UpdateBasic()
Definition: OscCalc.cxx:119
double fC13
Definition: OscCalc.h:118
Float_t E
Definition: plot.C:20
double fsin_th12
Definition: OscCalc.h:87
void UpdateEDep(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:166
double fsin_sq_2th12
Definition: OscCalc.h:105
double fA
Definition: OscCalc.h:115
double fcos_2th13
Definition: OscCalc.h:97
double fsin_sq_2th13
Definition: OscCalc.h:106
T sin(T number)
Definition: d0nt_math.hpp:132
double fC12
Definition: OscCalc.h:117
T cos(T number)
Definition: d0nt_math.hpp:78
double osc::OscCalc::P_internal_me ( double  E,
bool  antinu,
bool  fliptime 
)
private

Definition at line 192 of file OscCalc.cxx.

References std::cos(), fA, stan::math::fabs(), falpha, fC12, fC13, fcos_2th12, fcos_2th13, fcos_dCPproxy, fcos_th12, fcos_th23, fD, fdCPproxy, fsin_2th12, fsin_2th23, fsin_dCPproxy, fsin_sq_2th12, fsin_sq_2th13, fsin_sq_th12, fsin_sq_th23, fsin_th13, plot_validation_datamc::p1, plot_validation_datamc::p2, make_associated_cosmic_defs::p3, std::sin(), getGoodRuns4SAM::t1, t2, UpdateBasic(), and UpdateEDep().

Referenced by GetParamsHash(), P_em(), and P_me().

193  {
194  UpdateBasic();
195  UpdateEDep(E,antinu,fliptime);
196 
197  double cosC13D = cos(fC13*fD);
198  double sinC13D = sin(fC13*fD);
199  double sin1pAD = sin((fA+1)*fD);
200  double cos1pAD = cos((fA+1)*fD);
201  double sinAD = sin(fA*fD);
202  double sinAm1D = sin((fA-1)*fD);
203  double cosdpD = cos(fdCPproxy+fD);
204  double sinApam2D = sin((fA+falpha-2)*fD);
205  double cosApam2D = cos((fA+falpha-2)*fD);
206  double cosaC12D = cos(falpha*fC12*fD);
207  double sinaC12D = sin(falpha*fC12*fD);
208 
209  // This is coming straight from the MINOS NueAna package...
210 
211  // First we calculate the terms for the alpha expansion (good to all orders in th13)
212 
213  // Leading order term
214  double p1 = fsin_sq_th23*fsin_sq_2th13*sinC13D*sinC13D/(fC13*fC13);
215 
216  // Terms that appear at order alpha
217  double p2Inner =
218  fD*cosC13D*(1-fA*fcos_2th13)/fC13 -
219  fA*sinC13D*(fcos_2th13-fA)/(fC13*fC13);
220 
221  double p2 = -2*fsin_sq_th12*fsin_sq_th23*fsin_sq_2th13*sinC13D/(fC13*fC13)*p2Inner*falpha;
222 
223  double p3Inner =
224  -fsin_dCPproxy*(cosC13D - cos1pAD)*fC13
225  + fcos_dCPproxy*(fC13*sin1pAD - (1-fA*fcos_2th13)*sinC13D);
226 
227  double p3 = fsin_2th12*fsin_2th23*fsin_th13*sinC13D/(fA*fC13*fC13)*p3Inner*falpha;
228 
229  // p1 + p2 + p3 is the complete contribution for this expansion
230 
231  // Now for the expansion in orders of sin(th13) (good to all order alpha)
232 
233  double pa1 = 0.0, pa2 = 0.0;
234  if (fabs(falpha)>1E-10) {
235  // leading order term
236  pa1 = fcos_th23*fcos_th23*fsin_sq_2th12*sinaC12D*sinaC12D/(fC12*fC12);
237 
238  // the first order in s13 term
239  double t1 = (fcos_2th12 - fA/falpha)/fC12
241  double t2 = -fcos_dCPproxy*(sinApam2D-sinaC12D*t1);
242  double t3 = -(cosaC12D-cosApam2D)*fsin_dCPproxy;
243  double denom = (1-fA-falpha+fA*falpha*fcos_th12*fcos_th12)*fC12;
244  double t4 = fsin_2th12*fsin_2th23*(1-falpha)*sinaC12D/denom;
245 
246  pa2 = t4*(t3+t2)*fsin_th13;
247  }
248  // pa1+pa2 is the complete contribution from this expansion
249 
250  // Now we need to add the two expansions and subtract off the terms that are
251  // in both (falpha^1, s13^1)
252 
253  double t1 = sinAD*cosdpD*sinAm1D/(fA*(fA-1));
254  double repeated = 2*falpha*fsin_2th12*fsin_2th23*fsin_th13*t1;
255 
256  // Calculate the total probability
257  double totalP = p1+p2+p3 + (pa1+pa2) - repeated;
258  return totalP;
259  }
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
double fsin_sq_th23
Definition: OscCalc.h:101
double falpha
Definition: OscCalc.h:111
double fcos_dCPproxy
Definition: OscCalc.h:121
double fD
Definition: OscCalc.h:116
double fsin_sq_th12
Definition: OscCalc.h:99
void UpdateBasic()
Definition: OscCalc.cxx:119
double fcos_th23
Definition: OscCalc.h:92
double fcos_th12
Definition: OscCalc.h:90
double fcos_2th12
Definition: OscCalc.h:96
double fC13
Definition: OscCalc.h:118
Float_t E
Definition: plot.C:20
void UpdateEDep(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:166
double fsin_2th12
Definition: OscCalc.h:93
double fsin_sq_2th12
Definition: OscCalc.h:105
double t2
double fsin_2th23
Definition: OscCalc.h:95
double fA
Definition: OscCalc.h:115
double fdCPproxy
Definition: OscCalc.h:119
double fcos_2th13
Definition: OscCalc.h:97
double fsin_sq_2th13
Definition: OscCalc.h:106
T sin(T number)
Definition: d0nt_math.hpp:132
double fC12
Definition: OscCalc.h:117
T cos(T number)
Definition: d0nt_math.hpp:78
double fsin_dCPproxy
Definition: OscCalc.h:120
double fsin_th13
Definition: OscCalc.h:88
double osc::OscCalc::P_internal_mt ( double  E,
bool  antinu,
bool  fliptime 
)
private

Definition at line 377 of file OscCalc.cxx.

References std::cos(), fA, falpha, fC12, fC13, fcos_2th12, fcos_2th13, fcos_2th23, fcos_dCPproxy, fcos_th12, fcos_th13, fD, fsin_2th12, fsin_2th23, fsin_dCPproxy, fsin_sq_2th12, fsin_sq_2th13, fsin_sq_2th23, fsin_th12, fsin_th13, std::sin(), getGoodRuns4SAM::t0, getGoodRuns4SAM::t1, t2, UpdateBasic(), and UpdateEDep().

Referenced by GetParamsHash(), P_mt(), and P_tm().

378  {
379  UpdateBasic();
380  UpdateEDep(E,antinu,fliptime);
381 
382  double cosC13D = cos(fC13*fD);
383  double sinC13D = sin(fC13*fD);
384  double sin1pAD = sin((fA+1)*fD);
385  double cos1pAD = cos((fA+1)*fD);
386  double sinAD = sin(fA*fD);
387  double sinAm1D = sin((fA-1)*fD);
388  double cosAm1D = cos((fA-1)*fD);
389  double sinApam2D = sin((fA+falpha-2)*fD);
390  double cosApam2D = cos((fA+falpha-2)*fD);
391  double cosaC12D = cos(falpha*fC12*fD);
392  double sinaC12D = sin(falpha*fC12*fD);
393  double sin1pAmCD = sin(0.5*(fA+1-fC13)*fD);
394  double sin1pApCD = sin(0.5*(fA+1+fC13)*fD);
395  double sinD = sin(fD);
396  double sin2D = sin(2*fD);
397  double cosaC12pApam2D = cos((falpha*fC12+fA+falpha-2)*fD);
398 
399  // This is coming straight from the MINOS NueAna package...
400 
401  // First we calculate the terms for the alpha expansion (good to all orders in th13)
402 
403  // Leading order term
404  double pmt_0 = 0.5*fsin_sq_2th23;
405  pmt_0 *= (1 - (fcos_2th13-fA)/fC13)*sin1pAmCD*sin1pAmCD
406  + (1 + (fcos_2th13-fA)/fC13)*sin1pApCD*sin1pApCD
407  - 0.5*fsin_sq_2th13*sinC13D*sinC13D/(fC13*fC13);
408 
409  // Terms that appear at order alpha
410  double t0, t1, t2, t3;
412  *(1+2*fsin_th13*fsin_th13*fA+fA*fA)/(fC13*fC13))*cosC13D*sin1pAD*2;
416  t1 *= sinC13D*cos1pAD/fC13;
417 
419  t2 *= fA/fD*sin1pAD+fA/fD*(fcos_2th13-fA)/fC13*sinC13D
420  - (1-fA*fcos_2th13)*cosC13D;
421 
422  double pmt_1 = -0.5*fsin_sq_2th23*fD*(t0+t1+t2);
423 
424  t0 = cosC13D-cos1pAD;
425  t1 = 2*fcos_th13*fcos_th13*fsin_dCPproxy*sinC13D/fC13*t0;
426  t2 = -fcos_2th23*fcos_dCPproxy*(1+fA)*t0*t0;
427 
428  t3 = fcos_2th23*fcos_dCPproxy*(sin1pAD+(fcos_2th13-fA)/fC13*sinC13D);
429  t3 *= (1+2*fsin_th13*fsin_th13*fA + fA*fA)*sinC13D/fC13 - (1+fA)*sin1pAD;
430 
432  pmt_1 *= falpha;
433 
434  // pmt_0 + pmt_1 is the complete contribution for this expansion
435 
436  // Now for the expansion in orders of sin(th13) (good to all order alpha)
437 
438  // Leading order term
439  double pmt_a0 = 0.5*fsin_sq_2th23;
440 
441  pmt_a0 *= 1 - 0.5*fsin_sq_2th12*sinaC12D*sinaC12D/(fC12*fC12)
442  - cosaC12pApam2D
443  - (1 - (fcos_2th12 - fA/falpha)/fC12)*sinaC12D*sinApam2D;
444 
445  double denom = (1-fA-falpha+fA*falpha*fcos_th12*fcos_th12)*fC12;
446 
447  t0 = (cosaC12D-cosApam2D)*(cosaC12D-cosApam2D);
448  t1 = (fcos_2th12 - fA/falpha)/fC12*sinaC12D+sinApam2D;
449  t2 = ((fcos_2th12 - fA/falpha)/fC12+2*(1-falpha)/(falpha*fA*fC12))*sinaC12D + sinApam2D;
450 
451  t3 = (falpha*fA*fC12)/2*fcos_2th23*fcos_dCPproxy*(t0 + t1*t2);
452  t3 += fsin_dCPproxy*(1-falpha)*(cosaC12D-cosApam2D)*sinaC12D;
453 
454  double pmt_a1 = fsin_th13*fsin_2th12*fsin_2th23/denom*t3;
455 
456  // pmt_a1+pmt_a2 is the complete contribution from this expansion
457 
458  // Now we need to add the two expansions and subtract off the terms that are
459  // in both (falpha^1, s13^1)
460 
461  t1 = fsin_dCPproxy*sinD*sinAD*sinAm1D/(fA*(fA-1));
462  t2 = -1/(fA-1)*fcos_dCPproxy*sinD*(fA*sinD-sinAD*cosAm1D/fA)*fcos_2th23/denom;
463 
465 
466  t1 = fsin_sq_2th23*sinD*sinD
468 
469  double repeated = t0+t1;
470 
471  // Calculate the total probability
472  double totalP = pmt_0 + pmt_1 + pmt_a0 + pmt_a1 - repeated;
473 
474  return totalP;
475  }
double falpha
Definition: OscCalc.h:111
double fcos_dCPproxy
Definition: OscCalc.h:121
double fD
Definition: OscCalc.h:116
double fcos_th13
Definition: OscCalc.h:91
void UpdateBasic()
Definition: OscCalc.cxx:119
double fsin_sq_2th23
Definition: OscCalc.h:107
double fcos_th12
Definition: OscCalc.h:90
double fcos_2th12
Definition: OscCalc.h:96
double fC13
Definition: OscCalc.h:118
Float_t E
Definition: plot.C:20
double fsin_th12
Definition: OscCalc.h:87
void UpdateEDep(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:166
double fsin_2th12
Definition: OscCalc.h:93
double fsin_sq_2th12
Definition: OscCalc.h:105
double t2
double fsin_2th23
Definition: OscCalc.h:95
double fA
Definition: OscCalc.h:115
double fcos_2th13
Definition: OscCalc.h:97
double fsin_sq_2th13
Definition: OscCalc.h:106
T sin(T number)
Definition: d0nt_math.hpp:132
double fC12
Definition: OscCalc.h:117
T cos(T number)
Definition: d0nt_math.hpp:78
double fsin_dCPproxy
Definition: OscCalc.h:120
double fsin_th13
Definition: OscCalc.h:88
double fcos_2th23
Definition: OscCalc.h:98
double osc::OscCalc::P_internal_te ( double  E,
bool  antinu,
bool  fliptime 
)
private

Definition at line 262 of file OscCalc.cxx.

References std::cos(), fA, stan::math::fabs(), falpha, fC12, fC13, fcos_2th12, fcos_2th13, fcos_dCPproxy, fcos_sq_th23, fcos_th12, fD, fdCPproxy, fsin_2th12, fsin_2th23, fsin_dCPproxy, fsin_sq_2th12, fsin_sq_2th13, fsin_sq_th12, fsin_th13, fsin_th23, plot_validation_datamc::p1, plot_validation_datamc::p2, make_associated_cosmic_defs::p3, std::sin(), getGoodRuns4SAM::t1, t2, UpdateBasic(), and UpdateEDep().

Referenced by GetParamsHash(), P_et(), and P_te().

263  {
264  UpdateBasic();
265  UpdateEDep(E,antinu,fliptime);
266 
267  double cosC13D = cos(fC13*fD);
268  double sinC13D = sin(fC13*fD);
269  double sin1pAD = sin((fA+1)*fD);
270  double cos1pAD = cos((fA+1)*fD);
271  double sinAD = sin(fA*fD);
272  double sinAm1D = sin((fA-1)*fD);
273  double cosdpD = cos(fdCPproxy+fD);
274  double sinApam2D = sin((fA+falpha-2)*fD);
275  double cosApam2D = cos((fA+falpha-2)*fD);
276  double cosaC12D = cos(falpha*fC12*fD);
277  double sinaC12D = sin(falpha*fC12*fD);
278 
279  // This is coming straight from the MINOS NueAna package...
280 
281  // First we calculate the terms for the alpha expansion (good to all orders in th13)
282 
283  // Leading order term
284  double p1 = fcos_sq_th23*fsin_sq_2th13*sinC13D*sinC13D/(fC13*fC13);
285 
286  // Terms that appear at order alpha
287  double p2Inner =
288  fD*cosC13D*(1-fA*fcos_2th13)/fC13 -
289  fA*sinC13D*(fcos_2th13-fA)/(fC13*fC13);
290 
291  double p2 = -2*fsin_sq_th12*fcos_sq_th23*fsin_sq_2th13*sinC13D/(fC13*fC13)*p2Inner*falpha;
292 
293  double p3Inner =
294  -fsin_dCPproxy*(cosC13D - cos1pAD)*fC13
295  + fcos_dCPproxy*(fC13*sin1pAD - (1-fA*fcos_2th13)*sinC13D);
296 
297  double p3 = fsin_2th12*(-fsin_2th23)*fsin_th13*sinC13D/(fA*fC13*fC13)*p3Inner*falpha;
298 
299  // p1 + p2 + p3 is the complete contribution for this expansion
300 
301  // Now for the expansion in orders of sin(th13) (good to all order falpha)
302 
303  double pa1 = 0.0, pa2 = 0.0;
304  if (fabs(falpha)>1E-10) {
305  // leading order term
306  pa1 = fsin_th23*fsin_th23*fsin_sq_2th12*sinaC12D*sinaC12D/(fC12*fC12);
307 
308  // the first order in s13 term
309  double t1 = (fcos_2th12 - fA/falpha)/fC12
310  - falpha*fA*fC12*fsin_sq_2th12/(2*(1-falpha)*fC12*fC12);
311  double t2 = -fcos_dCPproxy*(sinApam2D-sinaC12D*t1);
312  double t3 = -(cosaC12D-cosApam2D)*fsin_dCPproxy;
313  double denom = (1-fA-falpha+fA*falpha*fcos_th12*fcos_th12)*fC12;
314  double t4 = fsin_2th12*(-fsin_2th23)*(1-falpha)*sinaC12D/denom;
315 
316  pa2 = t4*(t3+t2)*fsin_th13;
317  }
318  // pa1+pa2 is the complete contribution from this expansion
319 
320  // Now we need to add the two expansions and subtract off the terms that are
321  // in both (falpha^1, s13^1)
322 
323  double t1 = sinAD*cosdpD*sinAm1D/(fA*(fA-1));
324  double repeated = 2*falpha*fsin_2th12*(-fsin_2th23)*fsin_th13*t1;
325 
326  // Calculate the total probability
327  double totalP = p1+p2+p3 + (pa1+pa2) - repeated;
328  return totalP;
329  }
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
double falpha
Definition: OscCalc.h:111
double fcos_sq_th23
Definition: OscCalc.h:104
double fcos_dCPproxy
Definition: OscCalc.h:121
double fD
Definition: OscCalc.h:116
double fsin_sq_th12
Definition: OscCalc.h:99
double fsin_th23
Definition: OscCalc.h:89
void UpdateBasic()
Definition: OscCalc.cxx:119
double fcos_th12
Definition: OscCalc.h:90
double fcos_2th12
Definition: OscCalc.h:96
double fC13
Definition: OscCalc.h:118
Float_t E
Definition: plot.C:20
void UpdateEDep(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:166
double fsin_2th12
Definition: OscCalc.h:93
double fsin_sq_2th12
Definition: OscCalc.h:105
double t2
double fsin_2th23
Definition: OscCalc.h:95
double fA
Definition: OscCalc.h:115
double fdCPproxy
Definition: OscCalc.h:119
double fcos_2th13
Definition: OscCalc.h:97
double fsin_sq_2th13
Definition: OscCalc.h:106
T sin(T number)
Definition: d0nt_math.hpp:132
double fC12
Definition: OscCalc.h:117
T cos(T number)
Definition: d0nt_math.hpp:78
double fsin_dCPproxy
Definition: OscCalc.h:120
double fsin_th13
Definition: OscCalc.h:88
double osc::OscCalc::P_me ( double  E,
bool  antinu = false 
)

Definition at line 73 of file OscCalc.cxx.

References P_internal_me().

Referenced by P(), P_mm(), and P_wrapper().

73 { return P_internal_me(E,antinu,0); }
double P_internal_me(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:192
Float_t E
Definition: plot.C:20
double osc::OscCalc::P_mm ( double  E,
bool  antinu = false 
)

Definition at line 74 of file OscCalc.cxx.

References P_me(), and P_mt().

Referenced by P(), and P_wrapper().

74 { return 1-P_me(E,antinu)-P_mt(E,antinu); }
double P_mt(double E, bool antinu=false)
Definition: OscCalc.cxx:75
double P_me(double E, bool antinu=false)
Definition: OscCalc.cxx:73
Float_t E
Definition: plot.C:20
double osc::OscCalc::P_mt ( double  E,
bool  antinu = false 
)

Definition at line 75 of file OscCalc.cxx.

References P_internal_mt().

Referenced by P(), P_mm(), and P_wrapper().

75 { return P_internal_mt(E,antinu,0); }
Float_t E
Definition: plot.C:20
double P_internal_mt(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:377
double osc::OscCalc::P_null ( double  ,
bool   
)
inline

Definition at line 42 of file OscCalc.h.

Referenced by P_wrapper().

42 { return 0; }
double osc::OscCalc::P_te ( double  E,
bool  antinu = false 
)

Definition at line 77 of file OscCalc.cxx.

References P_internal_te().

Referenced by P(), P_tt(), and P_wrapper().

77 { return P_internal_te(E,antinu,0); }
double P_internal_te(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:262
Float_t E
Definition: plot.C:20
double osc::OscCalc::P_tm ( double  E,
bool  antinu = false 
)

Definition at line 78 of file OscCalc.cxx.

References P_internal_mt().

Referenced by P(), P_tt(), and P_wrapper().

78 { return P_internal_mt(E,antinu,1); }
Float_t E
Definition: plot.C:20
double P_internal_mt(double E, bool antinu, bool fliptime)
Definition: OscCalc.cxx:377
double osc::OscCalc::P_tt ( double  E,
bool  antinu = false 
)

Definition at line 79 of file OscCalc.cxx.

References P_te(), and P_tm().

Referenced by P(), and P_wrapper().

79 { return 1 - P_te(E,antinu) - P_tm(E,antinu); }
double P_tm(double E, bool antinu=false)
Definition: OscCalc.cxx:78
double P_te(double E, bool antinu=false)
Definition: OscCalc.cxx:77
Float_t E
Definition: plot.C:20
double osc::OscCalc::P_wrapper ( double *  x,
double *  p 
)

Definition at line 92 of file OscCalc.cxx.

References makeTrainCVSamples::int, P_ee(), P_em(), P_et(), P_me(), P_mm(), P_mt(), P_null(), P_te(), P_tm(), and P_tt().

Referenced by GetTF1(), and SetdCP().

93  {
94  // function for use by TF1
95  int flavBefore = int(p[0]);
96  int flavAfter = int(p[1]);
97  bool antinu = (flavBefore<0&&flavAfter<0);
98  if (antinu) {
99  flavBefore *= -1;
100  flavAfter *= -1;
101  }
102 
103  double (osc::OscCalc::*P_xx)(double,bool);
104  if (flavBefore==12&&flavAfter==12) P_xx = &osc::OscCalc::P_ee;
105  else if (flavBefore==12&&flavAfter==14) P_xx = &osc::OscCalc::P_em;
106  else if (flavBefore==12&&flavAfter==16) P_xx = &osc::OscCalc::P_et;
107  else if (flavBefore==14&&flavAfter==12) P_xx = &osc::OscCalc::P_me;
108  else if (flavBefore==14&&flavAfter==14) P_xx = &osc::OscCalc::P_mm;
109  else if (flavBefore==14&&flavAfter==16) P_xx = &osc::OscCalc::P_mt;
110  else if (flavBefore==16&&flavAfter==12) P_xx = &osc::OscCalc::P_te;
111  else if (flavBefore==16&&flavAfter==14) P_xx = &osc::OscCalc::P_tm;
112  else if (flavBefore==16&&flavAfter==16) P_xx = &osc::OscCalc::P_tt;
113  else P_xx = &osc::OscCalc::P_null;
114 
115  return (this->*P_xx)(x[0],antinu);
116  }
double P_mt(double E, bool antinu=false)
Definition: OscCalc.cxx:75
double P_tm(double E, bool antinu=false)
Definition: OscCalc.cxx:78
double P_ee(double E, bool antinu=false)
Definition: OscCalc.cxx:69
double P_te(double E, bool antinu=false)
Definition: OscCalc.cxx:77
const char * p
Definition: xmltok.h:285
double P_tt(double E, bool antinu=false)
Definition: OscCalc.cxx:79
double P_me(double E, bool antinu=false)
Definition: OscCalc.cxx:73
double P_et(double E, bool antinu=false)
Definition: OscCalc.cxx:71
double P_null(double, bool)
Definition: OscCalc.h:42
double P_em(double E, bool antinu=false)
Definition: OscCalc.cxx:70
double P_mm(double E, bool antinu=false)
Definition: OscCalc.cxx:74
void osc::OscCalc::SetdCP ( const double &  dCP)
inlineoverride

Definition at line 51 of file OscCalc.h.

References dCP, osc::_IOscCalcAdjustable< T >::fdCP, fUpdated, GetTF1(), P_wrapper(), and submit_syst::x.

51 { fdCP = dCP; fUpdated = false; }
double dCP
bool fUpdated
Definition: OscCalc.h:83
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetdCP ( const T dCP)
pure virtualinherited
void osc::OscCalc::SetDmsq21 ( const double &  dmsq21)
inlineoverride

Definition at line 46 of file OscCalc.h.

References osc::_IOscCalcAdjustable< T >::fDmsq21, and fUpdated.

46 { fDmsq21 = dmsq21; fUpdated = false; }
bool fUpdated
Definition: OscCalc.h:83
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetDmsq21 ( const T dmsq21)
pure virtualinherited
void osc::OscCalc::SetDmsq32 ( const double &  dmsq32)
inlineoverride

Definition at line 47 of file OscCalc.h.

References dmsq32, osc::_IOscCalcAdjustable< T >::fDmsq32, and fUpdated.

47 { fDmsq32 = dmsq32; fUpdated = false; }
bool fUpdated
Definition: OscCalc.h:83
double dmsq32
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetDmsq32 ( const T dmsq32)
pure virtualinherited

Implemented in osc::analytic::_OscCalc< T >, osc::OscCalcPMNSOptEigen, osc::OscCalcCPT, osc::OscCalcSterile, osc::_OscCalcDMP< T >, osc::_OscCalcPMNSOpt< T >, osc::_OscCalcPMNS< T >, and osc::OscCalcPMNS_NSI.

Referenced by CAF_makeCAFSensitivities_for_FNEX(), CalcRWithSystsNus17(), ComparePredictions(), osc::CopyParams(), default_calc(), demoFitContours(), demoFitSlices(), demoPlotSystBands(), genie_contours(), getContProf(), getContProf_Sensitivity(), getHists_FNEX(), joint_fit_2017_contours(), joint_fit_2017_slices(), joint_fit_2018_contours(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_contours(), joint_fit_2019_slices(), joint_fit_future_contour_univ(), jointsensitivity(), ana::LoadFrom< osc::IOscCalcAdjustable >(), make_extrap_figure(), make_extrap_figure_hists(), make_prediction_extrap(), make_prediction_noextrap(), make_prediction_tables(), make_surfprof(), make_surfprof_sensitivity(), MakeCAFSensitivities_for_FNEX(), makePredTables(), monoprob(), plot_datamcpred(), plot_nue_xsec_pred(), plot_oscprob(), plot_predictions(), plotDataPred(), plotDataPred_SplitCanvas(), Plotting_DataAndPrediction(), PredRatioToNom(), resetCalc(), ResetCalc(), mcmc_ana::ResetCalculator(), test::ResetCalculator(), mcmc::ResetCalculator(), ana::ResetOscCalcToDefault(), ana::ResetOscCalcToDefaultIH(), ResetOscCalcToMyDefault(), ana::ResetOscCalcToTemplate(), RestartCalculator(), run_joint_fit_2020_bestfit(), run_joint_fit_2020_contours(), run_joint_fit_2020_slices(), saveFDMCHists(), sensitivity2018(), sensitivity2020(), osc::OscCalcCPT::SetDmsq32(), SetHierarchy(), SetOscillationParameters(), cmf::ShifterAndWeighter::SetOscillationVals(), ana::FitDmSq32::SetValue(), ana::FitDmSq32Scaled::SetValue(), ana::FitDmSq32NormalHierarchy::SetValue(), ana::FitDmSq32ScaledNH::SetValue(), ana::FitDmSq32ScaledIH::SetValue(), ana::FitDmSq32InvertedHierarchy::SetValue(), systematics_extrap_comp_from_pred_interp(), systematics_summary_from_pred_interp(), Tutorial2019FitContours(), and Tutorial2019FitSlices().

void osc::OscCalc::SetL ( double  L)
inlineoverridevirtual

Implements osc::_IOscCalcAdjustable< T >.

Definition at line 44 of file OscCalc.h.

References osc::_IOscCalcAdjustable< T >::fL, fUpdated, and CLHEP::L.

44 { fL = L; fUpdated = false; }
static constexpr double L
bool fUpdated
Definition: OscCalc.h:83
void osc::OscCalc::SetRho ( double  rho)
inlineoverridevirtual

Implements osc::_IOscCalcAdjustable< T >.

Definition at line 45 of file OscCalc.h.

References e, osc::_IOscCalcAdjustable< T >::fRho, and fUpdated.

45 { fRho = rho ? rho : 1e-10; fUpdated = false;}
bool fUpdated
Definition: OscCalc.h:83
Float_t e
Definition: plot.C:35
void osc::OscCalc::SetTh12 ( const double &  th12)
inlineoverride

Definition at line 48 of file OscCalc.h.

References osc::_IOscCalcAdjustable< T >::fTh12, fUpdated, and th12.

48 { fTh12 = th12; fUpdated = false; }
double th12
Definition: runWimpSim.h:98
bool fUpdated
Definition: OscCalc.h:83
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetTh12 ( const T th12)
pure virtualinherited
void osc::OscCalc::SetTh13 ( const double &  th13)
inlineoverride

Definition at line 49 of file OscCalc.h.

References osc::_IOscCalcAdjustable< T >::fTh13, fUpdated, and th13.

49 { fTh13 = th13; fUpdated = false; }
bool fUpdated
Definition: OscCalc.h:83
double th13
Definition: runWimpSim.h:98
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetTh13 ( const T th13)
pure virtualinherited
void osc::OscCalc::SetTh23 ( const double &  th23)
inlineoverride

Definition at line 50 of file OscCalc.h.

References osc::_IOscCalcAdjustable< T >::fTh23, fUpdated, and th23.

50 { fTh23 = th23; fUpdated = false; }
double th23
Definition: runWimpSim.h:98
bool fUpdated
Definition: OscCalc.h:83
template<typename T>
virtual void osc::_IOscCalcAdjustable< T >::SetTh23 ( const T th23)
pure virtualinherited

Implemented in osc::analytic::_OscCalc< T >, osc::OscCalcPMNSOptEigen, osc::OscCalcCPT, osc::OscCalcSterile, osc::_OscCalcDMP< T >, osc::_OscCalcPMNSOpt< T >, osc::_OscCalcPMNS< T >, and osc::OscCalcPMNS_NSI.

Referenced by CalcRWithSystsNus17(), ComparePredictions(), osc::CopyParams(), default_calc(), demoPlotSystBands(), genie_contours(), getContProf(), getContProf_Sensitivity(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_slices(), jointsensitivity(), ana::LoadFrom< osc::IOscCalcAdjustable >(), make_extrap_figure(), make_extrap_figure_hists(), make_prediction_extrap(), make_prediction_noextrap(), make_prediction_tables(), make_surfprof(), make_surfprof_sensitivity(), makePredTables(), monoprob(), plot_datamcpred(), plot_nue_xsec_pred(), plot_oscprob(), plot_predictions(), plotDataPred(), plotDataPred_SplitCanvas(), Plotting_DataAndPrediction(), PredRatioToNom(), resetCalc(), ResetCalc(), mcmc_ana::ResetCalculator(), test::ResetCalculator(), mcmc::ResetCalculator(), ana::ResetOscCalcToDefault(), ResetOscCalcToMyDefault(), ana::ResetOscCalcToTemplate(), RestartCalculator(), run_joint_fit_2020_bestfit(), saveFDMCHists(), sensitivity2018(), sensitivity2020(), SetOscillationParameters(), cmf::ShifterAndWeighter::SetOscillationVals(), osc::OscCalcCPT::SetTh23(), ana::FitSinSqTheta23::SetValue(), FitSinSqTheta23UO::SetValue(), ana::FitSinSqTheta23UpperOctant::SetValue(), FitSinSqTheta23LO::SetValue(), ana::FitSinSqTheta23LowerOctant::SetValue(), ana::FitSinSq2Theta23::SetValue(), FitSinSqTheta23MaxMix::SetValue(), FitSinSqTheta23LowerOctant::SetValue(), FitSinSqTheta23UpperOctant::SetValue(), systematics_extrap_comp_from_pred_interp(), and systematics_summary_from_pred_interp().

void osc::OscCalc::UpdateBasic ( )
private

Definition at line 119 of file OscCalc.cxx.

References om::cerr, std::cos(), allTimeWatchdog::endl, falpha, fcos_2th12, fcos_2th13, fcos_2th23, fcos_sq_2th12, fcos_sq_2th13, fcos_sq_2th23, fcos_sq_th12, fcos_sq_th13, fcos_sq_th23, fcos_th12, fcos_th13, fcos_th23, osc::_IOscCalcAdjustable< T >::fDmsq21, fDmsq31, osc::_IOscCalcAdjustable< T >::fDmsq32, osc::_IOscCalcAdjustable< T >::fRho, fsin_2th12, fsin_2th13, fsin_2th23, fsin_sq_2th12, fsin_sq_2th13, fsin_sq_2th23, fsin_sq_th12, fsin_sq_th13, fsin_sq_th23, fsin_th12, fsin_th13, fsin_th23, osc::_IOscCalcAdjustable< T >::fTh12, osc::_IOscCalcAdjustable< T >::fTh13, osc::_IOscCalcAdjustable< T >::fTh23, fUpdated, fV, Na, and std::sin().

Referenced by GetParamsHash(), P_internal_ee(), P_internal_me(), P_internal_mt(), and P_internal_te().

120  {
121  if (fUpdated) return;
122 
123  fDmsq31 = fDmsq21 + fDmsq32;
124  if (fDmsq31!=0) {
126  }
127  else {
128  std::cerr << "OscCalc::UpdateBasic() -- fDmsq31 should never be zero, but it is" << std::endl;
129  falpha = 0;
130  }
131  fsin_th12 = sin(fTh12);
132  fsin_th13 = sin(fTh13);
133  fsin_th23 = sin(fTh23);
134  fcos_th12 = cos(fTh12);
135  fcos_th13 = cos(fTh13);
136  fcos_th23 = cos(fTh23);
137  fsin_2th12 = sin(2*fTh12);
138  fsin_2th13 = sin(2*fTh13);
139  fsin_2th23 = sin(2*fTh23);
140  fcos_2th12 = cos(2*fTh12);
141  fcos_2th13 = cos(2*fTh13);
142  fcos_2th23 = cos(2*fTh23);
155 
156  static const double ZperA = 0.5; // e- per nucleon
157  static const double G_F = 1.16637E-23; // eV^-2
158  static const double hbar_c_eV_cm = 1.97326938E-5; // eV-cm
159 
160  fV = TMath::Sqrt2()*G_F*fRho*ZperA*TMath::Na()*hbar_c_eV_cm*hbar_c_eV_cm*hbar_c_eV_cm;
161 
162  fUpdated = true;
163  }
double fsin_2th13
Definition: OscCalc.h:94
double fcos_sq_2th13
Definition: OscCalc.h:109
const int Na
double fsin_sq_th23
Definition: OscCalc.h:101
double falpha
Definition: OscCalc.h:111
double fsin_sq_th13
Definition: OscCalc.h:100
double fcos_sq_th23
Definition: OscCalc.h:104
double fcos_sq_th13
Definition: OscCalc.h:103
double fcos_sq_th12
Definition: OscCalc.h:102
double fsin_sq_th12
Definition: OscCalc.h:99
double fcos_th13
Definition: OscCalc.h:91
OStream cerr
Definition: OStream.cxx:7
double fsin_th23
Definition: OscCalc.h:89
double fcos_th23
Definition: OscCalc.h:92
double fsin_sq_2th23
Definition: OscCalc.h:107
double fcos_sq_2th12
Definition: OscCalc.h:108
double fcos_th12
Definition: OscCalc.h:90
double fcos_2th12
Definition: OscCalc.h:96
double fsin_th12
Definition: OscCalc.h:87
double fsin_2th12
Definition: OscCalc.h:93
double fsin_sq_2th12
Definition: OscCalc.h:105
double fsin_2th23
Definition: OscCalc.h:95
double fcos_2th13
Definition: OscCalc.h:97
bool fUpdated
Definition: OscCalc.h:83
double fDmsq31
Definition: OscCalc.h:86
double fsin_sq_2th13
Definition: OscCalc.h:106
T sin(T number)
Definition: d0nt_math.hpp:132
T cos(T number)
Definition: d0nt_math.hpp:78
double fsin_th13
Definition: OscCalc.h:88
double fV
Definition: OscCalc.h:112
double fcos_2th23
Definition: OscCalc.h:98
double fcos_sq_2th23
Definition: OscCalc.h:110
void osc::OscCalc::UpdateEDep ( double  E,
bool  antinu,
bool  fliptime 
)
private

Definition at line 166 of file OscCalc.cxx.

References om::cerr, std::cos(), allTimeWatchdog::endl, fA, falpha, fC12, fC13, fcos_2th12, fcos_2th13, fcos_dCPproxy, fD, osc::_IOscCalcAdjustable< T >::fdCP, fdCPproxy, fDmsq31, osc::_IOscCalcAdjustable< T >::fL, fsin_dCPproxy, fsin_sq_2th12, fsin_sq_2th13, fV, std::sin(), ana::Sqrt(), and confusionMatrixTree::t.

Referenced by GetParamsHash(), P_internal_ee(), P_internal_me(), P_internal_mt(), and P_internal_te().

167  {
168  static const double hbar_c_eV_km = 1.97326938E-10; // eV-km
169  static const double eVPerGeV = 1E9;
170 
171  int s = (antinu)?-1:1;
172  int t = (fliptime)?-1:1;
173 
174  fA = s*2*fV*E*eVPerGeV/fDmsq31;
175  fD = fDmsq31*fL/(4*E*eVPerGeV*hbar_c_eV_km);
176 
177  fdCPproxy = s*t*fdCP;
180 
181  if (falpha!=0) {
183  }
184  else {
185  std::cerr << "OscCalc::UpdateEDep() -- falpha should never be zero, but it is" << std::endl;
186  fC12 = 1;
187  }
189  }
double falpha
Definition: OscCalc.h:111
double fcos_dCPproxy
Definition: OscCalc.h:121
double fD
Definition: OscCalc.h:116
OStream cerr
Definition: OStream.cxx:7
const XML_Char * s
Definition: expat.h:262
double fcos_2th12
Definition: OscCalc.h:96
double fC13
Definition: OscCalc.h:118
Float_t E
Definition: plot.C:20
double fsin_sq_2th12
Definition: OscCalc.h:105
double fA
Definition: OscCalc.h:115
double fdCPproxy
Definition: OscCalc.h:119
double fcos_2th13
Definition: OscCalc.h:97
double fDmsq31
Definition: OscCalc.h:86
double fsin_sq_2th13
Definition: OscCalc.h:106
T sin(T number)
Definition: d0nt_math.hpp:132
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
double fC12
Definition: OscCalc.h:117
T cos(T number)
Definition: d0nt_math.hpp:78
double fsin_dCPproxy
Definition: OscCalc.h:120
double fV
Definition: OscCalc.h:112

Member Data Documentation

double osc::OscCalc::fA
private

Definition at line 115 of file OscCalc.h.

Referenced by P_internal_ee(), P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateEDep().

double osc::OscCalc::falpha
private
double osc::OscCalc::fC12
private

Definition at line 117 of file OscCalc.h.

Referenced by P_internal_ee(), P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateEDep().

double osc::OscCalc::fC13
private

Definition at line 118 of file OscCalc.h.

Referenced by P_internal_ee(), P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateEDep().

double osc::OscCalc::fcos_2th12
private

Definition at line 96 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), UpdateBasic(), and UpdateEDep().

double osc::OscCalc::fcos_2th13
private
double osc::OscCalc::fcos_2th23
private

Definition at line 98 of file OscCalc.h.

Referenced by P_internal_mt(), and UpdateBasic().

double osc::OscCalc::fcos_dCPproxy
private

Definition at line 121 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateEDep().

double osc::OscCalc::fcos_sq_2th12
private

Definition at line 108 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fcos_sq_2th13
private

Definition at line 109 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fcos_sq_2th23
private

Definition at line 110 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fcos_sq_th12
private

Definition at line 102 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fcos_sq_th13
private

Definition at line 103 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fcos_sq_th23
private

Definition at line 104 of file OscCalc.h.

Referenced by P_internal_te(), and UpdateBasic().

double osc::OscCalc::fcos_th12
private

Definition at line 90 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateBasic().

double osc::OscCalc::fcos_th13
private

Definition at line 91 of file OscCalc.h.

Referenced by P_internal_mt(), and UpdateBasic().

double osc::OscCalc::fcos_th23
private

Definition at line 92 of file OscCalc.h.

Referenced by P_internal_me(), and UpdateBasic().

double osc::OscCalc::fD
private

Definition at line 116 of file OscCalc.h.

Referenced by P_internal_ee(), P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateEDep().

template<typename T>
T osc::_IOscCalcAdjustable< T >::fdCP
protectedinherited
double osc::OscCalc::fdCPproxy
private

Definition at line 119 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_te(), and UpdateEDep().

template<typename T>
T osc::_IOscCalcAdjustable< T >::fDmsq21
protectedinherited
double osc::OscCalc::fDmsq31
private

Definition at line 86 of file OscCalc.h.

Referenced by UpdateBasic(), and UpdateEDep().

template<typename T>
T osc::_IOscCalcAdjustable< T >::fDmsq32
protectedinherited
template<typename T>
double osc::_IOscCalcAdjustable< T >::fL
protectedinherited
template<typename T>
double osc::_IOscCalcAdjustable< T >::fRho
protectedinherited
double osc::OscCalc::fsin_2th12
private

Definition at line 93 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateBasic().

double osc::OscCalc::fsin_2th13
private

Definition at line 94 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fsin_2th23
private

Definition at line 95 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateBasic().

double osc::OscCalc::fsin_dCPproxy
private

Definition at line 120 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateEDep().

double osc::OscCalc::fsin_sq_2th12
private
double osc::OscCalc::fsin_sq_2th13
private
double osc::OscCalc::fsin_sq_2th23
private

Definition at line 107 of file OscCalc.h.

Referenced by P_internal_mt(), and UpdateBasic().

double osc::OscCalc::fsin_sq_th12
private

Definition at line 99 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_te(), and UpdateBasic().

double osc::OscCalc::fsin_sq_th13
private

Definition at line 100 of file OscCalc.h.

Referenced by UpdateBasic().

double osc::OscCalc::fsin_sq_th23
private

Definition at line 101 of file OscCalc.h.

Referenced by P_internal_me(), and UpdateBasic().

double osc::OscCalc::fsin_th12
private

Definition at line 87 of file OscCalc.h.

Referenced by P_internal_ee(), P_internal_mt(), and UpdateBasic().

double osc::OscCalc::fsin_th13
private

Definition at line 88 of file OscCalc.h.

Referenced by P_internal_me(), P_internal_mt(), P_internal_te(), and UpdateBasic().

double osc::OscCalc::fsin_th23
private

Definition at line 89 of file OscCalc.h.

Referenced by P_internal_te(), and UpdateBasic().

template<typename T>
T osc::_IOscCalcAdjustable< T >::fTh12
protectedinherited
template<typename T>
T osc::_IOscCalcAdjustable< T >::fTh13
protectedinherited
template<typename T>
T osc::_IOscCalcAdjustable< T >::fTh23
protectedinherited
bool osc::OscCalc::fUpdated
private
double osc::OscCalc::fV
private

Definition at line 112 of file OscCalc.h.

Referenced by UpdateBasic(), and UpdateEDep().


The documentation for this class was generated from the following files: