9#include "EvtGenBase/EvtParticle.hh"
10#include "EvtGenBase/EvtPDL.hh"
11#include "EvtGenBase/EvtId.hh"
12#include "EvtGenBase/EvtAmp.hh"
14#include "framework/logging/Logger.h"
15#include "generators/evtgen/models/EvtBSemiTauonicVectorMesonAmplitude.h"
16#include "generators/evtgen/models/EvtBSemiTauonicHelicityAmplitudeCalculator.h"
28 static EvtId EM = EvtPDL::getId(
"e-");
29 static EvtId MUM = EvtPDL::getId(
"mu-");
30 static EvtId TAUM = EvtPDL::getId(
"tau-");
37 EvtVector4R p4d = p->getDaug(0)->getP4();
38 EvtVector4R p4l = p->getDaug(1)->getP4();
39 EvtVector4R p4n = p->getDaug(2)->getP4();
40 EvtVector4R p4ln(p4l + p4n);
42 EvtVector4R p4dln = boostTo(p4d, p4ln,
true);
43 EvtVector4R p4lln = boostTo(p4l, p4ln,
true);
45 const double gmB = p->getP4().mass();
46 const double gmd = p4d.mass();
47 const double gr = gmd / gmB;
49 const double q2 = (p4l + p4n).mass2();
50 const double w = (1. + gr * gr - q2 / gmB / gmB) / 2. / gr;
52 const double costau = p4dln.dot(p4lln) / p4dln.d3mag() / p4lln.d3mag();
53 const double ml = p4l.mass();
56 const double orig_mD = CalcHelAmp->
getMDst();
60 EvtComplex helamp[3][2];
61 helamp[0][0] = CalcHelAmp->
helAmp(ml, 1, 1, w, costau);
62 helamp[0][1] = CalcHelAmp->
helAmp(ml, -1, 1, w, costau);
63 helamp[1][0] = CalcHelAmp->
helAmp(ml, 1, 0, w, costau);
64 helamp[1][1] = CalcHelAmp->
helAmp(ml, -1, 0, w, costau);
65 helamp[2][0] = CalcHelAmp->
helAmp(ml, 1, -1, w, costau);
66 helamp[2][1] = CalcHelAmp->
helAmp(ml, -1, -1, w, costau);
84 EvtComplex l_SpFromHel[2][2];
85 EvtId l_num = p->getDaug(1)->getId();
87 l_SpFromHel[0][0] = conj(l_HelFromSp.get(0, 0));
88 l_SpFromHel[0][1] = conj(l_HelFromSp.get(1, 0));
89 l_SpFromHel[1][0] = conj(l_HelFromSp.get(0, 1));
90 l_SpFromHel[1][1] = conj(l_HelFromSp.get(1, 1));
99 const double D_theta = acos(p4d.get(3) / p4d.d3mag());
100 const double D_phi = atan2(p4d.get(2), p4d.get(1));
101 EvtSpinDensity D_HelFromSp = p->getDaug(0)->rotateToHelicityBasis(D_phi, D_theta, -D_phi);
103 EvtComplex D_SpFromHel[3][3];
104 D_SpFromHel[0][0] = conj(D_HelFromSp.get(0, 0));
105 D_SpFromHel[0][1] = conj(D_HelFromSp.get(1, 0));
106 D_SpFromHel[0][2] = conj(D_HelFromSp.get(2, 0));
107 D_SpFromHel[1][0] = conj(D_HelFromSp.get(0, 1));
108 D_SpFromHel[1][1] = conj(D_HelFromSp.get(1, 1));
109 D_SpFromHel[1][2] = conj(D_HelFromSp.get(2, 1));
110 D_SpFromHel[2][0] = conj(D_HelFromSp.get(0, 2));
111 D_SpFromHel[2][1] = conj(D_HelFromSp.get(1, 2));
112 D_SpFromHel[2][2] = conj(D_HelFromSp.get(2, 2));
115 EvtComplex spinamp[3][2];
117 for (
int dsp = 0; dsp < 3; dsp++) {
118 for (
int lsp = 0; lsp < 2; lsp++) {
119 for (
int dhel = 0; dhel < 3; dhel++) {
120 for (
int lhel = 0; lhel < 2; lhel++) {
122 if (l_num == EM || l_num == MUM || l_num == TAUM) {
123 spinamp[dsp][lsp] += l_SpFromHel[lsp][lhel] * D_SpFromHel[dsp][dhel] * helamp[dhel][lhel];
127 spinamp[dsp][lsp] += l_SpFromHel[lsp][lhel] * D_SpFromHel[dsp][dhel] * (lhel == 0 ? +1 : -1) * (dhel == 1 ? +1 : -1)
128 * conj(helamp[2 - dhel][1 - lhel]);
135 amp.vertex(0, 0, spinamp[0][0]);
136 amp.vertex(0, 1, spinamp[0][1]);
137 amp.vertex(1, 0, spinamp[1][0]);
138 amp.vertex(1, 1, spinamp[1][1]);
139 amp.vertex(2, 0, spinamp[2][0]);
140 amp.vertex(2, 1, spinamp[2][1]);
146 double helprob = abs2(helamp[0][0]) + abs2(helamp[0][1]) + abs2(helamp[1][0]) + abs2(helamp[1][1]) + abs2(helamp[2][0])
147 + abs2(helamp[2][1]);
148 double spinprob = abs2(spinamp[0][0]) + abs2(spinamp[0][1]) + abs2(spinamp[1][0]) + abs2(spinamp[1][1])
149 + abs2(spinamp[2][0]) + abs2(spinamp[2][1]);
150 if (fabs(helprob - spinprob) / helprob > 1
E-6 || !finite(helprob) || !finite(spinprob)) {
151 B2ERROR(
"EvtBSemiTauonicVectorMesonAmplitude total helicity prob does not match with total spin prob, or nan.");
152 B2ERROR(
"helprob: " << helprob <<
" spinprob: " << spinprob);
153 B2ERROR(
"w: " << w <<
" costau: " << costau <<
" hel probs: "
154 << abs2(helamp[0][0]) <<
"\t" << abs2(helamp[0][1]) <<
"\t"
155 << abs2(helamp[1][0]) <<
"\t" << abs2(helamp[1][1]) <<
"\t"
156 << abs2(helamp[2][0]) <<
"\t" << abs2(helamp[2][1]) <<
"\t"
157 << abs2(helamp[0][0]) + abs2(helamp[0][1]) + abs2(helamp[1][0]) + abs2(helamp[1][1]) + abs2(helamp[2][0]) + abs2(helamp[2][1])
160 B2ERROR(
"w: " << w <<
" costau: " << costau <<
" spin probs: "
161 << abs2(spinamp[0][0]) <<
"\t" << abs2(spinamp[0][1]) <<
"\t"
162 << abs2(spinamp[1][0]) <<
"\t" << abs2(spinamp[1][1]) <<
"\t"
163 << abs2(spinamp[2][0]) <<
"\t" << abs2(spinamp[2][1]) <<
"\t"
164 << abs2(spinamp[0][0]) + abs2(spinamp[0][1]) + abs2(spinamp[1][0]) + abs2(spinamp[1][1]) + abs2(spinamp[2][0]) + abs2(spinamp[2][1])
The class calculates the helicity amplitude of semi-tauonic B decays including new physics effects ba...
double getMDst() const
Returns the daughter vector (D*) meson mass.
void setMDst(double m)
Sets the daughter vector (D) meson mass.
EvtComplex helAmp(double mtau, int tauhel, int Dhel, double w, double costau) const
The function calculates the helicity amplitude.
EvtSpinDensity RotateToHelicityBasisInBoostedFrame(const EvtParticle *p, EvtVector4R p4boost)
The function calculates the rotation matrix to convert the spin basis to the helicity basis in the bo...
void CalcAmp(EvtParticle *parent, EvtAmp &, EvtBSemiTauonicHelicityAmplitudeCalculator *HelicityAmplitudeCalculator) override
The function calculates the spin dependent amplitude.
Abstract base class for different kinds of events.