Classes | Typedefs | Enumerations | Functions | Variables
osc Namespace Reference

Oscillation probability calculators. More...

Classes

class  _IOscCalculator
 General interface to oscillation calculators. More...
 
class  _IOscCalculatorAdjustable
 General interface to any calculator that lets you set the parameters. More...
 
class  _NoOscillations
 Pass neutrinos through unchanged. More...
 
struct  _OscCache
 
class  _OscCalculatorDMP
 Helper struct for the cache. Might not need this. More...
 
class  _OscCalculatorPMNS
 Adapt the PMNS calculator to standard interface. More...
 
class  _OscCalculatorPMNSOpt
 Optimized version of OscCalculatorPMNS. More...
 
struct  _OscParameters
 
class  _PMNS
 
class  _PMNS_DMP
 
class  _PMNSOpt
 Optimized version of PMNS. More...
 
class  EarthModel
 
struct  EigenSystem
 Helper struct for the cache. Might not need this. More...
 
class  OscCalculator
 
class  OscCalculatorCPT
 
class  OscCalculatorDumb
 Simple oscillation probability calculator that has no solar term or mass hierarchy or delta so it's some kind of average of all of those. More...
 
class  OscCalculatorGeneral
 More generic (but probably slower) oscillation calculations. More...
 
class  OscCalculatorPMNS_CPT
 Adapt the PMNS calculator to standard interface and include neutrino and anti neutrino oscillations seperately. More...
 
class  OscCalculatorPMNS_NSI
 Optimized version of OscCalculatorPMNS. More...
 
class  OscCalculatorPMNSOptEigen
 A re-optimized version of OscCalculatorPMNSOpt. More...
 
class  OscCalculatorSterile
 Adapt the PMNS_Sterile calculator to standard interface. More...
 
class  OscCalculatorSterileBeam
 Adapt the PMNS_Sterile calculator to standard interface. More...
 
class  OscCalculatorSterileTrivial
 Version of OscCalculatorSterile that always returns probability of 1. More...
 
class  PMNS_NSI
 
class  PMNS_Sterile
 

Typedefs

typedef _IOscCalculator< double > IOscCalculator
 
typedef _IOscCalculatorAdjustable< double > IOscCalculatorAdjustable
 
typedef _IOscCalculatorAdjustable< stan::math::varIOscCalculatorAdjustableStan
 
typedef _IOscCalculator< stan::math::varIOscCalculatorStan
 
typedef _OscCalculatorDMP< stan::math::varOscCalculatorDMPStan
 
typedef _OscCalculatorPMNS< stan::math::varOscCalculatorPMNSStan
 
typedef _OscCalculatorPMNSOpt< stan::math::varOscCalculatorPMNSOptStan
 
typedef _NoOscillations< double > NoOscillations
 
using SDMap = std::map< const ana::SigmaDelta *, std::pair< double, double > >
 
typedef _OscCalculatorDMP< double > OscCalculatorDMP
 
typedef std::complex< long double > val_t
 
typedef ublas::bounded_array< val_t, kNumFlavoursalloc_t
 
typedef ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavoursComplexMat
 
typedef ublas::c_vector< val_t, kNumFlavoursComplexVec
 
typedef ublas::unit_vector< val_t, alloc_tUnitVec
 
typedef _OscCalculatorPMNS< double > OscCalculatorPMNS
 
typedef _OscCalculatorPMNSOpt< double > OscCalculatorPMNSOpt
 
typedef _OscParameters< double > OscParameters
 
typedef _PMNS< double > PMNS
 
typedef _PMNSOpt< double > PMNSOpt
 

Enumerations

enum  ENuSign { ENuSign::kNu, ENuSign::kNuBar }
 Simple neutrino/anti-neutrino enum. More...
 

Functions

template<typename T , typename U >
void CopyParams (const osc::_IOscCalculatorAdjustable< T > *inCalc, osc::_IOscCalculatorAdjustable< U > *outCalc)
 Copy parameters from one calculator to another, irrespective of their type. More...
 
