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 "OscLib/IOscCalcSterile.h"
14 #include "OscLib/PMNS_Sterile.h"
15 
16 #include <vector>
17 
18 namespace osc
19 {
20  /// \brief Adapt the PMNS_Sterile calculator to standard interface
21  ///
22  /// Adapt the \ref PMNS_Sterile calculator (3+N with matter effects) to standard interface
24  {
25  public:
29  virtual ~OscCalcSterile();
30 
31  void SetNFlavors(int nflavors);
32 
33  virtual IOscCalcAdjustable* Copy() const override;
34 
35  virtual void SetAngle(int i, int j, double th) override;
36  virtual void SetDelta(int i, int j, double delta) override;
37  virtual void SetDm(int i, double dm) override;
38 
39  virtual double GetDm(int i) const override
40  { return fPMNS_Sterile->GetDm(i); }
41  virtual double GetAngle(int i, int j) const override
42  { return fPMNS_Sterile->GetAngle(i, j); }
43  virtual double GetDelta(int i, int j) const override
44  { return fPMNS_Sterile->GetDelta(i, j); }
45 
46  // if flavAfter == 0, give the active fraction
47  virtual double P(int flavBefore, int flavAfter, double E) override;
48 
49  void SetState(std::vector<double> state);
50 
51  // Getters
52  int GetNFlavors() const { return fPMNS_Sterile->GetNFlavors(); }
53  std::vector<double> GetState() const;
54  virtual TMD5* GetParamsHash() const override;
55 
56  protected:
58 
59  int fNFlavors;
60  double fPrevE;
61  int fPrevAnti;
63  };
64 
65 } // namespace
66 
67 #endif
void SetState(std::vector< double > state)
virtual void SetDm(int i, double dm) override
virtual double GetAngle(int i, int j) const
Definition: PMNS_Sterile.h:59
void SetNFlavors(int nflavors)
double delta
Definition: runWimpSim.h:98
virtual double GetDm(int i) const override
Adapt the PMNS_Sterile calculator to standard interface.
osc::OscCalcDumb calc
int GetNFlavors() const
virtual TMD5 * GetParamsHash() const override
Use to check two calculators are in the same state.
PMNS_Sterile * fPMNS_Sterile
virtual double GetDelta(int i, int j) const override
std::vector< double > GetState() const
virtual double GetDm(int i) const
Definition: PMNS_Sterile.h:58
Float_t E
Definition: plot.C:20
virtual void SetAngle(int i, int j, double th) override
const double j
Definition: BetheBloch.cxx:29
base class for sterile oscillation calculators In the context of a sterile oscillation calculator...
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
virtual double P(int flavBefore, int flavAfter, double E)=0
E in GeV; flavors as PDG codes (so, neg==>antinu)
virtual void SetDelta(int i, int j, double delta) override
virtual double GetAngle(int i, int j) const override
virtual double GetDelta(int i, int j) const
Definition: PMNS_Sterile.h:60
virtual IOscCalcAdjustable * Copy() const override