Classes | Typedefs | Functions | Variables
osc Namespace Reference

Classes

class  EarthModel
 
class  IOscCalculator
 
class  IOscCalculatorAdjustable
 
class  NoOscillations
 
class  OscCalculator
 
class  OscCalculatorGeneral
 
class  OscCalculatorPMNS
 
class  OscCalculatorPMNSOpt
 
class  PMNS
 
class  PMNS_NSI
 
class  PMNSOpt
 

Typedefs

typedef std::complex< 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
 

Functions

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, std::vector< double > mSq, double E)
 
ComplexMat MatterHamiltonianComponent (double Ne, double emutau)
 
ComplexMat MatrixExp (const ComplexMat &m2)
 
ComplexVec EvolveState (ComplexVec A, const ComplexMat &H, double L)
 
void conjugate_elements (ComplexMat &m)
 

Variables

const unsigned int kNumFlavours = 3
 

Typedef Documentation

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

Definition at line 22 of file OscCalculatorGeneral.cxx.

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

Definition at line 24 of file OscCalculatorGeneral.cxx.

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

Definition at line 25 of file OscCalculatorGeneral.cxx.

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

Definition at line 26 of file OscCalculatorGeneral.cxx.

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

Definition at line 21 of file OscCalculatorGeneral.cxx.

Function Documentation

void osc::conjugate_elements ( ComplexMat m)

Definition at line 193 of file OscCalculatorGeneral.cxx.

194  {
195  for(unsigned int i = 0; i < kNumFlavours; ++i)
196  for(unsigned int j = 0; j < kNumFlavours; ++j)
197  m(i, j) = std::conj(m(i, j));
198  }
const unsigned int kNumFlavours
ComplexVec osc::EvolveState ( ComplexVec  A,
const ComplexMat H,
double  L 
)

Definition at line 186 of file OscCalculatorGeneral.cxx.

187  {
188  const std::complex<double> i = std::complex<double>(0, 1);
189 
190  return ublas::prod(MatrixExp(-H*L*i), A);
191  }
ComplexMat MatrixExp(const ComplexMat &m2)
ComplexMat osc::GetPMNS ( OscCalculatorGeneral::Priv d)

Definition at line 106 of file OscCalculatorGeneral.cxx.

107  {
108  if(d->dirty){
109  ublas::noalias(d->pmns) = ublas::prod(d->atmos, ublas::prod<ComplexMat>(d->react, d->solar));
110  d->dirty = false;
111  }
112  return d->pmns;
113  }
const ublas::identity_matrix<val_t, alloc_t> osc::kIdentity ( kNumFlavours  )
const ublas::zero_matrix<val_t, alloc_t> osc::kZeroMat ( kNumFlavours  ,
kNumFlavours   
)
ComplexMat osc::MatrixExp ( const ComplexMat m2)

Definition at line 170 of file OscCalculatorGeneral.cxx.

171  {
172  // We use the identity e^(a*b) = (e^a)^b
173  // First: ensure the exponent is really small, 65536 = 2^16
174  ComplexMat m = m2/65536;
175 
176  // To first order e^x = 1+x
177  ComplexMat ret = kIdentity+m;
178 
179  // Raise the result to the power 65536, by squaring it 16 times
180  for(int n = 0; n < 16; ++n) ret = ublas::prod(ret, ret);
181 
182  return ret;
183  }
ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavours > ComplexMat
const ublas::identity_matrix< val_t, alloc_t > kIdentity(kNumFlavours)
ComplexMat osc::MatterHamiltonianComponent ( double  Ne,
double  emutau 
)

Definition at line 144 of file OscCalculatorGeneral.cxx.

145  {
146  // Need to convert avogadro's constant so that the total term comes out in
147  // units of inverse distance. Note that Ne will be specified in g/cm^-3
148  // I put the following into Wolfram Alpha:
149  // (fermi coupling constant)*((avogadro number)/cm^3)*(reduced planck constant)^2*(speed of light)^2
150  // And then multiplied by 1000 because we specify L in km not m.
151  const double GF = 1.368e-4;
152 
153  ComplexMat H = kZeroMat;
154 
155  H(0, 0) = sqrt(2)*GF*Ne;
156 
157  // Ignoring conjugates here because we assume e_mutau is real
158  H(1, 2) = H(2, 1) = emutau*sqrt(2)*GF*Ne;
159 
160  return H;
161  }
ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavours > ComplexMat
const ublas::zero_matrix< val_t, alloc_t > kZeroMat(kNumFlavours, kNumFlavours)
ComplexMat osc::VacuumHamiltonian ( const ComplexMat U,
std::vector< double >  mSq,
double  E 
)

Definition at line 119 of file OscCalculatorGeneral.cxx.

120  {
121  // Conversion factor for units
122  E /= 4*1.267;
123 
124  assert(mSq.size() == kNumFlavours);
125 
126  ComplexMat H = kZeroMat;
127 
128  // Loop over rows and columns of the output
129  for(unsigned int a = 0; a < kNumFlavours; ++a){
130  for(unsigned int b = 0; b < kNumFlavours; ++b){
131  // Form sum over mass states
132  for(unsigned int i = 0; i < kNumFlavours; ++i){
133  H(a, b) += U(a, i)*mSq[i]/(2*E)*std::conj(U(b, i));
134  }
135  }
136  }
137 
138  return H;
139  }
ublas::bounded_matrix< val_t, kNumFlavours, kNumFlavours > ComplexMat
const ublas::zero_matrix< val_t, alloc_t > kZeroMat(kNumFlavours, kNumFlavours)
const unsigned int kNumFlavours
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
E
Definition: 018_def.c:13
static bool * b
Definition: config.cpp:1043

Variable Documentation

const unsigned int osc::kNumFlavours = 3

Definition at line 18 of file OscCalculatorGeneral.cxx.