10#include "CLHEP/Matrix/Matrix.h"
11#include "CLHEP/Matrix/SymMatrix.h"
12#include "CLHEP/Matrix/Vector.h"
13#include "CLHEP/Random/RandFlat.h"
14#include "CLHEP/Vector/LorentzVector.h"
15#include "CLHEP/Vector/ThreeVector.h"
16#include "CLHEP/Vector/TwoVector.h"
17using CLHEP::Hep2Vector;
18using CLHEP::Hep3Vector;
19using CLHEP::HepLorentzVector;
20using CLHEP::HepVector;
29 tan2thetaC = ( 0.22650 * 0.22650 ) /
30 ( 1. - ( 0.22650 * 0.22650 ) );
31 pi180inv = 1.0 * 3.1415926 / 180;
32 double Pi = 3.1415926;
43 phir[1] = ( 180. / Pi ) * 2.1073;
48 phir[2] = ( 180. / Pi ) * -0.633296;
53 phir[3] = ( 180. / Pi ) * 1.7820801;
58 phir[4] = ( 180. / Pi ) * 2.38835877;
63 phir[5] = ( 180. / Pi ) * -0.769095;
68 phir[6] = ( 180. / Pi ) * -2.062227;
73 phir[7] = ( 180. / Pi ) * 1.7346186;
78 phir[8] = ( 180. / Pi ) * -0.735903;
83 phir[9] = ( 180. / Pi ) * -1.56397;
88 phir[10] = ( 180. / Pi ) * 2.6208986;
166 deltad[1] = 194.7 * pi180inv;
167 deltad[2] = 196.0 * pi180inv;
168 deltad[3] = 167.0 * pi180inv;
178 vector<double> pim ) {
182 if ( k0l.size() != 4 || pip.size() != 4 || pim.size() != 4 )
183 cout <<
"ERROR in KSPIPI daughter 4 momentum" << endl;
184 for (
int i = 0; i < k0l.size(); i++ ) { pD.push_back( k0l[i] + pip[i] + pim[i] ); }
186 complex<double> DK2piRes0 = Resonance2( pD, pip, pim, ar[0], phir[0], width_R[0], mass_R[0],
188 complex<double> DK2piRes1 = Resonance2( pD, pip, pim, ar[1], phir[1], width_R[1], mass_R[1],
190 complex<double> DK2piRes2 = Resonance2( pD, pip, pim, ar[2], phir[2], width_R[2], mass_R[2],
192 complex<double> DK2piRes3 = Resonance2( pD, pip, pim, ar[3], phir[3], width_R[3], mass_R[3],
194 complex<double> DK2piRes4 = Resonance2( pD, k0l, pim, ar[4], phir[4], width_R[4], mass_R[4],
197 Resonance2( pD, k0l, pim, ar[5], phir[5], width_R[5], mass_R[5],
200 Resonance2( pD, k0l, pim, ar[6], phir[6], width_R[6], mass_R[6],
203 Resonance2( pD, k0l, pim, ar[7], phir[7], width_R[7], mass_R[7],
205 complex<double> DK2piRes8 = Resonance2( pD, k0l, pip, ar[8], phir[8], width_R[8], mass_R[8],
208 Resonance2( pD, k0l, pip, ar[9], phir[9], width_R[9], mass_R[9],
211 Resonance2( pD, k0l, pip, ar[10], phir[10], width_R[10], mass_R[10],
218 amplitude_LASS( k0l, pip, pim,
"k0spim", ar[11], phir[11] * pi180inv );
220 amplitude_LASS( k0l, pip, pim,
"k0spip", ar[12], phir[12] * pi180inv );
222 complex<double> _tmpAmp = DK2piRes0 + DK2piRes1 + DK2piRes2 + DK2piRes3 + pipi_s_wave;
226 complex<double> TOT_PFT_AMP = _tmpAmp + DK2piRes4 + DK2piRes5 + DK2piRes6 + DK2piRes7 +
227 DK2piRes8 + DK2piRes9 + DK2piRes10 + kpi_s_wave +
233complex<double> D0ToKSpipi2018::Resonance2( vector<double> p4_p, vector<double> p4_d1,
234 vector<double> p4_d2,
double mag,
double theta,
235 double gamma,
double bwm,
int spin ) {
240 HepLorentzVector _p4_p;
241 _p4_p.setX( p4_p[0] );
242 _p4_p.setY( p4_p[1] );
243 _p4_p.setZ( p4_p[2] );
244 _p4_p.setT( p4_p[3] );
245 HepLorentzVector _p4_d1;
246 _p4_d1.setX( p4_d1[0] );
247 _p4_d1.setY( p4_d1[1] );
248 _p4_d1.setZ( p4_d1[2] );
249 _p4_d1.setT( p4_d1[3] );
250 HepLorentzVector _p4_d2;
251 _p4_d2.setX( p4_d2[0] );
252 _p4_d2.setY( p4_d2[1] );
253 _p4_d2.setZ( p4_d2[2] );
254 _p4_d2.setT( p4_d2[3] );
255 HepLorentzVector _p4_d3 = _p4_p - _p4_d1 - _p4_d2;
257 double mAB = ( _p4_d1 + _p4_d2 ).invariantMass();
258 double mBC = ( _p4_d2 + _p4_d3 ).invariantMass();
259 double mAC = ( _p4_d1 + _p4_d3 ).invariantMass();
260 double mA = _p4_d1.invariantMass();
261 double mB = _p4_d2.invariantMass();
262 double mD = _p4_p.invariantMass();
263 double mC = _p4_d3.invariantMass();
266 double gammaR = gamma;
268 sqrt( ( ( ( mAB * mAB - mA * mA - mB * mB ) * ( mAB * mAB - mA * mA - mB * mB ) / 4.0 ) -
269 mA * mA * mB * mB ) /
272 sqrt( ( ( ( mR * mR - mA * mA - mB * mB ) * ( mR * mR - mA * mA - mB * mB ) / 4.0 ) -
273 mA * mA * mB * mB ) /
276 double pD = ( ( ( mD * mD - mR * mR - mC * mC ) * ( mD * mD - mR * mR - mC * mC ) / 4.0 ) -
277 mR * mR * mC * mC ) /
279 if ( pD > 0 ) { pD = sqrt( pD ); }
282 sqrt( ( ( ( mD * mD - mAB * mAB - mC * mC ) * ( mD * mD - mAB * mAB - mC * mC ) / 4.0 ) -
283 mAB * mAB * mC * mC ) /
296 fR = sqrt( 1.0 + 1.5 * 1.5 * pR * pR ) / sqrt( 1.0 + 1.5 * 1.5 * pAB * pAB );
297 fD = sqrt( 1.0 + 5.0 * 5.0 * pD * pD ) / sqrt( 1.0 + 5.0 * 5.0 * pDAB * pDAB );
301 fR = sqrt( ( 9 + 3 * pow( ( 1.5 * pR ), 2 ) + pow( ( 1.5 * pR ), 4 ) ) /
302 ( 9 + 3 * pow( ( 1.5 * pAB ), 2 ) + pow( ( 1.5 * pAB ), 4 ) ) );
303 fD = sqrt( ( 9 + 3 * pow( ( 5.0 * pD ), 2 ) + pow( ( 5.0 * pD ), 4 ) ) /
304 ( 9 + 3 * pow( ( 5.0 * pDAB ), 2 ) + pow( ( 5.0 * pDAB ), 4 ) ) );
307 default: cout <<
"Incorrect spin in D0ToKSpipi2018::EvtResonance2.cc\n" << endl;
310 double gammaAB = gammaR * pow( pAB / pR, power ) * ( mR / mAB ) * fR * fR;
314 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) * fR *
315 fD / ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) );
318 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) *
320 ( mAC * mAC - mBC * mBC +
321 ( ( mD * mD - mC * mC ) * ( mB * mB - mA * mA ) / ( mAB * mAB ) ) ) /
322 ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) ) );
325 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) *
326 ( fR * fD / ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) ) ) *
327 ( pow( ( mBC * mBC - mAC * mAC +
328 ( mD * mD - mC * mC ) * ( mA * mA - mB * mB ) / ( mAB * mAB ) ),
331 ( mAB * mAB - 2 * mD * mD - 2 * mC * mC +
332 pow( ( mD * mD - mC * mC ) / mAB, 2 ) ) *
333 ( mAB * mAB - 2 * mA * mA - 2 * mB * mB +
334 pow( ( mA * mA - mB * mB ) / mAB, 2 ) ) );
336 default: cout <<
"Incorrect spin in D0ToKSpipi2018::Resonance2.cc\n" << endl;
342complex<double> D0ToKSpipi2018::K_matrix( vector<double> p_pip, vector<double> p_pim ) {
343 const double mD0 = 1.86483;
344 const double mKl = 0.49761;
345 const double mPi = 0.13957;
348 HepLorentzVector _p_pip( p_pip[0], p_pip[1], p_pip[2], p_pip[3] );
349 HepLorentzVector _p_pim( p_pim[0], p_pim[1], p_pim[2], p_pim[3] );
351 double mAB = ( _p_pip + _p_pim ).m();
352 double s = mAB * mAB;
354 complex<double> n11, n12, n13, n14, n15, n21, n22, n23, n24, n25, n31, n32, n33, n34, n35,
355 n41, n42, n43, n44, n45, n51, n52, n53, n54, n55;
356 double rho1sq, rho2sq, rho4sq, rho5sq;
357 complex<double> rho1, rho2, rho3, rho4, rho5;
358 vector<complex<double>> rho;
360 complex<double> pole, SVT, Adler;
365 const double mpi = 0.13957;
366 const double mK = 0.493677;
367 const double meta = 0.54775;
368 const double metap = 0.95778;
372 complex<double> K[5][5];
373 complex<double> i[5][5];
374 for (
int k = 0; k < 5; k++ )
378 for (
int l = 0; l < 5; l++ )
382 i[k][l] = complex<double>( 0., 0. );
383 K[k][l] = complex<double>( 0., 0. );
392 double s_scatt = -3.92637;
410 rho1sq = ( 1.0 - ( pow( (
mpi +
mpi ), 2 ) /
s ) );
411 if ( rho1sq >= 0. ) rho1 = complex<double>( sqrt( rho1sq ), 0. );
412 else rho1 = complex<double>( 0., sqrt( -rho1sq ) );
413 rho.push_back( rho1 );
416 rho2sq = ( 1.0 - ( pow( ( mK + mK ), 2 ) /
s ) );
417 if ( rho2sq >= 0. ) rho2 = complex<double>( sqrt( rho2sq ), 0. );
418 else rho2 = complex<double>( 0., sqrt( -rho2sq ) );
419 rho.push_back( rho2 );
422 rho3 = complex<double>( 0., 0. );
425 double real = 1.2274 + 0.00370909 / (
s *
s ) - ( 0.111203 ) / (
s)-6.39017 *
s +
426 16.8358 *
s *
s - 21.8845 *
s *
s *
s + 11.3153 *
s *
s *
s *
s;
427 double cont32 = sqrt( 1.0 - ( 16.0 *
mpi *
mpi ) );
428 rho3 = complex<double>( cont32 *
real, 0. );
430 else rho3 = complex<double>( sqrt( 1.0 - ( 16.0 *
mpi *
mpi /
s ) ), 0. );
431 rho.push_back( rho3 );
434 rho4sq = ( 1.0 - ( pow( (
meta +
meta ), 2 ) /
s ) );
435 if ( rho4sq >= 0. ) rho4 = complex<double>( sqrt( rho4sq ), 0. );
436 else rho4 = complex<double>( 0., sqrt( -rho4sq ) );
437 rho.push_back( rho4 );
440 rho5sq = ( 1.0 - ( pow( (
meta + metap ), 2 ) /
s ) );
441 if ( rho5sq >= 0. ) rho5 = complex<double>( sqrt( rho5sq ), 0. );
442 else rho5 = complex<double>( 0., sqrt( -rho5sq ) );
443 rho.push_back( rho5 );
446 for (
int k = 0; k < 5; k++ )
448 for (
int l = 0; l < 5; l++ )
450 for (
int pole_index = 0; pole_index < 5; pole_index++ )
452 double A = g[pole_index][k] * g[pole_index][l];
453 double B = ma[pole_index] * ma[pole_index] -
s;
454 K[k][l] = K[k][l] + complex<double>( A / B, 0. );
460 for (
int k = 0; k < 5; k++ )
462 for (
int l = 0; l < 5; l++ )
464 double C =
f[k][l] * ( 1.0 - s_scatt );
465 double D = (
s - s_scatt );
466 K[k][l] = K[k][l] + complex<double>(
C / D, 0. );
471 for (
int k = 0; k < 5; k++ )
473 for (
int l = 0; l < 5; l++ )
475 double E = (
s - ( sa *
mpi *
mpi * 0.5 ) ) * ( 1.0 - sa_0 );
476 double F = (
s - sa_0 );
477 K[k][l] = K[k][l] * complex<double>( E / F, 0. );
482 n11 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[0][0] * rho[0];
483 n12 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][1] * rho[1];
484 n13 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][2] * rho[2];
485 n14 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][3] * rho[3];
486 n15 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][4] * rho[4];
488 n21 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][0] * rho[0];
489 n22 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[1][1] * rho[1];
490 n23 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][2] * rho[2];
491 n24 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][3] * rho[3];
492 n25 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][4] * rho[4];
494 n31 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][0] * rho[0];
495 n32 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][1] * rho[1];
496 n33 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[2][2] * rho[2];
497 n34 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][3] * rho[3];
498 n35 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][4] * rho[4];
500 n41 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][0] * rho[0];
501 n42 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][1] * rho[1];
502 n43 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][2] * rho[2];
503 n44 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[3][3] * rho[3];
504 n45 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][4] * rho[4];
506 n51 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][0] * rho[0];
507 n52 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][1] * rho[1];
508 n53 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][2] * rho[2];
509 n54 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][3] * rho[3];
510 n55 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[4][4] * rho[4];
514 det = ( n15 * n24 * n33 * n42 * n51 - n14 * n25 * n33 * n42 * n51 -
515 n15 * n23 * n34 * n42 * n51 + n13 * n25 * n34 * n42 * n51 +
516 n14 * n23 * n35 * n42 * n51 - n13 * n24 * n35 * n42 * n51 -
517 n15 * n24 * n32 * n43 * n51 + n14 * n25 * n32 * n43 * n51 +
518 n15 * n22 * n34 * n43 * n51 - n12 * n25 * n34 * n43 * n51 -
519 n14 * n22 * n35 * n43 * n51 + n12 * n24 * n35 * n43 * n51 +
520 n15 * n23 * n32 * n44 * n51 - n13 * n25 * n32 * n44 * n51 -
521 n15 * n22 * n33 * n44 * n51 + n12 * n25 * n33 * n44 * n51 +
522 n13 * n22 * n35 * n44 * n51 - n12 * n23 * n35 * n44 * n51 -
523 n14 * n23 * n32 * n45 * n51 + n13 * n24 * n32 * n45 * n51 +
524 n14 * n22 * n33 * n45 * n51 - n12 * n24 * n33 * n45 * n51 -
525 n13 * n22 * n34 * n45 * n51 + n12 * n23 * n34 * n45 * n51 -
526 n15 * n24 * n33 * n41 * n52 + n14 * n25 * n33 * n41 * n52 +
527 n15 * n23 * n34 * n41 * n52 - n13 * n25 * n34 * n41 * n52 -
528 n14 * n23 * n35 * n41 * n52 + n13 * n24 * n35 * n41 * n52 +
529 n15 * n24 * n31 * n43 * n52 - n14 * n25 * n31 * n43 * n52 -
530 n15 * n21 * n34 * n43 * n52 + n11 * n25 * n34 * n43 * n52 +
531 n14 * n21 * n35 * n43 * n52 - n11 * n24 * n35 * n43 * n52 -
532 n15 * n23 * n31 * n44 * n52 + n13 * n25 * n31 * n44 * n52 +
533 n15 * n21 * n33 * n44 * n52 - n11 * n25 * n33 * n44 * n52 -
534 n13 * n21 * n35 * n44 * n52 + n11 * n23 * n35 * n44 * n52 +
535 n14 * n23 * n31 * n45 * n52 - n13 * n24 * n31 * n45 * n52 -
536 n14 * n21 * n33 * n45 * n52 + n11 * n24 * n33 * n45 * n52 +
537 n13 * n21 * n34 * n45 * n52 - n11 * n23 * n34 * n45 * n52 +
538 n15 * n24 * n32 * n41 * n53 - n14 * n25 * n32 * n41 * n53 -
539 n15 * n22 * n34 * n41 * n53 + n12 * n25 * n34 * n41 * n53 +
540 n14 * n22 * n35 * n41 * n53 - n12 * n24 * n35 * n41 * n53 -
541 n15 * n24 * n31 * n42 * n53 + n14 * n25 * n31 * n42 * n53 +
542 n15 * n21 * n34 * n42 * n53 - n11 * n25 * n34 * n42 * n53 -
543 n14 * n21 * n35 * n42 * n53 + n11 * n24 * n35 * n42 * n53 +
544 n15 * n22 * n31 * n44 * n53 - n12 * n25 * n31 * n44 * n53 -
545 n15 * n21 * n32 * n44 * n53 + n11 * n25 * n32 * n44 * n53 +
546 n12 * n21 * n35 * n44 * n53 - n11 * n22 * n35 * n44 * n53 -
547 n14 * n22 * n31 * n45 * n53 + n12 * n24 * n31 * n45 * n53 +
548 n14 * n21 * n32 * n45 * n53 - n11 * n24 * n32 * n45 * n53 -
549 n12 * n21 * n34 * n45 * n53 + n11 * n22 * n34 * n45 * n53 -
550 n15 * n23 * n32 * n41 * n54 + n13 * n25 * n32 * n41 * n54 +
551 n15 * n22 * n33 * n41 * n54 - n12 * n25 * n33 * n41 * n54 -
552 n13 * n22 * n35 * n41 * n54 + n12 * n23 * n35 * n41 * n54 +
553 n15 * n23 * n31 * n42 * n54 - n13 * n25 * n31 * n42 * n54 -
554 n15 * n21 * n33 * n42 * n54 + n11 * n25 * n33 * n42 * n54 +
555 n13 * n21 * n35 * n42 * n54 - n11 * n23 * n35 * n42 * n54 -
556 n15 * n22 * n31 * n43 * n54 + n12 * n25 * n31 * n43 * n54 +
557 n15 * n21 * n32 * n43 * n54 - n11 * n25 * n32 * n43 * n54 -
558 n12 * n21 * n35 * n43 * n54 + n11 * n22 * n35 * n43 * n54 +
559 n13 * n22 * n31 * n45 * n54 - n12 * n23 * n31 * n45 * n54 -
560 n13 * n21 * n32 * n45 * n54 + n11 * n23 * n32 * n45 * n54 +
561 n12 * n21 * n33 * n45 * n54 - n11 * n22 * n33 * n45 * n54 +
562 n14 * n23 * n32 * n41 * n55 - n13 * n24 * n32 * n41 * n55 -
563 n14 * n22 * n33 * n41 * n55 + n12 * n24 * n33 * n41 * n55 +
564 n13 * n22 * n34 * n41 * n55 - n12 * n23 * n34 * n41 * n55 -
565 n14 * n23 * n31 * n42 * n55 + n13 * n24 * n31 * n42 * n55 +
566 n14 * n21 * n33 * n42 * n55 - n11 * n24 * n33 * n42 * n55 -
567 n13 * n21 * n34 * n42 * n55 + n11 * n23 * n34 * n42 * n55 +
568 n14 * n22 * n31 * n43 * n55 - n12 * n24 * n31 * n43 * n55 -
569 n14 * n21 * n32 * n43 * n55 + n11 * n24 * n32 * n43 * n55 +
570 n12 * n21 * n34 * n43 * n55 - n11 * n22 * n34 * n43 * n55 -
571 n13 * n22 * n31 * n44 * n55 + n12 * n23 * n31 * n44 * n55 +
572 n13 * n21 * n32 * n44 * n55 - n11 * n23 * n32 * n44 * n55 -
573 n12 * n21 * n33 * n44 * n55 + n11 * n22 * n33 * n44 * n55 );
575 if ( det == complex<double>( 0., 0. ) ) reject =
true;
578 i[0][0] = ( n25 * n34 * n43 * n52 - n24 * n35 * n43 * n52 - n25 * n33 * n44 * n52 +
579 n23 * n35 * n44 * n52 + n24 * n33 * n45 * n52 - n23 * n34 * n45 * n52 -
580 n25 * n34 * n42 * n53 + n24 * n35 * n42 * n53 + n25 * n32 * n44 * n53 -
581 n22 * n35 * n44 * n53 - n24 * n32 * n45 * n53 + n22 * n34 * n45 * n53 +
582 n25 * n33 * n42 * n54 - n23 * n35 * n42 * n54 - n25 * n32 * n43 * n54 +
583 n22 * n35 * n43 * n54 + n23 * n32 * n45 * n54 - n22 * n33 * n45 * n54 -
584 n24 * n33 * n42 * n55 + n23 * n34 * n42 * n55 + n24 * n32 * n43 * n55 -
585 n22 * n34 * n43 * n55 - n23 * n32 * n44 * n55 + n22 * n33 * n44 * n55 ) /
588 i[0][1] = ( -n15 * n34 * n43 * n52 + n14 * n35 * n43 * n52 + n15 * n33 * n44 * n52 -
589 n13 * n35 * n44 * n52 - n14 * n33 * n45 * n52 + n13 * n34 * n45 * n52 +
590 n15 * n34 * n42 * n53 - n14 * n35 * n42 * n53 - n15 * n32 * n44 * n53 +
591 n12 * n35 * n44 * n53 + n14 * n32 * n45 * n53 - n12 * n34 * n45 * n53 -
592 n15 * n33 * n42 * n54 + n13 * n35 * n42 * n54 + n15 * n32 * n43 * n54 -
593 n12 * n35 * n43 * n54 - n13 * n32 * n45 * n54 + n12 * n33 * n45 * n54 +
594 n14 * n33 * n42 * n55 - n13 * n34 * n42 * n55 - n14 * n32 * n43 * n55 +
595 n12 * n34 * n43 * n55 + n13 * n32 * n44 * n55 - n12 * n33 * n44 * n55 ) /
598 i[0][2] = ( n15 * n24 * n43 * n52 - n14 * n25 * n43 * n52 - n15 * n23 * n44 * n52 +
599 n13 * n25 * n44 * n52 + n14 * n23 * n45 * n52 - n13 * n24 * n45 * n52 -
600 n15 * n24 * n42 * n53 + n14 * n25 * n42 * n53 + n15 * n22 * n44 * n53 -
601 n12 * n25 * n44 * n53 - n14 * n22 * n45 * n53 + n12 * n24 * n45 * n53 +
602 n15 * n23 * n42 * n54 - n13 * n25 * n42 * n54 - n15 * n22 * n43 * n54 +
603 n12 * n25 * n43 * n54 + n13 * n22 * n45 * n54 - n12 * n23 * n45 * n54 -
604 n14 * n23 * n42 * n55 + n13 * n24 * n42 * n55 + n14 * n22 * n43 * n55 -
605 n12 * n24 * n43 * n55 - n13 * n22 * n44 * n55 + n12 * n23 * n44 * n55 ) /
608 i[0][3] = ( -n15 * n24 * n33 * n52 + n14 * n25 * n33 * n52 + n15 * n23 * n34 * n52 -
609 n13 * n25 * n34 * n52 - n14 * n23 * n35 * n52 + n13 * n24 * n35 * n52 +
610 n15 * n24 * n32 * n53 - n14 * n25 * n32 * n53 - n15 * n22 * n34 * n53 +
611 n12 * n25 * n34 * n53 + n14 * n22 * n35 * n53 - n12 * n24 * n35 * n53 -
612 n15 * n23 * n32 * n54 + n13 * n25 * n32 * n54 + n15 * n22 * n33 * n54 -
613 n12 * n25 * n33 * n54 - n13 * n22 * n35 * n54 + n12 * n23 * n35 * n54 +
614 n14 * n23 * n32 * n55 - n13 * n24 * n32 * n55 - n14 * n22 * n33 * n55 +
615 n12 * n24 * n33 * n55 + n13 * n22 * n34 * n55 - n12 * n23 * n34 * n55 ) /
618 i[0][4] = ( n15 * n24 * n33 * n42 - n14 * n25 * n33 * n42 - n15 * n23 * n34 * n42 +
619 n13 * n25 * n34 * n42 + n14 * n23 * n35 * n42 - n13 * n24 * n35 * n42 -
620 n15 * n24 * n32 * n43 + n14 * n25 * n32 * n43 + n15 * n22 * n34 * n43 -
621 n12 * n25 * n34 * n43 - n14 * n22 * n35 * n43 + n12 * n24 * n35 * n43 +
622 n15 * n23 * n32 * n44 - n13 * n25 * n32 * n44 - n15 * n22 * n33 * n44 +
623 n12 * n25 * n33 * n44 + n13 * n22 * n35 * n44 - n12 * n23 * n35 * n44 -
624 n14 * n23 * n32 * n45 + n13 * n24 * n32 * n45 + n14 * n22 * n33 * n45 -
625 n12 * n24 * n33 * n45 - n13 * n22 * n34 * n45 + n12 * n23 * n34 * n45 ) /
628 double s0_prod = -0.07;
630 complex<double> value0( 0., 0. );
631 complex<double> value1( 0., 0. );
634 for (
int k = 0; k < 5; k++ )
636 double u1j_re =
real( i[0][k] );
637 double u1j_im =
imag( i[0][k] );
638 if ( u1j_re == 0. || u1j_im == 0. ) reject =
true;
641 for (
int pole_index = 0; pole_index < 5; pole_index++ )
643 complex<double>
A = beta[pole_index] * g[pole_index][k];
644 value0 += ( i[0][k] *
A ) / ( ma[pole_index] * ma[pole_index] -
s );
648 value1 += i[0][k] * fprod[k];
652 value1 *= ( 1. - s0_prod ) / (
s - s0_prod );
654 if ( reject ==
true )
return complex<double>( 9999., 9999. );
655 else return ( value0 + value1 );
658complex<double> D0ToKSpipi2018::amplitude_LASS( vector<double> p_k0l, vector<double> p_pip,
659 vector<double> p_pim,
string reso,
double A_r,
662 double gammaR = 0.27;
665 HepLorentzVector _p_k0l( p_k0l[0], p_k0l[1], p_k0l[2], p_k0l[3] );
666 HepLorentzVector _p_pip( p_pip[0], p_pip[1], p_pip[2], p_pip[3] );
667 HepLorentzVector _p_pim( p_pim[0], p_pim[1], p_pim[2], p_pim[3] );
668 if ( reso ==
"k0spim" ) mab2 = pow( ( _p_k0l + _p_pim ).m(), 2 );
669 else if ( reso ==
"k0spip" ) mab2 = pow( ( _p_k0l + _p_pip ).m(), 2 );
672 const double mD0 = 1.86483;
673 const double mKl = 0.49761;
674 const double mPi = 0.13957;
680 double _phiR = -1.9146;
681 double _phiF = 0.0017;
685 double mAB = sqrt( mab2 );
692 sqrt( ( ( ( mAB * mAB - mA * mA - mB * mB ) * ( mAB * mAB - mA * mA - mB * mB ) / 4.0 ) -
693 mA * mA * mB * mB ) /
698 sqrt( ( ( ( mR * mR - mA * mA - mB * mB ) * ( mR * mR - mA * mA - mB * mB ) / 4.0 ) -
699 mA * mA * mB * mB ) /
704 double g = gammaR * pow(
q / q0, power ) * ( mR / mAB ) * fR * fR;
705 complex<double> propagator_relativistic_BreitWigner =
706 1. / ( mR * mR - mAB * mAB - complex<double>( 0., mR * g ) );
709 double cot_deltaF = 1.0 / ( _a *
q ) + 0.5 * _r *
q;
710 double qcot_deltaF = 1.0 / _a + 0.5 * _r *
q *
q;
713 complex<double> expi2deltaF =
714 complex<double>( qcot_deltaF,
q ) / complex<double>( qcot_deltaF, -
q );
715 complex<double> resonant_term_T =
716 _R * complex<double>(
cos( _phiR + 2 * _phiF ),
sin( _phiR + 2 * _phiF ) ) *
717 propagator_relativistic_BreitWigner * mR * gammaR * mR / q0 * expi2deltaF;
720 complex<double> non_resonant_term_F = _F * complex<double>(
cos( _phiF ),
sin( _phiF ) ) *
721 (
cos( _phiF ) + cot_deltaF *
sin( _phiF ) ) *
722 sqrt(
s ) / complex<double>( qcot_deltaF, -
q );
725 complex<double> LASS_contribution = non_resonant_term_F + resonant_term_T;
727 return complex<double>( A_r *
cos( Phi_r ), A_r *
sin( Phi_r ) ) * LASS_contribution;
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double imag(const EvtComplex &c)
double sin(const BesAngle a)
double cos(const BesAngle a)
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
virtual ~D0ToKSpipi2018()
complex< double > Amp_PFT(vector< double > k0l, vector< double > pip, vector< double > pim)