OscCalcSterile.h
Go to the documentation of this file.
1 #ifndef OSC_OSCCALCULATORSTERILE_H
2 #define OSC_OSCCALCULATORSTERILE_H
3 
4 //////////////////////////////////////////////////////////////////////////
5 // //
6 // \file OscCalcSterile.h //
7 // //
8 // Adapt the PMNS_Sterile calculator to standard interface //
9 // <aurisaam@ucmail.uc.edu> //
10 // //
11 //////////////////////////////////////////////////////////////////////////
12 
13 #include "IOscCalc.h"
14 #include "PMNS_Sterile.h"
15 #include <vector>
16 
17 namespace osc
18 {
19  /// \brief Adapt the PMNS_Sterile calculator to standard interface
20  ///
21  /// Adapt the \ref PMNS_Sterile calculator (3+N with matter effects) to standard interface
23  {
24  public:
28  virtual ~OscCalcSterile();
29 
30  void SetNFlavors(int nflavors);
31 
32  virtual IOscCalcAdjustable* Copy() const override;
33 
34  // if flavAfter == 0, give the active fraction
35  virtual double P(int flavBefore, int flavAfter, double E) override;
36 
37  virtual void SetL (double L ) override {fDirty = true; fL = L;}
38  virtual void SetRho(double rho) override {fDirty = true; fRho = rho;}
39 
40  void SetAngle(int i, int j, double th);
41  void SetDelta(int i, int j, double delta);
42  void SetDm(int i, double dm);
43 
44  void SetState(std::vector<double> state);
45 
46  //Getters
47  int GetNFlavors() const { return fPMNS_Sterile->GetNFlavors(); }
48  double GetL() const override { return fL; }
49  double GetRho() const override { return fRho; }
50  double GetDm(int i) const { return fPMNS_Sterile->GetDm(i); }
51  double GetAngle(int i, int j) const { return fPMNS_Sterile->GetAngle(i, j); }
52  double GetDelta(int i, int j) const { return fPMNS_Sterile->GetDelta(i, j); }
53  std::vector<double> GetState() const;
54  virtual TMD5* GetParamsHash() const override;
55 
56  protected:
58 
59  virtual void SetDmsq21(const double& dmsq21) override;
60  virtual void SetDmsq32(const double& dmsq32) override;
61  virtual void SetTh12 (const double& th12 ) override;
62  virtual void SetTh13 (const double& th13 ) override;
63  virtual void SetTh23 (const double& th23 ) override;
64  virtual void SetdCP (const double& dCP ) override;
65 
66  int fNFlavors;
67  double fRho;
68  bool fDirty;
69  double fPrevE;
70  int fPrevAnti;
72  };
73 
74  /// \brief Version of OscCalcSterile that always returns probability of 1
76  {
77  public:
78  using IOscCalc::P;
82  virtual ~OscCalcSterileTrivial() {};
83 
84  virtual IOscCalcAdjustable* Copy() const override;
85 
86  // Always return 1
87  virtual double P(int flavBefore, int flavAfter, double E) override;
88  };
89 
92 
93 } // namespace
94 
95 #endif
void SetState(std::vector< double > state)
virtual double GetAngle(int i, int j) const
Definition: PMNS_Sterile.h:59
double GetDelta(int i, int j) const
void SetNFlavors(int nflavors)
double th23
Definition: runWimpSim.h:98
double delta
Definition: runWimpSim.h:98
virtual void SetTh12(const double &th12) override
General interface to oscillation calculators.
Definition: StanTypedefs.h:22
void SetDelta(int i, int j, double delta)
Adapt the PMNS_Sterile calculator to standard interface.
Version of OscCalcSterile that always returns probability of 1.
double th12
Definition: runWimpSim.h:98
osc::OscCalcDumb calc
int GetNFlavors() const
virtual TMD5 * GetParamsHash() const override
Use to check two calculators are in the same state.
virtual void SetdCP(const double &dCP) override
PMNS_Sterile * fPMNS_Sterile
std::vector< double > GetState() const
virtual double GetDm(int i) const
Definition: PMNS_Sterile.h:58
static constexpr double L
Float_t E
Definition: plot.C:20
double dCP
virtual void SetDmsq21(const double &dmsq21) override
const double j
Definition: BetheBloch.cxx:29
virtual double P(int flavBefore, int flavAfter, double E) override
E in GeV; flavors as PDG codes (so, neg==>antinu)
virtual int GetNFlavors() const
Getters.
Definition: PMNS_Sterile.h:57
Oscillation probability calculators.
Definition: Calcs.h:5
const OscCalcSterile * DowncastToSterile(const IOscCalc *calc)
virtual void SetTh13(const double &th13) override
virtual T P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
void SetAngle(int i, int j, double th)
void SetDm(int i, double dm)
virtual void SetL(double L) override
double dmsq32
virtual void SetRho(double rho) override
double GetL() const override
double GetDm(int i) const
double GetRho() const override
virtual void SetDmsq32(const double &dmsq32) override
virtual double GetDelta(int i, int j) const
Definition: PMNS_Sterile.h:60
virtual void SetTh23(const double &th23) override
double th13
Definition: runWimpSim.h:98
double GetAngle(int i, int j) const
virtual IOscCalcAdjustable * Copy() const override