All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Constants.h
Go to the documentation of this file.
1 #ifndef IMeVPrtlConstants_h
2 #define IMeVPrtlConstants_h
3 
4 #include "TVector3.h"
5 
6 #include "fhiclcpp/ParameterSet.h"
7 
8 namespace evgen {
9 namespace ldm {
10 
11 // NOTE: all values here use units of GeV/ns/cm
12 
13 class Constants {
14 private:
15  // Singleton
16  static Constants &InstanceMut() {
17  static Constants instance;
18 
19  return instance;
20  }
21 
22 public:
23  // Masses
24  double elec_mass;
25  double muon_mass;
26  double piplus_mass;
27  double pizero_mass;
28  double kplus_mass;
29  double klong_mass;
30  double tquark_mass;
31 
32  // Couplings
33  double Gfermi;
34  double higgs_vev;
35  double sin2thetaW;
36  double gL;
37  double gR;
38  double fpion;
39 
40  // unit conversion
41  double hbar;
42  double c_cm_per_ns;
43 
44  // kaon lifetimes
47 
48  // kaon decay branching ratios
50  double kaonp_ep_nue;
51 
52  // CKM matrix
56 
57 
58  Constants();
59 
60  // Delete bad functions
61  Constants(Constants const&) = delete;
62  void operator=(Constants const&) = delete;
63 
64  // For configuration
65  static void Configure(const fhicl::ParameterSet &p);
66 
67  // Public access
68  static const Constants &Instance() { return InstanceMut(); }
69 };
70 
71 // Useful computations
72 double twobody_momentum(double parent_mass, double childA_mass, double childB_mass);
73 int calcPrtlRayWgt(double rest_frame_p, double M, TVector3 dir, TVector3 boost, double rand,
74  double& lab_frame_p_out, double& costh_rest_out, double& wgt);
75 double forwardPrtlEnergy(double parentM, double secM, double prtlM, double parentE);
76 double secPDG2Mass(int pdg);
77 
78 // Minimum possible cos theta for a given decay
79 double minKinematicCosTheta(double parentM, double secM, double prtlM, double parentE);
80 
81  }
82 }
83 #endif
double abs_VtsVtd_squared
Definition: Constants.h:54
var pdg
Definition: selectors.fcl:14
double secPDG2Mass(int pdg)
Definition: Constants.cpp:236
pdgs p
Definition: selectors.fcl:22
const std::string instance
double twobody_momentum(double parent_mass, double childA_mass, double childB_mass)
Definition: Constants.cpp:73
static void Configure(const fhicl::ParameterSet &p)
Definition: Constants.cpp:60
void operator=(Constants const &)=delete
double minKinematicCosTheta(double parentM, double secM, double prtlM, double parentE)
Definition: Constants.cpp:195
tuple dir
Definition: dropbox.py:28
static const Constants & Instance()
Definition: Constants.h:68
double rel_VtsVtd_squared
Definition: Constants.h:55
double forwardPrtlEnergy(double parentM, double secM, double prtlM, double parentE)
Definition: Constants.cpp:212
static Constants & InstanceMut()
Definition: Constants.h:16
int calcPrtlRayWgt(double rest_frame_p, double M, TVector3 dir, TVector3 boost, double rand, double &lab_frame_p_out, double &costh_rest_out, double &wgt)
Definition: Constants.cpp:102