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;
100 0.255303 *
sin( 47.8861 * pi180inv ) );
102 13.4446 *
sin( -5.11127 * pi180inv ) );
104 38.8496 *
sin( -30.06 * pi180inv ) );
106 13.1086 *
sin( -81.4148 * pi180inv ) );
110 5.08049 *
sin( -182.312 * pi180inv ) );
112 17.2388 *
sin( -219.209 * pi180inv ) );
114 19.0145 *
sin( -76.9884 * pi180inv ) );
116 11.9875 *
sin( -190.502 * pi180inv ) );
172 deltad[1] = 194.7 * pi180inv;
173 deltad[2] = 196.0 * pi180inv;
174 deltad[3] = 167.0 * pi180inv;
184 vector<double> pim ) {
188 if ( k0l.size() != 4 || pip.size() != 4 || pim.size() != 4 )
189 cout <<
"ERROR in KSPIPI daughter 4 momentum" << endl;
190 for (
int i = 0; i < k0l.size(); i++ ) { pD.push_back( k0l[i] + pip[i] + pim[i] ); }
192 complex<double> DK2piRes0 = Resonance2( pD, pip, pim, ar[0], phir[0], width_R[0], mass_R[0],
194 complex<double> DK2piRes1 = Resonance2( pD, pip, pim, ar[1], phir[1], width_R[1], mass_R[1],
196 complex<double> DK2piRes2 = Resonance2( pD, pip, pim, ar[2], phir[2], width_R[2], mass_R[2],
198 complex<double> DK2piRes3 = Resonance2( pD, pip, pim, ar[3], phir[3], width_R[3], mass_R[3],
200 complex<double> DK2piRes4 = Resonance2( pD, k0l, pim, ar[4], phir[4], width_R[4], mass_R[4],
203 Resonance2( pD, k0l, pim, ar[5], phir[5], width_R[5], mass_R[5],
206 Resonance2( pD, k0l, pim, ar[6], phir[6], width_R[6], mass_R[6],
209 Resonance2( pD, k0l, pim, ar[7], phir[7], width_R[7], mass_R[7],
211 complex<double> DK2piRes8 = Resonance2( pD, k0l, pip, ar[8], phir[8], width_R[8], mass_R[8],
214 Resonance2( pD, k0l, pip, ar[9], phir[9], width_R[9], mass_R[9],
217 Resonance2( pD, k0l, pip, ar[10], phir[10], width_R[10], mass_R[10],
224 amplitude_LASS( k0l, pip, pim,
"k0spim", ar[11], phir[11] * pi180inv );
226 amplitude_LASS( k0l, pip, pim,
"k0spip", ar[12], phir[12] * pi180inv );
228 complex<double> _tmpAmp = DK2piRes0 + DK2piRes1 + DK2piRes2 + DK2piRes3 + pipi_s_wave;
232 complex<double> TOT_PFT_AMP = _tmpAmp + DK2piRes4 + DK2piRes5 + DK2piRes6 + DK2piRes7 +
233 DK2piRes8 + DK2piRes9 + DK2piRes10 + kpi_s_wave +
239complex<double> D0ToKSpipi::Resonance2( vector<double> p4_p, vector<double> p4_d1,
240 vector<double> p4_d2,
double mag,
double theta,
241 double gamma,
double bwm,
int spin ) {
246 HepLorentzVector _p4_p;
247 _p4_p.setX( p4_p[0] );
248 _p4_p.setY( p4_p[1] );
249 _p4_p.setZ( p4_p[2] );
250 _p4_p.setT( p4_p[3] );
251 HepLorentzVector _p4_d1;
252 _p4_d1.setX( p4_d1[0] );
253 _p4_d1.setY( p4_d1[1] );
254 _p4_d1.setZ( p4_d1[2] );
255 _p4_d1.setT( p4_d1[3] );
256 HepLorentzVector _p4_d2;
257 _p4_d2.setX( p4_d2[0] );
258 _p4_d2.setY( p4_d2[1] );
259 _p4_d2.setZ( p4_d2[2] );
260 _p4_d2.setT( p4_d2[3] );
261 HepLorentzVector _p4_d3 = _p4_p - _p4_d1 - _p4_d2;
263 double mAB = ( _p4_d1 + _p4_d2 ).invariantMass();
264 double mBC = ( _p4_d2 + _p4_d3 ).invariantMass();
265 double mAC = ( _p4_d1 + _p4_d3 ).invariantMass();
266 double mA = _p4_d1.invariantMass();
267 double mB = _p4_d2.invariantMass();
268 double mD = _p4_p.invariantMass();
269 double mC = _p4_d3.invariantMass();
272 double gammaR = gamma;
274 sqrt( ( ( ( mAB * mAB - mA * mA - mB * mB ) * ( mAB * mAB - mA * mA - mB * mB ) / 4.0 ) -
275 mA * mA * mB * mB ) /
278 sqrt( ( ( ( mR * mR - mA * mA - mB * mB ) * ( mR * mR - mA * mA - mB * mB ) / 4.0 ) -
279 mA * mA * mB * mB ) /
282 double pD = ( ( ( mD * mD - mR * mR - mC * mC ) * ( mD * mD - mR * mR - mC * mC ) / 4.0 ) -
283 mR * mR * mC * mC ) /
285 if ( pD > 0 ) { pD = sqrt( pD ); }
288 sqrt( ( ( ( mD * mD - mAB * mAB - mC * mC ) * ( mD * mD - mAB * mAB - mC * mC ) / 4.0 ) -
289 mAB * mAB * mC * mC ) /
302 fR = sqrt( 1.0 + 1.5 * 1.5 * pR * pR ) / sqrt( 1.0 + 1.5 * 1.5 * pAB * pAB );
303 fD = sqrt( 1.0 + 5.0 * 5.0 * pD * pD ) / sqrt( 1.0 + 5.0 * 5.0 * pDAB * pDAB );
307 fR = sqrt( ( 9 + 3 * pow( ( 1.5 * pR ), 2 ) + pow( ( 1.5 * pR ), 4 ) ) /
308 ( 9 + 3 * pow( ( 1.5 * pAB ), 2 ) + pow( ( 1.5 * pAB ), 4 ) ) );
309 fD = sqrt( ( 9 + 3 * pow( ( 5.0 * pD ), 2 ) + pow( ( 5.0 * pD ), 4 ) ) /
310 ( 9 + 3 * pow( ( 5.0 * pDAB ), 2 ) + pow( ( 5.0 * pDAB ), 4 ) ) );
313 default: cout <<
"Incorrect spin in D0ToKSpipi::EvtResonance2.cc\n" << endl;
316 double gammaAB = gammaR * pow( pAB / pR, power ) * ( mR / mAB ) * fR * fR;
320 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) * fR *
321 fD / ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) );
324 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) *
326 ( mAC * mAC - mBC * mBC +
327 ( ( mD * mD - mC * mC ) * ( mB * mB - mA * mA ) / ( mAB * mAB ) ) ) /
328 ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) ) );
331 ampl = mag * complex<double>(
cos( theta * pi180inv ),
sin( theta * pi180inv ) ) *
332 ( fR * fD / ( mR * mR - mAB * mAB - complex<double>( 0.0, mR * gammaAB ) ) ) *
333 ( pow( ( mBC * mBC - mAC * mAC +
334 ( mD * mD - mC * mC ) * ( mA * mA - mB * mB ) / ( mAB * mAB ) ),
337 ( mAB * mAB - 2 * mD * mD - 2 * mC * mC +
338 pow( ( mD * mD - mC * mC ) / mAB, 2 ) ) *
339 ( mAB * mAB - 2 * mA * mA - 2 * mB * mB +
340 pow( ( mA * mA - mB * mB ) / mAB, 2 ) ) );
342 default: cout <<
"Incorrect spin in D0ToKSpipi::Resonance2.cc\n" << endl;
348complex<double> D0ToKSpipi::K_matrix( vector<double> p_pip, vector<double> p_pim ) {
349 const double mD0 = 1.86483;
350 const double mKl = 0.49761;
351 const double mPi = 0.13957;
354 HepLorentzVector _p_pip( p_pip[0], p_pip[1], p_pip[2], p_pip[3] );
355 HepLorentzVector _p_pim( p_pim[0], p_pim[1], p_pim[2], p_pim[3] );
357 double mAB = ( _p_pip + _p_pim ).m();
358 double s = mAB * mAB;
360 complex<double> n11, n12, n13, n14, n15, n21, n22, n23, n24, n25, n31, n32, n33, n34, n35,
361 n41, n42, n43, n44, n45, n51, n52, n53, n54, n55;
362 double rho1sq, rho2sq, rho4sq, rho5sq;
363 complex<double> rho1, rho2, rho3, rho4, rho5;
364 vector<complex<double>> rho;
366 complex<double> pole, SVT, Adler;
371 const double mpi = 0.13957;
372 const double mK = 0.493677;
373 const double meta = 0.54775;
374 const double metap = 0.95778;
378 complex<double> K[5][5];
379 complex<double> i[5][5];
380 for (
int k = 0; k < 5; k++ )
384 for (
int l = 0; l < 5; l++ )
388 i[k][l] = complex<double>( 0., 0. );
389 K[k][l] = complex<double>( 0., 0. );
398 double s_scatt = -3.92637;
416 rho1sq = ( 1.0 - ( pow( (
mpi +
mpi ), 2 ) /
s ) );
417 if ( rho1sq >= 0. ) rho1 = complex<double>( sqrt( rho1sq ), 0. );
418 else rho1 = complex<double>( 0., sqrt( -rho1sq ) );
419 rho.push_back( rho1 );
422 rho2sq = ( 1.0 - ( pow( ( mK + mK ), 2 ) /
s ) );
423 if ( rho2sq >= 0. ) rho2 = complex<double>( sqrt( rho2sq ), 0. );
424 else rho2 = complex<double>( 0., sqrt( -rho2sq ) );
425 rho.push_back( rho2 );
428 rho3 = complex<double>( 0., 0. );
431 double real = 1.2274 + 0.00370909 / (
s *
s ) - ( 0.111203 ) / (
s)-6.39017 *
s +
432 16.8358 *
s *
s - 21.8845 *
s *
s *
s + 11.3153 *
s *
s *
s *
s;
433 double cont32 = sqrt( 1.0 - ( 16.0 *
mpi *
mpi ) );
434 rho3 = complex<double>( cont32 *
real, 0. );
436 else rho3 = complex<double>( sqrt( 1.0 - ( 16.0 *
mpi *
mpi /
s ) ), 0. );
437 rho.push_back( rho3 );
440 rho4sq = ( 1.0 - ( pow( (
meta +
meta ), 2 ) /
s ) );
441 if ( rho4sq >= 0. ) rho4 = complex<double>( sqrt( rho4sq ), 0. );
442 else rho4 = complex<double>( 0., sqrt( -rho4sq ) );
443 rho.push_back( rho4 );
446 rho5sq = ( 1.0 - ( pow( (
meta + metap ), 2 ) /
s ) );
447 if ( rho5sq >= 0. ) rho5 = complex<double>( sqrt( rho5sq ), 0. );
448 else rho5 = complex<double>( 0., sqrt( -rho5sq ) );
449 rho.push_back( rho5 );
452 for (
int k = 0; k < 5; k++ )
454 for (
int l = 0; l < 5; l++ )
456 for (
int pole_index = 0; pole_index < 5; pole_index++ )
458 double A = g[pole_index][k] * g[pole_index][l];
459 double B = ma[pole_index] * ma[pole_index] -
s;
460 K[k][l] = K[k][l] + complex<double>( A / B, 0. );
466 for (
int k = 0; k < 5; k++ )
468 for (
int l = 0; l < 5; l++ )
470 double C =
f[k][l] * ( 1.0 - s_scatt );
471 double D = (
s - s_scatt );
472 K[k][l] = K[k][l] + complex<double>(
C / D, 0. );
477 for (
int k = 0; k < 5; k++ )
479 for (
int l = 0; l < 5; l++ )
481 double E = (
s - ( sa *
mpi *
mpi * 0.5 ) ) * ( 1.0 - sa_0 );
482 double F = (
s - sa_0 );
483 K[k][l] = K[k][l] * complex<double>( E / F, 0. );
488 n11 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[0][0] * rho[0];
489 n12 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][1] * rho[1];
490 n13 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][2] * rho[2];
491 n14 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][3] * rho[3];
492 n15 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[0][4] * rho[4];
494 n21 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][0] * rho[0];
495 n22 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[1][1] * rho[1];
496 n23 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][2] * rho[2];
497 n24 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][3] * rho[3];
498 n25 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[1][4] * rho[4];
500 n31 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][0] * rho[0];
501 n32 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][1] * rho[1];
502 n33 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[2][2] * rho[2];
503 n34 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][3] * rho[3];
504 n35 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[2][4] * rho[4];
506 n41 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][0] * rho[0];
507 n42 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][1] * rho[1];
508 n43 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][2] * rho[2];
509 n44 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[3][3] * rho[3];
510 n45 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[3][4] * rho[4];
512 n51 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][0] * rho[0];
513 n52 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][1] * rho[1];
514 n53 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][2] * rho[2];
515 n54 = complex<double>( 0., 0. ) - complex<double>( 0., 1. ) * K[4][3] * rho[3];
516 n55 = complex<double>( 1., 0. ) - complex<double>( 0., 1. ) * K[4][4] * rho[4];
520 det = ( n15 * n24 * n33 * n42 * n51 - n14 * n25 * n33 * n42 * n51 -
521 n15 * n23 * n34 * n42 * n51 + n13 * n25 * n34 * n42 * n51 +
522 n14 * n23 * n35 * n42 * n51 - n13 * n24 * n35 * n42 * n51 -
523 n15 * n24 * n32 * n43 * n51 + n14 * n25 * n32 * n43 * n51 +
524 n15 * n22 * n34 * n43 * n51 - n12 * n25 * n34 * n43 * n51 -
525 n14 * n22 * n35 * n43 * n51 + n12 * n24 * n35 * n43 * n51 +
526 n15 * n23 * n32 * n44 * n51 - n13 * n25 * n32 * n44 * n51 -
527 n15 * n22 * n33 * n44 * n51 + n12 * n25 * n33 * n44 * n51 +
528 n13 * n22 * n35 * n44 * n51 - n12 * n23 * n35 * n44 * n51 -
529 n14 * n23 * n32 * n45 * n51 + n13 * n24 * n32 * n45 * n51 +
530 n14 * n22 * n33 * n45 * n51 - n12 * n24 * n33 * n45 * n51 -
531 n13 * n22 * n34 * n45 * n51 + n12 * n23 * n34 * n45 * n51 -
532 n15 * n24 * n33 * n41 * n52 + n14 * n25 * n33 * n41 * n52 +
533 n15 * n23 * n34 * n41 * n52 - n13 * n25 * n34 * n41 * n52 -
534 n14 * n23 * n35 * n41 * n52 + n13 * n24 * n35 * n41 * n52 +
535 n15 * n24 * n31 * n43 * n52 - n14 * n25 * n31 * n43 * n52 -
536 n15 * n21 * n34 * n43 * n52 + n11 * n25 * n34 * n43 * n52 +
537 n14 * n21 * n35 * n43 * n52 - n11 * n24 * n35 * n43 * n52 -
538 n15 * n23 * n31 * n44 * n52 + n13 * n25 * n31 * n44 * n52 +
539 n15 * n21 * n33 * n44 * n52 - n11 * n25 * n33 * n44 * n52 -
540 n13 * n21 * n35 * n44 * n52 + n11 * n23 * n35 * n44 * n52 +
541 n14 * n23 * n31 * n45 * n52 - n13 * n24 * n31 * n45 * n52 -
542 n14 * n21 * n33 * n45 * n52 + n11 * n24 * n33 * n45 * n52 +
543 n13 * n21 * n34 * n45 * n52 - n11 * n23 * n34 * n45 * n52 +
544 n15 * n24 * n32 * n41 * n53 - n14 * n25 * n32 * n41 * n53 -
545 n15 * n22 * n34 * n41 * n53 + n12 * n25 * n34 * n41 * n53 +
546 n14 * n22 * n35 * n41 * n53 - n12 * n24 * n35 * n41 * n53 -
547 n15 * n24 * n31 * n42 * n53 + n14 * n25 * n31 * n42 * n53 +
548 n15 * n21 * n34 * n42 * n53 - n11 * n25 * n34 * n42 * n53 -
549 n14 * n21 * n35 * n42 * n53 + n11 * n24 * n35 * n42 * n53 +
550 n15 * n22 * n31 * n44 * n53 - n12 * n25 * n31 * n44 * n53 -
551 n15 * n21 * n32 * n44 * n53 + n11 * n25 * n32 * n44 * n53 +
552 n12 * n21 * n35 * n44 * n53 - n11 * n22 * n35 * n44 * n53 -
553 n14 * n22 * n31 * n45 * n53 + n12 * n24 * n31 * n45 * n53 +
554 n14 * n21 * n32 * n45 * n53 - n11 * n24 * n32 * n45 * n53 -
555 n12 * n21 * n34 * n45 * n53 + n11 * n22 * n34 * n45 * n53 -
556 n15 * n23 * n32 * n41 * n54 + n13 * n25 * n32 * n41 * n54 +
557 n15 * n22 * n33 * n41 * n54 - n12 * n25 * n33 * n41 * n54 -
558 n13 * n22 * n35 * n41 * n54 + n12 * n23 * n35 * n41 * n54 +
559 n15 * n23 * n31 * n42 * n54 - n13 * n25 * n31 * n42 * n54 -
560 n15 * n21 * n33 * n42 * n54 + n11 * n25 * n33 * n42 * n54 +
561 n13 * n21 * n35 * n42 * n54 - n11 * n23 * n35 * n42 * n54 -
562 n15 * n22 * n31 * n43 * n54 + n12 * n25 * n31 * n43 * n54 +
563 n15 * n21 * n32 * n43 * n54 - n11 * n25 * n32 * n43 * n54 -
564 n12 * n21 * n35 * n43 * n54 + n11 * n22 * n35 * n43 * n54 +
565 n13 * n22 * n31 * n45 * n54 - n12 * n23 * n31 * n45 * n54 -
566 n13 * n21 * n32 * n45 * n54 + n11 * n23 * n32 * n45 * n54 +
567 n12 * n21 * n33 * n45 * n54 - n11 * n22 * n33 * n45 * n54 +
568 n14 * n23 * n32 * n41 * n55 - n13 * n24 * n32 * n41 * n55 -
569 n14 * n22 * n33 * n41 * n55 + n12 * n24 * n33 * n41 * n55 +
570 n13 * n22 * n34 * n41 * n55 - n12 * n23 * n34 * n41 * n55 -
571 n14 * n23 * n31 * n42 * n55 + n13 * n24 * n31 * n42 * n55 +
572 n14 * n21 * n33 * n42 * n55 - n11 * n24 * n33 * n42 * n55 -
573 n13 * n21 * n34 * n42 * n55 + n11 * n23 * n34 * n42 * n55 +
574 n14 * n22 * n31 * n43 * n55 - n12 * n24 * n31 * n43 * n55 -
575 n14 * n21 * n32 * n43 * n55 + n11 * n24 * n32 * n43 * n55 +
576 n12 * n21 * n34 * n43 * n55 - n11 * n22 * n34 * n43 * n55 -
577 n13 * n22 * n31 * n44 * n55 + n12 * n23 * n31 * n44 * n55 +
578 n13 * n21 * n32 * n44 * n55 - n11 * n23 * n32 * n44 * n55 -
579 n12 * n21 * n33 * n44 * n55 + n11 * n22 * n33 * n44 * n55 );
581 if ( det == complex<double>( 0., 0. ) ) reject =
true;
584 i[0][0] = ( n25 * n34 * n43 * n52 - n24 * n35 * n43 * n52 - n25 * n33 * n44 * n52 +
585 n23 * n35 * n44 * n52 + n24 * n33 * n45 * n52 - n23 * n34 * n45 * n52 -
586 n25 * n34 * n42 * n53 + n24 * n35 * n42 * n53 + n25 * n32 * n44 * n53 -
587 n22 * n35 * n44 * n53 - n24 * n32 * n45 * n53 + n22 * n34 * n45 * n53 +
588 n25 * n33 * n42 * n54 - n23 * n35 * n42 * n54 - n25 * n32 * n43 * n54 +
589 n22 * n35 * n43 * n54 + n23 * n32 * n45 * n54 - n22 * n33 * n45 * n54 -
590 n24 * n33 * n42 * n55 + n23 * n34 * n42 * n55 + n24 * n32 * n43 * n55 -
591 n22 * n34 * n43 * n55 - n23 * n32 * n44 * n55 + n22 * n33 * n44 * n55 ) /
594 i[0][1] = ( -n15 * n34 * n43 * n52 + n14 * n35 * n43 * n52 + n15 * n33 * n44 * n52 -
595 n13 * n35 * n44 * n52 - n14 * n33 * n45 * n52 + n13 * n34 * n45 * n52 +
596 n15 * n34 * n42 * n53 - n14 * n35 * n42 * n53 - n15 * n32 * n44 * n53 +
597 n12 * n35 * n44 * n53 + n14 * n32 * n45 * n53 - n12 * n34 * n45 * n53 -
598 n15 * n33 * n42 * n54 + n13 * n35 * n42 * n54 + n15 * n32 * n43 * n54 -
599 n12 * n35 * n43 * n54 - n13 * n32 * n45 * n54 + n12 * n33 * n45 * n54 +
600 n14 * n33 * n42 * n55 - n13 * n34 * n42 * n55 - n14 * n32 * n43 * n55 +
601 n12 * n34 * n43 * n55 + n13 * n32 * n44 * n55 - n12 * n33 * n44 * n55 ) /
604 i[0][2] = ( n15 * n24 * n43 * n52 - n14 * n25 * n43 * n52 - n15 * n23 * n44 * n52 +
605 n13 * n25 * n44 * n52 + n14 * n23 * n45 * n52 - n13 * n24 * n45 * n52 -
606 n15 * n24 * n42 * n53 + n14 * n25 * n42 * n53 + n15 * n22 * n44 * n53 -
607 n12 * n25 * n44 * n53 - n14 * n22 * n45 * n53 + n12 * n24 * n45 * n53 +
608 n15 * n23 * n42 * n54 - n13 * n25 * n42 * n54 - n15 * n22 * n43 * n54 +
609 n12 * n25 * n43 * n54 + n13 * n22 * n45 * n54 - n12 * n23 * n45 * n54 -
610 n14 * n23 * n42 * n55 + n13 * n24 * n42 * n55 + n14 * n22 * n43 * n55 -
611 n12 * n24 * n43 * n55 - n13 * n22 * n44 * n55 + n12 * n23 * n44 * n55 ) /
614 i[0][3] = ( -n15 * n24 * n33 * n52 + n14 * n25 * n33 * n52 + n15 * n23 * n34 * n52 -
615 n13 * n25 * n34 * n52 - n14 * n23 * n35 * n52 + n13 * n24 * n35 * n52 +
616 n15 * n24 * n32 * n53 - n14 * n25 * n32 * n53 - n15 * n22 * n34 * n53 +
617 n12 * n25 * n34 * n53 + n14 * n22 * n35 * n53 - n12 * n24 * n35 * n53 -
618 n15 * n23 * n32 * n54 + n13 * n25 * n32 * n54 + n15 * n22 * n33 * n54 -
619 n12 * n25 * n33 * n54 - n13 * n22 * n35 * n54 + n12 * n23 * n35 * n54 +
620 n14 * n23 * n32 * n55 - n13 * n24 * n32 * n55 - n14 * n22 * n33 * n55 +
621 n12 * n24 * n33 * n55 + n13 * n22 * n34 * n55 - n12 * n23 * n34 * n55 ) /
624 i[0][4] = ( n15 * n24 * n33 * n42 - n14 * n25 * n33 * n42 - n15 * n23 * n34 * n42 +
625 n13 * n25 * n34 * n42 + n14 * n23 * n35 * n42 - n13 * n24 * n35 * n42 -
626 n15 * n24 * n32 * n43 + n14 * n25 * n32 * n43 + n15 * n22 * n34 * n43 -
627 n12 * n25 * n34 * n43 - n14 * n22 * n35 * n43 + n12 * n24 * n35 * n43 +
628 n15 * n23 * n32 * n44 - n13 * n25 * n32 * n44 - n15 * n22 * n33 * n44 +
629 n12 * n25 * n33 * n44 + n13 * n22 * n35 * n44 - n12 * n23 * n35 * n44 -
630 n14 * n23 * n32 * n45 + n13 * n24 * n32 * n45 + n14 * n22 * n33 * n45 -
631 n12 * n24 * n33 * n45 - n13 * n22 * n34 * n45 + n12 * n23 * n34 * n45 ) /
634 double s0_prod = -0.07;
636 complex<double> value0( 0., 0. );
637 complex<double> value1( 0., 0. );
640 for (
int k = 0; k < 5; k++ )
642 double u1j_re =
real( i[0][k] );
643 double u1j_im =
imag( i[0][k] );
644 if ( u1j_re == 0. || u1j_im == 0. ) reject =
true;
647 for (
int pole_index = 0; pole_index < 5; pole_index++ )
649 complex<double>
A = beta[pole_index] * g[pole_index][k];
650 value0 += ( i[0][k] *
A ) / ( ma[pole_index] * ma[pole_index] -
s );
654 value1 += i[0][k] * fprod[k];
658 value1 *= ( 1. - s0_prod ) / (
s - s0_prod );
660 if ( reject ==
true )
return complex<double>( 9999., 9999. );
661 else return ( value0 + value1 );
664complex<double> D0ToKSpipi::amplitude_LASS( vector<double> p_k0l, vector<double> p_pip,
665 vector<double> p_pim,
string reso,
double A_r,
668 double gammaR = 0.27;
671 HepLorentzVector _p_k0l( p_k0l[0], p_k0l[1], p_k0l[2], p_k0l[3] );
672 HepLorentzVector _p_pip( p_pip[0], p_pip[1], p_pip[2], p_pip[3] );
673 HepLorentzVector _p_pim( p_pim[0], p_pim[1], p_pim[2], p_pim[3] );
674 if ( reso ==
"k0spim" ) mab2 = pow( ( _p_k0l + _p_pim ).m(), 2 );
675 else if ( reso ==
"k0spip" ) mab2 = pow( ( _p_k0l + _p_pip ).m(), 2 );
678 const double mD0 = 1.86483;
679 const double mKl = 0.49761;
680 const double mPi = 0.13957;
686 double _phiR = -1.9146;
687 double _phiF = 0.0017;
691 double mAB = sqrt( mab2 );
698 sqrt( ( ( ( mAB * mAB - mA * mA - mB * mB ) * ( mAB * mAB - mA * mA - mB * mB ) / 4.0 ) -
699 mA * mA * mB * mB ) /
704 sqrt( ( ( ( mR * mR - mA * mA - mB * mB ) * ( mR * mR - mA * mA - mB * mB ) / 4.0 ) -
705 mA * mA * mB * mB ) /
710 double g = gammaR * pow(
q / q0, power ) * ( mR / mAB ) * fR * fR;
711 complex<double> propagator_relativistic_BreitWigner =
712 1. / ( mR * mR - mAB * mAB - complex<double>( 0., mR * g ) );
715 double cot_deltaF = 1.0 / ( _a *
q ) + 0.5 * _r *
q;
716 double qcot_deltaF = 1.0 / _a + 0.5 * _r *
q *
q;
719 complex<double> expi2deltaF =
720 complex<double>( qcot_deltaF,
q ) / complex<double>( qcot_deltaF, -
q );
721 complex<double> resonant_term_T =
722 _R * complex<double>(
cos( _phiR + 2 * _phiF ),
sin( _phiR + 2 * _phiF ) ) *
723 propagator_relativistic_BreitWigner * mR * gammaR * mR / q0 * expi2deltaF;
726 complex<double> non_resonant_term_F = _F * complex<double>(
cos( _phiF ),
sin( _phiF ) ) *
727 (
cos( _phiF ) + cot_deltaF *
sin( _phiF ) ) *
728 sqrt(
s ) / complex<double>( qcot_deltaF, -
q );
731 complex<double> LASS_contribution = non_resonant_term_F + resonant_term_T;
733 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)