template void CopyParams (const osc::_IOscCalculatorAdjustable< double > *inCalc, osc::_IOscCalculatorAdjustable< stan::math::var > *outCalc)
 
template void CopyParams (const osc::_IOscCalculatorAdjustable< stan::math::var > *inCalc, osc::_IOscCalculatorAdjustable< double > *outCalc)
 
template void CopyParams (const osc::_IOscCalculatorAdjustable< stan::math::var > *inCalc, osc::_IOscCalculatorAdjustable< stan::math::var > *outCalc)
 
template void CopyParams (const osc::_IOscCalculatorAdjustable< double > *inCalc, osc::_IOscCalculatorAdjustable< double > *outCalc)
 
const OscCalculatorCPTDowncastToCPT (const IOscCalculatorAdjustable *osc)
 
OscCalculatorCPTDowncastToCPT (IOscCalculatorAdjustable *osc)
 
void _sincos (double theta, double &s, double &c)
 
const ublas::zero_matrix< val_t, alloc_tkZeroMat (kNumFlavours, kNumFlavours)
 
const ublas::identity_matrix< val_t, alloc_tkIdentity (kNumFlavours)
 
ComplexMat GetPMNS (OscCalculatorGeneral::Priv *d)
 
ComplexMat VacuumHamiltonian (const ComplexMat &U, const std::vector< long double > &mSq, long double E)
 
ComplexMat MatterHamiltonianComponent (long double Ne, long double emutau)
 
ComplexMat MatrixExp (const ComplexMat &m2)
 
ComplexVec EvolveState (ComplexVec A, const ComplexMat &H, long double L)
 
void conjugate_elements (ComplexMat &m)
 
const OscCalculatorPMNS_NSIDowncastToNSI (const IOscCalculator *calc)
 
OscCalculatorPMNS_NSIDowncastToNSI (IOscCalculator *calc)
 
Eigen::Array33d Probabilities (const Eigen::Matrix3cd &to, const Eigen::Matrix3cd &from)
 
const OscCalculatorSterileDowncastToSterile (const IOscCalculator *calc)
 
OscCalculatorSterileDowncastToSterile (IOscCalculator *calc)
 
const OscCalculatorSterileBeamDowncastToSterileBeam (const IOscCalculator *calc)
 
OscCalculatorSterileBeamDowncastToSterileBeam (IOscCalculator *calc)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, _OscParameters< T > const &p)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, _PMNS_DMP< T > &p)
 

Variables

const unsigned int kNumFlavours = 3
 
static double eVsqkm_to_GeV = 1e-9 / 1.973269681602260e-7 * 1e3
 
static double YerhoE2a = 1.52e-4
 
static const double kKm2eV = 5.06773103202e+09
 km to eV^-1 More...
 
static const double kK2 = 4.62711492217e-09
 mole/GeV^2/cm^3 to eV More...
 
static const double kGeV2eV = 1.0e+09
 GeV to eV. More...
 
static const double kGf = 1.166371e-5
 

Detailed Description

Oscillation probability calculators.

Simple oscillation probability calculator that has no solar term or mass hierarchy or delta so it's some kind of average of all of those.

Typedef Documentation

typedef ublas::bounded_array<val_t, kNumFlavours> osc::alloc_t

Definition at line 27 of file OscCalculatorGeneral.cxx.

typedef ublas::bounded_matrix<val_t, kNumFlavours, kNumFlavours> osc::ComplexMat

Definition at line 29 of file OscCalculatorGeneral.cxx.

typedef ublas::c_vector<val_t, kNumFlavours> osc::ComplexVec

Definition at line 30 of file OscCalculatorGeneral.cxx.

Definition at line 16 of file FwdDeclare.h.

Definition at line 19 of file FwdDeclare.h.

Definition at line 19 of file StanTypedefs.h.

