evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtBtoXsgammaAliGreub.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
22 
23 #include "EvtGenBase/EvtConst.hh"
24 #include "EvtGenBase/EvtGenKine.hh"
25 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtPatches.hh"
28 #include "EvtGenBase/EvtRandom.hh"
29 #include "EvtGenBase/EvtReport.hh"
30 
31 #include <stdlib.h>
32 #include <string>
33 using std::endl;
34 
35 void EvtBtoXsgammaAliGreub::init( int nArg, double* /*args*/ )
36 {
37  if ( ( nArg - 1 ) != 0 ) {
38  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
39  << "EvtBtoXsgamma generator model "
40  << "EvtBtoXsgammaAliGreub expected "
41  << "zero arguments but found: " << nArg - 1 << endl;
42  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
43  << "Will terminate execution!" << endl;
44  ::abort();
45  }
46 }
47 
48 double EvtBtoXsgammaAliGreub::GetMass( int Xscode )
49 {
50  // The special lineshape for strange hadrons X_s in b -> s gamma:
51  // An 18 parameter function fitted to the theoretical mass spectrum
52  // of Ali & Greub for a B meson mass of 5.279 GeV; top quark mass of
53  // 174.3 GeV; strange quark mass of 0.48 GeV (tuned to give minimum
54  // M_Xs of 0.64 GeV) and Fermi momentum of 265 MeV for spectator quark
55  // mass of 150 MeV (from CLEO fit). Truncated at max on high side
56  // and min (just above K pi or KK thresold) on low side.
57  double min = 0.64;
58  double max = 4.5;
59  double xbox, ybox, alifit;
60  double mass = 0.0;
61 
62  double par[18];
63  if ( ( Xscode == 30343 ) || ( Xscode == -30343 ) || ( Xscode == 30353 ) ||
64  ( Xscode == -30353 ) ) { // Xsu or Xsd
65  min = 0.6373; // Just above K pi threshold for Xsd/u
66  //min=0.6333; // K pi threshold for neutral Xsd
67  par[0] = -2057.2380371094;
68  par[1] = 2502.2556152344;
69  par[2] = 1151.5632324219;
70  par[3] = 0.82431584596634;
71  par[4] = -4110.5234375000;
72  par[5] = 8445.6757812500;
73  par[6] = -3034.1894531250;
74  par[7] = 1.1557708978653;
75  par[8] = 1765.9311523438;
76  par[9] = 1.3730158805847;
77  par[10] = 0.51371538639069;
78  par[11] = 2.0056934356689;
79  par[12] = 37144.097656250;
80  par[13] = -50296.781250000;
81  par[14] = 27319.095703125;
82  par[15] = -7408.0678710938;
83  par[16] = 1000.8093261719;
84  par[17] = -53.834449768066;
85  } else if ( ( Xscode == 30363 ) || ( Xscode == -30363 ) ) {
86  min = 0.9964; // Just above KK threshold for Xss
87  par[0] = -32263.908203125;
88  par[1] = 57186.589843750;
89  par[2] = -24230.728515625;
90  par[3] = 1.1155973672867;
91  par[4] = -12161.131835938;
92  par[5] = 20162.146484375;
93  par[6] = -7198.8564453125;
94  par[7] = 1.3783323764801;
95  par[8] = 1995.1691894531;
96  par[9] = 1.4655895233154;
97  par[10] = 0.48869228363037;
98  par[11] = 2.1038570404053;
99  par[12] = 55100.058593750;
100  par[13] = -75201.703125000;
101  par[14] = 41096.066406250;
102  par[15] = -11205.986328125;
103  par[16] = 1522.4024658203;
104  par[17] = -82.379623413086;
105  } else {
106  EvtGenReport( EVTGEN_DEBUG, "EvtGen" )
107  << "In EvtBtoXsgammaAliGreub: Particle with id " << Xscode
108  << " is not a Xss particle" << endl;
109  return 0;
110  }
111 
112  double boxheight = par[8];
113  double boxwidth = max - min;
114 
115  while ( ( mass > max ) || ( mass < min ) ) {
116  xbox = EvtRandom::Flat( boxwidth ) + min;
117  ybox = EvtRandom::Flat( boxheight );
118  if ( xbox < par[3] ) {
119  alifit = par[0] + par[1] * xbox + par[2] * pow( xbox, 2 );
120  } else if ( xbox < par[7] ) {
121  alifit = par[4] + par[5] * xbox + par[6] * pow( xbox, 2 );
122  } else if ( xbox < par[11] ) {
123  alifit = par[8] * exp( -0.5 * pow( ( xbox - par[9] ) / par[10], 2 ) );
124  } else {
125  alifit = par[12] + par[13] * xbox + par[14] * pow( xbox, 2 ) +
126  par[15] * pow( xbox, 3 ) + par[16] * pow( xbox, 4 ) +
127  par[17] * pow( xbox, 5 );
128  }
129  if ( ybox > alifit ) {
130  mass = 0.0;
131  } else {
132  mass = xbox;
133  }
134  }
135  return mass;
136 }
void init(int, double *) override
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
double GetMass(int code) override
static double Flat()
Definition: EvtRandom.cpp:72
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240