IOscCalculator.h
Go to the documentation of this file.
1 #ifndef IOSCCALCULATOR_H
2 #define IOSCCALCULATOR_H
3 
4 #include "TMD5.h"
5 
6 // //
7 // \file IOscCalculator.h //
8 // //
9 // \brief General interface to oscillation calculators //
10 // \author Christopher Backhouse - bckhouse@caltech.edu //
11 // //
12 
13 namespace osc
14 {
16  {
17  public:
18  virtual ~IOscCalculator() {}
19 
20  virtual double P(int flavBefore, int flavAfter, double E) = 0;
21 
22  virtual TMD5* GetParamsHash() const {return 0;}
23  };
24 
26  {
27  public:
28  virtual double P(int from, int to, double /*E*/)
29  {
30  if(from == to) return 1;
31  return 0;
32  }
33 
34  //virtual TMD5* GetParamsHash() const override
35  //{
36  // TMD5* ret = new TMD5;
37  // const char* txt = "NoOscillations";
38  // ret->Update((unsigned char*)txt, strlen(txt));
39  // ret->Final();
40  // return ret;
41  //}
42  };
43 
45  {
46  public:
47  // These setters are left unimplemented here, since calculators may want
48  // to compute additional values when these are set.
49  virtual void SetL (double L ) = 0;
50  virtual void SetRho (double rho ) = 0;
51  virtual void SetDmsq21(double dmsq21) = 0;
52  virtual void SetDmsq32(double dmsq32) = 0;
53  virtual void SetTh12 (double th12 ) = 0;
54  virtual void SetTh13 (double th13 ) = 0;
55  virtual void SetTh23 (double th23 ) = 0;
56  virtual void SetdCP (double dCP ) = 0;
57 
58  virtual double GetL () const { return fL ; }
59  virtual double GetRho () const { return fRho ; }
60  virtual double GetDmsq21() const { return fDmsq21 ; }
61  virtual double GetDmsq32() const { return fDmsq32 ; }
62  virtual double GetTh12 () const { return fTh12 ; }
63  virtual double GetTh13 () const { return fTh13 ; }
64  virtual double GetTh23 () const { return fTh23 ; }
65  virtual double GetdCP () const { return fdCP ; }
66 
67  protected:
68  TMD5* GetParamsHashDefault(const std::string& txt) const;
69 
70  // Set by the user. Generally useful to derived classes
71  double fRho; // density (g/cm^3)
72  double fL; // baseline (km)
73  double fDmsq21;
74  double fDmsq32;
75  double fTh12;
76  double fTh13;
77  double fTh23;
78  double fdCP;
79  };
80 
81 } // namespace
82 
83 #endif
virtual ~IOscCalculator()
virtual double GetTh13() const
virtual double GetDmsq21() const
std::string string
Definition: nybbler.cc:12
virtual double GetdCP() const
virtual double GetDmsq32() const
virtual double GetTh12() const
virtual double GetRho() const
virtual double GetL() const
Definition: EarthModel.h:12
virtual double P(int flavBefore, int flavAfter, double E)=0
virtual double P(int from, int to, double)
virtual TMD5 * GetParamsHash() const
virtual double GetTh23() const