9 #include <generators/evtgen/EvtGenModelRegister.h>
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"
21 #include "generators/evtgen/models/EvtBtoXsnunu_FERMI.h"
38 return "BTOXSNUNU_FERMI";
48 p->makeDaughters(getNDaug(), getDaugs());
50 EvtParticle* xhadron = p->getDaug(0);
51 EvtParticle* leptonp = p->getDaug(1);
52 EvtParticle* leptonn = p->getDaug(2);
56 findMasses(p, getNDaug(), getDaugs(), mass);
58 double mB = p->mass();
62 double xhadronMass = -999.0;
64 EvtVector4R p4xhadron;
65 EvtVector4R p4leptonp;
66 EvtVector4R p4leptonn;
74 bool FailToSetmb =
true;
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;
88 double mstilda = ms_prob / mb_prob;
91 double sbmax = (1 - mstilda) * (1 - mstilda);
93 double xbox = EvtRandom::Flat(sbmin, sbmax);
96 if (ybox < prob) sb = xbox;
100 EvtVector4R p4sdilep[2];
104 msdilep[1] = sqrt(sb * mb_prob * mb_prob);
106 EvtGenKine::PhaseSpace(2, msdilep, p4sdilep, mb);
116 EvtGenKine::PhaseSpace(2, mll, p4ll, msdilep[1]);
120 p4ll[0] = boostTo(p4ll[0], p4sdilep[1]);
121 p4ll[1] = boostTo(p4ll[1], p4sdilep[1]);
124 double phi = EvtRandom::Flat(EvtConst::twoPi);
125 double costh = EvtRandom::Flat(-1.0, 1.0);
126 double sinth = sqrt(1.0 - costh * costh);
130 EvtVector4R p4b(sqrt(mb * mb + pb * pb),
131 pb * sinth * sin(phi),
132 pb * sinth * cos(phi),
135 EvtVector4R p4s = boostTo(p4sdilep[0], p4b);
136 p4leptonp = boostTo(p4ll[0], p4b);
137 p4leptonn = boostTo(p4ll[1], p4b);
140 EvtVector4R p4q(sqrt(pb * pb +
m_mq *
m_mq), -p4b.get(1), -p4b.get(2), -p4b.get(3));
143 p4xhadron = p4s + p4q;
144 xhadronMass = p4xhadron.mass();
149 xhadron->init(getDaug(0), p4xhadron);
153 leptonp->init(getDaug(1), p4leptonp);
154 leptonn->init(getDaug(2), p4leptonn);
172 checkNArg(0, 3, 4, 6);
178 EvtId lepton1type = getDaug(1);
179 EvtId lepton2type = getDaug(2);
184 if (lepton1type == EvtPDL::getId(
"anti-nu_e") ||
185 lepton1type == EvtPDL::getId(
"nu_e")) {
188 if (lepton2type == EvtPDL::getId(
"anti-nu_e") ||
189 lepton2type == EvtPDL::getId(
"nu_e")) {
192 if (lepton1type == EvtPDL::getId(
"anti-nu_mu") ||
193 lepton1type == EvtPDL::getId(
"nu_mu")) {
196 if (lepton2type == EvtPDL::getId(
"anti-nu_mu") ||
197 lepton2type == EvtPDL::getId(
"nu_mu")) {
200 if (lepton1type == EvtPDL::getId(
"anti-nu_tau") ||
201 lepton1type == EvtPDL::getId(
"nu_tau")) {
204 if (lepton2type == EvtPDL::getId(
"anti-nu_tau") ||
205 lepton2type == EvtPDL::getId(
"nu_tau")) {
209 if (etyp != 2 && mutyp != 2 && tautyp != 2) {
211 std::cout <<
"Expect two neutrinos of the same type in EvtBtoXsnunu.cc\n";
220 if (lepton1type == EvtPDL::getId(
"anti-nu_e") ||
221 lepton1type == EvtPDL::getId(
"anti-nu_mu") ||
222 lepton1type == EvtPDL::getId(
"anti-nu_tau")) {
225 if (lepton2type == EvtPDL::getId(
"nu_e") ||
226 lepton2type == EvtPDL::getId(
"nu_mu") ||
227 lepton2type == EvtPDL::getId(
"nu_tau")) {
231 if (lpos != 1 || lneg != 1) {
233 std::cout <<
"Expect 2nd and 3rd particles to be anti-particle and particle of neutrinos in EvtBtoXsnunu.cc\n";
237 if (getNArg() >= 3) {
245 if (getNArg() >= 4) {
248 if (getNArg() == 6) {
256 double mstilda = ms / mb;
257 double mstilda2 = mstilda * mstilda;
261 double sbmax = (1 - mstilda) * (1 - mstilda);
262 double probMax = -10000.0;
263 double sbProbMax = -10.0;
265 for (
int i = 0; i < nsteps; i++) {
266 double sb = sbmin + (i + 0.0005) * (sbmax - sbmin) / (double)nsteps;
267 double lambda = 1 + mstilda2 * mstilda2 + sb * sb - 2 * (mstilda2 + sb + mstilda2 * sb);
268 double prob = sqrt(lambda) * (3 * sb * (1 + mstilda2 - sb) + lambda);
269 if (prob > probMax) {
276 std::cout <<
"dGdsbProbMax = " << probMax <<
" for sb = " << sbProbMax << std::endl;
290 double mstilda = ms / mb;
293 double mstilda2 = mstilda * mstilda;
295 double lambda = 1 + mstilda2 * mstilda2 + sb * sb - 2 * (mstilda2 + sb + mstilda2 * sb);
297 double prob = sqrt(lambda) * (3 * sb * (1 + mstilda2 - sb) + lambda);
315 double xbox = EvtRandom::Flat(pbmax);
316 double ybox = EvtRandom::Flat();
331 double prsq = (pb * pb) / (pf * pf);
332 double prob = prsq * exp(1.0 - prsq);
double m_mq
mass of spectator quark for the Fermi motion model.
EvtBtoXsnunu_FERMI()
The evtgen model to produce non-resonant B-> Xs nu nubar decay sample.
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.
void decay(EvtParticle *p)
The function to determine kinematics of daughter particles based on dGdsb distribution.
B2_EVTGEN_REGISTER_MODEL(EvtB0toKsKK)
register the model in EvtGen
Abstract base class for different kinds of events.