BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtBtoXsll.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Module: EvtBtoXsll.cc
9//
10// Description: Routine to generate non-resonant B -> Xs l+ l- decays.
11// It generates a dilepton mass spectrum according to Kruger and Sehgal
12// and then generates the two lepton momenta accoring to Ali et al.
13// The resultant X_s particles may be decayed by JETSET.
14//
15// Modification history:
16//
17// Stephane Willocq Jan 17, 2001 Module created
18// Stephane Willocq Jul 15, 2003 Input model parameters
19//
20//------------------------------------------------------------------------
21//
23
31#include "EvtBtoXsll.hh"
32#include "EvtBtoXsllUtil.hh"
33#include "EvtbTosllAmp.hh"
34#include <stdlib.h>
35using std::endl;
36
38
39void EvtBtoXsll::getName( std::string& model_name ) { model_name = "BTOXSLL"; }
40
42
44
45 // check that there are no arguments
46
47 checkNArg( 0, 4, 5 );
48
49 checkNDaug( 3 );
50
51 // Check that the two leptons are the same type
52
53 EvtId lepton1type = getDaug( 1 );
54 EvtId lepton2type = getDaug( 2 );
55
56 int etyp = 0;
57 int mutyp = 0;
58 int tautyp = 0;
59 if ( lepton1type == EvtPDL::getId( "e+" ) || lepton1type == EvtPDL::getId( "e-" ) )
60 { etyp++; }
61 if ( lepton2type == EvtPDL::getId( "e+" ) || lepton2type == EvtPDL::getId( "e-" ) )
62 { etyp++; }
63 if ( lepton1type == EvtPDL::getId( "mu+" ) || lepton1type == EvtPDL::getId( "mu-" ) )
64 { mutyp++; }
65 if ( lepton2type == EvtPDL::getId( "mu+" ) || lepton2type == EvtPDL::getId( "mu-" ) )
66 { mutyp++; }
67 if ( lepton1type == EvtPDL::getId( "tau+" ) || lepton1type == EvtPDL::getId( "tau-" ) )
68 { tautyp++; }
69 if ( lepton2type == EvtPDL::getId( "tau+" ) || lepton2type == EvtPDL::getId( "tau-" ) )
70 { tautyp++; }
71
72 if ( etyp != 2 && mutyp != 2 && tautyp != 2 )
73 {
74
75 report( ERROR, "EvtGen" ) << "Expect two leptons of the same type in EvtBtoXsll.cc\n";
76 ::abort();
77 }
78
79 // Check that the second and third entries are leptons with positive
80 // and negative charge, respectively
81
82 int lpos = 0;
83 int lneg = 0;
84 if ( lepton1type == EvtPDL::getId( "e+" ) || lepton1type == EvtPDL::getId( "mu+" ) ||
85 lepton1type == EvtPDL::getId( "tau+" ) )
86 { lpos++; }
87 if ( lepton2type == EvtPDL::getId( "e-" ) || lepton2type == EvtPDL::getId( "mu-" ) ||
88 lepton2type == EvtPDL::getId( "tau-" ) )
89 { lneg++; }
90
91 if ( lpos != 1 || lneg != 1 )
92 {
93
94 report( ERROR, "EvtGen" ) << "Expect 2nd and 3rd particles to be positive and negative "
95 "leptons in EvtBtoXsll.cc\n";
96 ::abort();
97 }
98
99 _mb = 4.8;
100 _ms = 0.2;
101 _mq = 0.;
102 _pf = 0.41;
103 _mxmin = 1.1;
104 if ( getNArg() == 4 )
105 {
106 // b-quark mass
107 _mb = getArg( 0 );
108 // s-quark mass
109 _ms = getArg( 1 );
110 // spectator quark mass
111 _mq = getArg( 2 );
112 // Fermi motion parameter
113 _pf = getArg( 3 );
114 }
115 if ( getNArg() == 5 ) { _mxmin = getArg( 4 ); }
116
117 _calcprob = new EvtBtoXsllUtil;
118
119 double ml = EvtPDL::getMeanMass( getDaug( 1 ) );
120
121 // determine the maximum probability density from dGdsProb
122
123 int i, j;
124 int nsteps = 100;
125 double s = 0.0;
126 double smin = 4.0 * ml * ml;
127 double smax = ( _mb - _ms ) * ( _mb - _ms );
128 double probMax = -10000.0;
129 double sProbMax = -10.0;
130 double uProbMax = -10.0;
131
132 for ( i = 0; i < nsteps; i++ )
133 {
134 s = smin + ( i + 0.0005 ) * ( smax - smin ) / (double)nsteps;
135 double prob = _calcprob->dGdsProb( _mb, _ms, ml, s );
136 if ( prob > probMax )
137 {
138 sProbMax = s;
139 probMax = prob;
140 }
141 }
142
143 _dGdsProbMax = probMax;
144
145 if ( verbose() )
146 {
147 report( INFO, "EvtGen" ) << "dGdsProbMax = " << probMax << " for s = " << sProbMax << endl;
148 }
149
150 // determine the maximum probability density from dGdsdupProb
151
152 probMax = -10000.0;
153 sProbMax = -10.0;
154
155 for ( i = 0; i < nsteps; i++ )
156 {
157 s = smin + ( i + 0.0005 ) * ( smax - smin ) / (double)nsteps;
158 double umax =
159 sqrt( ( s - ( _mb + _ms ) * ( _mb + _ms ) ) * ( s - ( _mb - _ms ) * ( _mb - _ms ) ) );
160 for ( j = 0; j < nsteps; j++ )
161 {
162 double u = -umax + ( j + 0.0005 ) * ( 2.0 * umax ) / (double)nsteps;
163 double prob = _calcprob->dGdsdupProb( _mb, _ms, ml, s, u );
164 if ( prob > probMax )
165 {
166 sProbMax = s;
167 uProbMax = u;
168 probMax = prob;
169 }
170 }
171 }
172
173 _dGdsdupProbMax = probMax;
174
175 if ( verbose() )
176 {
177 report( INFO, "EvtGen" ) << "dGdsdupProbMax = " << probMax << " for s = " << sProbMax
178 << " and u = " << uProbMax << endl;
179 }
180}
181
183
185
187
188 EvtParticle* xhadron = p->getDaug( 0 );
189 EvtParticle* leptonp = p->getDaug( 1 );
190 EvtParticle* leptonn = p->getDaug( 2 );
191
192 double mass[3];
193
194 findMasses( p, getNDaug(), getDaugs(), mass );
195
196 double mB = p->mass();
197 double ml = mass[1];
198 double pb;
199
200 int im = 0;
201 static int nmsg = 0;
202 double xhadronMass = -999.0;
203
204 EvtVector4R p4xhadron;
205 EvtVector4R p4leptonp;
206 EvtVector4R p4leptonn;
207
208 // require the hadronic system has mass greater than that of a Kaon pion pair
209
210 // while (xhadronMass < 0.6333)
211 // the above minimum value of K+pi mass appears to be too close
212 // to threshold as far as JETSET is concerned
213 // (JETSET gets caught in an infinite loop)
214 // so we choose a lightly larger value for the threshold
215 while ( xhadronMass < _mxmin )
216 {
217 im++;
218
219 // Apply Fermi motion and determine effective b-quark mass
220
221 // Old BaBar MC parameters
222 // double pf = 0.25;
223 // double ms = 0.2;
224 // double mq = 0.3;
225
226 double mb = 0.0;
227
228 double xbox, ybox;
229
230 while ( mb <= 0.0 )
231 {
232 pb = _calcprob->FermiMomentum( _pf );
233
234 // effective b-quark mass
235 mb = mB * mB + _mq * _mq - 2.0 * mB * sqrt( pb * pb + _mq * _mq );
236 }
237 mb = sqrt( mb );
238
239 // cout << "b-quark momentum = " << pb << " mass = " << mb << endl;
240
241 // generate a dilepton invariant mass
242
243 double s = 0.0;
244 double smin = 4.0 * ml * ml;
245 double smax = ( mb - _ms ) * ( mb - _ms );
246
247 while ( s == 0.0 )
248 {
249 xbox = EvtRandom::Flat( smin, smax );
250 ybox = EvtRandom::Flat( _dGdsProbMax );
251 if ( ybox < _calcprob->dGdsProb( mb, _ms, ml, xbox ) ) { s = xbox; }
252 }
253
254 // cout << "dGdsProb(s) = " << _calcprob->dGdsProb(mb, _ms, ml, s)
255 // << " for s = " << s << endl;
256
257 // two-body decay of b quark at rest into s quark and dilepton pair:
258 // b -> s (ll)
259
260 EvtVector4R p4sdilep[2];
261
262 double msdilep[2];
263 msdilep[0] = _ms;
264 msdilep[1] = sqrt( s );
265
266 EvtGenKine::PhaseSpace( 2, msdilep, p4sdilep, mb );
267
268 // generate dilepton decay with the expected asymmetry: (ll) -> l+ l-
269
270 EvtVector4R p4ll[2];
271
272 double mll[2];
273 mll[0] = ml;
274 mll[1] = ml;
275
276 double tmp = 0.0;
277
278 while ( tmp == 0.0 )
279 {
280 // (ll) -> l+ l- decay in dilepton rest frame
281
282 EvtGenKine::PhaseSpace( 2, mll, p4ll, msdilep[1] );
283
284 // boost to b-quark rest frame
285
286 p4ll[0] = boostTo( p4ll[0], p4sdilep[1] );
287 p4ll[1] = boostTo( p4ll[1], p4sdilep[1] );
288
289 // compute kinematical variable u
290
291 EvtVector4R p4slp = p4sdilep[0] + p4ll[0];
292 EvtVector4R p4sln = p4sdilep[0] + p4ll[1];
293
294 double u = p4slp.mass2() - p4sln.mass2();
295
296 ybox = EvtRandom::Flat( _dGdsdupProbMax );
297
298 double prob = _calcprob->dGdsdupProb( mb, _ms, ml, s, u );
299 if ( prob > _dGdsdupProbMax && nmsg < 20 )
300 {
301 report( INFO, "EvtGen" )
302 << "d2gdsdup GT d2gdsdup_max:" << prob << " " << _dGdsdupProbMax
303 << " for s = " << s << " u = " << u << " mb = " << mb << endl;
304 nmsg++;
305 }
306 if ( ybox < prob )
307 {
308 tmp = 1.0;
309 // cout << "dGdsdupProb(s) = " << prob
310 // << " for u = " << u << endl;
311 }
312 }
313
314 // assign 4-momenta to valence quarks inside B meson in B rest frame
315
316 double phi = EvtRandom::Flat( EvtConst::twoPi );
317 double costh = EvtRandom::Flat( -1.0, 1.0 );
318 double sinth = sqrt( 1.0 - costh * costh );
319
320 // b-quark four-momentum in B meson rest frame
321
322 EvtVector4R p4b( sqrt( mb * mb + pb * pb ), pb * sinth * sin( phi ),
323 pb * sinth * cos( phi ), pb * costh );
324
325 // B meson in its rest frame
326 //
327 // EvtVector4R p4B(mB, 0.0, 0.0, 0.0);
328 //
329 // boost B meson to b-quark rest frame
330 //
331 // p4B = boostTo(p4B, p4b);
332 //
333 // cout << " B meson mass in b-quark rest frame = " << p4B.mass() << endl;
334
335 // boost s, l+ and l- to B meson rest frame
336
337 // EvtVector4R p4s = boostTo(p4sdilep[0], p4B);
338 // p4leptonp = boostTo(p4ll[0], p4B);
339 // p4leptonn = boostTo(p4ll[1], p4B);
340
341 EvtVector4R p4s = boostTo( p4sdilep[0], p4b );
342 p4leptonp = boostTo( p4ll[0], p4b );
343 p4leptonn = boostTo( p4ll[1], p4b );
344
345 // spectator quark in B meson rest frame
346
347 EvtVector4R p4q( sqrt( pb * pb + _mq * _mq ), -p4b.get( 1 ), -p4b.get( 2 ),
348 -p4b.get( 3 ) );
349
350 // hadron system in B meson rest frame
351
352 p4xhadron = p4s + p4q;
353 xhadronMass = p4xhadron.mass();
354
355 // cout << "Xs mass = " << xhadronMass << " trial " << im << endl;
356 }
357
358 // initialize the decay products
359
360 xhadron->init( getDaug( 0 ), p4xhadron );
361
362 // For B-bar mesons (i.e. containing a b quark) we have the normal
363 // order of leptons
364 if ( p->getId() == EvtPDL::getId( "anti-B0" ) || p->getId() == EvtPDL::getId( "B-" ) )
365 {
366 leptonp->init( getDaug( 1 ), p4leptonp );
367 leptonn->init( getDaug( 2 ), p4leptonn );
368 }
369 // For B mesons (i.e. containing a b-bar quark) we need to flip the
370 // role of the positive and negative leptons in order to produce the
371 // correct forward-backward asymmetry between the two leptons
372 else
373 {
374 leptonp->init( getDaug( 1 ), p4leptonn );
375 leptonn->init( getDaug( 2 ), p4leptonp );
376 }
377
378 return;
379}
double mass
character *LEPTONflag integer iresonances real zeta5 real adp3 real large_3 real zeta5 common params adp3 common switch large_3 common lepton LEPTONflag common RESFIT IRESON common RES iresonances common alpgmu era0 common physparams ERMW common leptomass ml
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
@ INFO
Definition EvtReport.hh:52
XmlRpcServer s
EvtDecayBase * clone()
Definition EvtBtoXsll.cc:41
void decay(EvtParticle *p)
void initProbMax()
void init()
Definition EvtBtoXsll.cc:43
virtual ~EvtBtoXsll()
Definition EvtBtoXsll.cc:37
void getName(std::string &name)
Definition EvtBtoXsll.cc:39
static const double twoPi
Definition EvtConst.hh:28
double getArg(int j)
static void findMasses(EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
static double PhaseSpace(int ndaug, double mass[30], EvtVector4R p4[30], double mp)
Definition EvtGenKine.cc:47
Definition EvtId.hh:27
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:43
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
EvtParticle * getDaug(int i)
double mass() const
static double Flat()
Definition EvtRandom.cc:69
double mass() const
double get(int i) const
double mass2() const