BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
D0ToKSpipi2018.cxx
Go to the documentation of this file.
2#include <stdlib.h>
3#include <iostream>
4#include <string>
5#include <complex>
6#include <vector>
7#include <math.h>
8#include "TMath.h"
9
10#include "CLHEP/Random/RandFlat.h"
11#include "CLHEP/Matrix/Vector.h"
12#include "CLHEP/Matrix/Matrix.h"
13#include "CLHEP/Matrix/SymMatrix.h"
14#include "CLHEP/Vector/ThreeVector.h"
15#include "CLHEP/Vector/LorentzVector.h"
16#include "CLHEP/Vector/TwoVector.h"
17using CLHEP::HepVector;
18using CLHEP::Hep3Vector;
19using CLHEP::Hep2Vector;
20using CLHEP::HepLorentzVector;
21using namespace std;
22
24
26 //std::cout << "D0ToKSpipi2018 ==> Initialization !" << std::endl;
27
28 _nd = 3;
29 tan2thetaC = (0.22650*0.22650)/(1.-(0.22650*0.22650)) ; //sin(theta_C) = 0.22650 +/- 0.00048
30 pi180inv = 1.0*3.1415926/180;
31 double Pi = 3.1415926;
32
33 mass_R[0]= 0.77155; width_R[0]= 0.13469; spin_R[0]= 1; ar[0]= 1; phir[0]= 0;
34 mass_R[1]= 0.78265; width_R[1]= 0.00849; spin_R[1]= 1; ar[1]= 0.038791; phir[1]= (180./Pi)*2.1073;
35 mass_R[2]= 1.27510; width_R[2]= 0.18420; spin_R[2]= 2; ar[2]= 1.42887; phir[2]= (180./Pi)*-0.633296;
36 mass_R[3]= 1.46500; width_R[3]= 0.40000; spin_R[3]= 1; ar[3]= 2.85131; phir[3]= (180./Pi)*1.7820801;
37 mass_R[4]= 0.89371; width_R[4]= 0.04719; spin_R[4]= 1; ar[4]= 1.72044; phir[4]= (180./Pi)*2.38835877;
38 mass_R[5]= 1.42560; width_R[5]= 0.09850; spin_R[5]= 2; ar[5]= 1.27268; phir[5]= (180./Pi)*-0.769095;
39 mass_R[6]= 1.71700; width_R[6]= 0.3220; spin_R[6]= 1; ar[6]= 3.307642; phir[6]= (180./Pi)*-2.062227;
40 mass_R[7]= 1.41400; width_R[7]= 0.2320; spin_R[7]= 1; ar[7]= 0.286927; phir[7]= (180./Pi)*1.7346186;
41 mass_R[8]= 0.89371; width_R[8]= 0.04719; spin_R[8]= 1; ar[8]= 0.1641792;phir[8]= (180./Pi)*-0.735903;
42 mass_R[9]= 1.42560; width_R[9]= 0.0985; spin_R[9]= 2; ar[9]= 0.1025736;phir[9]= (180./Pi)*-1.56397;
43 mass_R[10]= 1.41400; width_R[10]= 0.2320; spin_R[10]= 1; ar[10]= 0.2090326;phir[10]= (180./Pi)*2.6208986;
44 ////////////////////////////////////////
45 mass_R[11]= 1.42500; width_R[11]= 0.2700; spin_R[11]= 1; ar[11]= 2.36; phir[11]= 99.4;//not found
46 mass_R[12]= 1.42500; width_R[12]= 0.2700; spin_R[12]= 1; ar[12]= 0.11267; phir[12]= -162.3;//rad
47
48 beta[0] = complex<double>( 8.521486*cos( 1.195641 ), 8.521486*sin( 1.195641));//
49 beta[1] = complex<double>( 12.1895 *cos( 0.41802), 12.1895 *sin( 0.41802));
50 beta[2] = complex<double>(29.14616 *cos(-0.0018386 ), 29.14616 *sin(-0.0018386 ));
51 beta[3] = complex<double>(10.745735 *cos(-0.9057014 ), 10.745735 *sin(-0.9057014 ));
52 beta[4] = complex<double>(0., 0.);
53
54 fprod[0] = complex<double>(8.04427*cos(-2.19847), 8.04427*sin(-2.19847));
55 fprod[1] = complex<double>(26.2986*cos(-2.65853), 26.2986*sin(-2.65853));
56 fprod[2] = complex<double>(33.0349*cos(-1.62714), 33.0349*sin(-1.62714));
57 fprod[3] = complex<double>(26.1741*cos(-2.11891), 26.1741*sin(-2.11891));
58 fprod[4] = complex<double>(0., 0.);
59 //beta.push_back( complex<double>( 0.255303*cos( 47.8861 *pi180inv), 0.255303*sin( 47.8861 *pi180inv)) );
60 //beta.push_back( complex<double>(13.4446 *cos( -5.11127*pi180inv), 13.4446 *sin( -5.11127*pi180inv)) );
61 //beta.push_back( complex<double>(38.8496 *cos(-30.06 *pi180inv), 38.8496 *sin(-30.06 *pi180inv)) );
62 //beta.push_back( complex<double>(13.1086 *cos(-81.4148 *pi180inv), 13.1086 *sin(-81.4148 *pi180inv)) );
63 //beta.push_back( complex<double>(0., 0.) );
64
65 //fprod.push_back( complex<double>(5.08049*cos(-182.312*pi180inv), 5.08049*sin(-182.312*pi180inv)));
66 //fprod.push_back( complex<double>(17.2388*cos(-219.209*pi180inv), 17.2388*sin(-219.209*pi180inv)));
67 //fprod.push_back( complex<double>(19.0145*cos(-76.9884*pi180inv), 19.0145*sin(-76.9884*pi180inv)));
68 //fprod.push_back( complex<double>(11.9875*cos(-190.502*pi180inv), 11.9875*sin(-190.502*pi180inv)));
69 //fprod.push_back( complex<double>(0., 0.));
70
71 ma[0]= 0.651; g[0][0]= 0.22889; g[0][1]= -0.55377; g[0][2]= 0; g[0][3]= -0.39899; g[0][4]= -0.34639;
72 ma[1]= 1.20360; g[1][0]= 0.94128; g[1][1]= 0.55095; g[1][2]= 0; g[1][3]= 0.39065; g[1][4]= 0.31503;
73 ma[2]= 1.55817; g[2][0]= 0.36856; g[2][1]= 0.23888; g[2][2]= 0.55639; g[2][3]= 0.18340; g[2][4]= 0.18681;
74 ma[3]= 1.21000; g[3][0]= 0.33650; g[3][1]= 0.40907; g[3][2]= 0.85679; g[3][3]= 0.19906; g[3][4]= -0.00984;
75 ma[4]= 1.82206; g[4][0]= 0.18171; g[4][1]= -0.17558; g[4][2]= -0.79658; g[4][3]= -0.00355; g[4][4]= 0.22358;
76
77 // Hadronic parameters for tag modes: 0=no-specified, 1=Kpi, 2=Kpipi0, 3=K3pi
78 rd[0] = 0.0;
79 rd[1] = 0.0586;
80 rd[2] = 0.0440;
81 rd[3] = 0.0546;
82 deltad[0] = 0.0;
83 deltad[1] = 194.7*pi180inv;
84 deltad[2] = 196.0*pi180inv;
85 deltad[3] = 167.0*pi180inv;
86 Rf[0] = 0.0;
87 Rf[1] = 1.0;
88 Rf[2] = 0.78;
89 Rf[3] = 0.52;
90
91 return;
92}
93
94complex<double> D0ToKSpipi2018::Amp_PFT(vector<double> k0l, vector<double> pip, vector<double> pim) {
95 // Breit-Wigner lineshapes
96 vector<double> pD;pD.clear();
97 if(k0l.size()!=4||pip.size()!=4||pim.size()!=4)cout<<"ERROR in KSPIPI daughter 4 momentum"<<endl;
98 for(int i=0;i<k0l.size();i++){
99 pD.push_back(k0l[i] + pip[i] + pim[i]);
100 }
101
102 complex<double> DK2piRes0 = Resonance2(pD, pip, pim, ar[0], phir[0], width_R[0], mass_R[0], spin_R[0]); //ar, phir, width, mass, spin Rho770
103 complex<double> DK2piRes1 = Resonance2(pD, pip, pim, ar[1], phir[1], width_R[1], mass_R[1], spin_R[1]); //ar, phir, width, mass, spin Omega782
104 complex<double> DK2piRes2 = Resonance2(pD, pip, pim, ar[2], phir[2], width_R[2], mass_R[2], spin_R[2]); //ar, phir, width, mass, spin ftwo1270
105 complex<double> DK2piRes3 = Resonance2(pD, pip, pim, ar[3], phir[3], width_R[3], mass_R[3], spin_R[3]); //ar, phir, width, mass, spin Rho1450
106 complex<double> DK2piRes4 = Resonance2(pD, k0l, pim, ar[4], phir[4], width_R[4], mass_R[4], spin_R[4]); //ar, phir, width, mass, spin Kstar892-
107 complex<double> DK2piRes5 = Resonance2(pD, k0l, pim, ar[5], phir[5], width_R[5], mass_R[5], spin_R[5]); //ar, phir, width, mass, spin K2star1430-
108 complex<double> DK2piRes6 = Resonance2(pD, k0l, pim, ar[6], phir[6], width_R[6], mass_R[6], spin_R[6]); //ar, phir, width, mass, spin Kstar1680-
109 complex<double> DK2piRes7 = Resonance2(pD, k0l, pim, ar[7], phir[7], width_R[7], mass_R[7], spin_R[7]); //ar, phir, width, mass, spin Kstar1410-
110 complex<double> DK2piRes8 = Resonance2(pD, k0l, pip, ar[8], phir[8], width_R[8], mass_R[8], spin_R[8]); //ar, phir, width, mass, spin Kstar892+
111 complex<double> DK2piRes9 = Resonance2(pD, k0l, pip, ar[9], phir[9], width_R[9], mass_R[9], spin_R[9]); //ar, phir, width, mass, spin K2star1430+
112 complex<double> DK2piRes10 = Resonance2(pD, k0l, pip, ar[10], phir[10], width_R[10], mass_R[10], spin_R[10]); //ar, phir, width, mass, spin Kstar1410+
113 // K-matrix for pipi S-wave
114 complex<double> pipi_s_wave = K_matrix(pip, pim);
115 if(pipi_s_wave == complex<double>(9999., 9999.)) return 1e-20;
116 // LASS parametrization for Kpi S-wave
117 complex<double> kpi_s_wave = amplitude_LASS(k0l, pip, pim, "k0spim", ar[11], phir[11]*pi180inv);
118 complex<double> dcs_kpi_s_wave = amplitude_LASS(k0l, pip, pim, "k0spip", ar[12], phir[12]*pi180inv);
119
120 complex<double> _tmpAmp = DK2piRes0 + DK2piRes1 + DK2piRes2 + DK2piRes3 + pipi_s_wave;
121 //complex<double> TOT_PFT_AMP = DK2piRes0+ DK2piRes1+ DK2piRes2+ DK2piRes3+ DK2piRes4+ DK2piRes5+ DK2piRes6+ DK2piRes7+ DK2piRes8+ DK2piRes9+ DK2piRes10+ pipi_s_wave + kpi_s_wave+ dcs_kpi_s_wave ;
122 complex<double> TOT_PFT_AMP = _tmpAmp + DK2piRes4+ DK2piRes5+ DK2piRes6+ DK2piRes7+ DK2piRes8+ DK2piRes9+ DK2piRes10 + kpi_s_wave+ dcs_kpi_s_wave ;
123 // Coherent sum for pure-flavor-tagged amplitudes (PFT)
124 return TOT_PFT_AMP;
125}
126
127complex<double> D0ToKSpipi2018::Resonance2(vector<double> p4_p, vector<double> p4_d1, vector<double> p4_d2, double mag, double theta, double gamma, double bwm, int spin) {
128
129 complex<double> ampl;
130
131 //EvtVector4R p4_d3 = p4_p - p4_d1 - p4_d2;
132 HepLorentzVector _p4_p;_p4_p.setX(p4_p[0]);_p4_p.setY(p4_p[1]);_p4_p.setZ(p4_p[2]);_p4_p.setT(p4_p[3]);
133 HepLorentzVector _p4_d1;_p4_d1.setX(p4_d1[0]);_p4_d1.setY(p4_d1[1]);_p4_d1.setZ(p4_d1[2]);_p4_d1.setT(p4_d1[3]);
134 HepLorentzVector _p4_d2;_p4_d2.setX(p4_d2[0]);_p4_d2.setY(p4_d2[1]);_p4_d2.setZ(p4_d2[2]);_p4_d2.setT(p4_d2[3]);
135 HepLorentzVector _p4_d3=_p4_p-_p4_d1-_p4_d2;
136
137
138 double mAB= (_p4_d1 + _p4_d2).invariantMass();
139 double mBC= (_p4_d2 + _p4_d3).invariantMass();
140 double mAC= (_p4_d1 + _p4_d3).invariantMass();
141 double mA = _p4_d1.invariantMass();
142 double mB = _p4_d2.invariantMass();
143 double mD = _p4_p.invariantMass();
144 double mC = _p4_d3.invariantMass();
145
146
147 double mR = bwm;
148 double gammaR = gamma;
149 double pAB = sqrt( (((mAB*mAB-mA*mA-mB*mB)*(mAB*mAB-mA*mA-mB*mB)/4.0) - mA*mA*mB*mB)/(mAB*mAB));
150 double pR = sqrt( (((mR*mR-mA*mA-mB*mB)*(mR*mR-mA*mA-mB*mB)/4.0) - mA*mA*mB*mB)/(mR*mR));
151
152 double pD= (((mD*mD-mR*mR-mC*mC)*(mD*mD-mR*mR-mC*mC)/4.0) - mR*mR*mC*mC)/(mD*mD);
153 if ( pD>0 ) { pD = sqrt(pD); }
154 else { pD = 0;}
155 double pDAB=sqrt( (((mD*mD-mAB*mAB-mC*mC)*(mD*mD-mAB*mAB-mC*mC)/4.0) - mAB*mAB*mC*mC)/(mD*mD));
156 double fR = 1;
157 double fD = 1;
158 int power = 0;
159 switch (spin) {
160 case 0:
161 fR = 1.0;
162 fD = 1.0;
163 power = 1;
164 break;
165 case 1:
166 fR = sqrt(1.0+1.5*1.5*pR*pR)/sqrt(1.0+1.5*1.5*pAB*pAB);
167 fD = sqrt(1.0+5.0*5.0*pD*pD)/sqrt(1.0+5.0*5.0*pDAB*pDAB);
168 power = 3;
169 break;
170 case 2:
171 fR = sqrt( (9+3*pow((1.5*pR),2)+pow((1.5*pR),4))/(9+3*pow((1.5*pAB),2) +pow((1.5*pAB) ,4)) );
172 fD = sqrt( (9+3*pow((5.0*pD),2)+pow((5.0*pD),4))/(9+3*pow((5.0*pDAB),2)+pow((5.0*pDAB),4)) );
173 power = 5;
174 break;
175 default:
176 cout << "Incorrect spin in D0ToKSpipi2018::EvtResonance2.cc\n" <<endl;
177 }
178
179 double gammaAB= gammaR*pow(pAB/pR,power)*(mR/mAB)*fR*fR;
180 switch (spin) {
181 case 0:
182 ampl=mag*complex<double>(cos(theta*pi180inv),sin(theta*pi180inv))*fR*fD/(mR*mR-mAB*mAB-complex<double>(0.0,mR*gammaAB));
183 break;
184 case 1:
185 ampl=mag*complex<double>(cos(theta*pi180inv),sin(theta*pi180inv))*
186 (fR*fD*(mAC*mAC-mBC*mBC+((mD*mD-mC*mC)*(mB*mB-mA*mA)/(mAB*mAB)))/(mR*mR-mAB*mAB-complex<double>(0.0,mR*gammaAB)));
187 break;
188 case 2:
189 ampl=mag*complex<double>(cos(theta*pi180inv),sin(theta*pi180inv))*
190 (fR*fD/(mR*mR-mAB*mAB-complex<double>(0.0,mR*gammaAB)))*
191 (pow((mBC*mBC-mAC*mAC+(mD*mD-mC*mC)*(mA*mA-mB*mB)/(mAB*mAB)),2)-
192 (1.0/3.0)*(mAB*mAB-2*mD*mD-2*mC*mC+pow((mD*mD- mC*mC)/mAB, 2))*
193 (mAB*mAB-2*mA*mA-2*mB*mB+pow((mA*mA-mB*mB)/mAB,2)));
194 break;
195 default:
196 cout << "Incorrect spin in D0ToKSpipi2018::Resonance2.cc\n" <<endl;
197 }
198
199 return ampl;
200}
201
202complex<double> D0ToKSpipi2018::K_matrix(vector<double> p_pip, vector<double> p_pim) {
203 const double mD0 = 1.86483;
204 const double mKl = 0.49761;
205 const double mPi = 0.13957;
206 bool reject = false;
207
208 HepLorentzVector _p_pip(p_pip[0],p_pip[1],p_pip[2],p_pip[3]);
209 HepLorentzVector _p_pim(p_pim[0],p_pim[1],p_pim[2],p_pim[3]);
210
211 double mAB = (_p_pip + _p_pim).m() ;
212 double s = mAB*mAB;
213
214 complex<double> n11,n12,n13,n14,n15,n21,n22,n23,n24,n25,n31,n32,n33,n34,n35,n41,n42,n43,n44,n45,n51,n52,n53,n54,n55;
215 double rho1sq,rho2sq, rho4sq,rho5sq;
216 complex<double> rho1, rho2,rho3,rho4, rho5;
217 vector< complex<double> > rho;rho.clear();
218 complex<double> pole,SVT,Adler;
219 complex<double> det;
220 //vector< vector< complex<double> > > i;
221 double f[5][5];
222
223 const double mpi = 0.13957;
224 const double mK = 0.493677;
225 const double meta = 0.54775;
226 const double metap = 0.95778;
227
228 // Init matrices and vectors with zeros
229 //vector< vector< complex<double> > > K;
230 complex<double>K[5][5];
231 complex<double>i[5][5];
232 for(int k=0;k<5;k++) {
233 //vector< complex<double> > _itemp;
234 //vector< complex<double> > _Ktemp;
235 for(int l=0;l<5;l++) {
236 //_itemp.push_back(complex<double>(0.,0.));
237 //_Ktemp.push_back(complex<double>(0.,0.));
238 i[k][l]=complex<double>(0.,0.);
239 K[k][l]=complex<double>(0.,0.);
240 f[k][l]=0.;
241 }
242 //i.push_back(_itemp);
243 //K.push_back(_Ktemp);
244 //rho.pus_back(0.);
245 }
246
247 // Fill scattering data values
248 double s_scatt = -3.92637;
249 double sa = 1.0;
250 double sa_0 = -0.15;
251
252 // f_scattering (At least one of the two channels must be pi+pi-)
253 f[0][0] = 0.23399;
254 f[0][1] = 0.15044;
255 f[0][2] = -0.20545;
256 f[0][3] = 0.32825;
257 f[0][4] = 0.35412;
258
259 f[1][0] = f[0][1];
260 f[2][0] = f[0][2];
261 f[3][0] = f[0][3];
262 f[4][0] = f[0][4];
263
264 // Compute phase space factors
265 // rho_0
266 rho1sq=(1.0-(pow((mpi+mpi),2)/s));
267 if(rho1sq >=0.) rho1=complex<double>(sqrt(rho1sq),0.);
268 else rho1=complex<double>(0.,sqrt(-rho1sq));
269 rho.push_back(rho1);
270
271 // rho_1
272 rho2sq=(1.0-(pow((mK+mK),2)/s));
273 if(rho2sq >=0.) rho2=complex<double>(sqrt(rho2sq),0.);
274 else rho2=complex<double>(0.,sqrt(-rho2sq));
275 rho.push_back(rho2);
276
277 // rho_2
278 rho3=complex<double>(0.,0.);
279 if(s<=1) {
280 double real = 1.2274+0.00370909/(s*s) - (0.111203)/(s) - 6.39017*s +16.8358*s*s - 21.8845*s*s*s + 11.3153*s*s*s*s;
281 double cont32=sqrt(1.0-(16.0*mpi*mpi));
282 rho3=complex<double>(cont32*real,0.);
283 }
284 else rho3=complex<double>(sqrt(1.0-(16.0*mpi*mpi/s)),0.);
285 rho.push_back(rho3);
286
287 // rho_3
288 rho4sq=(1.0-(pow((meta+meta),2)/s));
289 if(rho4sq>=0.) rho4=complex<double>(sqrt(rho4sq),0.);
290 else rho4=complex<double>(0.,sqrt(-rho4sq));
291 rho.push_back(rho4);
292
293 // rho_4
294 rho5sq=(1.0-(pow((meta+metap),2)/s));
295 if(rho5sq >=0.) rho5=complex<double>(sqrt(rho5sq),0.);
296 else rho5=complex<double>(0.,sqrt(-rho5sq));
297 rho.push_back(rho5);
298
299 // Sum over the poles [Intermediate channel(k) -> pole(pole_index) -> final channel(l)]
300 for(int k=0;k<5;k++) {
301 for(int l=0;l<5;l++) {
302 for (int pole_index=0;pole_index<5;pole_index++) {
303 double A=g[pole_index][k]*g[pole_index][l];
304 double B=ma[pole_index]*ma[pole_index]-s;
305 K[k][l]=K[k][l]+complex<double>(A/B,0.);
306 }
307 }
308 }
309
310 // Direct scattering term [k -> l]
311 for(int k=0;k<5;k++) {
312 for(int l=0;l<5;l++) {
313 double C=f[k][l]*(1.0-s_scatt);
314 double D=(s-s_scatt);
315 K[k][l]=K[k][l]+complex<double>(C/D,0.);
316 }
317 }
318
319 // Multiplying the "Adler zero" term
320 for(int k=0;k<5;k++) {
321 for(int l=0;l<5;l++) {
322 double E=(s-(sa*mpi*mpi*0.5))*(1.0-sa_0);
323 double F=(s-sa_0);
324 K[k][l]=K[k][l]*complex<double>(E/F,0.);
325 }
326 }
327
328 // (1 - i rho K)_ij
329 n11=complex<double>(1.,0.)-complex<double>(0.,1.)*K[0][0]*rho[0];
330 n12=complex<double>(0.,0.)-complex<double>(0.,1.)*K[0][1]*rho[1];
331 n13=complex<double>(0.,0.)-complex<double>(0.,1.)*K[0][2]*rho[2];
332 n14=complex<double>(0.,0.)-complex<double>(0.,1.)*K[0][3]*rho[3];
333 n15=complex<double>(0.,0.)-complex<double>(0.,1.)*K[0][4]*rho[4];
334
335 n21=complex<double>(0.,0.)-complex<double>(0.,1.)*K[1][0]*rho[0];
336 n22=complex<double>(1.,0.)-complex<double>(0.,1.)*K[1][1]*rho[1];
337 n23=complex<double>(0.,0.)-complex<double>(0.,1.)*K[1][2]*rho[2];
338 n24=complex<double>(0.,0.)-complex<double>(0.,1.)*K[1][3]*rho[3];
339 n25=complex<double>(0.,0.)-complex<double>(0.,1.)*K[1][4]*rho[4];
340
341 n31=complex<double>(0.,0.)-complex<double>(0.,1.)*K[2][0]*rho[0];
342 n32=complex<double>(0.,0.)-complex<double>(0.,1.)*K[2][1]*rho[1];
343 n33=complex<double>(1.,0.)-complex<double>(0.,1.)*K[2][2]*rho[2];
344 n34=complex<double>(0.,0.)-complex<double>(0.,1.)*K[2][3]*rho[3];
345 n35=complex<double>(0.,0.)-complex<double>(0.,1.)*K[2][4]*rho[4];
346
347 n41=complex<double>(0.,0.)-complex<double>(0.,1.)*K[3][0]*rho[0];
348 n42=complex<double>(0.,0.)-complex<double>(0.,1.)*K[3][1]*rho[1];
349 n43=complex<double>(0.,0.)-complex<double>(0.,1.)*K[3][2]*rho[2];
350 n44=complex<double>(1.,0.)-complex<double>(0.,1.)*K[3][3]*rho[3];
351 n45=complex<double>(0.,0.)-complex<double>(0.,1.)*K[3][4]*rho[4];
352
353 n51=complex<double>(0.,0.)-complex<double>(0.,1.)*K[4][0]*rho[0];
354 n52=complex<double>(0.,0.)-complex<double>(0.,1.)*K[4][1]*rho[1];
355 n53=complex<double>(0.,0.)-complex<double>(0.,1.)*K[4][2]*rho[2];
356 n54=complex<double>(0.,0.)-complex<double>(0.,1.)*K[4][3]*rho[3];
357 n55=complex<double>(1.,0.)-complex<double>(0.,1.)*K[4][4]*rho[4];
358
359 // Compute the determinant for inverse [Looks horrible but TMatrixT does not support complex quantities; python bindings may help, working on it.]
360 det = (n15*n24*n33*n42*n51 - n14*n25*n33*n42*n51 - n15*n23*n34*n42*n51 +
361 n13*n25*n34*n42*n51 + n14*n23*n35*n42*n51 - n13*n24*n35*n42*n51 -
362 n15*n24*n32*n43*n51 + n14*n25*n32*n43*n51 + n15*n22*n34*n43*n51 -
363 n12*n25*n34*n43*n51 - n14*n22*n35*n43*n51 + n12*n24*n35*n43*n51 +
364 n15*n23*n32*n44*n51 - n13*n25*n32*n44*n51 - n15*n22*n33*n44*n51 +
365 n12*n25*n33*n44*n51 + n13*n22*n35*n44*n51 - n12*n23*n35*n44*n51 -
366 n14*n23*n32*n45*n51 + n13*n24*n32*n45*n51 + n14*n22*n33*n45*n51 -
367 n12*n24*n33*n45*n51 - n13*n22*n34*n45*n51 + n12*n23*n34*n45*n51 -
368 n15*n24*n33*n41*n52 + n14*n25*n33*n41*n52 + n15*n23*n34*n41*n52 -
369 n13*n25*n34*n41*n52 - n14*n23*n35*n41*n52 + n13*n24*n35*n41*n52 +
370 n15*n24*n31*n43*n52 - n14*n25*n31*n43*n52 - n15*n21*n34*n43*n52 +
371 n11*n25*n34*n43*n52 + n14*n21*n35*n43*n52 - n11*n24*n35*n43*n52 -
372 n15*n23*n31*n44*n52 + n13*n25*n31*n44*n52 + n15*n21*n33*n44*n52 -
373 n11*n25*n33*n44*n52 - n13*n21*n35*n44*n52 + n11*n23*n35*n44*n52 +
374 n14*n23*n31*n45*n52 - n13*n24*n31*n45*n52 - n14*n21*n33*n45*n52 +
375 n11*n24*n33*n45*n52 + n13*n21*n34*n45*n52 - n11*n23*n34*n45*n52 +
376 n15*n24*n32*n41*n53 - n14*n25*n32*n41*n53 - n15*n22*n34*n41*n53 +
377 n12*n25*n34*n41*n53 + n14*n22*n35*n41*n53 - n12*n24*n35*n41*n53 -
378 n15*n24*n31*n42*n53 + n14*n25*n31*n42*n53 + n15*n21*n34*n42*n53 -
379 n11*n25*n34*n42*n53 - n14*n21*n35*n42*n53 + n11*n24*n35*n42*n53 +
380 n15*n22*n31*n44*n53 - n12*n25*n31*n44*n53 - n15*n21*n32*n44*n53 +
381 n11*n25*n32*n44*n53 + n12*n21*n35*n44*n53 - n11*n22*n35*n44*n53 -
382 n14*n22*n31*n45*n53 + n12*n24*n31*n45*n53 + n14*n21*n32*n45*n53 -
383 n11*n24*n32*n45*n53 - n12*n21*n34*n45*n53 + n11*n22*n34*n45*n53 -
384 n15*n23*n32*n41*n54 + n13*n25*n32*n41*n54 + n15*n22*n33*n41*n54 -
385 n12*n25*n33*n41*n54 - n13*n22*n35*n41*n54 + n12*n23*n35*n41*n54 +
386 n15*n23*n31*n42*n54 - n13*n25*n31*n42*n54 - n15*n21*n33*n42*n54 +
387 n11*n25*n33*n42*n54 + n13*n21*n35*n42*n54 - n11*n23*n35*n42*n54 -
388 n15*n22*n31*n43*n54 + n12*n25*n31*n43*n54 + n15*n21*n32*n43*n54 -
389 n11*n25*n32*n43*n54 - n12*n21*n35*n43*n54 + n11*n22*n35*n43*n54 +
390 n13*n22*n31*n45*n54 - n12*n23*n31*n45*n54 - n13*n21*n32*n45*n54 +
391 n11*n23*n32*n45*n54 + n12*n21*n33*n45*n54 - n11*n22*n33*n45*n54 +
392 n14*n23*n32*n41*n55 - n13*n24*n32*n41*n55 - n14*n22*n33*n41*n55 +
393 n12*n24*n33*n41*n55 + n13*n22*n34*n41*n55 - n12*n23*n34*n41*n55 -
394 n14*n23*n31*n42*n55 + n13*n24*n31*n42*n55 + n14*n21*n33*n42*n55 -
395 n11*n24*n33*n42*n55 - n13*n21*n34*n42*n55 + n11*n23*n34*n42*n55 +
396 n14*n22*n31*n43*n55 - n12*n24*n31*n43*n55 - n14*n21*n32*n43*n55 +
397 n11*n24*n32*n43*n55 + n12*n21*n34*n43*n55 - n11*n22*n34*n43*n55 -
398 n13*n22*n31*n44*n55 + n12*n23*n31*n44*n55 + n13*n21*n32*n44*n55 -
399 n11*n23*n32*n44*n55 - n12*n21*n33*n44*n55 + n11*n22*n33*n44*n55);
400
401 if(det == complex<double>(0., 0.)) reject=true;
402
403 // The 1st row of the inverse matrix [(1-i\rhoK)^-1]_0j
404 i[0][0] = ( n25*n34*n43*n52 -
405 n24*n35*n43*n52 - n25*n33*n44*n52 + n23*n35*n44*n52 +
406 n24*n33*n45*n52 - n23*n34*n45*n52 - n25*n34*n42*n53 +
407 n24*n35*n42*n53 + n25*n32*n44*n53 - n22*n35*n44*n53 -
408 n24*n32*n45*n53 + n22*n34*n45*n53 + n25*n33*n42*n54 -
409 n23*n35*n42*n54 - n25*n32*n43*n54 + n22*n35*n43*n54 +
410 n23*n32*n45*n54 - n22*n33*n45*n54 - n24*n33*n42*n55 +
411 n23*n34*n42*n55 + n24*n32*n43*n55 - n22*n34*n43*n55 -
412 n23*n32*n44*n55 + n22*n33*n44*n55)/det;
413
414 i[0][1] = ( -n15*n34*n43*n52 +
415 n14*n35*n43*n52 + n15*n33*n44*n52 - n13*n35*n44*n52 -
416 n14*n33*n45*n52 + n13*n34*n45*n52 + n15*n34*n42*n53 -
417 n14*n35*n42*n53 - n15*n32*n44*n53 + n12*n35*n44*n53 +
418 n14*n32*n45*n53 - n12*n34*n45*n53 - n15*n33*n42*n54 +
419 n13*n35*n42*n54 + n15*n32*n43*n54 - n12*n35*n43*n54 -
420 n13*n32*n45*n54 + n12*n33*n45*n54 + n14*n33*n42*n55 -
421 n13*n34*n42*n55 - n14*n32*n43*n55 + n12*n34*n43*n55 +
422 n13*n32*n44*n55 - n12*n33*n44*n55)/det;
423
424 i[0][2] = ( n15*n24*n43*n52 -
425 n14*n25*n43*n52 - n15*n23*n44*n52 + n13*n25*n44*n52 +
426 n14*n23*n45*n52 - n13*n24*n45*n52 - n15*n24*n42*n53 +
427 n14*n25*n42*n53 + n15*n22*n44*n53 - n12*n25*n44*n53 -
428 n14*n22*n45*n53 + n12*n24*n45*n53 + n15*n23*n42*n54 -
429 n13*n25*n42*n54 - n15*n22*n43*n54 + n12*n25*n43*n54 +
430 n13*n22*n45*n54 - n12*n23*n45*n54 - n14*n23*n42*n55 +
431 n13*n24*n42*n55 + n14*n22*n43*n55 - n12*n24*n43*n55 -
432 n13*n22*n44*n55 + n12*n23*n44*n55)/det;
433
434 i[0][3] = ( -n15*n24*n33*n52 +
435 n14*n25*n33*n52 + n15*n23*n34*n52 - n13*n25*n34*n52 -
436 n14*n23*n35*n52 + n13*n24*n35*n52 + n15*n24*n32*n53 -
437 n14*n25*n32*n53 - n15*n22*n34*n53 + n12*n25*n34*n53 +
438 n14*n22*n35*n53 - n12*n24*n35*n53 - n15*n23*n32*n54 +
439 n13*n25*n32*n54 + n15*n22*n33*n54 - n12*n25*n33*n54 -
440 n13*n22*n35*n54 + n12*n23*n35*n54 + n14*n23*n32*n55 -
441 n13*n24*n32*n55 - n14*n22*n33*n55 + n12*n24*n33*n55 +
442 n13*n22*n34*n55 - n12*n23*n34*n55)/det;
443
444 i[0][4] = ( n15*n24*n33*n42 -
445 n14*n25*n33*n42 - n15*n23*n34*n42 + n13*n25*n34*n42 +
446 n14*n23*n35*n42 - n13*n24*n35*n42 - n15*n24*n32*n43 +
447 n14*n25*n32*n43 + n15*n22*n34*n43 - n12*n25*n34*n43 -
448 n14*n22*n35*n43 + n12*n24*n35*n43 + n15*n23*n32*n44 -
449 n13*n25*n32*n44 - n15*n22*n33*n44 + n12*n25*n33*n44 +
450 n13*n22*n35*n44 - n12*n23*n35*n44 - n14*n23*n32*n45 +
451 n13*n24*n32*n45 + n14*n22*n33*n45 - n12*n24*n33*n45 -
452 n13*n22*n34*n45 + n12*n23*n34*n45)/det;
453
454 double s0_prod = -0.07;
455
456 complex<double> value0(0., 0.);
457 complex<double> value1(0., 0.);
458
459 // [(1-i\rhoK)^-1]_0j*P_j {P_j: Production vector}
460 for(int k=0;k<5;k++) {
461 double u1j_re = real(i[0][k]);
462 double u1j_im = imag(i[0][k]);
463 if(u1j_re==0. || u1j_im==0.) reject=true;
464
465 // Initial state to K-matrix pole couplings * Pole to intermediate channels coupling
466 for(int pole_index=0;pole_index<5;pole_index++) {
467 complex<double> A = beta[pole_index]*g[pole_index][k];
468 value0 += (i[0][k]*A)/(ma[pole_index]*ma[pole_index]-s);
469 }
470
471 // Direct initial state to intermediate channels couplings
472 value1 += i[0][k]*fprod[k];
473
474 }
475
476 // Slowly varying polynomial term for the direct coupling
477 value1 *= (1.-s0_prod)/(s-s0_prod) ;
478
479 if(reject==true) return complex<double>(9999., 9999.);
480 else return (value0+value1);
481
482}
483
484complex<double> D0ToKSpipi2018::amplitude_LASS(vector<double> p_k0l, vector<double> p_pip, vector<double> p_pim, string reso, double A_r, double Phi_r) {
485 double mR = 1.425 ;
486 double gammaR = 0.27 ;
487 double mab2 = 0.0;
488
489 HepLorentzVector _p_k0l(p_k0l[0],p_k0l[1],p_k0l[2],p_k0l[3]);
490 HepLorentzVector _p_pip(p_pip[0],p_pip[1],p_pip[2],p_pip[3]);
491 HepLorentzVector _p_pim(p_pim[0],p_pim[1],p_pim[2],p_pim[3]);
492 if (reso == "k0spim") mab2 = pow((_p_k0l + _p_pim).m(),2);
493 else if(reso == "k0spip") mab2 = pow((_p_k0l + _p_pip).m(),2);
494 double s = mab2;
495
496 const double mD0 = 1.86483;
497 const double mKl = 0.49761;
498 const double mPi = 0.13957;
499
500 double _a = 0.113;
501 double _r = -33.8;
502 double _R = 1.0;
503 double _F = 0.96;
504 double _phiR = -1.9146;
505 double _phiF = 0.0017;
506 double fR = 1.0; // K*0(1430) has spin zero
507 int power = 1; // Power is 1 for spin zero
508
509 double mAB = sqrt(mab2);
510 double mA = mKl;
511 double mB = mPi;
512 double mC = mPi;
513 double mD = mD0;
514
515 double pAB=sqrt( (((mAB*mAB-mA*mA-mB*mB)*(mAB*mAB-mA*mA-mB*mB)/4.0) - mA*mA*mB*mB)/(mAB*mAB));
516 double q=pAB;
517
518 double pR=sqrt( (((mR*mR-mA*mA-mB*mB)*(mR*mR-mA*mA-mB*mB)/4.0) - mA*mA*mB*mB)/(mR*mR));
519 double q0=pR;
520
521 // Running width.
522 double g = gammaR*pow(q/q0,power)*(mR/mAB)*fR*fR;
523 complex<double> propagator_relativistic_BreitWigner = 1./(mR*mR - mAB*mAB - complex<double>(0.,mR*g));
524
525 // Non-resonant phase shift
526 double cot_deltaF = 1.0/(_a*q) + 0.5*_r*q;
527 double qcot_deltaF = 1.0/_a + 0.5*_r*q*q;
528
529 // Compute resonant part
530 complex<double> expi2deltaF = complex<double>(qcot_deltaF, q)/ complex<double>(qcot_deltaF, -q);
531 complex<double> resonant_term_T = _R * complex<double>(cos(_phiR + 2 * _phiF), sin(_phiR + 2 * _phiF)) * propagator_relativistic_BreitWigner * mR * gammaR * mR / q0 * expi2deltaF;
532
533 // Compute non-resonant part
534 complex<double> non_resonant_term_F = _F * complex<double>(cos(_phiF), sin(_phiF)) * (cos(_phiF) + cot_deltaF * sin(_phiF)) * sqrt(s) / complex<double>(qcot_deltaF, -q);
535
536 // Add non-resonant and resonant terms
537 complex<double> LASS_contribution = non_resonant_term_F + resonant_term_T;
538
539 return complex<double>(A_r*cos(Phi_r), A_r*sin(Phi_r)) * LASS_contribution;
540}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double imag(const EvtComplex &c)
Definition: EvtComplex.hh:246
double meta
double mPi
const double mpi
Definition: Gam4pikp.cxx:47
XmlRpcServer s
Definition: HelloServer.cpp:11
****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
Definition: KKsem.h:33
const double mD0
Definition: MyConst.h:5
***************************************************************************************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
Definition: RRes.h:29
virtual ~D0ToKSpipi2018()
complex< double > Amp_PFT(vector< double > k0l, vector< double > pip, vector< double > pim)