Definition at line 22 of file StanTypedefs.h.

Definition at line 62 of file IOscCalculator.h.

Definition at line 81 of file OscCalculatorDMP.h.

Definition at line 25 of file StanTypedefs.h.

Definition at line 57 of file OscCalculatorPMNS.h.

Definition at line 72 of file OscCalculatorPMNSOpt.h.

Definition at line 31 of file StanTypedefs.h.

Definition at line 28 of file StanTypedefs.h.

Definition at line 33 of file OscParameters.h.

typedef _PMNS<double> osc::PMNS

Definition at line 226 of file PMNS.h.

typedef _PMNSOpt<double> osc::PMNSOpt

Definition at line 130 of file PMNSOpt.h.

using osc::SDMap = typedef std::map< const ana::SigmaDelta*, std::pair<double, double> >

Definition at line 33 of file OscCalculatorCPT.h.

typedef ublas::unit_vector<val_t, alloc_t> osc::UnitVec

Definition at line 31 of file OscCalculatorGeneral.cxx.

typedef std::complex<long double> osc::val_t

Definition at line 26 of file OscCalculatorGeneral.cxx.

Enumeration Type Documentation

enum osc::ENuSign
strong

Simple neutrino/anti-neutrino enum.

Enumerator
kNu 
kNuBar 

Definition at line 28 of file OscCalculatorCPT.h.

28 { kNu, kNuBar };
Neutrinos-only.
Definition: IPrediction.h:49

Function Documentation

void osc::_sincos ( double  theta,
double &  s,
double &  c 
)
inline

Definition at line 26 of file OscCalculatorDMP.cxx.

Referenced by osc::OscCalculatorPMNSOptEigen::BuildHam(), and osc::OscCalculatorPMNSOptEigen::SaveLastParams().

27  {
28 #ifdef __APPLE_CC__
29  __sincos(theta, &s, &c);
30 #else
31  sincos(theta, &s, &c);
32 #endif
33  }
const XML_Char * s
Definition: expat.h:262
void osc::conjugate_elements ( ComplexMat m)

Definition at line 227 of file OscCalculatorGeneral.cxx.

References MECModelEnuComparisons::i, calib::j, kNumFlavours, and m.

Referenced by osc::OscCalculatorGeneral::P().

228  {
229  for(unsigned int i = 0; i < kNumFlavours; ++i)
230  for(unsigned int j = 0; j < kNumFlavours; ++j)
231  m(i, j) = std::conj(m(i, j));
232  }
const double j
Definition: BetheBloch.cxx:29
const unsigned int kNumFlavours
template<typename T , typename U >
void osc::CopyParams ( const osc::_IOscCalculatorAdjustable< T > *  inCalc,
osc::_IOscCalculatorAdjustable< U > *  outCalc 
)

Copy parameters from one calculator to another, irrespective of their type.

Definition at line 47 of file IOscCalculator.cxx.

References ana::assert(), osc::_IOscCalculatorAdjustable< T >::GetdCP(), osc::_IOscCalculatorAdjustable< T >::GetDmsq21(), osc::_IOscCalculatorAdjustable< T >::GetDmsq32(), osc::_IOscCalculatorAdjustable< T >::GetL(), osc::_IOscCalculatorAdjustable< T >::GetRho(), osc::_IOscCalculatorAdjustable< T >::GetTh12(), osc::_IOscCalculatorAdjustable< T >::GetTh13(), osc::_IOscCalculatorAdjustable< T >::GetTh23(), osc::_IOscCalculatorAdjustable< T >::SetdCP(), osc::_IOscCalculatorAdjustable< T >::SetDmsq21(), osc::_IOscCalculatorAdjustable< T >::SetDmsq32(), osc::_IOscCalculatorAdjustable< T >::SetL(), osc::_IOscCalculatorAdjustable< T >::SetRho(), osc::_IOscCalculatorAdjustable< T >::SetTh12(), osc::_IOscCalculatorAdjustable< T >::SetTh13(), and osc::_IOscCalculatorAdjustable< T >::SetTh23().

