Belle II Software  release-08-01-10
EvtBSemiTauonicDecayRateCalculator.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include "EvtGenBase/EvtComplex.hh"
10 #include "generators/evtgen/EvtBSemiTauonicDecayRateCalculator.h"
11 #include "generators/evtgen/models/EvtBSemiTauonicHelicityAmplitudeCalculator.h"
12 #include <cmath>
13 #include <complex>
14 
15 #include "TF1.h"
16 #include "TF2.h"
17 #include "Math/WrappedTF1.h"
18 #include "Math/WrappedMultiTF1.h"
19 //#include "Math/GSLIntegrator.h" // USABLE ON KEKCC BUT NOT ON BUILDBOT
20 #include "Math/GaussIntegrator.h"
21 #include "Math/AdaptiveIntegratorMultiDim.h"
22 //#include "Math/GSLMCIntegrator.h"
23 
24 namespace Belle2 {
30 // dgamma/dw/dcostau
32  double mtau, int tauhel, int Dhel, double w, double costau)
33  {
34  EvtComplex temp = BSTD.helAmp(mtau, tauhel, Dhel, w, costau);
35  std::complex<double> amp(real(temp), imag(temp));
36 
37  return std::norm(amp) * pf(BSTD, mtau, Dhel, w);
38  }
39 
40 // dgamma integrated for costau
42  double mtau, int tauhel, int Dhel, double w)
43  {
44  m_BSTD = &BSTD;
45  TF1 f1("f1", this, &EvtBSemiTauonicDecayRateCalculator::EvaluateByCostau, -1, 1, 4,
46  "EvtBSemiTauonicDecayRateCalculator", "EvaluateByCostau");
47  f1.SetParameter(0, mtau);
48  f1.SetParameter(1, tauhel);
49  f1.SetParameter(2, Dhel);
50  f1.SetParameter(3, w);
51  ROOT::Math::WrappedTF1 wf1(f1);
52 // ROOT::Math::GSLIntegrator ig;
53  ROOT::Math::GaussIntegrator ig;
54  ig.SetFunction(wf1);
55  return ig.Integral(-1, 1);
56  }
57 
58 // dgamma integrated for w
60  int tauhel, int Dhel, double costau)
61  {
62  m_BSTD = &BSTD;
63  TF1 f1("f1", this, &EvtBSemiTauonicDecayRateCalculator::EvaluateByW, BSTD.wmin(), BSTD.wmax(mtau, Dhel), 4,
64  "EvtBSemiTauonicDecayRateCalculator", "EvaluateByW");
65  f1.SetParameter(0, mtau);
66  f1.SetParameter(1, tauhel);
67  f1.SetParameter(2, Dhel);
68  f1.SetParameter(3, costau);
69  ROOT::Math::WrappedTF1 wf1(f1);
70 // ROOT::Math::GSLIntegrator ig;
71  ROOT::Math::GaussIntegrator ig;
72  ig.SetFunction(wf1);
73  return ig.Integral(BSTD.wmin(), BSTD.wmax(mtau, Dhel));
74  }
75 
76 // gamma integrated for costau and w
78  double mtau, int tauhel, int Dhel)
79  {
80  m_BSTD = &BSTD;
82  BSTD.wmin(), BSTD.wmax(mtau, Dhel), -1, 1, 3,
83  "EvtBSemiTauonicDecayRateCalculator", "EvaluateBy2D");
84  f1.SetParameter(0, mtau);
85  f1.SetParameter(1, tauhel);
86  f1.SetParameter(2, Dhel);
87  ROOT::Math::WrappedMultiTF1 wf1(f1);
88 
89  // Create the Integrator
90  ROOT::Math::AdaptiveIntegratorMultiDim ig;
91  ig.SetFunction(wf1);
92  double xmin[] = {BSTD.wmin(), -1};
93  double xmax[] = {BSTD.wmax(mtau, Dhel), 1};
94  return ig.Integral(xmin, xmax);
95  }
96 
99  {
100  double sum(0);
101  sum += Gamma(BSTD, mtau, -1, 2);
102  sum += Gamma(BSTD, mtau, +1, 2);
103  return sum;
104  }
105 
107  {
108  double sum(0);
109  for (int Dhel = -1; Dhel <= 1; Dhel++) {
110  sum += Gamma(BSTD, mtau, -1, Dhel);
111  sum += Gamma(BSTD, mtau, +1, Dhel);
112  }
113  return sum;
114  }
115 
116 // SM
118  {
119 
121  SM.setCV1(0);
122  SM.setCV2(0);
123  SM.setCS1(0);
124  SM.setCS2(0);
125  SM.setCT(0);
126  double sum(0);
127  sum += Gamma(SM, mlep, -1, 2);
128  sum += Gamma(SM, mlep, +1, 2);
129  return sum;
130  }
131 
133  {
135  SM.setCV1(0);
136  SM.setCV2(0);
137  SM.setCS1(0);
138  SM.setCS2(0);
139  SM.setCT(0);
140  double sum(0);
141  for (int Dhel = -1; Dhel <= 1; Dhel++) {
142  sum += Gamma(SM, mlep, -1, Dhel);
143  sum += Gamma(SM, mlep, +1, Dhel);
144  }
145  return sum;
146  }
147 
148 // R(D) and R(Dstar)
150  const double mlep)
151  {
152  double sum(0);
153  sum += Gamma(BSTD, mtau, -1, 2);
154  sum += Gamma(BSTD, mtau, +1, 2);
155  return sum / GammaSMD(BSTD, mlep);
156  }
157 
159  const double mlep)
160  {
161  double sum(0);
162  for (int Dhel = -1; Dhel <= 1; Dhel++) {
163  sum += Gamma(BSTD, mtau, -1, Dhel);
164  sum += Gamma(BSTD, mtau, +1, Dhel);
165  }
166  return sum / GammaSMDstar(BSTD, mlep);
167  }
168 
169 // Polarizations
171  {
172  double left(0), right(0);
173  left += Gamma(BSTD, mtau, -1, 2);
174  right += Gamma(BSTD, mtau, +1, 2);
175  return (right - left) / (right + left);
176  }
178  {
179  double left(0), right(0);
180  for (int Dhel = -1; Dhel <= 1; Dhel++) {
181  left += Gamma(BSTD, mtau, -1, Dhel);
182  right += Gamma(BSTD, mtau, +1, Dhel);
183  }
184  return (right - left) / (right + left);
185  }
186 
188  {
189  double transverse(0), longitudinal(0);
190  transverse += Gamma(BSTD, mtau, -1, -1);
191  transverse += Gamma(BSTD, mtau, +1, -1);
192  transverse += Gamma(BSTD, mtau, -1, +1);
193  transverse += Gamma(BSTD, mtau, +1, +1);
194  longitudinal += Gamma(BSTD, mtau, -1, 0);
195  longitudinal += Gamma(BSTD, mtau, +1, 0);
196  return longitudinal / (longitudinal + transverse);
197  }
198 
200  double w)
201  {
202  return 1. / (2 * BSTD.getMB()) * BSTD.getMB() * BSTD.getMB() * BSTD.r(Dhel) * BSTD.r(Dhel)
203  * BSTD.v(mtau, BSTD.q2(Dhel, w)) * BSTD.v(mtau, BSTD.q2(Dhel, w))
204  * sqrt(w * w - 1) / (64 * M_PI * M_PI * M_PI);
205  }
206 
207  double EvtBSemiTauonicDecayRateCalculator::EvaluateByW(double* x, double* param)
208  {
209  // x=w
210  return dGammadwdcostau(*m_BSTD, param[0], (int)param[1], (int)param[2], x[0], param[3]);
211  }
212 
214  {
215  // x=costau
216  return dGammadwdcostau(*m_BSTD, param[0], (int)param[1], (int)param[2], param[3], x[0]);
217  }
218 
219  double EvtBSemiTauonicDecayRateCalculator::EvaluateBy2D(double* x, double* param)
220  {
221  // x={w,costau}
222  return dGammadwdcostau(*m_BSTD, param[0], (int)param[1], (int)param[2], x[0], x[1]);
223  }
224 
226 } // namespace Belle2
const EvtBSemiTauonicHelicityAmplitudeCalculator * m_BSTD
temporal pointer to the helicity amplitude calculator for EvaluateBy* functions
The class calculates the helicity amplitude of semi-tauonic B decays including new physics effects ba...
void setCV1(const EvtComplex &v)
Sets the Wilson coeffcient CV1.
void setCT(const EvtComplex &v)
Sets the Wilson coeffcient CT.
double wmin() const
Minimum value of the velocity transfer variable w.
void setCV2(const EvtComplex &v)
Sets the Wilson coeffcient CV2.
void setCS2(const EvtComplex &v)
Sets the Wilson coeffcient CS2.
double wmax(double mtau, int Dhel) const
Maximum value of the velocity transfer variable w.
void setCS1(const EvtComplex &v)
Sets the Wilson coeffcient CS1.
double r(int Dhel) const
Ratio of the daughter meson mass to the parent meson.
double EvaluateByCostau(double *x, double *param)
Function used internally for numerical integration.
EvtComplex helAmp(double mtau, int tauhel, int Dhel, double w, double costau) const
The function calculates the helicity amplitude.
double EvaluateByW(double *x, double *param)
Function used internally for numerical integration.
double v(double mtau, double q2) const
Function to calculate the tau velocity.
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
double dGammadwdcostau(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double w, double costau)
Function calculates the differential decay rate dGamma/dw/dcostau.
double RGammaD(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau, const double mlep=0.0005110)
Function calculates the ratio of Br(B->Dtaunu)/Br(B->Dlnu), R(D).
double PDstar(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau)
Function calculates the polarization of D*, longitudinal/(longitudinal + transverse),...
double GammaDstar(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau)
Function calculates the differential decay rate Gamma for D*taunu decay, integrated for w and costau ...
double dGammadw(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double w)
Function calculates the differential decay rate dGamma/dw, integrated for costau.
double GammaSMD(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mlep=0.0005110)
Function calculates the SM decay rate Gamma for Dlnu decay, integrated for w and costau and summed fo...
double RGammaDstar(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau, const double mlep=0.0005110)
Function calculates the ratio of Br(B->Dtaunu)/Br(B->Dlnu), R(D*).
double Gamma(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel)
Function calculates the helicity dependent decay rate Gamma, integrated for w and costau.
double PtauDstar(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau)
Function calculates the polarization of tau, (RH - LH)/(LH + RH), in B->D*taunu decay.
double PtauD(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau)
Function calculates the polarization of tau, (RH - LH)/(LH + RH), in B->Dtaunu decay.
double GammaSMDstar(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mlep=0.0005110)
Function calculates the SM decay rate Gamma for D*lnu decay, integrated for w and costau and summed f...
double dGammadcostau(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double costau)
Function calculates the differential decay rate dGamma/dcostau, integrated for w.
double pf(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int Dhel, double w)
Phase space factor, which is multiplied to the helicity amplitude to calculate the decay rate.
double EvaluateBy2D(double *x, double *param)
Function used internally for numerical integration.
double GammaD(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau)
Function calculates the decay rate Gamma for Dtaunu decay, integrated for w and costau and summed for...
double q2(int Dhel, double w) const
Function to calculate the q^2 of the decay (square of l+nu invariant mass).
Abstract base class for different kinds of events.