MINT2
CrystalBarrelFOCUS.cpp
Go to the documentation of this file.
2 
5 #include <complex>
6 #include <cmath>
7 
8 using namespace std;
9 using namespace MINT;
10 
12  : BW_BW(decay)
13  , _mRho(-9999.0)
14  , _GRho(-9999.0)
15  , _mOmega(-9999.0)
16  , _GOmega(-9999.0)
17 {
18 }
20  : ILineshape()
21  , BW_BW(other)
22  , _mRho(other._mRho)
23  , _GRho(other._GRho)
24  , _mOmega(other._mOmega)
25  , _GOmega(other._GOmega)
26 {}
27 
28 double CrystalBarrelFOCUS::mRho() const{
30  return _mRho;
31 }
32 
35  return _GRho;
36 }
37 
40  return _mOmega;
41 }
42 
45  return _GOmega;
46 }
47 
48 std::complex<double> CrystalBarrelFOCUS::BW (double s, double m_w, double gamma) const{
49  std::complex<double> invBW(m_w*m_w - s, -m_w * gamma);
50  return -1.0/invBW;
51  //return m_w * gamma / invBW;
52 }
53 std::complex<double> CrystalBarrelFOCUS::AlbertosFunction(double spipi_in){
54  bool dbThis=false;
55 
56  double gamma, gamma_r, gamma_w, rho, rho0, pstr, pstr0, pstrD;
57  double fr, fr0, fD, mD /*, s*/, m, spipi, mKK, m_r, m_w, mpi;
58  double alpha, beta, epsilon, delta /*, D1*/;
59  complex<double> bwr, bww;
60 
61  spipi = spipi_in/(GeV*GeV);// I use MeV, Alberto GeV
62 
63  m_w = 0.782;
64  gamma_w = 0.00840;
65  mpi = 0.139569950;
66  alpha = 1.750;
67  beta = 0.090;
68  delta = 0.00250;
69  epsilon = 1.140;
70  //epsilon = -10;
71 
72  m = sqrt(spipi);
73  mKK = 0.987340;
74  mD = 1.90;
75  m_r = mRho()/GeV;//m_rho;
76  gamma_r = GammaRhoFixed()/GeV;//w_rho;
77 
78  double arg = m*m - 4.0*mpi*mpi;
79  if(arg < 0) return 0;
80  pstr = sqrt (arg) / 2.0;
81  pstr0 = sqrt (m_r*m_r - 4.0 * mpi*mpi) / 2.0;
82  double arg2 = (mD*mD - (m + mKK)*(m + mKK)) *
83  (mD*mD - (m - mKK)*(m - mKK) );
84  if(arg2 < 0) return 0;
85 
86  pstrD = 1.0 / (2.0 * mD) * sqrt(arg2);
87 
88  double arg3 = 1.0 - 4.* mpi*mpi / m*m;
89  if(arg3 < 0) return 0;
90  rho = sqrt (arg3);
91  rho0 = sqrt (1.0 - 4.* mpi*mpi / m_r*m_r);
92 
93  fD = sqrt (pstrD/0.20) * sqrt (2.0/( pow(pstrD/0.20,2)+1.0));
94  fr = sqrt (pstr/0.20) * sqrt (2.0/( pow(pstr/0.20,2) +1.0));
95  fr0 = sqrt (pstr0/0.20) * sqrt (2.0/( pow(pstr0/0.20,2)+1.0));
96 
97  gamma = gamma_r * (rho/rho0) * (fr/fr0)*(fr/fr0);
98  bwr = fD * m_r * (gamma_r / rho0) * BW (m*m, m_r, gamma);
99  bwr = bwr * (fr/fr0);
100 
101  rho0 = sqrt (1.0 - 4.* mpi*mpi / m_w*m_w);
102  pstr0 = sqrt (m_w*m_w - 4.0 * mpi*mpi) / 2.0;
103 
104  fr0 = sqrt (pstr0/0.20) * sqrt (2.0/( pow(pstr0/0.20, 2)+1.0));
105 
106  gamma = gamma_w * (rho/rho0) * (fr/fr0)*(fr/fr0);
107  bww = fD * m_w * (gamma_w / rho0) * BW (m*m,m_w,gamma);
108  bww = bww * (fr/fr0);
109 
110  complex<double> cmplx_i(0,1);
111  complex<double> expIPhase(cos(beta + alpha), sin(beta + alpha));
112  complex<double> BWrho = sqrt (pstrD * pstr) *
113  (bwr + bww * epsilon * expIPhase *
114  delta * (m_r + m_w) / (m_w*m_w - m_r*m_r - cmplx_i *
115  (m_w * gamma_w - m_r * gamma_r)));
116 
117 
118  if(dbThis){
119  cout << "returning BWrho = " << BWrho
120  << " for spipi = " << spipi << endl;
121  }
122  return BWrho;
123 
124 }
125 
126 std::complex<double> CrystalBarrelFOCUS::getVal(IDalitzEvent& evt){
127  resetInternals();
128  setEventPtr(evt);
129  std::complex<double> returnVal = AlbertosFunction(mumsRecoMass2());
130  return returnVal;
131 }
132 
133 void CrystalBarrelFOCUS::print(std::ostream& out) const{
134  out << name();
135 }
136 
137 void CrystalBarrelFOCUS::print(IDalitzEvent& evt, std::ostream& out){
138  out << name();
139  BW_BW::print(evt, out);
140 }
141 
142 std::ostream& operator<<(std::ostream& out, const CrystalBarrelFOCUS& amp){
143 
144  amp.print(out);
145  return out;
146 }
147 
149 
150 }
151 //
152 
virtual void resetInternals()
Definition: BW_BW.cpp:1114
virtual void print(std::ostream &out=std::cout) const
std::complex< double > BW(double s, double m_w, double gamma) const
static double width(const std::string &name)
std::complex< double > AlbertosFunction(double sij)
bool setEventPtr(IDalitzEvent &evt) const
Definition: BW_BW.cpp:141
static const double s
std::ostream & operator<<(std::ostream &out, const CrystalBarrelFOCUS &amp)
virtual void print(IDalitzEvent &evt, std::ostream &out=std::cout)
Definition: BW_BW.cpp:1287
Definition: BW_BW.h:30
double GammaOmegaFixed() const
virtual double mumsRecoMass2() const
Definition: BW_BW.cpp:548
CrystalBarrelFOCUS(const AssociatedDecayTree &decay)
double GammaRhoFixed() const
static const double m
virtual std::string name() const
static const double GeV
static double mass(const std::string &name)
virtual std::complex< double > getVal(IDalitzEvent &evt)