Belle II Software development
EvtBtoXsnunu_FERMI.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 <generators/evtgen/EvtGenModelRegister.h>
10
11#include <stdlib.h>
12#include <cmath>
13#include "EvtGenBase/EvtRandom.hh"
14#include "EvtGenBase/EvtParticle.hh"
15#include "EvtGenBase/EvtGenKine.hh"
16#include "EvtGenBase/EvtPDL.hh"
17#include "EvtGenBase/EvtReport.hh"
18#include "EvtGenBase/EvtConst.hh"
19#include "EvtGenBase/EvtId.hh"
20
21#include "generators/evtgen/models/EvtBtoXsnunu_FERMI.h"
22
23using std::endl;
24
25namespace Belle2 {
33
35
37 {
38 return "BTOXSNUNU_FERMI";
39 }
40
42 {
43 return new EvtBtoXsnunu_FERMI;
44 }
45
46 void EvtBtoXsnunu_FERMI::decay(EvtParticle* p)
47 {
48 p->makeDaughters(getNDaug(), getDaugs());
49
50 EvtParticle* xhadron = p->getDaug(0);
51 EvtParticle* leptonp = p->getDaug(1);
52 EvtParticle* leptonn = p->getDaug(2);
53
54 double mass[3];
55
56 findMasses(p, getNDaug(), getDaugs(), mass);
57
58 double mB = p->mass();
59 double ml = mass[1];
60 double pb(0.); // fermi momentum of b-quark
61
62 double xhadronMass = -999.0;
63
64 EvtVector4R p4xhadron;
65 EvtVector4R p4leptonp;
66 EvtVector4R p4leptonn;
67
68 while (xhadronMass < m_mxmin) {
69
70 // Apply Fermi motion and determine effective b-quark mass
71
72 double mb = 0.0;
73
74 bool FailToSetmb = true; // true when an appropriate mb cannot be found
75 while (FailToSetmb) {
76 pb = FermiMomentum(m_pf);
77
78 // effective b-quark mass
79 mb = mB * mB + m_mq * m_mq - 2.0 * mB * sqrt(pb * pb + m_mq * m_mq);
80 if (mb > 0. && sqrt(mb) - m_ms < 2.0 * ml) FailToSetmb = true;
81 else if (mb <= 0.0) FailToSetmb = true;
82 else FailToSetmb = false;
83 }
84 mb = sqrt(mb);
85
86 double mb_prob = m_mb_prob; // b-quark mass for probability density
87 double ms_prob = m_ms_prob; // s-quark mass for probability density
88 double mstilda = ms_prob / mb_prob;
89 double sb = 0.0;
90 double sbmin = 0;
91 double sbmax = (1 - mstilda) * (1 - mstilda);
92 while (sb == 0.0) {
93 double xbox = EvtRandom::Flat(sbmin, sbmax);
94 double ybox = EvtRandom::Flat(m_dGdsbProbMax);
95 double prob = dGdsbProb(xbox);
96 if (ybox < prob) sb = xbox;
97 }
98
99 // b->s (nu nubar)
100 EvtVector4R p4sdilep[2];
101
102 double msdilep[2];
103 msdilep[0] = m_ms;
104 msdilep[1] = sqrt(sb * mb_prob * mb_prob);
105
106 EvtGenKine::PhaseSpace(2, msdilep, p4sdilep, mb);
107
108 // we do not care about neutrino
109 // just (nu nubar) -> nu nubar by phase space
110 EvtVector4R p4ll[2];
111
112 double mll[2];
113 mll[0] = ml;
114 mll[1] = ml;
115
116 EvtGenKine::PhaseSpace(2, mll, p4ll, msdilep[1]);
117
118 // boost to b-quark rest frame
119
120 p4ll[0] = boostTo(p4ll[0], p4sdilep[1]);
121 p4ll[1] = boostTo(p4ll[1], p4sdilep[1]);
122
123 // assign 4-momenta to valence quarks inside B meson in B rest frame
124 double phi = EvtRandom::Flat(EvtConst::twoPi);
125 double costh = EvtRandom::Flat(-1.0, 1.0);
126 double sinth = sqrt(1.0 - costh * costh);
127
128 // b-quark four-momentum in B meson rest frame
129
130 EvtVector4R p4b(sqrt(mb * mb + pb * pb),
131 pb * sinth * sin(phi),
132 pb * sinth * cos(phi),
133 pb * costh);
134
135 EvtVector4R p4s = boostTo(p4sdilep[0], p4b);
136 p4leptonp = boostTo(p4ll[0], p4b);
137 p4leptonn = boostTo(p4ll[1], p4b);
138
139 // spectator quark in B meson rest frame
140 EvtVector4R p4q(sqrt(pb * pb + m_mq * m_mq), -p4b.get(1), -p4b.get(2), -p4b.get(3));
141
142 // hadron system in B meson rest frame
143 p4xhadron = p4s + p4q;
144 xhadronMass = p4xhadron.mass();
145
146 }
147
148 // initialize the decay products
149 xhadron->init(getDaug(0), p4xhadron);
150
151 // assign the momentum of neutrino
152 // it is out of our interest
153 leptonp->init(getDaug(1), p4leptonp);
154 leptonn->init(getDaug(2), p4leptonn);
155
156 return;
157
158 }
159
160
162 {
163 noProbMax();
164 }
165
166
168 {
169
170 // check that there are no arguments
171
172 checkNArg(0, 3, 4, 6);
173
174 checkNDaug(3);
175
176 // Check that the two leptons are the same type
177
178 EvtId lepton1type = getDaug(1);
179 EvtId lepton2type = getDaug(2);
180
181 int etyp = 0;
182 int mutyp = 0;
183 int tautyp = 0;
184 if (lepton1type == EvtPDL::getId("anti-nu_e") ||
185 lepton1type == EvtPDL::getId("nu_e")) {
186 etyp++;
187 }
188 if (lepton2type == EvtPDL::getId("anti-nu_e") ||
189 lepton2type == EvtPDL::getId("nu_e")) {
190 etyp++;
191 }
192 if (lepton1type == EvtPDL::getId("anti-nu_mu") ||
193 lepton1type == EvtPDL::getId("nu_mu")) {
194 mutyp++;
195 }
196 if (lepton2type == EvtPDL::getId("anti-nu_mu") ||
197 lepton2type == EvtPDL::getId("nu_mu")) {
198 mutyp++;
199 }
200 if (lepton1type == EvtPDL::getId("anti-nu_tau") ||
201 lepton1type == EvtPDL::getId("nu_tau")) {
202 tautyp++;
203 }
204 if (lepton2type == EvtPDL::getId("anti-nu_tau") ||
205 lepton2type == EvtPDL::getId("nu_tau")) {
206 tautyp++;
207 }
208
209 if (etyp != 2 && mutyp != 2 && tautyp != 2) {
210
211 std::cout << "Expect two neutrinos of the same type in EvtBtoXsnunu.cc\n";
212 ::abort();
213 }
214
215 // Check that the second and third entries are leptons with positive
216 // and negative charge, respectively
217
218 int lpos = 0;
219 int lneg = 0;
220 if (lepton1type == EvtPDL::getId("anti-nu_e") ||
221 lepton1type == EvtPDL::getId("anti-nu_mu") ||
222 lepton1type == EvtPDL::getId("anti-nu_tau")) {
223 lpos++;
224 } else if (lepton1type == EvtPDL::getId("nu_e") ||
225 lepton1type == EvtPDL::getId("nu_mu") ||
226 lepton1type == EvtPDL::getId("nu_tau")) {
227 lneg++;
228 }
229 if (lepton2type == EvtPDL::getId("nu_e") ||
230 lepton2type == EvtPDL::getId("nu_mu") ||
231 lepton2type == EvtPDL::getId("nu_tau")) {
232 lneg++;
233 } else if (lepton2type == EvtPDL::getId("anti-nu_e") ||
234 lepton2type == EvtPDL::getId("anti-nu_mu") ||
235 lepton2type == EvtPDL::getId("anti-nu_tau")) {
236 lpos++;
237 }
238
239 if (lpos != 1 || lneg != 1) {
240
241 std::cout << "There should be one neutrino and one anti-neutrino in EvtBtoXsnunu.cc\n";
242 ::abort();
243 }
244
245 if (getNArg() >= 3) {
246 // s-quark mass for fermi motion
247 m_ms = getArg(0);
248 // spectator quark mass for fermi motion
249 m_mq = getArg(1);
250 // Fermi motion parameter for fermi motion
251 m_pf = getArg(2);
252 }
253 if (getNArg() >= 4) {
254 m_mxmin = getArg(3);
255 }
256 if (getNArg() == 6) {
257 m_mb_prob = getArg(4);
258 m_ms_prob = getArg(5);
259 }
260
261 // get a maximum probability
262 double mb = m_mb_prob;
263 double ms = m_ms_prob;
264 double mstilda = ms / mb;
265 double mstilda2 = mstilda * mstilda;
266
267 int nsteps = 100;
268 double sbmin = 0;
269 double sbmax = (1 - mstilda) * (1 - mstilda);
270 double probMax = -10000.0;
271 double sbProbMax = -10.0;
272
273 for (int i = 0; i < nsteps; i++) {
274 double sb = sbmin + (i + 0.0005) * (sbmax - sbmin) / (double)nsteps;
275 double lambda = 1 + mstilda2 * mstilda2 + sb * sb - 2 * (mstilda2 + sb + mstilda2 * sb);
276 double prob = sqrt(lambda) * (3 * sb * (1 + mstilda2 - sb) + lambda);
277 if (prob > probMax) {
278 sbProbMax = sb;
279 probMax = prob;
280 }
281 }
282
283 if (verbose()) {
284 std::cout << "dGdsbProbMax = " << probMax << " for sb = " << sbProbMax << std::endl;
285 }
286
287 m_dGdsbProbMax = probMax;
288
289 }
290
292 {
293 // dGdsb: arXiv:1509.06248v2
294 // see (eq.41)
295
296 double mb = m_mb_prob; // b-quark mass for probability density
297 double ms = m_ms_prob; // s-quark mass for probability density
298 double mstilda = ms / mb;
299
300 double sb = _sb;
301 double mstilda2 = mstilda * mstilda;
302
303 double lambda = 1 + mstilda2 * mstilda2 + sb * sb - 2 * (mstilda2 + sb + mstilda2 * sb);
304
305 double prob = sqrt(lambda) * (3 * sb * (1 + mstilda2 - sb) + lambda);
306
307 return prob;
308 }
309
311 {
312 // Pick a value for the b-quark Fermi motion momentum
313 // according to Ali's Gaussian model
314
315 // reference: Ali, Ahmed, et al. "Power corrections in the decay rate and distributions in B->Xs l+l- 2 in the standard model"
316 // see (eq.57)
317
318 double pb, pbmax;
319 pb = 0.0;
320 pbmax = 5.0 * pf;
321
322 while (pb == 0.0) {
323 double xbox = EvtRandom::Flat(pbmax);
324 double ybox = EvtRandom::Flat();
325 if (ybox < FermiMomentumProb(xbox, pf)) { pb = xbox; }
326 }
327
328 return pb;
329 }
330
331 double EvtBtoXsnunu_FERMI::FermiMomentumProb(double pb, double pf)
332 {
333 // Compute probability according to Ali's Gaussian model
334 // the function chosen has a convenient maximum value of 1 for pb = pf
335
336 // reference: Ali, Ahmed, et al. "Power corrections in the decay rate and distributions in B->Xs l+l- 2 in the standard model"
337 // see (eq.57)
338
339 double prsq = (pb * pb) / (pf * pf);
340 double prob = prsq * exp(1.0 - prsq);
341
342 return prob;
343 }
344
346}
347
The evtgen model to produce non-resonant B-> Xs nu nubar decay sample.
double m_mq
mass of spectator quark for the Fermi motion model.
double m_dGdsbProbMax
The maximum value of dGdsb.
double m_mxmin
Minimum mass of Xs.
double m_mb_prob
b-quark mass to calculate dGdsb.
double m_ms
mass of s-quark for the Fermi motion model and EvtGenKine::PhaseSpace.
double m_pf
Parameter for the Fermi motioin model.
double m_ms_prob
s-quark mass to calculate dGdsb.
void init()
The function for an initialization.
double FermiMomentumProb(double pb, double pf)
The function returns a probability based on the Fermi motion model.
double dGdsbProb(double _sb)
The function returns the probability density value depending on sb.
double FermiMomentum(double pf)
The function returns a momentum of b quark.
EvtDecayBase * clone()
The function which makes a copy of the model.
virtual ~EvtBtoXsnunu_FERMI()
Destructor.
void initProbMax()
The function to sets a maximum probability.
std::string getName()
The function which returns the name of the model.
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
void decay(EvtParticle *p)
The function to determine kinematics of daughter particles based on dGdsb distribution.
Abstract base class for different kinds of events.