Belle II Software  release-08-01-10
EvtBSemiTauonicScalarMesonAmplitude.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/EvtParticle.hh"
10 #include "EvtGenBase/EvtPDL.hh"
11 #include "EvtGenBase/EvtId.hh"
12 #include "EvtGenBase/EvtAmp.hh"
13 
14 #include "framework/logging/Logger.h"
15 #include "generators/evtgen/models/EvtBSemiTauonicScalarMesonAmplitude.h"
16 #include "generators/evtgen/models/EvtBSemiTauonicHelicityAmplitudeCalculator.h"
17 
18 namespace Belle2 {
26  EvtAmp& amp,
28  {
29 
30  static EvtId EM = EvtPDL::getId("e-");
31  static EvtId MUM = EvtPDL::getId("mu-");
32  static EvtId TAUM = EvtPDL::getId("tau-");
33 // static EvtId EP = EvtPDL::getId("e+");
34 // static EvtId MUP = EvtPDL::getId("mu+");
35 // static EvtId TAUP = EvtPDL::getId("tau+");
36 
37  // calculate w and costau
38 
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);
43 
44  EvtVector4R p4dln = boostTo(p4d, p4ln, true);
45  EvtVector4R p4lln = boostTo(p4l, p4ln, true);
46 
47  const double gmB = p->getP4().mass();
48  const double gmd = p4d.mass();
49  const double gr = gmd / gmB;
50 
51  const double q2 = (p4l + p4n).mass2();
52  const double w = (1. + gr * gr - q2 / gmB / gmB) / 2. / gr;
53  // const double w=CalcHelAmp->wfunc(2,q2); avoid possible w<0 caused by the decay width
54  const double costau = p4dln.dot(p4lln) / p4dln.d3mag() / p4lln.d3mag();
55  const double ml = p4l.mass();
56 
57  // obtain helicity amplitudes
58  EvtComplex helamp[2]; // tauhel={1,-1}
59  helamp[0] = CalcHelAmp->helAmp(ml, 1, 2, w, costau); // note the parameter order is tauhel, Dhel
60  helamp[1] = CalcHelAmp->helAmp(ml, -1, 2, w, costau); // Dhel=2 ==> D meson
61 
62  // lepton theta and phi in l+nu rest frame
63  //const double l_theta=acos(p4lln.get(3)/p4lln.d3mag());
64  //const double l_phi=atan2(p4lln.get(2),p4lln.get(1));
65 
66  // spin (in l rest frame) -> helicity (in l+nu rest frame) rotation matrix
67  // ( sp0->hel0 , sp1->hel0 )
68  // ( sp0->hel1 , sp1->hel1 )
69  EvtSpinDensity l_HelFromSp = RotateToHelicityBasisInBoostedFrame(p->getDaug(1),
70  p4ln);
71 // l_phi,
72 // l_theta,
73 // -l_phi);
74 
75  // helicity (in l+nu rest frame) -> spin (in l rest frame) rotation matrix
76  // ( hel0->sp0 , hel1->sp0 )
77  // ( hel0->sp1 , hel1->sp1 )
78  EvtComplex l_SpFromHel[2][2]; // {0,1} from {1,-1}
79  EvtId l_num = p->getDaug(1)->getId();
80 // if (l_num == EM || l_num == MUM || l_num == TAUM) {
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));
85 // } else {
86 // l_SpFromHel[0][1] = conj(l_HelFromSp.get(0, 0));
87 // l_SpFromHel[0][0] = conj(l_HelFromSp.get(1, 0));
88 // l_SpFromHel[1][1] = conj(l_HelFromSp.get(0, 1));
89 // l_SpFromHel[1][0] = conj(l_HelFromSp.get(1, 1));
90 // }
91 
92  // calculate spin amplitudes
93  EvtComplex spinamp[2];
94 
95  for (int lsp = 0; lsp < 2; lsp++) {
96  for (int lhel = 0; lhel < 2; lhel++) {
97  // b -> l
98  if (l_num == EM || l_num == MUM || l_num == TAUM) {
99  spinamp[lsp] += l_SpFromHel[lsp][lhel] * helamp[lhel];
100  }
101  // b-bar -> anti-l
102  else {
103  spinamp[lsp] += l_SpFromHel[lsp][lhel] * (lhel == 0 ? +1 : -1) * conj(helamp[1 - lhel]);
104  }
105  }
106  }
107 
108  amp.vertex(0, spinamp[0]);
109  amp.vertex(1, spinamp[1]);
110 
111  // consistency check
112  double helprob = abs2(helamp[0]) + abs2(helamp[1]);
113  double spinprob = abs2(spinamp[0]) + abs2(spinamp[1]);
114  if (fabs(helprob - spinprob) / helprob > 1E-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]));
120 
121  B2ERROR("w: " << w << " costau: " << costau << " spin probs: " << abs2(spinamp[0])
122  << "\t" << abs2(spinamp[1])
123  << "\t" << abs2(spinamp[0]) + abs2(spinamp[1]));
124 
125 // EvtGenReport(EVTGEN_ERROR, "EvtGen") <<
126 // "EvtBSemiTauonicScalarMesonAmplitude total helicity prob does not match with total spin prob."
127 // << std::endl;
128 // EvtGenReport(EVTGEN_ERROR, "EvtGen") << "helprob: "<<helprob<<" spinprob: "<<spinprob<<std::endl;
129 // EvtGenReport(EVTGEN_ERROR, "EvtGen") << "w: "<<w<<" costau: "<<costau
130 // <<" hel probs: "<<abs2(helamp[0])
131 // <<"\t"<<abs2(helamp[1])
132 // <<"\t"<<abs2(helamp[0])+abs2(helamp[1])<<std::endl;
133 //
134 // EvtGenReport(EVTGEN_ERROR, "EvtGen") << "w: "<<w<<" costau: "<<costau
135 // <<" spin probs: "<<abs2(spinamp[0])
136 // <<"\t"<<abs2(spinamp[1])
137 // <<"\t"<<abs2(spinamp[0])+abs2(spinamp[1])<<std::endl;
138  // abort();
139  }
140 
141  return;
142  }
143 
145 } // Belle 2 Namespace
R E
internal precision of FFTW codelets
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 &amp, EvtBSemiTauonicHelicityAmplitudeCalculator *HelicityAmplitudeCalculator) override
The function calculates the spin dependent amplitude.
Abstract base class for different kinds of events.