OscCalcCPT.h
Go to the documentation of this file.
1 #ifndef OSCCALCULATORCPT_H
2 #define OSCCALCULATORCPT_H
3 
4 //////////////////////////////////////////////////////////////////////////
5 // //
6 // \file OscCalcCPT.h //
7 // //
8 // \brief Oscillation caculator contaning separate calculators for //
9 // neutrinos and anti-neutrinos //
10 // \author Joseph Lozier - jlozier@caltech.edu //
11 // //
12 //////////////////////////////////////////////////////////////////////////
13 
14 
15 #include "OscLib/IOscCalc.h"
16 #include "OscLib/OscCalcPMNSOpt.h"
17 #include <map>
18 #include <utility>
19 
20 namespace ana{
21  class SigmaDelta;
22 }
23 
24 namespace osc
25 {
26 
27  /// Simple neutrino/anti-neutrino enum
28  enum class ENuSign { kNu, kNuBar };
29 
30  // Because of the way Surface calculation is parallelized,
31  // some SigmaDelta objects need to store data in the calc.
32  // The map to parameters is keyed on the location of the helper object.
33  using SDMap = std::map< const ana::SigmaDelta*, std::pair<double, double> >;
34 
35  /** Oscillation calculator implementing CPT-asymmetry. Holds two oscillation
36  calculators as data members: one for neutrinos, the other for
37  anti-neutrinos. Interface allows changing oscillation parameter for each
38  calculator independently or simultaneously. **/
40  {
41 
42  friend class ana::SigmaDelta;
43 
44  public:
45  using IOscCalc::P;
46  /// default, uses OscCalcPMNSOpt for sub-calculators
47  OscCalcCPT();
48 
49  /** can pass custom calcs, OscCalcCPT will then own them
50  and delete them when it is destroyed **/
52  IOscCalcAdjustable* barcalc,
53  SDMap sigdel={} );
54 
55  ~OscCalcCPT() override;
56 
57  IOscCalcAdjustable* Copy() const override;
58 
59  double P(int flavBefore, int flavAfter, double E) override;
60 
61  // symmetric setters
62  void SetL (double L ) override {SetL(L, ENuSign::kNu);
63  SetL(L, ENuSign::kNuBar);}
64  void SetRho (double rho ) override {SetRho(rho, ENuSign::kNu);
65  SetRho(rho, ENuSign::kNuBar);}
66  void SetDmsq21(const double& dmsq21) override {SetDmsq21(dmsq21,ENuSign::kNu);
67  SetDmsq21(dmsq21,ENuSign::kNuBar);}
68  void SetDmsq32(const double& dmsq32) override {SetDmsq32(dmsq32,ENuSign::kNu);
69  SetDmsq32(dmsq32,ENuSign::kNuBar);}
70  void SetTh12 (const double& th12 ) override {SetTh12(th12, ENuSign::kNu);
71  SetTh12(th12, ENuSign::kNuBar);}
72  void SetTh13 (const double& th13 ) override {SetTh13(th13, ENuSign::kNu);
73  SetTh13(th13, ENuSign::kNuBar);}
74  void SetTh23 (const double& th23 ) override {SetTh23(th23, ENuSign::kNu);
75  SetTh23(th23, ENuSign::kNuBar);}
76  void SetdCP (const double& dCP ) override {SetdCP(dCP, ENuSign::kNu);
77  SetdCP(dCP, ENuSign::kNuBar);}
78 
79  // asymmetric setters
80  virtual void SetL (double, ENuSign);
81  virtual void SetRho (double, ENuSign);
82  virtual void SetDmsq21(double, ENuSign);
83  virtual void SetDmsq32(double, ENuSign);
84  virtual void SetTh12 (double, ENuSign);
85  virtual void SetTh13 (double, ENuSign);
86  virtual void SetTh23 (double, ENuSign);
87  virtual void SetdCP (double, ENuSign);
88 
89  // symmetric getters
90  double GetL () const override ;
91  double GetRho () const override ;
92  double GetDmsq21() const override ;
93  double GetDmsq32() const override ;
94  double GetTh12 () const override ;
95  double GetTh13 () const override ;
96  double GetTh23 () const override ;
97  double GetdCP () const override ;
98 
99  // asymmetric setters
100  virtual double GetL (ENuSign) const ;
101  virtual double GetRho (ENuSign) const ;
102  virtual double GetDmsq21(ENuSign) const ;
103  virtual double GetDmsq32(ENuSign) const ;
104  virtual double GetTh12 (ENuSign) const ;
105  virtual double GetTh13 (ENuSign) const ;
106  virtual double GetTh23 (ENuSign) const ;
107  virtual double GetdCP (ENuSign) const ;
108 
109  TMD5* GetParamsHash() const override;
110 
111  protected:
112 
113  // one calc for neutrinos, one for anti-neutrinos
116 
117  mutable SDMap fSigDel;
118 
119  };
120 
121  //---------------------------------------------------------------------------
122 
125 
126 } //namespace
127 
128 #endif
void SetDmsq21(const double &dmsq21) override
Definition: OscCalcCPT.h:66
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const OscCalcCPT * DowncastToCPT(const IOscCalcAdjustable *osc)
Definition: OscCalcCPT.cxx:232
void SetDmsq32(const double &dmsq32) override
Definition: OscCalcCPT.h:68
double th23
Definition: runWimpSim.h:98
double th12
Definition: runWimpSim.h:98
osc::OscCalcDumb calc
void SetTh12(const double &th12) override
Definition: OscCalcCPT.h:70
IOscCalcAdjustable * fCalc
Definition: OscCalcCPT.h:114
#define P(a, b, c, d, e, x)
void SetTh13(const double &th13) override
Definition: OscCalcCPT.h:72
void SetRho(double rho) override
Definition: OscCalcCPT.h:64
static constexpr double L
Float_t E
Definition: plot.C:20
std::map< const ana::SigmaDelta *, std::pair< double, double > > SDMap
Definition: OscCalcCPT.h:33
double dCP
void SetdCP(const double &dCP) override
Definition: OscCalcCPT.h:76
void SetRho(const float &r)
Definition: HoughPeak.h:94
ENuSign
Simple neutrino/anti-neutrino enum.
Definition: OscCalcCPT.h:28
Oscillation probability calculators.
Definition: Calcs.h:5
Neutrinos-only.
Definition: IPrediction.h:49
void SetTh23(const double &th23) override
Definition: OscCalcCPT.h:74
double dmsq32
void SetL(double L) override
Definition: OscCalcCPT.h:62
IOscCalcAdjustable * fBarCalc
Definition: OscCalcCPT.h:115
double th13
Definition: runWimpSim.h:98