Referenced by ana::StanFitter::CreateCalculator(), ana::StanFitter::log_prob(), and test_stanfit_systpulls().

49  {
50  assert (inCalc);
51  assert (outCalc);
52 
53  outCalc->SetL(inCalc->GetL());
54  outCalc->SetRho(inCalc->GetRho());
55 
56  outCalc->SetdCP(util::GetValAs<U>(inCalc->GetdCP()));
57  outCalc->SetDmsq21(util::GetValAs<U>(inCalc->GetDmsq21()));
58  outCalc->SetDmsq32(util::GetValAs<U>(inCalc->GetDmsq32()));
59  outCalc->SetTh12(util::GetValAs<U>(inCalc->GetTh12()));
60  outCalc->SetTh13(util::GetValAs<U>(inCalc->GetTh13()));
61  outCalc->SetTh23(util::GetValAs<U>(inCalc->GetTh23()));
62  }
virtual T GetDmsq21() const
virtual void SetL(double L)=0
virtual double GetRho() const
virtual void SetRho(double rho)=0
virtual void SetdCP(const T &dCP)=0
virtual void SetDmsq21(const T &dmsq21)=0
virtual double GetL() const
virtual void SetTh23(const T &th23)=0
virtual void SetDmsq32(const T &dmsq32)=0
virtual T GetDmsq32() const
assert(nhit_max >=nhit_nbins)
virtual void SetTh13(const T &th13)=0
virtual void SetTh12(const T &th12)=0
template void osc::CopyParams ( const osc::_IOscCalculatorAdjustable< double > *  inCalc,
osc::_IOscCalculatorAdjustable< stan::math::var > *  outCalc 
)
template void osc::CopyParams ( const osc::_IOscCalculatorAdjustable< stan::math::var > *  inCalc,
osc::_IOscCalculatorAdjustable< double > *  outCalc 
)
template void osc::CopyParams ( const osc::_IOscCalculatorAdjustable< stan::math::var > *  inCalc,
osc::_IOscCalculatorAdjustable< stan::math::var > *  outCalc 
)
template void osc::CopyParams ( const osc::_IOscCalculatorAdjustable< double > *  inCalc,
osc::_IOscCalculatorAdjustable< double > *  outCalc 
)
const OscCalculatorCPT * osc::DowncastToCPT ( const IOscCalculatorAdjustable osc)
OscCalculatorCPT * osc::DowncastToCPT ( IOscCalculatorAdjustable osc)

Definition at line 239 of file OscCalculatorCPT.cxx.

References ana::assert().

240  {
241  OscCalculatorCPT* cpt = dynamic_cast<OscCalculatorCPT*>(osc);
242  assert( cpt && "Must use OscCalculatorCPT with CPT FitVars." );
243  return cpt;
244  }
Oscillation probability calculators.
Definition: Calcs.h:5
assert(nhit_max >=nhit_nbins)
const OscCalculatorPMNS_NSI * osc::DowncastToNSI ( const IOscCalculator calc)

Definition at line 117 of file OscCalculatorPMNS_NSI.cxx.

References calc, om::cout, and allTimeWatchdog::endl.

Referenced by ana::FitEpsMuTau::GetValue(), and ana::FitEpsMuTau::SetValue().

118  {
119  const OscCalculatorPMNS_NSI* calc_nsi = dynamic_cast<const OscCalculatorPMNS_NSI*>(calc);
120  if(calc_nsi) return calc_nsi;
121  else std::cout << "Input calculator was not of type OscCalculatorPMNS_NSI." << std::endl;
122  return nullptr; // If the cast failed, calc_nsi should be nullptr anyway (?)
123  }
osc::OscCalculatorDumb calc
OStream cout
Definition: OStream.cxx:6
OscCalculatorPMNS_NSI * osc::DowncastToNSI ( IOscCalculator calc)

