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.
EvtBsMuMuKK.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/EvtCPUtil.hh"
24 #include "EvtGenBase/EvtConst.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtKine.hh"
27 #include "EvtGenBase/EvtPDL.hh"
29 #include "EvtGenBase/EvtPatches.hh"
30 #include "EvtGenBase/EvtRandom.hh"
31 #include "EvtGenBase/EvtReport.hh"
36 
37 const double pi = EvtConst::pi;
38 const EvtComplex I = EvtComplex( 0.0, 1.0 );
39 const double sq2 = sqrt( 2.0 );
40 
41 std::string EvtBsMuMuKK::getName()
42 {
43  return "BS_MUMUKK";
44 }
45 
47 {
48  return new EvtBsMuMuKK;
49 }
50 
52 {
53  // DecFile parameters
54  checkNArg( 37 );
55 
56  // Non-resonant S wave
57  f_S_NR = getArg( 0 );
58  delta_S_NR = getArg( 1 );
59  phis_S_NR = getArg( 2 );
60  lambda_S_NR_abs = getArg( 3 );
61 
62  // f0 (S wave)
63  f_f0 = getArg( 4 );
64  delta_f0 = getArg( 5 );
65  phis_f0 = getArg( 6 );
66  lambda_f0_abs = getArg( 7 );
67 
68  // phi (P wave)
69  f_phi = getArg( 8 );
70  f_phi_0 = getArg( 9 );
71  delta_phi_0 = getArg( 10 );
72  phis_phi_0 = getArg( 11 );
73  lambda_phi_0_abs = getArg( 12 );
74  f_phi_perp = getArg( 13 );
75  delta_phi_perp = pi - getArg( 14 );
76  phis_phi_perp = getArg( 15 );
78  delta_phi_par = pi - getArg( 17 );
79  phis_phi_par = getArg( 18 );
80  lambda_phi_par_abs = getArg( 19 );
81 
82  // f2' (D wave)
83  f_f2p_0 = getArg( 20 );
84  delta_f2p_0 = getArg( 21 );
85  phis_f2p_0 = getArg( 22 );
86  lambda_f2p_0_abs = getArg( 23 );
87  f_f2p_perp = getArg( 24 );
88  delta_f2p_perp = pi - getArg( 25 );
89  phis_f2p_perp = getArg( 26 );
91  delta_f2p_par = pi - getArg( 28 );
92  phis_f2p_par = getArg( 29 );
93  lambda_f2p_par_abs = getArg( 30 );
94 
95  // Time dependence
96  Gamma = getArg( 31 );
97  deltaGamma = getArg( 32 );
98  deltaMs = getArg( 33 );
99 
100  // mKK window
101  Mf0 = getArg( 34 );
102  kin_lower_limit = getArg( 35 ); // the minimum is approx 2.03*MKp
103  kin_upper_limit = getArg( 36 );
104 
105  // PDG masses
106  MBs = EvtPDL::getMass( EvtPDL::getId( "B_s0" ) );
107  MJpsi = EvtPDL::getMeanMass( EvtPDL::getId( "J/psi" ) );
108  Mphi = EvtPDL::getMeanMass( EvtPDL::getId( "phi" ) );
109  Mf2p = EvtPDL::getMeanMass( EvtPDL::getId( "f'_2" ) );
110  MKp = EvtPDL::getMass( EvtPDL::getId( "K+" ) );
111  MKm = EvtPDL::getMass( EvtPDL::getId( "K-" ) );
112  MK0 = EvtPDL::getMass( EvtPDL::getId( "K0" ) );
113  Mpip = EvtPDL::getMass( EvtPDL::getId( "pi+" ) );
114  Mpi0 = EvtPDL::getMass( EvtPDL::getId( "pi0" ) );
115  Mmu = EvtPDL::getMass( EvtPDL::getId( "mu+" ) );
116 
117  double MBsSq = MBs * MBs;
118 
119  // Amplitudes and other time parameters
120  A_S_NR = sqrt( f_S_NR );
121  A_f0 = sqrt( f_f0 );
122 
123  A_phi_0 = sqrt( f_phi_0 * f_phi );
124  A_phi_perp = sqrt( f_phi_perp * f_phi );
125  // Use fabs to make sure subtractions are >= 0, since subtracting 0 from 0 can give -0
126  A_phi_par = sqrt(
127  fabs( f_phi - A_phi_perp * A_phi_perp - A_phi_0 * A_phi_0 ) );
128 
129  f_f2p = fabs( 1.0 - f_S_NR - f_f0 - f_phi );
130  A_f2p_0 = sqrt( f_f2p_0 * f_f2p );
131  A_f2p_perp = sqrt( f_f2p_perp * f_f2p );
132  A_f2p_par = sqrt(
133  fabs( f_f2p - A_f2p_perp * A_f2p_perp - A_f2p_0 * A_f2p_0 ) );
134 
135  ctau = 1.0 / Gamma;
138 
140 
141  int_const_NR = sqrt(
142  Integral( 1.0, 1.0, 0, 1, 1.0, kin_lower_limit, kin_upper_limit, 0 ) );
143 
144  int_Flatte_f0 = sqrt(
145  Integral( 1.0, Mf0, 0, 1, 1.0, kin_lower_limit, kin_upper_limit, 1 ) );
146 
147  p30Kp_mid_CMS = sqrt( ( pow( kin_middle, 2 ) - pow( MKp + MKm, 2 ) ) *
148  ( pow( kin_middle, 2 ) - pow( MKp - MKm, 2 ) ) ) /
149  ( 2.0 * kin_middle );
150 
151  p30Kp_ll_CMS = sqrt( ( pow( kin_lower_limit, 2 ) - pow( MKp + MKm, 2 ) ) *
152  ( pow( kin_lower_limit, 2 ) - pow( MKp - MKm, 2 ) ) ) /
153  ( 2.0 * kin_lower_limit );
154 
155  p30Kp_phi_CMS = sqrt( ( Mphi * Mphi - pow( MKp + MKm, 2 ) ) *
156  ( Mphi * Mphi - pow( MKp - MKm, 2 ) ) ) /
157  ( 2.0 * Mphi );
158 
159  p30Kp_f2p_CMS = sqrt( ( Mf2p * Mf2p - pow( MKp + MKm, 2 ) ) *
160  ( Mf2p * Mf2p - pow( MKp - MKm, 2 ) ) ) /
161  ( 2.0 * Mf2p );
162 
163  p30Jpsi_mid_CMS = sqrt( ( MBsSq - pow( kin_middle + MJpsi, 2 ) ) *
164  ( MBsSq - pow( kin_middle - MJpsi, 2 ) ) ) /
165  ( 2.0 * MBs );
166 
167  p30Jpsi_ll_CMS = sqrt( ( MBsSq - pow( kin_lower_limit + MJpsi, 2 ) ) *
168  ( MBsSq - pow( kin_lower_limit - MJpsi, 2 ) ) ) /
169  ( 2.0 * MBs );
170 
171  p30Jpsi_phi_CMS = sqrt( ( MBsSq - pow( Mphi + MJpsi, 2 ) ) *
172  ( MBsSq - pow( Mphi - MJpsi, 2 ) ) ) /
173  ( 2.0 * MBs );
174 
175  p30Jpsi_f2p_CMS = sqrt( ( MBsSq - pow( Mf2p + MJpsi, 2 ) ) *
176  ( MBsSq - pow( Mf2p - MJpsi, 2 ) ) ) /
177  ( 2.0 * MBs );
178 
181 
184 
185  // 4 daughters
186  checkNDaug( 4 );
187 
188  // Spin-0 parent
189  checkSpinParent( EvtSpinType::SCALAR ); // B_s0 (anti-B_s0)
190 
191  // Daughters
192  checkSpinDaughter( 0, EvtSpinType::DIRAC ); // mu+ (mu-)
193  checkSpinDaughter( 1, EvtSpinType::DIRAC ); // mu- (mu+)
194  checkSpinDaughter( 2, EvtSpinType::SCALAR ); // K+ (K-)
195  checkSpinDaughter( 3, EvtSpinType::SCALAR ); // K- (K+)
196 
197  // B_s0 parent (Parent must be B_s0 or anti-B_s0)
198  const EvtId p = getParentId();
199  if ( p != EvtPDL::getId( "B_s0" ) && p != EvtPDL::getId( "anti-B_s0" ) ) {
200  assert( 0 );
201  }
202 
203  // Daughter types and ordering (should be mu+-, mu-+, K+-, K-+)
204  const EvtId d1 = getDaug( 0 );
205  const EvtId d2 = getDaug( 1 );
206  const EvtId d3 = getDaug( 2 );
207  const EvtId d4 = getDaug( 3 );
208  if ( !( ( d1 == EvtPDL::getId( "mu+" ) || d1 == EvtPDL::getId( "mu-" ) ) &&
209  ( d2 == EvtPDL::getId( "mu-" ) || d2 == EvtPDL::getId( "mu+" ) ) &&
210  ( d3 == EvtPDL::getId( "K+" ) || d3 == EvtPDL::getId( "K-" ) ) &&
211  ( d4 == EvtPDL::getId( "K-" ) || d4 == EvtPDL::getId( "K+" ) ) ) ) {
212  assert( 0 );
213  }
214 }
215 
216 // Get ProbMax
218 {
219  const EvtComplex term11 = sqrt( p30Jpsi_f2p_CMS * p30Kp_f2p_CMS );
220 
221  const EvtComplex term12 = X_J( 2, p30Kp_f2p_CMS, 0 ) *
222  X_J( 1, p30Jpsi_f2p_CMS, 1 ) * p30Kp_f2p_CMS *
224  ( A_f2p_0 + 0.3 * A_f2p_perp + 0.3 * A_f2p_par );
225 
226  const EvtComplex term13 = f_f2p *
229  int_BW_f2p;
230 
231  const EvtComplex term21 = sqrt( p30Jpsi_phi_CMS * p30Kp_phi_CMS );
232 
233  const EvtComplex term22 = X_J( 1, p30Kp_phi_CMS, 0 ) * p30Kp_phi_CMS *
234  ( 0.65 * A_phi_0 + 0.6 * A_phi_perp +
235  0.6 * A_phi_par );
236 
237  const EvtComplex term23 = f_phi *
240  int_BW_phi;
241 
242  const EvtComplex term31 = sqrt( p30Jpsi_ll_CMS * p30Kp_ll_CMS );
243 
244  const EvtComplex term32 = X_J( 1, p30Jpsi_ll_CMS, 1 ) * p30Jpsi_ll_CMS;
245 
246  const EvtComplex term33 = f_f0 * Flatte( Mf0, kin_lower_limit ) /
248 
249  const EvtComplex term41 = sqrt( p30Jpsi_mid_CMS * p30Kp_mid_CMS );
250 
251  const EvtComplex term42 = X_J( 1, p30Jpsi_mid_CMS, 1 ) * p30Jpsi_mid_CMS;
252 
253  const EvtComplex term43 = 1.2 * f_S_NR / int_const_NR;
254 
255  const EvtComplex hm = term11 * term12 * term13 + term21 * term22 * term23 +
256  term31 * term32 * term33 + term41 * term42 * term43;
257 
258  // Increase by 10%
259  setProbMax( 0.5 * abs2( hm ) * 1.1 );
260 }
261 
262 // Decay function
264 {
265  EvtId other_b;
266  double time( 0.0 );
267  EvtCPUtil::getInstance()->OtherB( p, time, other_b );
268  time = -log( EvtRandom::Flat() ) *
269  ctau; // This overrules the ctau made in OtherB
270 
271  if ( EvtCPUtil::getInstance()->isBsMixed( p ) ) {
272  p->getParent()->setLifetime( time * EvtConst::c / 1e12 ); // units: mm
273  } else {
274  p->setLifetime( time * EvtConst::c / 1e12 ); // units: mm
275  }
276 
277  double DGtime = 0.25 * deltaGamma * time;
278  double DMtime = 0.5 * deltaMs * time;
279  double mt = exp( -DGtime );
280  double pt = exp( +DGtime );
281  double cDMt = cos( DMtime );
282  double sDMt = sin( DMtime );
283  EvtComplex termplus = EvtComplex( cDMt, sDMt );
284  EvtComplex terminus = EvtComplex( cDMt, -sDMt );
285 
286  EvtComplex gplus = 0.5 * ( mt * termplus + pt * terminus );
287  EvtComplex gminus = 0.5 * ( mt * termplus - pt * terminus );
288 
289  EvtId BSB = EvtPDL::getId( "anti-B_s0" );
290 
291  // Flavour: first assume B_s0, otherwise choose anti-B_s0
292  int q( 1 );
293  if ( other_b == BSB ) {
294  q = -1;
295  }
296  p->setAttribute( "q", q );
297 
298  // Amplitudes
299  EvtComplex a_S_NR = AmpTime( q, gplus, gminus, delta_S_NR, lambda_S_NR_abs,
300  A_S_NR, phis_S_NR, -1 );
301 
302  EvtComplex a_f0 = AmpTime( q, gplus, gminus, delta_f0, lambda_f0_abs, A_f0,
303  phis_f0, -1 );
304 
305  EvtComplex a0_phi = AmpTime( q, gplus, gminus, delta_phi_0,
307 
308  EvtComplex aperp_phi = AmpTime( q, gplus, gminus, delta_phi_perp,
310  phis_phi_perp, -1 );
311 
312  EvtComplex apar_phi = AmpTime( q, gplus, gminus, delta_phi_par,
314  1 );
315 
316  EvtComplex a0_f2p = AmpTime( q, gplus, gminus, delta_f2p_0,
318 
319  EvtComplex aperp_f2p = AmpTime( q, gplus, gminus, delta_f2p_perp,
321  phis_f2p_perp, 1 );
322 
323  EvtComplex apar_f2p = AmpTime( q, gplus, gminus, delta_f2p_par,
325  -1 );
326 
327  // Generate 4-momenta
329  double mass[10] = {MJpsi, mKK, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
330  double Kmass[10] = {MKp, MKm, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
331  double muMass[10] = {Mmu, Mmu, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
332 
333  EvtVector4R mypV[2], mypK[2], mypmu[2];
334  EvtGenKine::PhaseSpace( 2, mass, mypV, MBs );
335  EvtGenKine::PhaseSpace( 2, Kmass, mypK, mKK );
336  EvtGenKine::PhaseSpace( 2, muMass, mypmu, MJpsi );
337 
338  EvtVector4R p4mup = boostTo( mypmu[0], mypV[0] );
339  EvtVector4R p4mum = boostTo( mypmu[1], mypV[0] );
340  EvtVector4R p4Kp = boostTo( mypK[0], mypV[1] );
341  EvtVector4R p4Km = boostTo( mypK[1], mypV[1] );
342 
343  p->makeDaughters( getNDaug(), getDaugs() );
344 
345  EvtParticle* thisparticle;
346  EvtParticle *muplus, *muminus, *Kplus, *Kminus;
347 
348  // Check particle ID
349  for ( int k = 0; k <= 3; k++ ) {
350  thisparticle = p->getDaug( k );
351  EvtId pId = thisparticle->getId();
352 
353  if ( pId == EvtPDL::getId( "mu+" ) ) {
354  muplus = thisparticle;
355  muplus->init( getDaug( k ), p4mup );
356 
357  } else if ( pId == EvtPDL::getId( "mu-" ) ) {
358  muminus = thisparticle;
359  muminus->init( getDaug( k ), p4mum );
360 
361  } else if ( pId == EvtPDL::getId( "K+" ) ) {
362  Kplus = thisparticle;
363  Kplus->init( getDaug( k ), p4Kp );
364 
365  } else if ( pId == EvtPDL::getId( "K-" ) ) {
366  Kminus = thisparticle;
367  Kminus->init( getDaug( k ), p4Km );
368  }
369  }
370 
371  EvtVector4R p4KK = p4Kp + p4Km;
372  EvtVector4R p4mumu = p4mup + p4mum;
373  EvtVector4R p4Bs = p4mumu + p4KK;
374 
375  double p4KK_mass2 = p4KK.mass2();
376  double p4KK_mass = p4KK.mass();
377  double p4Bs_mass2 = p4Bs.mass2();
378  double p4Bs_mass = p4Bs.mass();
379 
380  // Kp momentum in the KK CMS
381  double p3Kp_KK_CMS = sqrt( ( p4KK_mass2 - pow( MKp + MKm, 2 ) ) *
382  ( p4KK_mass2 - pow( MKp - MKm, 2 ) ) ) /
383  ( 2.0 * p4KK_mass );
384 
385  // J/psi momentum in the KK CMS
386  double p3Jpsi_KK_CMS = sqrt( ( p4Bs_mass2 - pow( p4KK_mass + MJpsi, 2 ) ) *
387  ( p4Bs_mass2 - pow( p4KK_mass - MJpsi, 2 ) ) ) /
388  ( 2.0 * p4Bs_mass );
389 
390  // Mass lineshapes
391 
392  // Non-resonant S wave
393  EvtComplex P_NR = 1.0 / int_const_NR;
394 
395  // f0 Flatte
396  EvtComplex F_f0 = Flatte( Mf0, p4KK_mass ) / int_Flatte_f0;
397 
398  // phi Breit Wigner
399  EvtComplex BW_phi = Breit_Wigner( Gamma0phi, Mphi, p4KK_mass, 1,
400  p30Kp_phi_CMS, p3Kp_KK_CMS ) /
401  int_BW_phi;
402 
403  // f2' Breit Wigner
404  EvtComplex BW_f2p = Breit_Wigner( Gamma0f2p, Mf2p, p4KK_mass, 1,
405  p30Kp_f2p_CMS, p3Kp_KK_CMS ) /
406  int_BW_f2p;
407 
408  // Barrier factors: Always taking the lowest Bs L
409  double X_KK_0 = 1.0;
410  double X_KK_1 = X_J( 1, p3Kp_KK_CMS, 0 );
411  double X_KK_2 = X_J( 2, p3Kp_KK_CMS, 0 );
412  double X_NR_Jpsi_1 = X_J( 1, p3Jpsi_KK_CMS, 1 );
413  double X_f0_Jpsi_1 = X_J( 1, p3Jpsi_KK_CMS, 1 );
414  double X_phi_Jpsi_0 = 1.0;
415  double X_f2p_Jpsi_1 = X_J( 1, p3Jpsi_KK_CMS, 1 );
416 
417  // Birth momentum factors: pow(p3(K+),LR)* pow(p3(J/psi),LB)
418  double f_PHSP = sqrt( p3Jpsi_KK_CMS * p3Kp_KK_CMS );
419  double f_BMF_NR = p3Jpsi_KK_CMS;
420  double f_BMF_f0 = p3Jpsi_KK_CMS;
421  double f_BMF_phi = p3Kp_KK_CMS;
422  double f_BMF_f2p = p3Kp_KK_CMS * p3Kp_KK_CMS * p3Jpsi_KK_CMS;
423 
424  // Angular distribution and sum over KK states
425  double CosK = EvtDecayAngle( p4Bs, p4KK, p4Kp );
426  double CosMu = EvtDecayAngle( p4Bs, p4mumu, p4mup );
427  double chi = EvtDecayAngleChi( p4Bs, p4mup, p4mum, p4Kp, p4Km );
428 
429  // Build helicity amplitudes
430 
431  // phi
432  EvtComplex H0_phi = a0_phi;
433  EvtComplex Hp_phi = ( apar_phi + aperp_phi ) / sq2;
434  EvtComplex Hm_phi = ( apar_phi - aperp_phi ) / sq2;
435 
436  // f2p
437  EvtComplex H0_f2p = a0_f2p;
438  EvtComplex Hp_f2p = ( apar_f2p + aperp_f2p ) / sq2;
439  EvtComplex Hm_f2p = ( apar_f2p - aperp_f2p ) / sq2;
440 
441  // muon polarization +1
442  EvtComplex swaveangdist1 = AngularDist( 0, 0, 1, CosK, CosMu, chi );
443 
444  // KK Spin-0 NR
445  EvtComplex mp_hS_NR = a_S_NR * swaveangdist1;
446  EvtComplex Amp_p_NR = P_NR * X_KK_0 * X_NR_Jpsi_1 * f_BMF_NR * mp_hS_NR;
447 
448  // KK Spin-0 f0
449  EvtComplex mp_h_f0 = a_f0 * swaveangdist1;
450  EvtComplex Amp_p_f0 = F_f0 * X_KK_0 * X_f0_Jpsi_1 * f_BMF_f0 * mp_h_f0;
451 
452  // KK Spin-1
453  EvtComplex mp_h0_phi = H0_phi * AngularDist( 1, 0, 1, CosK, CosMu, chi );
454  EvtComplex mp_hp_phi = Hp_phi * AngularDist( 1, 1, 1, CosK, CosMu, chi );
455  EvtComplex mp_hm_phi = Hm_phi * AngularDist( 1, -1, 1, CosK, CosMu, chi );
456  EvtComplex Amp_p_phi = BW_phi * X_KK_1 * X_phi_Jpsi_0 * f_BMF_phi *
457  ( mp_h0_phi + mp_hp_phi + mp_hm_phi );
458 
459  // KK Spin-2
460  EvtComplex mp_h0_f2p = H0_f2p * AngularDist( 2, 0, 1, CosK, CosMu, chi );
461  EvtComplex mp_hp_f2p = Hp_f2p * AngularDist( 2, 1, 1, CosK, CosMu, chi );
462  EvtComplex mp_hm_f2p = Hm_f2p * AngularDist( 2, -1, 1, CosK, CosMu, chi );
463  EvtComplex Amp_p_f2p = BW_f2p * X_KK_2 * X_f2p_Jpsi_1 * f_BMF_f2p *
464  ( mp_h0_f2p + mp_hp_f2p + mp_hm_f2p );
465 
466  // muon polarization -1
467  EvtComplex swaveangdist2 = AngularDist( 0, 0, -1, CosK, CosMu, chi );
468 
469  // KK Spin-0 NR
470  EvtComplex mm_hS_NR = a_S_NR * swaveangdist2;
471  EvtComplex Amp_m_NR = P_NR * X_KK_0 * X_NR_Jpsi_1 * f_BMF_NR * mm_hS_NR;
472 
473  // KK Spin-0
474  EvtComplex mm_h_f0 = a_f0 * swaveangdist2;
475  EvtComplex Amp_m_f0 = F_f0 * X_KK_0 * X_f0_Jpsi_1 * f_BMF_f0 * mm_h_f0;
476 
477  // KK Spin-1
478  EvtComplex mm_h0_phi = H0_phi * AngularDist( 1, 0, -1, CosK, CosMu, chi );
479  EvtComplex mm_hp_phi = Hp_phi * AngularDist( 1, +1, -1, CosK, CosMu, chi );
480  EvtComplex mm_hm_phi = Hm_phi * AngularDist( 1, -1, -1, CosK, CosMu, chi );
481  EvtComplex Amp_m_phi = BW_phi * X_KK_1 * X_phi_Jpsi_0 * f_BMF_phi *
482  ( mm_h0_phi + mm_hp_phi + mm_hm_phi );
483 
484  // KK Spin-2
485  EvtComplex mm_h0_f2p = H0_f2p * AngularDist( 2, 0, -1, CosK, CosMu, chi );
486  EvtComplex mm_hp_f2p = Hp_f2p * AngularDist( 2, 1, -1, CosK, CosMu, chi );
487  EvtComplex mm_hm_f2p = Hm_f2p * AngularDist( 2, -1, -1, CosK, CosMu, chi );
488  EvtComplex Amp_m_f2p = BW_f2p * X_KK_2 * X_f2p_Jpsi_1 * f_BMF_f2p *
489  ( mm_h0_f2p + mm_hp_f2p + mm_hm_f2p );
490 
491  // Total amplitudes
492  EvtComplex Amp_tot_plus = f_PHSP *
493  ( Amp_p_NR + Amp_p_f0 + Amp_p_phi + Amp_p_f2p );
494  EvtComplex Amp_tot_minus = f_PHSP *
495  ( Amp_m_NR + Amp_m_f0 + Amp_m_phi + Amp_m_f2p );
496 
497  vertex( 0, 0, 0.0 );
498  vertex( 0, 1, Amp_tot_plus );
499  vertex( 1, 0, Amp_tot_minus );
500  vertex( 1, 1, 0.0 );
501 }
502 
503 // Rho function
504 EvtComplex EvtBsMuMuKK::GetRho( const double m0, const double m ) const
505 {
506  double rho_sq = 1.0 - ( 4.0 * m0 * m0 / ( m * m ) );
507  EvtComplex rho;
508 
509  if ( rho_sq > 0.0 ) {
510  rho = EvtComplex( sqrt( rho_sq ), 0.0 );
511  } else {
512  rho = EvtComplex( 0.0, sqrt( -rho_sq ) );
513  }
514 
515  return rho;
516 }
517 
518 // Flatte function
519 EvtComplex EvtBsMuMuKK::Flatte( const double m0, const double m ) const
520 {
521  double gpipi = 0.167;
522  double gKK = 3.05 * gpipi;
523 
524  EvtComplex term1 = ( 2.0 * GetRho( Mpip, m ) + GetRho( Mpi0, m ) ) / 3.0;
525  EvtComplex term2 = ( GetRho( MKp, m ) + GetRho( MK0, m ) ) / 2.0;
526 
527  EvtComplex w = gpipi * term1 + gKK * term2;
528 
529  EvtComplex Flatte_0 = 1.0 / ( m0 * m0 - m * m - I * m0 * w );
530 
531  return Flatte_0;
532 }
533 
534 // Breit-Wigner function
535 EvtComplex EvtBsMuMuKK::Breit_Wigner( const double Gamma0, const double m0,
536  const double m, const int J,
537  const double q0, const double q ) const
538 {
539  double X_J_q0_sq = pow( X_J( J, q0, 0 ), 2 );
540  double X_J_q_sq = pow( X_J( J, q, 0 ), 2 );
541 
542  double Gamma = Gamma0 * pow( q / q0, 2 * J + 1 ) * ( m0 / m ) *
543  ( X_J_q_sq / X_J_q0_sq );
544 
545  return 1.0 / ( m0 * m0 - m * m - I * m0 * Gamma );
546 }
547 
548 // Integral
549 double EvtBsMuMuKK::Integral( const double Gamma0, const double m0, const int JR,
550  const int JB, const double q0, const double M_KK_ll,
551  const double M_KK_ul, const int fcntype ) const
552 {
553  int bins = 1000;
554  double bin_width = ( M_KK_ul - M_KK_ll ) / static_cast<double>( bins );
555  EvtComplex integral( 0.0, 0.0 );
556  double sumMKpKm2 = pow( MKp + MKm, 2 );
557  double diffMKpKm2 = pow( MKp - MKm, 2 );
558  double MBs2 = pow( MBs, 2 );
559 
560  for ( int i = 0; i < bins; i++ ) {
561  double M_KK_i = M_KK_ll + static_cast<double>( i ) * bin_width;
562  double M_KK_f = M_KK_ll + static_cast<double>( i + 1 ) * bin_width;
563  double M_KK_i_sq = M_KK_i * M_KK_i;
564  double M_KK_f_sq = M_KK_f * M_KK_f;
565 
566  double p3Kp_KK_CMS_i = sqrt( ( M_KK_i_sq - sumMKpKm2 ) *
567  ( M_KK_i_sq - diffMKpKm2 ) ) /
568  ( 2.0 * M_KK_i );
569  double p3Kp_KK_CMS_f = sqrt( ( M_KK_f_sq - sumMKpKm2 ) *
570  ( M_KK_f_sq - diffMKpKm2 ) ) /
571  ( 2.0 * M_KK_f );
572 
573  double p3Jpsi_Bs_CMS_i = sqrt( ( MBs2 - pow( M_KK_i + MJpsi, 2 ) ) *
574  ( MBs2 - pow( M_KK_i - MJpsi, 2 ) ) ) /
575  ( 2.0 * MBs );
576  double p3Jpsi_Bs_CMS_f = sqrt( ( MBs2 - pow( M_KK_f + MJpsi, 2 ) ) *
577  ( MBs2 - pow( M_KK_f - MJpsi, 2 ) ) ) /
578  ( 2.0 * MBs );
579 
580  double f_PHSP_i = sqrt( p3Kp_KK_CMS_i * p3Jpsi_Bs_CMS_i );
581  double f_PHSP_f = sqrt( p3Kp_KK_CMS_f * p3Jpsi_Bs_CMS_f );
582 
583  double f_MBF_KK_i = pow( p3Kp_KK_CMS_i, JR );
584  double f_MBF_KK_f = pow( p3Kp_KK_CMS_f, JR );
585 
586  double f_MBF_Bs_i = pow( p3Jpsi_Bs_CMS_i, JB );
587  double f_MBF_Bs_f = pow( p3Jpsi_Bs_CMS_f, JB );
588 
589  double X_JR_i = X_J( JR, p3Kp_KK_CMS_i, 0 );
590  double X_JR_f = X_J( JR, p3Kp_KK_CMS_f, 0 );
591 
592  double X_JB_i = X_J( JB, p3Jpsi_Bs_CMS_i, 1 );
593  double X_JB_f = X_J( JB, p3Jpsi_Bs_CMS_f, 1 );
594 
595  EvtComplex fcn_i( 1.0, 0.0 ), fcn_f( 1.0, 0.0 );
596 
597  if ( fcntype == 1 ) {
598  fcn_i = Flatte( m0, M_KK_i );
599  fcn_f = Flatte( m0, M_KK_f );
600 
601  } else if ( fcntype == 2 ) {
602  fcn_i = Breit_Wigner( Gamma0, m0, M_KK_i, JR, q0, p3Kp_KK_CMS_i );
603  fcn_f = Breit_Wigner( Gamma0, m0, M_KK_f, JR, q0, p3Kp_KK_CMS_f );
604  }
605 
606  EvtComplex a_i = f_PHSP_i * f_MBF_KK_i * f_MBF_Bs_i * X_JR_i * X_JB_i *
607  fcn_i;
608  EvtComplex a_st_i = conj( a_i );
609  EvtComplex a_f = f_PHSP_f * f_MBF_KK_f * f_MBF_Bs_f * X_JR_f * X_JB_f *
610  fcn_f;
611  EvtComplex a_st_f = conj( a_f );
612 
613  integral += 0.5 * bin_width * ( a_i * a_st_i + a_f * a_st_f );
614  }
615 
616  return sqrt( abs2( integral ) );
617 }
618 
619 // Blatt-Weisskopf barrier factors
620 double EvtBsMuMuKK::X_J( const int J, const double q, const int isB ) const
621 {
622  double r_BW = 1.0;
623 
624  if ( isB == 0 ) {
625  r_BW = 1.5;
626  } else if ( isB == 1 ) {
627  r_BW = 5.0;
628  }
629 
630  double zsq = pow( r_BW * q, 2 );
631 
632  double X_J( 1.0 );
633 
634  if ( J == 1 ) {
635  X_J = sqrt( 1.0 / ( 1.0 + zsq ) );
636  } else if ( J == 2 ) {
637  X_J = sqrt( 1.0 / ( zsq * zsq + 3.0 * zsq + 9.0 ) );
638  }
639 
640  return X_J;
641 }
642 
643 // EvtGen d matrix: Input is 2J instead of J etc
644 double EvtBsMuMuKK::Wignerd( const int J, const int l, const int alpha,
645  const double theta ) const
646 {
647  return EvtdFunction::d( 2 * J, 2 * l, 2 * alpha, theta );
648 }
649 
650 // J spin of KK, l spin proj of J/psi, alpha dimuon spin
651 EvtComplex EvtBsMuMuKK::AngularDist( const int J, const int l, const int alpha,
652  const double cK, const double cL,
653  const double chi ) const
654 {
655  double thetaL = acos( cL );
656  double thetaK = acos( cK );
657 
658  EvtComplex out = 0.5 * sqrt( ( 2 * J + 1 ) / pi ) *
659  exp( EvtComplex( 0, -l * chi ) );
660 
661  out *= Wignerd( 1, l, alpha, thetaL ) * Wignerd( J, -l, 0, thetaK );
662 
663  return out;
664 }
665 
666 // Time-dependent amplitude calculation
667 EvtComplex EvtBsMuMuKK::AmpTime( const int q, const EvtComplex& gplus,
668  const EvtComplex& gminus, const double delta,
669  const double lambda_abs, const double Amp,
670  const double phis, const int eta ) const
671 {
672  EvtComplex amp_time = Amp * EvtComplex( cos( -delta ), sin( -delta ) );
673  double qphis = q * phis;
674  amp_time *= ( gplus + eta * pow( lambda_abs, -1.0 * q ) *
675  EvtComplex( cos( qphis ), sin( qphis ) ) * gminus );
676 
677  if ( q == 1 ) {
678  amp_time *= eta;
679  }
680 
681  return amp_time;
682 }
double Mf2p
Definition: EvtBsMuMuKK.hh:69
double f_phi
Definition: EvtBsMuMuKK.hh:75
double delta_phi_perp
Definition: EvtBsMuMuKK.hh:78
double p30Jpsi_mid_CMS
Definition: EvtBsMuMuKK.hh:73
EvtComplex GetRho(const double m0, const double m) const
void setAttribute(std::string attName, int attValue)
Definition: EvtParticle.hh:418
double phis_f2p_perp
Definition: EvtBsMuMuKK.hh:81
double p30Jpsi_f2p_CMS
Definition: EvtBsMuMuKK.hh:73
double delta_f2p_0
Definition: EvtBsMuMuKK.hh:79
EvtComplex Flatte(const double m0, const double m) const
EvtComplex AmpTime(const int q, const EvtComplex &gplus, const EvtComplex &gminus, const double delta, const double lambda_abs, const double Amp, const double phis, const int eta) const
double delta_S_NR
Definition: EvtBsMuMuKK.hh:78
double delta_f2p_perp
Definition: EvtBsMuMuKK.hh:79
double Mpip
Definition: EvtBsMuMuKK.hh:69
double Integral(const double Gamma0, const double m0, const int JR, const int JB, const double q0, const double M_KK_ll, const double M_KK_ul, const int fcntype) const
double lambda_phi_perp_abs
Definition: EvtBsMuMuKK.hh:82
double kin_lower_limit
Definition: EvtBsMuMuKK.hh:71
double EvtDecayAngleChi(const EvtVector4R &, const EvtVector4R &, const EvtVector4R &, const EvtVector4R &, const EvtVector4R &)
Definition: EvtKine.cpp:49
EvtParticle * getParent() const
Definition: EvtParticle.cpp:96
double f_phi_perp
Definition: EvtBsMuMuKK.hh:75
double Mmu
Definition: EvtBsMuMuKK.hh:69
double getArg(unsigned int j)
void decay(EvtParticle *p) override
double p30Kp_f2p_CMS
Definition: EvtBsMuMuKK.hh:72
double int_const_NR
Definition: EvtBsMuMuKK.hh:74
double int_BW_phi
Definition: EvtBsMuMuKK.hh:74
double Mphi
Definition: EvtBsMuMuKK.hh:69
void init() override
Definition: EvtBsMuMuKK.cpp:51
std::string getName() override
Definition: EvtBsMuMuKK.cpp:41
double delta_f2p_par
Definition: EvtBsMuMuKK.hh:79
double phis_phi_par
Definition: EvtBsMuMuKK.hh:80
double Gamma0phi
Definition: EvtBsMuMuKK.hh:70
void initProbMax() override
double int_BW_f2p
Definition: EvtBsMuMuKK.hh:74
double delta_f0
Definition: EvtBsMuMuKK.hh:78
double A_phi_0
Definition: EvtBsMuMuKK.hh:76
double p30Kp_mid_CMS
Definition: EvtBsMuMuKK.hh:72
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
double lambda_S_NR_abs
Definition: EvtBsMuMuKK.hh:82
double MKm
Definition: EvtBsMuMuKK.hh:69
double Wignerd(int J, int l, int alpha, double theta) const
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cpp:172
const double sq2
Definition: EvtBsMuMuKK.cpp:39
double mass() const
Definition: EvtVector4R.cpp:49
double Gamma0f2p
Definition: EvtBsMuMuKK.hh:70
double deltaGamma
Definition: EvtBsMuMuKK.hh:85
double f_phi_0
Definition: EvtBsMuMuKK.hh:75
double lambda_f0_abs
Definition: EvtBsMuMuKK.hh:82
double f_f0
Definition: EvtBsMuMuKK.hh:75
double Gamma
Definition: EvtBsMuMuKK.hh:85
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
double abs2(const EvtComplex &c)
Definition: EvtComplex.hh:209
EvtId getId() const
double A_S_NR
Definition: EvtBsMuMuKK.hh:76
double MJpsi
Definition: EvtBsMuMuKK.hh:69
void makeDaughters(unsigned int ndaug, EvtId *id)
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
double lambda_f2p_0_abs
Definition: EvtBsMuMuKK.hh:83
double int_Flatte_f0
Definition: EvtBsMuMuKK.hh:74
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
void setLifetime(double tau)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
double phis_S_NR
Definition: EvtBsMuMuKK.hh:80
double p30Kp_ll_CMS
Definition: EvtBsMuMuKK.hh:72
double lambda_f2p_par_abs
Definition: EvtBsMuMuKK.hh:84
void setProbMax(double prbmx)
double X_J(const int J, const double q, const int isB) const
double deltaMs
Definition: EvtBsMuMuKK.hh:85
Definition: EvtId.hh:27
EvtDecayBase * clone() override
Definition: EvtBsMuMuKK.cpp:46
static const double pi
Definition: EvtConst.hh:26
double phis_phi_perp
Definition: EvtBsMuMuKK.hh:80
double lambda_f2p_perp_abs
Definition: EvtBsMuMuKK.hh:83
EvtId getParentId() const
Definition: EvtDecayBase.hh:61
double delta_phi_par
Definition: EvtBsMuMuKK.hh:78
const double pi
Definition: EvtBsMuMuKK.cpp:37
double mass2() const
Definition: EvtVector4R.hh:100
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double p30Jpsi_ll_CMS
Definition: EvtBsMuMuKK.hh:73
double MK0
Definition: EvtBsMuMuKK.hh:69
double lambda_phi_0_abs
Definition: EvtBsMuMuKK.hh:82
void checkNDaug(int d1, int d2=-1)
double MBs
Definition: EvtBsMuMuKK.hh:69
void checkSpinParent(EvtSpinType::spintype sp)
static double Flat()
Definition: EvtRandom.cpp:72
double f_f2p_perp
Definition: EvtBsMuMuKK.hh:75
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static const double c
Definition: EvtConst.hh:30
double A_phi_par
Definition: EvtBsMuMuKK.hh:76
double ctau
Definition: EvtBsMuMuKK.hh:85
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
double A_phi_perp
Definition: EvtBsMuMuKK.hh:76
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
double delta_phi_0
Definition: EvtBsMuMuKK.hh:78
static double PhaseSpace(int ndaug, double mass[30], EvtVector4R p4[30], double mp)
Definition: EvtGenKine.cpp:46
double kin_upper_limit
Definition: EvtBsMuMuKK.hh:71
double phis_f0
Definition: EvtBsMuMuKK.hh:80
double A_f2p_0
Definition: EvtBsMuMuKK.hh:76
double Mpi0
Definition: EvtBsMuMuKK.hh:69
static double getWidth(EvtId i)
Definition: EvtPDL.cpp:352
double A_f2p_perp
Definition: EvtBsMuMuKK.hh:76
double EvtDecayAngle(const EvtVector4R &, const EvtVector4R &, const EvtVector4R &)
Definition: EvtKine.cpp:33
int getNDaug() const
Definition: EvtDecayBase.hh:65
double phis_f2p_par
Definition: EvtBsMuMuKK.hh:81
double kin_middle
Definition: EvtBsMuMuKK.hh:71
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240
double p30Jpsi_phi_CMS
Definition: EvtBsMuMuKK.hh:73
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
double f_S_NR
Definition: EvtBsMuMuKK.hh:75
double lambda_phi_par_abs
Definition: EvtBsMuMuKK.hh:83
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
double A_f0
Definition: EvtBsMuMuKK.hh:76
double f_f2p
Definition: EvtBsMuMuKK.hh:75
const EvtComplex I
Definition: EvtBsMuMuKK.cpp:38
double f_f2p_0
Definition: EvtBsMuMuKK.hh:75
static double getMass(EvtId i)
Definition: EvtPDL.cpp:319
double phis_f2p_0
Definition: EvtBsMuMuKK.hh:81
double Mf0
Definition: EvtBsMuMuKK.hh:69
static double d(int j, int m1, int m2, double theta)
EvtComplex AngularDist(int J, int l, int alpha, double cK, double cL, double chi) const
EvtComplex Breit_Wigner(const double Gamma0, const double m0, const double m, const int J, const double q0, const double q) const
double A_f2p_par
Definition: EvtBsMuMuKK.hh:77
double phis_phi_0
Definition: EvtBsMuMuKK.hh:80
double p30Kp_phi_CMS
Definition: EvtBsMuMuKK.hh:72
double MKp
Definition: EvtBsMuMuKK.hh:69
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67