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/EvtBSemiTauonicScalarMesonAmplitude.h"
16#include "generators/evtgen/models/EvtBSemiTauonicHelicityAmplitudeCalculator.h"
30 static EvtId EM = EvtPDL::getId(
"e-");
31 static EvtId MUM = EvtPDL::getId(
"mu-");
32 static EvtId TAUM = EvtPDL::getId(
"tau-");
39 EvtVector4R p4d = p->getDaug(0)->getP4();
40 EvtVector4R p4l = p->getDaug(1)->getP4();
41 EvtVector4R p4n = p->getDaug(2)->getP4();
42 EvtVector4R p4ln(p4l + p4n);
44 EvtVector4R p4dln = boostTo(p4d, p4ln,
true);
45 EvtVector4R p4lln = boostTo(p4l, p4ln,
true);
47 const double gmB = p->getP4().mass();
48 const double gmd = p4d.mass();
49 const double gr = gmd / gmB;
51 const double q2 = (p4l + p4n).mass2();
52 const double w = (1. + gr * gr - q2 / gmB / gmB) / 2. / gr;
54 const double costau = p4dln.dot(p4lln) / p4dln.d3mag() / p4lln.d3mag();
55 const double ml = p4l.mass();
59 helamp[0] = CalcHelAmp->
helAmp(ml, 1, 2, w, costau);
60 helamp[1] = CalcHelAmp->
helAmp(ml, -1, 2, w, costau);
78 EvtComplex l_SpFromHel[2][2];
79 EvtId l_num = p->getDaug(1)->getId();
81 l_SpFromHel[0][0] = conj(l_HelFromSp.get(0, 0));
82 l_SpFromHel[0][1] = conj(l_HelFromSp.get(1, 0));
83 l_SpFromHel[1][0] = conj(l_HelFromSp.get(0, 1));
84 l_SpFromHel[1][1] = conj(l_HelFromSp.get(1, 1));
93 EvtComplex spinamp[2];
95 for (
int lsp = 0; lsp < 2; lsp++) {
96 for (
int lhel = 0; lhel < 2; lhel++) {
98 if (l_num == EM || l_num == MUM || l_num == TAUM) {
99 spinamp[lsp] += l_SpFromHel[lsp][lhel] * helamp[lhel];
103 spinamp[lsp] += l_SpFromHel[lsp][lhel] * (lhel == 0 ? +1 : -1) * conj(helamp[1 - lhel]);
108 amp.vertex(0, spinamp[0]);
109 amp.vertex(1, spinamp[1]);
112 double helprob = abs2(helamp[0]) + abs2(helamp[1]);
113 double spinprob = abs2(spinamp[0]) + abs2(spinamp[1]);
114 if (fabs(helprob - spinprob) / helprob > 1
E-6 || !finite(helprob) || !finite(spinprob)) {
115 B2ERROR(
"EvtBSemiTauonicScalarMesonAmplitude total helicity prob does not match with total spin prob.");
116 B2ERROR(
"helprob: " << helprob <<
" spinprob: " << spinprob);
117 B2ERROR(
"w: " << w <<
" costau: " << costau <<
" hel probs: " << abs2(helamp[0])
118 <<
"\t" << abs2(helamp[1])
119 <<
"\t" << abs2(helamp[0]) + abs2(helamp[1]));
121 B2ERROR(
"w: " << w <<
" costau: " << costau <<
" spin probs: " << abs2(spinamp[0])
122 <<
"\t" << abs2(spinamp[1])
123 <<
"\t" << abs2(spinamp[0]) + abs2(spinamp[1]));
The class calculates the helicity amplitude of semi-tauonic B decays including new physics effects ba...
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.