Definition at line 126 of file OscCalculatorPMNS_NSI.cxx.

References calc, om::cout, and allTimeWatchdog::endl.

127  {
128  OscCalculatorPMNS_NSI* calc_nsi = dynamic_cast<OscCalculatorPMNS_NSI*>(calc);
129  if(calc_nsi) return calc_nsi;
130  else std::cout << "Input calculator was not of type OscCalculatorPMNS_NSI." << std::endl;
131  return nullptr; // If the cast failed, calc_nsi should be nullptr anyway (?)
132  }
osc::OscCalculatorDumb calc
OStream cout
Definition: OStream.cxx:6
const OscCalculatorSterile * osc::DowncastToSterile ( const IOscCalculator calc)

Definition at line 228 of file OscCalculatorSterile.cxx.

References calc, om::cout, and allTimeWatchdog::endl.

Referenced by ana::FitDmSq32Sterile::GetValue(), ana::FitDmSq41Sterile::GetValue(), ana::FitDmSq43Sterile::GetValue(), ana::FitDelta13InPiUnitsSterile::GetValue(), ana::FitDelta14InPiUnitsSterile::GetValue(), ana::FitDelta24InPiUnitsSterile::GetValue(), ana::FitTheta13Sterile::GetValue(), ana::FitSinSqTheta13Sterile::GetValue(), ana::FitSinSq2Theta13Sterile::GetValue(), ana::FitTheta23Sterile::GetValue(), ana::FitSinSqTheta23Sterile::GetValue(), ana::FitTheta14Sterile::GetValue(), ana::FitSinSqTheta14Sterile::GetValue(), ana::FitTheta24Sterile::GetValue(), ana::FitSinSqTheta24Sterile::GetValue(), ana::FitTheta34Sterile::GetValue(), ana::FitSinSqTheta34Sterile::GetValue(), ana::FitTheta13InDegreesSterile::GetValue(), ana::FitTheta23InDegreesSterile::GetValue(), ana::FitTheta14InDegreesSterile::GetValue(), ana::FitTheta24InDegreesSterile::GetValue(), ana::FitTheta34InDegreesSterile::GetValue(), ana::NDOscCurve::NDOscCurve(), ana::FDPredictionSterile::Predict(), ana::NDPredictionSterile::Predict(), ana::PredictionSterile::PredictComponent(), ana::FDPredictionSterile::PredictComponent(), ana::NDPredictionSterile::PredictComponent(), ana::FitDmSq32Sterile::SetValue(), ana::FitDmSq41Sterile::SetValue(), ana::FitDmSq43Sterile::SetValue(), ana::FitDelta13InPiUnitsSterile::SetValue(), ana::FitDelta14InPiUnitsSterile::SetValue(), ana::FitDelta24InPiUnitsSterile::SetValue(), ana::FitTheta13Sterile::SetValue(), ana::FitSinSqTheta13Sterile::SetValue(), ana::FitSinSq2Theta13Sterile::SetValue(), ana::FitTheta23Sterile::SetValue(), ana::FitSinSqTheta23Sterile::SetValue(), ana::FitTheta14Sterile::SetValue(), ana::FitSinSqTheta14Sterile::SetValue(), ana::FitTheta24Sterile::SetValue(), ana::FitSinSqTheta24Sterile::SetValue(), ana::FitTheta34Sterile::SetValue(), ana::FitSinSqTheta34Sterile::SetValue(), ana::FitTheta13InDegreesSterile::SetValue(), ana::FitTheta23InDegreesSterile::SetValue(), ana::FitTheta14InDegreesSterile::SetValue(), ana::FitTheta24InDegreesSterile::SetValue(), ana::FitTheta34InDegreesSterile::SetValue(), and osc::OscCalculatorSterileTrivial::~OscCalculatorSterileTrivial().

