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;
30 tan2thetaC = ( 0.22650 * 0.22650 ) /
31 ( 1. - ( 0.22650 * 0.22650 ) );
32 pi180inv = 1.0 * 3.1415926 / 180;
34 double Pi = 3.1415926;
45 phir[1] = ( 180. / Pi ) * 2.1073;
50 phir[2] = ( 180. / Pi ) * -0.633296;
55 phir[3] = ( 180. / Pi ) * 1.7820801;
60 phir[4] = ( 180. / Pi ) * 2.38835877;
65 phir[5] = ( 180. / Pi ) * -0.769095;
70 phir[6] = ( 180. / Pi ) * -2.062227;
75 phir[7] = ( 180. / Pi ) * 1.7346186;
80 phir[8] = ( 180. / Pi ) * -0.735903;
85 phir[9] = ( 180. / Pi ) * -1.56397;
90 phir[10] = ( 180. / Pi ) * 2.6208986;
115 1.851 *
sin( -94.07 * pi180inv ) );
123 3.229 *
sin( -60.05 * pi180inv ) );
131 0.7116 *
sin( -177.149 * pi180inv ) );
170 deltad[1] = 194.7 * pi180inv;
171 deltad[2] = 196.0 * pi180inv;
172 deltad[3] = 167.0 * pi180inv;
182 vector<double> pim ) {
186 if ( k0l.size() != 4 || pip.size() != 4 || pim.size() != 4 )
187 cout <<
"ERROR in KSPIPI daughter 4 momentum" << endl;
188 for (
int i = 0; i < k0l.size(); i++ ) { pD.push_back( k0l[i] + pip[i] + pim[i] ); }
208 complex<double> DK2piRes0 = Resonance2( pD, pip, pim, ar[0], phir[0], width_R[0], mass_R[0],
210 complex<double> DK2piRes1 = Resonance2( pD, pip, pim, ar[1], phir[1], width_R[1], mass_R[1],
212 complex<double> DK2piRes2 = Resonance2( pD, pip, pim, ar[2], phir[2], width_R[2], mass_R[2],
214 complex<double> DK2piRes3 = Resonance2( pD, pip, pim, ar[3], phir[3], width_R[3], mass_R[3],
216 complex<double> DK2piRes4 = Resonance2( pD, k0l, pim, ar[4], phir[4], width_R[4], mass_R[4],
219 Resonance2( pD, k0l, pim, ar[5], phir[5], width_R[5], mass_R[5],
222 Resonance2( pD, k0l, pim, ar[6], phir[6], width_R[6], mass_R[6],
225 Resonance2( pD, k0l, pim, ar[7], phir[7], width_R[7], mass_R[7],
227 complex<double> DK2piRes8 = Resonance2( pD, k0l, pip, ar[8], phir[8], width_R[8], mass_R[8],
230 Resonance2( pD, k0l, pip, ar[9], phir[9], width_R[9], mass_R[9],
233 Resonance2( pD, k0l, pip, ar[10], phir[10], width_R[10], mass_R[10],
240 amplitude_LASS( k0l, pip, pim,
"k0lpim", ar[11], phir[11] * pi180inv );
244 complex<double> TOT_PFT_AMP = DK2piRes0 * CP_mult[0] + DK2piRes1 * CP_mult[1] +
245 DK2piRes2 * CP_mult[2] + DK2piRes3 * CP_mult[3] + DK2piRes4 +
246 DK2piRes5 + DK2piRes6 + DK2piRes7 + DK2piRes8 * ( -1. ) +
247 DK2piRes9 * ( -1. ) + DK2piRes10 * ( -1. ) +
248 pipi_s_wave * CP_mult[4] + kpi_s_wave;
253complex<double> D0ToKLpipi2018::Resonance2( vector<double> p4_p, vector<double> p4_d1,
254 vector<double> p4_d2,
double mag,
double theta,
255 double gamma,
double bwm,
int spin ) {
260 HepLorentzVector _p4_p;
261 _p4_p.setX( p4_p[0] );
262 _p4_p.setY( p4_p[1] );
263 _p4_p.setZ( p4_p[2] );
264 _p4_p.setT( p4_p[3] );
265 HepLorentzVector _p4_d1;
266 _p4_d1.setX( p4_d1[0] );
267 _p4_d1.setY( p4_d1[1] );
268 _p4_d1.setZ( p4_d1[2] );
269 _p4_d1.setT( p4_d1[3] );
270 HepLorentzVector _p4_d2;
271 _p4_d2.setX( p4_d2[0] );
272 _p4_d2.setY( p4_d2[1] );
273 _p4_d2.setZ( p4_d2[2] );
274 _p4_d2.setT( p4_d2[3] );
275 HepLorentzVector _p4_d3 = _p4_p - _p4_d1 - _p4_d2;
277 double mAB = ( _p4_d1 + _p4_d2 ).invariantMass();
278 double mBC = ( _p4_d2 + _p4_d3 ).invariantMass();
279 double mAC = ( _p4_d1 + _p4_d3 ).invariantMass();
280 double mA = _p4_d1.invariantMass();
281 double mB = _p4_d2.invariantMass();
282 double mD = _p4_p.invariantMass();
283 double mC = _p4_d3.invariantMass();
286 double gammaR = gamma;
288 sqrt( ( ( ( mAB * mAB - mA * mA - mB * mB ) * ( mAB * mAB - mA * mA - mB * mB ) / 4.0 ) -
289 mA * mA * mB * mB ) /
292 sqrt( ( ( ( mR * mR - mA * mA - mB * mB ) * ( mR * mR - mA * mA - mB * mB ) / 4.0 ) -
293 mA * mA * mB * mB ) /
296 double pD = ( ( ( mD * mD - mR * mR - mC * mC ) * ( mD * mD - mR * mR - mC * mC ) / 4.0 ) -
297 mR * mR * mC * mC ) /
299 if ( pD > 0 ) { pD = sqrt( pD ); }
302 sqrt( ( ( ( mD * mD - mAB * mAB - mC * mC ) * ( mD * mD - mAB * mAB - mC * mC ) / 4.0 ) -
303 mAB * mAB * mC * mC ) /
316 fR = sqrt( 1.0 + 1.5 * 1.5 * pR * pR ) / sqrt( 1.0 + 1.5 * 1.5 * pAB * pAB );
317 fD = sqrt( 1.0 + 5.0 * 5.0 * pD * pD ) / sqrt( 1.0 + 5.0 * 5.0 * pDAB * pDAB );
321 fR = sqrt( ( 9 + 3 * pow( ( 1.5 * pR ), 2 ) + pow( ( 1.5 * pR ), 4 ) ) /
322 ( 9 + 3 * pow( ( 1.5 * pAB ), 2 ) + pow( ( 1.5 * pAB ), 4 ) ) );
323 fD = sqrt( ( 9 + 3 * pow( ( 5.0 * pD ), 2 ) + pow( ( 5.0 * pD ), 4 ) ) /
324 ( 9 + 3 * pow( ( 5.0 * pDAB ), 2 ) + pow( ( 5.0 * pDAB ), 4 ) ) );
327 default: cout <<
"Incorrect spin in D0ToKLpipi2018::EvtResonance2.cc\n" << endl;
330 double gammaAB = gammaR * pow( pAB / pR, power ) * ( mR / mAB ) * fR * fR;
334 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) * fR *
335 fD / ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) );
338 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) *
340 ( mAC * mAC - mBC * mBC +
341 ( ( mD * mD - mC * mC ) * ( mB * mB - mA * mA ) / ( mAB * mAB ) ) ) /
342 ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) ) );
345 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) *
346 ( fR * fD / ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) ) ) *
347 ( pow( ( mBC * mBC - mAC * mAC +
348 ( mD * mD - mC * mC ) * ( mA * mA - mB * mB ) / ( mAB * mAB ) ),
351 ( mAB * mAB - 2 * mD * mD - 2 * mC * mC +
352 pow( ( mD * mD - mC * mC ) / mAB, 2 ) ) *
353 ( mAB * mAB - 2 * mA * mA - 2 * mB * mB +
354 pow( ( mA * mA - mB * mB ) / mAB, 2 ) ) );
356 default: cout <<
"Incorrect spin in D0ToKSpipi::Resonance2.cc\n" << endl;
362complex<double> D0ToKLpipi2018::K_matrix( vector<double> p_pip, vector<double> p_pim ) {
367 const double mD0 = 1.86483;
368 const double mKl = 0.49761;
369 const double mPi = 0.13957;
371 HepLorentzVector _p_pip( p_pip[0], p_pip[1], p_pip[2], p_pip[3] );
372 HepLorentzVector _p_pim( p_pim[0], p_pim[1], p_pim[2], p_pim[3] );
374 double mAB = ( _p_pip + _p_pim ).m();
376 double s = mAB * mAB;
426 complex<double> n11, n12, n13, n14, n15, n21, n22, n23, n24, n25, n31, n32, n33, n34, n35,
427 n41, n42, n43, n44, n45, n51, n52, n53, n54, n55;
428 double rho1sq, rho2sq, rho4sq, rho5sq;
429 complex<double> rho1, rho2, rho3, rho4, rho5;
430 complex<double> rho[5];
431 complex<double> pole, SVT, Adler;
433 complex<double> i[5][5];
437 double mpi = 0.13957;
438 double mK = 0.493677;
439 double meta = 0.54775;
440 double metap = 0.95778;
443 complex<double> K[5][5];
444 for ( Int_t k = 0; k < 5; k++ )
446 for ( Int_t l = 0; l < 5; l++ )
448 i[k][l] = complex<double>( 0., 0. );
449 K[k][l] = complex<double>( 0., 0. );
456 Double_t s_scatt = -3.92637;
458 Double_t sa_0 = -0.15;
473 rho1sq = ( 1.0 - ( pow( (
mpi +
mpi ), 2 ) /
s ) );
474 if ( rho1sq >= 0. ) { rho1 = complex<double>( sqrt( rho1sq ), 0. ); }
475 else { rho1 = complex<double>( 0., sqrt( -rho1sq ) ); }
478 rho2sq = ( 1.0 - ( pow( ( mK + mK ), 2 ) /
s ) );
479 if ( rho2sq >= 0. ) { rho2 = complex<double>( sqrt( rho2sq ), 0. ); }
480 else { rho2 = complex<double>( 0., sqrt( -rho2sq ) ); }
484 rho3 = complex<double>( 0., 0. );
488 Double_t
real = 1.2274 + 0.00370909 / (
s *
s ) - ( 0.111203 ) / (
s)-6.39017 *
s +
489 16.8358 *
s *
s - 21.8845 *
s *
s *
s + 11.3153 *
s *
s *
s *
s;
490 Double_t cont32 = sqrt( 1.0 - ( 16.0 *
mpi *
mpi ) );
491 rho3 = complex<double>( cont32 *
real, 0. );
493 else { rho3 = complex<double>( sqrt( 1.0 - ( 16.0 *
mpi *
mpi /
s ) ), 0. ); }
496 rho4sq = ( 1.0 - ( pow( (
meta +
meta ), 2 ) /
s ) );
497 if ( rho4sq >= 0. ) { rho4 = complex<double>( sqrt( rho4sq ), 0. ); }
498 else { rho4 = complex<double>( 0., sqrt( -rho4sq ) ); }
501 rho5sq = ( 1.0 - ( pow( (
meta + metap ), 2 ) /
s ) );
502 if ( rho5sq >= 0. ) { rho5 = complex<double>( sqrt( rho5sq ), 0. ); }
503 else { rho5 = complex<double>( 0., sqrt( -rho5sq ) ); }
507 for ( Int_t k = 0; k < 5; k++ )
509 for ( Int_t l = 0; l < 5; l++ )
511 for ( Int_t pole_index = 0; pole_index < 5; pole_index++ )
513 Double_t
A = g[pole_index][k] * g[pole_index][l];
514 Double_t
B = ma[pole_index] * ma[pole_index] -
s;
515 K[k][l] = K[k][l] + complex<double>( A / B, 0. );
520 for ( Int_t k = 0; k < 5; k++ )
522 for ( Int_t l = 0; l < 5; l++ )
524 Double_t
C =
f[k][l] * ( 1.0 - s_scatt );
525 Double_t D = (
s - s_scatt );
526 K[k][l] = K[k][l] + complex<double>(
C / D, 0. );
530 for ( Int_t k = 0; k < 5; k++ )
532 for ( Int_t l = 0; l < 5; l++ )
534 Double_t E = (
s - ( sa *
mpi *
mpi * 0.5 ) ) * ( 1.0 - sa_0 );
535 Double_t F = (
s - sa_0 );
536 K[k][l] = K[k][l] * complex<double>( E / F, 0. );
540 n11 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[0][0] * rho[0];
541 n12 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][1] * rho[1];
542 n13 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][2] * rho[2];
543 n14 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][3] * rho[3];
544 n15 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][4] * rho[4];
546 n21 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][0] * rho[0];
547 n22 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[1][1] * rho[1];
548 n23 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][2] * rho[2];
549 n24 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][3] * rho[3];
550 n25 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][4] * rho[4];
552 n31 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][0] * rho[0];
553 n32 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][1] * rho[1];
554 n33 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[2][2] * rho[2];
555 n34 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][3] * rho[3];
556 n35 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][4] * rho[4];
558 n41 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][0] * rho[0];
559 n42 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][1] * rho[1];
560 n43 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][2] * rho[2];
561 n44 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[3][3] * rho[3];
562 n45 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][4] * rho[4];
564 n51 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][0] * rho[0];
565 n52 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][1] * rho[1];
566 n53 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][2] * rho[2];
567 n54 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][3] * rho[3];
568 n55 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[4][4] * rho[4];
571 det = ( n15 * n24 * n33 * n42 * n51 - n14 * n25 * n33 * n42 * n51 -
572 n15 * n23 * n34 * n42 * n51 + n13 * n25 * n34 * n42 * n51 +
573 n14 * n23 * n35 * n42 * n51 - n13 * n24 * n35 * n42 * n51 -
574 n15 * n24 * n32 * n43 * n51 + n14 * n25 * n32 * n43 * n51 +
575 n15 * n22 * n34 * n43 * n51 - n12 * n25 * n34 * n43 * n51 -
576 n14 * n22 * n35 * n43 * n51 + n12 * n24 * n35 * n43 * n51 +
577 n15 * n23 * n32 * n44 * n51 - n13 * n25 * n32 * n44 * n51 -
578 n15 * n22 * n33 * n44 * n51 + n12 * n25 * n33 * n44 * n51 +
579 n13 * n22 * n35 * n44 * n51 - n12 * n23 * n35 * n44 * n51 -
580 n14 * n23 * n32 * n45 * n51 + n13 * n24 * n32 * n45 * n51 +
581 n14 * n22 * n33 * n45 * n51 - n12 * n24 * n33 * n45 * n51 -
582 n13 * n22 * n34 * n45 * n51 + n12 * n23 * n34 * n45 * n51 -
583 n15 * n24 * n33 * n41 * n52 + n14 * n25 * n33 * n41 * n52 +
584 n15 * n23 * n34 * n41 * n52 - n13 * n25 * n34 * n41 * n52 -
585 n14 * n23 * n35 * n41 * n52 + n13 * n24 * n35 * n41 * n52 +
586 n15 * n24 * n31 * n43 * n52 - n14 * n25 * n31 * n43 * n52 -
587 n15 * n21 * n34 * n43 * n52 + n11 * n25 * n34 * n43 * n52 +
588 n14 * n21 * n35 * n43 * n52 - n11 * n24 * n35 * n43 * n52 -
589 n15 * n23 * n31 * n44 * n52 + n13 * n25 * n31 * n44 * n52 +
590 n15 * n21 * n33 * n44 * n52 - n11 * n25 * n33 * n44 * n52 -
591 n13 * n21 * n35 * n44 * n52 + n11 * n23 * n35 * n44 * n52 +
592 n14 * n23 * n31 * n45 * n52 - n13 * n24 * n31 * n45 * n52 -
593 n14 * n21 * n33 * n45 * n52 + n11 * n24 * n33 * n45 * n52 +
594 n13 * n21 * n34 * n45 * n52 - n11 * n23 * n34 * n45 * n52 +
595 n15 * n24 * n32 * n41 * n53 - n14 * n25 * n32 * n41 * n53 -
596 n15 * n22 * n34 * n41 * n53 + n12 * n25 * n34 * n41 * n53 +
597 n14 * n22 * n35 * n41 * n53 - n12 * n24 * n35 * n41 * n53 -
598 n15 * n24 * n31 * n42 * n53 + n14 * n25 * n31 * n42 * n53 +
599 n15 * n21 * n34 * n42 * n53 - n11 * n25 * n34 * n42 * n53 -
600 n14 * n21 * n35 * n42 * n53 + n11 * n24 * n35 * n42 * n53 +
601 n15 * n22 * n31 * n44 * n53 - n12 * n25 * n31 * n44 * n53 -
602 n15 * n21 * n32 * n44 * n53 + n11 * n25 * n32 * n44 * n53 +
603 n12 * n21 * n35 * n44 * n53 - n11 * n22 * n35 * n44 * n53 -
604 n14 * n22 * n31 * n45 * n53 + n12 * n24 * n31 * n45 * n53 +
605 n14 * n21 * n32 * n45 * n53 - n11 * n24 * n32 * n45 * n53 -
606 n12 * n21 * n34 * n45 * n53 + n11 * n22 * n34 * n45 * n53 -
607 n15 * n23 * n32 * n41 * n54 + n13 * n25 * n32 * n41 * n54 +
608 n15 * n22 * n33 * n41 * n54 - n12 * n25 * n33 * n41 * n54 -
609 n13 * n22 * n35 * n41 * n54 + n12 * n23 * n35 * n41 * n54 +
610 n15 * n23 * n31 * n42 * n54 - n13 * n25 * n31 * n42 * n54 -
611 n15 * n21 * n33 * n42 * n54 + n11 * n25 * n33 * n42 * n54 +
612 n13 * n21 * n35 * n42 * n54 - n11 * n23 * n35 * n42 * n54 -
613 n15 * n22 * n31 * n43 * n54 + n12 * n25 * n31 * n43 * n54 +
614 n15 * n21 * n32 * n43 * n54 - n11 * n25 * n32 * n43 * n54 -
615 n12 * n21 * n35 * n43 * n54 + n11 * n22 * n35 * n43 * n54 +
616 n13 * n22 * n31 * n45 * n54 - n12 * n23 * n31 * n45 * n54 -
617 n13 * n21 * n32 * n45 * n54 + n11 * n23 * n32 * n45 * n54 +
618 n12 * n21 * n33 * n45 * n54 - n11 * n22 * n33 * n45 * n54 +
619 n14 * n23 * n32 * n41 * n55 - n13 * n24 * n32 * n41 * n55 -
620 n14 * n22 * n33 * n41 * n55 + n12 * n24 * n33 * n41 * n55 +
621 n13 * n22 * n34 * n41 * n55 - n12 * n23 * n34 * n41 * n55 -
622 n14 * n23 * n31 * n42 * n55 + n13 * n24 * n31 * n42 * n55 +
623 n14 * n21 * n33 * n42 * n55 - n11 * n24 * n33 * n42 * n55 -
624 n13 * n21 * n34 * n42 * n55 + n11 * n23 * n34 * n42 * n55 +
625 n14 * n22 * n31 * n43 * n55 - n12 * n24 * n31 * n43 * n55 -
626 n14 * n21 * n32 * n43 * n55 + n11 * n24 * n32 * n43 * n55 +
627 n12 * n21 * n34 * n43 * n55 - n11 * n22 * n34 * n43 * n55 -
628 n13 * n22 * n31 * n44 * n55 + n12 * n23 * n31 * n44 * n55 +
629 n13 * n21 * n32 * n44 * n55 - n11 * n23 * n32 * n44 * n55 -
630 n12 * n21 * n33 * n44 * n55 + n11 * n22 * n33 * n44 * n55 );
632 if ( det == complex<double>( 0., 0. ) ) reject =
true;
635 i[0][0] = ( n25 * n34 * n43 * n52 - n24 * n35 * n43 * n52 - n25 * n33 * n44 * n52 +
636 n23 * n35 * n44 * n52 + n24 * n33 * n45 * n52 - n23 * n34 * n45 * n52 -
637 n25 * n34 * n42 * n53 + n24 * n35 * n42 * n53 + n25 * n32 * n44 * n53 -
638 n22 * n35 * n44 * n53 - n24 * n32 * n45 * n53 + n22 * n34 * n45 * n53 +
639 n25 * n33 * n42 * n54 - n23 * n35 * n42 * n54 - n25 * n32 * n43 * n54 +
640 n22 * n35 * n43 * n54 + n23 * n32 * n45 * n54 - n22 * n33 * n45 * n54 -
641 n24 * n33 * n42 * n55 + n23 * n34 * n42 * n55 + n24 * n32 * n43 * n55 -
642 n22 * n34 * n43 * n55 - n23 * n32 * n44 * n55 + n22 * n33 * n44 * n55 ) /
645 i[0][1] = ( -n15 * n34 * n43 * n52 + n14 * n35 * n43 * n52 + n15 * n33 * n44 * n52 -
646 n13 * n35 * n44 * n52 - n14 * n33 * n45 * n52 + n13 * n34 * n45 * n52 +
647 n15 * n34 * n42 * n53 - n14 * n35 * n42 * n53 - n15 * n32 * n44 * n53 +
648 n12 * n35 * n44 * n53 + n14 * n32 * n45 * n53 - n12 * n34 * n45 * n53 -
649 n15 * n33 * n42 * n54 + n13 * n35 * n42 * n54 + n15 * n32 * n43 * n54 -
650 n12 * n35 * n43 * n54 - n13 * n32 * n45 * n54 + n12 * n33 * n45 * n54 +
651 n14 * n33 * n42 * n55 - n13 * n34 * n42 * n55 - n14 * n32 * n43 * n55 +
652 n12 * n34 * n43 * n55 + n13 * n32 * n44 * n55 - n12 * n33 * n44 * n55 ) /
655 i[0][2] = ( n15 * n24 * n43 * n52 - n14 * n25 * n43 * n52 - n15 * n23 * n44 * n52 +
656 n13 * n25 * n44 * n52 + n14 * n23 * n45 * n52 - n13 * n24 * n45 * n52 -
657 n15 * n24 * n42 * n53 + n14 * n25 * n42 * n53 + n15 * n22 * n44 * n53 -
658 n12 * n25 * n44 * n53 - n14 * n22 * n45 * n53 + n12 * n24 * n45 * n53 +
659 n15 * n23 * n42 * n54 - n13 * n25 * n42 * n54 - n15 * n22 * n43 * n54 +
660 n12 * n25 * n43 * n54 + n13 * n22 * n45 * n54 - n12 * n23 * n45 * n54 -
661 n14 * n23 * n42 * n55 + n13 * n24 * n42 * n55 + n14 * n22 * n43 * n55 -
662 n12 * n24 * n43 * n55 - n13 * n22 * n44 * n55 + n12 * n23 * n44 * n55 ) /
665 i[0][3] = ( -n15 * n24 * n33 * n52 + n14 * n25 * n33 * n52 + n15 * n23 * n34 * n52 -
666 n13 * n25 * n34 * n52 - n14 * n23 * n35 * n52 + n13 * n24 * n35 * n52 +
667 n15 * n24 * n32 * n53 - n14 * n25 * n32 * n53 - n15 * n22 * n34 * n53 +
668 n12 * n25 * n34 * n53 + n14 * n22 * n35 * n53 - n12 * n24 * n35 * n53 -
669 n15 * n23 * n32 * n54 + n13 * n25 * n32 * n54 + n15 * n22 * n33 * n54 -
670 n12 * n25 * n33 * n54 - n13 * n22 * n35 * n54 + n12 * n23 * n35 * n54 +
671 n14 * n23 * n32 * n55 - n13 * n24 * n32 * n55 - n14 * n22 * n33 * n55 +
672 n12 * n24 * n33 * n55 + n13 * n22 * n34 * n55 - n12 * n23 * n34 * n55 ) /
675 i[0][4] = ( n15 * n24 * n33 * n42 - n14 * n25 * n33 * n42 - n15 * n23 * n34 * n42 +
676 n13 * n25 * n34 * n42 + n14 * n23 * n35 * n42 - n13 * n24 * n35 * n42 -
677 n15 * n24 * n32 * n43 + n14 * n25 * n32 * n43 + n15 * n22 * n34 * n43 -
678 n12 * n25 * n34 * n43 - n14 * n22 * n35 * n43 + n12 * n24 * n35 * n43 +
679 n15 * n23 * n32 * n44 - n13 * n25 * n32 * n44 - n15 * n22 * n33 * n44 +
680 n12 * n25 * n33 * n44 + n13 * n22 * n35 * n44 - n12 * n23 * n35 * n44 -
681 n14 * n23 * n32 * n45 + n13 * n24 * n32 * n45 + n14 * n22 * n33 * n45 -
682 n12 * n24 * n33 * n45 - n13 * n22 * n34 * n45 + n12 * n23 * n34 * n45 ) /
686 double s0_prod = -0.07;
688 double u1j_re_limit[5][2], u1j_im_limit[5][2];
689 u1j_re_limit[0][0] = 0.;
690 u1j_re_limit[0][1] = 1.;
691 u1j_re_limit[1][0] = -0.29;
692 u1j_re_limit[1][1] = 0.12;
693 u1j_re_limit[2][0] = -0.17;
694 u1j_re_limit[2][1] = 0.065;
695 u1j_re_limit[3][0] = -0.66;
696 u1j_re_limit[3][1] = 0.1;
697 u1j_re_limit[4][0] = -1.36;
698 u1j_re_limit[4][1] = 0.18;
700 u1j_im_limit[0][0] = -0.58;
701 u1j_im_limit[0][1] = 0.58;
702 u1j_im_limit[1][0] = 0.00;
703 u1j_im_limit[1][1] = 0.28;
704 u1j_im_limit[2][0] = -0.135;
705 u1j_im_limit[2][1] = 0.10;
706 u1j_im_limit[3][0] = -0.13;
707 u1j_im_limit[3][1] = 0.40;
708 u1j_im_limit[4][0] = -0.36;
709 u1j_im_limit[4][1] = 0.80;
718 complex<double> value0( 0., 0. );
719 complex<double> value1( 0., 0. );
721 for (
int l = 0; l < 5; l++ )
723 double u1j_re =
real( i[0][l] );
724 double u1j_im =
imag( i[0][l] );
725 if ( u1j_re == 0. || u1j_im == 0. ) reject =
true;
726 if ( u1j_re < u1j_re_limit[l][0] || u1j_re > u1j_re_limit[l][1] ||
727 u1j_im < u1j_im_limit[l][0] || u1j_im > u1j_im_limit[l][1] )
730 for (
int pole_index = 0; pole_index < 5; pole_index++ )
732 complex<double>
A = beta[pole_index] * g[pole_index][l];
733 value0 += ( i[0][l] *
A ) / ( ma[pole_index] * ma[pole_index] -
s );
738 value1 += i[0][0] * fprod[0];
739 value1 += i[0][1] * fprod[1];
740 value1 += i[0][2] * fprod[2];
741 value1 += i[0][3] * fprod[3];
742 value1 += i[0][4] * fprod[4];
743 value1 *= ( 1. - s0_prod ) / (
s - s0_prod );
746 if ( reject ==
true )
return complex<double>( 9999., 9999. );
747 else return ( value0 + value1 );
751complex<double> D0ToKLpipi2018::amplitude_LASS( vector<double> p_k0l, vector<double> p_pip,
752 vector<double> p_pim,
string reso,
double A_r,
756 double gammaR = 0.27;
758 HepLorentzVector _p_k0l( p_k0l[0], p_k0l[1], p_k0l[2], p_k0l[3] );
759 HepLorentzVector _p_pip( p_pip[0], p_pip[1], p_pip[2], p_pip[3] );
760 HepLorentzVector _p_pim( p_pim[0], p_pim[1], p_pim[2], p_pim[3] );
761 if ( reso ==
"k0lpim" ) mab2 = pow( ( _p_k0l + _p_pim ).m(), 2 );
762 else if ( reso ==
"k0lpip" ) mab2 = pow( ( _p_k0l + _p_pip ).m(), 2 );
766 const double mD0 = 1.86483;
767 const double mKl = 0.49761;
768 const double mPi = 0.13957;
774 double _phiR = -1.9146;
775 double _phiF = 0.0017;
780 double mAB = sqrt( mab2 );
788 sqrt( ( ( ( mAB * mAB - mA * mA - mB * mB ) * ( mAB * mAB - mA * mA - mB * mB ) / 4.0 ) -
789 mA * mA * mB * mB ) /
794 sqrt( ( ( ( mR * mR - mA * mA - mB * mB ) * ( mR * mR - mA * mA - mB * mB ) / 4.0 ) -
795 mA * mA * mB * mB ) /
800 double g = gammaR * pow(
q / q0, power ) * ( mR / mAB ) * fR * fR;
802 complex<double> propagator_relativistic_BreitWigner =
803 1. / ( mR * mR - mAB * mAB - complex<double>( 0., mR * g ) );
806 double cot_deltaF = 1.0 / ( _a *
q ) + 0.5 * _r *
q;
807 double qcot_deltaF = 1.0 / _a + 0.5 * _r *
q *
q;
810 complex<double> expi2deltaF =
811 complex<double>( qcot_deltaF,
q ) / complex<double>( qcot_deltaF, -
q );
813 complex<double> resonant_term_T =
814 _R * complex<double>(
cos( _phiR + 2 * _phiF ),
sin( _phiR + 2 * _phiF ) ) *
815 propagator_relativistic_BreitWigner * mR * gammaR * mR / q0 * expi2deltaF;
818 complex<double> non_resonant_term_F = _F * complex<double>(
cos( _phiF ),
sin( _phiF ) ) *
819 (
cos( _phiF ) + cot_deltaF *
sin( _phiF ) ) *
820 sqrt(
s ) / complex<double>( qcot_deltaF, -
q );
823 complex<double> LASS_contribution = non_resonant_term_F + resonant_term_T;
825 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
complex< double > Amp_PFT(vector< double > k0l, vector< double > pip, vector< double > pim)
virtual ~D0ToKLpipi2018()