9#include "generators/evtgen/EvtBSemiTauonicDecayRateCalculator.h"
10#include "generators/evtgen/models/EvtBSemiTauonicHelicityAmplitudeCalculator.h"
22 std::cout <<
"Usage: BSTD_calc_dgam [-hr] m_B m_D* m_D m_tau m_lep rho1^2 rhoA1^2 R1(1) R2(1) aS1 aR3 m_b m_c" << std::endl;
23 std::cout <<
"Calculate differential decay rate for each helicity state, " << std::endl;
24 std::cout <<
"the ratios R(D) and R(D*), " << std::endl;
25 std::cout <<
"and polarization P_tau and P_D* for B->D(*)taunu decays " << std::endl;
26 std::cout <<
"using the BSTD model." << std::endl;
27 std::cout << std::endl;
28 std::cout <<
"The results are written to " << std::endl;
29 std::cout <<
"dstar.{w,costau,2D}.dat, d.{w,costau,2D}.dat " << std::endl;
30 std::cout <<
"and r_pol.dat in the ASCII text format." << std::endl;
31 std::cout << std::endl;
32 std::cout <<
"Options: " << std::endl;
33 std::cout <<
" -h\tShow this usage." << std::endl;
34 std::cout <<
" -r\tCalculate only R and polarizations, without writing output files." << std::endl;
38int main(
int argc,
char* argv[])
41 bool calcROnly =
false;
45 int c = getopt(argc, argv,
"rh");
57 std::cerr <<
"Unknown option" << std::endl;
63 const int narg = argc - optind;
69 const double m_B(atof(argv[optind++]));
70 const double m_Dst(atof(argv[optind++]));
71 const double m_D(atof(argv[optind++]));
72 const double m_tau(atof(argv[optind++]));
73 const double m_lep(atof(argv[optind++]));
75 const double rho12(atof(argv[optind++]));
76 const double rhoA12(atof(argv[optind++]));
77 const double ffR11(atof(argv[optind++]));
78 const double ffR21(atof(argv[optind++]));
79 const double aS1(atof(argv[optind++]));
80 const double aR3(atof(argv[optind++]));
81 const double m_b(atof(argv[optind++]));
82 const double m_c(atof(argv[optind++]));
86 double AbsCV1, ArgCV1, AbsCV2, ArgCV2, AbsCS1, ArgCS1, AbsCS2, ArgCS2, AbsCT, ArgCT;
88 std::cout <<
"Input Abs(CV1) Arg(CV1) Abs(CV2) Arg(CV2) Abs(CS1) Arg(CS1) Abs(CS2) Arg(CS2) Abs(CT) Arg(CT) >" << std::endl;
89 std::cin >> AbsCV1 >> ArgCV1 >> AbsCV2 >> ArgCV2 >> AbsCS1 >> ArgCS1 >> AbsCS2 >> ArgCS2 >> AbsCT >> ArgCT;
91 Coeffs[0] = EvtComplex(AbsCV1 * cos(ArgCV1), AbsCV1 * sin(ArgCV1));
92 Coeffs[1] = EvtComplex(AbsCV2 * cos(ArgCV2), AbsCV2 * sin(ArgCV2));
93 Coeffs[2] = EvtComplex(AbsCS1 * cos(ArgCS1), AbsCS1 * sin(ArgCS1));
94 Coeffs[3] = EvtComplex(AbsCS2 * cos(ArgCS2), AbsCS2 * sin(ArgCS2));
95 Coeffs[4] = EvtComplex(AbsCT * cos(ArgCT), AbsCT * sin(ArgCT));
98 Coeffs[0], Coeffs[1], Coeffs[2], Coeffs[3], Coeffs[4],
102 std::cout <<
"tau mass: " << m_tau << std::endl;
103 std::cout <<
"light lepton mass: " << m_lep << std::endl;
107 const double totgamd = CalcDecayRate.
GammaD(BSTD, m_tau);
109 const double totgamds = CalcDecayRate.
GammaDstar(BSTD, m_tau);
111 int i_tauhel[2] = { -1, 1};
112 int i_dhel[4] = { -1, 0, 1, 2};
116 double dw = (wmax - wmin) / 70.;
119 std::cout <<
"Calculating dGam/dw ..." << std::endl;
120 std::ofstream ofile1(
"dstar.w.dat");
121 ofile1 <<
"# w dgamlm dgamrm dgaml0 dgamr0 dgamlp dgamrp total" << std::endl;
122 for (
double w = wmin + dw / 2.;
125 for (
int i = 0; i < 2; i++) {
126 for (
int j = 0; j < 3; j++) {
127 dgam[i][j] = CalcDecayRate.
dGammadw(BSTD, m_tau, i_tauhel[i], i_dhel[j], w) / totgamds * dw;
132 <<
" " << dgam[0][0] <<
" " << dgam[1][0]
133 <<
" " << dgam[0][1] <<
" " << dgam[1][1]
134 <<
" " << dgam[0][2] <<
" " << dgam[1][2]
135 <<
" " << tot << std::endl;
138 std::ofstream ofile2(
"d.w.dat");
139 ofile2 <<
"# w dgaml dgamr total" << std::endl;
142 dw = (wmax - wmin) / 84;
143 for (
double w = wmin + dw / 2.;
146 for (
int i = 0; i < 2; i++) {
148 dgam[i][j] = CalcDecayRate.
dGammadw(BSTD, m_tau, i_tauhel[i], i_dhel[j], w) / totgamd * dw;
152 <<
" " << dgam[0][3] <<
" " << dgam[1][3]
153 <<
" " << tot << std::endl;
157 std::cout <<
"Calculating dGam/dcostau ..." << std::endl;
158 double dcostau = (1 - (-1)) / 100.;
159 std::ofstream ofilecostau1(
"dstar.costau.dat");
160 ofilecostau1 <<
"# costau dgamlm dgamrm dgaml0 dgamr0 dgamlp dgamrp total" << std::endl;
161 for (
double costau = -1 + dcostau / 2.;
162 costau < 1; costau += dcostau) {
164 for (
int i = 0; i < 2; i++) {
165 for (
int j = 0; j < 3; j++) {
166 dgam[i][j] = CalcDecayRate.
dGammadcostau(BSTD, m_tau, i_tauhel[i], i_dhel[j], costau) / totgamds * dcostau;
170 ofilecostau1 << costau
171 <<
" " << dgam[0][0] <<
" " << dgam[1][0]
172 <<
" " << dgam[0][1] <<
" " << dgam[1][1]
173 <<
" " << dgam[0][2] <<
" " << dgam[1][2]
174 <<
" " << tot << std::endl;
177 std::ofstream ofilecostau2(
"d.costau.dat");
178 ofilecostau2 <<
"# costau dgaml dgamr total" << std::endl;
179 for (
double costau = -1 + dcostau / 2.;
180 costau < 1; costau += dcostau) {
182 for (
int i = 0; i < 2; i++) {
184 dgam[i][j] = CalcDecayRate.
dGammadcostau(BSTD, m_tau, i_tauhel[i], i_dhel[j], costau) / totgamd * dcostau;
187 ofilecostau2 << costau
188 <<
" " << dgam[0][3] <<
" " << dgam[1][3]
189 <<
" " << tot << std::endl;
193 std::cout <<
"Calculating dGam/dw/dcostau ..." << std::endl;
196 dw = (wmax - wmin) / 20.;
197 dcostau = (1 - (-1)) / 20.;
198 std::ofstream ofile2d1(
"dstar.2d.dat");
199 ofile2d1 <<
"# w costau dgamlm dgamrm dgaml0 dgamr0 dgamlp dgamrp total" << std::endl;
200 for (
double w = wmin + dw / 2.; w < wmax; w += dw) {
201 for (
double costau = -1 + dcostau / 2.; costau < 1; costau += dcostau) {
203 for (
int i = 0; i < 2; i++) {
204 for (
int j = 0; j < 3; j++) {
205 dgam[i][j] = CalcDecayRate.
dGammadwdcostau(BSTD, m_tau, i_tauhel[i], i_dhel[j], w, costau) / totgamds * dcostau * dw;
209 ofile2d1 << w <<
" " << costau
210 <<
" " << dgam[0][0] <<
" " << dgam[1][0]
211 <<
" " << dgam[0][1] <<
" " << dgam[1][1]
212 <<
" " << dgam[0][2] <<
" " << dgam[1][2]
213 <<
" " << tot << std::endl;
219 dw = (wmax - wmin) / 20.;
220 dcostau = (1 - (-1)) / 20.;
221 std::ofstream ofile2d2(
"d.2d.dat");
222 ofile2d2 <<
"# w costau dgaml dgamr total" << std::endl;
223 for (
double w = wmin + dw / 2.; w < wmax; w += dw) {
224 for (
double costau = -1 + dcostau / 2.; costau < 1; costau += dcostau) {
226 for (
int i = 0; i < 2; i++) {
228 dgam[i][j] = CalcDecayRate.
dGammadwdcostau(BSTD, m_tau, i_tauhel[i], i_dhel[j], w, costau) / totgamd * dcostau * dw;
231 ofile2d2 << w <<
" " << costau
232 <<
" " << dgam[0][3] <<
" " << dgam[1][3]
233 <<
" " << tot << std::endl;
241 std::ofstream ofile3(
"r_pol.dat");
242 ofile3 <<
"# rgamd rgamds ptaud ptauds pds" << std::endl;
243 ofile3 << CalcDecayRate.
RGammaD(BSTD, m_tau, m_lep) <<
" ";
244 ofile3 << CalcDecayRate.
RGammaDstar(BSTD, m_tau, m_lep) <<
" ";
245 ofile3 << CalcDecayRate.
PtauD(BSTD, m_tau) <<
" ";
246 ofile3 << CalcDecayRate.
PtauDstar(BSTD, m_tau) <<
" ";
247 ofile3 << CalcDecayRate.
PDstar(BSTD, m_tau);
251 std::cout <<
"# rgamd rgamds ptaud ptauds pds" << std::endl;
252 std::cout << CalcDecayRate.
RGammaD(BSTD, m_tau, m_lep) <<
" ";
253 std::cout << CalcDecayRate.
RGammaDstar(BSTD, m_tau, m_lep) <<
" ";
254 std::cout << CalcDecayRate.
PtauD(BSTD, m_tau) <<
" ";
255 std::cout << CalcDecayRate.
PtauDstar(BSTD, m_tau) <<
" ";
256 std::cout << CalcDecayRate.
PDstar(BSTD, m_tau);
257 std::cout << std::endl;
Class to calculate the differential decay rate, R(D), R(D*), polarizations of tau and D* using BSTD m...
The class calculates the helicity amplitude of semi-tauonic B decays including new physics effects ba...
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 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 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 dGammadcostau(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double costau)
Function calculates the differential decay rate dGamma/dcostau, integrated for w.
double GammaD(const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau)
Function calculates the decay rate Gamma for Dtaunu decay, integrated for w and costau and summed for...
Abstract base class for different kinds of events.