229  {
230  const OscCalculatorSterileTrivial* calc_trivial
231  = dynamic_cast<const OscCalculatorSterileTrivial*>(calc);
232  if (calc_trivial) return calc_trivial;
233  const OscCalculatorSterile* calc_sterile = dynamic_cast<const OscCalculatorSterile*>(calc);
234  if(calc_sterile) return calc_sterile;
235  else std::cout << "Input calculator was not of type OscCalculatorSterile." << std::endl;
236  return nullptr; // If the cast failed, calc_sterile should be nullptr anyway
237  }
osc::OscCalculatorDumb calc
OStream cout
Definition: OStream.cxx:6
OscCalculatorSterile * osc::DowncastToSterile ( IOscCalculator calc)

Definition at line 240 of file OscCalculatorSterile.cxx.

References calc, om::cout, and allTimeWatchdog::endl.

241  {
242  OscCalculatorSterileTrivial* calc_trivial
243  = dynamic_cast<OscCalculatorSterileTrivial*>(calc);
244  if (calc_trivial) return calc_trivial;
245  OscCalculatorSterile* calc_sterile = dynamic_cast<OscCalculatorSterile*>(calc);
246  if(calc_sterile) return calc_sterile;
247  else std::cout << "Input calculator was not of type OscCalculatorSterile." << std::endl;
248  return nullptr; // If the cast failed, calc_sterile should be nullptr anyway
249  }
osc::OscCalculatorDumb calc
OStream cout
Definition: OStream.cxx:6
const OscCalculatorSterileBeam * osc::DowncastToSterileBeam ( const IOscCalculator calc)

Definition at line 143 of file OscCalculatorSterileBeam.cxx.

References calc, om::cout, and allTimeWatchdog::endl.

144  {
145  //const IOscCalculator* base = new osc::OscCalculatorSterileBeam();
146  const OscCalculatorSterileBeam* calc_sterile = dynamic_cast<const OscCalculatorSterileBeam*>(calc);
147  if(calc_sterile) return calc_sterile;
148  else std::cout << "Input calculator was not of type OscCalculatorSterileBeam." << std::endl;
149  return nullptr; // If the cast failed, calc_sterile should be nullptr anyway
150  }
osc::OscCalculatorDumb calc
OStream cout
Definition: OStream.cxx:6
OscCalculatorSterileBeam * osc::DowncastToSterileBeam ( IOscCalculator calc)

std::cout << "calc is a osc::NoOscillations calculator!" << std::endl;

Definition at line 153 of file OscCalculatorSterileBeam.cxx.

References calc, om::cout, and allTimeWatchdog::endl.

154  {
155  //IOscCalculator* base = new osc::OscCalculatorSterileBeam();
156  //std::cout << "calc's type is: " << typeid(calc).name() << std::endl;
157  //if (typeid(calc) == typeid(osc::NoOscillations))
158  // {
159  /// std::cout << "calc is a osc::NoOscillations calculator!" << std::endl;
160  //}
161  NoOscillations* calc_noosc = dynamic_cast<NoOscillations*>(calc);
162  if (calc_noosc)
163  {
164  std::cout << "I was successfully cast to NoOscillations" << std::endl;
165  }
166 
167  OscCalculatorSterileBeam* calc_sterile = dynamic_cast<OscCalculatorSterileBeam*>(calc);
168  if(calc_sterile) return calc_sterile;
169  else std::cout << "Input calculator was not of type OscCalculatorSterileBeam." << std::endl;
170  return nullptr; // If the cast failed, calc_sterile should be nullptr anyway
171  }
_NoOscillations< double > NoOscillations
osc::OscCalculatorDumb calc
OStream cout
Definition: OStream.cxx:6
ComplexVec osc::EvolveState ( ComplexVec  A,
const ComplexMat H,
long double  L 
)

Definition at line 220 of file OscCalculatorGeneral.cxx.

