OscCalculatorPMNSOpt.cxx
Go to the documentation of this file.
1 #include "OscCalculatorPMNSOpt.h"
2 
3 #include <cassert>
4 #include <cstdlib>
5 
6 namespace osc
7 {
9  : fMixDirty(true), fDmDirty(true), fPropDirty(true), fPrevAnti(0)
10  {
11  }
12 
14  {
15  }
16 
17  double OscCalculatorPMNSOpt::P(int flavBefore, int flavAfter, double E)
18  {
19  const int anti = (flavBefore > 0) ? +1 : -1;
20  assert(flavAfter/anti > 0);
21  if(anti != fPrevAnti) fPropDirty = true;
22 
23  int i = -1, j = -1;
24  if(abs(flavBefore) == 12) i = 0;
25  if(abs(flavBefore) == 14) i = 1;
26  if(abs(flavBefore) == 16) i = 2;
27  if(abs(flavAfter) == 12) j = 0;
28  if(abs(flavAfter) == 14) j = 1;
29  if(abs(flavAfter) == 16) j = 2;
30  assert(i >= 0 && j >= 0);
31 
32  if(fMixDirty){
34  fMixDirty = false;
35  }
36  if(fDmDirty){
38  fDmDirty = false;
39  }
40 
41 
43  // Assume Z/A=0.5
44  const double Ne = fRho/2;
45  fPMNSOpt.PropMatter(fL, E, Ne, anti);
46  return fPMNSOpt.P(j);
47  }
48 } // namespace
49 
50 
virtual double P(int flavBefore, int flavAfter, double E)
virtual void PropMatter(double L, double E, double Ne, int anti=1)
virtual double P(int flv) const
virtual void ResetToFlavour(int flv=1)
T abs(T value)
virtual void SetMix(double th12, double th23, double th13, double deltacp)
virtual void SetDeltaMsqrs(double dm21, double dm32)
Definition: EarthModel.h:12