BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtD0ToKSpipipi0pi0.cc
Go to the documentation of this file.
1//------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtD0ToKSpipipi0pi0.cc
12//
13// Description: https://indico.ihep.ac.cn/event/16632/contributions/49342/attachments/23562/26699/meeting.pdf
14//
15// Modification history:
16//
17// Liaoyuan Dong Sep 27, 2023 Module created
18//
19//------------------------------------------------------------------------
21#include <fstream>
22#include <stdlib.h>
25#include "EvtGenBase/EvtPDL.hh"
30#include <string>
33using std::endl;
34
35
37
38void EvtD0ToKSpipipi0pi0::getName(std::string& model_name){
39 model_name="D0ToKSpipipi0pi0";
40}
41
45
47 checkNArg(0);
48 checkNDaug(5);
55
56 string name;
57 Double_t mean_v;
58
59 phi[0] = 0.0;
60 phi[1] = 1.5612285999617681043;
61 phi[2] = -1.0015624327720500375;
62 phi[3] = -0.76621511153827803753;
63 phi[4] = -1.7149726868246268907;
64 phi[5] = -0.76621511153827803753;
65 phi[6] = -1.7149726868246268907;
66 phi[7] = 1.3433768070347928969;
67 phi[8] = -0.69920457434816896125;
68 phi[9] = 0.29332928559239412891;
69 phi[10] = -0.11777754591498723613;
70 phi[11] = 0.95414772564220218243;
71 phi[12] = 1.7265019027073140734;
72 phi[13] = 0.061783461047396848187;
73 phi[14] = -1.8419695358887526737;
74 phi[15] = 5.0888716346195170814;
75 phi[16] = -2.4168727599993782285;
76 phi[17] = -0.59691363426268839731;
77 phi[18] = 2.2592819896596747498;
78 phi[19] = 1.4782518327546174675;
79
80 rho[0] = 1.0;
81 rho[1] = 0.4670656486078839098;
82 rho[2] = 1.2052085503722942406;
83 rho[3] = 2.3308692263403596456;
84 rho[4] = 3.5452858240068554352;
85 rho[5] = 2.3308692263403596456;
86 rho[6] = 3.5452858240068554352;
87 rho[7] = 3.909705435313104438;
88 rho[8] = 6.0375678543742763438;
89 rho[9] = 6.1054348075021245279;
90 rho[10] = 2.6074861273503890935;
91 rho[11] = 5.1506130168844084238;
92 rho[12] = 7.3338519702057851646;
93 rho[13] = 8.2495540430632239293;
94 rho[14] = 4.7408822820806992837;
95 rho[15] = 19.078674398257916778;
96 rho[16] = 5.8341821209677622306;
97 rho[17] = 3.370421146056012951;
98 rho[18] = 1.3283777517325123796;
99 rho[19] = 5.2468133147457907128;
100
101 modetype[0]= 1;
102 modetype[1]= 1;
103 modetype[2]= 1;
104 modetype[3]= 20;
105 modetype[4]= 20;
106 modetype[5]= 33;
107 modetype[6]= 33;
108 modetype[7]= 18;
109 modetype[8]= 18;
110 modetype[9]= 18;
111 modetype[10]= 4;
112 modetype[11]= 4;
113 modetype[12]= 23;
114 modetype[13]= 45;
115 modetype[14]= 45;
116 modetype[15]= 45;
117 modetype[16]= 46;
118 modetype[17]= 31;
119 modetype[18]= 31;
120 modetype[19]= 42;
121
122
123 width1[0] = 0.00868;
124 width1[1] = 0.00868;
125 width1[2] = 0.00868;
126 width1[3] = 0.420;
127 width1[4] = 0.420;
128 width1[5] = 0.420;
129 width1[6] = 0.420;
130 width1[7] = 0.420;
131 width1[8] = 0.420;
132 width1[9] = 0.420;
133 width1[10] = 0.142;
134 width1[11] = 0.142;
135 width1[12] = 0.0227;
136 width1[13] = 0.116;
137 width1[14] = 0.116;
138 width1[15] = 0.116;
139 width1[16] = 0.116;
140 width1[17] = 0.174;
141 width1[18] = 0.174;
142 width1[19] = 0.174;
143
144 width2[0] = 0.0473;
145 width2[1] = 0.0473;
146 width2[2] = 0.0473;
147 width2[3] = 0.0473;
148 width2[4] = 0.0473;
149 width2[5] = 0.0473;
150 width2[6] = 0.0473;
151 width2[7] = 0.0467;
152 width2[8] = 0.0467;
153 width2[9] = 0.0467;
154 width2[10] = 0.00868;
155 width2[11] = 0.00868;
156 width2[12] = 0.1478;
157 width2[13] = 0.1478;
158 width2[14] = 0.1478;
159 width2[15] = 0.1478;
160 width2[16] = 0.1478;
161 width2[17] = 0.1478;
162 width2[18] = 0.1478;
163 width2[19] = 0.1478;
164
165
166 mass1[0] = 0.78265;
167 mass1[1] = 0.78265;
168 mass1[2] = 0.78265;
169 mass1[3] = 1.230;
170 mass1[4] = 1.230;
171 mass1[5] = 1.230;
172 mass1[6] = 1.230;
173 mass1[7] = 1.230;
174 mass1[8] = 1.230;
175 mass1[9] = 1.230;
176 mass1[10] = 1.2295;
177 mass1[11] = 1.2295;
178 mass1[12] = 1.2819;
179 mass1[13] = 1.289;
180 mass1[14] = 1.289;
181 mass1[15] = 1.289;
182 mass1[16] = 1.289;
183 mass1[17] = 1.403;
184 mass1[18] = 1.403;
185 mass1[19] = 1.403;
186
187 mass2[0] = 0.89555;
188 mass2[1] = 0.89555;
189 mass2[2] = 0.89555;
190 mass2[3] = 0.89555;
191 mass2[4] = 0.89555;
192 mass2[5] = 0.89555;
193 mass2[6] = 0.89555;
194 mass2[7] = 0.89166;
195 mass2[8] = 0.89166;
196 mass2[9] = 0.89166;
197 mass2[10] = 0.78265;
198 mass2[11] = 0.78265;
199 mass2[12] = 0.77526;
200 mass2[13] = 0.77526;
201 mass2[14] = 0.77526;
202 mass2[15] = 0.77526;
203 mass2[16] = 0.77526;
204 mass2[17] = 0.77526;
205 mass2[18] = 0.77526;
206 mass2[19] = 0.77526;
207
208
209 mD0M = 1.86486;
210 mD = 1.86486;
211 metap = 0.95778;
212 mk0 = 0.497614;
213 mass_Kaon = 0.49368;
214 mass_Pion = 0.13957;
215 mass_Pion2 = 0.0194797849;
216 mass_2Pion = 0.27914;
217 math_2pi = 6.2831852;
218 rD2 = 25.0; // 5*5
219 rDs2 = 25.0; // 5*5
220 rRes2 = 9.0; // 3*3
221 gg1 = 0.5468;
222 gg2 = 0.23; // K*0(1430)
223 GS1 = 0.636619783;
224 GS2 = 0.01860182466;
225 GS3 = 0.1591549458; // 1/(2*math_2pi)
226 GS4 = 0.00620060822;
227
228 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
229 for (int i=0; i<4; i++) {
230 for (int j=0; j<4; j++) {
231 G[i][j] = GG[i][j];
232 }
233 }
234 double EE[4][4][4][4] =
235{ { {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
236 {{0,0,0,0}, {0,0,0,0}, {0,0,0,1}, {0,0,-1,0}},
237 {{0,0,0,0}, {0,0,0,-1}, {0,0,0,0}, {0,1,0,0} },
238 {{0,0,0,0}, {0,0,1,0}, {0,-1,0,0}, {0,0,0,0} } },
239 { {{0,0,0,0}, {0,0,0,0}, {0,0,0,-1}, {0,0,1,0} },
240 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
241 {{0,0,0,1}, {0,0,0,0}, {0,0,0,0}, {-1,0,0,0}},
242 {{0,0,-1,0}, {0,0,0,0}, {1,0,0,0}, {0,0,0,0} } },
243 { {{0,0,0,0}, {0,0,0,1}, {0,0,0,0}, {0,-1,0,0}},
244 {{0,0,0,-1}, {0,0,0,0}, {0,0,0,0}, {1,0,0,0} },
245 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
246 {{0,1,0,0}, {-1,0,0,0}, {0,0,0,0}, {0,0,0,0} } },
247 { {{0,0,0,0}, {0,0,-1,0}, {0,1,0,0}, {0,0,0,0} },
248 {{0,0,1,0}, {0,0,0,0}, {-1,0,0,0}, {0,0,0,0} },
249 {{0,-1,0,0}, {1,0,0,0}, {0,0,0,0}, {0,0,0,0} },
250 {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} } } };
251
252 for (int i=0; i<4; i++) {
253 for (int j=0; j<4; j++) {
254 for (int k=0; k<4; k++) {
255 for (int l=0; l<4; l++) {
256 E[i][j][k][l] = EE[i][j][k][l];
257 }
258 }
259 }
260 }
261
262}
263
264
266 setProbMax(21000000);
267}
268
270/*
271 double maxprob = 0.0;
272 for(int ir=0;ir<=60000000;ir++){
273
274 p->initializePhaseSpace(getNDaug(),getDaugs());
275 EvtVector4R D1 = p->getDaug(0)->getP4();
276 EvtVector4R D2 = p->getDaug(1)->getP4();
277 EvtVector4R D3 = p->getDaug(2)->getP4();
278 EvtVector4R D4 = p->getDaug(3)->getP4();
279 EvtVector4R D5 = p->getDaug(4)->getP4();
280
281 double P1[4], P2[4], P3[4], P4[4], P5[4];
282 P1[0] = D1.get(0); P1[1] = D1.get(1); P1[2] = D1.get(2); P1[3] = D1.get(3);
283 P2[0] = D2.get(0); P2[1] = D2.get(1); P2[2] = D2.get(2); P2[3] = D2.get(3);
284 P3[0] = D3.get(0); P3[1] = D3.get(1); P3[2] = D3.get(2); P3[3] = D3.get(3);
285 P4[0] = D4.get(0); P4[1] = D4.get(1); P4[2] = D4.get(2); P4[3] = D4.get(3);
286 P5[0] = D5.get(0); P5[1] = D5.get(1); P5[2] = D5.get(2); P5[3] = D5.get(3);
287
288 double value;
289 int g0[8]={1,1,1,0,1,1,1,1};
290 int g1[8]={1,1,1,0,1,1,1,1};
291 double r0[8]={1,1,1,0,1,1,1,1};
292 double r1[8]={1,1,1,0,1,1,1,1};
293 int spin[8]={0,1,2,0,1020,1020,0,1};
294
295 int nstates=8;
296 calEva(P1, P4, P2, P3, P5, mass1, mass2, width1, width2, rho, phi, r0, r1, g0, g1, spin, modetype, nstates, value);
297
298 if (value<0) continue;
299 if(value>maxprob) {
300 maxprob=value;
301 cout << "ir= " << ir << endl;
302 cout << "double P1[4] = {" << P1[0] <<","<< P1[1] <<","<< P1[2] <<","<< P1[3] <<"};"<< endl;
303 cout << "double P2[4] = {" << P2[0] <<","<< P2[1] <<","<< P2[2] <<","<< P2[3] <<"};"<< endl;
304 cout << "double P3[4] = {" << P3[0] <<","<< P3[1] <<","<< P3[2] <<","<< P3[3] <<"};"<< endl;
305 cout << "double P4[4] = {" << P4[0] <<","<< P4[1] <<","<< P4[2] <<","<< P4[3] <<"};"<< endl;
306 cout << "double P5[4] = {" << P5[0] <<","<< P5[1] <<","<< P5[2] <<","<< P5[3] <<"};"<< endl;
307 cout << "MAX====> " << maxprob << endl;
308
309 }
310 }
311 printf("MAXprob = %.10f\n",maxprob);
312*/
313
315 EvtVector4R D1 = p->getDaug(0)->getP4();
316 EvtVector4R D2 = p->getDaug(1)->getP4();
317 EvtVector4R D3 = p->getDaug(2)->getP4();
318 EvtVector4R D4 = p->getDaug(3)->getP4();
319 EvtVector4R D5 = p->getDaug(4)->getP4();
320
321 double P1[4], P2[4], P3[4], P4[4], P5[4];
322 if(getParentId()==EvtPDL::getId("D0")){
323 P1[0] = D1.get(0); P1[1] = D1.get(1); P1[2] = D1.get(2); P1[3] = D1.get(3);
324 P2[0] = D2.get(0); P2[1] = D2.get(1); P2[2] = D2.get(2); P2[3] = D2.get(3);
325 P3[0] = D3.get(0); P3[1] = D3.get(1); P3[2] = D3.get(2); P3[3] = D3.get(3);
326 P4[0] = D4.get(0); P4[1] = D4.get(1); P4[2] = D4.get(2); P4[3] = D4.get(3);
327 P5[0] = D5.get(0); P5[1] = D5.get(1); P5[2] = D5.get(2); P5[3] = D5.get(3);
328 }
329 else{
330 P1[0] = D1.get(0); P1[1] = -(D1.get(1)); P1[2] = -(D1.get(2)); P1[3] = -(D1.get(3));
331 P2[0] = D2.get(0); P2[1] = -(D2.get(1)); P2[2] = -(D2.get(2)); P2[3] = -(D2.get(3));
332 P3[0] = D3.get(0); P3[1] = -(D3.get(1)); P3[2] = -(D3.get(2)); P3[3] = -(D3.get(3));
333 P4[0] = D4.get(0); P4[1] = -(D4.get(1)); P4[2] = -(D4.get(2)); P4[3] = -(D4.get(3));
334 P5[0] = D5.get(0); P5[1] = -(D5.get(1)); P5[2] = -(D5.get(2)); P5[3] = -(D5.get(3));
335 }
336
337 double value;
338 int g0[20]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
339 int g1[20]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
340 int spin[20]={0,1,2,1020,1120,1020,1120,1020,1120,1220,0,2,1,1020,1120,1220,1,1020,1120,1020};
341
342 int nstates=20;
343 calEva(P1, P2, P3, P4, P5, mass1, mass2, width1, width2, rho, phi, r0, r1, g0, g1, spin, modetype, nstates, value);
344 setProb(value);
345
346 return ;
347}
348
349
350void EvtD0ToKSpipipi0pi0::Com_Multi(double a1[2], double a2[2], double res[2])//(a1+b1i)(a2+b2i)
351{
352 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
353 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
354}
355void EvtD0ToKSpipipi0pi0::Com_Divide(double a1[2], double a2[2], double res[2])
356{
357 double tmp = a2[0]*a2[0]+a2[1]*a2[1];
358 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/tmp;
359 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/tmp;
360}
361
362
363void EvtD0ToKSpipipi0pi0::propagatorRBW_a1(double mass2, double mass, double width, double sa, double sb, double sc, double r2, int l, double prop[2])
364{
365 double a[2], b[2];
366 int iii=int(sqrt(sa)*1000)-1;
367 double a1width[3000]={
3680.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3690.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3700.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3710.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3720.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3730.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3740.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3750.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3760.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3770.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3780.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3790.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3800.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3810.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3820.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3830.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3840.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3850.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3860.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3870.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3880.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3890.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3900.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3910.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3920.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3930.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3940.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3950.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3960.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3970.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3980.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
3990.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4000.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4010.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4020.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4030.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4040.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4050.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4060.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4070.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4080.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4090.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4100.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4110.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4120.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4130.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4140.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4150.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4160.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4170.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4180.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4190.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4200.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
4210.000000,0.000001,0.000001,0.000001,0.000002,0.000002,0.000002,0.000003,
4220.000004,0.000004,0.000005,0.000006,0.000007,0.000008,0.000009,0.000010,
4230.000011,0.000012,0.000014,0.000015,0.000017,0.000019,0.000021,0.000023,
4240.000025,0.000027,0.000029,0.000032,0.000035,0.000038,0.000041,0.000044,
4250.000047,0.000050,0.000054,0.000058,0.000062,0.000066,0.000070,0.000075,
4260.000079,0.000084,0.000089,0.000094,0.000100,0.000105,0.000111,0.000117,
4270.000124,0.000130,0.000137,0.000143,0.000151,0.000158,0.000165,0.000173,
4280.000182,0.000190,0.000199,0.000207,0.000216,0.000225,0.000235,0.000245,
4290.000256,0.000266,0.000277,0.000288,0.000300,0.000311,0.000322,0.000335,
4300.000347,0.000360,0.000373,0.000385,0.000400,0.000415,0.000429,0.000442,
4310.000457,0.000473,0.000488,0.000504,0.000520,0.000539,0.000555,0.000572,
4320.000590,0.000608,0.000626,0.000646,0.000664,0.000684,0.000704,0.000725,
4330.000745,0.000766,0.000787,0.000809,0.000828,0.000854,0.000878,0.000901,
4340.000927,0.000952,0.000973,0.001001,0.001027,0.001048,0.001080,0.001104,
4350.001132,0.001159,0.001189,0.001219,0.001245,0.001277,0.001308,0.001338,
4360.001370,0.001404,0.001433,0.001468,0.001498,0.001533,0.001570,0.001600,
4370.001638,0.001678,0.001711,0.001745,0.001780,0.001825,0.001857,0.001898,
4380.001941,0.001972,0.002017,0.002065,0.002104,0.002146,0.002189,0.002234,
4390.002277,0.002319,0.002369,0.002410,0.002461,0.002511,0.002557,0.002605,
4400.002661,0.002704,0.002762,0.002807,0.002855,0.002910,0.002965,0.003020,
4410.003074,0.003127,0.003178,0.003228,0.003288,0.003351,0.003409,0.003471,
4420.003532,0.003598,0.003660,0.003720,0.003793,0.003854,0.003910,0.003972,
4430.004050,0.004108,0.004181,0.004254,0.004309,0.004380,0.004464,0.004533,
4440.004603,0.004679,0.004756,0.004811,0.004898,0.004974,0.005048,0.005142,
4450.005215,0.005279,0.005363,0.005449,0.005533,0.005604,0.005695,0.005783,
4460.005869,0.005971,0.006060,0.006142,0.006247,0.006332,0.006409,0.006502,
4470.006594,0.006713,0.006784,0.006889,0.006995,0.007079,0.007190,0.007303,
4480.007381,0.007487,0.007592,0.007710,0.007801,0.007910,0.008032,0.008149,
4490.008247,0.008378,0.008462,0.008559,0.008706,0.008843,0.008943,0.009091,
4500.009207,0.009308,0.009448,0.009555,0.009698,0.009810,0.009936,0.010020,
4510.010186,0.010320,0.010474,0.010611,0.010742,0.010840,0.011011,0.011167,
4520.011281,0.011395,0.011541,0.011714,0.011853,0.012046,0.012169,0.012277,
4530.012460,0.012617,0.012805,0.012922,0.013072,0.013234,0.013389,0.013561,
4540.013704,0.013917,0.014025,0.014239,0.014425,0.014600,0.014716,0.014958,
4550.015114,0.015325,0.015488,0.015630,0.015797,0.016035,0.016206,0.016404,
4560.016591,0.016842,0.016964,0.017199,0.017392,0.017557,0.017798,0.017987,
4570.018178,0.018337,0.018631,0.018829,0.019008,0.019221,0.019467,0.019698,
4580.019941,0.020166,0.020379,0.020585,0.020806,0.021040,0.021309,0.021482,
4590.021764,0.022046,0.022306,0.022478,0.022736,0.023049,0.023222,0.023536,
4600.023756,0.024090,0.024337,0.024557,0.024873,0.025099,0.025392,0.025682,
4610.025995,0.026291,0.026498,0.026927,0.027119,0.027377,0.027804,0.028135,
4620.028279,0.028682,0.028871,0.029355,0.029531,0.029956,0.030243,0.030592,
4630.030873,0.031246,0.031494,0.031771,0.032167,0.032515,0.032881,0.033211,
4640.033653,0.033988,0.034394,0.034639,0.035055,0.035569,0.035879,0.036211,
4650.036611,0.036932,0.037489,0.037779,0.038284,0.038723,0.039001,0.039574,
4660.039854,0.040274,0.040881,0.041117,0.041644,0.042055,0.042531,0.043030,
4670.043354,0.043832,0.044277,0.044956,0.045284,0.045828,0.046440,0.046800,
4680.047518,0.047727,0.048258,0.048850,0.049316,0.049992,0.050486,0.050987,
4690.051410,0.051928,0.052613,0.053110,0.053824,0.054351,0.055078,0.055654,
4700.056030,0.056763,0.057245,0.057832,0.058569,0.059292,0.060048,0.060569,
4710.061056,0.061869,0.062612,0.063186,0.063886,0.064655,0.065198,0.065815,
4720.066649,0.067577,0.068012,0.068967,0.069630,0.070181,0.070786,0.071989,
4730.072764,0.073466,0.074461,0.075093,0.075994,0.076834,0.077455,0.078709,
4740.079581,0.080408,0.080884,0.081965,0.082882,0.083658,0.084824,0.085513,
4750.086662,0.087602,0.088678,0.089492,0.090641,0.091369,0.092494,0.093484,
4760.094615,0.095385,0.096168,0.097668,0.098611,0.099630,0.100772,0.102020,
4770.103145,0.104110,0.105071,0.106604,0.107791,0.108451,0.109509,0.111356,
4780.112026,0.113921,0.114507,0.116071,0.117027,0.118213,0.120164,0.120701,
4790.122121,0.123894,0.124937,0.126134,0.127391,0.128882,0.130056,0.131649,
4800.133046,0.134275,0.135119,0.137072,0.138476,0.139612,0.140388,0.142734,
4810.143576,0.145445,0.147414,0.148856,0.149891,0.150963,0.152477,0.153717,
4820.155275,0.156859,0.158462,0.159257,0.161865,0.163182,0.164465,0.165538,
4830.167003,0.169257,0.171211,0.172093,0.173261,0.174639,0.176510,0.177684,
4840.179077,0.181041,0.182446,0.184769,0.184926,0.186741,0.188844,0.190884,
4850.191714,0.192254,0.193921,0.195917,0.196766,0.199052,0.200603,0.201808,
4860.202699,0.204636,0.205712,0.206849,0.208741,0.209424,0.211698,0.212753,
4870.215516,0.215857,0.217790,0.217774,0.220454,0.221821,0.223466,0.224494,
4880.225632,0.227231,0.229456,0.229581,0.231537,0.232263,0.233834,0.234725,
4890.237079,0.238015,0.239400,0.240193,0.241693,0.243787,0.244317,0.244971,
4900.246711,0.248615,0.249387,0.250905,0.252702,0.253535,0.254385,0.255375,
4910.256671,0.258405,0.259741,0.260875,0.262131,0.262920,0.264860,0.265893,
4920.266016,0.267727,0.270039,0.270689,0.271047,0.272313,0.272474,0.274724,
4930.275813,0.275937,0.278793,0.278783,0.281407,0.281351,0.282481,0.284226,
4940.284113,0.284999,0.285655,0.288361,0.287856,0.288893,0.290211,0.291708,
4950.291985,0.294298,0.294849,0.296796,0.296197,0.296851,0.298011,0.300368,
4960.299982,0.302378,0.304363,0.303711,0.304729,0.306789,0.306378,0.307372,
4970.308720,0.309509,0.309712,0.310782,0.311699,0.312668,0.312755,0.313675,
4980.315311,0.316640,0.317217,0.317403,0.318478,0.319916,0.321803,0.322678,
4990.323237,0.324343,0.324433,0.324493,0.324969,0.325894,0.328563,0.328721,
5000.328954,0.330640,0.328164,0.331267,0.331695,0.333772,0.333619,0.334351,
5010.334605,0.336434,0.337510,0.336535,0.337362,0.338799,0.340732,0.339896,
5020.342707,0.343471,0.342318,0.342431,0.344543,0.345611,0.345786,0.346590,
5030.346610,0.347761,0.348914,0.349558,0.350577,0.352128,0.350982,0.354134,
5040.352773,0.353213,0.352972,0.354927,0.355784,0.355778,0.355801,0.357040,
5050.358013,0.358432,0.360045,0.359743,0.360238,0.359850,0.362184,0.361580,
5060.363430,0.362333,0.364397,0.364472,0.364370,0.365303,0.366644,0.367777,
5070.368604,0.367631,0.368324,0.369782,0.371121,0.370653,0.370040,0.371649,
5080.370201,0.373362,0.373900,0.374159,0.374916,0.374503,0.376703,0.372802,
5090.376191,0.379596,0.377325,0.376363,0.379369,0.379791,0.378703,0.380177,
5100.381762,0.381335,0.381374,0.384668,0.381763,0.382746,0.384723,0.385089,
5110.386229,0.386702,0.387749,0.384423,0.384714,0.384181,0.388489,0.388618,
5120.388179,0.390092,0.389871,0.390496,0.391181,0.390679,0.392614,0.392269,
5130.393899,0.393466,0.391421,0.391090,0.395586,0.391776,0.396882,0.393254,
5140.394400,0.395749,0.398063,0.397138,0.397585,0.397288,0.397847,0.395375,
5150.400170,0.400007,0.401191,0.398513,0.401922,0.400477,0.404257,0.403271,
5160.400677,0.403913,0.403172,0.404727,0.403406,0.404404,0.405265,0.406389,
5170.405738,0.402173,0.407831,0.405895,0.409172,0.408934,0.405915,0.408486,
5180.407320,0.407437,0.405444,0.408400,0.410909,0.412427,0.409881,0.411021,
5190.413001,0.410369,0.414702,0.413372,0.413095,0.410972,0.416346,0.416095,
5200.414132,0.414344,0.416952,0.415197,0.417583,0.416582,0.416622,0.416895,
5210.416576,0.415551,0.417925,0.414838,0.417051,0.416831,0.420000,0.419132,
5220.418173,0.417645,0.419679,0.419866,0.419581,0.421531,0.420878,0.422737,
5230.421872,0.421304,0.425486,0.424434,0.420842,0.426753,0.422761,0.422178,
5240.422372,0.424173,0.425582,0.425080,0.425831,0.423551,0.422949,0.425784,
5250.427977,0.427948,0.426368,0.425138,0.425351,0.428643,0.428148,0.427488,
5260.431704,0.430167,0.429655,0.429584,0.425458,0.430728,0.429845,0.431145,
5270.429180,0.428874,0.430720,0.430024,0.432034,0.431359,0.431535,0.432995,
5280.432425,0.432454,0.433140,0.432574,0.433814,0.433348,0.432886,0.435472,
5290.436517,0.432681,0.436999,0.435182,0.434834,0.435478,0.438255,0.436650,
5300.434464,0.438530,0.434077,0.436471,0.434012,0.436822,0.437505,0.440135,
5310.438322,0.438032,0.439001,0.440270,0.438661,0.439233,0.439274,0.437945,
5320.443080,0.439191,0.438233,0.440415,0.441063,0.440926,0.440929,0.439731,
5330.443584,0.439729,0.441597,0.442615,0.444637,0.443180,0.440789,0.440261,
5340.442202,0.445081,0.445484,0.445415,0.445532,0.442806,0.444188,0.441073,
5350.444299,0.445897,0.445279,0.442830,0.445506,0.445272,0.447267,0.443522,
5360.445519,0.446459,0.446753,0.446377,0.446129,0.446383,0.448556,0.446593,
5370.445293,0.449199,0.447590,0.445968,0.447482,0.448474,0.449890,0.450004,
5380.447765,0.449274,0.450652,0.448210,0.449360,0.449577,0.448575,0.452112,
5390.448780,0.451393,0.450200,0.452018,0.451182,0.452050,0.451748,0.451377,
5400.451402,0.448810,0.452311,0.452909,0.452491,0.452418,0.454190,0.454420,
5410.452121,0.452307,0.456857,0.453506,0.454058,0.457203,0.454394,0.453596,
5420.452240,0.453692,0.456516,0.453753,0.455541,0.452702,0.456481,0.452226,
5430.454280,0.454855,0.456297,0.456482,0.454154,0.455387,0.454748,0.455764,
5440.457282,0.455487,0.454822,0.454257,0.457678,0.454225,0.458689,0.456123,
5450.457011,0.457386,0.458351,0.458638,0.456164,0.455884,0.458525,0.457575,
5460.458340,0.458912,0.457836,0.461734,0.457545,0.460755,0.460960,0.459226,
5470.458613,0.461078,0.460958,0.460337,0.460237,0.461190,0.460760,0.457911,
5480.461310,0.459657,0.461960,0.461040,0.459578,0.461650,0.461550,0.461251,
5490.461054,0.463082,0.461732,0.461324,0.462547,0.461261,0.461629,0.464067,
5500.462430,0.462525,0.464232,0.462921,0.463202,0.465558,0.462914,0.461698,
5510.463963,0.463040,0.464275,0.461940,0.462913,0.465261,0.461500,0.463679,
5520.463354,0.465205,0.464529,0.462220,0.464279,0.463427,0.465387,0.465288,
5530.464839,0.464926,0.466100,0.465531,0.466187,0.464647,0.466285,0.465461,
5540.464134,0.466783,0.466763,0.466183,0.467089,0.464497,0.466080,0.466109,
5550.468166,0.466984,0.465335,0.466721,0.466856,0.465113,0.468377,0.467904,
5560.464546,0.468787,0.465648,0.469841,0.469477,0.466311,0.468700,0.465183,
5570.466559,0.470433,0.468563,0.468109,0.466980,0.467567,0.467670,0.466991,
5580.467992,0.468784,0.469406,0.469652,0.468527,0.470460,0.467308,0.470693,
5590.469539,0.468000,0.469295,0.467038,0.471908,0.468829,0.470663,0.469266,
5600.468975,0.470222,0.468649,0.469507,0.472307,0.471611,0.470419,0.471181,
5610.471140,0.473187,0.471086,0.469801,0.472234,0.472131,0.468996,0.470229,
5620.471597,0.469625,0.472230,0.470164,0.468404,0.472264,0.471336,0.471597,
5630.472280,0.471256,0.473151,0.471863,0.474458,0.471956,0.473099,0.473956,
5640.471725,0.472809,0.473065,0.473180,0.470611,0.473614,0.474263,0.472792,
5650.473543,0.472656,0.469728,0.473431,0.474538,0.475322,0.474962,0.473598,
5660.474114,0.473486,0.472934,0.473252,0.477149,0.471719,0.476383,0.473076,
5670.473952,0.473104,0.472459,0.474433,0.474494,0.473588,0.473839,0.478113,
5680.472435,0.475571,0.475194,0.475626,0.474617,0.474520,0.474472,0.476437,
5690.474512,0.474497,0.474628,0.476203,0.475698,0.473907,0.477144,0.479000,
5700.475553,0.477481,0.473998,0.476672,0.477115,0.477114,0.476282,0.476152,
5710.477009,0.479854,0.474354,0.477645,0.477517,0.477111,0.474843,0.476173,
5720.477321,0.477384,0.477880,0.475726,0.476004,0.478204,0.475586,0.477973,
5730.477935,0.480640,0.478234,0.476349,0.477493,0.476994,0.479815,0.477771,
5740.476333,0.476325,0.478245,0.477284,0.479238,0.478339,0.478966,0.478012,
5750.479304,0.480148,0.476125,0.481267,0.479801,0.476720,0.478898,0.479284,
5760.479153,0.480157,0.478681,0.479712,0.478993,0.479943,0.478349,0.478930,
5770.478052,0.477173,0.479244,0.480454,0.479128,0.480530,0.477843,0.478369,
5780.478561,0.478639,0.479191,0.481763,0.481321,0.480979,0.479702,0.479777,
5790.479384,0.477571,0.481880,0.478615,0.481303,0.478783,0.479384,0.480517,
5800.481928,0.481199,0.479041,0.479188,0.481491,0.482840,0.478766,0.481941,
5810.481298,0.478105,0.482933,0.479744,0.483361,0.482332,0.482556,0.482057,
5820.483616,0.480599,0.482245,0.481091,0.480871,0.481938,0.480678,0.481851,
5830.482902,0.482158,0.480187,0.481772,0.484967,0.483094,0.482133,0.483929,
5840.483354,0.483382,0.483964,0.479941,0.481375,0.480255,0.482184,0.482541,
5850.482032,0.483484,0.479492,0.483305,0.481070,0.483573,0.485689,0.485767,
5860.484221,0.481365,0.482440,0.481507,0.483418,0.480978
587};
588double width_a1=a1width[iii];
589 a[0] = 1;
590 a[1] = 0;
591 b[0] = mass2-sa;
592 b[1] = -mass*width_a1;
593 Com_Divide(a,b,prop);
594}
595
596
597//------------base---------------------------------
598double EvtD0ToKSpipipi0pi0::SCADot(double a1[4], double a2[4])
599{
600 double _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
601 return _cal;
602}
603double EvtD0ToKSpipipi0pi0::Barrier(int l, double sa, double sb, double sc, double r2)
604{
605 double F;
606 double tmp = sa+sb-sc;
607 double q = 0.25*tmp*tmp/sa-sb;
608 if (q < 0) q = -q;
609 double z = q*r2;
610 if (l==1) {
611 F = sqrt(2.0*z/(1.0+z));
612 }
613 else if (l==2) {
614 double z2 = z*z;
615 F = sqrt(13.0*z2/(9.0+3.0*z+z2));
616 } else {
617 F = 1.0;
618 }
619 return F;
620}
621
622double EvtD0ToKSpipipi0pi0::BarrierN(int l, double sa, double sb, double sc, double r, double mass)
623{
624 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
625 if(q < 0) q = -q;
626 double z;
627 //z = q*r*r;
628 z = q*r;
629 double sa0;
630 sa0 = mass*mass;
631 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
632 if(q0 < 0) q0 = -q0;
633 //double z0 = q0*r*r;
634 double z0 = q0*r;
635 double F = 0.0;
636 if(l == 0) F = 1;
637 if(l == 1) F = sqrt((1+z0)/(1+z));
638 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
639 return F;
640}
641
642//double EvtD0ToKSpipipi0pi0::BarrierN(int l, double sa, double sb, double sc, double r2)
643//{
644// double B;
645// double tmp = sa + sb -sc;
646// double Q2 = 0.25*tmp*tmp/sa - sb;
647// if (Q2 < 0) Q2 = 1e-16;
648// double Q02 = 0.197321*0.197321/r2;
649// if (l==1){
650// B = sqrt(2.0*Q2/(Q2 + Q02));
651// }
652// else if(l==2){
653// B = sqrt(13.0*Q2*Q2/(Q2*Q2+3.0*Q2*Q02+9.0*Q02*Q02));
654// }
655// else{
656// B = 1.0;
657// }
658// return B;
659//}
660
661//------------------spin-------------------------------------------
662void EvtD0ToKSpipipi0pi0::calt1(double daug1[4], double daug2[4], double t1[4])
663{
664 double p, pq, tmp;
665 double pa[4], qa[4];
666 for(int i=0; i<4; i++) {
667 pa[i] = daug1[i] + daug2[i];
668 qa[i] = daug1[i] - daug2[i];
669 }
670 p = SCADot(pa,pa);
671 pq = SCADot(pa,qa);
672 tmp = pq/p;
673 for(int i=0; i<4; i++) {
674 t1[i] = qa[i] - tmp*pa[i];
675 }
676}
677void EvtD0ToKSpipipi0pi0::calt2(double daug1[4], double daug2[4], double t2[4][4])
678{
679 double p, r;
680 double pa[4], t1[4];
681 calt1(daug1,daug2,t1);
682 r = SCADot(t1,t1)/3.0;
683 for(int i=0; i<4; i++) {
684 pa[i] = daug1[i] + daug2[i];
685 }
686 p = SCADot(pa,pa);
687 for(int i=0; i<4; i++) {
688 for(int j=0; j<4; j++) {
689 t2[i][j] = t1[i]*t1[j] - r*(G[i][j]-pa[i]*pa[j]/p);
690 }
691 }
692}
693void EvtD0ToKSpipipi0pi0::calG2(double daug1[4], double daug2[4], double g2[4][4])
694{
695// double p, r;
696 double p;
697// double pa[4], t1[4];
698 double pa[4];
699// calt1(daug1,daug2,t1);
700// r = SCADot(t1,t1);
701 for(int i=0; i<4; i++)
702 {
703 pa[i] = daug1[i] + daug2[i];
704 }
705 p = SCADot(pa,pa);
706 for(int i=0; i<4; i++)
707 {
708 for(int j=0; j<4; j++)
709 {
710// t2[i][j] = t1[i]*t1[j] - 1.0/3*r*(G[i][j]-pa[i]*pa[j]/p);
711 g2[i][j] = G[i][j]-pa[i]*pa[j]/p;
712 }
713 }
714}
715//-------------------prop--------------------------------------------
716void EvtD0ToKSpipipi0pi0::propagator(double mass2, double mass, double width, double sx, double prop[2])
717{
718 double a[2], b[2];
719 a[0] = 1;
720 a[1] = 0;
721 b[0] = mass2-sx;
722 b[1] = -mass*width;
723 Com_Divide(a,b,prop);
724}
725double EvtD0ToKSpipipi0pi0::wid(double mass2, double mass, double sa, double sb, double sc, double r2, int l)
726{
727 double widm = 0.;
728 double m = sqrt(sa);
729 double tmp = sb-sc;
730 double tmp1 = sa+tmp;
731 double q = 0.25*tmp1*tmp1/sa-sb;
732 if(q<0) q = -q;
733 double tmp2 = mass2+tmp;
734 double q0 = 0.25*tmp2*tmp2/mass2-sb;
735 if(q0<0) q0 = -q0;
736 double z = q*r2;
737 double z0 = q0*r2;
738 double t = q/q0;
739 if(l == 0) {widm = sqrt(t)*mass/m;}
740 else if(l == 1) {widm = t*sqrt(t)*mass/m*(1+z0)/(1+z);}
741 else if(l == 2) {widm = t*t*sqrt(t)*mass/m*(9+3*z0+z0*z0)/(9+3*z+z*z);}
742 return widm;
743}
744double EvtD0ToKSpipipi0pi0::widl1(double mass2, double mass, double sa, double sb, double sc, double r2)
745{
746 double widm = 0.;
747 double m = sqrt(sa);
748 double tmp = sb-sc;
749 double tmp1 = sa+tmp;
750 double q = 0.25*tmp1*tmp1/sa-sb;
751 if(q<0) q = -q;
752 double tmp2 = mass2+tmp;
753 double q0 = 0.25*tmp2*tmp2/mass2-sb;
754 if(q0<0) q0 = -q0;
755 double z = q*r2;
756 double z0 = q0*r2;
757 double F = (1+z0)/(1+z);
758 double t = q/q0;
759 widm = t*sqrt(t)*mass/m*F;
760 return widm;
761}
762void EvtD0ToKSpipipi0pi0::propagatorRBW(double mass2, double mass, double width, double sa, double sb, double sc, double r2, int l, double prop[2])
763{
764 double a[2], b[2];
765 a[0] = 1;
766 a[1] = 0;
767 b[0] = mass2-sa;
768 b[1] = -mass*width*wid(mass2,mass,sa,sb,sc,r2,l);
769 Com_Divide(a,b,prop);
770}
771void EvtD0ToKSpipipi0pi0::propagatorRBWl1(double mass2, double mass, double width, double sa, double sb, double sc, double r2, double prop[2])
772{
773 double a[2], b[2];
774 a[0] = 1;
775 a[1] = 0;
776 b[0] = mass2-sa;
777 b[1] = -mass*width*widl1(mass2,mass,sa,sb,sc,r2);
778 Com_Divide(a,b,prop);
779}
780//------------GS---used by rho----------------------------
781void EvtD0ToKSpipipi0pi0::propagatorGS(double mass2, double mass, double width, double sa, double sb, double sc, double r2, double prop[2])
782{
783 double a[2], b[2];
784 double tmp = sb-sc;
785 double tmp1 = sa+tmp;
786 double q2 = 0.25*tmp1*tmp1/sa-sb;
787 if(q2<0) q2 = -q2;
788
789 double tmp2 = mass2+tmp;
790 double q02 = 0.25*tmp2*tmp2/mass2-sb;
791 if(q02<0) q02 = -q02;
792
793 double q = sqrt(q2);
794 double q0 = sqrt(q02);
795 double m = sqrt(sa);
796 double q03 = q0*q02;
797 double tmp3 = log(mass+2*q0)+1.2760418309; // log(mass_2Pion) = 1.2760418309;
798
799 double h = GS1*q/m*(log(m+2*q)+1.2760418309);
800 double h0 = GS1*q0/mass*tmp3;
801 double dh = h0*(0.125/q02-0.5/mass2)+GS3/mass2;
802 double d = GS2/q02*tmp3+GS3*mass/q0-GS4*mass/q03;
803 double f = mass2/q03*(q2*(h-h0)+(mass2-sa)*q02*dh);
804
805 a[0] = 1.0+d*width/mass;
806 a[1] = 0.0;
807 b[0] = mass2-sa+width*f;
808 b[1] = -mass*width*widl1(mass2,mass,sa,sb,sc,r2);
809 Com_Divide(a,b,prop);
810}
811void EvtD0ToKSpipipi0pi0::propagatorGS_Omg(double mass2, double mass, double width, double sa, double sb, double sc, double r2, double amp_Omg, double phs_Omg, double prop[2])
812{
813 const double Omg_mass = 0.783;
814 const double Omg_width = 0.008;
815 const double Omg_mass2 = 0.613089;
816
817 double tmp_propGS[2];
818 propagatorGS(mass2, mass, width, sa, sb, sc, r2, tmp_propGS);
819 double tmp_propOmg[2];
820 propagatorRBWl1(Omg_mass2, Omg_mass, Omg_width, sa, sb, sc, r2, tmp_propOmg); // Using constant Gamma
821
822 double tmp_propOmg02[2];
823 tmp_propOmg02[0] = Omg_mass2*tmp_propOmg[0];
824 tmp_propOmg02[1] = Omg_mass2*tmp_propOmg[1];
825
826 double tmp_cof[2];
827 tmp_cof[0] = amp_Omg*cos(phs_Omg);
828 tmp_cof[1] = amp_Omg*sin(phs_Omg);
829
830 double amp_M_RBWOm[2];
831 amp_M_RBWOm[0] = tmp_cof[0]*tmp_propOmg02[0]-tmp_cof[1]*tmp_propOmg02[1];
832 amp_M_RBWOm[1] = tmp_cof[1]*tmp_propOmg02[0]+tmp_cof[0]*tmp_propOmg02[1];
833
834 double GS_amp_RBWOm[2];
835 Com_Multi(tmp_propGS, amp_M_RBWOm, GS_amp_RBWOm);
836
837 prop[0] = tmp_propGS[0] + GS_amp_RBWOm[0];
838 prop[1] = tmp_propGS[1] + GS_amp_RBWOm[1];
839
840}
841void EvtD0ToKSpipipi0pi0::rhoab(double sa, double sb, double sc, double res[2]) {
842 double tmp = sa+sb-sc;
843 double q = 0.25*tmp*tmp/sa-sb;
844 if(q>=0) {
845 res[0]=2.0*sqrt(q/sa);
846 res[1]=0.0;
847 } else {
848 res[0]=0.0;
849 res[1]=2.0*sqrt(-q/sa);
850 }
851}
852void EvtD0ToKSpipipi0pi0::rho4Pi(double sa, double res[2]) {
853 double temp = 1.0-0.3116765584/sa; // 0.3116765584=0.13957*0.13957*16
854 if(temp>=0) {
855 res[0]=sqrt(temp)/(1.0+exp(9.8-3.5*sa));
856 res[1]=0.0;
857 } else {
858 res[0]=0.0;
859 res[1]=sqrt(-temp)/(1.0+exp(9.8-3.5*sa));
860 }
861}
862void EvtD0ToKSpipipi0pi0::propagatorsigma500(double sa, double sb, double sc, double prop[2]) {
863 double f = 0.5843+1.6663*sa;
864 const double M = 0.9264;
865 const double mass2 = 0.85821696; // M*M
866 const double mpi2d2 = 0.00973989245;
867 double g1 = f*(sa-mpi2d2)/(mass2-mpi2d2)*exp((mass2-sa)/1.082);
868 double rho1s[2], rho1M[2], rho2s[2], rho2M[2], rho1[2], rho2[2];
869 rhoab(sa,sb,sc,rho1s);
870 rhoab(mass2,sb,sc,rho1M);
871 rho4Pi(sa,rho2s);
872 rho4Pi(mass2,rho2M);
873 Com_Divide(rho1s,rho1M,rho1);
874 Com_Divide(rho2s,rho2M,rho2);
875 double a[2], b[2];
876 a[0] = 1.0;
877 a[1] = 0.0;
878 b[0] = mass2-sa+M*(g1*rho1[1]+0.0024*rho2[1]);
879 b[1] = -M*(g1*rho1[0]+0.0024*rho2[0]);
880 Com_Divide(a,b,prop);
881}
882void EvtD0ToKSpipipi0pi0::KPiSLASS(double sa, double sb, double sc, double prop[2]) {
883/*
884 const double m1430 = 1.463;
885 const double sa0 = 2.140369; // m1430*m1430;
886 const double w1430 = 0.233;
887 const double Lass1 = 0.25/sa0;
888 double tmp = sb-sc;
889 double tmp1 = sa0+tmp;
890 double q0 = Lass1*tmp1*tmp1-sb;
891 if(q0<0) q0 = 1e-16;
892 double tmp2 = sa+tmp;
893 double qs = 0.25*tmp2*tmp2/sa-sb;
894 double q = sqrt(qs);
895 double width = w1430*q*m1430/sqrt(sa*q0);
896 double temp_R = atan(m1430*width/(sa0-sa));
897 if(temp_R<0) temp_R += math_pi;
898 double deltaR = -5.31 + temp_R;
899 double temp_F = atan(2.14*q/(2.0-1.926*qs)); // 2.0*1.07 = 2.14; 1.8*1.07 = 1.926
900 if(temp_F<0) temp_F += math_pi;
901 double deltaF = 2.33 + temp_F;
902 double deltaS = deltaR + 2.0*deltaF;
903 double t1 = 0.8*sin(deltaF);
904 double t2 = sin(deltaR);
905 double CF[2], CS[2];
906 CF[0] = cos(deltaF);
907 CF[1] = sin(deltaF);
908 CS[0] = cos(deltaS);
909 CS[1] = sin(deltaS);
910 prop[0] = t1*CF[0] + t2*CS[0];
911 prop[1] = t1*CF[1] + t2*CS[1];
912*/
913 const double m1430 = 1.441;
914 const double sa0 = 1.441*1.441; // m1430*m1430;
915 const double w1430 = 0.193;
916 const double Lass1 = 0.25/sa0;
917 double tmp = sb-sc;
918 double tmp1 = sa0+tmp;
919 double q0 = Lass1*tmp1*tmp1-sb;
920 if(q0<0) q0 = -q0;
921 double tmp2 = sa+tmp;
922 double qs = 0.25*tmp2*tmp2/sa-sb;
923 double q = sqrt(qs);
924 double width = w1430*q*m1430/sqrt(sa*q0);
925 double temp_R = atan(m1430*width/(sa0-sa));
926 if(temp_R<0) temp_R += math_pi;
927 double deltaR = -1.915 + temp_R; //fiR=-109.7
928 double temp_F = atan(0.226*q/(2.0-3.819*qs)); // 2.0*0.113 = 0.226; 0.113*33.8 = 3.819
929 if(temp_F<0) temp_F += math_pi;
930 double deltaF = 0.002 + temp_F; //fiF=0.1
931 double deltaS = deltaR + 2.0*deltaF;
932 double t1 = 0.96*sin(deltaF);
933 double t2 = sin(deltaR);
934 double CF[2], CS[2];
935 CF[0] = cos(deltaF);
936 CF[1] = sin(deltaF);
937 CS[0] = cos(deltaS);
938 CS[1] = sin(deltaS);
939 prop[0] = t1*CF[0] + t2*CS[0];
940 prop[1] = t1*CF[1] + t2*CS[1];
941
942}
943
944//0-15: 4P*4;
945//16-23: non-resonance;
946//24: pdf after calculating;
947//28: mass and width;
948//29-30: amp, phase;
949//31-34: g0: do/not cal prop about KaPi1; g1: do/not cal prop about Pi2Pim; modetype:
950//35-38: r0/1: centrifugal barrier; nstates: number of state;
951//39-40: use [first:last] amplitudes.
952
953void EvtD0ToKSpipipi0pi0::calEva( double* PKs,double* Pip,double* Pim,double* Pi01,double* Pi02,double* mass1, double* mass2, double* width1, double* width2, double* amp, double* phase, double* r0, double* r1, int* g0, int* g1, int* g2, int* modetype,double nstates,double &Result)
954{
955
956
957 double cof[2], amp_tmp[2],amp_tmp1[2], amp_tmp2[2], amp_PDF[2], PDF[2];
958
959
960
961 double pomega1[4], pomega2[4], pkst1[4], pkst2[4],pD0[4],prho0[4],prhom1[4],prhom2[4],prhop1[4],prhop2[4],pb101[4],pb102[4],pa101[4],pa102[4],pf01[4],Pf02[4],pk1400[4],pf1285[4],prho01[4],prho02[4],pkstm[4],pkpi01SW[4],pkpi02SW[4],p1omega1[4],p1omega2[4],prho1450[4],pa1p[4],pkstm1[4],pkstm2[4],pk127p1[4],pk127p2[4],prhom11[4],prhom12[4],prhom111[4],prhom112[4],pk11[4],pk12[4],pa1p1[4],pa1p2[4],pb1omega1[4],pb1omega2[4],pb1rho01[4],pb1rho02[4],pb1rhom1[4],pb1rhom2[4],pb1rhop1[4],pb1rhop2[4],pa101_rhop[4],pa102_rhop[4],pa1rhop1[4],pa1rhop2[4],pkst1_20[4],pkst2_20[4],pa101_rhom[4],pa102_rhom[4],pa1rhom1[4],pa1rhom2[4],pkst1_33[4],pkst2_33[4],pk127rhop1[4],pk127rhop2[4],pk140kstm1[4],pk140kstm2[4],pk140rhop1[4],pk140rhop2[4],pf1285rho0[4],pa1prhop1[4],pa1prhop2[4],pb1rho0[4],pphi1[4], pphi2[4],pkst1_2[4],pkst2_2[4],pk127mrhom1[4],pk127mrhom2[4],pk127mrhop1[4],pk127mrhop2[4],pk127m1[4],pk127m2[4],pk1270[4],pk1270rho0[4],pk01[4],pk140mrhop1[4],pk140mrhop2[4],pk140mkstm1[4],pk140mkstm2[4],pk140m1[4],pk140m2[4],pk1400rho01[4],pk1400rho02[4],pk1400kst01[4],pk1400kst02[4],pk14001[4],pk14002[4];
962
963 for(int i=0;i!=4;i++) {
964 pomega1[i] = Pi01[i] + Pip[i] + Pim[i]; //1
965 pkst2[i] = PKs[i] + Pi02[i];
966 pomega2[i] =Pip[i] + Pim[i] + Pi02[i];
967 pkst1_2[i] = PKs[i] + Pi01[i];
968 pphi1[i] = Pi01[i] + Pip[i] + Pim[i]; //1
969 pkst2_2[i] = PKs[i] + Pi02[i];
970 pphi2[i] =Pip[i] + Pim[i] + Pi02[i];
971 pkst1[i] = PKs[i] + Pi01[i];
972 pD0[i] = PKs[i] + Pi01[i] + Pip[i] + Pim[i] + Pi02[i];
973 prho0[i] = Pip[i] + Pim[i];
974 prho01[i] = Pip[i] + Pim[i];
975 prho02[i] = Pip[i] + Pim[i];
976 prhom1[i] = Pi01[i] + Pim[i];
977 prhom2[i] = Pim[i] + Pi02[i];
978 prhop1[i] = Pi01[i] + Pip[i];
979 prhop2[i] = Pip[i] + Pi02[i];
980 pb101[i] = Pi01[i] + Pip[i] + Pim[i] + Pi02[i];//4
981 pb102[i] = Pi01[i] + Pip[i] + Pim[i] + Pi02[i];
982 pb1omega1[i] = Pi01[i] + Pip[i] + Pim[i];
983 pb1omega2[i] = Pip[i] + Pim[i] + Pi02[i];
984 pb1rho01[i] = Pip[i] + Pim[i];
985 pb1rho02[i] = Pip[i] + Pim[i];
986 pb1rhom1[i] = Pi01[i] + Pim[i];
987 pb1rhom2[i] = Pim[i] + Pi02[i];
988 pb1rhop1[i] = Pi01[i] + Pip[i];
989 pb1rhop2[i] = Pip[i] + Pi02[i];
990 pa1p[i] = Pi01[i] + Pip[i] + Pi02[i];//18
991 pa1p1[i] = Pi01[i] + Pip[i] + Pi02[i];
992 pa1p2[i] = Pi01[i] + Pip[i] + Pi02[i];
993 pa1prhop1[i] = Pi01[i] + Pip[i];
994 pa1prhop2[i] = Pip[i] + Pi02[i];
995 pkstm1[i] = PKs[i] + Pim[i];
996 pkstm2[i] = PKs[i] + Pim[i];
997 pkstm[i] = PKs[i] + Pim[i];
998 pa101_rhop[i] = Pi01[i] + Pip[i] + Pim[i];//20
999 pa102_rhop[i] = Pip[i] + Pim[i] + Pi02[i];
1000 pa1rhop1[i] = Pi01[i] + Pip[i];
1001 pa1rhop2[i] = Pip[i] + Pi02[i];
1002 pkst1_20[i] = PKs[i] + Pi01[i];
1003 pkst2_20[i] = PKs[i] + Pi02[i];
1004 pa101_rhom[i] = Pi01[i] + Pip[i] + Pim[i];//33
1005 pa102_rhom[i] = Pip[i] + Pim[i] + Pi02[i];
1006 pa1rhom1[i] = Pi01[i] + Pim[i];;
1007 pa1rhom2[i] = Pim[i] + Pi02[i];
1008 pkst1_33[i] = PKs[i] + Pi01[i];
1009 pkst2_33[i] = PKs[i] + Pi02[i];
1010
1011 pf1285[i] = Pi01[i] + Pip[i] + Pim[i] + Pi02[i];//23
1012 pf01[i]=Pi01[i]+Pi02[i];
1013 pf1285rho0[i] = Pip[i] + Pim[i];
1014
1015 pk127mrhom1[i] = Pi01[i] + Pim[i];//45
1016 pk127mrhom2[i] = Pim[i] + Pi02[i];
1017 pk127mrhop1[i] = Pi01[i] + Pip[i];
1018 pk127mrhop2[i] = Pip[i] + Pi02[i];
1019 pk127m1[i] = PKs[i] + Pi01[i] + Pim[i];
1020 pk127m2[i] = PKs[i] + Pim[i] + Pi02[i];
1021
1022 pk1270[i] = PKs[i] + Pip[i] + Pim[i];//46
1023 pk1270rho0[i] = Pip[i] + Pim[i];
1024 pk01[i] = Pi01[i] + Pi02[i];
1025
1026 pk140mrhop1[i] = Pi01[i] + Pip[i]; //31
1027 pk140mrhop2[i] = Pip[i] + Pi02[i];
1028 pk140mkstm1[i] = PKs[i] + Pim[i];
1029 pk140mkstm2[i] = PKs[i] + Pim[i];
1030 pk140m1[i] = PKs[i] + Pi01[i] + Pim[i];
1031 pk140m2[i] = PKs[i] + Pim[i] + Pi02[i];
1032
1033 pk1400rho01[i] = Pip[i] + Pim[i];//42
1034 pk1400rho02[i] = Pip[i] + Pim[i];
1035 pk1400kst01[i] = PKs[i] + Pi01[i];
1036 pk1400kst02[i] = PKs[i] + Pi02[i];
1037 pk14001[i] = PKs[i] + Pi01[i] + Pi02[i];
1038 pk14002[i] = PKs[i] + Pi01[i] + Pi02[i];
1039
1040 prho1450[i] = Pi01[i] + Pip[i] + Pim[i] + Pi02[i];///39
1041
1042
1043 }
1044
1045 double sKs,sPi01,skstm,sPim,sPip,sPi02,somega1,sk1270,somega2,skst1,skst2,sD0,srho0,srhop1,srhop2,srhom1,srhom2,sb101,sb102,skstm1,skstm2,sa1p,sa101,sa102,sf01,sf02,sk14001,sk14002,sk1400,sf1285,srho01,srho02,s1omega1,s1omega2,skpi01SW,skpi02SW,srho1450,sk127p1,sk127p2,sk127m1,sk127m2,srhom11,srhom12,srhom111,srhom112,sk11,sk12,sa1p1,sa1p2,sb1omega1,sb1omega2,sb1rho01,sb1rho02,sb1rhop1,sb1rhop2,sb1rhom1,sb1rhom2,sb1rho0,sa101_rhop,sa102_rhop,sa1rhop1,sa1rhop2,skst1_20,skst2_20,sa101_rhom,sa102_rhom,sa1rhom1,sa1rhom2,skst1_33,skst2_33,sk127mrhop1,sk127mrhop2,sk140m1,sk140m2,sk140mkstm1,sk140mkstm2,sk140mrhop1,sk140mrhop2,sf1285rho0,sa1prhop1,sa1prhop2,sphi1,sphi2,skst1_2,skst2_2,sk127mrhom1,sk127mrhom2,sk1270rho0,sk01,sk1400rho01,sk1400rho02,sk1400kst01,sk1400kst02;
1046
1047 sKs = SCADot(PKs,PKs);
1048 sPi01 = SCADot(Pi01,Pi01);
1049 sPip = SCADot(Pip,Pip);
1050 sPim = SCADot(Pim,Pim);
1051 sPi02 = SCADot(Pi02,Pi02);
1052 somega1 = SCADot(pomega1,pomega1);
1053 somega2 = SCADot(pomega2,pomega2);
1054 sphi1 = SCADot(pphi1,pphi1);
1055 sphi2 = SCADot(pphi2,pphi2);
1056 skst1 = SCADot(pkst1,pkst1);
1057 skst2 = SCADot(pkst2,pkst2);
1058 skst1_2 = SCADot(pkst1_2,pkst1_2);
1059 skst2_2 = SCADot(pkst2_2,pkst2_2);
1060 sD0 = SCADot(pD0,pD0);
1061 srhop1 =SCADot(prhop1,prhop1);
1062 srhop2 =SCADot(prhop2,prhop2);
1063 srhom1 =SCADot(prhom1,prhom1);
1064 srhom2 =SCADot(prhom2,prhom2);
1065 srho0 =SCADot(prho0,prho0);
1066 srho01 =SCADot(prho01,prho01);
1067 srho02 =SCADot(prho02,prho02);
1068 sb101 =SCADot(pb101,pb101); //4
1069 sb102 =SCADot(pb102,pb102);
1070 sb1omega1 = SCADot(pb1omega1,pb1omega1);
1071 sb1omega2 = SCADot(pb1omega2,pb1omega2);
1072 sb1rho01 = SCADot(pb1rho01,pb1rho01);
1073 sb1rho02 = SCADot(pb1rho02,pb1rho02);
1074 sb1rhop1 = SCADot(pb1rhop1,pb1rhop1);
1075 sb1rhop2 = SCADot(pb1rhop2,pb1rhop2);
1076 sb1rhom1 = SCADot(pb1rhom1,pb1rhom1);
1077 sb1rhom2 = SCADot(pb1rhom2,pb1rhom2);
1078 sb1rho0 = SCADot(pb1rho0,pb1rho0);
1079 sa1p = SCADot(pa1p,pa1p); //18
1080 sa1p1 = SCADot(pa1p1,pa1p1);
1081 sa1p2 = SCADot(pa1p2,pa1p2);
1082 skstm1 = SCADot(pkstm1,pkstm1);
1083 skstm2 = SCADot(pkstm2,pkstm2);
1084 skstm = SCADot(pkstm,pkstm);
1085 sa1prhop1 = SCADot(pa1prhop1,pa1prhop1);
1086 sa1prhop2 = SCADot(pa1prhop2,pa1prhop2);
1087 sa101_rhop = SCADot(pa101_rhop,pa101_rhop); //20
1088 sa102_rhop = SCADot(pa102_rhop,pa102_rhop);
1089 sa1rhop1 = SCADot(pa1rhop1,pa1rhop1);
1090 sa1rhop2 = SCADot(pa1rhop2,pa1rhop2);
1091 skst1_20 = SCADot(pkst1_20,pkst1_20);
1092 skst2_20 = SCADot(pkst2_20,pkst2_20);
1093 sa101_rhom = SCADot(pa101_rhom,pa101_rhom); //33
1094 sa102_rhom = SCADot(pa102_rhom,pa102_rhom);
1095 sa1rhom1 = SCADot(pa1rhom1,pa1rhom1);
1096 sa1rhom2 = SCADot(pa1rhom2,pa1rhom2);
1097 skst1_33 = SCADot(pkst1_33,pkst1_33);
1098 skst2_33 = SCADot(pkst2_33,pkst2_33);
1099
1100 sf1285=SCADot(pf1285,pf1285); //23
1101 sf01 = SCADot(pf01,pf01);
1102 sf1285rho0 = SCADot(pf1285rho0,pf1285rho0);
1103
1104 sk127mrhom1 = SCADot(pk127mrhom1,pk127mrhom1); //45
1105 sk127mrhom2 = SCADot(pk127mrhom2,pk127mrhom2);
1106 sk127mrhop1 = SCADot(pk127mrhop1,pk127mrhop1);
1107 sk127mrhop2 = SCADot(pk127mrhop2,pk127mrhop2);
1108 sk127m1 = SCADot(pk127m1,pk127m1);
1109 sk127m2 = SCADot(pk127m2,pk127m2);
1110
1111 sk1270 = SCADot(pk1270,pk1270); //46
1112 sk1270rho0 = SCADot(pk1270rho0,pk1270rho0);
1113 sk01 = SCADot(pk01,pk01);
1114
1115 sk140mrhop1 = SCADot(pk140mrhop1,pk140mrhop1); //31
1116 sk140mrhop2 = SCADot(pk140mrhop2,pk140mrhop2);
1117 sk140mkstm1 = SCADot(pk140mkstm1,pk140mkstm1);
1118 sk140mkstm2 = SCADot(pk140mkstm2,pk140mkstm2);
1119 sk140m1 = SCADot(pk140m1,pk140m1);
1120 sk140m2 = SCADot(pk140m2,pk140m2);
1121
1122 sk1400rho01 = SCADot(pk1400rho01,pk1400rho01); //42
1123 sk1400rho02 = SCADot(pk1400rho02,pk1400rho02);
1124 sk1400kst01 = SCADot(pk1400kst01,pk1400kst01);
1125 sk1400kst02 = SCADot(pk1400kst02,pk1400kst02);
1126 sk14001 = SCADot(pk14001,pk14001);
1127 sk14002 = SCADot(pk14002,pk14002);
1128
1129 srho1450=SCADot(prho1450,prho1450);//////39
1130
1131
1132
1133
1134
1135
1136
1137
1138////////////////////////////////////////////////////////////////
1139 double t1rho01[4],t1rho02[4],t1rhop1[4],t1rhop2[4],t1rhom1[4],t1rhom2[4],t1omega01[4],t1omega02[4],t1omegap1[4],t1omegap2[4],t1omegam1[4],t1omegam2[4],t1kst1[4],t1kst2[4],t1D0_b1[4],t1D0_b2[4],t1D0_k14001[4],t1D0_k14002[4],t1D0[4],t1D0KPi01SW[4],t1D0KPi02SW[4],t1rho0[4],t1D0_rho1450ks0[4],t1rho14501[4],t1rho14502[4],t1D0_f1285[4],t1f1285[4],t1rhom11[4],t1rhom12[4],t1rhom111[4],t1rhom112[4],t1D0_k1[4],t1D0_k11[4],t1D0_k12[4],t1k1400rho01[4],t1k1400rho02[4],t1D0_k1400rho01[4],t1D0_k1400rho02[4],t1k1270rho0[4];
1140 double t1phi01[4],t1phi02[4],t1phip1[4],t1phip2[4],t1phim1[4],t1phim2[4];
1141 double p1omega01[4][4],p1omega02[4][4],p1omegap1[4][4],p1omegap2[4][4],p1omegam1[4][4],p1omegam2[4][4],p2k1400[4][4];
1142 double p1phi01[4][4],p1phi02[4][4],p1phip1[4][4],p1phip2[4][4],p1phim1[4][4],p1phim2[4][4],t1D0_k101[4],p2_k101[4][4],t1D0_k102[4],p2_k102[4][4];
1143 double p1b1_1[4][4],p1b1_2[4][4],pk1400_1[4][4],pk1400_2[4][4],p2a1270[4][4],p1rho14501[4][4],p1rho14502[4][4],p1a1m_1[4][4],p1a1m_2[4][4],t2_a102[4][4],p2f1285[4][4],p2_k11[4][4],p2_k12[4][4],pm_k11[4][4],pm_k12[4][4],p1k1m_1[4][4],p1k1m_2[4][4],t2D0_k11[4][4],t2D0_k12[4][4],t2f1285[4][4],p2k1270[4][4],t1D0_k1270[4],t1kst01[4],t1kst02[4],t1rhop11[4],t1rhop12[4],t1k140mrhop1[4],t1k140mrhop2[4],t1k140mkstm1[4],t1k140mkstm2[4];
1144 double t1b1rho01[4],t1b1rho02[4],t1b1rhop1[4],t1b1rhop2[4],t1b1rhom1[4],t1b1rhom2[4],t1b1omega01[4],t1b1omegap1[4],t1b1omegap2[4],t1b1omegam1[4],t1b1omegam2[4],p1b1omega01[4][4],p1b1omega02[4][4],p1b1omegap1[4][4],p1b1omegap2[4][4],p1b1omegam1[4][4],p1b1omegam2[4][4],t1a1prhop1[4],t1a1prhop2[4],t1a10rhop1[4],t1a10rhop2[4],t1a10kst1[4],t1a10kst2[4],t1a10rhom1[4],t1a10rhom2[4],t1k1400kst01[4],t1k1400kst02[4],t1b1omega02[4],t1f1rho0[4];
1145
1146 //Sn---L(i)
1147// calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);calt1(Pip,Pim,t1rho0);
1148// calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1149// calt1(Pi01,Pim,t1rhom1);calt1(Pi02,Pim,t1rhom2);
1150// calt1(prho0,Pi01,t1omega01);calt1(prho0,Pi02,t1omega02);
1151// calt1(prhop1,Pim,t1omegap1);calt1(prhop2,Pim,t1omegap2);
1152// calt1(prhom1,Pip,t1omegam1);calt1(prhom2,Pip,t1omegam2);
1153// calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
1154// calt1(p1omega1,pkpi02SW,t1D0KPi02SW);
1155// calt1(p1omega2,pkpi01SW,t1D0KPi01SW);
1156// calt1(pb10,PKs,t1D0_b1);
1157// calt1(pk14001,Pi02,t1D0_k14001);
1158// calt1(pk14002,Pi01,t1D0_k14002);
1159//
1160// //Sn---P(ij)
1161// calG2(prho0,Pi01,p1omega01);calG2(prho0,Pi02,p1omega02);calG2(prhop1,Pim,p1omegap1);
1162// calG2(prhop2,Pim,p1omegap2);calG2(prhom1,Pip,p1omegam1);calG2(prhom2,Pip,p1omegam2);
1163//
1164// calG2(pomega1,Pi02,p1b1_1); calG2(pomega2,Pi01,p1b1_2);
1165// calG2(pomega1,PKs,pk1400_1); calG2(pomega2,PKs,pk1400_2);
1166 // calG2(pkst1,Pi02,p2k1400_1); calG2(pkst2,Pi01,p2k1400_2);
1167
1168 PDF[0] = 0.0; PDF[1] = 0.0;
1169
1170 ////
1171 double t1D0_omega1kst2[4],t1D0_omega2kst1[4];
1172 double t1D0_phi1kst2[4],t1D0_phi2kst1[4];
1173// calt1(pomega1,pkst2,t1D0_omega1kst2); calt1(pomega2,pkst1,t1D0_omega2kst1);
1174
1175 //Sn(l=2)
1176 double t2D0_omega1kst2[4][4],t2D0_omega2kst1[4][4],t2b1_1[4][4],t2b1_2[4][4],t2k1400_1[4][4],t2k1400_2[4][4],t2k1270[4][4];
1177 double t2D0_phi1kst2[4][4],t2D0_phi2kst1[4][4];
1178// calt2(pomega1,pkst2,t2D0_omega1kst2); calt2(pomega2,pkst1,t2D0_omega2kst1);
1179// calt2(pomega1,Pi02,t2b1_1); calt2(pomega2,Pi01,t2b1_2);
1180// calt2(pomega1,PKs,t2k1400_1); calt2(pomega2,PKs,t2k1400_2);
1181
1182 // rho from omega
1183 double pro1V0[2],pro1Vm2[2],pro1Vp1[2],pro1Vp2[2],pro1Vm1[2],pro1V01[2],pro1V02[2],pro11Vp1[2],pro11Vp2[2],pro11Vm1[2],pro11Vm2[2],pro111Vm1[2],pro111Vm2[2],pf0_2[2],pro4V01[2],pro4V02[2],pro4Vp1[2],pro4Vp2[2],pro4Vm1[2],pro4Vm2[2];
1184
1185 propagatorGS(0.60102807,0.77526,0.1478,srho0,sPip,sPim,rRes2,pro1V0);
1186 propagatorGS(0.60102807,0.77526,0.1478,srho01,sPip,sPim,rRes2,pro1V01);
1187 propagatorGS(0.60102807,0.77526,0.1478,srho02,sPip,sPim,rRes2,pro1V02);
1188 propagatorGS(0.60102807,0.77526,0.1478,srhop1,sPip,sPi01,rRes2,pro1Vp1);
1189 propagatorGS(0.60102807,0.77526,0.1478,srhop2,sPip,sPi02,rRes2,pro1Vp2);
1190 propagatorGS(0.60102807,0.77526,0.1478,srhom1,sPi01,sPim,rRes2,pro1Vm1);
1191 propagatorGS(0.60102807,0.77526,0.1478,srhom2,sPi02,sPim,rRes2,pro1Vm2);
1192
1193 double B1_V01(-1),B1_V02(-1),B1_Vp1(-1),B1_Vp2(-1),B1_Vm1(-1),B1_Vm2(-1),B1_V0(-1),B1_Vm111(-1),B1_Vm112(-1),B1_Vm11(-1),B1_Vm12(-1);
1194 // rho from omega Blatt-We
1195 B1_V01=BarrierN(1,srho01,sPip,sPim,rRes2,0.77526);
1196 B1_V02=BarrierN(1,srho02,sPip,sPim,rRes2,0.77526);
1197 B1_V0=BarrierN(1,srho0,sPip,sPim,rRes2,0.77526);
1198 B1_Vp1=BarrierN(1,srhop1,sPip,sPi01,rRes2,0.77526);
1199 B1_Vp2=BarrierN(1,srhop2,sPip,sPi02,rRes2,0.77526);
1200 B1_Vm1=BarrierN(1,srhom1,sPi01,sPim,rRes2,0.77526);
1201 B1_Vm2=BarrierN(1,srhom2,sPi02,sPim,rRes2,0.77526);
1202
1203
1204 double B1_omega10(-1),B1_omega1p(-1),B1_omega1m(-1),B1_omega20(-1),B1_omega2p(-1),B1_omega2m(-1),B1_D0_k1400(-1),B1_D0_k14001(-1),B1_D0_k14002(-1),B2_k1400_1(-1),B2_k1400(-1),B2_k1400_2(-1),B1_D0_k1270(-1),B2_k1270(-1),B1_D0_f1(-1),B1_D0_a1pkpim1(-1),B1_D0_a1pkpim2(-1),B1_f1285(-1),B1_D0_k1(-1),B2_k1(-1);
1205 double B1_phi10(-1),B1_phi1p(-1),B1_phi1m(-1),B1_phi20(-1),B1_phi2p(-1),B1_phi2m(-1);
1206 double B1_D0_omega1(-1),B1_D0_omega2(-1),B1_kst1(-1),B1_kst2(-1),B1_D0_b1(-1),B1_D0_b2(-1),B1_a11p(-1),B1_a11m(-1),B2_a12p(-1),B2_a12m(-1),B1_kstm1(-1),B1_kstm2(-1),B1_D0_rho1450(-1),B1_kst1_2(-1),B1_kst2_2(-1);
1207 double B1_D0_phi1(-1),B1_D0_phi2(-1);
1208 double B1_rho10(-1),B1_rho1p(-1),B1_rho1m(-1),B1_rho20(-1),B1_rho2p(-1),B1_rho2m(-1),B1_b1_rho(-1),B1_b1_rho10(-1),B1_b1_rho1p(-1),B1_b1_rho1m(-1),B1_b1_rho20(-1),B1_b1_rho2p(-1),B1_b1_rho2m(-1);
1209 double B1_a1prhop1(-1),B1_a1prhop2(-1),B1_a10rhop1(-1),B1_a10rhop2(-1);
1210 double B1_a10rhom1(-1),B1_a10rhom2(-1);
1211
1212 double B2_D0_omega1(-1),B2_D0_omega2(-1),B2_b1_1(-1),B2_b1_2(-1),B2_D0_k1(-1),B2_D0_k11(-1),B2_D0_k12(-1);
1213 double B2_D0_phi1(-1),B2_D0_phi2(-1);
1214 double B1_f1285_rho0(-1),B1_k127_rhop(-1),B1_k127_rhop1(-1),B1_k127_rhop2(-1),B1_k140_kstm(-1),B1_k140_kstm1(-1),B1_k140_kstm2(-1),B1_k140_rhop(-1),B1_k140_rhop1(-1),B1_k140_rhop2(-1),B1_k127_rhom(-1),B1_k127_rhom1(-1),B1_k127_rhom2(-1),B1_D0_k101(-1),B1_D0_k102(-1);
1215
1216
1217 double temp_PDF11, temp_PDF12, temp_PDF13, temp_PDF21, temp_PDF22, temp_PDF23;
1218 double pro0_01[2],pro0_p1[2],pro0_m1[2],pro0_02[2],pro0_p2[2],pro0_m2[2];
1219 double pro2_01[2],pro2_p1[2],pro2_m1[2],pro2_02[2],pro2_p2[2],pro2_m2[2];
1220
1221 double proa_p1[2],proa_p2[2];
1222 double pro1_1[2],pro1_2[2],pro1_3[2],pro1_4[2],pf0_1[2],pro00_01[2],pro00_02[2];
1223 double pro2_1[2],pro2_2[2];
1224 double pro1_21[2],pro1_22[2],pro1_23[2],pro1_11[2],pro1_12[2],pro1_13[2],pro3_p1[2],pro3_p2[2],pro3_1[2],pro3_2[2],pro3_11[2],pro3_12[2],pro4_p2[2],pro4_1[2],pro4_p1[2],pro4_2[2],pro4_12[2],pro4_22[2],pro5_m1[2],pro5_m2[2],pro5_1[2],pro5_2[2],pro5_12[2],pro5_22[2],pro6_f1[2],pro6_f11[2],pro6_11[2],pro8_p1[2],pro8_1[2];
1225 double pro3_p11[2],pro3_p12[2],pro3_111[2],pro3_112[2];
1226 double pro4_11[2],pro4_111[2],pro4_112[2],pro5_11[2],pro5_112[2],pro5_111[2],pro5_222[2];
1227
1228 //double pro0_1[2],pro0_2[2],pro0_3[2],pro0_4[2];
1229 double pro1_01[2],pro1_p1[2],pro1_m1[2],pro1_02[2],pro1_p2[2],pro1_m2[2];
1230 double prob1_1[2],prob1_2[2];
1231 double pro9_01[2],pro9_p1[2],pro9_m1[2],pro9_02[2],pro9_p2[2],pro9_m2[2],pro9_2[2],pro9_1[2],pro9_21[2],pro9_22[2],pro9_23[2],pro9_11[2],pro9_13[2],pro9_12[2],pro1_p20[2],pro10_42[2],pro11_42[2],pro42_21[2],pro42_22[2];
1232
1233 double tpro_01[2],tpro_p1[2],tpro_m1[2],tpro_02[2],tpro_p2[2],tpro_m2[2],tpro11_p1[2],tpro11_p2[2],pro11_p1[2],pro11_p2[2],tpro10_42[2],tpro11_42[2];
1234 double tpro2_01[2],tpro2_p1[2],tpro2_m1[2],tpro2_02[2],tpro2_p2[2],tpro2_m2[2];
1235 double tpro1_01[2],tpro1_p1[2],tpro1_m1[2],tpro1_02[2],tpro1_p2[2],tpro1_m2[2];
1236 double tpro3_p1[2],tpro3_p2[2];
1237 double tpro4_p1[2],tpro4_p2[2];
1238 double tpro5_m1[2],tpro5_m2[2];
1239 double tpro9_01[2],tpro9_p1[2],tpro9_m1[2],tpro9_02[2],tpro9_p2[2],tpro9_m2[2];
1240
1241 double pro_11[2],pro_12[2],pro_13[2],pro_21[2],pro_22[2],pro_23[2],pro_a1p[2],pro_a101[2],pro_a102[2],pfo_a1p[2],pfo_a101[2],pfo_a102[2],pro11_12[2],pro11_22[2];
1242 double pro2_11[2],pro2_12[2],pro2_13[2],pro2_21[2],pro2_22[2],pro2_23[2];
1243 double mass1sq, mass2sq;
1244 double pro10_p1[2],pro10_p2[2],pro10_1[2],pro10_2[2],pro10_12[2],pro10_22[2],tpro10_p1[2],tpro10_p2[2],pro10_Vp1[2],pro10_Vp2[2],pro45_m1[2],pro45_m2[2],tpro45_m1[2],pro45_10[2],tpro45_m2[2],pro45_11[2],pro0_20[2],pro1_20[2],pro0_p20[2],pro_20[2],pro10_21[2],pro10_23[2],pro10_24[2],pro10_25[2],pro10_26[2];
1245 double pro4_1112[2],pro4_2222[2],pro5_1112[2],pro5_2222[2];
1246
1247
1248 double B2_a1p_rhop1(-1),B1_D0_a1pkstm(-1),B1_D0_a1pkstm1(-1),B1_D0_a1pkstm2(-1),B2_a1p_rhop2(-1),B2_D0_a1pkstm1(-1),B2_D0_a1pkstm2(-1),B2_D0_a1pkstm(-1),B1_kst(-1),B1_kstm(-1),B1_kst01(-1),B1_kst02(-1),B1_rho14501(-1),B1_rho14502(-1),B1_D0_k11(-1),B1_D0_k12(-1),B1_k1270_rho0(-1),B1_f1270_rho0(-1),B1_k1400_rho0(-1),B1_k1400_rho01(-1),B1_k1400_rho02(-1),B1_k1400_kst0(-1),B1_k1400_kst01(-1),B1_k1400_kst02(-1),B1_D0_K1400rho0(-1),B1_D0_K1400rho01(-1),B1_D0_K1400rho02(-2);
1249 double B1_a10_f0(-1),B1_a101(-1),B1_a102(-1),B1_D0_a1kst(-1);
1250 double B1_a10_kst0(-1),B1_a10_kst(-1),B2_a10_rho(-1),B1_D0_a10kst0(-1),B2_D0_a10kst0(-1),B1_D0_a10kst01(-1),B1_D0_a10kst02(-1),B2_D0_a10kst01(-1),B2_D0_a10kst02(-1);
1251 double p1a1p_1[4][4],p1a1p_2[4][4],t2_a1p1[4][4],t2_a1p2[4][4],t2D0_a1p2[4][4],t2D0_a1p[4][4],t2D0_a1p1[4][4],p1_a102[4][4],p1_a103[4][4],p2_a102[4][4],p2_a103[4][4],p1_k127p1[4][4],p1_k127p2[4][4],p1_k127m1[4][4],p1_k127m2[4][4];
1252 double t2D0_a101[4][4],t2D0_a102[4][4];
1253 double t1_a102[4][4],t1_a103[4][4],t2_a103[4][4];
1254 double t1kstm1[4],t1kstm2[4],t1kstm[4],t1D0_a1p[4],t1D0_a1p1[4],t1D0_a1p2[4],t2D0a101[4][4];
1255 double t1a1p[4],t1a101[1],t1a102[1],t1D0_kpimSW1[4],t1D0_kpimSW2[4];
1256 double t1D0_a101[4],t1D0_a102[4],t2D0a102[4][4],t1D0a101[4],t1D0a102[4];
1257 double temp_PDF1,temp_PDF2;
1258
1259
1260 //---------------------------------------------------------------------------
1261
1262 for(int i=0; i<nstates; i++) {
1263 cof[0] = amp[i]*cos(phase[i]);
1264 cof[1] = amp[i]*sin(phase[i]);
1265 mass1sq = mass1[i]*mass1[i];
1266 mass2sq = mass2[i]*mass2[i];
1267 temp_PDF11 = 0;
1268 temp_PDF12 = 0;
1269 temp_PDF13 = 0;
1270 temp_PDF21 = 0;
1271 temp_PDF22 = 0;
1272 temp_PDF23 = 0;
1273 temp_PDF1 = 0;
1274 temp_PDF2 = 0;
1275
1276 //D to V1V2, V1--PKsPi01, V2--V3Pip, V4--PimPi02
1277 if(modetype[i]==1){
1278 if (g2[i]==0)//spin=0 D to rho omega
1279 {
1280 if(B1_omega10==-1) {
1281
1282 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass1[i]);
1283 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass1[i]);
1284 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass1[i]);
1285
1286 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass1[i]);
1287 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass1[i]);
1288 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass1[i]);
1289 }
1290 if(B1_kst1==-1) {
1291 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
1292 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
1293 }
1294
1295 if(B1_rho10==-1) {
1296 B1_rho10=BarrierN(1,srho01,sPip,sPim,rRes2,0.77526);
1297 B1_rho1p=BarrierN(1,srhop1,sPip,sPi01,rRes2,0.77526);
1298 B1_rho1m=BarrierN(1,srhom1,sPi01,sPim,rRes2,0.77526);
1299
1300 B1_rho20=BarrierN(1,srho02,sPip,sPim,rRes2,0.77526);
1301 B1_rho2p=BarrierN(1,srhop2,sPip,sPi01,rRes2,0.77526);
1302 B1_rho2m=BarrierN(1,srhom2,sPi02,sPim,rRes2,0.77526);
1303 }
1304
1305 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
1306 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1307 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
1308 calt1(prho01,Pi01,t1omega01);
1309 calt1(prho02,Pi02,t1omega02);calt1(prhop1,Pim,t1omegap1);
1310 calt1(prhop2,Pim,t1omegap2);calt1(prhom1,Pip,t1omegam1);
1311 calt1(prhom2,Pip,t1omegam2);calt1(PKs,Pi01,t1kst1);
1312 calt1(PKs,Pi02,t1kst2);
1313 calG2(prho01,Pi01,p1omega01);calG2(prho02,Pi02,p1omega02);
1314 calG2(prhop1,Pim,p1omegap1);calG2(prhop2,Pim,p1omegap2);
1315 calG2(prhom1,Pip,p1omegam1);calG2(prhom2,Pip,p1omegam2);
1316
1317 for(int i=0; i<4; i++)
1318 {
1319 for(int j=0; j<4; j++)
1320 {
1321 double tempomega1 = pomega1[j]*G[j][j]*G[i][i];// p(omega)
1322 double tempomega2 = pomega2[j]*G[j][j]*G[i][i];
1323
1324 for(int k=0; k<4; k++)
1325 {
1326 double temt1omega01 = t1omega01[k]*G[k][k];//Sn(ome)
1327 double temt1omega02 = t1omega02[k]*G[k][k];
1328 double temt1omegap1 = t1omegap1[k]*G[k][k];
1329 double temt1omegap2 = t1omegap2[k]*G[k][k];
1330 double temt1omegam1 = t1omegam1[k]*G[k][k];
1331 double temt1omegam2 = t1omegam2[k]*G[k][k];
1332
1333 for(int l=0; l<4; l++)
1334 {
1335 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1336
1337 double temt1rho01 = t1rho01[l]*G[l][l]*E[i][j][k][l];
1338 double temt1rho02 = t1rho02[l]*G[l][l]*E[i][j][k][l];
1339 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
1340 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
1341 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
1342 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
1343
1344 for(int m=0; m<4; m++)
1345 {
1346 temp_PDF11 += G[m][m]*t1kst1[m]*p1omega02[m][i]*tempomega2*temt1omega02*temt1rho02;
1347 temp_PDF12 += G[m][m]*t1kst1[m]*p1omegap2[m][i]*tempomega2*temt1omegap2*temt1rhop2;
1348 temp_PDF13 += G[m][m]*t1kst1[m]*p1omegam2[m][i]*tempomega2*temt1omegam2*temt1rhom2;
1349
1350 temp_PDF21 += G[m][m]*t1kst2[m]*p1omega01[m][i]*tempomega1*temt1omega01*temt1rho01;
1351 temp_PDF22 += G[m][m]*t1kst2[m]*p1omegap1[m][i]*tempomega1*temt1omegap1*temt1rhop1;
1352 temp_PDF23 += G[m][m]*t1kst2[m]*p1omegam1[m][i]*tempomega1*temt1omegam1*temt1rhom1;
1353 }
1354 }
1355 }
1356 }
1357 }
1358
1359 temp_PDF11 = temp_PDF11*B1_omega20*B1_kst1*B1_rho20;
1360 temp_PDF12 = temp_PDF12*B1_omega2p*B1_kst1*B1_rho2p;
1361 temp_PDF13 = temp_PDF13*B1_omega2m*B1_kst1*B1_rho2m;
1362 temp_PDF21 = temp_PDF21*B1_omega10*B1_kst2*B1_rho10;
1363 temp_PDF22 = temp_PDF22*B1_omega1p*B1_kst2*B1_rho1p;
1364 temp_PDF23 = temp_PDF23*B1_omega1m*B1_kst2*B1_rho1m;
1365 }
1366 else if (g2[i]==1)
1367 {
1368
1369 if(B1_omega10==-1) {
1370
1371 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass1[i]);
1372 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass1[i]);
1373 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass1[i]);
1374
1375 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass1[i]);
1376 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass1[i]);
1377 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass1[i]);
1378 }
1379
1380 if(B1_kst1==-1) {
1381
1382 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
1383 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
1384 }
1385
1386 if(B1_D0_omega1==-1) {
1387
1388 B1_D0_omega1=BarrierN(1,sD0,somega1,skst2,rDs2,mD0M);
1389 B1_D0_omega2=BarrierN(1,sD0,somega2,skst1,rDs2,mD0M);
1390 }
1391
1392 if(B1_rho10==-1) {
1393 B1_rho10=BarrierN(1,srho01,sPip,sPim,rRes2,0.77526);
1394 B1_rho1p=BarrierN(1,srhop1,sPip,sPi01,rRes2,0.77526);
1395 B1_rho1m=BarrierN(1,srhom1,sPi01,sPim,rRes2,0.77526);
1396
1397 B1_rho20=BarrierN(1,srho02,sPip,sPim,rRes2,0.77526);
1398 B1_rho2p=BarrierN(1,srhop2,sPip,sPi01,rRes2,0.77526);
1399 B1_rho2m=BarrierN(1,srhom2,sPi02,sPim,rRes2,0.77526);
1400 }
1401
1402 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
1403 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1404 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
1405 calt1(prho01,Pi01,t1omega01);
1406 calt1(prho02,Pi02,t1omega02);calt1(prhop1,Pim,t1omegap1);
1407 calt1(prhop2,Pim,t1omegap2);calt1(prhom1,Pip,t1omegam1);
1408 calt1(prhom2,Pip,t1omegam2);calt1(PKs,Pi01,t1kst1);
1409 calt1(PKs,Pi02,t1kst2);
1410 calG2(prho01,Pi01,p1omega01);calG2(prho02,Pi02,p1omega02);
1411 calG2(prhop1,Pim,p1omegap1);calG2(prhop2,Pim,p1omegap2);
1412 calG2(prhom1,Pip,p1omegam1);calG2(prhom2,Pip,p1omegam2);
1413 calt1(pomega1,pkst2,t1D0_omega1kst2);
1414 calt1(pomega2,pkst1,t1D0_omega2kst1);
1415 for(int i=0; i<4; i++)
1416 {
1417 double tempD0 = pD0[i]*G[i][i];
1418
1419 for(int j=0; j<4; j++)
1420 {
1421 double temt1kst1 = t1kst1[j]*G[j][j];
1422 double temt1kst2 = t1kst2[j]*G[j][j];
1423
1424 for(int k=0; k<4; k++)
1425 {
1426 double temt1D0_omega1kst2 = t1D0_omega1kst2[k]*G[k][k];
1427 double temt1D0_omega2kst1 = t1D0_omega2kst1[k]*G[k][k];
1428
1429 for(int l=0; l<4; l++)
1430 {
1431 for(int m=0; m<4; m++)
1432 {
1433 double temp1omega01 = p1omega01[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1434 double temp1omega02 = p1omega02[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1435 double temp1omegap1 = p1omegap1[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1436 double temp1omegap2 = p1omegap2[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1437 double temp1omegam1 = p1omegam1[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1438 double temp1omegam2 = p1omegam2[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1439
1440 for(int n=0; n<4; n++)
1441 {
1442 double tempomega1 = pomega1[n]*G[n][n];
1443 double tempomega2 = pomega2[n]*G[n][n];
1444
1445 for(int p=0; p<4; p++)
1446 {
1447 double temt1omega01 = t1omega01[p]*G[p][p];
1448 double temt1omega02 = t1omega02[p]*G[p][p];
1449 double temt1omegap1 = t1omegap1[p]*G[p][p];
1450 double temt1omegap2 = t1omegap2[p]*G[p][p];
1451 double temt1omegam1 = t1omegam1[p]*G[p][p];
1452 double temt1omegam2 = t1omegam2[p]*G[p][p];
1453
1454 for(int q=0; q<4; q++)
1455 {
1456 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1457 if((m==n)||(m==p)||(m==q)||(n==p)||(n==q)||(p==q)) continue;
1458 temp_PDF11 += tempD0*temt1kst1*temt1D0_omega2kst1*temp1omega02*E[m][n][p][q]*tempomega2*temt1omega02*t1rho02[q]*G[q][q];
1459 temp_PDF12 += tempD0*temt1kst1*temt1D0_omega2kst1*temp1omegap2*E[m][n][p][q]*tempomega2*temt1omegap2*t1rhop2[q]*G[q][q];
1460 temp_PDF13 += tempD0*temt1kst1*temt1D0_omega2kst1*temp1omegam2*E[m][n][p][q]*tempomega2*temt1omegam2*t1rhom2[q]*G[q][q];
1461 temp_PDF21 += tempD0*temt1kst2*temt1D0_omega1kst2*temp1omega01*E[m][n][p][q]*tempomega1*temt1omega01*t1rho01[q]*G[q][q];
1462 temp_PDF22 += tempD0*temt1kst2*temt1D0_omega1kst2*temp1omegap1*E[m][n][p][q]*tempomega1*temt1omegap1*t1rhop1[q]*G[q][q];
1463 temp_PDF23 += tempD0*temt1kst2*temt1D0_omega1kst2*temp1omegam1*E[m][n][p][q]*tempomega1*temt1omegam1*t1rhom1[q]*G[q][q];
1464
1465 }
1466 }
1467 }
1468 }
1469 }
1470 }
1471 }
1472 }
1473 temp_PDF11 = temp_PDF11*B1_D0_omega2*B1_omega20*B1_kst1*B1_rho20;
1474 temp_PDF12 = temp_PDF12*B1_D0_omega2*B1_omega2p*B1_kst1*B1_rho2p;
1475 temp_PDF13 = temp_PDF13*B1_D0_omega2*B1_omega2m*B1_kst1*B1_rho2m;
1476 temp_PDF21 = temp_PDF21*B1_D0_omega1*B1_omega10*B1_kst2*B1_rho10;
1477 temp_PDF22 = temp_PDF22*B1_D0_omega1*B1_omega1p*B1_kst2*B1_rho1p;
1478 temp_PDF23 = temp_PDF23*B1_D0_omega1*B1_omega1m*B1_kst2*B1_rho1m;
1479 }
1480 else if (g2[i]==2)
1481 {
1482 if(B1_omega10==-1) {
1483 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass1[i]);
1484 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass1[i]);
1485 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass1[i]);
1486
1487 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass1[i]);
1488 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass1[i]);
1489 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass1[i]);
1490
1491 }
1492
1493 if(B1_kst1==-1) {
1494 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
1495 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
1496 }
1497
1498 if(B2_D0_omega1==-1){
1499 B2_D0_omega1=BarrierN(2,sD0,somega1,skst2,rDs2,mD0M);
1500 B2_D0_omega2=BarrierN(2,sD0,somega2,skst1,rDs2,mD0M);
1501 }
1502
1503 if(B1_rho10==-1) {
1504 B1_rho10=BarrierN(1,srho01,sPip,sPim,rRes2,0.77526);
1505 B1_rho1p=BarrierN(1,srhop1,sPip,sPi01,rRes2,0.77526);
1506 B1_rho1m=BarrierN(1,srhom1,sPi01,sPim,rRes2,0.77526);
1507
1508 B1_rho20=BarrierN(1,srho02,sPip,sPim,rRes2,0.77526);
1509 B1_rho2p=BarrierN(1,srhop2,sPip,sPi01,rRes2,0.77526);
1510 B1_rho2m=BarrierN(1,srhom2,sPi02,sPim,rRes2,0.77526);
1511 }
1512
1513
1514 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
1515 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1516 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
1517 calt1(prho01,Pi01,t1omega01);
1518 calt1(prho02,Pi02,t1omega02);calt1(prhop1,Pim,t1omegap1);
1519 calt1(prhop2,Pim,t1omegap2);calt1(prhom1,Pip,t1omegam1);
1520 calt1(prhom2,Pip,t1omegam2);calt1(PKs,Pi01,t1kst1);
1521 calt1(PKs,Pi02,t1kst2);
1522 calG2(prho01,Pi01,p1omega01);calG2(prho02,Pi02,p1omega02);
1523 calG2(prhop1,Pim,p1omegap1);calG2(prhop2,Pim,p1omegap2);
1524 calG2(prhom1,Pip,p1omegam1);calG2(prhom2,Pip,p1omegam2);
1525 calt2(pomega1,pkst2,t2D0_omega1kst2); calt2(pomega2,pkst1,t2D0_omega2kst1);
1526
1527 for(int i=0; i<4; i++)
1528 {
1529 for(int j=0; j<4; j++)
1530 {
1531 double tempomega1 = pomega1[j]*G[j][j]*G[i][i];
1532 double tempomega2 = pomega2[j]*G[j][j]*G[i][i];
1533
1534 for(int k=0; k<4; k++)
1535 {
1536 double temt1omega01 = t1omega01[k]*G[k][k];
1537 double temt1omega02 = t1omega02[k]*G[k][k];
1538 double temt1omegap1 = t1omegap1[k]*G[k][k];
1539 double temt1omegap2 = t1omegap2[k]*G[k][k];
1540 double temt1omegam1 = t1omegam1[k]*G[k][k];
1541 double temt1omegam2 = t1omegam2[k]*G[k][k];
1542
1543 for(int l=0; l<4; l++)
1544 {
1545 double temt1rho01 = t1rho01[l]*G[l][l]*E[i][j][k][l];
1546 double temt1rho02 = t1rho02[l]*G[l][l]*E[i][j][k][l];
1547 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
1548 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
1549 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
1550 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
1551
1552 for(int m=0; m<4; m++)
1553 {
1554 double temt1kst1 = t1kst1[m]*G[m][m];
1555 double temt1kst2 = t1kst2[m]*G[m][m];
1556
1557 for(int n=0; n<4; n++)
1558 {
1559 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1560
1561 temp_PDF11 += t2D0_omega2kst1[m][n]*temt1kst1*p1omega02[n][i]*tempomega2*temt1omega02*temt1rho02*G[n][n];
1562 temp_PDF12 += t2D0_omega2kst1[m][n]*temt1kst1*p1omegap2[n][i]*tempomega2*temt1omegap2*temt1rhop2*G[n][n];
1563 temp_PDF13 += t2D0_omega2kst1[m][n]*temt1kst1*p1omegam2[n][i]*tempomega2*temt1omegam2*temt1rhom2*G[n][n];
1564 temp_PDF21 += t2D0_omega1kst2[m][n]*temt1kst2*p1omega01[n][i]*tempomega1*temt1omega01*temt1rho01*G[n][n];
1565 temp_PDF22 += t2D0_omega1kst2[m][n]*temt1kst2*p1omegap1[n][i]*tempomega1*temt1omegap1*temt1rhop1*G[n][n];
1566 temp_PDF23 += t2D0_omega1kst2[m][n]*temt1kst2*p1omegam1[n][i]*tempomega1*temt1omegam1*temt1rhom1*G[n][n];
1567 }
1568 }
1569 }
1570 }
1571 }
1572 }
1573
1574 temp_PDF11 = temp_PDF11*B2_D0_omega2*B1_omega20*B1_kst1*B1_rho20;
1575 temp_PDF12 = temp_PDF12*B2_D0_omega2*B1_omega2p*B1_kst1*B1_rho2p;
1576 temp_PDF13 = temp_PDF13*B2_D0_omega2*B1_omega2m*B1_kst1*B1_rho2m;
1577 temp_PDF21 = temp_PDF21*B2_D0_omega1*B1_omega10*B1_kst2*B1_rho10;
1578 temp_PDF22 = temp_PDF22*B2_D0_omega1*B1_omega1p*B1_kst2*B1_rho1p;
1579 temp_PDF23 = temp_PDF23*B2_D0_omega1*B1_omega1m*B1_kst2*B1_rho1m;
1580 }
1581
1582 //omega
1583 if(g0[i]==1){
1584 propagator(mass1sq,mass1[i],width1[i],somega1,pro0_01);//ome1--rho0 pi01
1585 propagator(mass1sq,mass1[i],width1[i],somega1,pro0_p1);//ome1--rhop (pi01)
1586 propagator(mass1sq,mass1[i],width1[i],somega1,pro0_m1);//ome1--rhom (pi01)
1587 propagator(mass1sq,mass1[i],width1[i],somega2,pro0_02);//ome2--rho0 pi02
1588 propagator(mass1sq,mass1[i],width1[i],somega2,pro0_p2);//ome2--rhop (pi02)
1589 propagator(mass1sq,mass1[i],width1[i],somega2,pro0_m2);
1590
1591 }
1592 else if(g0[i]==0){
1593 pro0_01[0] = 1; pro0_01[1] = 0; pro0_p1[0] = 1; pro0_p1[1] = 0; pro0_m1[0] = 1; pro0_m1[1] = 0;
1594 pro0_02[0] = 1; pro0_02[1] = 0; pro0_p2[0] = 1; pro0_p2[1] = 0; pro0_m2[0] = 1; pro0_m2[1] = 0;
1595 }
1596 propagatorGS(0.60102807,0.77526,0.1478,srho01,sPip,sPim,rRes2,pro1V01);
1597 propagatorGS(0.60102807,0.77526,0.1478,srho02,sPip,sPim,rRes2,pro1V02);
1598 propagatorGS(0.60102807,0.77526,0.1478,srhop1,sPip,sPi01,rRes2,pro1Vp1);
1599 propagatorGS(0.60102807,0.77526,0.1478,srhop2,sPip,sPi02,rRes2,pro1Vp2);
1600 propagatorGS(0.60102807,0.77526,0.1478,srhom1,sPi01,sPim,rRes2,pro1Vm1);
1601 propagatorGS(0.60102807,0.77526,0.1478,srhom2,sPi02,sPim,rRes2,pro1Vm2);
1602
1603 Com_Multi(pro0_01,pro1V01,tpro_01);
1604 Com_Multi(pro0_p1,pro1Vp1,tpro_p1);
1605 Com_Multi(pro0_m1,pro1Vm1,tpro_m1);
1606
1607 Com_Multi(pro0_02,pro1V02,tpro_02);
1608 Com_Multi(pro0_p2,pro1Vp2,tpro_p2);
1609 Com_Multi(pro0_m2,pro1Vm2,tpro_m2);
1610
1611
1612 //kst
1613 if(g1[i]==1){
1614 propagatorRBW(mass2sq,mass2[i],width2[i],skst1,sKs,sPi01,rRes2,1,pro1_1);//kst1
1615 propagatorRBW(mass2sq,mass2[i],width2[i],skst2,sKs,sPi02,rRes2,1,pro1_2);//kst2
1616 }
1617 else if(g1[i]==0){
1618 pro1_1[0] = 1; pro1_1[1] = 0;
1619 pro1_2[0] = 1; pro1_2[1] = 0;
1620 }
1621
1622 Com_Multi(tpro_01,pro1_2,pro_21);
1623 Com_Multi(tpro_p1,pro1_2,pro_22);
1624 Com_Multi(tpro_m1,pro1_2,pro_23);
1625
1626 Com_Multi(tpro_02,pro1_1,pro_11);
1627 Com_Multi(tpro_p2,pro1_1,pro_12);
1628 Com_Multi(tpro_m2,pro1_1,pro_13);
1629
1630 amp_tmp1[0] =-1*(temp_PDF11*pro_11[0]) + temp_PDF12*pro_12[0] + temp_PDF13*pro_13[0];
1631 amp_tmp1[1] =-1*(temp_PDF11*pro_11[1]) + temp_PDF12*pro_12[1] + temp_PDF13*pro_13[1];
1632 amp_tmp2[0] =-1*(temp_PDF21*pro_21[0]) + temp_PDF22*pro_22[0] + temp_PDF23*pro_23[0];
1633 amp_tmp2[1] =-1*(temp_PDF21*pro_21[1]) + temp_PDF22*pro_22[1] + temp_PDF23*pro_23[1];
1634 // printf("shuchu1: %.20f,%lf,%.20f, %.20f\n", amp_tmp1[1],amp_tmp2[1],amp_tmp1[0],amp_tmp2[0]);
1635 }
1636 if(modetype[i]==2){
1637 if (g2[i]==0)//spin=0 D to rho omega
1638 {
1639 if(B1_phi10==-1) {
1640
1641 B1_phi10=BarrierN(1,sphi1,srho01,sPi01,rRes2,mass1[i]);
1642 B1_phi1p=BarrierN(1,sphi1,srhop1,sPim,rRes2,mass1[i]);
1643 B1_phi1m=BarrierN(1,sphi1,srhom1,sPip,rRes2,mass1[i]);
1644
1645 B1_phi20=BarrierN(1,sphi2,srho02,sPi02,rRes2,mass1[i]);
1646 B1_phi2p=BarrierN(1,sphi2,srhop2,sPim,rRes2,mass1[i]);
1647 B1_phi2m=BarrierN(1,sphi2,srhom2,sPip,rRes2,mass1[i]);
1648 }
1649 if(B1_kst1_2==-1) {
1650 B1_kst1_2=BarrierN(1,skst1_2,sKs,sPi01,rRes2,mass2[i]);
1651 B1_kst2_2=BarrierN(1,skst2_2,sKs,sPi02,rRes2,mass2[i]);
1652 }
1653 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
1654 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1655 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
1656 calt1(prho01,Pi01,t1phi01);
1657 calt1(prho02,Pi02,t1phi02);calt1(prhop1,Pim,t1phip1);
1658 calt1(prhop2,Pim,t1phip2);calt1(prhom1,Pip,t1phim1);
1659 calt1(prhom2,Pip,t1phim2);calt1(PKs,Pi01,t1kst1);
1660 calt1(PKs,Pi02,t1kst2);
1661 calG2(prho01,Pi01,p1phi01);calG2(prho02,Pi02,p1phi02);
1662 calG2(prhop1,Pim,p1phip1);calG2(prhop2,Pim,p1phip2);
1663 calG2(prhom1,Pip,p1phim1);calG2(prhom2,Pip,p1phim2);
1664
1665 for(int i=0; i<4; i++)
1666 {
1667 for(int j=0; j<4; j++)
1668 {
1669 double tempphi1 = pphi1[j]*G[j][j]*G[i][i];// p(omega)
1670 double tempphi2 = pphi2[j]*G[j][j]*G[i][i];
1671
1672 for(int k=0; k<4; k++)
1673 {
1674 double temt1phi01 = t1phi01[k]*G[k][k];//Sn(ome)
1675 double temt1phi02 = t1phi02[k]*G[k][k];
1676 double temt1phip1 = t1phip1[k]*G[k][k];
1677 double temt1phip2 = t1phip2[k]*G[k][k];
1678 double temt1phim1 = t1phim1[k]*G[k][k];
1679 double temt1phim2 = t1phim2[k]*G[k][k];
1680
1681 for(int l=0; l<4; l++)
1682 {
1683 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1684
1685 double temt1rho01 = t1rho01[l]*G[l][l]*E[i][j][k][l];
1686 double temt1rho02 = t1rho02[l]*G[l][l]*E[i][j][k][l];
1687 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
1688 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
1689 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
1690 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
1691
1692 for(int m=0; m<4; m++)
1693 {
1694 temp_PDF11 += G[m][m]*t1kst1[m]*p1phi02[m][i]*tempphi2*temt1phi02*temt1rho02;
1695 temp_PDF12 += G[m][m]*t1kst1[m]*p1phip2[m][i]*tempphi2*temt1phip2*temt1rhop2;
1696 temp_PDF13 += G[m][m]*t1kst1[m]*p1phim2[m][i]*tempphi2*temt1phim2*temt1rhom2;
1697
1698 temp_PDF21 += G[m][m]*t1kst2[m]*p1phi01[m][i]*tempphi1*temt1phi01*temt1rho01;
1699 temp_PDF22 += G[m][m]*t1kst2[m]*p1phip1[m][i]*tempphi1*temt1phip1*temt1rhop1;
1700 temp_PDF23 += G[m][m]*t1kst2[m]*p1phim1[m][i]*tempphi1*temt1phim1*temt1rhom1;
1701 }
1702 }
1703 }
1704 }
1705 }
1706
1707 temp_PDF11 = temp_PDF11*B1_phi20*B1_kst1_2*B1_V02;
1708 temp_PDF12 = temp_PDF12*B1_phi2p*B1_kst1_2*B1_Vp2;
1709 temp_PDF13 = temp_PDF13*B1_phi2m*B1_kst1_2*B1_Vm2;
1710 temp_PDF21 = temp_PDF21*B1_phi10*B1_kst2_2*B1_V01;
1711 temp_PDF22 = temp_PDF22*B1_phi1p*B1_kst2_2*B1_Vp1;
1712 temp_PDF23 = temp_PDF23*B1_phi1m*B1_kst2_2*B1_Vm1;
1713 }
1714 else if (g2[i]==1)
1715 {
1716
1717 if(B1_phi10==-1) {
1718
1719 B1_phi10=BarrierN(1,sphi1,srho01,sPi01,rRes2,mass1[i]);
1720 B1_phi1p=BarrierN(1,sphi1,srhop1,sPim,rRes2,mass1[i]);
1721 B1_phi1m=BarrierN(1,sphi1,srhom1,sPip,rRes2,mass1[i]);
1722
1723 B1_phi20=BarrierN(1,sphi2,srho02,sPi02,rRes2,mass1[i]);
1724 B1_phi2p=BarrierN(1,sphi2,srhop2,sPim,rRes2,mass1[i]);
1725 B1_phi2m=BarrierN(1,sphi2,srhom2,sPip,rRes2,mass1[i]);
1726 }
1727
1728 if(B1_kst1_2==-1) {
1729
1730 B1_kst1_2=BarrierN(1,skst1_2,sKs,sPi01,rRes2,mass2[i]);
1731 B1_kst2_2=BarrierN(1,skst2_2,sKs,sPi02,rRes2,mass2[i]);
1732 }
1733
1734 if(B1_D0_phi1==-1) {
1735
1736 B1_D0_phi1=BarrierN(1,sD0,sphi1,skst2,rDs2,mD0M);
1737 B1_D0_phi2=BarrierN(1,sD0,sphi2,skst1,rDs2,mD0M);
1738 }
1739
1740 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
1741 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1742 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
1743 calt1(prho01,Pi01,t1phi01);
1744 calt1(prho02,Pi02,t1phi02);calt1(prhop1,Pim,t1phip1);
1745 calt1(prhop2,Pim,t1phip2);calt1(prhom1,Pip,t1phim1);
1746 calt1(prhom2,Pip,t1phim2);calt1(PKs,Pi01,t1kst1);
1747 calt1(PKs,Pi02,t1kst2);
1748 calG2(prho01,Pi01,p1phi01);calG2(prho02,Pi02,p1phi02);
1749 calG2(prhop1,Pim,p1phip1);calG2(prhop2,Pim,p1phip2);
1750 calG2(prhom1,Pip,p1phim1);calG2(prhom2,Pip,p1phim2);
1751 calt1(pphi1,pkst2_2,t1D0_phi1kst2);
1752 calt1(pphi2,pkst1_2,t1D0_phi2kst1);
1753 for(int i=0; i<4; i++)
1754 {
1755 double tempD0 = pD0[i]*G[i][i];
1756
1757 for(int j=0; j<4; j++)
1758 {
1759 double temt1kst1 = t1kst1[j]*G[j][j];
1760 double temt1kst2 = t1kst2[j]*G[j][j];
1761
1762 for(int k=0; k<4; k++)
1763 {
1764 double temt1D0_phi1kst2 = t1D0_phi1kst2[k]*G[k][k];
1765 double temt1D0_phi2kst1 = t1D0_phi2kst1[k]*G[k][k];
1766
1767 for(int l=0; l<4; l++)
1768 {
1769 for(int m=0; m<4; m++)
1770 {
1771 double temp1phi01 = p1phi01[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1772 double temp1phi02 = p1phi02[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1773 double temp1phip1 = p1phip1[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1774 double temp1phip2 = p1phip2[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1775 double temp1phim1 = p1phim1[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1776 double temp1phim2 = p1phim2[l][m]*G[l][l]*G[m][m]*E[i][j][k][l];
1777 for(int n=0; n<4; n++)
1778 {
1779 double tempphi1 = pphi1[n]*G[n][n];
1780 double tempphi2 = pphi2[n]*G[n][n];
1781
1782 for(int p=0; p<4; p++)
1783 {
1784 double temt1phi01 = t1phi01[p]*G[p][p];
1785 double temt1phi02 = t1phi02[p]*G[p][p];
1786 double temt1phip1 = t1phip1[p]*G[p][p];
1787 double temt1phip2 = t1phip2[p]*G[p][p];
1788 double temt1phim1 = t1phim1[p]*G[p][p];
1789 double temt1phim2 = t1phim2[p]*G[p][p];
1790
1791 for(int q=0; q<4; q++)
1792 {
1793 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1794 if((m==n)||(m==p)||(m==q)||(n==p)||(n==q)||(p==q)) continue;
1795 temp_PDF11 += tempD0*temt1kst1*temt1D0_phi2kst1*temp1phi02*E[m][n][p][q]*tempphi2*temt1phi02*t1rho02[q]*G[q][q];
1796 temp_PDF12 += tempD0*temt1kst1*temt1D0_phi2kst1*temp1phip2*E[m][n][p][q]*tempphi2*temt1phip2*t1rhop2[q]*G[q][q];
1797 temp_PDF13 += tempD0*temt1kst1*temt1D0_phi2kst1*temp1phim2*E[m][n][p][q]*tempphi2*temt1phim2*t1rhom2[q]*G[q][q];
1798 temp_PDF21 += tempD0*temt1kst2*temt1D0_phi1kst2*temp1phi01*E[m][n][p][q]*tempphi1*temt1phi01*t1rho01[q]*G[q][q];
1799 temp_PDF22 += tempD0*temt1kst2*temt1D0_phi1kst2*temp1phip1*E[m][n][p][q]*tempphi1*temt1phip1*t1rhop1[q]*G[q][q];
1800 temp_PDF23 += tempD0*temt1kst2*temt1D0_phi1kst2*temp1phim1*E[m][n][p][q]*tempphi1*temt1phim1*t1rhom1[q]*G[q][q];
1801
1802 }
1803 }
1804 }
1805 }
1806 }
1807 }
1808 }
1809 }
1810 temp_PDF11 = temp_PDF11*B1_D0_phi2*B1_phi20*B1_kst1_2*B1_V02;
1811 temp_PDF12 = temp_PDF12*B1_D0_phi2*B1_phi2p*B1_kst1_2*B1_Vp2;
1812 temp_PDF13 = temp_PDF13*B1_D0_phi2*B1_phi2m*B1_kst1_2*B1_Vm2;
1813 temp_PDF21 = temp_PDF21*B1_D0_phi1*B1_phi10*B1_kst2_2*B1_V01;
1814 temp_PDF22 = temp_PDF22*B1_D0_phi1*B1_phi1p*B1_kst2_2*B1_Vp1;
1815 temp_PDF23 = temp_PDF23*B1_D0_phi1*B1_phi1m*B1_kst2_2*B1_Vm1;
1816 }
1817 else if (g2[i]==2)
1818 {
1819 if(B1_phi10==-1) {
1820 B1_phi10=BarrierN(1,sphi1,srho01,sPi01,rRes2,mass1[i]);
1821 B1_phi1p=BarrierN(1,sphi1,srhop1,sPim,rRes2,mass1[i]);
1822 B1_phi1m=BarrierN(1,sphi1,srhom1,sPip,rRes2,mass1[i]);
1823
1824 B1_phi20=BarrierN(1,sphi2,srho02,sPi02,rRes2,mass1[i]);
1825 B1_phi2p=BarrierN(1,sphi2,srhop2,sPim,rRes2,mass1[i]);
1826 B1_phi2m=BarrierN(1,sphi2,srhom2,sPip,rRes2,mass1[i]);
1827
1828 }
1829
1830 if(B1_kst1_2==-1) {
1831 B1_kst1_2=BarrierN(1,skst1_2,sKs,sPi01,rRes2,mass2[i]);
1832 B1_kst2_2=BarrierN(1,skst2_2,sKs,sPi02,rRes2,mass2[i]);
1833 }
1834
1835 if(B2_D0_phi1==-1){
1836 B2_D0_phi1=BarrierN(2,sD0,sphi1,skst2_2,rDs2,mD0M);
1837 B2_D0_phi2=BarrierN(2,sD0,sphi2,skst1_2,rDs2,mD0M);
1838 }
1839
1840 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
1841 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
1842 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
1843 calt1(prho01,Pi01,t1phi01);
1844 calt1(prho02,Pi02,t1phi02);
1845 calt1(prhop1,Pim,t1phip1);
1846 calt1(prhop2,Pim,t1phip2);
1847 calt1(prhom1,Pip,t1phim1);
1848 calt1(prhom2,Pip,t1phim2);
1849 calt1(PKs,Pi01,t1kst1);
1850 calt1(PKs,Pi02,t1kst2);
1851 calG2(prho01,Pi01,p1phi01);calG2(prho02,Pi02,p1phi02);
1852 calG2(prhop1,Pim,p1phip1);calG2(prhop2,Pim,p1phip2);
1853 calG2(prhom1,Pip,p1phim1);calG2(prhom2,Pip,p1phim2);
1854 calt2(pphi1,pkst2_2,t2D0_phi1kst2); calt2(pphi2,pkst1_2,t2D0_phi2kst1);
1855
1856 for(int i=0; i<4; i++)
1857 {
1858 for(int j=0; j<4; j++)
1859 {
1860 double tempphi1 = pphi1[j]*G[j][j]*G[i][i];
1861 double tempphi2 = pphi2[j]*G[j][j]*G[i][i];
1862
1863 for(int k=0; k<4; k++)
1864 {
1865 double temt1phi01 = t1phi01[k]*G[k][k];
1866 double temt1phi02 = t1phi02[k]*G[k][k];
1867 double temt1phip1 = t1phip1[k]*G[k][k];
1868 double temt1phip2 = t1phip2[k]*G[k][k];
1869 double temt1phim1 = t1phim1[k]*G[k][k];
1870 double temt1phim2 = t1phim2[k]*G[k][k];
1871
1872 for(int l=0; l<4; l++)
1873 {
1874 double temt1rho01 = t1rho01[l]*G[l][l]*E[i][j][k][l];
1875 double temt1rho02 = t1rho02[l]*G[l][l]*E[i][j][k][l];
1876 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
1877 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
1878 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
1879 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
1880
1881 for(int m=0; m<4; m++)
1882 {
1883 double temt1kst1 = t1kst1[m]*G[m][m];
1884 double temt1kst2 = t1kst2[m]*G[m][m];
1885
1886 for(int n=0; n<4; n++)
1887 {
1888 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1889
1890 temp_PDF11 += t2D0_phi2kst1[m][n]*temt1kst1*p1phi02[n][i]*tempphi2*temt1phi02*temt1rho02*G[n][n];
1891 temp_PDF12 += t2D0_phi2kst1[m][n]*temt1kst1*p1phip2[n][i]*tempphi2*temt1phip2*temt1rhop2*G[n][n];
1892 temp_PDF13 += t2D0_phi2kst1[m][n]*temt1kst1*p1phim2[n][i]*tempphi2*temt1phim2*temt1rhom2*G[n][n];
1893 temp_PDF21 += t2D0_phi1kst2[m][n]*temt1kst2*p1phi01[n][i]*tempphi1*temt1phi01*temt1rho01*G[n][n];
1894 temp_PDF22 += t2D0_phi1kst2[m][n]*temt1kst2*p1phip1[n][i]*tempphi1*temt1phip1*temt1rhop1*G[n][n];
1895 temp_PDF23 += t2D0_phi1kst2[m][n]*temt1kst2*p1phim1[n][i]*tempphi1*temt1phim1*temt1rhom1*G[n][n];
1896 }
1897 }
1898 }
1899 }
1900 }
1901 }
1902
1903 temp_PDF11 = temp_PDF11*B2_D0_phi2*B1_phi20*B1_kst1_2*B1_V02;
1904 temp_PDF12 = temp_PDF12*B2_D0_phi2*B1_phi2p*B1_kst1_2*B1_Vp2;
1905 temp_PDF13 = temp_PDF13*B2_D0_phi2*B1_phi2m*B1_kst1_2*B1_Vm2;
1906 temp_PDF21 = temp_PDF21*B2_D0_phi1*B1_phi10*B1_kst2_2*B1_V01;
1907 temp_PDF22 = temp_PDF22*B2_D0_phi1*B1_phi1p*B1_kst2_2*B1_Vp1;
1908 temp_PDF23 = temp_PDF23*B2_D0_phi1*B1_phi1m*B1_kst2_2*B1_Vm1;
1909 }
1910 if(g0[i]==1){
1911
1912 propagator(mass1sq,mass1[i],width1[i],sphi1,pro2_01);
1913 propagator(mass1sq,mass1[i],width1[i],sphi1,pro2_p1);
1914 propagator(mass1sq,mass1[i],width1[i],sphi1,pro2_m1);
1915 propagator(mass1sq,mass1[i],width1[i],sphi2,pro2_02);
1916 propagator(mass1sq,mass1[i],width1[i],sphi2,pro2_p2);
1917 propagator(mass1sq,mass1[i],width1[i],sphi2,pro2_m2);
1918 }
1919 else if(g0[i]==0){
1920 pro2_01[0] = 1; pro2_01[1] = 0; pro2_p1[0] = 1; pro2_p1[1] = 0; pro2_m1[0] = 1; pro2_m1[1] = 0;
1921 pro2_02[0] = 1; pro2_02[1] = 0; pro2_p2[0] = 1; pro2_p2[1] = 0; pro2_m2[0] = 1; pro2_m2[1] = 0;
1922 }
1923 if(g1[i]==1){
1924 propagatorRBW(mass2sq,mass2[i],width2[i],skst1_2,sKs,sPi01,rRes2,1,pro2_1);//kst1
1925 propagatorRBW(mass2sq,mass2[i],width2[i],skst2_2,sKs,sPi02,rRes2,1,pro2_2);//kst2
1926 }
1927 else if(g1[i]==0){
1928 pro1_1[0] = 1; pro1_1[1] = 0;
1929 pro1_2[0] = 1; pro1_2[1] = 0;
1930 }
1931 Com_Multi(pro2_01,pro1V01,tpro2_01); Com_Multi(tpro2_01,pro2_2,pro2_21);
1932 Com_Multi(pro2_p1,pro1Vp1,tpro2_p1); Com_Multi(tpro2_p1,pro2_2,pro2_22);
1933 Com_Multi(pro2_m1,pro1Vm1,tpro2_m1); Com_Multi(tpro2_m1,pro2_2,pro2_23);
1934
1935 Com_Multi(pro2_02,pro1V02,tpro2_02); Com_Multi(tpro2_02,pro2_1,pro2_11);
1936 Com_Multi(pro2_p2,pro1Vp2,tpro2_p2); Com_Multi(tpro2_p2,pro2_1,pro2_12);
1937 Com_Multi(pro2_m2,pro1Vm2,tpro2_m2); Com_Multi(tpro2_m2,pro2_1,pro2_13);
1938
1939 amp_tmp1[0] =-1*(temp_PDF11*pro2_11[0]) + temp_PDF12*pro2_12[0] + temp_PDF13*pro2_13[0];
1940 amp_tmp1[1] =-1*(temp_PDF11*pro2_11[1]) + temp_PDF12*pro2_12[1] + temp_PDF13*pro2_13[1];
1941 amp_tmp2[0] =-1*(temp_PDF21*pro2_21[0]) + temp_PDF22*pro2_22[0] + temp_PDF23*pro2_23[0];
1942 amp_tmp2[1] =-1*(temp_PDF21*pro2_21[1]) + temp_PDF22*pro2_22[1] + temp_PDF23*pro2_23[1];
1943
1944 }
1945
1946
1947 else if(modetype[i]== 40){
1948 if (g2[i]==0)//spin=0 D to rho omega
1949 {
1950 if(B1_omega10==-1) {
1951
1952 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass1[i]);
1953 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass1[i]);
1954 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass1[i]);
1955
1956 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass1[i]);
1957 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass1[i]);
1958 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass1[i]);
1959
1960 }
1961
1962 if(B1_D0_omega1==-1) {
1963 B1_D0_omega1=BarrierN(1,sD0,s1omega1,skpi02SW,rDs2,mD0M);
1964 B1_D0_omega2=BarrierN(1,sD0,s1omega2,skpi01SW,rDs2,mD0M);
1965 }
1966
1967 for(int i=0; i<4; i++)
1968 {
1969 for(int j=0; j<4; j++)
1970 {
1971 double tempomega1 = pomega1[j]*G[j][j]*G[i][i];// p(omega)
1972 double tempomega2 = pomega2[j]*G[j][j]*G[i][i];
1973
1974 for(int k=0; k<4; k++)
1975 {
1976 double temt1omega01 = t1omega01[k]*G[k][k];//Sn(ome)
1977 double temt1omega02 = t1omega02[k]*G[k][k];
1978 double temt1omegap1 = t1omegap1[k]*G[k][k];
1979 double temt1omegap2 = t1omegap2[k]*G[k][k];
1980 double temt1omegam1 = t1omegam1[k]*G[k][k];
1981 double temt1omegam2 = t1omegam2[k]*G[k][k];
1982
1983 for(int l=0; l<4; l++)
1984 {
1985 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
1986
1987 double temt1rho01 = t1rho01[l]*G[l][l]*E[i][j][k][l];
1988 double temt1rho02 = t1rho02[l]*G[l][l]*E[i][j][k][l];
1989 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
1990 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
1991 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
1992 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
1993
1994 for(int m=0; m<4; m++)
1995 {
1996 temp_PDF11 += G[m][m]*t1D0KPi01SW[m]*p1omega02[m][i]*tempomega2*temt1omega02*temt1rho02;
1997 temp_PDF12 += G[m][m]*t1D0KPi01SW[m]*p1omegap2[m][i]*tempomega2*temt1omegap2*temt1rhop2;
1998 temp_PDF13 += G[m][m]*t1D0KPi01SW[m]*p1omegam2[m][i]*tempomega2*temt1omegam2*temt1rhom2;
1999
2000 temp_PDF21 += G[m][m]*t1D0KPi02SW[m]*p1omega01[m][i]*tempomega1*temt1omega01*temt1rho01;
2001 temp_PDF22 += G[m][m]*t1D0KPi02SW[m]*p1omegap1[m][i]*tempomega1*temt1omegap1*temt1rhop1;
2002 temp_PDF23 += G[m][m]*t1D0KPi02SW[m]*p1omegam1[m][i]*tempomega1*temt1omegam1*temt1rhom1;
2003 }
2004 }
2005 }
2006 }
2007 }
2008
2009 temp_PDF11 = temp_PDF11*B1_omega20*B1_D0_omega2*B1_V02;
2010 temp_PDF12 = temp_PDF12*B1_omega2p*B1_D0_omega2*B1_Vp2;
2011 temp_PDF13 = temp_PDF13*B1_omega2m*B1_D0_omega2*B1_Vm2;
2012 temp_PDF21 = temp_PDF21*B1_omega10*B1_D0_omega1*B1_V01;
2013 temp_PDF22 = temp_PDF22*B1_omega1p*B1_D0_omega1*B1_Vp1;
2014 temp_PDF23 = temp_PDF23*B1_omega1m*B1_D0_omega1*B1_Vm1;
2015 }
2016
2017 if(g0[i]==1){
2018 propagatorRBW(mass1sq,mass1[i],width1[i],somega1,srho01,sPi01,rRes2,1,pro0_01);//ome1--rho0 pi01
2019 propagatorRBW(mass1sq,mass1[i],width1[i],somega1,srhop1,sPim,rRes2,1,pro0_p1);//ome1--rhop (pi01)
2020 propagatorRBW(mass1sq,mass1[i],width1[i],somega1,srhom1,sPip,rRes2,1,pro0_m1);//ome1--rhom (pi01)
2021 propagatorRBW(mass1sq,mass1[i],width1[i],somega2,srho02,sPi02,rRes2,1,pro0_02);//ome2--rho0 pi02
2022 propagatorRBW(mass1sq,mass1[i],width1[i],somega2,srhop2,sPim,rRes2,1,pro0_p2);//ome2--rhop (pi02)
2023 propagatorRBW(mass1sq,mass1[i],width1[i],somega2,srhom2,sPip,rRes2,1,pro0_m2);//ome2--rhom(pi02)
2024 /* propagator(mass1sq,mass1[i],width1[i],somega1,pro0_01);//ome1--rho0 pi01
2025 propagator(mass1sq,mass1[i],width1[i],somega1,pro0_p1);//ome1--rhop (pi01)
2026 propagator(mass1sq,mass1[i],width1[i],somega1,pro0_m1);//ome1--rhom (pi01)
2027 propagator(mass1sq,mass1[i],width1[i],somega2,pro0_02);//ome2--rho0 pi02
2028 propagator(mass1sq,mass1[i],width1[i],somega2,pro0_p2);//ome2--rhop (pi02)
2029 propagator(mass1sq,mass1[i],width1[i],somega2,pro0_m2);
2030*/
2031 }
2032 else if(g0[i]==0){
2033 pro0_01[0] = 1; pro0_01[1] = 0; pro0_p1[0] = 1; pro0_p1[1] = 0; pro0_m1[0] = 1; pro0_m1[1] = 0;
2034 pro0_02[0] = 1; pro0_02[1] = 0; pro0_p2[0] = 1; pro0_p2[1] = 0; pro0_m2[0] = 1; pro0_m2[1] = 0;
2035 }
2036 //kst
2037 if(g1[i]==1){
2038 KPiSLASS(skpi01SW,sKs,sPi01,pro1_1);
2039 KPiSLASS(skpi02SW,sKs,sPi02,pro1_2);
2040 }
2041 else if(g1[i]==0){
2042 pro1_1[0] = 1; pro1_1[1] = 0;
2043 pro1_2[0] = 1; pro1_2[1] = 0;
2044 }
2045 //rho
2046 /* if(r1[i]==1){
2047 propagatorGS(0.60102807,0.77526,0.1478,srho01,sPip,sPim,rRes2,pro1V01);
2048 propagatorGS(0.60102807,0.77526,0.1478,srho02,sPip,sPim,rRes2,pro1V02);
2049 propagatorGS(0.60102807,0.77526,0.1478,srhop1,sPip,sPi01,rRes2,pro1Vp1);
2050 propagatorGS(0.60102807,0.77526,0.1478,srhop2,sPip,sPi02,rRes2,pro1Vp2);
2051 propagatorGS(0.60102807,0.77526,0.1478,srhom1,sPi01,sPim,rRes2,pro1Vm1);
2052 propagatorGS(0.60102807,0.77526,0.1478,srhom2,sPi02,sPim,rRes2,pro1Vm2);
2053
2054 }
2055 else if(r1[i]==0){
2056 pro1V01[0] = 1; pro1V01[1] = 0;
2057 pro1V02[0] = 1; pro1V02[1] = 0;
2058 pro1Vp1[0] = 1; pro1Vp1[1] = 0;
2059 pro1Vp2[0] = 1; pro1Vp2[1] = 0;
2060 pro1Vm1[0] = 1; pro1Vm1[1] = 0;
2061 pro1Vm2[0] = 1; pro1Vm2[1] = 0;
2062 }
2063 */
2064 Com_Multi(pro0_01,pro1V01,tpro_01); Com_Multi(tpro_01,pro1_2,pro_21);
2065 Com_Multi(pro0_p1,pro1Vp1,tpro_p1); Com_Multi(tpro_p1,pro1_2,pro_22);
2066 Com_Multi(pro0_m1,pro1Vm1,tpro_m1); Com_Multi(tpro_m1,pro1_2,pro_23);
2067
2068 Com_Multi(pro0_02,pro1V02,tpro_02); Com_Multi(tpro_02,pro1_1,pro_11);
2069 Com_Multi(pro0_p2,pro1Vp2,tpro_p2); Com_Multi(tpro_p2,pro1_1,pro_12);
2070 Com_Multi(pro0_m2,pro1Vm2,tpro_m2); Com_Multi(tpro_m2,pro1_1,pro_13);
2071
2072 amp_tmp1[0] =-1*(temp_PDF11*pro_11[0]) + temp_PDF12*pro_12[0] + temp_PDF13*pro_13[0];
2073 amp_tmp1[1] =-1*(temp_PDF11*pro_11[1]) + temp_PDF12*pro_12[1] + temp_PDF13*pro_13[1];
2074 amp_tmp2[0] =-1*(temp_PDF21*pro_21[0]) + temp_PDF22*pro_22[0] + temp_PDF23*pro_23[0];
2075 amp_tmp2[1] =-1*(temp_PDF21*pro_21[1]) + temp_PDF22*pro_22[1] + temp_PDF23*pro_23[1];
2076 }
2077
2078 else if (modetype[i]==4){
2079 if(g2[i]==0)
2080 {
2081 if(B1_omega10==-1) {
2082 B1_omega10=BarrierN(1,sb1omega1,sb1rho01,sPi01,rRes2,mass2[i]);
2083 B1_omega1p=BarrierN(1,sb1omega1,sb1rhop1,sPim,rRes2,mass2[i]);
2084 B1_omega1m=BarrierN(1,sb1omega1,sb1rhom1,sPip,rRes2,mass2[i]);
2085
2086 B1_omega20=BarrierN(1,sb1omega2,sb1rho02,sPi02,rRes2,mass2[i]);
2087 B1_omega2p=BarrierN(1,sb1omega2,sb1rhop2,sPim,rRes2,mass2[i]);
2088 B1_omega2m=BarrierN(1,sb1omega2,sb1rhom2,sPip,rRes2,mass2[i]);
2089
2090 }
2091
2092 if(B1_D0_b1==-1) {
2093 B1_D0_b1=BarrierN(1,sD0,sb101,sKs,rDs2,mD0M);
2094 B1_D0_b2=BarrierN(1,sD0,sb102,sKs,rDs2,mD0M);
2095 }
2096
2097 if(B1_b1_rho==-1) {
2098 B1_b1_rho10=BarrierN(1,sb1rho01,sPip,sPim,rRes2,0.77526);
2099 B1_b1_rho1p=BarrierN(1,sb1rhop1,sPip,sPi01,rRes2,0.77526);
2100 B1_b1_rho1m=BarrierN(1,sb1rhom1,sPi01,sPim,rRes2,0.77526);
2101
2102 B1_b1_rho20=BarrierN(1,sb1rho02,sPip,sPim,rRes2,0.77526);
2103 B1_b1_rho2p=BarrierN(1,sb1rhop2,sPip,sPi01,rRes2,0.77526);
2104 B1_b1_rho2m=BarrierN(1,sb1rhom2,sPi02,sPim,rRes2,0.77526);
2105
2106 }
2107
2108 calt1(Pip,Pim,t1b1rho01); calt1(Pip,Pim,t1b1rho02);
2109 calt1(Pip,Pi01,t1b1rhop1); calt1(Pip,Pi02,t1b1rhop2);
2110 calt1(Pi01,Pim,t1b1rhom1);calt1(Pi02,Pim,t1b1rhom2);
2111 calt1(pb1rho01,Pi01,t1b1omega01);
2112 calt1(pb1rho02,Pi02,t1b1omega02);
2113 calt1(pb1rhop1,Pim,t1b1omegap1);
2114 calt1(pb1rhop2,Pim,t1b1omegap2);
2115 calt1(pb1rhom1,Pip,t1b1omegam1);
2116 calt1(pb1rhom2,Pip,t1b1omegam2);
2117 calt1(pb101,PKs,t1D0_b1);
2118 calt1(pb102,PKs,t1D0_b2);
2119 calG2(pb1omega1,Pi02,p1b1_1);
2120 calG2(pb1omega2,Pi01,p1b1_2);
2121 calG2(pb1rho01,Pi01,p1b1omega01);
2122 calG2(pb1rho02,Pi02,p1b1omega02);
2123 calG2(pb1rhop1,Pim,p1b1omegap1);
2124 calG2(pb1rhop2,Pim,p1b1omegap2);
2125 calG2(pb1rhom1,Pip,p1b1omegam1);
2126 calG2(pb1rhom2,Pip,p1b1omegam2);
2127
2128
2129 for(int i=0; i<4; i++)
2130 {
2131 for(int j=0; j<4; j++)
2132 {
2133 double tempomega1 = pb1omega1[j]*G[j][j]*G[i][i];
2134 double tempomega2 = pb1omega2[j]*G[j][j]*G[i][i];
2135
2136 for(int k=0; k<4; k++)
2137 {
2138 double temt1omega01 = t1b1omega01[k]*G[k][k];
2139 double temt1omega02 = t1b1omega02[k]*G[k][k];
2140 double temt1omegap1 = t1b1omegap1[k]*G[k][k];
2141 double temt1omegap2 = t1b1omegap2[k]*G[k][k];
2142 double temt1omegam1 = t1b1omegam1[k]*G[k][k];
2143 double temt1omegam2 = t1b1omegam2[k]*G[k][k];
2144
2145 for(int l=0; l<4; l++)
2146 {
2147 double temt1rho01 = t1b1rho01[l]*G[l][l]*E[i][j][k][l];
2148 double temt1rho02 = t1b1rho02[l]*G[l][l]*E[i][j][k][l];
2149 double temt1rhom2 = t1b1rhom2[l]*G[l][l]*E[i][j][k][l];
2150 double temt1rhop1 = t1b1rhop1[l]*G[l][l]*E[i][j][k][l];
2151 double temt1rhop2 = t1b1rhop2[l]*G[l][l]*E[i][j][k][l];
2152 double temt1rhom1 = t1b1rhom1[l]*G[l][l]*E[i][j][k][l];
2153
2154 for(int m=0; m<4; m++)
2155 {
2156 double temt1D0_b1 = t1D0_b1[m]*G[m][m];
2157 double temt1D0_b2 = t1D0_b2[m]*G[m][m];
2158
2159 for(int n=0; n<4; n++)
2160 {
2161
2162 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
2163 temp_PDF11 += temt1D0_b2*p1b1_2[m][n]*p1b1omega02[n][i]*tempomega2*temt1omega02*temt1rho02*G[n][n];
2164 temp_PDF12 += temt1D0_b2*p1b1_2[m][n]*p1b1omegap2[n][i]*tempomega2*temt1omegap2*temt1rhop2*G[n][n];
2165 temp_PDF13 += temt1D0_b2*p1b1_2[m][n]*p1b1omegam2[n][i]*tempomega2*temt1omegam2*temt1rhom2*G[n][n];
2166 temp_PDF21 += temt1D0_b1*p1b1_1[m][n]*p1b1omega01[n][i]*tempomega1*temt1omega01*temt1rho01*G[n][n];
2167 temp_PDF22 += temt1D0_b1*p1b1_1[m][n]*p1b1omegap1[n][i]*tempomega1*temt1omegap1*temt1rhop1*G[n][n];
2168 temp_PDF23 += temt1D0_b1*p1b1_1[m][n]*p1b1omegam1[n][i]*tempomega1*temt1omegam1*temt1rhom1*G[n][n];
2169 }
2170 }
2171 }
2172 }
2173 }
2174 }
2175 temp_PDF11 = temp_PDF11*B1_D0_b2*B1_omega20*B1_rho20;
2176 temp_PDF12 = temp_PDF12*B1_D0_b2*B1_omega2p*B1_rho2p;
2177 temp_PDF13 = temp_PDF13*B1_D0_b2*B1_omega2m*B1_rho2m;
2178 temp_PDF21 = temp_PDF21*B1_D0_b1*B1_omega10*B1_rho10;
2179 temp_PDF22 = temp_PDF22*B1_D0_b1*B1_omega1p*B1_rho1p;
2180 temp_PDF23 = temp_PDF23*B1_D0_b1*B1_omega1m*B1_rho1m;
2181 }
2182 else if(g2[i]==2)
2183 {
2184 if(B1_omega10==-1) {
2185
2186 B1_omega10=BarrierN(1,sb1omega1,sb1rho01,sPi01,rRes2,mass2[i]);
2187 B1_omega1p=BarrierN(1,sb1omega1,sb1rhop1,sPim,rRes2,mass2[i]);
2188 B1_omega1m=BarrierN(1,sb1omega1,sb1rhom1,sPip,rRes2,mass2[i]);
2189
2190 B1_omega20=BarrierN(1,sb1omega2,sb1rho02,sPi02,rRes2,mass2[i]);
2191 B1_omega2p=BarrierN(1,sb1omega2,sb1rhop2,sPim,rRes2,mass2[i]);
2192 B1_omega2m=BarrierN(1,sb1omega2,sb1rhom2,sPip,rRes2,mass2[i]);
2193 }
2194
2195 if(B1_D0_b1==-1) {
2196 B1_D0_b1=BarrierN(1,sD0,sb101,sKs,rDs2,mD0M);
2197 B1_D0_b2=BarrierN(1,sD0,sb102,sKs,rDs2,mD0M);
2198 }
2199
2200 if(B2_b1_1==-1) {
2201 B2_b1_1=BarrierN(2,sb101,sb1omega1,sPi02,rRes2,mass1[i]);
2202 B2_b1_2=BarrierN(2,sb102,sb1omega2,sPi01,rRes2,mass1[i]);
2203 }
2204
2205 if(B1_b1_rho==-1) {
2206 B1_b1_rho10=BarrierN(1,sb1rho01,sPip,sPim,rRes2,0.77526);
2207 B1_b1_rho1p=BarrierN(1,sb1rhop1,sPip,sPi01,rRes2,0.77526);
2208 B1_b1_rho1m=BarrierN(1,sb1rhom1,sPi01,sPim,rRes2,0.77526);
2209
2210 B1_b1_rho20=BarrierN(1,sb1rho02,sPip,sPim,rRes2,0.77526);
2211 B1_b1_rho2p=BarrierN(1,sb1rhop2,sPip,sPi01,rRes2,0.77526);
2212 B1_b1_rho2m=BarrierN(1,sb1rhom2,sPi02,sPim,rRes2,0.77526);
2213
2214 }
2215
2216 calt1(Pip,Pi01,t1b1rhop1); calt1(Pip,Pi02,t1b1rhop2);
2217 calt1(Pi01,Pim,t1b1rhom1);calt1(Pi02,Pim,t1b1rhom2);
2218 calt1(Pip,Pim,t1b1rho01); calt1(Pip,Pim,t1b1rho02);
2219 calt1(pb1rho01,Pi01,t1b1omega01);
2220 calt1(pb1rho02,Pi02,t1b1omega02);
2221 calt1(pb1rhop1,Pim,t1b1omegap1);
2222 calt1(pb1rhop2,Pim,t1b1omegap2);
2223 calt1(pb1rhom1,Pip,t1b1omegam1);
2224 calt1(pb1rhom2,Pip,t1b1omegam2);
2225 calt1(pb101,PKs,t1D0_b1);
2226 calt1(pb102,PKs,t1D0_b2);
2227 calG2(pb1omega1,Pi02,p1b1_1);
2228 calG2(pb1omega2,Pi01,p1b1_2);
2229 calG2(pb1rho01,Pi01,p1b1omega01);
2230 calG2(pb1rho02,Pi02,p1b1omega02);
2231 calG2(pb1rhop1,Pim,p1b1omegap1);
2232 calG2(pb1rhop2,Pim,p1b1omegap2);
2233 calG2(pb1rhom1,Pip,p1b1omegam1);
2234 calG2(pb1rhom2,Pip,p1b1omegam2);
2235 calt2(pb1omega1,Pi02,t2b1_1);
2236 calt2(pb1omega2,Pi01,t2b1_2);
2237
2238 for(int i=0; i<4; i++)
2239 {
2240 for(int j=0; j<4; j++)
2241 {
2242 double tempomega1 = pb1omega1[j]*G[j][j]*G[i][i];
2243 double tempomega2 = pb1omega2[j]*G[j][j]*G[i][i];
2244
2245 for(int k=0; k<4; k++)
2246 {
2247 double temt1omega01 = t1b1omega01[k]*G[k][k];
2248 double temt1omega02 = t1b1omega02[k]*G[k][k];
2249 double temt1omegap1 = t1b1omegap1[k]*G[k][k];
2250 double temt1omegap2 = t1b1omegap2[k]*G[k][k];
2251 double temt1omegam1 = t1b1omegam1[k]*G[k][k];
2252 double temt1omegam2 = t1b1omegam2[k]*G[k][k];
2253
2254 for(int l=0; l<4; l++)
2255 {
2256 double temt1rho01 = t1b1rho01[l]*G[l][l]*E[i][j][k][l];
2257 double temt1rho02 = t1b1rho02[l]*G[l][l]*E[i][j][k][l];
2258 double temt1rhop1 = t1b1rhop1[l]*G[l][l]*E[i][j][k][l];
2259 double temt1rhop2 = t1b1rhop2[l]*G[l][l]*E[i][j][k][l];
2260 double temt1rhom1 = t1b1rhom1[l]*G[l][l]*E[i][j][k][l];
2261 double temt1rhom2 = t1b1rhom2[l]*G[l][l]*E[i][j][k][l];
2262
2263 for(int m=0; m<4; m++)
2264 {
2265 double temt1D0_b1 = t1D0_b1[m]*G[m][m];
2266 double temt1D0_b2 = t1D0_b2[m]*G[m][m];
2267
2268 for(int n=0; n<4; n++)
2269 {
2270 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
2271 temp_PDF11 += temt1D0_b2*t2b1_2[m][n]*p1b1omega02[n][i]*tempomega2*temt1omega02*temt1rho02*G[n][n];
2272 temp_PDF12 += temt1D0_b2*t2b1_2[m][n]*p1b1omegap2[n][i]*tempomega2*temt1omegap2*temt1rhop2*G[n][n];
2273 temp_PDF13 += temt1D0_b2*t2b1_2[m][n]*p1b1omegam2[n][i]*tempomega2*temt1omegam2*temt1rhom2*G[n][n];
2274 temp_PDF21 += temt1D0_b1*t2b1_1[m][n]*p1b1omega01[n][i]*tempomega1*temt1omega01*temt1rho01*G[n][n];
2275 temp_PDF22 += temt1D0_b1*t2b1_1[m][n]*p1b1omegap1[n][i]*tempomega1*temt1omegap1*temt1rhop1*G[n][n];
2276 temp_PDF23 += temt1D0_b1*t2b1_1[m][n]*p1b1omegam1[n][i]*tempomega1*temt1omegam1*temt1rhom1*G[n][n];
2277 }
2278 }
2279 }
2280 }
2281 }
2282 }
2283 /* temp_PDF11 = 0.5187*temp_PDF11*B1_D0_b1*B2_b1_2*B1_omega20*B1_V02;
2284 temp_PDF12 = 0.5187*temp_PDF12*B1_D0_b1*B2_b1_2*B1_omega2p*B1_Vp2;
2285 temp_PDF13 = 0.5187*temp_PDF13*B1_D0_b1*B2_b1_2*B1_omega2m*B1_Vm2;
2286
2287 temp_PDF21 = 0.5187*temp_PDF21*B1_D0_b1*B2_b1_1*B1_omega10*B1_V01;
2288 temp_PDF22 = 0.5187*temp_PDF22*B1_D0_b1*B2_b1_1*B1_omega1p*B1_Vp1;
2289 temp_PDF23 = 0.5187*temp_PDF23*B1_D0_b1*B2_b1_1*B1_omega1m*B1_Vm1;
2290 */
2291
2292 temp_PDF11 = temp_PDF11*B1_D0_b2*B2_b1_2*B1_omega20*B1_rho20;
2293 temp_PDF12 = temp_PDF12*B1_D0_b2*B2_b1_2*B1_omega2p*B1_rho2p;
2294 temp_PDF13 = temp_PDF13*B1_D0_b2*B2_b1_2*B1_omega2m*B1_rho2m;
2295
2296 temp_PDF21 = temp_PDF21*B1_D0_b1*B2_b1_1*B1_omega10*B1_rho10;
2297 temp_PDF22 = temp_PDF22*B1_D0_b1*B2_b1_1*B1_omega1p*B1_rho1p;
2298 temp_PDF23 = temp_PDF23*B1_D0_b1*B2_b1_1*B1_omega1m*B1_rho1m;
2299
2300 }
2301 if(g0[i]==1) { //b1 omega
2302
2303 propagatorRBW(mass1sq,mass1[i],width1[i],sb101,sb1omega1,sPi02,rRes2,g2[i],prob1_1);
2304 propagatorRBW(mass1sq,mass1[i],width1[i],sb102,sb1omega2,sPi01,rRes2,g2[i],prob1_2);
2305
2306 } else if(g0[i]==0) {
2307 prob1_1[0] = 1; prob1_1[1] = 0;
2308 prob1_2[0] = 1; prob1_2[1] = 0;
2309 }
2310 if(g1[i]==1) { // omega--rho
2311
2312
2313 propagator(mass2sq,mass2[i],width2[i],sb1omega1,pro1_01);//ome1--rho0 pi01
2314 propagator(mass2sq,mass2[i],width2[i],sb1omega1,pro1_p1);//ome1--rhop (pi01)
2315 propagator(mass2sq,mass2[i],width2[i],sb1omega1,pro1_m1);//ome1--rhom (pi01)
2316 propagator(mass2sq,mass2[i],width2[i],sb1omega2,pro1_02);//ome2--rho0 pi02
2317 propagator(mass2sq,mass2[i],width2[i],sb1omega2,pro1_p2);//ome2--rhop (pi02)
2318 propagator(mass2sq,mass2[i],width2[i],sb1omega2,pro1_m2);
2319
2320 }
2321
2322 else if(g1[i]==0) {
2323
2324 pro1_01[0] = 1; pro1_01[1] = 0; pro1_p1[0] = 1; pro1_p1[1] = 0; pro1_m1[0] = 1; pro1_m1[1] = 0;
2325 pro1_02[0] = 1; pro1_02[1] = 0; pro1_p2[0] = 1; pro1_p2[1] = 0; pro1_m2[0] = 1; pro1_m2[1] = 0;
2326
2327 }
2328
2329 Com_Multi(prob1_1,pro1_01,tpro1_01); //10
2330 Com_Multi(prob1_1,pro1_p1,tpro1_p1); //1p
2331 Com_Multi(prob1_1,pro1_m1,tpro1_m1); //1m
2332
2333 Com_Multi(prob1_2,pro1_02,tpro1_02); //20
2334 Com_Multi(prob1_2,pro1_p2,tpro1_p2); //2p
2335 Com_Multi(prob1_2,pro1_m2,tpro1_m2); //2m
2336
2337 propagatorGS(0.60102807,0.77526,0.1478,sb1rho01,sPip,sPim,rRes2,pro4V01);
2338 propagatorGS(0.60102807,0.77526,0.1478,sb1rho02,sPip,sPim,rRes2,pro4V02);
2339 propagatorGS(0.60102807,0.77526,0.1478,sb1rhop1,sPip,sPi01,rRes2,pro4Vp1);
2340 propagatorGS(0.60102807,0.77526,0.1478,sb1rhop2,sPip,sPi02,rRes2,pro4Vp2);
2341 propagatorGS(0.60102807,0.77526,0.1478,sb1rhom1,sPi01,sPim,rRes2,pro4Vm1);
2342 propagatorGS(0.60102807,0.77526,0.1478,sb1rhom2,sPi02,sPim,rRes2,pro4Vm2);
2343
2344
2345
2346 Com_Multi(tpro1_01,pro4V01,pro1_21);//10
2347 Com_Multi(tpro1_p1,pro4Vp1,pro1_22);//1p
2348 Com_Multi(tpro1_m1,pro4Vm1,pro1_23);//1m
2349
2350 Com_Multi(tpro1_02,pro4V02,pro1_11);//20
2351 Com_Multi(tpro1_p2,pro4Vp2,pro1_12);//2p
2352 Com_Multi(tpro1_m2,pro4Vm2,pro1_13);//2m
2353
2354 amp_tmp1[0] = -1*(temp_PDF11*pro1_11[0]) + temp_PDF12*pro1_12[0] + temp_PDF13*pro1_13[0];//b1--omega2
2355 amp_tmp1[1] = -1*(temp_PDF11*pro1_11[1]) + temp_PDF12*pro1_12[1] + temp_PDF13*pro1_13[1];
2356 amp_tmp2[0] = -1*(temp_PDF21*pro1_21[0]) + temp_PDF22*pro1_22[0] + temp_PDF23*pro1_23[0];//b1--omega1
2357 amp_tmp2[1] = -1*(temp_PDF21*pro1_21[1]) + temp_PDF22*pro1_22[1] + temp_PDF23*pro1_23[1];
2358 }
2359
2360 else if(modetype[i]==18){
2361 if(g2[i]==1020){ //0101---SS
2362
2363 if(B1_kstm1==-1){
2364 B1_kstm1 = BarrierN(1,skstm1,sKs,sPim,rRes2,mass2[i]); //m2==kst Fn(kst)
2365 B1_kstm2 = BarrierN(1,skstm2,sKs,sPim,rRes2,mass2[i]);
2366 }
2367 if(B1_a1prhop1==-1){
2368 B1_a1prhop1 = BarrierN(1,sa1prhop1,sPip,sPi01,rRes2,0.77526); //m2==kst Fn(kst)
2369 B1_a1prhop2 = BarrierN(1,sa1prhop2,sPip,sPi02,rRes2,0.77526);
2370 }
2371 //P(a1)
2372 calG2(pa1prhop1,Pi02,p1a1p_1);
2373 calG2(pa1prhop2,Pi01,p1a1p_2);
2374 calt1(PKs,Pim,t1kstm1);
2375 calt1(PKs,Pim,t1kstm2);
2376 calt1(Pip,Pi01,t1a1prhop1);
2377 calt1(Pip,Pi02,t1a1prhop2);
2378 //t1rhop1 t1rhop2
2379
2380 for(int i=0; i<4; i++)
2381 {
2382 double t1_a1p_rhop1 = t1a1prhop1[i]*G[i][i];
2383 double t1_a1p_rhop2 = t1a1prhop2[i]*G[i][i];
2384
2385 for(int j=0; j<4; j++)
2386 {
2387 temp_PDF1 += t1_a1p_rhop1*t1kstm1[j]*G[j][j]*p1a1p_1[i][j];
2388 temp_PDF2 += t1_a1p_rhop2*t1kstm2[j]*G[j][j]*p1a1p_2[i][j];
2389 }
2390
2391 }
2392
2393 temp_PDF1 = temp_PDF1*B1_kstm1*B1_a1prhop1;
2394 temp_PDF2 = temp_PDF2*B1_kstm2*B1_a1prhop2;
2395
2396 }
2397/////////////////////////////SD
2398 else if(g2[i]==1022){
2399 if(B1_kstm==-1){
2400 B1_kstm1 = BarrierN(1,skstm1,sKs,sPim,rRes2,mass2[i]); //m2==kst Fn(kst)
2401 B1_kstm2 = BarrierN(1,skstm2,sKs,sPim,rRes2,mass2[i]);
2402 }
2403 if(B2_a1p_rhop1==-1){
2404 B2_a1p_rhop1 = BarrierN(2,sa1p,srhop1,sPi02,rRes2,mass1[i]);
2405 B2_a1p_rhop2 = BarrierN(2,sa1p,srhop2,sPi01,rRes2,mass1[i]);
2406 }
2407
2408 calt1(PKs,Pim,t1kstm1);
2409 calt1(PKs,Pim,t1kstm2);
2410 calt2(prhop1,Pi02,t2_a1p1);
2411 calt2(prhop2,Pi01,t2_a1p2);
2412 calt1(Pip,Pi01,t1rhop1);
2413 calt1(Pip,Pi02,t1rhop2);
2414 //t1rhop1 t1rhop2
2415
2416
2417 for(int i=0; i<4; i++)
2418 {
2419 double t1_a1p_rhop1 = t1rhop1[i]*G[i][i];
2420 double t1_a1p_rhop2 = t1rhop2[i]*G[i][i];
2421
2422 for(int j=0; j<4; j++)
2423 {
2424 temp_PDF1 += t1_a1p_rhop1*t1kstm1[j]*G[j][j]*t2_a1p1[j][i];
2425 temp_PDF2 += t1_a1p_rhop2*t1kstm2[j]*G[j][j]*t2_a1p2[j][i];
2426 }
2427
2428 }
2429 temp_PDF1 = temp_PDF1*B1_kstm1*B1_Vp1*B2_a1p_rhop1;
2430 temp_PDF2 = temp_PDF2*B1_kstm2*B1_Vp2*B2_a1p_rhop2;
2431
2432 }
2433
2434 else if(g2[i]==1120){
2435 if(B1_D0_a1pkstm==-1){
2436 B1_D0_a1pkstm1 = BarrierN(1,sD0,sa1p1,skstm1,rDs2,mD0M);
2437 B1_D0_a1pkstm2 = BarrierN(1,sD0,sa1p2,skstm2,rDs2,mD0M);
2438 }
2439
2440 if(B1_kstm==-1){
2441 B1_kstm1 = BarrierN(1,skstm1,sKs,sPim,rRes2,mass2[i]); //m2==kst Fn(kst)
2442 B1_kstm2 = BarrierN(1,skstm2,sKs,sPim,rRes2,mass2[i]);
2443 }
2444 if(B1_a1prhop1==-1){
2445 B1_a1prhop1 = BarrierN(1,sa1prhop1,sPip,sPi01,rRes2,0.77526); //m2==kst Fn(kst)
2446 B1_a1prhop2 = BarrierN(1,sa1prhop2,sPip,sPi02,rRes2,0.77526);
2447 }
2448 //B1_Vp1 B1_Vp2--rho+
2449
2450 //Sn
2451 calt1(PKs,Pim,t1kstm1);
2452 calt1(PKs,Pim,t1kstm2);
2453 //t1rhop1 t1rhop2
2454 calt1(pa1p1,pkstm1,t1D0_a1p1);
2455 calt1(pa1p2,pkstm2,t1D0_a1p2);
2456 calt1(Pip,Pi01,t1a1prhop1);
2457 calt1(Pip,Pi02,t1a1prhop2);
2458
2459 //P
2460 calG2(pa1prhop1,Pi02,p1a1p_1);
2461 calG2(pa1prhop2,Pi01,p1a1p_2);
2462
2463 for(int i=0; i<4; i++)
2464 {
2465 double t1_a1p_kstm1 = t1kstm1[i]*G[i][i];
2466 double t1_a1p_kstm2 = t1kstm2[i]*G[i][i];
2467 for(int j=0; j<4; j++)
2468 {
2469 double t1_a1p_rhop1 = t1a1prhop1[j]*G[j][j];
2470 double t1_a1p_rhop2 = t1a1prhop2[i]*G[j][j];
2471
2472 for(int k=0; k<4; k++)
2473 {
2474 double t1_D0_a1pkstm1 = t1D0_a1p1[k]*G[k][k];
2475 double t1_D0_a1pkstm2 = t1D0_a1p2[k]*G[k][k];
2476
2477 for(int l=0; l<4; l++)
2478 {
2479 double pD0_a1pkstm1 = pD0[l]*G[l][l];
2480 double pD0_a1pkstm2 = pD0[l]*G[l][l];
2481
2482 for(int m=0; m<4; m++)
2483 {
2484 temp_PDF1 += t1_a1p_rhop1*t1_a1p_kstm1*t1_D0_a1pkstm1*pD0_a1pkstm1*p1a1p_1[m][j]*G[m][m]*E[i][k][l][m];
2485 temp_PDF2 += t1_a1p_rhop2*t1_a1p_kstm2*t1_D0_a1pkstm2*pD0_a1pkstm2*p1a1p_2[m][j]*G[m][m]*E[i][k][l][m];
2486 }
2487 }
2488 }
2489 }
2490 }
2491 temp_PDF1 = temp_PDF1*B1_D0_a1pkstm1*B1_kstm1*B1_a1prhop1;
2492 temp_PDF2 = temp_PDF2*B1_D0_a1pkstm2*B1_kstm2*B1_a1prhop2;
2493 }
2494
2495 else if(g2[i]==1122){//1121
2496 if(B1_D0_a1pkstm==-1){
2497 B1_D0_a1pkstm = BarrierN(1,sD0,sa1p,skstm,rDs2,mD0M);
2498 }
2499
2500 if(B1_kstm==-1){
2501 B1_kstm = BarrierN(1,skstm,sKs,sPim,rRes2,mass2[i]); //m2==kst Fn(kst)
2502 }
2503 //B1_Vp1 B1_Vp2--rho+
2504 if(B2_a1p_rhop1==-1){
2505 B2_a1p_rhop1 = BarrierN(2,sa1p,srhop1,sPi02,rRes2,mass1[i]);
2506 B2_a1p_rhop2 = BarrierN(2,sa1p,srhop2,sPi01,rRes2,mass1[i]);
2507 }
2508
2509 calt1(PKs,Pim,t1kstm);
2510 calt1(pa1p,pkstm,t1D0_a1p);
2511 //t1rhop1 t1rhop2
2512 calt2(pa1prhop1,Pi02,t2_a1p1);
2513 calt2(pa1prhop2,Pi01,t2_a1p2);
2514 calt1(Pip,Pi01,t1rhop1);
2515 calt1(Pip,Pi02,t1rhop2);
2516
2517
2518 for(int i=0; i<4; i++)
2519 {
2520 double t1_a1p_rhop1 = t1rhop1[i]*G[i][i];
2521 double t1_a1p_rhop2 = t1rhop2[i]*G[i][i];
2522
2523 for(int j=0; j<4; j++)
2524 {
2525 double t1_a1p_kstm = t1kstm[j]*G[j][j];
2526
2527 for(int k=0; k<4; k++)
2528 {
2529 double t1_D0_a1pkstm = t1D0_a1p[k]*G[k][k];
2530
2531 for(int l=0; l<4; l++)
2532 {
2533 double pD0_a1pkstm = pD0[l]*G[l][l];
2534
2535 for(int m=0; m<4; m++)
2536 {
2537 temp_PDF1 += t1_a1p_rhop1*t1_a1p_kstm*t1_D0_a1pkstm*pD0_a1pkstm*t2_a1p1[m][j]*G[m][m]*E[i][k][l][m];
2538 temp_PDF2 += t1_a1p_rhop2*t1_a1p_kstm*t1_D0_a1pkstm*pD0_a1pkstm*t2_a1p2[m][j]*G[m][m]*E[i][k][l][m];
2539 }
2540 }
2541 }
2542 }
2543 }
2544
2545 temp_PDF1 = temp_PDF1*B1_D0_a1pkstm*B1_kstm*B1_Vp1*B2_a1p_rhop1;
2546 temp_PDF2 = temp_PDF2*B1_D0_a1pkstm*B1_kstm*B1_Vp2*B2_a1p_rhop2;
2547
2548 }
2549
2550
2551 else if(g2[i]==1220){//2101
2552 if(B2_D0_a1pkstm1==-1){
2553 B2_D0_a1pkstm1 = BarrierN(2,sD0,sa1p1,skstm1,rDs2,mD0M);
2554 B2_D0_a1pkstm2 = BarrierN(2,sD0,sa1p2,skstm2,rDs2,mD0M);
2555 }
2556 if(B1_kstm==-1){
2557 B1_kstm1 = BarrierN(1,skstm1,sKs,sPim,rRes2,mass2[i]); //m2==kst Fn(kst)
2558 B1_kstm2 = BarrierN(1,skstm2,sKs,sPim,rRes2,mass2[i]);
2559 }
2560 if(B1_a1prhop1==-1){
2561 B1_a1prhop1 = BarrierN(1,sa1prhop1,sPip,sPi01,rRes2,0.77526); //m2==kst Fn(kst)
2562 B1_a1prhop2 = BarrierN(1,sa1prhop2,sPip,sPi02,rRes2,0.77526);
2563 }
2564 //B1_Vp1 B1_Vp2--rho+
2565
2566 calt1(PKs,Pim,t1kstm1);
2567 calt1(PKs,Pim,t1kstm2);
2568 //t1rhop1 t1rhop2
2569 calt2(pa1p1,pkstm1,t2D0_a1p1);
2570 calt2(pa1p2,pkstm2,t2D0_a1p2);
2571
2572 calG2(pa1prhop1,Pi02,p1a1p_1);
2573 calG2(pa1prhop2,Pi01,p1a1p_2);
2574 calt1(Pip,Pi01,t1a1prhop1);
2575 calt1(Pip,Pi02,t1a1prhop2);
2576
2577 for(int i=0; i<4;i++)
2578 {
2579 double t1_a1p_rhop1 = t1a1prhop1[i]*G[i][i];
2580 double t1_a1p_rhop2 = t1a1prhop2[i]*G[i][i];
2581
2582 for(int j=0; j<4; j++)
2583 {
2584 double t1_a1p_kstm1 = t1kstm1[j]*G[j][j];
2585 double t1_a1p_kstm2 = t1kstm2[j]*G[j][j];
2586
2587 for(int k=0; k<4; k++)
2588 {
2589 temp_PDF1 += t1_a1p_rhop1*t1_a1p_kstm1*t2D0_a1p1[k][i]*p1a1p_1[k][j];
2590 temp_PDF2 += t1_a1p_rhop2*t1_a1p_kstm2*t2D0_a1p2[k][i]*p1a1p_2[k][j];
2591 }
2592 }
2593 }
2594
2595 temp_PDF1 = temp_PDF1*B2_D0_a1pkstm1*B1_kstm1*B1_a1prhop1;
2596 temp_PDF2 = temp_PDF2*B2_D0_a1pkstm2*B1_kstm2*B1_a1prhop2;
2597
2598 }
2599
2600 else if(g2[i]==1222){//2121
2601 if(B2_D0_a1pkstm==-1){
2602 B2_D0_a1pkstm = BarrierN(2,sD0,sa1p,skstm,rDs2,mD0M);
2603 }
2604 if(B1_kstm==-1){
2605 B1_kstm = BarrierN(1,skstm,sKs,sPim,rRes2,mass2[i]); //m2==kst Fn(kst)
2606 }
2607 if(B2_a1p_rhop1==-1){
2608 B2_a1p_rhop1 = BarrierN(2,sa1p,srhop1,sPi02,rRes2,mass1[i]);
2609 B2_a1p_rhop2 = BarrierN(2,sa1p,srhop2,sPi01,rRes2,mass1[i]);
2610 }
2611 //B1_Vp1 B1_Vp2--rho+
2612
2613
2614 calt2(pa1p,pkstm,t2D0_a1p);
2615 calt1(PKs,Pim,t1kstm);
2616 calt2(prhop1,Pi02,t2_a1p1);
2617 calt2(prhop2,Pi01,t2_a1p2);
2618 //t1rhop1 t1rhop2
2619 calt1(Pip,Pi01,t1rhop1);
2620 calt1(Pip,Pi02,t1rhop2);
2621
2622 for(int i=0; i<4;i++)
2623 {
2624 double t1_a1p_rhop1 = t1rhop1[i]*G[i][i];
2625 double t1_a1p_rhop2 = t1rhop2[i]*G[i][i];
2626
2627 for(int j=0; j<4; j++)
2628 {
2629 double t1_a1p_kstm = t1kstm[j]*G[j][j];
2630
2631 for(int k=0; k<4; k++)
2632 {
2633 temp_PDF1 += t1_a1p_rhop1*t1_a1p_kstm*t2D0_a1p[k][i]*t2_a1p1[k][j]*G[k][k];
2634 temp_PDF2 += t1_a1p_rhop2*t1_a1p_kstm*t2D0_a1p[k][i]*t2_a1p2[k][j]*G[k][k];
2635 }
2636 }
2637 }
2638
2639 temp_PDF1 = temp_PDF1*B2_D0_a1pkstm*B1_kstm*B1_Vp1*B2_a1p_rhop1;
2640 temp_PDF2 = temp_PDF2*B2_D0_a1pkstm*B1_kstm*B1_Vp2*B2_a1p_rhop2;
2641
2642 }
2643
2644
2645 if(g0[i] == 1){//a1
2646 if(g2[i]==1020||g2[i]==1120||g2[i]==1220) {
2647 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa1p1,sa1prhop1,sPi02,rRes2,0,pro3_p1);
2648 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa1p2,sa1prhop2,sPi01,rRes2,0,pro3_p2);
2649 }
2650 else{
2651 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa1p1,sa1prhop1,sPi02,rRes2,2,pro3_p1);
2652 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa1p2,sa1prhop2,sPi01,rRes2,2,pro3_p2);
2653
2654 }
2655 propagatorGS(0.60102807,0.77526,0.1478,sa1prhop1,sPip,sPi01,rRes2,pro3_p11);
2656 propagatorGS(0.60102807,0.77526,0.1478,sa1prhop2,sPip,sPi02,rRes2,pro3_p12);
2657
2658 Com_Multi(pro3_p1,pro3_p11,pro3_111); Com_Multi(pro3_p2,pro3_p12,pro3_112);
2659
2660 }
2661 else if(g0[i]==0){
2662 pro3_p1[0] = 1; pro3_p1[1] = 0;
2663 pro3_p2[0] = 1; pro3_p2[1] = 0;
2664 }
2665
2666 //kst
2667 if(g1[i]==1){
2668 propagatorRBW(mass2sq,mass2[i],width2[i],skstm1,sKs,sPim,rRes2,1,pro3_1);//kst1
2669 propagatorRBW(mass2sq,mass2[i],width2[i],skstm2,sKs,sPim,rRes2,1,pro3_2);//kst1
2670 }
2671 else if(g1[i]==0){
2672 pro3_1[0] = 1; pro3_1[1] = 0;
2673 pro3_2[0] = 1; pro3_2[1] = 0;
2674 }
2675
2676
2677 Com_Multi(pro3_111,pro3_1,pro3_11); Com_Multi(pro3_112,pro3_2,pro3_12);
2678
2679 amp_tmp1[0] = temp_PDF1*pro3_11[0];
2680 amp_tmp1[1] = temp_PDF1*pro3_11[1];
2681 amp_tmp2[0] = temp_PDF2*pro3_12[0];
2682 amp_tmp2[1] = temp_PDF2*pro3_12[1];
2683 }
2684
2685 else if(modetype[i]==20){//a1_0 K*0 a1_0 to rho_0 pi0 K*0 to KS0 pi0 rho_0 to pi+ pi-
2686 if(g2[i]==1020){ //0101---SS
2687 if(B1_a10_kst0==-1){
2688 B1_kst1=BarrierN(1,skst1_20,sKs,sPi01,rRes2,mass2[i]);
2689 B1_kst2=BarrierN(1,skst2_20,sKs,sPi02,rRes2,mass2[i]);
2690 }
2691 if(B1_a10rhop1==-1){
2692 B1_a10rhop1 = BarrierN(1,sa1rhop1,sPip,sPi01,rRes2,0.77526); //m2==kst Fn(kst)
2693 B1_a10rhop2 = BarrierN(1,sa1rhop2,sPip,sPi02,rRes2,0.77526);
2694 }
2695 calt1(Pip,Pi01,t1a10rhop1); calt1(Pip,Pi02,t1a10rhop2);
2696 calt1(PKs,Pi01,t1a10kst1); calt1(PKs,Pi02,t1a10kst2);
2697 calG2(pa1rhop1,Pim,p1_a102);
2698 calG2(pa1rhop2,Pim,p2_a102);
2699 for(int i=0; i<4; i++)
2700 {
2701 double temt1rhop1 = t1a10rhop1[i]*G[i][i];
2702 double temt1rhop2 = t1a10rhop2[i]*G[i][i];
2703 for(int j=0; j<4; j++)
2704 {
2705 temp_PDF1 += temt1rhop2*t1a10kst1[j]*G[j][j]*p2_a102[i][j];
2706 temp_PDF2 += temt1rhop1*t1a10kst2[j]*G[j][j]*p1_a102[i][j];
2707 }
2708 }
2709
2710 temp_PDF1 = temp_PDF1*B1_kst1*B1_a10rhop2;
2711 temp_PDF2 = temp_PDF2*B1_kst2*B1_a10rhop1;
2712 }
2713/////////////////////////////SD
2714 else if(g2[i]==1022){
2715 if(B1_a10_kst0==-1){
2716 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
2717 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
2718 }
2719 if(B2_a10_rho==-1){
2720 B1_a11p=BarrierN(2,sa101,srhop1,sPim,rRes2,mass1[i]);
2721 B2_a12p=BarrierN(2,sa102,srhop2,sPim,rRes2,mass1[i]);
2722 }
2723 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
2724 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
2725
2726 calt2(prhop1,Pim,t1_a102);
2727 calt2(prhop2,Pim,t2_a102);
2728 //t1rhop1 t1rhop2
2729
2730 for(int i=0; i<4; i++)
2731 {
2732 double t1_a10_rhop1 = t1rhop1[i]*G[i][i];
2733 double t1_a10_rhop2 = t1rhop2[i]*G[i][i];
2734 for(int j=0; j<4; j++)
2735 {
2736 temp_PDF1 += t1_a10_rhop2*t1kst1[j]*G[j][j]*t2_a102[j][i];
2737 temp_PDF2 += t1_a10_rhop1*t1kst2[j]*G[j][j]*t1_a102[j][i];
2738 }
2739
2740 }
2741 temp_PDF1 = temp_PDF1*B1_kst1*B1_Vp2*B2_a12p;
2742 temp_PDF2 = temp_PDF2*B1_kst2*B1_Vp1*B1_a11p;
2743
2744 }
2745
2746 else if(g2[i]==1120){
2747 if(B1_D0_a10kst0==-1){
2748 B1_D0_a10kst01 = BarrierN(1,sD0,sa102_rhop,skst1_20,rDs2,mD0M);
2749 B1_D0_a10kst02 = BarrierN(1,sD0,sa101_rhop,skst2_20,rDs2,mD0M);
2750 }
2751 if(B1_a10_kst0==-1){
2752 B1_kst1=BarrierN(1,skst1_20,sKs,sPi01,rRes2,mass2[i]);
2753 B1_kst2=BarrierN(1,skst2_20,sKs,sPi02,rRes2,mass2[i]);
2754 }
2755 if(B1_a10rhop1==-1){
2756 B1_a10rhop1 = BarrierN(1,sa1rhop1,sPip,sPi01,rRes2,0.77526); //m2==kst Fn(kst)
2757 B1_a10rhop2 = BarrierN(1,sa1rhop2,sPip,sPi02,rRes2,0.77526);
2758 }
2759 //B1_Vp1 B1_Vp2--rho+
2760
2761 //t1rhop1 t1rhop2
2762 calt1(Pip,Pi01,t1a10rhop1); calt1(Pip,Pi02,t1a10rhop2);
2763 calt1(PKs,Pi01,t1a10kst1); calt1(PKs,Pi02,t1a10kst2);
2764 calt1(pa101_rhop,pkst2_20,t1D0_a101);
2765 calt1(pa102_rhop,pkst1_20,t1D0_a102);
2766
2767 //P
2768 calG2(pa1rhop1,Pim,p1a1p_1);
2769 calG2(pa1rhop2,Pim,p1a1p_2);
2770 for(int i=0; i<4; i++)
2771 {
2772
2773 double t1_a10_kst01 = t1a10kst1[i]*G[i][i];
2774 double t1_a10_kst02 = t1a10kst2[i]*G[i][i];
2775
2776
2777 for(int j=0; j<4; j++)
2778 {
2779
2780 double t1_a10_rhop1 = t1rhop1[j]*G[j][j];
2781 double t1_a10_rhop2 = t1rhop2[j]*G[j][j];
2782
2783 for(int k=0; k<4; k++)
2784 {
2785 double t1_D0_a10kst01 = t1D0_a101[k]*G[k][k];
2786 double t1_D0_a10kst02 = t1D0_a102[k]*G[k][k];
2787
2788 for(int l=0; l<4; l++)
2789 { double pD0_a10kst1 = pD0[l]*G[l][l];
2790 double pD0_a10kst2 = pD0[l]*G[l][l];
2791
2792 for(int m=0; m<4; m++)
2793 {
2794 temp_PDF1 += t1_a10_rhop2*t1_a10_kst01*t1_D0_a10kst02*pD0_a10kst2*p1a1p_2[m][j]*G[m][m]*E[i][k][l][m];
2795 temp_PDF2 += t1_a10_rhop1*t1_a10_kst02*t1_D0_a10kst01*pD0_a10kst1*p1a1p_1[m][j]*G[m][m]*E[i][k][l][m];
2796 }
2797 }
2798 }
2799 }
2800 }
2801 temp_PDF1 = temp_PDF1*B1_D0_a10kst01*B1_kst1*B1_a10rhop2;
2802 temp_PDF2 = temp_PDF2*B1_D0_a10kst02*B1_kst2*B1_a10rhop1;
2803
2804 }
2805
2806 else if(g2[i]==1122){//1121
2807 if(B1_D0_a10kst0==-1){
2808 B1_D0_a10kst01 = BarrierN(1,sD0,sa102,skst1,rDs2,mD0M);
2809 B1_D0_a10kst02 = BarrierN(1,sD0,sa101,skst2,rDs2,mD0M);
2810 }
2811
2812 if(B1_a10_kst0==-1){
2813 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
2814 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
2815 }
2816 //B1_Vp1 B1_Vp2--rho+
2817 if(B2_a10_rho==-1){
2818 B1_a11p=BarrierN(2,sa101,srhop1,sPim,rRes2,mass1[i]);
2819
2820 B2_a12p=BarrierN(2,sa102,srhop2,sPim,rRes2,mass1[i]);
2821 }
2822 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
2823 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
2824 calt1(pa101,pkst2,t1D0_a101);
2825 calt1(pa102,pkst1,t1D0_a102);
2826 //t1rhop1 t1rhop2
2827 calt2(prhop1,Pim,t1_a102);
2828 calt2(prhop2,Pim,t2_a102);
2829 for(int i=0; i<4; i++)
2830 {
2831 double t1_a10_rhop1 = t1rhop1[i]*G[i][i];
2832 double t1_a10_rhop2 = t1rhop2[i]*G[i][i];
2833
2834 for(int j=0; j<4; j++)
2835 {
2836 double t1_a10_kst01 = t1kst1[j]*G[j][j];
2837 double t1_a10_kst02 = t1kst2[j]*G[j][j];
2838 for(int k=0; k<4; k++)
2839 {
2840 double t1_D0_a101kst02 = t1D0_a101[k]*G[k][k];
2841 double t1_D0_a102kst01 = t1D0_a102[k]*G[k][k];
2842
2843 for(int l=0; l<4; l++)
2844 {
2845 double pD0_a10kst0 = pD0[l]*G[l][l];
2846
2847 for(int m=0; m<4; m++)
2848 {
2849 temp_PDF1 += t1_a10_rhop2*t1_a10_kst01*t1_D0_a101kst02*pD0_a10kst0*t2_a102[m][j]*G[m][m]*E[i][k][l][m];
2850 temp_PDF2 += t1_a10_rhop1*t1_a10_kst02*t1_D0_a102kst01*pD0_a10kst0*t1_a102[m][j]*G[m][m]*E[i][k][l][m];
2851 }
2852 }
2853 }
2854
2855 }
2856 }
2857 temp_PDF1 = temp_PDF1*B1_D0_a10kst01*B1_kst1*B1_Vp2*B2_a12p;
2858
2859 temp_PDF2 = temp_PDF2*B1_D0_a10kst02*B1_kst2*B1_Vp1*B1_a11p;
2860
2861 }
2862
2863 else if(g2[i]==1220){//2101
2864 if(B2_D0_a10kst0==-1){
2865 B2_D0_a10kst01 = BarrierN(2,sD0,sa102_rhop,skst1_20,rDs2,mD0M);
2866 B2_D0_a10kst02 = BarrierN(2,sD0,sa101_rhop,skst2_20,rDs2,mD0M);
2867 }
2868 if(B1_a10_kst0==-1){
2869 B1_kst1=BarrierN(1,skst1_20,sKs,sPi01,rRes2,mass2[i]);
2870 B1_kst2=BarrierN(1,skst2_20,sKs,sPi02,rRes2,mass2[i]);
2871 }
2872 //B1_Vp1 B1_Vp2--rho+
2873
2874 //t1rhop1 t1rhop2
2875 calt2(pa101_rhop,pkst2_20,t2D0_a101);
2876 calt2(pa102_rhop,pkst1_20,t2D0_a102);
2877 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
2878 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
2879
2880 calG2(pa1rhop1,Pim,p1a1p_1);
2881 calG2(pa1rhop2,Pim,p1a1p_2);
2882 for(int i=0; i<4;i++)
2883 {
2884 double t1_a10_rhop1 = t1rhop1[i]*G[i][i];
2885 double t1_a10_rhop2 = t1rhop2[i]*G[i][i];
2886
2887 for(int j=0; j<4; j++)
2888 {
2889 double t1_a10_kst01 = t1kst1[j]*G[j][j];
2890 double t1_a10_kst02 = t1kst2[j]*G[j][j];
2891
2892 for(int k=0; k<4; k++)
2893 {
2894 temp_PDF1 += t1_a10_rhop2*t1_a10_kst01*t2D0_a102[k][i]*p1a1p_2[k][i];
2895 temp_PDF2 += t1_a10_rhop1*t1_a10_kst02*t2D0_a101[k][i]*p1a1p_1[k][i];
2896 }
2897 }
2898 }
2899
2900 temp_PDF1 = temp_PDF1*B2_D0_a10kst01*B1_kst1*B1_Vp2;
2901 temp_PDF2 = temp_PDF2*B2_D0_a10kst02*B1_kst2*B1_Vp1;
2902
2903 }
2904
2905
2906
2907 else if(g2[i]==1222){//2121
2908 if(B2_D0_a10kst0==-1){
2909 B2_D0_a10kst01 = BarrierN(2,sD0,sa102,skst1,rDs2,mD0M);
2910 B2_D0_a10kst02 = BarrierN(2,sD0,sa101,skst2,rDs2,mD0M);
2911 }
2912 if(B1_a10_kst0==-1){
2913 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
2914 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
2915 }
2916 if(B2_a10_rho==-1){
2917 B1_a11p=BarrierN(2,sa101,srhop1,sPim,rRes2,mass1[i]);
2918 B2_a12p=BarrierN(2,sa102,srhop2,sPim,rRes2,mass1[i]);
2919 }
2920 //B1_Vp1 B1_Vp2--rho+
2921
2922
2923 calt2(pa101,pkst2,t2D0_a101);
2924 calt2(pa102,pkst1,t2D0_a102);
2925 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
2926 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
2927
2928 calt2(prhop1,Pim,t1_a102);
2929 calt2(prhop2,Pim,t2_a102);
2930 //t1rhop1 t1rhop2
2931
2932
2933 for(int i=0; i<4;i++)
2934 {
2935 double t1_a10_rhop1 = t1rhop1[i]*G[i][i];
2936 double t1_a10_rhop2 = t1rhop2[i]*G[i][i];
2937 for(int j=0; j<4; j++)
2938 {
2939 double t1_a10_kst01 = t1kst1[j]*G[j][j];
2940 double t1_a10_kst02 = t1kst2[j]*G[j][j];
2941
2942 for(int k=0; k<4; k++)
2943 {
2944 temp_PDF1 += t1_a10_rhop2*t1_a10_kst01*t2D0_a102[k][i]*t2_a102[k][j]*G[k][k];
2945 temp_PDF2 += t1_a10_rhop1*t1_a10_kst02*t2D0_a101[k][i]*t1_a102[k][j]*G[k][k];
2946 }
2947 }
2948 }
2949
2950 temp_PDF1 = temp_PDF1*B2_D0_a10kst01*B1_kst1*B1_Vp2*B2_a12p;
2951 temp_PDF2 = temp_PDF2*B2_D0_a10kst02*B1_kst2*B1_Vp1*B1_a11p;
2952
2953 }
2954
2955
2956 if(g0[i] == 1){//a1
2957 if(g2[i]==1020||g2[i]==1120||g2[i]==1220) {
2958 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa101_rhop,sa1rhop1,sPim,rRes2,0,pro4_p1);
2959 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa102_rhop,sa1rhop2,sPim,rRes2,0,pro4_p2);
2960 }
2961 else{
2962 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa101_rhop,sa1rhop1,sPim,rRes2,2,pro4_p1);
2963 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa102_rhop,sa1rhop2,sPim,rRes2,2,pro4_p2);
2964 }
2965
2966 propagatorGS(0.60102807,0.77526,0.1478,sa1rhop1,sPip,sPi01,rRes2,pro4_11);
2967 propagatorGS(0.60102807,0.77526,0.1478,sa1rhop2,sPip,sPi02,rRes2,pro4_12);
2968
2969 Com_Multi(pro4_p1,pro4_11,pro4_111); Com_Multi(pro4_p2,pro4_12,pro4_112);
2970 }
2971 else if(g0[i]==0){
2972 pro4_p1[0] = 1; pro4_p1[1] = 0;
2973 pro4_p2[0] = 1; pro4_p2[1] = 0;
2974 }
2975
2976
2977 if(g1[i]==1){
2978 propagatorRBW(mass2sq,mass2[i],width2[i],skst1_20,sKs,sPi01,rRes2,1,pro4_1);//kst1
2979 propagatorRBW(mass2sq,mass2[i],width2[i],skst2_20,sKs,sPi02,rRes2,1,pro4_2);//kst2
2980 }
2981 else if(g1[i]==0){
2982 pro4_1[0] = 1; pro4_1[1] = 0;
2983 pro4_2[0] = 1; pro4_2[1] = 0;
2984 }
2985
2986 Com_Multi(pro4_112,pro4_1,pro4_1112); Com_Multi(pro4_111,pro4_2,pro4_2222);//1p
2987
2988 amp_tmp1[0] = temp_PDF1*pro4_1112[0] ;//b1--omega2
2989 amp_tmp1[1] = temp_PDF1*pro4_1112[1] ;
2990 amp_tmp2[0] = temp_PDF2*pro4_2222[0] ;//b1--omega1
2991 amp_tmp2[1] = temp_PDF2*pro4_2222[1] ;
2992 }
2993 else if(modetype[i]==33){//a1_0 K*0 a1_0 to rho_0 pi0 K*0 to KS0 pi0 rho_0 to pi+ pi-
2994 if(g2[i]==1020){ //0101---SS
2995 if(B1_a10_kst==-1){
2996 B1_kst1=BarrierN(1,skst1_33,sKs,sPi01,rRes2,mass2[i]);
2997 B1_kst2=BarrierN(1,skst2_33,sKs,sPi02,rRes2,mass2[i]);
2998 }
2999 if(B1_a10rhom1==-1){
3000 B1_a10rhom1 = BarrierN(1,sa1rhom1,sPi01,sPim,rRes2,0.77526); //m2==kst Fn(kst)
3001 B1_a10rhom2 = BarrierN(1,sa1rhom2,sPi02,sPim,rRes2,0.77526);
3002 }
3003 //P(a1)
3004 calt1(PKs,Pi01,t1a10kst1); calt1(PKs,Pi02,t1a10kst2);
3005 calt1(Pi01,Pim,t1a10rhom1);calt1(Pi02,Pim,t1a10rhom2);
3006 calG2(pa1rhom1,Pip,p1_a103);
3007 calG2(pa1rhom2,Pip,p2_a103);
3008 // printf("shuchu1: %lf, %lf\n", t1kst1[0],p2_a102[0][0]);
3009 for(int i=0; i<4; i++)
3010 {
3011 double temt1rhom1 = t1a10rhom1[i]*G[i][i];
3012 double temt1rhom2 = t1a10rhom2[i]*G[i][i];
3013 for(int j=0; j<4; j++)
3014 {
3015 temp_PDF1 += temt1rhom2*t1a10kst1[j]*G[j][j]*p2_a103[i][j];
3016 temp_PDF2 += temt1rhom1*t1a10kst2[j]*G[j][j]*p1_a103[i][j];
3017 // printf("shuchu1: %lf, %lf\n", p2_a103[0][0],p1_a103[0][0]);
3018 }
3019
3020 }
3021 // printf("shuchu1: %lf, %lf\n", B1_kst1,B1_Vm2);
3022 temp_PDF1 = temp_PDF1*B1_kst1*B1_a10rhom2;
3023 temp_PDF2 = temp_PDF2*B1_kst2*B1_a10rhom1;
3024 }
3025 else if(g2[i]==1022){
3026 if(B1_a10_kst==-1){
3027 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
3028 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
3029 }
3030 if(B2_a10_rho==-1){
3031 B1_a11m=BarrierN(2,sa101,srhom1,sPip,rRes2,mass1[i]);
3032
3033 B2_a12m=BarrierN(2,sa102,srhom2,sPip,rRes2,mass1[i]);
3034 }
3035 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
3036 calt1(Pi01,Pim,t1rhom1);calt1(Pi02,Pim,t1rhom2);
3037 calt2(prhom1,Pip,t1_a103);
3038 calt2(prhom2,Pip,t2_a103);
3039 //t1rhop1 t1rhop2
3040
3041 for(int i=0; i<4; i++)
3042 {
3043 double t1_a10_rhom1 = t1rhom1[i]*G[i][i];
3044 double t1_a10_rhom2 = t1rhom2[i]*G[i][i];
3045 for(int j=0; j<4; j++)
3046 {
3047 temp_PDF1 += t1_a10_rhom2*t1kst1[j]*G[j][j]*t2_a103[j][i];
3048
3049 temp_PDF2 += t1_a10_rhom1*t1kst2[j]*G[j][j]*t1_a103[j][i];
3050 }
3051
3052 }
3053 temp_PDF1 = temp_PDF1*B1_kst1*B1_Vm2*B2_a12m;
3054 temp_PDF2 = temp_PDF2*B1_kst2*B1_Vm1*B1_a11m;
3055
3056 }
3057 else if(g2[i]==1120){
3058 if(B1_D0_a10kst0==-1){
3059 B1_D0_a10kst01 = BarrierN(1,sD0,sa102_rhom,skst1_33,rDs2,mD0M);
3060 B1_D0_a10kst02 = BarrierN(1,sD0,sa101_rhom,skst2_33,rDs2,mD0M);
3061 }
3062 if(B1_a10_kst==-1){
3063 B1_kst1=BarrierN(1,skst1_33,sKs,sPi01,rRes2,mass2[i]);
3064 B1_kst2=BarrierN(1,skst2_33,sKs,sPi02,rRes2,mass2[i]);
3065
3066 }
3067 if(B1_a10rhom1==-1){
3068 B1_a10rhom1 = BarrierN(1,sa1rhom1,sPi01,sPim,rRes2,0.77526); //m2==kst Fn(kst)
3069 B1_a10rhom2 = BarrierN(1,sa1rhom2,sPi02,sPim,rRes2,0.77526);
3070 }
3071 //B1_Vp1 B1_Vp2--rho+
3072
3073 //t1rhop1 t1rhop2
3074 calt1(pa101_rhom,pkst2_33,t1D0_a101);
3075 calt1(pa102_rhom,pkst1_33,t1D0_a102);
3076 calt1(PKs,Pi01,t1a10kst1); calt1(PKs,Pi02,t1a10kst2);
3077 calt1(Pi01,Pim,t1a10rhom1);calt1(Pi02,Pim,t1a10rhom2);
3078
3079 //P
3080 calG2(pa1rhom1,Pip,p1a1m_1);
3081 calG2(pa1rhom2,Pip,p1a1m_2);
3082 for(int i=0; i<4; i++)
3083 {
3084 double t1_a10_kst01 = t1a10kst1[i]*G[i][i];
3085 double t1_a10_kst02 = t1a10kst2[i]*G[i][i];
3086 for(int j=0; j<4; j++)
3087 {
3088 double t1_a10_rhom1 = t1a10rhom1[j]*G[j][j];
3089 double t1_a10_rhom2 = t1a10rhom2[j]*G[j][j];
3090 for(int k=0; k<4; k++)
3091 {
3092 double t1_D0_a10kst01 = t1D0_a101[k]*G[k][k];
3093 double t1_D0_a10kst02 = t1D0_a102[k]*G[k][k];
3094
3095 for(int l=0; l<4; l++)
3096 { double pD0_a10kst1 = pD0[l]*G[l][l];
3097 double pD0_a10kst2 = pD0[l]*G[l][l];
3098
3099 for(int m=0; m<4; m++)
3100 {
3101 temp_PDF1 += t1_a10_rhom2*t1_a10_kst01*t1_D0_a10kst02*pD0_a10kst2*p1a1m_2[m][j]*G[m][m]*E[i][k][l][m];
3102 temp_PDF2 += t1_a10_rhom1*t1_a10_kst02*t1_D0_a10kst01*pD0_a10kst1*p1a1m_1[m][j]*G[m][m]*E[i][k][l][m];
3103 }
3104 }
3105 }
3106 }
3107 }
3108 temp_PDF1 = temp_PDF1*B1_D0_a10kst01*B1_kst1*B1_a10rhom2;
3109 temp_PDF2 = temp_PDF2*B1_D0_a10kst02*B1_kst2*B1_a10rhom1;
3110
3111 }
3112 else if(g2[i]==1122){//1121
3113 if(B1_D0_a10kst0==-1){
3114 B1_D0_a10kst01 = BarrierN(1,sD0,sa102,skst1,rDs2,mD0M);
3115 B1_D0_a10kst02 = BarrierN(1,sD0,sa101,skst2,rDs2,mD0M);
3116 }
3117
3118 if(B1_a10_kst==-1){
3119 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
3120 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
3121 }
3122 //B1_Vp1 B1_Vp2--rho+
3123 if(B2_a10_rho==-1){
3124 B1_a11m=BarrierN(2,sa101,srhom1,sPip,rRes2,mass1[i]);
3125
3126 B2_a12m=BarrierN(2,sa102,srhom2,sPip,rRes2,mass1[i]);
3127 }
3128
3129 calt1(pa101,pkst2,t1D0_a101);
3130 calt1(pa102,pkst1,t1D0_a102);
3131 //t1rhop1 t1rhop2
3132 calt2(prhom1,Pip,t1_a102);
3133 calt2(prhom2,Pip,t2_a102);
3134 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
3135 calt1(Pi01,Pim,t1rhom1);calt1(Pi02,Pim,t1rhom2);
3136 for(int i=0; i<4; i++)
3137 {
3138 double t1_a10_rhom1 = t1rhom1[i]*G[i][i];
3139 double t1_a10_rhom2 = t1rhom2[i]*G[i][i];
3140
3141 for(int j=0; j<4; j++)
3142 {
3143 double t1_a10_kst01 = t1kst1[j]*G[j][j];
3144 double t1_a10_kst02 = t1kst2[j]*G[j][j];
3145 for(int k=0; k<4; k++)
3146 {
3147 double t1_D0_a101kst02 = t1D0_a101[k]*G[k][k];
3148 double t1_D0_a102kst01 = t1D0_a102[k]*G[k][k];
3149
3150 for(int l=0; l<4; l++)
3151 {
3152 double pD0_a10kst0 = pD0[l]*G[l][l];
3153
3154 for(int m=0; m<4; m++)
3155 {
3156 temp_PDF1 += t1_a10_rhom2*t1_a10_kst01*t1_D0_a101kst02*pD0_a10kst0*t2_a102[m][j]*G[m][m]*E[i][k][l][m];
3157 temp_PDF2 += t1_a10_rhom1*t1_a10_kst02*t1_D0_a102kst01*pD0_a10kst0*t1_a102[m][j]*G[m][m]*E[i][k][l][m];
3158 }
3159 }
3160 }
3161
3162 }
3163 }
3164 temp_PDF1 = temp_PDF1*B1_D0_a10kst01*B1_kst1*B1_Vm2*B2_a12m;
3165
3166 temp_PDF2 = temp_PDF2*B1_D0_a10kst02*B1_kst2*B1_Vm1*B1_a11m;
3167
3168 }
3169 else if(g2[i]==1220){//2101
3170 if(B2_D0_a10kst0==-1){
3171 B2_D0_a10kst01 = BarrierN(2,sD0,sa102_rhom,skst1_20,rDs2,mD0M);
3172 B2_D0_a10kst02 = BarrierN(2,sD0,sa101_rhom,skst2_20,rDs2,mD0M);
3173 }
3174 if(B1_a10_kst==-1){
3175 B1_kst1=BarrierN(1,skst1_20,sKs,sPi01,rRes2,mass2[i]);
3176 B1_kst2=BarrierN(1,skst2_20,sKs,sPi02,rRes2,mass2[i]);
3177 }
3178 //B1_Vp1 B1_Vp2--rho+
3179
3180 //t1rhop1 t1rhop2
3181 calt2(pa101_rhom,pkst2_33,t2D0_a101);
3182 calt2(pa102_rhom,pkst1_33,t2D0_a102);
3183
3184 calt1(Pi01,Pim,t1rhom1);calt1(Pi02,Pim,t1rhom2);
3185 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
3186
3187 calG2(pa1rhom1,Pip,p1a1m_1);
3188 calG2(pa1rhom2,Pip,p1a1m_2);
3189 for(int i=0; i<4;i++)
3190 {
3191 double t1_a10_rhom1 = t1rhom1[i]*G[i][i];
3192 double t1_a10_rhom2 = t1rhom2[i]*G[i][i];
3193
3194 for(int j=0; j<4; j++)
3195 {
3196 double t1_a10_kst01 = t1kst1[j]*G[j][j];
3197 double t1_a10_kst02 = t1kst2[j]*G[j][j];
3198
3199 for(int k=0; k<4; k++)
3200 {
3201 temp_PDF1 += t1_a10_rhom2*t1_a10_kst01*t2D0_a102[k][i]*p1a1m_2[k][i];
3202 temp_PDF2 += t1_a10_rhom1*t1_a10_kst02*t2D0_a101[k][i]*p1a1m_1[k][i];
3203 }
3204 }
3205 }
3206
3207 temp_PDF1 = temp_PDF1*B2_D0_a10kst01*B1_kst1*B1_Vm2;
3208 temp_PDF2 = temp_PDF2*B2_D0_a10kst02*B1_kst2*B1_Vm1;
3209
3210 }
3211 else if(g2[i]==1222){//2121
3212 if(B2_D0_a10kst0==-1){
3213 B2_D0_a10kst01 = BarrierN(2,sD0,sa102,skst1,rDs2,mD0M);
3214 B2_D0_a10kst02 = BarrierN(2,sD0,sa101,skst2,rDs2,mD0M);
3215 }
3216 if(B1_a10_kst==-1){
3217 B1_kst1=BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
3218 B1_kst2=BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
3219 }
3220 if(B2_a10_rho==-1){
3221 B1_a11m=BarrierN(2,sa101,srhom1,sPip,rRes2,mass1[i]);
3222
3223 B2_a12m=BarrierN(2,sa102,srhom2,sPip,rRes2,mass1[i]);
3224 }
3225 //B1_Vp1 B1_Vp2--rho+
3226
3227
3228 calt2(pa101,pkst2,t2D0_a101);
3229 calt2(pa102,pkst1,t2D0_a102);
3230
3231 calt2(prhom1,Pip,t1_a103);
3232 calt2(prhom2,Pip,t2_a103);
3233 calt1(PKs,Pi01,t1kst1); calt1(PKs,Pi02,t1kst2);
3234 calt1(Pi01,Pim,t1rhom1);calt1(Pi02,Pim,t1rhom2);
3235 //t1rhop1 t1rhop2
3236
3237 for(int i=0; i<4;i++)
3238 {
3239 double t1_a10_rhom1 = t1rhom1[i]*G[i][i];
3240 double t1_a10_rhom2 = t1rhom2[i]*G[i][i];
3241 for(int j=0; j<4; j++)
3242 {
3243 double t1_a10_kst01 = t1kst1[j]*G[j][j];
3244 double t1_a10_kst02 = t1kst2[j]*G[j][j];
3245
3246 for(int k=0; k<4; k++)
3247 {
3248 temp_PDF1 += t1_a10_rhom2*t1_a10_kst01*t2D0_a102[k][i]*t2_a103[k][j]*G[k][k];
3249 temp_PDF2 += t1_a10_rhom1*t1_a10_kst02*t2D0_a101[k][i]*t1_a103[k][j]*G[k][k];
3250 }
3251 }
3252 }
3253
3254 temp_PDF1 = temp_PDF1*B2_D0_a10kst01*B1_kst1*B1_Vm2*B2_a12m;
3255 temp_PDF2 = temp_PDF2*B2_D0_a10kst02*B1_kst2*B1_Vm1*B1_a11m;
3256
3257 }
3258
3259
3260 if(g0[i] == 1){//a1
3261 if(g2[i]==1020||g2[i]==1120||g2[i]==1220) {
3262 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa101_rhom,sa1rhom1,sPip,rRes2,0,pro5_m1);
3263 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa102_rhom,sa1rhom2,sPip,rRes2,0,pro5_m2);
3264 }
3265 else{
3266 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa101_rhom,sa1rhom1,sPip,rRes2,2,pro5_m1);
3267 propagatorRBW_a1(mass1sq,mass1[i],width1[i],sa102_rhom,sa1rhom2,sPip,rRes2,2,pro5_m2);
3268 }
3269
3270 propagatorGS(0.60102807,0.77526,0.1478,sa1rhom1,sPi01,sPim,rRes2,pro5_11);
3271 propagatorGS(0.60102807,0.77526,0.1478,sa1rhom2,sPi02,sPim,rRes2,pro5_12);
3272
3273 Com_Multi(pro5_m1,pro5_11,pro5_111); Com_Multi(pro5_m2,pro5_12,pro5_222);
3274
3275 }
3276 else if(g0[i]==0){
3277 pro5_m1[0] = 1; pro5_m1[1] = 0;
3278 pro5_m2[0] = 1; pro5_m2[1] = 0;
3279
3280 }
3281
3282 //kst
3283 if(g1[i]==1){
3284 propagatorRBW(mass2sq,mass2[i],width2[i],skst1_33,sKs,sPi01,rRes2,1,pro5_1);//kst1
3285 propagatorRBW(mass2sq,mass2[i],width2[i],skst2_33,sKs,sPi02,rRes2,1,pro5_2);//kst2
3286 }
3287 else if(g1[i]==0){
3288 pro5_1[0] = 1; pro5_1[1] = 0;
3289 pro5_2[0] = 1; pro5_2[1] = 0;
3290 }
3291
3292 Com_Multi(pro5_222,pro5_1,pro5_1112); Com_Multi(pro5_111,pro5_2,pro5_2222);//1p
3293
3294 amp_tmp1[0] =-1*(temp_PDF1*pro5_1112[0]);
3295 amp_tmp1[1] =-1*(temp_PDF1*pro5_1112[1]);
3296 amp_tmp2[0] =-1*(temp_PDF2*pro5_2222[0]);
3297 amp_tmp2[1] =-1*(temp_PDF2*pro5_2222[1]);
3298 }
3299
3300 else if(modetype[i]==21){
3301 if(g2[i]==0){ //0101---SS
3302 /* if(B1_a1p_kstm_rhop1==-1){
3303 B1_a1p_kstm_rhop1 = BarrierN(1,srhop1,sPip,sPi01,rRes2,mass2[i]);
3304 B1_a1p_kstm_rhop2 = BarrierN(1,srhop2,sPip,sPi02,rRes2,mass2[i]);
3305 }*/
3306
3307 if(B1_kst==-1){
3308 B1_kst01 = BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
3309 B1_kst02 = BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
3310
3311 }
3312
3313 if(B1_a10_f0==-1){
3314 B1_a101=BarrierN(1,sa101,sf02,sPi01,rRes2,mass1[i]);//1or2 sf01-->pip pim
3315 B1_a102=BarrierN(1,sa102,sf02,sPi02,rRes2,mass1[i]);
3316 }
3317 //t(a1)
3318 calt1(Pf02,Pi01,t1a101);
3319 calt1(Pf02,Pi02,t1a102);//Pf02-->pip pim
3320
3321 for(int m=0; m<4; m++)
3322 {
3323 double t1_a101=t1a101[m]*G[m][m];
3324 double t1_a102=t1a102[m]*G[m][m];
3325
3326 for(int j=0; j<4; j++)
3327 {
3328 temp_PDF1 += t1kst1[j]*G[j][j]*t1_a102;
3329 temp_PDF2 += t1kst2[j]*G[j][j]*t1_a101;
3330 }
3331
3332 }
3333
3334 temp_PDF1 = temp_PDF1*B1_kst01*B1_a102;
3335 temp_PDF2 = temp_PDF2*B1_kst02*B1_a101;
3336
3337 }
3338 else if(g2[i]==1){
3339 if(B1_D0_a1kst==-1){
3340 B1_D0_a10kst01 = BarrierN(1,sD0,sa101,skst2,rDs2,mD0M);
3341 B1_D0_a10kst02 = BarrierN(1,sD0,sa102,skst1,rDs2,mD0M);
3342 }
3343 if(B1_kst==-1){
3344 B1_kst01 = BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
3345 B1_kst02 = BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
3346 }
3347 if(B1_a10_f0==-1){
3348 B1_a101=BarrierN(1,sa101,sf02,sPi01,rRes2,mass1[i]);//1or2 sf01-->pip pim
3349 B1_a102=BarrierN(1,sa102,sf02,sPi02,rRes2,mass1[i]);
3350 }
3351 //B1_Vp1 B1_Vp2--rho+
3352
3353 //Sn
3354 calt1(Pf02,Pi01,t1a101);
3355 calt1(Pf02,Pi02,t1a102);//Pf02-->pip pim
3356
3357
3358 calt1(pa101,pkst2,t1D0a101);
3359 calt1(pa102,pkst1,t1D0a102);
3360
3361 for(int j=0; j<4; j++)
3362 {
3363 double t1_kst1 = t1kst1[j]*G[j][j];
3364 double t1_kst2 = t1kst2[j]*G[j][j];
3365
3366 for(int k=0; k<4; k++)
3367 {
3368 double t1_D0_a101 = t1D0a101[k]*G[k][k];
3369 double t1_D0_a102 = t1D0a102[k]*G[k][k];
3370
3371 for(int l=0; l<4; l++)
3372 {
3373 double pD0_a1pkstm = pD0[l]*G[l][l];
3374
3375 for(int m=0; m<4; m++)
3376 {
3377 temp_PDF1 += t1_kst1*t1_D0_a102*pD0_a1pkstm*t1a102[m]*G[m][m]*E[j][k][l][m];
3378 temp_PDF2 += t1_kst2*t1_D0_a101*pD0_a1pkstm*t1a101[m]*G[m][m]*E[j][k][l][m];
3379 }
3380 }
3381 }
3382 }
3383
3384 temp_PDF1 = temp_PDF1*B1_D0_a10kst02*B1_kst1*B1_a102;
3385 temp_PDF2 = temp_PDF2*B1_D0_a10kst01*B1_kst2*B1_a101;
3386
3387 }
3388 else if(g2[i]==2){//2101
3389 if(B1_D0_a1kst==-1){
3390 B1_D0_a10kst01 = BarrierN(2,sD0,sa101,skst2,rDs2,mD0M);
3391 B1_D0_a10kst02 = BarrierN(2,sD0,sa102,skst1,rDs2,mD0M);
3392 }
3393 if(B1_kst==-1){
3394 B1_kst01 = BarrierN(1,skst1,sKs,sPi01,rRes2,mass2[i]);
3395 B1_kst02 = BarrierN(1,skst2,sKs,sPi02,rRes2,mass2[i]);
3396 }
3397 if(B1_a10_f0==-1){
3398 B1_a101=BarrierN(1,sa101,sf02,sPi01,rRes2,mass1[i]);//1or2 sf01-->pip pim
3399 B1_a102=BarrierN(1,sa102,sf02,sPi02,rRes2,mass1[i]);
3400 }
3401 //B1_Vp1 B1_Vp2--rho+
3402
3403 //Sn
3404 calt1(Pf02,Pi01,t1a101);
3405 calt1(Pf02,Pi02,t1a102);//Pf02-->pip pim
3406
3407
3408 calt2(pa101,pkst2,t2D0a101);
3409 calt2(pa102,pkst1,t2D0a102);
3410
3411 for(int j=0; j<4; j++)
3412 {
3413 double t1_kst1 = t1kst1[j]*G[j][j];
3414 double t1_kst2 = t1kst2[j]*G[j][j];
3415 for(int m=0; m<4; m++)
3416 {
3417 temp_PDF1 += t1_kst1*t2D0a102[m][j]*t1a102[m]*G[m][m];
3418 temp_PDF2 += t1_kst2*t2D0a101[m][j]*t1a101[m]*G[m][m];
3419 }
3420 }
3421
3422 temp_PDF1 = temp_PDF1*B1_D0_a10kst02*B1_kst1*B1_a102;
3423 temp_PDF2 = temp_PDF2*B1_D0_a10kst01*B1_kst2*B1_a101;
3424
3425 }
3426
3427
3428 if(g0[i] == 1){//a1
3429 propagatorRBW(mass1sq,mass1[i],width1[i],sa101,sf02,sPi01,rRes2,1,pro00_01);//sf01-->pi+ pi-
3430 propagatorRBW(mass1sq,mass1[i],width1[i],sa102,sf02,sPi02,rRes2,1,pro00_02);
3431 }
3432 else if(g0[i]==0){
3433 pro00_01[0] = 1; pro00_01[1] = 0;
3434 pro00_02[0] = 1; pro00_02[1] = 0;
3435 }
3436
3437 //kst
3438 if(g1[i]==1){
3439 propagatorRBW(mass2sq,mass2[i],width2[i],skst1,sKs,sPi01,rRes2,1,pro1_3);
3440 propagatorRBW(mass2sq,mass2[i],width2[i],skst2,sKs,sPi02,rRes2,1,pro1_4);
3441 }
3442 else if(g1[i]==0){
3443 pro1_3[0] = 1; pro1_3[1] = 0;
3444 pro1_4[0] = 1; pro1_4[1] = 0;
3445 }
3446
3447
3448 Com_Multi(pro00_01,pro1_4,pfo_a101); Com_Multi(pfo_a101,pf0_2,pro_a101);
3449 Com_Multi(pro00_02,pro1_3,pfo_a102); Com_Multi(pfo_a102,pf0_2,pro_a102);
3450
3451 amp_tmp1[0] = temp_PDF1*pro_a102[0];
3452 amp_tmp1[1] = temp_PDF1*pro_a102[1];
3453 amp_tmp2[0] = temp_PDF2*pro_a101[0];
3454 amp_tmp2[1] = temp_PDF2*pro_a101[1];
3455 }
3456 else if(modetype[i]==34){
3457 if(g2[i]==0){
3458 /* if(B1_D0_a1pkpiSW==-1){
3459 B1_D0_a1pkpiSW = BarrierN(1,sD0,sa1p,skstm2,rDs2,mD0M);
3460 }*/
3461 if(B1_kstm==-1){
3462 B1_kstm = BarrierN(1,skst1,sKs,sPim,rRes2,mass2[i]);
3463
3464 }
3465 if(B1_a10_f0==-1){
3466 B1_a10_f0 = BarrierN(1,sa1p,sf01,sPip,rRes2,mass1[i]);
3467 }
3468 //t(a1)
3469 calt1(pf01,Pip,t1a1p);//pi01 pi02
3470
3471 // calt1(pa1p,pkstm2,t1D0_a1pkpimSW);
3472 calt1(PKs,Pim,t1kstm);
3473 for(int m=0; m<4; m++)
3474 {
3475 double t1_a1p=t1a1p[m]*G[m][m];
3476
3477 for(int j=0; j<4; j++)
3478 {
3479 temp_PDF1 += t1kstm[j]*G[j][j]*t1_a1p;
3480 }
3481
3482 }
3483 temp_PDF1 = temp_PDF1*B1_kstm*B1_a10_f0;
3484 }
3485
3486 if(g0[i] == 1){//a1
3487 propagatorRBW(mass1sq,mass1[i],width1[i],sa1p,sf01,sPip,rRes2,1,pro0_p1);
3488 }
3489 else if(g0[i]==0){
3490 pro0_p1[0] = 1; pro0_p1[1] = 0;
3491 }
3492 if(r1[i] == 1){//a1
3493 propagatorsigma500(sf01, sPi01, sPi02, pf0_1);
3494 }
3495 else if(r1[i]==0){
3496 pf0_1[0] = 1; pf0_1[1] = 0;
3497 }
3498 //kst
3499 if(g1[i]==1){
3500 // KPiSLASS(skstm,sKs,sPim,pro1_1);
3501 propagatorRBW(mass2sq,mass2[i],width2[i],skstm,sKs,sPim,rRes2,1,pro1_1);
3502 }
3503 else if(g1[i]==0){
3504 pro1_1[0] = 1; pro1_1[1] = 0;
3505 }
3506
3507
3508 Com_Multi(pro0_p1,pro1_1,pfo_a1p); Com_Multi(pfo_a1p,pf0_1,pro_a1p);
3509
3510 amp_tmp1[0] = temp_PDF1*pro_a1p[0];
3511 amp_tmp1[1] = temp_PDF1*pro_a1p[1];
3512 amp_tmp2[0] = 0;
3513 amp_tmp2[1] = 0;
3514 }
3515 else if (modetype[i]==23){
3516 if (g2[i]==1)//spin=0 D to rho omega
3517 {
3518 if(B1_D0_f1==-1){
3519 B1_D0_f1 = BarrierN(1,sD0,sf1285,sKs,rDs2,mD0M); //m2==kst Fn(kst)
3520 }
3521 if(B1_f1285==-1) {
3522 B1_f1285 = BarrierN(1,sf1285,sf1285rho0,sf01,rRes2,mass1[i]);
3523 }
3524 if(B1_f1285_rho0==-1) {
3525 B1_f1285_rho0 = BarrierN(1,sf1285rho0,sPip,sPim,rRes2,mass2[i]);
3526 }
3527 calt2(pf1285rho0,pf01,t2f1285);
3528 calt1(pf1285,PKs,t1D0_f1285);
3529 calt1(Pip,Pim,t1f1rho0);
3530
3531 for(int i=0; i<4; i++)
3532 {
3533 for(int j=0; j<4; j++)
3534 {
3535 double tempD0 = pD0[j]*G[j][j]*G[i][i];// p(omega)
3536
3537 for(int k=0; k<4; k++)
3538 { double temt1D0f1 = t1D0_f1285[k]*G[k][k];
3539
3540 for(int l=0; l<4; l++)
3541 {
3542 double temtrho0 = t1f1rho0[l]*G[l][l]*E[i][j][k][l];
3543
3544 for(int m=0; m<4; m++)
3545 {
3546 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
3547 temp_PDF1 += temt1D0f1*t2f1285[m][l]*tempD0*temtrho0*G[m][m];
3548 }
3549 }
3550 }
3551 }
3552 }
3553
3554 temp_PDF1 = temp_PDF1*B1_D0_f1*B1_f1285*B1_f1285_rho0;
3555 }
3556
3557 if(g0[i] == 1){//a1
3558 propagatorRBW(mass1sq,mass1[i],width1[i],sf1285,sf1285rho0,sf01,rRes2,1,pro6_f1);
3559 }
3560 else if(g0[i]==0){
3561 pro6_f1[0] = 1; pro6_f1[1] = 0;
3562 }
3563
3564 if(g1[i]==1){
3565 propagatorGS(mass2sq,mass2[i],width2[i],sf1285rho0,sPip,sPim,rRes2,pro6_f11);
3566
3567 }
3568 else if(g1[i]==0){
3569 pro6_f11[0] = 1; pro6_f11[1] = 0;
3570 }
3571
3572 Com_Multi(pro6_f1,pro6_f11,pro6_11);
3573
3574 amp_tmp1[0] = temp_PDF1*pro6_11[0];
3575 amp_tmp1[1] = temp_PDF1*pro6_11[1];
3576 amp_tmp2[0] = 0;
3577 amp_tmp2[1] = 0;
3578
3579 }
3580 else if (modetype[i]==25){
3581 if(g2[i]==0)
3582 {
3583 if(B1_omega10==-1) {
3584
3585 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass2[i]);
3586 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass2[i]);
3587 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass2[i]);
3588
3589 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass2[i]);
3590 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass2[i]);
3591 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass2[i]);
3592
3593 }
3594
3595 if(B1_D0_k1400==-1) {
3596
3597 B1_D0_k14001=BarrierN(1,sD0,sk14001,sPi02,rDs2,mD0M);
3598 B1_D0_k14002=BarrierN(1,sD0,sk14002,sPi01,rDs2,mD0M);
3599 }
3600
3601 for(int i=0; i<4; i++)
3602 {
3603 for(int j=0; j<4; j++)
3604 {
3605 double tempomega1 = pomega1[j]*G[j][j]*G[i][i];
3606 double tempomega2 = pomega2[j]*G[j][j]*G[i][i];
3607
3608 for(int k=0; k<4; k++)
3609 {
3610 double temt1omega01 = t1omega01[k]*G[k][k];
3611 double temt1omega02 = t1omega02[k]*G[k][k];
3612 double temt1omegap1 = t1omegap1[k]*G[k][k];
3613 double temt1omegap2 = t1omegap2[k]*G[k][k];
3614 double temt1omegam1 = t1omegam1[k]*G[k][k];
3615 double temt1omegam2 = t1omegam2[k]*G[k][k];
3616
3617 for(int l=0; l<4; l++)
3618 {
3619 double temt1rho0 = t1rho0[l]*G[l][l]*E[i][j][k][l];
3620 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
3621 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
3622 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
3623 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
3624
3625 for(int m=0; m<4; m++)
3626 {
3627 double temt1D0_k14001 = t1D0_k14001[m]*G[m][m];
3628 double temt1D0_k14002 = t1D0_k14002[m]*G[m][m];
3629 for(int n=0; n<4; n++)
3630 {
3631
3632 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
3633 temp_PDF11 += temt1D0_k14002*pk1400_2[m][n]*p1omega02[n][i]*tempomega2*temt1omega02*temt1rho0*G[n][n];
3634 temp_PDF12 += temt1D0_k14002*pk1400_2[m][n]*p1omegap2[n][i]*tempomega2*temt1omegap2*temt1rhop2*G[n][n];
3635 temp_PDF13 += temt1D0_k14002*pk1400_2[m][n]*p1omegam2[n][i]*tempomega2*temt1omegam2*temt1rhom2*G[n][n];
3636 temp_PDF21 += temt1D0_k14001*pk1400_1[m][n]*p1omega01[n][i]*tempomega1*temt1omega01*temt1rho0*G[n][n];
3637 temp_PDF22 += temt1D0_k14001*pk1400_1[m][n]*p1omegap1[n][i]*tempomega1*temt1omegap1*temt1rhop1*G[n][n];
3638 temp_PDF23 += temt1D0_k14001*pk1400_1[m][n]*p1omegam1[n][i]*tempomega1*temt1omegam1*temt1rhom1*G[n][n];
3639 }
3640 }
3641 }
3642 }
3643 }
3644 }
3645 temp_PDF11 = temp_PDF11*B1_D0_k14002*B1_omega20*B1_V02;
3646 temp_PDF12 = temp_PDF12*B1_D0_k14002*B1_omega2p*B1_Vp2;
3647 temp_PDF13 = temp_PDF13*B1_D0_k14002*B1_omega2m*B1_Vm2;
3648 temp_PDF21 = temp_PDF21*B1_D0_k14001*B1_omega10*B1_V01;
3649 temp_PDF22 = temp_PDF22*B1_D0_k14001*B1_omega1p*B1_Vp1;
3650 temp_PDF23 = temp_PDF23*B1_D0_k14001*B1_omega1m*B1_Vm1;
3651 }
3652 else if(g2[i]==2)
3653 {
3654 if(B1_omega10==-1) {
3655
3656 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass2[i]);
3657 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass2[i]);
3658 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass2[i]);
3659
3660 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass2[i]);
3661 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass2[i]);
3662 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass2[i]);
3663 }
3664
3665 if(B1_D0_k1400==-1) {
3666
3667 B1_D0_k14001=BarrierN(1,sD0,sk14001,sPi02,rDs2,mD0M);
3668 B1_D0_k14002=BarrierN(1,sD0,sk14002,sPi01,rDs2,mD0M);
3669 }
3670 if(B2_k1400==-1) {
3671 B2_k1400_1=BarrierN(2,sk14001,somega1,sKs,rRes2,mass1[i]);
3672 B2_k1400_2=BarrierN(2,sk14002,somega2,sKs,rRes2,mass1[i]);
3673 }
3674 for(int i=0; i<4; i++)
3675 {
3676 for(int j=0; j<4; j++)
3677 {
3678 double tempomega1 = pomega1[j]*G[j][j]*G[i][i];
3679 double tempomega2 = pomega2[j]*G[j][j]*G[i][i];
3680
3681 for(int k=0; k<4; k++)
3682 {
3683 double temt1omega01 = t1omega01[k]*G[k][k];
3684 double temt1omega02 = t1omega02[k]*G[k][k];
3685 double temt1omegap1 = t1omegap1[k]*G[k][k];
3686 double temt1omegap2 = t1omegap2[k]*G[k][k];
3687 double temt1omegam1 = t1omegam1[k]*G[k][k];
3688 double temt1omegam2 = t1omegam2[k]*G[k][k];
3689
3690 for(int l=0; l<4; l++)
3691 {
3692 double temt1rho0 = t1rho0[l]*G[l][l]*E[i][j][k][l];
3693 double temt1rhop1 = t1rhop1[l]*G[l][l]*E[i][j][k][l];
3694 double temt1rhop2 = t1rhop2[l]*G[l][l]*E[i][j][k][l];
3695 double temt1rhom1 = t1rhom1[l]*G[l][l]*E[i][j][k][l];
3696 double temt1rhom2 = t1rhom2[l]*G[l][l]*E[i][j][k][l];
3697
3698 for(int m=0; m<4; m++)
3699 {
3700 double temt1D0_k14001 = t1D0_k14001[m]*G[m][m];
3701 double temt1D0_k14002 = t1D0_k14002[m]*G[m][m];
3702
3703 for(int n=0; n<4; n++)
3704 {
3705 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
3706 temp_PDF11 += temt1D0_k14002*t2k1400_2[m][n]*p1omega02[n][i]*tempomega2*temt1omega02*temt1rho0*G[n][n];
3707 temp_PDF12 += temt1D0_k14002*t2k1400_2[m][n]*p1omegap2[n][i]*tempomega2*temt1omegap2*temt1rhop2*G[n][n];
3708 temp_PDF13 += temt1D0_k14002*t2k1400_2[m][n]*p1omegam2[n][i]*tempomega2*temt1omegam2*temt1rhom2*G[n][n];
3709 temp_PDF21 += temt1D0_k14001*t2k1400_1[m][n]*p1omega01[n][i]*tempomega1*temt1omega01*temt1rho0*G[n][n];
3710 temp_PDF22 += temt1D0_k14001*t2k1400_1[m][n]*p1omegap1[n][i]*tempomega1*temt1omegap1*temt1rhop1*G[n][n];
3711 temp_PDF23 += temt1D0_k14001*t2k1400_1[m][n]*p1omegam1[n][i]*tempomega1*temt1omegam1*temt1rhom1*G[n][n];
3712 }
3713 }
3714 }
3715 }
3716 }
3717 }
3718 temp_PDF11 = temp_PDF11*B1_D0_k14002*B2_k1400_2*B1_omega20*B1_V02;
3719 temp_PDF12 = temp_PDF12*B1_D0_k14002*B2_k1400_2*B1_omega2p*B1_Vp2;
3720 temp_PDF13 = temp_PDF13*B1_D0_k14002*B2_k1400_2*B1_omega2m*B1_Vm2;
3721
3722 temp_PDF21 = temp_PDF21*B1_D0_k14001*B2_k1400_1*B1_omega10*B1_V01;
3723 temp_PDF22 = temp_PDF22*B1_D0_k14001*B2_k1400_1*B1_omega1p*B1_Vp1;
3724 temp_PDF23 = temp_PDF23*B1_D0_k14001*B2_k1400_1*B1_omega1m*B1_Vm1;
3725 }
3726 if(g0[i]==1) { //b1 omega
3727
3728 propagatorRBW(mass1sq,mass1[i],width1[i],sk14001,somega1,sKs,rRes2,g2[i],prob1_1);
3729 propagatorRBW(mass1sq,mass1[i],width1[i],sk14002,somega2,sKs,rRes2,g2[i],prob1_2);
3730
3731 } else if(g0[i]==0) {
3732 prob1_1[0] = 1; prob1_1[1] = 0;
3733 prob1_2[0] = 1; prob1_2[1] = 0;
3734 }
3735 if(g1[i]==1) { // omega--rho
3736
3737 propagatorRBW(mass2sq,mass2[i],width2[i],somega1,srho01,sPi01,rRes2,1,pro1_01);//01
3738 propagatorRBW(mass2sq,mass2[i],width2[i],somega1,srhop1,sPim,rRes2,1,pro1_p1);//p1
3739 propagatorRBW(mass2sq,mass2[i],width2[i],somega1,srhom1,sPip,rRes2,1,pro1_m1);//m1
3740 propagatorRBW(mass2sq,mass2[i],width2[i],somega2,srho02,sPi02,rRes2,1,pro1_02);//02
3741 propagatorRBW(mass2sq,mass2[i],width2[i],somega2,srhop2,sPim,rRes2,1,pro1_p2);//p2
3742 propagatorRBW(mass2sq,mass2[i],width2[i],somega2,srhom2,sPip,rRes2,1,pro1_m2);//m2
3743 } else if(g1[i]==0) {
3744
3745 pro1_01[0] = 1; pro1_01[1] = 0; pro1_p1[0] = 1; pro1_p1[1] = 0; pro1_m1[0] = 1; pro1_m1[1] = 0;
3746 pro1_02[0] = 1; pro1_02[1] = 0; pro1_p2[0] = 1; pro1_p2[1] = 0; pro1_m2[0] = 1; pro1_m2[1] = 0;
3747
3748 }
3749
3750 //rho--pipi
3751 /* if(r1[i]==1){
3752 propagatorGS(0.60102807,0.77526,0.1478,srho01,sPip,sPim,rRes2,pro1V01);
3753 propagatorGS(0.60102807,0.77526,0.1478,srho02,sPip,sPim,rRes2,pro1V02);
3754 propagatorGS(0.60102807,0.77526,0.1478,srhop1,sPip,sPi01,rRes2,pro1Vp1);
3755 propagatorGS(0.60102807,0.77526,0.1478,srhop2,sPip,sPi02,rRes2,pro1Vp2);
3756 propagatorGS(0.60102807,0.77526,0.1478,srhom1,sPi01,sPim,rRes2,pro1Vm1);
3757 propagatorGS(0.60102807,0.77526,0.1478,srhom2,sPi02,sPim,rRes2,pro1Vm2);
3758
3759 }
3760 else if(r1[i]==0){
3761 pro1V01[0] = 1; pro1V01[1] = 0;
3762 pro1V02[0] = 1; pro1V02[1] = 0;
3763 pro1Vp1[0] = 1; pro1Vp1[1] = 0;
3764 pro1Vp2[0] = 1; pro1Vp2[1] = 0;
3765 pro1Vm1[0] = 1; pro1Vm1[1] = 0;
3766 pro1Vm2[0] = 1; pro1Vm2[1] = 0;
3767 }
3768 */
3769 Com_Multi(prob1_1,pro1_01,tpro_01); Com_Multi(tpro_01,pro1V01,pro_21);//10
3770 Com_Multi(prob1_1,pro1_p1,tpro_p1); Com_Multi(tpro_p1,pro1Vp1,pro_22);//1p
3771 Com_Multi(prob1_1,pro1_m1,tpro_m1); Com_Multi(tpro_m1,pro1Vm1,pro_23);//1m
3772
3773 Com_Multi(prob1_2,pro1_02,tpro_02); Com_Multi(tpro_02,pro1V02,pro_11);//20
3774 Com_Multi(prob1_2,pro1_p2,tpro_p2); Com_Multi(tpro_p2,pro1Vp2,pro_12);//2p
3775 Com_Multi(prob1_2,pro1_m2,tpro_m2); Com_Multi(tpro_m2,pro1Vm2,pro_13);//2m
3776
3777 amp_tmp1[0] = temp_PDF11*pro_11[0] + temp_PDF12*pro_12[0] + temp_PDF13*pro_13[0];//b1--omega2
3778 amp_tmp1[1] = temp_PDF11*pro_11[1] + temp_PDF12*pro_12[1] + temp_PDF13*pro_13[1];
3779 amp_tmp2[0] = temp_PDF21*pro_21[0] + temp_PDF22*pro_22[0] + temp_PDF23*pro_23[0];//b1--omega1
3780 amp_tmp2[1] = temp_PDF21*pro_21[1] + temp_PDF22*pro_22[1] + temp_PDF23*pro_23[1];
3781 }
3782
3783 else if(modetype[i]==45){//K1270- to ks rho-
3784 if(g2[i]==1020){ //0101---SS
3785 if(B1_k127_rhop==-1) {
3786 B1_k127_rhop1=BarrierN(1,sk127mrhop1,sPip,sPi01,rRes2,mass2[i]);
3787 B1_k127_rhop2=BarrierN(1,sk127mrhop2,sPip,sPi02,rRes2,mass2[i]);
3788 }
3789 if(B1_k127_rhom==-1) {
3790 B1_k127_rhom1=BarrierN(1,sk127mrhom1,sPim,sPi01,rRes2,0.77526);
3791 B1_k127_rhom2=BarrierN(1,sk127mrhom2,sPim,sPi02,rRes2,0.77526);
3792 }
3793 calG2(pk127mrhom1,PKs,p1k1m_1);
3794 calG2(pk127mrhom2,PKs,p1k1m_2);
3795 calt1(Pim,Pi01,t1rhom11);
3796 calt1(Pim,Pi02,t1rhom12);
3797 calt1(Pip,Pi01,t1rhop11);
3798 calt1(Pip,Pi02,t1rhop12);
3799 for(int i=0; i<4; i++)
3800 {
3801 double temt1rhom11 = t1rhom11[i]*G[i][i];
3802 double temt1rhom12 = t1rhom12[i]*G[i][i];
3803 for(int j=0; j<4; j++)
3804 {
3805 temp_PDF1 += t1rhop12[j]*G[j][j]*temt1rhom11*p1k1m_1[i][j];
3806 temp_PDF2 += t1rhop11[j]*G[j][j]*temt1rhom12*p1k1m_2[i][j];
3807 }
3808 }
3809
3810 temp_PDF1 = temp_PDF1*B1_k127_rhop2*B1_k127_rhom1;
3811 temp_PDF2 = temp_PDF2*B1_k127_rhop1*B1_k127_rhom2;
3812 }
3813 else if(g2[i]==1120){
3814 if(B1_D0_k1==-1){
3815 B1_D0_k11 = BarrierN(1,sD0,sk127m1,sk127mrhop2,rDs2,mD0M);
3816 B1_D0_k12 = BarrierN(1,sD0,sk127m2,sk127mrhop1,rDs2,mD0M);
3817 }
3818 if(B1_k127_rhop==-1) {
3819 B1_k127_rhop1=BarrierN(1,sk127mrhop1,sPip,sPi01,rRes2,mass2[i]);
3820 B1_k127_rhop2=BarrierN(1,sk127mrhop2,sPip,sPi02,rRes2,mass2[i]);
3821 }
3822 if(B1_k127_rhom==-1) {
3823 B1_k127_rhom1=BarrierN(1,sk127mrhom1,sPim,sPi01,rRes2,0.77526);
3824 B1_k127_rhom2=BarrierN(1,sk127mrhom2,sPim,sPi02,rRes2,0.77526);
3825 }
3826 calt1(pk127m1,pk127mrhop2,t1D0_k11);
3827 calt1(pk127m2,pk127mrhop1,t1D0_k12);
3828 calt1(Pim,Pi01,t1rhom11);
3829 calt1(Pim,Pi02,t1rhom12);
3830 calG2(pk127mrhom1,PKs,p1k1m_1);
3831 calG2(pk127mrhom2,PKs,p1k1m_2);
3832 calt1(Pip,Pi01,t1rhop11);
3833 calt1(Pip,Pi02,t1rhop12);
3834
3835 for(int i=0; i<4; i++)
3836 {
3837 double t1_k1_rhop1 = t1rhop11[i]*G[i][i];
3838 double t1_k1_rhop2 = t1rhop12[i]*G[i][i];
3839
3840 for(int j=0; j<4; j++)
3841 {
3842 double t1_k1_rhom1 = t1rhom11[j]*G[j][j];
3843 double t1_k1_rhom2 = t1rhom12[j]*G[j][j];
3844
3845 for(int k=0; k<4; k++)
3846 {
3847 double t1_D0_k11 = t1D0_k11[k]*G[k][k];
3848 double t1_D0_k12 = t1D0_k12[k]*G[k][k];
3849
3850 for(int l=0; l<4; l++)
3851 { double pD0_k11 = pD0[l]*G[l][l];
3852 double pD0_k12 = pD0[l]*G[l][l];
3853
3854 for(int m=0; m<4; m++)
3855 {
3856 temp_PDF1 += t1_k1_rhop2*t1_k1_rhom1*t1_D0_k11*pD0_k11*p1k1m_1[m][j]*G[m][m]*E[i][k][l][m];
3857 temp_PDF2 += t1_k1_rhop1*t1_k1_rhom2*t1_D0_k12*pD0_k12*p1k1m_2[m][j]*G[m][m]*E[i][k][l][m];
3858 }
3859 }
3860 }
3861 }
3862 }
3863 temp_PDF1 = temp_PDF1*B1_D0_k11*B1_k127_rhom1*B1_k127_rhop2;
3864 temp_PDF2 = temp_PDF2*B1_D0_k12*B1_k127_rhom2*B1_k127_rhop1;
3865
3866 }
3867
3868 else if(g2[i]==1220){//2101
3869 if(B2_D0_k1==-1){
3870 B2_D0_k11 = BarrierN(2,sD0,sk127m1,sk127mrhop2,rDs2,mD0M);
3871 B2_D0_k12 = BarrierN(2,sD0,sk127m2,sk127mrhop1,rDs2,mD0M);
3872 }
3873 if(B1_k127_rhop==-1) {
3874 B1_k127_rhop1=BarrierN(1,sk127mrhop1,sPip,sPi01,rRes2,mass2[i]);
3875 B1_k127_rhop2=BarrierN(1,sk127mrhop2,sPip,sPi02,rRes2,mass2[i]);
3876 }
3877 if(B1_k127_rhom==-1) {
3878 B1_k127_rhom1=BarrierN(1,sk127mrhom1,sPim,sPi01,rRes2,0.77526);
3879 B1_k127_rhom2=BarrierN(1,sk127mrhom2,sPim,sPi02,rRes2,0.77526);
3880 }
3881 calt2(pk127m1,pk127mrhop2,t2D0_k11);
3882 calt2(pk127m2,pk127mrhop1,t2D0_k12);
3883 calt1(Pim,Pi01,t1rhom11);
3884 calt1(Pim,Pi02,t1rhom12);
3885
3886 calG2(pk127mrhom1,PKs,p1k1m_1);
3887 calG2(pk127mrhom2,PKs,p1k1m_2);
3888 calt1(Pip,Pi01,t1rhop11);
3889 calt1(Pip,Pi02,t1rhop12);
3890 for(int i=0; i<4;i++)
3891 {
3892 double t1_k1_rhop1 = t1rhop11[i]*G[i][i];
3893 double t1_k1_rhop2 = t1rhop12[i]*G[i][i];
3894
3895 for(int j=0; j<4; j++)
3896 {
3897 double t1_k1_rhom1 = t1rhom11[j]*G[j][j];
3898 double t1_k1_rhom2 = t1rhom12[j]*G[j][j];
3899
3900 for(int k=0; k<4; k++)
3901 {
3902 temp_PDF1 += t1_k1_rhop2*t1_k1_rhom1*t2D0_k11[k][i]*p1k1m_1[k][j];
3903 temp_PDF2 += t1_k1_rhop1*t1_k1_rhom2*t2D0_k12[k][i]*p1k1m_2[k][j];
3904 }
3905 }
3906 }
3907
3908 temp_PDF1 = temp_PDF1*B2_D0_k11*B1_k127_rhom1*B1_k127_rhop2;
3909 temp_PDF2 = temp_PDF2*B2_D0_k12*B1_k127_rhom2*B1_k127_rhop1;
3910
3911 }
3912
3913 if(g0[i] == 1){//a1
3914 if(g2[i]==1020||g2[i]==1120||g2[i]==1220) {
3915 propagatorRBW(mass1sq,mass1[i],width1[i],sk127m1,sk127mrhom1,sKs,rRes2,0,pro45_m1);
3916 propagatorRBW(mass1sq,mass1[i],width1[i],sk127m2,sk127mrhom2,sKs,rRes2,0,pro45_m2);
3917 }
3918 else{
3919 propagatorRBW(mass1sq,mass1[i],width1[i],sk127m1,sk127mrhom1,sKs,rRes2,2,pro45_m1);
3920 propagatorRBW(mass1sq,mass1[i],width1[i],sk127m2,sk127mrhom2,sKs,rRes2,2,pro45_m2);
3921 }
3922 propagatorGS(0.60102807,0.77526,0.1478,sk127mrhom1,sPim,sPi01,rRes2,pro11Vm1);
3923 propagatorGS(0.60102807,0.77526,0.1478,sk127mrhom2,sPim,sPi02,rRes2,pro11Vm2);
3924 }
3925 else if(g0[i]==0){
3926 pro45_m1[0] = 1; pro45_m1[1] = 0;
3927 pro45_m2[0] = 1; pro45_m2[1] = 0;
3928 }
3929
3930
3931 Com_Multi(pro45_m1,pro11Vm1,tpro45_m1);
3932 Com_Multi(pro45_m2,pro11Vm2,tpro45_m2);
3933
3934 if(g1[i]==1){
3935 propagatorGS(mass2sq,mass2[i],width2[i],sk127mrhop1,sPip,sPi01,rRes2,pro11Vp1);
3936 propagatorGS(mass2sq,mass2[i],width2[i],sk127mrhop2,sPip,sPi02,rRes2,pro11Vp2);
3937 }
3938 else if(g1[i]==0){
3939 pro1_1[0] = 1; pro1_1[1] = 0;
3940 pro1_2[0] = 1; pro1_2[1] = 0;
3941 }
3942
3943
3944 Com_Multi(tpro45_m1,pro11Vp2,pro45_10);//1p
3945 Com_Multi(tpro45_m2,pro11Vp1,pro45_11);//2p
3946
3947 amp_tmp1[0] = temp_PDF1*pro45_10[0] ;//b1--omega2
3948 amp_tmp1[1] = temp_PDF1*pro45_10[1] ;
3949 amp_tmp2[0] = temp_PDF2*pro45_11[0] ;//b1--omega1
3950 amp_tmp2[1] = temp_PDF2*pro45_11[1] ;
3951 }
3952
3953
3954 else if(modetype[i]==46){ //K12700 to ks rho0
3955 if(g2[i]==1){
3956
3957 if(B1_D0_k1270==-1){
3958 B1_D0_k1270 = BarrierN(1,sD0,sk1270,sk01,rDs2,mD0M); //m2==kst Fn(kst)
3959 }
3960
3961 if(B1_k1270_rho0==-1) {
3962 B1_k1270_rho0 = BarrierN(1,sk1270rho0,sPip,sPim,rRes2,mass2[i]);
3963 }
3964
3965 calG2(pk1270rho0,PKs,p2k1270);
3966 calt1(pk1270,pk01,t1D0_k1270);
3967 calt1(Pip,Pim,t1k1270rho0);
3968
3969 for(int i=0; i<4; i++)
3970 {
3971 for(int j=0; j<4; j++)
3972 {
3973 double tempD0 = pD0[j]*G[j][j]*G[i][i];// p(omega)
3974
3975 for(int k=0; k<4; k++)
3976 { double temt1D0k1 = t1D0_k1270[k]*G[k][k];
3977
3978 for(int l=0; l<4; l++)
3979 {
3980 double tem2t1rho0 = t1k1270rho0[l]*G[l][l]*E[i][j][k][l];
3981
3982 for(int m=0; m<4; m++)
3983 {
3984 if((i==j)||(i==k)||(i==l)||(j==k)||(j==l)||(k==l)) continue;
3985 temp_PDF1 += temt1D0k1*p2k1270[m][l]*tempD0*tem2t1rho0*G[m][m];
3986 }
3987 }
3988 }
3989 }
3990 }
3991
3992 temp_PDF1 = temp_PDF1*B1_D0_k1270*B1_k1270_rho0;
3993 }
3994
3995 if(g0[i] == 1){//a1
3996 propagatorRBW(mass1sq,mass1[i],width1[i],sk1270,sk1270rho0,sKs,rRes2,0,pro0_20);
3997 }
3998 else if(g0[i]==0){
3999 pro0_20[0] = 1; pro0_20[1] = 0;
4000 }
4001 if(g1[i]==1){
4002 propagatorGS(mass2sq,mass2[i],width2[i],sk1270rho0,sPip,sPim,rRes2,pro1_20);
4003
4004 }
4005 else if(g1[i]==0){
4006 pro1_20[0] = 1; pro1_20[1] = 0;
4007 }
4008
4009 Com_Multi(pro0_20,pro1_20,pro_20);
4010 amp_tmp1[0] = temp_PDF1*pro_20[0];
4011 amp_tmp1[1] = temp_PDF1*pro_20[1];
4012 amp_tmp2[0] = 0;
4013 amp_tmp2[1] = 0;
4014 }
4015
4016
4017 else if(modetype[i]==31){ //k140m to kstm pi0
4018 if(g2[i]==1020){ //0101---SS
4019
4020 if(B1_k140_rhop==-1) {
4021 B1_k140_rhop1=BarrierN(1,sk140mrhop1,sPip,sPi01,rRes2,mass2[i]);
4022 B1_k140_rhop2=BarrierN(1,sk140mrhop2,sPip,sPi02,rRes2,mass2[i]);
4023 }
4024 if(B1_k140_kstm==-1){
4025 B1_k140_kstm1=BarrierN(1,sk140mkstm1,sKs,sPim,rRes2,0.89166);
4026 B1_k140_kstm2=BarrierN(1,sk140mkstm2,sKs,sPim,rRes2,0.89166);
4027 }
4028 calt1(Pip,Pi01,t1k140mrhop1); calt1(Pip,Pi02,t1k140mrhop2);
4029 calt1(PKs,Pim,t1k140mkstm1);
4030 calt1(PKs,Pim,t1k140mkstm2);
4031 calG2(pk140mkstm1,Pi01,pm_k11);
4032 calG2(pk140mkstm2,Pi02,pm_k12);
4033 for(int i=0; i<4; i++)
4034 {
4035 double temt1kstm1 = t1k140mkstm1[i]*G[i][i];
4036 double temt1kstm2 = t1k140mkstm2[i]*G[i][i];
4037 for(int j=0; j<4; j++)
4038 {
4039 temp_PDF1 += t1k140mrhop2[j]*G[j][j]*temt1kstm1*pm_k11[i][j];
4040 temp_PDF2 += t1k140mrhop1[j]*G[j][j]*temt1kstm2*pm_k12[i][j];
4041 }
4042 }
4043
4044 temp_PDF1 = temp_PDF1*B1_k140_rhop2*B1_k140_kstm1;
4045 temp_PDF2 = temp_PDF2*B1_k140_rhop1*B1_k140_kstm2;
4046 }
4047
4048 else if(g2[i]==1120){
4049 if(B1_D0_k101==-1){
4050 B1_D0_k101 = BarrierN(1,sD0,sk140m1,sk140mrhop2,rDs2,mD0M);
4051 B1_D0_k102 = BarrierN(1,sD0,sk140m2,sk140mrhop1,rDs2,mD0M);
4052 }
4053 if(B1_k140_kstm==-1){
4054 B1_k140_kstm1=BarrierN(1,sk140mkstm1,sKs,sPim,rRes2,0.89166);
4055 B1_k140_kstm2=BarrierN(1,sk140mkstm2,sKs,sPim,rRes2,0.89166);
4056 }
4057 if(B1_k140_rhop==-1) {
4058 B1_k140_rhop1=BarrierN(1,sk140mrhop1,sPip,sPi01,rRes2,mass2[i]);
4059 B1_k140_rhop2=BarrierN(1,sk140mrhop2,sPip,sPi02,rRes2,mass2[i]);
4060 }
4061 //B1_Vp1 B1_Vp2--rho+
4062
4063 //t1rhop1 t1rhop2
4064 calt1(Pip,Pi01,t1k140mrhop1); calt1(Pip,Pi02,t1k140mrhop2);
4065 calt1(PKs,Pim,t1k140mkstm1);
4066 calt1(PKs,Pim,t1k140mkstm2);
4067 calt1(pk140m1,pk140mrhop2,t1D0_k101);
4068 calt1(pk140m2,pk140mrhop1,t1D0_k102);
4069
4070 //P
4071 calG2(pk140mkstm1,Pi01,p2_k101);
4072 calG2(pk140mkstm2,Pi02,p2_k102);
4073 for(int i=0; i<4; i++)
4074 {
4075 double t1_rhop1 = t1k140mrhop1[i]*G[i][i];
4076 double t1_rhop2 = t1k140mrhop2[i]*G[i][i];
4077
4078 for(int j=0; j<4; j++)
4079 {
4080 double t1_kstm1 = t1k140mkstm1[j]*G[j][j];
4081 double t1_kstm2 = t1k140mkstm2[j]*G[j][j];
4082
4083 for(int k=0; k<4; k++)
4084 {
4085 double t1_D0_k101 = t1D0_k101[k]*G[k][k];
4086 double t1_D0_k102 = t1D0_k102[k]*G[k][k];
4087
4088 for(int l=0; l<4; l++)
4089 { double pD0_k11 = pD0[l]*G[l][l];
4090
4091 for(int m=0; m<4; m++)
4092 {
4093 temp_PDF1 += t1_rhop2*t1_kstm1*t1_D0_k101*pD0_k11*p2_k101[m][j]*G[m][m]*E[i][k][l][m];
4094 temp_PDF2 += t1_rhop1*t1_kstm2*t1_D0_k102*pD0_k11*p2_k102[m][j]*G[m][m]*E[i][k][l][m];
4095 }
4096 }
4097 }
4098 }
4099 }
4100 temp_PDF1 = temp_PDF1*B1_D0_k101*B1_k140_kstm1*B1_k140_rhop2;
4101 temp_PDF2 = temp_PDF2*B1_D0_k102*B1_k140_kstm2*B1_k140_rhop1;
4102
4103 }
4104 if(g0[i] == 1){//a1
4105 if(g2[i]==1020||g2[i]==1120) {
4106 propagatorRBW(mass1sq,mass1[i],width1[i],sk140m1,sk140mkstm1,sPi01,rRes2,0,pro10_p1);
4107 propagatorRBW(mass1sq,mass1[i],width1[i],sk140m2,sk140mkstm2,sPi02,rRes2,0,pro10_p2);
4108 }
4109 else{
4110 propagatorRBW(mass1sq,mass1[i],width1[i],sk140m1,sk140mkstm1,sPi01,rRes2,2,pro10_p1);
4111 propagatorRBW(mass1sq,mass1[i],width1[i],sk140m2,sk140mkstm2,sPi02,rRes2,2,pro10_p2);
4112 }
4113 propagatorRBW(0.7950575556,0.89166,0.0467,sk140mkstm1,sKs,sPim,rRes2,1,pro10_1);//kst1
4114 propagatorRBW(0.7950575556,0.89166,0.0467,sk140mkstm2,sKs,sPim,rRes2,1,pro10_2);//kst1a
4115 }
4116 else if(g0[i]==0){
4117 pro10_p1[0] = 1; pro10_p1[1] = 0;
4118 pro10_p2[0] = 1; pro10_p2[1] = 0;
4119 }
4120 Com_Multi(pro10_p1,pro10_1,tpro10_p1);
4121 Com_Multi(pro10_p2,pro10_2,tpro10_p2);
4122
4123 if(g1[i]==1){
4124 propagatorGS(mass2sq,mass2[i],width2[i],sk140mrhop1,sPip,sPi01,rRes2,pro10_Vp1);
4125 propagatorGS(mass2sq,mass2[i],width2[i],sk140mrhop2,sPip,sPi02,rRes2,pro10_Vp2);
4126 }
4127
4128 else if(g1[i]==0){
4129 pro10_Vp1[0] = 1; pro10_Vp1[1] = 0;
4130 pro10_Vp2[0] = 1; pro10_Vp2[1] = 0;
4131 }
4132
4133 Com_Multi(tpro10_p1,pro10_Vp2,pro10_12);
4134 Com_Multi(tpro10_p2,pro10_Vp1,pro10_22);
4135
4136
4137 amp_tmp1[0] = temp_PDF1*pro10_12[0] ;
4138 amp_tmp1[1] = temp_PDF1*pro10_12[1] ;
4139 amp_tmp2[0] = temp_PDF2*pro10_22[0] ;
4140 amp_tmp2[1] = temp_PDF2*pro10_22[1] ;
4141 }
4142
4143 else if(modetype[i]==42){ //k1400 to kst0 pi0
4144 if(g2[i]==1020){ //0101---SS
4145
4146 if(B1_k1400_rho0==-1) {
4147 B1_k1400_rho01=BarrierN(1,sk1400rho01,sPip,sPim,rRes2,mass2[i]);
4148 B1_k1400_rho02=BarrierN(1,sk1400rho02,sPip,sPim,rRes2,mass2[i]);
4149 }
4150
4151 if(B1_k1400_kst0==-1) {
4152 B1_k1400_kst01=BarrierN(1,sk1400kst01,sKs,sPi01,rRes2,0.89555);
4153 B1_k1400_kst02=BarrierN(1,sk1400kst02,sKs,sPi02,rRes2,0.89555);
4154 }
4155
4156 calt1(Pip,Pim,t1k1400rho01); calt1(Pip,Pim,t1k1400rho02);
4157 calt1(PKs,Pi01,t1k1400kst01);
4158 calt1(PKs,Pi02,t1k1400kst02);
4159 calG2(pk1400kst01,Pi02,p2_k11);
4160 calG2(pk1400kst02,Pi01,p2_k12);
4161 for(int i=0; i<4; i++)
4162 {
4163 double temt1t1kst01 = t1k1400kst01[i]*G[i][i];
4164 double temt1t1kst02 = t1k1400kst02[i]*G[i][i];
4165 for(int j=0; j<4; j++)
4166 {
4167 temp_PDF1 += t1k1400rho01[j]*G[j][j]*temt1t1kst01*p2_k11[i][j];
4168 temp_PDF2 += t1k1400rho02[j]*G[j][j]*temt1t1kst02*p2_k12[i][j];
4169 }
4170 }
4171
4172 temp_PDF1 = temp_PDF1*B1_k1400_rho01*B1_k1400_kst01;
4173 temp_PDF2 = temp_PDF2*B1_k1400_rho02*B1_k1400_kst02;
4174 }
4175
4176 if(g2[i]==1120){ //0101---SS
4177 if(B1_D0_K1400rho0==-1) {
4178 B1_D0_K1400rho01=BarrierN(1,sD0,sk14001,sk1400rho01,rRes2,mD0M);
4179 B1_D0_K1400rho02=BarrierN(1,sD0,sk14002,sk1400rho02,rRes2,mD0M);
4180 }
4181 if(B1_k1400_rho0==-1) {
4182 B1_k1400_rho01=BarrierN(1,sk1400rho01,sPip,sPim,rRes2,mass2[i]);
4183 B1_k1400_rho02=BarrierN(1,sk1400rho02,sPip,sPim,rRes2,mass2[i]);
4184 }
4185 if(B1_k1400_kst0==-1) {
4186 B1_k1400_kst01=BarrierN(1,sk1400kst01,sKs,sPi01,rRes2,0.89555);
4187 B1_k1400_kst02=BarrierN(1,sk1400kst02,sKs,sPi02,rRes2,0.89555);
4188 }
4189
4190 calt1(Pip,Pim,t1k1400rho01); calt1(Pip,Pim,t1k1400rho02);
4191 calt1(PKs,Pi01,t1k1400kst01);
4192 calt1(PKs,Pi02,t1k1400kst02);
4193 calt1(pk14001,pk1400rho01,t1D0_k1400rho01);
4194 calt1(pk14002,pk1400rho02,t1D0_k1400rho02);
4195 calG2(pk1400kst01,Pi02,p2_k11);
4196 calG2(pk1400kst02,Pi01,p2_k12);
4197 for(int i=0; i<4; i++)
4198 {
4199 double temt1t1rho01 = t1k1400rho01[i]*G[i][i];
4200 double temt1t1rho02 = t1k1400rho02[i]*G[i][i];
4201
4202 for(int j=0; j<4; j++)
4203 {
4204 double temt1t1kst01 = t1k1400kst01[i]*G[i][i];
4205 double temt1t1kst02 = t1k1400kst02[i]*G[i][i];
4206
4207 for(int k=0; k<4; k++)
4208 {
4209 double t1_D0_k1400rho01 = t1D0_k1400rho01[k]*G[k][k];
4210 double t1_D0_k1400rho02 = t1D0_k1400rho02[k]*G[k][k];
4211 for(int l=0; l<4; j++)
4212 {
4213 double pD0_k1400rho01 = pD0[l]*G[l][l];
4214 double pD0_k1400rho02 = pD0[l]*G[l][l];
4215
4216 for(int m=0; m<4; m++)
4217 {
4218 temp_PDF1 += temt1t1kst01*temt1t1rho01*t1_D0_k1400rho01*pD0_k1400rho01*p2_k11[m][j]*G[m][m]*E[i][k][l][m];
4219 temp_PDF2 += temt1t1kst02*temt1t1rho02*t1_D0_k1400rho02*pD0_k1400rho02*p2_k12[m][j]*G[m][m]*E[i][k][l][m];
4220 }
4221 }
4222 }
4223 }
4224 }
4225 temp_PDF1 = temp_PDF1*B1_k1400_rho01*B1_k1400_kst01*B1_D0_K1400rho01;
4226 temp_PDF2 = temp_PDF2*B1_k1400_rho02*B1_k1400_kst02*B1_D0_K1400rho02;
4227 }
4228
4229 if(g0[i] == 1){//a1
4230 if(g2[i]==1020||g2[i]==1120) {
4231 propagatorRBW(mass1sq,mass1[i],width1[i],sk14001,sk1400kst01,sPi02,rRes2,0,pro42_21);
4232 propagatorRBW(mass1sq,mass1[i],width1[i],sk14002,sk1400kst02,sPi01,rRes2,0,pro42_22);
4233 }
4234 else{
4235 propagatorRBW(mass1sq,mass1[i],width1[i],sk14001,sk1400kst01,sPi02,rRes2,2,pro42_21);
4236 propagatorRBW(mass1sq,mass1[i],width1[i],sk14002,sk1400kst02,sPi01,rRes2,2,pro42_22);
4237 }
4238 propagatorRBW(0.79834225,0.89555,0.0473,sk1400kst01,sKs,sPi01,rRes2,1,pro10_25);//kst1
4239 propagatorRBW(0.79834225,0.89555,0.0473,sk1400kst02,sKs,sPi02,rRes2,1,pro10_26);//kst1a
4240
4241 }
4242 else if(g0[i]==0){
4243 pro42_21[0] = 1; pro42_21[1] = 0;
4244 pro42_22[0] = 1; pro42_22[1] = 0;
4245 }
4246
4247 Com_Multi(pro42_21,pro10_25,tpro10_42);
4248 Com_Multi(pro42_22,pro10_26,tpro11_42);
4249
4250 if(g1[i]==1){
4251 propagatorGS(mass2sq,mass2[i],width2[i],sk1400rho01,sPip,sPim,rRes2,pro10_23);
4252 propagatorGS(mass2sq,mass2[i],width2[i],sk1400rho02,sPip,sPim,rRes2,pro10_24);
4253 }
4254
4255 else if(g1[i]==0){
4256 pro10_23[0] = 1; pro10_23[1] = 0;
4257 pro10_24[0] = 1; pro10_24[1] = 0;
4258 }
4259
4260
4261 Com_Multi(tpro10_42,pro10_23,pro10_42);//1p
4262 Com_Multi(tpro11_42,pro10_24,pro11_42);//2p
4263
4264 amp_tmp1[0] = temp_PDF1*pro10_42[0] ;
4265 amp_tmp1[1] = temp_PDF1*pro10_42[1] ;
4266 amp_tmp2[0] = temp_PDF2*pro11_42[0] ;
4267 amp_tmp2[1] = temp_PDF2*pro11_42[1] ;
4268 }
4269
4270
4271 else if(modetype[i]==39){
4272 if (g2[i]==1)
4273 {
4274 if(B1_omega10==-1) {
4275
4276 B1_omega10=BarrierN(1,somega1,srho01,sPi01,rRes2,mass2[i]);
4277 B1_omega1p=BarrierN(1,somega1,srhop1,sPim,rRes2,mass2[i]);
4278 B1_omega1m=BarrierN(1,somega1,srhom1,sPip,rRes2,mass2[i]);
4279
4280 B1_omega20=BarrierN(1,somega2,srho02,sPi02,rRes2,mass2[i]);
4281 B1_omega2p=BarrierN(1,somega2,srhop2,sPim,rRes2,mass2[i]);
4282 B1_omega2m=BarrierN(1,somega2,srhom2,sPip,rRes2,mass2[i]);
4283 }
4284
4285 if(B1_rho14501==-1) {
4286
4287 B1_rho14501=BarrierN(1,srho1450,somega1,sPi02,rRes2,mass1[i]);
4288 B1_rho14502=BarrierN(1,srho1450,somega2,sPi01,rRes2,mass1[i]);
4289 }
4290
4291 if(B1_D0_rho1450==-1) {
4292
4293 B1_D0_rho1450=BarrierN(1,sD0,srho1450,sKs,rDs2,mD0M);
4294 }
4295
4296 calt1(prho1450,PKs,t1D0_rho1450ks0);
4297 calG2(pomega1,Pi02,p1rho14501);calG2(pomega2,Pi01,p1rho14502);
4298 calt1(pomega1,Pi02,t1rho14501);calt1(pomega2,Pi01,t1rho14502);
4299 calG2(prho01,Pi01,p1omega01);calG2(prho02,Pi02,p1omega02);
4300 calG2(prhop1,Pim,p1omegap1);
4301 calG2(prhop2,Pim,p1omegap2);calG2(prhom1,Pip,p1omegam1);
4302 calG2(prhom2,Pip,p1omegam2);
4303 calt1(prho01,Pi01,t1omega01);calt1(prho02,Pi02,t1omega02);
4304 calt1(prhop1,Pim,t1omegap1);
4305 calt1(prhop2,Pim,t1omegap2);calt1(prhom1,Pip,t1omegam1);
4306 calt1(prhom2,Pip,t1omegam2);
4307 calt1(Pip,Pim,t1rho01); calt1(Pip,Pim,t1rho02);
4308 calt1(Pip,Pi01,t1rhop1); calt1(Pip,Pi02,t1rhop2);
4309 calt1(Pi01,Pim,t1rhom1); calt1(Pi02,Pim,t1rhom2);
4310
4311 for(int i=0; i<4; i++)
4312 {
4313 double temt1D0_rho1450ks0 = t1D0_rho1450ks0[i]*G[i][i];
4314
4315 for(int j=0; j<4; j++)
4316 {
4317 double temp1rho14501 = p1rho14501[i][j]*G[j][j];
4318 double temp1rho14502 = p1rho14502[i][j]*G[j][j];
4319
4320
4321 for(int k=0; k<4; k++)
4322 {
4323
4324 for(int l=0; l<4; l++)
4325 {
4326 double temt1t1rho14501 = t1rho14501[l]*G[l][l];
4327 double temt1t1rho14502 = t1rho14502[l]*G[l][l];
4328
4329 for(int m=0; m<4; m++)
4330 { double temprho1450 = prho1450[m]*G[m][m]*E[j][k][l][m];;
4331
4332 for(int n=0; n<4; n++)
4333 {
4334 double tempomega1 = pomega1[n]*G[n][n];
4335 double tempomega2 = pomega2[n]*G[n][n];
4336
4337 for(int o=0; o<4; o++)
4338 {
4339
4340 double temp1omega01 = p1omega01[k][o]*G[k][k]*G[o][o];
4341 double temp1omega02 = p1omega02[k][o]*G[k][k]*G[o][o];
4342 double temp1omegap1 = p1omegap1[k][o]*G[k][k]*G[o][o];
4343 double temp1omegap2 = p1omegap2[k][o]*G[k][k]*G[o][o];
4344 double temp1omegam1 = p1omegam1[k][o]*G[k][k]*G[o][o];
4345 double temp1omegam2 = p1omegam2[k][o]*G[k][k]*G[o][o];
4346 for(int p=0; p<4; p++)
4347 {
4348
4349 double temt1omega01 = t1omega01[p]*G[p][p];
4350 double temt1omega02 = t1omega02[p]*G[p][p];
4351 double temt1omegap1 = t1omegap1[p]*G[p][p];
4352 double temt1omegap2 = t1omegap2[p]*G[p][p];
4353 double temt1omegam1 = t1omegam1[p]*G[p][p];
4354 double temt1omegam2 = t1omegam2[p]*G[p][p];
4355 for(int q=0; q<4; q++)
4356 {
4357 if((j==k)||(j==l)||(j==m)||(k==l)||(k==m)||(l==m)) continue;
4358 if((n==o)||(n==p)||(n==q)||(o==p)||(o==q)||(p==q)) continue;
4359 temp_PDF11 += temprho1450*temt1D0_rho1450ks0*temt1t1rho14502*temp1rho14502*temp1omega02*E[n][o][p][q]*tempomega2*temt1omega02*t1rho02[q]*G[q][q];
4360 temp_PDF12 += temprho1450*temt1D0_rho1450ks0*temt1t1rho14502*temp1rho14502*temp1omegap2*E[n][o][p][q]*tempomega2*temt1omegap2*t1rhop2[q]*G[q][q];
4361 temp_PDF13 += temprho1450*temt1D0_rho1450ks0*temt1t1rho14502*temp1rho14502*temp1omegam2*E[n][o][p][q]*tempomega2*temt1omegam2*t1rhom2[q]*G[q][q];
4362 temp_PDF21 += temprho1450*temt1D0_rho1450ks0*temt1t1rho14501*temp1rho14501*temp1omega01*E[n][o][p][q]*tempomega1*temt1omega01*t1rho01[q]*G[q][q];
4363 temp_PDF22 += temprho1450*temt1D0_rho1450ks0*temt1t1rho14501*temp1rho14501*temp1omegap1*E[n][o][p][q]*tempomega1*temt1omegap1*t1rhop1[q]*G[q][q];
4364 temp_PDF23 += temprho1450*temt1D0_rho1450ks0*temt1t1rho14501*temp1rho14501*temp1omegam1*E[n][o][p][q]*tempomega1*temt1omegam1*t1rhom1[q]*G[q][q];
4365
4366 }
4367 }
4368 }
4369 }
4370 }
4371 }
4372 }
4373 }
4374 }
4375 temp_PDF11 = temp_PDF11*B1_D0_rho1450*B1_omega20*B1_rho14502*B1_V02;
4376 temp_PDF12 = temp_PDF12*B1_D0_rho1450*B1_omega2p*B1_rho14502*B1_Vp2;
4377 temp_PDF13 = temp_PDF13*B1_D0_rho1450*B1_omega2m*B1_rho14502*B1_Vm2;
4378 temp_PDF21 = temp_PDF21*B1_D0_rho1450*B1_omega10*B1_rho14501*B1_V01;
4379 temp_PDF22 = temp_PDF22*B1_D0_rho1450*B1_omega1p*B1_rho14501*B1_Vp1;
4380 temp_PDF23 = temp_PDF23*B1_D0_rho1450*B1_omega1m*B1_rho14501*B1_Vm1;
4381 }
4382 if(g0[i]==1){
4383 propagatorGS(mass1sq,mass1[i],width1[i],srho1450,somega1,sPi02,rRes2,pro9_1);//kst1
4384 propagatorGS(mass1sq,mass1[i],width1[i],srho1450,somega2,sPi01,rRes2,pro9_2);//kst2
4385
4386 }
4387 else if(g0[i]==0){
4388 pro1_1[0] = 1; pro1_1[1] = 0;
4389 pro1_2[0] = 1; pro1_2[1] = 0;
4390 }
4391 //kst
4392 if(g1[i]==1){
4393 propagator(mass2sq,mass2[i],width2[i],somega1,pro9_01);//ome1--rho0 pi01
4394 propagator(mass2sq,mass2[i],width2[i],somega1,pro9_p1);//ome1--rhop (pi01)
4395 propagator(mass2sq,mass2[i],width2[i],somega1,pro9_m1);//ome1--rhom (pi01)
4396 propagator(mass2sq,mass2[i],width2[i],somega2,pro9_02);//ome2--rho0 pi02
4397 propagator(mass2sq,mass2[i],width2[i],somega2,pro9_p2);//ome2--rhop (pi02)
4398 propagator(mass2sq,mass2[i],width2[i],somega2,pro9_m2);//ome2--rhom(pi02)
4399 }
4400 else if(g1[i]==0){
4401 pro9_01[0] = 1; pro9_01[1] = 0; pro9_p1[0] = 1; pro9_p1[1] = 0; pro9_m1[0] = 1; pro9_m1[1] = 0;
4402 pro9_02[0] = 1; pro9_02[1] = 0; pro9_p2[0] = 1; pro9_p2[1] = 0; pro9_m2[0] = 1; pro9_m2[1] = 0;
4403 }
4404 Com_Multi(pro9_01,pro1V01,tpro9_01); Com_Multi(tpro9_01,pro9_1,pro9_21);
4405 Com_Multi(pro9_p1,pro1Vp1,tpro9_p1); Com_Multi(tpro9_p1,pro9_1,pro9_22);
4406 Com_Multi(pro9_m1,pro1Vm1,tpro9_m1); Com_Multi(tpro9_m1,pro9_1,pro9_23);
4407
4408 Com_Multi(pro9_02,pro1V02,tpro9_02); Com_Multi(tpro9_02,pro9_2,pro9_11);
4409 Com_Multi(pro9_p2,pro1Vp2,tpro9_p2); Com_Multi(tpro9_p2,pro9_2,pro9_12);
4410 Com_Multi(pro9_m2,pro1Vm2,tpro9_m2); Com_Multi(tpro9_m2,pro9_2,pro9_13);
4411
4412 amp_tmp1[0] =-1*(temp_PDF11*pro9_11[0]) + temp_PDF12*pro9_12[0] + temp_PDF13*pro9_13[0];
4413 amp_tmp1[1] =-1*(temp_PDF11*pro9_11[1]) + temp_PDF12*pro9_12[1] + temp_PDF13*pro9_13[1];
4414 amp_tmp2[0] =-1*(temp_PDF21*pro9_21[0]) + temp_PDF22*pro9_22[0] + temp_PDF23*pro9_23[0];
4415 amp_tmp2[1] =-1*(temp_PDF21*pro9_21[1]) + temp_PDF22*pro9_22[1] + temp_PDF23*pro9_23[1];
4416
4417 // amp_tmp1[0] =temp_PDF11*pro_11[0] + temp_PDF12*pro_12[0] + temp_PDF13*pro_13[0];
4418 // amp_tmp1[1] =temp_PDF11*pro_11[1] + temp_PDF12*pro_12[1] + temp_PDF13*pro_13[1];
4419 // amp_tmp2[0] =temp_PDF21*pro_21[0] + temp_PDF22*pro_22[0] + temp_PDF23*pro_23[0];
4420 // amp_tmp2[1] =temp_PDF21*pro_21[1] + temp_PDF22*pro_22[1] + temp_PDF23*pro_23[1];
4421
4422
4423 }
4424
4425 else if(modetype[i]==41){
4426 amp_tmp1[0] = 1.;
4427 amp_tmp1[1] = 0.;
4428 amp_tmp2[0] = 1.;
4429 amp_tmp2[1] = 0.;
4430 }
4431
4432 //////////////////////////////////////////////
4433 amp_tmp[0] = amp_tmp1[0]+amp_tmp2[0];
4434 amp_tmp[1] = amp_tmp1[1]+amp_tmp2[1];
4435 Com_Multi(amp_tmp,cof,amp_PDF);
4436 PDF[0] += amp_PDF[0];
4437 PDF[1] += amp_PDF[1];
4438
4439 }
4440
4441 double value = PDF[0]*PDF[0] + PDF[1]*PDF[1];
4442 if(value <=0) value = 1e-20;
4443
4444 Result = value;
4445}
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
double mass
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
const Int_t n
TF1 * g1
EvtComplex exp(const EvtComplex &c)
double a1width[3000]
****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
TCrossPart * CS
Definition Mcgpj.cxx:51
TTree * t
Definition binning.cxx:23
void getName(std::string &name)
void decay(EvtParticle *p)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
void setProbMax(double prbmx)
EvtId getParentId()
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void setProb(double prob)
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:287
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double get(int i) const
const double b
Definition slope.cxx:9