References MECModelEnuComparisons::i, MatrixExp(), and stan::math::prod().

Referenced by osc::OscCalculatorGeneral::P().

221  {
222  const std::complex<long double> i = std::complex<long double>(0, 1);
223 
224  return ublas::prod(MatrixExp(-H*L*i), A);
225  }
ComplexMat MatrixExp(const ComplexMat &m2)
static constexpr double L
T prod(const std::vector< T > &v)
Definition: prod.hpp:17
static const double A
Definition: Units.h:82
ComplexMat osc::GetPMNS ( OscCalculatorGeneral::Priv d)

Definition at line 138 of file OscCalculatorGeneral.cxx.

References osc::OscCalculatorGeneral::Priv::atmos, osc::OscCalculatorGeneral::Priv::dirty, osc::OscCalculatorGeneral::Priv::pmns, stan::math::prod(), osc::OscCalculatorGeneral::Priv::react, and osc::OscCalculatorGeneral::Priv::solar.

Referenced by osc::OscCalculatorGeneral::P().

139  {
140  if(d->dirty){
141  ublas::noalias(d->pmns) = ublas::prod(d->atmos, ublas::prod<ComplexMat>(d->react, d->solar));
142  d->dirty = false;
143  }
144  return d->pmns;
145  }
Float_t d
Definition: plot.C:236
T prod(const std::vector< T > &v)
Definition: prod.hpp:17
const ublas::identity_matrix<val_t, alloc_t> osc::kIdentity ( kNumFlavours  )

Referenced by MatrixExp().

const ublas::zero_matrix<val_t, alloc_t> osc::kZeroMat ( kNumFlavours  ,
kNumFlavours   
)
ComplexMat osc::MatrixExp ( const ComplexMat m2)

Definition at line 204 of file OscCalculatorGeneral.cxx.

References kIdentity(), m, getGoodRuns4SAM::n, stan::math::prod(), and runNovaSAM::ret.

Referenced by EvolveState().

205  {
206  // We use the identity e^(a*b) = (e^a)^b
207  // First: ensure the exponent is really small, 65536 = 2^16
208  ComplexMat m = m2/65536;
209 
210  // To first order e^x = 1+x
212 
213  // Raise the result to the power 65536, by squaring it 16 times
214  for(int n = 0; n < 16; ++n) ret = ublas::prod(ret, ret);
215 
216  return ret;
217  }
ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavours > ComplexMat
T prod(const std::vector< T > &v)
Definition: prod.hpp:17
static constexpr Double_t m2
Definition: Munits.h:145
const ublas::identity_matrix< val_t, alloc_t > kIdentity(kNumFlavours)
ComplexMat osc::MatterHamiltonianComponent ( long double  Ne,
long double  emutau 
)

Definition at line 178 of file OscCalculatorGeneral.cxx.

References kZeroMat(), and std::sqrt().

Referenced by osc::OscCalculatorGeneral::P().

179  {
180  // Need to convert avogadro's constant so that the total term comes out in
181  // units of inverse distance. Note that Ne will be specified in g/cm^-3
182  // I put the following into Wolfram Alpha:
183  // (fermi coupling constant)*((avogadro number)/cm^3)*(reduced planck constant)^2*(speed of light)^2
184  // And then multiplied by 1000 because we specify L in km not m.
185  const long double GF = 1.368e-4;
186 
187  ComplexMat H = kZeroMat;
188 
189  H(0, 0) = sqrt(2)*GF*Ne;
190 
191  // Ignoring conjugates here because we assume e_mutau is real
192  H(1, 2) = H(2, 1) = emutau*sqrt(2)*GF*Ne;
193 
194  return H;
195  }
T sqrt(T number)
Definition: d0nt_math.hpp:156
ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavours > ComplexMat
const ublas::zero_matrix< val_t, alloc_t > kZeroMat(kNumFlavours, kNumFlavours)
template<typename T >
std::ostream& osc::operator<< ( std::ostream &  os,
_OscParameters< T > const &  p 
)
inline

Definition at line 36 of file OscParameters.h.

37  {
38  os << "\tdelta m^2_{21}: " << p.dmsq21
39  << "\tdelta m^2_{32}: " << p.dmsq32
40  << "\tdelta m^2_{31}: " << p.Dmsq31()
41  << "\ttheta_{12}: " << p.th12
42  << "\ttheta_{13}: " << p.th13
43  << "\ttheta_{23}: " << p.th23
44  << "\tdelta CP: " << p.deltacp
45  << "\n";
46  return os;
47  }
const char * p
Definition: xmltok.h:285
template<typename T >
std::ostream& osc::operator<< ( std::ostream &  os,
_PMNS_DMP< T > &  p 
)
inline

Definition at line 103 of file PMNS_DMP.h.

104  {
105  os << "\tDmsqee: " << p.Dmsqee()
106  //<< "\tdelta m^2_{32}: " << p.dmsq32
107  //<< "\tdelta m^2_{31}: " << p.Dmsq31()
108  //<< "\ttheta_{12}: " << p.th12
109  //<< "\ttheta_{13}: " << p.th13
110  //<< "\ttheta_{23}: " << p.th23
111  //<< "\tdelta CP: " << p.deltacp
112  << "\n";
113  return os;
114  }
const char * p
Definition: xmltok.h:285
Eigen::Array33d osc::Probabilities ( const Eigen::Matrix3cd &  to,
const Eigen::Matrix3cd &  from 
)
inline

Definition at line 28 of file OscCalculatorPMNSOptEigen.cxx.

Referenced by osc::OscCalculatorPMNSOptEigen::FillCache(), and osc::OscCalculatorPMNSOptEigen::P().

30  {
31  return (to * from.adjoint()).array().abs2();
32  }
ComplexMat osc::VacuumHamiltonian ( const ComplexMat U,
const std::vector< long double > &  mSq,
long double  E 
)

Definition at line 151 of file OscCalculatorGeneral.cxx.

References a, ana::assert(), b, E, MECModelEnuComparisons::i, kNumFlavours, and kZeroMat().

Referenced by osc::OscCalculatorGeneral::P().

154  {
155  // Conversion factor for units
156  E /= 4*1.267;
157 
158  assert(mSq.size() == kNumFlavours);
159 
160  ComplexMat H = kZeroMat;
161 
162  // Loop over rows and columns of the output
163  for(unsigned int a = 0; a < kNumFlavours; ++a){
164  for(unsigned int b = 0; b < kNumFlavours; ++b){
165  // Form sum over mass states
166  for(unsigned int i = 0; i < kNumFlavours; ++i){
167  H(a, b) += U(a, i)*mSq[i]/(2*E)*std::conj(U(b, i));
168  }
169  }
170  }
171 
172  return H;
173  }
Float_t E
Definition: plot.C:20
ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavours > ComplexMat
const double a
const ublas::zero_matrix< val_t, alloc_t > kZeroMat(kNumFlavours, kNumFlavours)
const unsigned int kNumFlavours
const hit & b
Definition: hits.cxx:21
assert(nhit_max >=nhit_nbins)

Variable Documentation

double osc::eVsqkm_to_GeV = 1e-9 / 1.973269681602260e-7 * 1e3
static

Definition at line 14 of file PMNS_DMP.h.

const double osc::kGeV2eV = 1.0e+09
static
const double osc::kGf = 1.166371e-5
static
const double osc::kK2 = 4.62711492217e-09
static
const double osc::kKm2eV = 5.06773103202e+09
static
const unsigned int osc::kNumFlavours = 3

Definition at line 23 of file OscCalculatorGeneral.cxx.

Referenced by conjugate_elements(), and VacuumHamiltonian().

double osc::YerhoE2a = 1.52e-4
static

Definition at line 15 of file PMNS_DMP.h.