BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtD0To2pip2pim.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of models developed at BES collaboration
5// based on the EvtGen framework. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/BesCopyright
9// Copyright (A) 2006 Ping Rong-Gang @IHEP
10//
11// Module: EvtD0To2pip2pim.cc
12//
13// Description: Model provided by user, see BAM-628
14//
15// Modification history:
16//
17// Liaoyuan Dong Aug. 11, 2022 Module created
18//
19//------------------------------------------------------------------------
23#include "EvtGenBase/EvtPDL.hh"
28#include <stdlib.h>
29#include <iostream>
30#include <string>
31#include <complex>
32#include <vector>
33#include <math.h>
34#include "TMath.h"
35using namespace std;
36
38
39void EvtD0To2pip2pim::getName(std::string& model_name){
40 model_name="D0To2pip2pim";
41}
42
46
48 checkNArg(2);
49 checkNDaug(4);
50 charm = getArg(0);
51 tagmode = getArg(1);
52 //std::cout << "Initializing EvtD0To2pip2pim: charm= "<<charm<<" tagmode= "<<tagmode<<std::endl;
53
54 double mag[30], pha[30];
55 mag[0]= 100.0; pha[0]= 0.0;
56 mag[1]= 7.95507; pha[1]= -0.0687407;
57 mag[2]= 37.5559; pha[2]= -1.74946;
58 mag[3]= 61.2172; pha[3]= 2.98079;
59 mag[4]= 187.79; pha[4]= 2.64471;
60 mag[5]= 385.474; pha[5]= -0.137107;
61 mag[6]= 0.330788; pha[6]= 0.268133;
62 mag[7]= 127.158; pha[7]= -2.47773;
63 mag[8]= 339.914; pha[8]= 2.22856;
64 mag[9]= 0.320888; pha[9]= -2.6194;
65 mag[10]=0.366283; pha[10]=-0.26867;
66 mag[11]=86.0865; pha[11]=-2.49649;
67 mag[12]=6.1541; pha[12]=-1.18299;
68 mag[13]=56.6067; pha[13]=0.142977;
69 mag[14]=92.3073; pha[14]=-2.15881;
70 mag[15]=10.5885; pha[15]=-3.03166;
71 mag[16]=8.36765; pha[16]=1.8417;
72 mag[17]=6.56437; pha[17]=-2.93087;
73 mag[18]=15.7197; pha[18]=0.96925;
74 mag[19]=21.4195; pha[19]=-1.23701;
75 mag[20]=56.8867; pha[20]=-0.385837;
76 mag[21]=231.626; pha[21]=2.14842;
77 mag[22]=2938.45; pha[22]=-0.693491;
78 mag[23]=7252.7; pha[23]=2.23659;
79 mag[24]=5165.87; pha[24]=0.913557;
80 mag[25]=11508.6; pha[25]=-1.07187;
81 mag[26]=2461.86; pha[26]=1.8709;
82 mag[27]=8757.75; pha[27]=2.40756;
83 mag[28]=19.7413; pha[28]=-1.0753;
84 mag[29]=66.3826; pha[29]=2.34666;
85
86 fitpara.clear();
87 for(int i=0; i<30; i++){
88 complex<double> ctemp(mag[i]*cos(pha[i]),mag[i]*sin(pha[i]));
89 fitpara.push_back(ctemp);
90 }
91
92 g_uv.clear();
93 for(int i=0; i<4; i++){
94 for(int j=0; j<4; j++){
95 if(i!=j){
96 g_uv.push_back(0.0);
97 }else if(i<3){
98 g_uv.push_back(-1.0);
99 }else if(i==3){
100 g_uv.push_back(1.0);
101 }
102 }
103 }
104
105 epsilon_uvmn.clear();
106 for(int i=0; i<4; i++){
107 for(int j=0; j<4; j++){
108 for(int k=0; k<4; k++){
109 for(int l=0; l<4; l++){
110 if(i==j || i==k || i==l || j==k || j==l || k==l){
111 epsilon_uvmn.push_back(0.0);
112 }else{
113 if(i==0 && j==1 && k==2 && l==3) epsilon_uvmn.push_back(1.0);
114 if(i==0 && j==1 && k==3 && l==2) epsilon_uvmn.push_back(-1.0);
115 if(i==0 && j==2 && k==1 && l==3) epsilon_uvmn.push_back(-1.0);
116 if(i==0 && j==2 && k==3 && l==1) epsilon_uvmn.push_back(1.0);
117 if(i==0 && j==3 && k==1 && l==2) epsilon_uvmn.push_back(1.0);
118 if(i==0 && j==3 && k==2 && l==1) epsilon_uvmn.push_back(-1.0);
119
120 if(i==1 && j==0 && k==2 && l==3) epsilon_uvmn.push_back(-1.0);
121 if(i==1 && j==0 && k==3 && l==2) epsilon_uvmn.push_back(1.0);
122 if(i==1 && j==2 && k==0 && l==3) epsilon_uvmn.push_back(1.0);
123 if(i==1 && j==2 && k==3 && l==0) epsilon_uvmn.push_back(-1.0);
124 if(i==1 && j==3 && k==0 && l==2) epsilon_uvmn.push_back(-1.0);
125 if(i==1 && j==3 && k==2 && l==0) epsilon_uvmn.push_back(1.0);
126
127 if(i==2 && j==0 && k==1 && l==3) epsilon_uvmn.push_back(1.0);
128 if(i==2 && j==0 && k==3 && l==1) epsilon_uvmn.push_back(-1.0);
129 if(i==2 && j==1 && k==0 && l==3) epsilon_uvmn.push_back(-1.0);
130 if(i==2 && j==1 && k==3 && l==0) epsilon_uvmn.push_back(1.0);
131 if(i==2 && j==3 && k==0 && l==1) epsilon_uvmn.push_back(1.0);
132 if(i==2 && j==3 && k==1 && l==0) epsilon_uvmn.push_back(-1.0);
133
134 if(i==3 && j==0 && k==1 && l==2) epsilon_uvmn.push_back(-1.0);
135 if(i==3 && j==0 && k==2 && l==1) epsilon_uvmn.push_back(1.0);
136 if(i==3 && j==1 && k==0 && l==2) epsilon_uvmn.push_back(1.0);
137 if(i==3 && j==1 && k==2 && l==0) epsilon_uvmn.push_back(-1.0);
138 if(i==3 && j==2 && k==0 && l==1) epsilon_uvmn.push_back(-1.0);
139 if(i==3 && j==2 && k==1 && l==0) epsilon_uvmn.push_back(1.0);
140
141 }
142 }
143 }
144 }
145 }
146
147 _nd = 4;
148 math_pi = 3.1415926f;
149 mass_Pion = 0.13957f;
150
151 rRes = 3.0*0.197321;
152 rD = 5.0*0.197321;
153 m_Pi = 0.139570;
154 m2_Pi = m_Pi*m_Pi;
155
156 m0_rho770 = 0.77526;
157 w0_rho770 = 0.1478;
158
159 m0_rho1450 = 1.465;
160 w0_rho1450 = 0.400;
161
162 m0_f21270 = 1.2755;
163 w0_f21270 = 0.1867;
164
165 m0_a11260 = 1.1337;
166 g1_a11260 = 0.00335;
167 g2_a11260 = 0.0;
168
169 m0_pi1300 = 1.498;
170 w0_pi1300 = 0.590;
171
172 m0_a11420 = 1.411;
173 w0_a11420 = 0.161;
174
175 m0_a11640 = 1.655;
176 w0_a11640 = 0.254;
177
178 m0_a21320 = 1.3186;
179 w0_a21320 = 0.105;
180
181 m0_pi11400 = 1.354;
182 w0_pi11400 = 0.330;
183
184 s0_prod = -5.0;
185
186 return;
187}
188
190 setProbMax(1999257515.2);
191}
192
194/*
195 double maxprob = 0.0;
196 for(int ir=0;ir<=60000000;ir++){
197 p->initializePhaseSpace(getNDaug(),getDaugs());
198 for(int i=0; i<_nd; i++){
199 _p4Lab[i]=p->getDaug(i)->getP4Lab();
200 _p4CM[i]=p->getDaug(i)->getP4();
201 }
202 double Prob = AmplitudeSquare(charm, tagmode);
203 if(Prob>maxprob) {
204 maxprob=Prob;
205 std::cout << "Max PDF = " << ir << " prob= " << Prob << std::endl;
206 }
207 }
208 std::cout << "Max!!!!!!!!!!! " << maxprob<< std::endl;
209*/
211 for(int i=0; i<_nd; i++){
212 _p4Lab[i]=p->getDaug(i)->getP4Lab();
213 _p4CM[i]=p->getDaug(i)->getP4();
214 }
215 double prob = AmplitudeSquare(charm, tagmode);
216 setProb(prob);
217 return;
218}
219
220void EvtD0To2pip2pim::setInput(double* pip1, double* pim1, double* pip2, double* pim2){
221 m_Pip1.clear(); m_Pim1.clear(); m_Pip2.clear(); m_Pim2.clear();
222 m_Pip1.push_back(pip1[0]); m_Pim1.push_back(pim1[0]); m_Pip2.push_back(pip2[0]); m_Pim2.push_back(pim2[0]);
223 m_Pip1.push_back(pip1[1]); m_Pim1.push_back(pim1[1]); m_Pip2.push_back(pip2[1]); m_Pim2.push_back(pim2[1]);
224 m_Pip1.push_back(pip1[2]); m_Pim1.push_back(pim1[2]); m_Pip2.push_back(pip2[2]); m_Pim2.push_back(pim2[2]);
225 m_Pip1.push_back(pip1[3]); m_Pim1.push_back(pim1[3]); m_Pip2.push_back(pip2[3]); m_Pim2.push_back(pim2[3]);
226}
227
228vector<double> EvtD0To2pip2pim::sum_tensor(vector<double> pa, vector<double> pb) {
229 if(pa.size()!=pb.size()){
230 cout<<"error sum tensor"<<endl;
231 exit(0);
232 }
233 vector<double> temp; temp.clear();
234 for(int i=0; i<pa.size(); i++){
235 double sum = pa[i] + pb[i];
236 temp.push_back(sum);
237 }
238 return temp;
239}
240
241double EvtD0To2pip2pim::contract_11_0(vector<double> pa, vector<double> pb){
242 if(pa.size()!=pb.size() || pa.size()!=4) {
243 cout<<"error contract 11->0"<<endl;
244 exit(0);
245 }
246 double temp = pa[3]*pb[3] - pa[0]*pb[0] - pa[1]*pb[1] - pa[2]*pb[2];
247 return temp;
248}
249
250vector<double> EvtD0To2pip2pim::contract_21_1(vector<double> pa, vector<double> pb){
251 if(pa.size()!=16 || pb.size()!=4) {
252 cout<<"error contract 21->1"<<endl;
253 exit(0);
254 }
255 vector<double> temp; temp.clear();
256 for(int i=0; i<4; i++){
257 double sum = 0;
258 for(int j=0; j<4; j++){
259 int idx = i*4+j;
260 sum += pa[idx]*pb[j]*g_uv[4*j+j];
261 }
262 temp.push_back(sum);
263 }
264 return temp;
265}
266
267double EvtD0To2pip2pim::contract_22_0(vector<double> pa, vector<double> pb){
268 if(pa.size()!=pb.size() || pa.size()!=16) {
269 cout<<"error contract 22->0"<<endl;
270 exit(0);
271 }
272 double temp = 0;
273 for(int i=0; i<4; i++){
274 for(int j=0; j<4; j++){
275 int idx = i*4+j;
276 temp += pa[idx]*pb[idx]*g_uv[4*i+i]*g_uv[4*j+j];
277 }
278 }
279 return temp;
280}
281
282vector<double> EvtD0To2pip2pim::contract_31_2(vector<double> pa, vector<double> pb){
283 if(pa.size()!=64 || pb.size()!=4) {
284 cout<<"error contract 31->2"<<endl;
285 exit(0);
286 }
287 vector<double> temp; temp.clear();
288 for(int i=0; i<16; i++){
289 double sum = 0;
290 for(int j=0; j<4; j++){
291 int idx = i*4+j;
292 sum += pa[idx]*pb[j]*g_uv[4*j+j];
293 }
294 temp.push_back(sum);
295 }
296 return temp;
297}
298
299vector<double> EvtD0To2pip2pim::contract_41_3(vector<double> pa, vector<double> pb){
300 if(pa.size()!=256|| pb.size()!=4) {
301 cout<<"error contract 41->3"<<endl;
302 exit(0);
303 }
304 vector<double> temp; temp.clear();
305 for(int i=0; i<64; i++){
306 double sum = 0;
307 for(int j=0; j<4; j++){
308 int idx = i*4+j;
309 sum += pa[idx]*pb[j]*g_uv[4*j+j];
310 }
311 temp.push_back(sum);
312 }
313 return temp;
314}
315
316vector<double> EvtD0To2pip2pim::contract_42_2(vector<double> pa, vector<double> pb){
317 if(pa.size()!=256|| pb.size()!=16) {
318 cout<<"error contract 42->2"<<endl;
319 exit(0);
320 }
321 vector<double> temp; temp.clear();
322 for(int i=0; i<16; i++){
323 double sum = 0;
324 for(int j=0; j<4; j++){
325 for(int k=0; k<4; k++){
326 int idxa = i*16+j*4+k;
327 int idxb = j*4+k;
328 sum += pa[idxa] * pb[idxb] * g_uv[4*j+j] * g_uv[4*k+k];
329 }
330 }
331 temp.push_back(sum);
332 }
333 return temp;
334}
335
336vector<double> EvtD0To2pip2pim::contract_22_2(vector<double> pa, vector<double> pb){
337 if(pa.size()!=16|| pb.size()!=16) {
338 cout<<"error contract 42->2"<<endl;
339 exit(0);
340 }
341 vector<double> temp; temp.clear();
342 for(int i=0; i<4; i++){
343 for(int j=0; j<4; j++){
344 double sum = 0;
345 for(int k=0; k<4; k++){
346 int idxa = i*4+k;
347 int idxb = j*4+k;
348 sum += pa[idxa] * pb[idxb] * g_uv[4*k+k];
349 }
350 temp.push_back(sum);
351 }
352 }
353 return temp;
354}
355
356/*
357 vector<double> EvtD0To2pip2pim::contract_11_2(vector<double> pa, vector<double> pb){
358 if(pa.size()!=pb.size() || pa.size()!=4) {
359 cout<<"error contract 11->2"<<endl;
360 exit(0);
361 }
362 vector<double> temp; temp.clear();
363 for(int i=0; i<4; i++){
364 for(int j=0; j<4; j++){
365 double prod = pa[i]*pb[j];
366 temp.push_back(prod);
367 }
368 }
369 return temp;
370 }
371
372 vector<double> EvtD0To2pip2pim::contract_22_4(vector<double> pa, vector<double> pb){
373 if(pa.size()!=pb.size() || pa.size()!=16) {
374 cout<<"error contract 22->4"<<endl;
375 exit(0);
376 }
377 vector<double> temp; temp.clear();
378 for(int i=0; i<16; i++){
379 for(int j=0; j<16; j++){
380 double prod = pa[i]*pb[j];
381 temp.push_back(prod);
382 }
383 }
384 return temp;
385 }
386 */
387
388//OrbitalTensors
389vector<double> EvtD0To2pip2pim::OrbitalTensors(vector<double> pa, vector<double> pb, vector<double> pc, double r, int rank)
390{
391 if(pa.size()!=4 || pb.size()!=4 || pc.size()!=4) {
392 cout<<"Error: pa, pb, pc"<<endl;
393 exit(0);
394 }
395 if(rank<0){
396 cout<<"Error: L<0 !!!"<<endl;
397 exit(0);
398 }
399
400 // relative momentum
401 vector<double> mr; mr.clear();
402
403 for(int i=0; i<4; i++){
404 double temp = pb[i] - pc[i];
405 mr.push_back(temp);
406 }
407
408 // "Masses" of particles
409 double msa = contract_11_0(pa, pa);
410 double msb = contract_11_0(pb, pb);
411 double msc = contract_11_0(pc, pc);
412
413 // Q^2_abc
414 double top = msa + msb - msc;
415 double Q2abc = top*top/(4.0*msa) - msb;
416
417 // Barrier factors
418 double Q_0 = 0.197321f/r;
419 double Q_02 = Q_0*Q_0;
420 double Q_04 = Q_02*Q_02;
421 // double Q_06 = Q_04*Q_02;
422 // double Q_08 = Q_04*Q_04;
423
424 double Q4abc = Q2abc*Q2abc;
425 // double Q6abc = Q4abc*Q2abc;
426 // double Q8abc = Q4abc*Q4abc;
427
428 double mB1 = sqrt(2.0f/(Q2abc + Q_02));
429 double mB2 = sqrt(13.0f/(Q4abc + (3.0f*Q_02)*Q2abc + 9.0f*Q_04));
430 // mB3 = &sqrt(277.0f/(Q6abc + (6.0f*Q_02)*Q4abc + (45.0f*Q_04)*Q2abc + 225.0f*Q_06));
431 // mB4 = &sqrt(12746.0f/(Q8abc + (10.0f*Q_02)*Q6abc + (135.0f*Q_04)*Q4abc + (1575.0f*Q_06)*Q2abc + 11025.0f*Q_08));
432
433 // Projection Operator 2-rank
434 vector<double> proj_uv; proj_uv.clear();
435 for(int i=0; i<4; i++){
436 for(int j=0; j<4; j++){
437 int idx = i*4 + j;
438 double temp = -g_uv[idx] + pa[i]*pa[j]/msa;
439 proj_uv.push_back(temp);
440 }
441 }
442
443 // Orbital Tensors
444 if(rank==0)
445 {
446 vector<double> t; t.clear();
447 t.push_back(1.0);
448 return t;
449
450 }else if(rank<3)
451 {
452 vector<double> t_u; t_u.clear();
453 vector<double> Bt_u; Bt_u.clear();
454 for(int i=0; i<4; i++){
455 double temp = 0;
456 for(int j=0; j<4; j++){
457 int idx = i*4 + j;
458 temp += -proj_uv[idx]*mr[j]*g_uv[j*4+j];
459 }
460 t_u.push_back(temp);
461 Bt_u.push_back(temp*mB1);
462 }
463 if(rank==1) return Bt_u;
464
465 double t_u2 = contract_11_0(t_u,t_u);
466
467 vector<double> Bt_uv; Bt_uv.clear();
468 for(int i=0; i<4; i++){
469 for(int j=0; j<4; j++){
470 int idx = 4*i + j;
471 double temp = t_u[i]*t_u[j] + (1.0/3.0)*proj_uv[idx]*t_u2;
472 Bt_uv.push_back(temp*mB2);
473 }
474 }
475 if(rank==2) return Bt_uv;
476
477 }else
478 {
479 cout<<"rank>2: please add it by yourself!!!"<<endl;
480 exit(0);
481 }
482}
483
484// projection Tensor
485vector<double> EvtD0To2pip2pim::ProjectionTensors(vector<double> pa, int rank)
486{
487 if(pa.size()!=4) {
488 cout<<"Error: pa"<<endl;
489 exit(0);
490 }
491 if(rank<0){
492 cout<<"Error: L<0 !!!"<<endl;
493 exit(0);
494 }
495
496 double msa = contract_11_0(pa, pa);
497
498 // Projection Operator 2-rank
499 vector<double> proj_uv; proj_uv.clear();
500 for(int i=0; i<4; i++){
501 for(int j=0; j<4; j++){
502 int idx = i*4 + j;
503 double temp = -g_uv[idx] + pa[i]*pa[j]/msa;
504 proj_uv.push_back(temp);
505 }
506 }
507
508 // Orbital Tensors
509 if(rank==0)
510 {
511 vector<double> t; t.clear();
512 t.push_back(1.0);
513 return t;
514
515 }else if(rank==1)
516 {
517 return proj_uv;
518 }else if(rank==2)
519 {
520 vector<double> proj_uvmn; proj_uvmn.clear();
521 for(int i=0; i<4; i++){
522 for(int j=0; j<4; j++){
523 for(int k=0; k<4; k++){
524 for(int l=0; l<4; l++){
525
526 int idx1_1 = 4*i + k;
527 int idx1_2 = 4*i + l;
528 int idx1_3 = 4*i + j;
529
530 int idx2_1 = 4*j + l;
531 int idx2_2 = 4*j + k;
532 int idx2_3 = 4*k + l;
533
534 double temp = (1.0/2.0)*(proj_uv[idx1_1]*proj_uv[idx2_1] + proj_uv[idx1_2]*proj_uv[idx2_2]) - (1.0/3.0)*proj_uv[idx1_3]*proj_uv[idx2_3];
535 proj_uvmn.push_back(temp);
536 }
537 }
538 }
539 }
540 return proj_uvmn;
541
542 }else
543 {
544 cout<<"rank>2: please add it by yourself!!!"<<endl;
545 exit(0);
546 }
547}
548double EvtD0To2pip2pim::fundecaymomentum(double mr2, double m1_2, double m2_2){
549 double mr = sqrt(mr2);
550 double poly = mr2*mr2 + m1_2*m1_2 + m2_2*m2_2 - 2*m1_2*mr2 -2*m2_2*mr2 -2*m1_2*m2_2;
551 double ret = sqrt(poly)/(2*mr);
552 if(poly<0)
553 //if(sqrt(m1_2) +sqrt(m2_2) > mr)
554 ret = 0.0f;
555 return ret;
556}
557
558complex<double> EvtD0To2pip2pim::breitwigner(double mx2, double mr, double wr)
559{
560 double output_x = 0;
561 double output_y = 0;
562
563 double mr2 = mr*mr;
564 double diff = mr2-mx2;
565 double denom = diff*diff + wr*wr*mr2;
566 if (wr<0) {
567 output_x = 0;
568 output_y = 0;
569 }
570 else if (wr<10) {
571 output_x = diff/denom;
572 output_y = wr*mr/denom;
573 }
574 else { /* phase space */
575 output_x = 1;
576 output_y = 0;
577 }
578 complex<double> output(output_x,output_y);
579 return output;
580}
581
582/* GS propagator */
583double EvtD0To2pip2pim::h(double m, double q){
584 double h = 2.0/math_pi*q/m*log((m+2.0*q)/(2.0*mass_Pion));
585 return h;
586}
587
588double EvtD0To2pip2pim::dh(double m0, double q0){
589 double dh = h(m0,q0)*(1.0/(8.0*q0*q0)-1.0/(2.0*m0*m0))+1.0/(2.0*math_pi*m0*m0);
590 return dh;
591}
592
593double EvtD0To2pip2pim::f(double m0, double sx, double q0, double q){
594 double m = sqrt(sx);
595 double f = m0*m0/(q0*q0*q0)*(q*q*(h(m,q)-h(m0,q0))+(m0*m0-sx)*q0*q0*dh(m0,q0));
596 return f;
597}
598
599double EvtD0To2pip2pim::d(double m0, double q0){
600 double d = 3.0/math_pi*mass_Pion*mass_Pion/(q0*q0)*log((m0+2.0*q0)/(2.0*mass_Pion)) + m0/(2.0*math_pi*q0) - (mass_Pion*mass_Pion*m0)/(math_pi*q0*q0*q0);
601 return d;
602}
603
604double EvtD0To2pip2pim::fundecaymomentum2(double mr2, double m1_2, double m2_2){
605 double mr = sqrt(mr2);
606 double poly = mr2*mr2 + m1_2*m1_2 + m2_2*m2_2 - 2*m1_2*mr2 -2*m2_2*mr2 -2*m1_2*m2_2;
607 double ret = poly/(4.0f*mr2);
608 if(poly<0)
609 ret = 0.0f;
610 return ret;
611}
612
613double EvtD0To2pip2pim::wid(double mass, double sa, double sb, double sc, double r, int l){
614 double widm = 1.0;
615 double sa0 = mass*mass;
616 double m = sqrt(sa);
617 double q = fundecaymomentum2(sa,sb,sc);
618 double q0 = fundecaymomentum2(sa0,sb,sc);
619 double z = q*r*r;
620 double z0 = q0*r*r;
621 double F = 0.0;
622 if(l == 0) F = 1.0;
623 if(l == 1) F = sqrt((1.0+z0)/(1.0+z));
624 if(l == 2) F = sqrt((9.0+3.0*z0+z0*z0)/(9.0+3.0*z+z*z));
625 if(l == 3) F = sqrt((225.0+45.0*z0+6.0*z0*z0+z0*z0*z0)/(225.0+45.0*z+6.0*z*z+z*z*z));
626 if(l == 4) F = sqrt((11025.0+1575.0*z0+135.0*z0*z0+10.0*z0*z0*z0+z0*z0*z0*z0)/(11025.0+1575.0*z+135.0*z*z+10.0*z*z*z+z*z*z*z));
627 double t = sqrt(q/q0);
628 //printf("sa0 = %f, sb = %f, sc = %f, q = %f, q0 = %0.15f, qq0 = %f, t = %f \n",sa0,sb,sc,q,q0,q/q0,t);
629 uint i=0;
630 for(i=0; i<(2*l+1); i++) {
631 widm *= t;
632 }
633 widm *= (mass/m*F*F);
634 return widm;
635}
636
637/* for rho0, use GS, rho0->pi+ pi-, only angular momentum 1*/
638complex<double> EvtD0To2pip2pim::GS(double mx2, double mr, double wr, double m1_2, double m2_2, double r, int l){
639
640 double mr2 = mr*mr;
641 double q = fundecaymomentum(mx2, m1_2, m2_2);
642 double q0 = fundecaymomentum(mr2, m1_2, m2_2);
643 double numer = 1.0+d(mr,q0)*wr/mr;
644 double denom_real = mr2-mx2+wr*f(mr,mx2,q0,q);
645 double denom_imag = mr*wr*wid(mr,mx2,m1_2,m2_2,r,l);//real-i*imag;
646
647 double denom = denom_real*denom_real+denom_imag*denom_imag;
648 double output_x = denom_real*numer/denom;
649 double output_y = denom_imag*numer/denom;
650
651 complex<double> output(output_x,output_y);
652 return output;
653}
654
655complex<double> EvtD0To2pip2pim::RBW(double mx2, double mr, double wr, double m1_2, double m2_2, double r, int l){
656 double mx = sqrt(mx2);
657 double mr2 = mr*mr;
658 double denom_real = mr2-mx2;
659 double denom_imag = 0;
660 if(m1_2>0 && m2_2>0){
661 denom_imag = mr*wr*wid(mr,mx2,m1_2,m2_2,r,l);//real-i*imag;
662 }else{
663 denom_imag = mr*wr;
664 }
665
666 double denom = denom_real*denom_real+denom_imag*denom_imag;
667 double output_x = denom_real/denom;
668 double output_y = denom_imag/denom;
669
670 complex<double> output(output_x,output_y);
671 return output;
672}
673
674/* build a1260 propagator */
675double EvtD0To2pip2pim::widT1260(int i, double g1, double g2){
676
677 double wid1[300] = { 0.00100302, 0.0069383, 0.0223132, 0.0504984, 0.093998, 0.154569, 0.233464, 0.331844, 0.450141, 0.589068,
678 0.748192, 0.928578, 1.13001, 1.35227, 1.59548, 1.86005, 2.14633, 2.45252, 2.78199, 3.13055,
679 3.50351, 3.89773, 4.31274, 4.75409, 5.21133, 5.69991, 6.20735, 6.74638, 7.30128, 7.8858,
680 8.50289, 9.14654, 9.82395, 10.5209, 11.2643, 12.0436, 12.8585, 13.692, 14.598, 15.5291,
681 16.5158, 17.5337, 18.6289, 19.7599, 20.9847, 22.2557, 23.5959, 25.0095, 26.5123, 28.0789,
682 29.7542, 31.5143, 33.3769, 35.3462, 37.3911, 39.5988, 41.874, 44.2815, 46.7975, 49.401,
683 52.0553, 54.7753, 57.5932, 60.4542, 63.3049, 66.0665, 68.8987, 71.6282, 74.2613, 76.8713,
684 79.3528, 81.722, 84.1212, 86.227, 88.4243, 90.3478, 92.2478, 94.1483, 95.8541, 97.5086,
685 99.0092, 100.48, 101.861, 103.153, 104.338, 105.576, 106.696, 107.647, 108.761, 109.725,
686 110.625, 111.529, 112.426, 113.01, 113.877, 114.647, 115.086, 115.856, 116.533, 117.076,
687 117.646, 118.25, 118.653, 119.023, 119.554, 119.958, 120.384, 121.036, 121.402, 121.686,
688 122.44, 122.592, 122.979, 123.39, 123.819, 123.957, 124.459, 124.681, 125.071, 125.405,
689 125.769, 125.978, 126.542, 126.817, 127.017, 127.292, 127.765, 127.989, 128.542, 128.66,
690 128.923, 129.094, 129.441, 129.716, 130.23, 130.506, 130.658, 131.12, 131.308, 131.579,
691 131.994, 132.28, 132.594, 132.79, 133.107, 133.589, 133.935, 134.242, 134.484, 134.765,
692 135.208, 135.58, 135.922, 136.236, 136.545, 136.949, 137.216, 137.503, 137.994, 138.35,
693 138.62, 138.912, 139.413, 139.831, 140.137, 140.478, 141, 141.3, 141.807, 142.291,
694 142.864, 143.315, 143.678, 144.215, 144.587, 145.122, 145.8, 145.885, 146.583, 147.226,
695 147.661, 148.187, 148.698, 149.227, 149.832, 150.548, 151.122, 151.674, 152.074, 152.666,
696 153.295, 153.899, 154.661, 155.364, 155.908, 156.495, 157.36, 157.719, 158.533, 159.287,
697 159.79, 160.654, 161.257, 161.93, 162.437, 163.468, 163.957, 164.631, 165.414, 166.203,
698 166.738, 167.61, 168.453, 169.101, 170.111, 170.333, 171.123, 171.958, 173.018, 173.663,
699 174.213, 175.241, 175.579, 176.435, 177.291, 178.071, 178.969, 179.635, 180.118, 181.078,
700 182.007, 182.73, 183.282, 184.161, 184.981, 185.695, 186.506, 187.16, 187.996, 188.439,
701 189.416, 190.104, 190.759, 191.786, 192.331, 193.318, 193.836, 194.981, 195.634, 196.231,
702 196.832, 197.835, 198.608, 199.273, 199.854, 200.695, 201.719, 202.105, 202.958, 203.707,
703 204.306, 205.319, 205.977, 206.875, 207.687, 208.352, 209.04, 209.352, 210.313, 211.322,
704 212.02, 212.458, 213.246, 214.331, 214.923, 215.466, 216.536, 217.346, 217.867, 218.463,
705 219.201, 219.88, 220.829, 221.461, 222.399, 223.068, 223.712, 224.174, 224.837, 225.838,
706 227.019, 227.171, 227.797, 228.663, 229.429, 230.323, 230.845, 231.574, 232.417, 232.677 };
707 double wid2[300] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
717 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
718 1.87136e-06, 1.50063e-05, 5.10425e-05, 0.000122121, 0.000240853, 0.000420318, 0.000675161, 0.0010173, 0.00146434, 0.00203321,
719 0.00273489, 0.0035927, 0.00462579, 0.00584255, 0.00727372, 0.00895462, 0.0108831, 0.013085, 0.0156197, 0.0184865,
720 0.0217078, 0.0253423, 0.0294103, 0.0339191, 0.0389837, 0.0446351, 0.0508312, 0.0577268, 0.0653189, 0.0737049,
721 0.0829819, 0.0930611, 0.104328, 0.116663, 0.130105, 0.144922, 0.16122, 0.179091, 0.198759, 0.220133,
722 0.243916, 0.269803, 0.298861, 0.330061, 0.365741, 0.40437, 0.447191, 0.49501, 0.548576, 0.606445,
723 0.674414, 0.748353, 0.831686, 0.929938, 1.03771, 1.16187, 1.30387, 1.47341, 1.65629, 1.88318,
724 2.14353, 2.44169, 2.79831, 3.2009, 3.65522, 4.16317, 4.69597, 5.2585, 5.85965, 6.44984,
725 7.04202, 7.60113, 8.14571, 8.73195, 9.24537, 9.75717, 10.2093, 10.6731, 11.1487, 11.5819,
726 12.0158, 12.4253, 12.8113, 13.2073, 13.5995, 13.9317, 14.312, 14.6595, 14.9511, 15.2668,
727 15.6092, 15.9349, 16.1873, 16.5049, 16.819, 17.0743, 17.3621, 17.6094, 17.8418, 18.0681,
728 18.3141, 18.5914, 18.8187, 19.0562, 19.2282, 19.4918, 19.7326, 19.9112, 20.134, 20.3386,
729 20.511, 20.6865, 20.8958, 21.0518, 21.2967, 21.44, 21.6361, 21.8012, 21.9523, 22.1736,
730 22.2615, 22.4207, 22.6056, 22.7198, 22.9299, 23.0605, 23.2959, 23.3808, 23.4961, 23.6793,
731 23.7843, 23.9697, 24.0689, 24.1919, 24.405, 24.3898, 24.6018, 24.7294, 24.789, 24.9978,
732 25.0626, 25.1728, 25.2809, 25.3579, 25.5444, 25.5995, 25.7644, 25.8397, 25.9229, 26.095,
733 26.1495, 26.2899, 26.3871, 26.54, 26.6603, 26.7008, 26.7836, 26.907, 26.9653, 26.9969,
734 27.1226, 27.226, 27.3543, 27.4686, 27.4887, 27.6163, 27.6986, 27.7506, 27.7884, 27.8662,
735 27.9886, 28.0573, 28.1238, 28.2612, 28.3209, 28.3457, 28.4392, 28.5086, 28.6399, 28.7603,
736 28.788, 28.8502, 28.9038, 28.9667, 28.975, 29.0032, 29.2681, 29.2392, 29.2572, 29.3364 };
737
738 return wid1[i]*g1+wid2[i]*g2;
739}
740
741double EvtD0To2pip2pim::anywid1260(double sc, double g1, double g2){
742
743 double smin = (0.13957*3)*(0.13957*3);
744 double dh = 0.01;
745 int od = (sc - 0.18)/dh;
746 double sc_m = 0.18 + od*dh;
747 double widuse = 0;
748 if(sc>=0.18 && sc<=3.17){
749 widuse = ((sc-sc_m)/dh)*(widT1260(od+1,g1,g2)-widT1260(od,g1,g2))+widT1260(od,g1,g2);
750 }else if(sc<0.18 && sc>smin){
751 widuse = ((sc - smin)/(0.18-smin))*widT1260(0,g1,g2);
752 }else if(sc>3.17){
753 widuse = widT1260(299,g1,g2);
754 }else{
755 widuse = 0;
756 }
757 return widuse;
758
759}
760
761complex<double> EvtD0To2pip2pim::RBWa1260(double mx2, double mr, double g1, double g2){
762
763 double mx = sqrt(mx2);
764 double mr2 = mr*mr;
765 double wid0 = anywid1260(mx2,g1,g2);
766
767 double denom_real = mr2-mx2;
768 double denom_imag = mr*wid0;//real-i*imag;
769
770 double denom = denom_real*denom_real+denom_imag*denom_imag;
771 double output_x = denom_real/denom;
772 double output_y = denom_imag/denom;
773
774 complex<double> output(output_x,output_y);
775 return output;
776
777}
778
779/* build pi1300 propagator */
780double EvtD0To2pip2pim::widT1300(int i){
781
782 double wid1[300] = { 0.0702928, 0.399073, 0.991742, 1.82025, 2.85953, 4.08606, 5.48082, 7.02683, 8.70496, 10.5007,
783 12.4053, 14.4026, 16.4831, 18.6423, 20.8642, 23.1544, 25.4896, 27.8703, 30.3015, 32.7861,
784 35.2622, 37.8173, 40.3819, 42.974, 45.5732, 48.2303, 50.8659, 53.5741, 56.28, 59.0242,
785 61.738, 64.5642, 67.377, 70.1605, 73.0155, 75.8849, 78.7611, 81.7366, 84.7156, 87.7527,
786 90.7217, 93.8402, 96.8516, 100.036, 103.168, 106.483, 109.772, 113.098, 116.491, 120.013,
787 123.618, 127.069, 130.983, 134.868, 138.605, 142.625, 147.007, 151.154, 155.625, 160.1,
788 164.776, 169.651, 174.646, 179.669, 185.084, 190.409, 196.147, 201.788, 207.901, 214.041,
789 220.327, 226.505, 233.334, 239.816, 246.878, 253.563, 260.393, 267.453, 274.5, 282.15,
790 289.014, 296.45, 303.808, 311.427, 318.649, 326.965, 334.298, 341.576, 349.715, 356.89,
791 365.029, 372.677, 379.882, 387.677, 395.178, 402.445, 410.353, 418.649, 424.994, 432.156,
792 440.002, 448.394, 454.382, 460.97, 468.446, 475.847, 481.956, 489.729, 496.094, 501.22,
793 509.278, 514.618, 521.06, 528.247, 534.246, 540.312, 547.316, 552.549, 559.193, 566.059,
794 572.882, 578.147, 585.118, 589.989, 596.717, 601.222, 607.749, 613.96, 621.107, 625.218,
795 630.396, 635.57, 641.175, 646.024, 651.984, 657.156, 661.385, 666.804, 672.088, 675.939,
796 681.207, 685.072, 690.63, 694.767, 699.469, 704.1, 709.445, 713.704, 716.909, 720.681,
797 726.12, 730.403, 733.553, 739.123, 742.156, 746.6, 750.027, 753.462, 757.426, 761.595,
798 764.336, 768.251, 772.371, 775.963, 778.886, 781.905, 784.798, 788.825, 792.372, 796.27,
799 800.361, 803.544, 806.544, 808.819, 812.146, 814.989, 819.234, 820.073, 824.067, 828.047,
800 830.277, 833.013, 835.374, 838.463, 840.82, 844.655, 846.391, 849.408, 851.659, 853.977,
801 856.409, 860.029, 862.128, 866.104, 866.864, 869.24, 872.133, 872.591, 876.528, 879.029,
802 880.786, 883.8, 886.065, 887.511, 890.301, 892.086, 894.429, 895.666, 897.961, 900.712,
803 901.559, 904.787, 906.882, 908.034, 911.366, 911.249, 914.274, 916.238, 918.105, 920.585,
804 920.473, 924.468, 923.888, 926.046, 928.648, 930.3, 931.861, 934.253, 934.081, 936.95,
805 938.319, 940.464, 940.539, 943.393, 944.729, 946.944, 947.712, 948.948, 951.026, 952.121,
806 954.114, 955.146, 956.206, 959.056, 960.316, 962.919, 961.946, 964.324, 966.134, 967.689,
807 968.612, 970.357, 972.302, 973.514, 976.512, 975.815, 979.043, 979.486, 981.285, 983.173,
808 983.96, 985.947, 987.447, 988.455, 991.739, 992.1, 993.045, 995.918, 997.377, 999.136,
809 1001.51, 1001.12, 1002.46, 1004.57, 1005.76, 1007.12, 1009.23, 1011.7, 1012.48, 1014.84,
810 1014.21, 1017.28, 1017.22, 1018.95, 1021.8, 1021.94, 1023.22, 1025.13, 1026.01, 1027.8,
811 1030.04, 1030.12, 1031.54, 1033.2, 1034.62, 1035.83, 1037.33, 1037.92, 1038.9, 1041.69 };
812 return wid1[i];
813}
814
815double EvtD0To2pip2pim::anywid1300(double sc){
816
817 double smin = (0.13957*3)*(0.13957*3);
818 double dh = 0.01;
819 int od = (sc - 0.18)/dh;
820 double sc_m = 0.18 + od*dh;
821 double widuse = 0;
822 if(sc>=0.18 && sc<=3.17){
823 widuse = ((sc-sc_m)/dh)*(widT1300(od+1)-widT1300(od))+widT1300(od);
824 }else if(sc<0.18 && sc>smin){
825 widuse = ((sc - smin)/(0.18-smin))*widT1300(0);
826 }else if(sc>3.17){
827 widuse = widT1300(299);
828 }else{
829 widuse = 0;
830 }
831 return widuse;
832}
833
834complex<double> EvtD0To2pip2pim::RBWpi1300(double mx2, double mr, double wr){
835
836 double mx = sqrt(mx2);
837 double mr2 = mr*mr;
838 double g1 = wr/anywid1300(mr2);
839 double wid0 = anywid1300(mx2)*g1;
840
841 double denom_real = mr2-mx2;
842 double denom_imag = mr*wid0;//real-i*imag;
843
844 double denom = denom_real*denom_real+denom_imag*denom_imag;
845 double output_x = denom_real/denom;
846 double output_y = denom_imag/denom;
847
848 complex<double> output(output_x,output_y);
849 return output;
850
851}
852
853/* build a1640 propagator */
854double EvtD0To2pip2pim::widT1640(int i){
855 double wid1[300] = { 1.38316e-05, 0.000403892, 0.00181814, 0.0048161, 0.00982907, 0.0172548, 0.0273979, 0.040567, 0.0569061, 0.0768551,
856 0.100513, 0.128031, 0.159729, 0.195626, 0.236099, 0.280881, 0.330745, 0.386095, 0.446448, 0.511879,
857 0.583827, 0.66167, 0.745453, 0.835386, 0.934317, 1.0386, 1.1513, 1.26975, 1.39901, 1.53362,
858 1.68291, 1.84163, 2.0066, 2.18366, 2.37394, 2.57742, 2.7905, 3.02463, 3.27434, 3.53467,
859 3.80737, 4.10838, 4.41975, 4.76341, 5.12572, 5.51301, 5.91839, 6.36597, 6.8457, 7.33806,
860 7.87328, 8.45901, 9.08869, 9.74744, 10.464, 11.2096, 12.0103, 12.8556, 13.7563, 14.7352,
861 15.7336, 16.7432, 17.8117, 18.9327, 20.0186, 21.1632, 22.3549, 23.5172, 24.6518, 25.7808,
862 26.9103, 28.016, 29.1542, 30.0458, 31.0808, 32.1018, 33.0395, 33.9151, 34.8873, 35.7289,
863 36.5603, 37.2489, 38.023, 38.7983, 39.55, 40.2977, 40.8819, 41.4564, 42.1864, 42.7368,
864 43.3923, 43.8651, 44.4667, 44.8108, 45.3935, 45.9551, 46.2652, 46.8683, 47.1943, 47.6864,
865 48.1666, 48.5599, 48.8894, 49.1867, 49.6234, 49.9326, 50.4594, 50.6707, 51.005, 51.2612,
866 51.7638, 51.8946, 52.3176, 52.5107, 52.7378, 52.9418, 53.4019, 53.3571, 53.7937, 54.137,
867 54.2265, 54.3471, 54.6637, 54.897, 55.2174, 55.1577, 55.7098, 55.8616, 55.8862, 56.2106,
868 56.3357, 56.5165, 56.6819, 56.7906, 56.9814, 57.0507, 57.3059, 57.4898, 57.5848, 57.5792,
869 57.7696, 58.0302, 58.1915, 58.3319, 58.3892, 58.4671, 58.6736, 58.7872, 58.7949, 58.8366,
870 59.0247, 59.0881, 59.2675, 59.479, 59.6261, 59.6111, 59.6055, 59.7286, 59.8806, 60.0424,
871 60.1126, 60.0742, 60.2066, 60.2253, 60.565, 60.6557, 60.7359, 60.6405, 60.6429, 60.8521,
872 60.8098, 61.0699, 61.1678, 61.0329, 61.0522, 61.1792, 61.3671, 61.4394, 61.5152, 61.6122,
873 61.584, 61.711, 61.707, 61.7254, 61.816, 61.9248, 61.9748, 61.9498, 62.0014, 62.0634,
874 62.2929, 62.2349, 62.2101, 62.4434, 62.4281, 62.4166, 62.4905, 62.6055, 62.5097, 62.5994,
875 62.6637, 62.6794, 62.7068, 62.7908, 62.8135, 63.0085, 62.8848, 62.8159, 63.047, 62.8632,
876 63.1119, 63.0864, 63.1423, 63.2334, 63.0695, 63.2902, 63.3719, 63.1882, 63.2649, 63.3338,
877 63.4709, 63.4662, 63.3746, 63.623, 63.6402, 63.5632, 63.6611, 63.6012, 63.5904, 63.7467,
878 63.5535, 63.7792, 63.5213, 63.829, 63.8696, 63.8047, 63.9557, 63.9433, 63.9363, 63.9436,
879 63.9804, 64.0707, 64.0105, 63.96, 64.0437, 64.0235, 64.1795, 64.1377, 64.073, 64.2282,
880 64.2933, 64.4369, 64.3887, 64.2474, 64.2373, 64.3553, 64.425, 64.4401, 64.3197, 64.4212,
881 64.5787, 64.4919, 64.6878, 64.4998, 64.5788, 64.6628, 64.6658, 64.5072, 64.7227, 64.7327,
882 64.4472, 64.6792, 64.7801, 64.5715, 64.7263, 64.8505, 64.7488, 64.6448, 64.8962, 64.8815,
883 64.821, 64.902, 64.8944, 64.8959, 64.8957, 64.7882, 65.0725, 64.8787, 64.797, 65.1112,
884 65.1212, 65.157, 64.9412, 65.2601, 65.0662, 65.0093, 65.0899, 65.1035, 65.0865, 65.3276 };
885 return wid1[i];
886}
887
888double EvtD0To2pip2pim::anywid1640(double sc){
889
890 double smin = (0.13957*3)*(0.13957*3);
891 double dh = 0.01;
892 int od = (sc - 0.18)/dh;
893 double sc_m = 0.18 + od*dh;
894 double widuse = 0;
895 if(sc>=0.18 && sc<=3.17){
896 widuse = ((sc-sc_m)/dh)*(widT1640(od+1)-widT1640(od))+widT1640(od);
897 }else if(sc<0.18 && sc>smin){
898 widuse = ((sc - smin)/(0.18-smin))*widT1640(0);
899 }else if(sc>3.17){
900 widuse = widT1640(299);
901 }else{
902 widuse = 0;
903 }
904 return widuse;
905}
906
907complex<double> EvtD0To2pip2pim::RBWa1640(double mx2, double mr, double wr){
908
909 double mx = sqrt(mx2);
910 double mr2 = mr*mr;
911 double g1 = wr/anywid1640(mr2);
912 double wid0 = anywid1640(mx2)*g1;
913
914 double denom_real = mr2-mx2;
915 double denom_imag = mr*wid0;//real-i*imag;
916
917 double denom = denom_real*denom_real+denom_imag*denom_imag;
918 double output_x = denom_real/denom;
919 double output_y = denom_imag/denom;
920
921 complex<double> output(output_x,output_y);
922 return output;
923
924}
925
926// PiPi-S wave K-Matrix
927double EvtD0To2pip2pim::rho22(double sc){
928 double rho[689] = { 3.70024e-18, 8.52763e-15, 1.87159e-13, 1.3311e-12, 5.61842e-12, 1.75224e-11, 4.48597e-11, 9.99162e-11, 2.00641e-10, 3.71995e-10,
929 6.47093e-10, 1.06886e-09, 1.69124e-09, 2.58031e-09, 3.8168e-09, 5.49601e-09, 7.72996e-09, 1.06509e-08, 1.44078e-08, 1.91741e-08,
930 2.51445e-08, 3.25345e-08, 4.15946e-08, 5.25949e-08, 6.58316e-08, 8.16443e-08, 1.00389e-07, 1.22455e-07, 1.48291e-07, 1.78348e-07,
931 2.1313e-07, 2.53192e-07, 2.99086e-07, 3.51462e-07, 4.10993e-07, 4.78349e-07, 5.54327e-07, 6.3972e-07, 7.35316e-07, 8.42099e-07,
932 9.61004e-07, 1.09295e-06, 1.2391e-06, 1.40051e-06, 1.57824e-06, 1.77367e-06, 1.98805e-06, 2.22257e-06, 2.47877e-06, 2.7581e-06,
933 3.06186e-06, 3.39182e-06, 3.74971e-06, 4.137e-06, 4.5555e-06, 5.00725e-06, 5.4939e-06, 6.01725e-06, 6.57992e-06, 7.18371e-06,
934 7.83044e-06, 8.52301e-06, 9.26342e-06, 1.00535e-05, 1.08967e-05, 1.17953e-05, 1.27514e-05, 1.37679e-05, 1.48482e-05, 1.59943e-05,
935 1.72088e-05, 1.84961e-05, 1.98586e-05, 2.12987e-05, 2.28207e-05, 2.44279e-05, 2.61228e-05, 2.79084e-05, 2.97906e-05, 3.17718e-05,
936 3.38544e-05, 3.60443e-05, 3.8345e-05, 4.07591e-05, 4.32903e-05, 4.59459e-05, 4.87285e-05, 5.16403e-05, 5.46887e-05, 5.7878e-05,
937 6.12111e-05, 6.46908e-05, 6.83274e-05, 7.21231e-05, 7.60817e-05, 8.0208e-05, 8.45102e-05, 8.89919e-05, 9.36544e-05, 9.85082e-05,
938 0.000103559, 0.000108812, 0.000114267, 0.000119938, 0.000125827, 0.00013194, 0.000138278, 0.000144857, 0.000151681, 0.000158752,
939 0.000166074, 0.000173663, 0.000181521, 0.000189652, 0.000198059, 0.000206761, 0.000215761, 0.000225063, 0.00023467, 0.000244599,
940 0.000254855, 0.00026544, 0.000276357, 0.000287629, 0.00029926, 0.000311253, 0.000323609, 0.000336351, 0.000349483, 0.000363009,
941 0.000376926, 0.000391264, 0.000406029, 0.000421225, 0.000436848, 0.000452921, 0.000469458, 0.000486461, 0.00050393, 0.00052187,
942 0.000540322, 0.000559278, 0.000578746, 0.00059872, 0.000619236, 0.0006403, 0.000661911, 0.000684074, 0.000706799, 0.000730127,
943 0.00075405, 0.000778569, 0.000803686, 0.000829443, 0.000855839, 0.000882879, 0.000910561, 0.000938898, 0.000967939, 0.000997674,
944 0.00102811, 0.00105923, 0.0010911, 0.0011237, 0.00115706, 0.00119117, 0.00122601, 0.00126168, 0.00129815, 0.00133543,
945 0.00137351, 0.00141242, 0.00145219, 0.00149283, 0.00153434, 0.0015767, 0.00161995, 0.00166415, 0.00170928, 0.00175534,
946 0.00180232, 0.00185028, 0.00189924, 0.00194919, 0.00200014, 0.00205207, 0.00210503, 0.0021591, 0.00221421, 0.0022704,
947 0.00232766, 0.00238602, 0.00244554, 0.00250619, 0.00256799, 0.0026309, 0.002695, 0.00276033, 0.00282689, 0.00289467,
948 0.00296367, 0.00303389, 0.00310543, 0.0031783, 0.00325244, 0.0033279, 0.0034046, 0.00348275, 0.00356229, 0.00364322,
949 0.00372555, 0.00380924, 0.00389438, 0.00398104, 0.00406914, 0.00415877, 0.00424985, 0.00434235, 0.00443651, 0.00453224,
950 0.00462954, 0.00472848, 0.00482894, 0.00493102, 0.00503483, 0.00514029, 0.00524749, 0.0053563, 0.00546675, 0.00557905,
951 0.0056931, 0.00580901, 0.0059267, 0.00604613, 0.00616735, 0.00629049, 0.00641557, 0.00654254, 0.00667142, 0.00680216,
952 0.00693472, 0.00706946, 0.00720621, 0.00734497, 0.0074858, 0.00762855, 0.00777338, 0.00792036, 0.00806957, 0.00822087,
953 0.00837426, 0.00852982, 0.0086875, 0.00884756, 0.00900991, 0.00917447, 0.00934137, 0.00951052, 0.00968194, 0.0098558,
954 0.010032, 0.0102108, 0.0103919, 0.0105754, 0.0107612, 0.0109496, 0.0111406, 0.0113343, 0.0115305, 0.0117293,
955 0.0119303, 0.0121343, 0.0123409, 0.0125502, 0.0127623, 0.0129771, 0.0131944, 0.0134145, 0.0136376, 0.0138636,
956 0.0140924, 0.0143241, 0.0145587, 0.0147959, 0.0150363, 0.0152797, 0.0155262, 0.0157758, 0.0160283, 0.0162838,
957 0.0165421, 0.016804, 0.0170691, 0.0173374, 0.0176087, 0.0178835, 0.0181612, 0.0184423, 0.0187269, 0.0190149,
958 0.0193063, 0.0196009, 0.0198991, 0.0202003, 0.0205052, 0.0208137, 0.0211259, 0.0214418, 0.0217611, 0.0220841,
959 0.0224105, 0.0227406, 0.0230746, 0.0234125, 0.0237542, 0.0240996, 0.0244486, 0.0248012, 0.025158, 0.0255188,
960 0.0258837, 0.0262527, 0.0266256, 0.0270025, 0.0273833, 0.027768, 0.0281572, 0.0285505, 0.0289483, 0.0293503,
961 0.0297564, 0.0301665, 0.0305808, 0.0309997, 0.0314231, 0.0318511, 0.0322835, 0.0327205, 0.0331616, 0.0336073,
962 0.0340576, 0.0345128, 0.0349727, 0.0354373, 0.0359066, 0.0363807, 0.0368589, 0.0373419, 0.0378302, 0.0383234,
963 0.0388218, 0.0393252, 0.0398336, 0.040347, 0.0408652, 0.041388, 0.0419165, 0.0424502, 0.0429893, 0.0435338,
964 0.0440833, 0.044638, 0.0451976, 0.0457627, 0.0463338, 0.0469103, 0.047492, 0.0480797, 0.0486729, 0.0492716,
965 0.0498757, 0.0504852, 0.0511009, 0.0517229, 0.0523503, 0.0529838, 0.0536231, 0.0542678, 0.054918, 0.0555743,
966 0.0562372, 0.0569065, 0.0575818, 0.0582634, 0.0589511, 0.0596454, 0.0603451, 0.061051, 0.0617635, 0.0624826,
967 0.0632084, 0.0639409, 0.06468, 0.0654254, 0.0661772, 0.0669346, 0.0676994, 0.0684714, 0.0692503, 0.0700354,
968 0.0708285, 0.0716277, 0.0724347, 0.0732479, 0.0740671, 0.0748947, 0.0757299, 0.0765715, 0.0774207, 0.0782771,
969 0.0791407, 0.0800119, 0.0808897, 0.0817743, 0.0826672, 0.0835684, 0.0844769, 0.0853938, 0.0863179, 0.0872493,
970 0.0881882, 0.0891349, 0.090089, 0.0910523, 0.0920236, 0.093002, 0.0939894, 0.094985, 0.0959887, 0.0970003,
971 0.0980191, 0.0990454, 0.100081, 0.101126, 0.10218, 0.103242, 0.104312, 0.105392, 0.10648, 0.107576,
972 0.10868, 0.109793, 0.110916, 0.112048, 0.113188, 0.114339, 0.115498, 0.116666, 0.117843, 0.119028,
973 0.120223, 0.121427, 0.122641, 0.123865, 0.125098, 0.126342, 0.127595, 0.128857, 0.130128, 0.131409,
974 0.132701, 0.134002, 0.135314, 0.136635, 0.137966, 0.139308, 0.14066, 0.142022, 0.143394, 0.144774,
975 0.146166, 0.14757, 0.148985, 0.15041, 0.151845, 0.153291, 0.154749, 0.156215, 0.157694, 0.159182,
976 0.160682, 0.162194, 0.163718, 0.165251, 0.166797, 0.168354, 0.169921, 0.1715, 0.17309, 0.17469,
977 0.176304, 0.177929, 0.179566, 0.181216, 0.182878, 0.184553, 0.186238, 0.187934, 0.189642, 0.191362,
978 0.193096, 0.194842, 0.196602, 0.198374, 0.200158, 0.201954, 0.203764, 0.205586, 0.207421, 0.209266,
979 0.211124, 0.212997, 0.214882, 0.216783, 0.218697, 0.220624, 0.222565, 0.224518, 0.226486, 0.228466,
980 0.230458, 0.232463, 0.234484, 0.23652, 0.238569, 0.240633, 0.242711, 0.244803, 0.246909, 0.249031,
981 0.251165, 0.253313, 0.255475, 0.257649, 0.259841, 0.262051, 0.264274, 0.266514, 0.268768, 0.271036,
982 0.273319, 0.275618, 0.277932, 0.280259, 0.282602, 0.28496, 0.287338, 0.28973, 0.292138, 0.294563,
983 0.297003, 0.299458, 0.30193, 0.304417, 0.306919, 0.309437, 0.311972, 0.314526, 0.317095, 0.319684,
984 0.322289, 0.324911, 0.327551, 0.330205, 0.332876, 0.335567, 0.338271, 0.340993, 0.343736, 0.346496,
985 0.349272, 0.352065, 0.354878, 0.35771, 0.360561, 0.363426, 0.366311, 0.369212, 0.372128, 0.375067,
986 0.378027, 0.381006, 0.384001, 0.387014, 0.39005, 0.393106, 0.396181, 0.399271, 0.402384, 0.405513,
987 0.408661, 0.41183, 0.41502, 0.418233, 0.421462, 0.424709, 0.42798, 0.43127, 0.434583, 0.437914,
988 0.441267, 0.444637, 0.448022, 0.451434, 0.454868, 0.458328, 0.461805, 0.465302, 0.468821, 0.472364,
989 0.475928, 0.47951, 0.483119, 0.486748, 0.490397, 0.494066, 0.497758, 0.501477, 0.505217, 0.508977,
990 0.512762, 0.516567, 0.520394, 0.524247, 0.528125, 0.532027, 0.535947, 0.53989, 0.543852, 0.547844,
991 0.551863, 0.555904, 0.559966, 0.56406, 0.568177, 0.572312, 0.576471, 0.580662, 0.584875, 0.58911,
992 0.593373, 0.597653, 0.601965, 0.606301, 0.610663, 0.615051, 0.619465, 0.623907, 0.62837, 0.632863,
993 0.637383, 0.641924, 0.646494, 0.651091, 0.655708, 0.660356, 0.665027, 0.669732, 0.674464, 0.679227,
994 0.684016, 0.688827, 0.693664, 0.698532, 0.703428, 0.708353, 0.713307, 0.718283, 0.72329, 0.728322,
995 0.733387, 0.738479, 0.743605, 0.748763, 0.753949, 0.759163, 0.764407, 0.769674, 0.774973, 0.780311,
996 0.78567, 0.791057, 0.796476, 0.801922, 0.8074, 0.812919, 0.818466, 0.824044 };
997
998 double m2 = 0.13957*0.13957;
999 double smin = (0.13957*4)*(0.13957*4);
1000 double dh = 0.001;
1001 int od = (sc - 0.312)/dh;
1002 double sc_m = 0.312 + od*dh;
1003 double rhouse = 0;
1004 if(sc>=0.312 && sc<1){
1005 rhouse = ((sc-sc_m)/dh)*(rho[od+1]-rho[od])+rho[od];
1006 }else if(sc<0.312 && sc>=smin){
1007 rhouse = ((sc - smin)/(0.312-smin))*rho[0];
1008 }else if(sc>=1){
1009 // rhouse = (1-16*m2/sc)*(1-16*m2/sc)*(1-16*m2/sc)*(1-16*m2/sc)*(1-16*m2/sc);
1010 rhouse = sqrt(1-16*m2/sc);
1011 }else{
1012 rhouse = 0;
1013 }
1014 return rhouse;
1015}
1016
1017complex<double> EvtD0To2pip2pim::rhoMTX(int i, int j, double s){
1018
1019 double rhoijx;
1020 double rhoijy;
1021 double mpi = 0.13957;
1022 if(i==j && i==0 ){
1023 double m2 = 0.13957*0.13957;
1024 if((1-(4*m2)/s)>0){
1025 rhoijx = sqrt(1.0f - (4*m2)/s);
1026 rhoijy = 0;
1027 }else{
1028 rhoijy = sqrt((4*m2)/s - 1.0f);
1029 rhoijx = 0;
1030 }
1031 }
1032 if(i==j && i==1 ){
1033 double m2 = 0.493677*0.493677;
1034 if((1-(4*m2)/s)>0){
1035 rhoijx = sqrt(1.0f - (4*m2)/s);
1036 rhoijy = 0;
1037 }else{
1038 rhoijy = sqrt((4*m2)/s - 1.0f);
1039 rhoijx = 0;
1040 }
1041 }
1042 if(i==j && i==2){
1043 rhoijx = rho22(s);
1044 rhoijy = 0;
1045 }
1046 if(i==j && i==3){
1047 double m2 = 0.547862*0.547862;
1048 if((1-(4*m2)/s)>0){
1049 rhoijx = sqrt(1.0f - (4*m2)/s);
1050 rhoijy = 0;
1051 }else{
1052 rhoijy = sqrt((4*m2)/s - 1.0f);
1053 rhoijx = 0;
1054 }
1055 }
1056 if(i==j && i==4){
1057 double m_1 = 0.547862;
1058 double m_2 = 0.95778;
1059 double mp2 = (m_1+m_2)*(m_1+m_2);
1060 double mm2 = (m_1-m_2)*(m_1-m_2);
1061 if((1-mp2/s)>0){
1062 rhoijx = sqrt(1.0f - mp2/s);
1063 rhoijy = 0;
1064 }else{
1065 rhoijy = sqrt(mp2/s - 1.0f);
1066 rhoijx = 0;
1067 }
1068 }
1069
1070 if(i!=j){
1071 rhoijx = 0;
1072 rhoijy = 0;
1073 }
1074 complex<double> rhoij(rhoijx,rhoijy);
1075 return rhoij;
1076
1077}
1078/* Kij = (sum_a gigj/(ma^2-s) + fij(1-s0)/(s-s0))((s-0.5sampi2)(1-sa0)/(s-sa0)) */
1079complex<double> EvtD0To2pip2pim::KMTX(int i, int j, double s){
1080
1081 double Kijx;
1082 double Kijy;
1083 double mpi = 0.13957;
1084 double m[5] = { 0.65100, 1.20360, 1.55817, 1.21000, 1.82206};
1085
1086 double g1[5] = { 0.22889,-0.55377, 0.00000,-0.39899,-0.34639};
1087 double g2[5] = { 0.94128, 0.55095, 0.00000, 0.39065, 0.31503};
1088 double g3[5] = { 0.36856, 0.23888, 0.55639, 0.18340, 0.18681};
1089 double g4[5] = { 0.33650, 0.40907, 0.85679, 0.19906,-0.00984};
1090 double g5[5] = { 0.18171,-0.17558,-0.79658,-0.00355, 0.22358};
1091
1092 double f1[5] = { 0.23399, 0.15044,-0.20545, 0.32825, 0.35412};
1093
1094 double eps = 1e-11;
1095
1096 double down[5] = { 0,0,0,0,0};
1097 double upreal[5] = { 0,0,0,0,0};
1098 double upimag[5] = { 0,0,0,0,0};
1099
1100 for(int k=0; k<5; k++){
1101
1102 /* down[k] = (m[k]*m[k]-s)*(m[k]*m[k]-s)+eps*eps;
1103 upreal[k] = (m[k]*m[k]-s)/down[k];
1104 upimag[k] = -1.0f * eps/down[k]; */
1105
1106 double dm2 = m[k]*m[k]-s;
1107 if(fabs(dm2)<eps && dm2<=0) dm2 = -eps;
1108 if(fabs(dm2)<eps && dm2>0) dm2 = eps;
1109 upreal[k] = 1.0f/dm2;
1110 upimag[k] = 0;
1111 }
1112
1113 double tmp1x = g1[i]*g1[j]*upreal[0] + g2[i]*g2[j]*upreal[1] + g3[i]*g3[j]*upreal[2] + g4[i]*g4[j]*upreal[3] + g5[i]*g5[j]*upreal[4];
1114 double tmp1y = g1[i]*g1[j]*upimag[0] + g2[i]*g2[j]*upimag[1] + g3[i]*g3[j]*upimag[2] + g4[i]*g4[j]*upimag[3] + g5[i]*g5[j]*upimag[4];
1115
1116 double tmp2 = 0;
1117 if(i==0){
1118 tmp2 = f1[j]*(1+3.92637)/(s+3.92637);
1119 }
1120 if(j==0){
1121 tmp2 = f1[i]*(1+3.92637)/(s+3.92637);
1122 }
1123 double tmp3 = (s-0.5*mpi*mpi)*(1+0.15)/(s+0.15);
1124
1125 Kijx = (tmp1x+tmp2)*tmp3;
1126 Kijy = (tmp1y)*tmp3;
1127
1128 complex<double> Kij(Kijx,Kijy);
1129 return Kij;
1130}
1131
1132complex<double> EvtD0To2pip2pim::IMTX(int i, int j){
1133
1134 double Iijx;
1135 double Iijy;
1136 if(i==j){
1137 Iijx = 1;
1138 Iijy = 0;
1139 }else{
1140 Iijx = 0;
1141 Iijy = 0;
1142 }
1143 complex<double> Iij(Iijx,Iijy);
1144 return Iij;
1145
1146}
1147
1148/* F = I - i*K*rho */
1149complex<double> EvtD0To2pip2pim::FMTX(double Kijx, double Kijy, double rhojjx, double rhojjy, int i, int j){
1150
1151 double Fijx;
1152 double Fijy;
1153
1154 double tmpx = rhojjx*Kijx - rhojjy*Kijy;
1155 double tmpy = rhojjx*Kijy + rhojjy*Kijx;
1156
1157 Fijx = IMTX(i,j).real() + tmpy;
1158 Fijy = -tmpx;
1159
1160 complex<double> Fij(Fijx,Fijy);
1161 return Fij;
1162}
1163
1164/* inverse for Matrix (I - i*rho*K) using LUP */
1165double EvtD0To2pip2pim::FINVMTX(double s, double *FINVx, double *FINVy){
1166
1167 int P[5] = { 0,1,2,3,4};
1168
1169 double Fx[5][5];
1170 double Fy[5][5];
1171
1172 double Ux[5][5];
1173 double Uy[5][5];
1174 double Lx[5][5];
1175 double Ly[5][5];
1176
1177 double UIx[5][5];
1178 double UIy[5][5];
1179 double LIx[5][5];
1180 double LIy[5][5];
1181
1182 for(int k=0; k<5; k++){
1183 double rhokkx = rhoMTX(k,k,s).real();
1184 double rhokky = rhoMTX(k,k,s).imag();
1185 Ux[k][k] = rhokkx;
1186 Uy[k][k] = rhokky;
1187 for(int l=k; l<5; l++){
1188 double Kklx = KMTX(k,l,s).real();
1189 double Kkly = KMTX(k,l,s).imag();
1190 Lx[k][l] = Kklx;
1191 Ly[k][l] = Kkly;
1192 Lx[l][k] = Lx[k][l];
1193 Ly[l][k] = Ly[k][l];
1194 }
1195 }
1196
1197 for(int k=0; k<5; k++){
1198 for(int l=0; l<5; l++){
1199 double Fklx = FMTX(Lx[k][l],Ly[k][l],Ux[l][l],Uy[l][l],k,l).real();
1200 double Fkly = FMTX(Lx[k][l],Ly[k][l],Ux[l][l],Uy[l][l],k,l).imag();
1201 Fx[k][l] = Fklx;
1202 Fy[k][l] = Fkly;
1203 }
1204 }
1205
1206 for(int k=0; k<5; k++){
1207 double tmprM = (Fx[k][k]*Fx[k][k]+Fy[k][k]*Fy[k][k]);
1208 int tmpID = 0;
1209 for(int l=k; l<5; l++){
1210 double tmprF = (Fx[l][k]*Fx[l][k]+Fy[l][k]*Fy[l][k]);
1211 if(tmprM<=tmprF){
1212 tmprM = tmprF;
1213 tmpID = l;
1214 }
1215 }
1216
1217 int tmpP = P[k];
1218 P[k] = P[tmpID];
1219 P[tmpID] = tmpP;
1220
1221 for(int l=0; l<5; l++){
1222
1223 double tmpFx = Fx[k][l];
1224 double tmpFy = Fy[k][l];
1225
1226 Fx[k][l] = Fx[tmpID][l];
1227 Fy[k][l] = Fy[tmpID][l];
1228
1229 Fx[tmpID][l] = tmpFx;
1230 Fy[tmpID][l] = tmpFy;
1231
1232 }
1233
1234 for(int l=k+1; l<5; l++){
1235 double rFkk = Fx[k][k]*Fx[k][k] + Fy[k][k]*Fy[k][k];
1236 double Fxlk = Fx[l][k];
1237 double Fylk = Fy[l][k];
1238 double Fxkk = Fx[k][k];
1239 double Fykk = Fy[k][k];
1240 Fx[l][k] = (Fxlk*Fxkk + Fylk*Fykk)/rFkk;
1241 Fy[l][k] = (Fylk*Fxkk - Fxlk*Fykk)/rFkk;
1242 for(int m=k+1; m<5; m++){
1243 Fx[l][m] = Fx[l][m] - (Fx[l][k]*Fx[k][m] - Fy[l][k]*Fy[k][m]);
1244 Fy[l][m] = Fy[l][m] - (Fx[l][k]*Fy[k][m] + Fy[l][k]*Fx[k][m]);
1245 }
1246 }
1247 }
1248
1249 for(int k=0; k<5; k++){
1250 for(int l=0; l<5 ;l++){
1251 if(k==l){
1252 Lx[k][k] = 1;
1253 Ly[k][k] = 0;
1254 Ux[k][k] = Fx[k][k];
1255 Uy[k][k] = Fy[k][k];
1256 }
1257 if(k>l){
1258 Lx[k][l] = Fx[k][l];
1259 Ly[k][l] = Fy[k][l];
1260 Ux[k][l] = 0;
1261 Uy[k][l] = 0;
1262 }
1263 if(k<l){
1264 Ux[k][l] = Fx[k][l];
1265 Uy[k][l] = Fy[k][l];
1266 Lx[k][l] = 0;
1267 Ly[k][l] = 0;
1268 }
1269 }
1270 }
1271
1272 // calculate Inverse for L and U
1273 for(int k=0; k<5; k++){
1274
1275 LIx[k][k] = 1;
1276 LIy[k][k] = 0;
1277
1278 double rUkk = Ux[k][k]*Ux[k][k] + Uy[k][k]*Uy[k][k];
1279 UIx[k][k] = Ux[k][k]/rUkk;
1280 UIy[k][k] = -1.0f * Uy[k][k]/rUkk ;
1281
1282 for(int l=(k+1); l<5; l++){
1283 LIx[k][l] = 0;
1284 LIy[k][l] = 0;
1285 UIx[l][k] = 0;
1286 UIy[l][k] = 0;
1287 }
1288
1289 for(int l=(k-1); l>=0; l--){ // U-1
1290 double sx = 0;
1291 double c_sx = 0;
1292 double sy = 0;
1293 double c_sy = 0;
1294 for(int m=l+1; m<=k; m++){
1295 sx = sx - c_sx;
1296 double sx_tmp = sx + Ux[l][m]*UIx[m][k] - Uy[l][m]*UIy[m][k];
1297 c_sx = (sx_tmp - sx) - (Ux[l][m]*UIx[m][k] - Uy[l][m]*UIy[m][k]);
1298 sx = sx_tmp;
1299
1300 sy = sy - c_sy;
1301 double sy_tmp = sy + Ux[l][m]*UIy[m][k] + Uy[l][m]*UIx[m][k];
1302 c_sy = (sy_tmp - sy) - (Ux[l][m]*UIy[m][k] + Uy[l][m]*UIx[m][k]);
1303 sy = sy_tmp;
1304 }
1305 UIx[l][k] = -1.0f * (UIx[l][l]*sx - UIy[l][l]*sy);
1306 UIy[l][k] = -1.0f * (UIy[l][l]*sx + UIx[l][l]*sy);
1307 }
1308
1309 for(int l=k+1; l<5; l++){ // L-1
1310 double sx = 0;
1311 double c_sx = 0;
1312 double sy = 0;
1313 double c_sy = 0;
1314 for(int m=k; m<l; m++){
1315 sx = sx - c_sx;
1316 double sx_tmp = sx + Lx[l][m]*LIx[m][k] - Ly[l][m]*LIy[m][k];
1317 c_sx = (sx_tmp - sx) - (Lx[l][m]*LIx[m][k] - Ly[l][m]*LIy[m][k]);
1318 sx = sx_tmp;
1319
1320 sy = sy - c_sy;
1321 double sy_tmp = sy + Lx[l][m]*LIy[m][k] + Ly[l][m]*LIx[m][k];
1322 c_sy = (sy_tmp - sy) - (Lx[l][m]*LIy[m][k] + Ly[l][m]*LIx[m][k]);
1323 sy = sy_tmp;
1324 }
1325 LIx[l][k] = -1.0f * sx;
1326 LIy[l][k] = -1.0f * sy;
1327 }
1328 }
1329
1330 for(int m=0; m<5; m++){
1331 double resX = 0;
1332 double c_resX = 0;
1333 double resY = 0;
1334 double c_resY = 0;
1335 for(int k=0; k<5; k++){
1336 for(int l=0; l<5; l++){
1337 double Plm = 0;
1338 if(P[l] == m) Plm = 1;
1339
1340 resX = resX - c_resX;
1341 double resX_tmp = resX + (UIx[0][k]*LIx[k][l] - UIy[0][k]*LIy[k][l])*Plm;
1342 c_resX = (resX_tmp - resX) - ((UIx[0][k]*LIx[k][l] - UIy[0][k]*LIy[k][l])*Plm);
1343 resX = resX_tmp;
1344
1345 resY = resY - c_resY;
1346 double resY_tmp = resY + (UIx[0][k]*LIy[k][l] + UIy[0][k]*LIx[k][l])*Plm;
1347 c_resY = (resY_tmp - resY) - ((UIx[0][k]*LIy[k][l] + UIy[0][k]*LIx[k][l])*Plm);
1348 resY = resY_tmp;
1349 }
1350 }
1351 FINVx[m] = resX;
1352 FINVy[m] = resY;
1353 }
1354
1355 return 1.0f;
1356}
1357
1358complex<double> EvtD0To2pip2pim::PVTR(int ID, double s){
1359
1360 double VPix;
1361 double VPiy;
1362 double m[5] = { 0.65100, 1.20360, 1.55817, 1.21000, 1.82206};
1363
1364 double eps = 1e-11;
1365
1366 /* double down = (m[ID]*m[ID]-s)*(m[ID]*m[ID]-s)+eps*eps;
1367 double upreal = (m[ID]*m[ID]-s)/down;
1368 double upimag = -1.0f * eps/down; */
1369
1370 double dm2 = m[ID]*m[ID]-s;
1371
1372 if(fabs(dm2)<eps && dm2<=0) dm2 = -eps;
1373 if(fabs(dm2)<eps && dm2>0) dm2 = eps;
1374
1375 VPix = 1.0f/dm2;
1376 VPiy = 0;
1377
1378 complex<double> VPi(VPix,VPiy);
1379 return VPi;
1380}
1381
1382complex<double> EvtD0To2pip2pim::Fvector(double sa, double s0, int l){
1383
1384 double outputx = 0;
1385 double outputy = 0;
1386
1387 double FINVx[5] = {0,0,0,0,0};
1388 double FINVy[5] = {0,0,0,0,0};
1389
1390 double tmpFLAG = FINVMTX(sa,FINVx,FINVy);
1391
1392 if(l<5){
1393 double g[5][5] = {{ 0.22889,-0.55377, 0.00000,-0.39899,-0.34639},
1394 { 0.94128, 0.55095, 0.00000, 0.39065, 0.31503},
1395 { 0.36856, 0.23888, 0.55639, 0.18340, 0.18681},
1396 { 0.33650, 0.40907, 0.85679, 0.19906,-0.00984},
1397 { 0.18171,-0.17558,-0.79658,-0.00355, 0.22358}};
1398 double resx = 0;
1399 double c_resx = 0;
1400 double resy = 0;
1401 double c_resy = 0;
1402 double Plx = PVTR(l,sa).real();
1403 double Ply = PVTR(l,sa).imag();
1404 for(int j=0; j<5; j++){
1405 resx = resx - c_resx;
1406 double resx_tmp = resx + (FINVx[j]*g[l][j]*Plx - FINVy[j]*g[l][j]*Ply);
1407 c_resx = (resx_tmp - resx) - (FINVx[j]*g[l][j]*Plx - FINVy[j]*g[l][j]*Ply);
1408 resx = resx_tmp;
1409
1410 resy = resy - c_resy;
1411 double resy_tmp = resy + (FINVx[j]*g[l][j]*Ply + FINVy[j]*g[l][j]*Plx);
1412 c_resy = (resy_tmp - resy) - (FINVx[j]*g[l][j]*Ply + FINVy[j]*g[l][j]*Plx);
1413 resy = resy_tmp;
1414 }
1415 outputx = resx;
1416 outputy = resy;
1417 }else{
1418 int idx = l-5;
1419 double eps = 1e-11;
1420 double ds = sa-s0;
1421 if(fabs(ds)<eps && ds<=0) ds = -eps;
1422 if(fabs(ds)<eps && ds>0) ds = eps;
1423 double tmp = (1-s0)/ds;
1424 outputx = FINVx[idx]*tmp;
1425 outputy = FINVy[idx]*tmp;
1426 }
1427
1428 complex<double> output(outputx,outputy);
1429 return output;
1430}
1431
1432complex<double> EvtD0To2pip2pim::CalD0Amp(){
1433 return Amp(m_Pip1, m_Pim1, m_Pip2, m_Pim2);
1434}
1435complex<double> EvtD0To2pip2pim::CalDbAmp(){
1436
1437 vector<double> cpPip1; cpPip1.clear();
1438 vector<double> cpPip2; cpPip2.clear();
1439 vector<double> cpPim1; cpPim1.clear();
1440 vector<double> cpPim2; cpPim2.clear();
1441
1442 cpPip1.push_back(-m_Pim1[0]); cpPim1.push_back(-m_Pip1[0]); cpPip2.push_back(-m_Pim2[0]); cpPim2.push_back(-m_Pip2[0]);
1443 cpPip1.push_back(-m_Pim1[1]); cpPim1.push_back(-m_Pip1[1]); cpPip2.push_back(-m_Pim2[1]); cpPim2.push_back(-m_Pip2[1]);
1444 cpPip1.push_back(-m_Pim1[2]); cpPim1.push_back(-m_Pip1[2]); cpPip2.push_back(-m_Pim2[2]); cpPim2.push_back(-m_Pip2[2]);
1445 cpPip1.push_back(m_Pim1[3]); cpPim1.push_back(m_Pip1[3]); cpPip2.push_back(m_Pim2[3]); cpPim2.push_back(m_Pip2[3]);
1446
1447 return Amp(cpPip1, cpPim1, cpPip2, cpPim2);
1448}
1449
1450complex<double> EvtD0To2pip2pim::Amp(vector<double> Pip1, vector<double> Pim1, vector<double> Pip2, vector<double> Pim2)
1451{
1452
1453 vector<double> Pip1Pim1; Pip1Pim1.clear();
1454 vector<double> Pip1Pim2; Pip1Pim2.clear();
1455 vector<double> Pip2Pim1; Pip2Pim1.clear();
1456 vector<double> Pip2Pim2; Pip2Pim2.clear();
1457
1458 Pip1Pim1 = sum_tensor(Pip1, Pim1);
1459 Pip1Pim2 = sum_tensor(Pip1, Pim2);
1460 Pip2Pim1 = sum_tensor(Pip2, Pim1);
1461 Pip2Pim2 = sum_tensor(Pip2, Pim2);
1462
1463 vector<double> Pip1Pip2Pim1; Pip1Pip2Pim1.clear();
1464 vector<double> Pip1Pip2Pim2; Pip1Pip2Pim2.clear();
1465 vector<double> Pim1Pim2Pip1; Pim1Pim2Pip1.clear();
1466 vector<double> Pim1Pim2Pip2; Pim1Pim2Pip2.clear();
1467
1468 Pip1Pip2Pim1 = sum_tensor(Pip1Pim1, Pip2);
1469 Pip1Pip2Pim2 = sum_tensor(Pip1Pim2, Pip2);
1470 Pim1Pim2Pip1 = sum_tensor(Pip1Pim1, Pim2);
1471 Pim1Pim2Pip2 = sum_tensor(Pip2Pim1, Pim2);
1472
1473 vector<double> D0; D0.clear();
1474 D0 = sum_tensor(Pip1Pip2Pim1, Pim2);
1475
1476 double M2_Pip1Pim1 = contract_11_0(Pip1Pim1, Pip1Pim1);
1477 double M2_Pip1Pim2 = contract_11_0(Pip1Pim2, Pip1Pim2);
1478 double M2_Pip2Pim1 = contract_11_0(Pip2Pim1, Pip2Pim1);
1479 double M2_Pip2Pim2 = contract_11_0(Pip2Pim2, Pip2Pim2);
1480
1481 double M2_Pip1Pip2Pim1 = contract_11_0(Pip1Pip2Pim1, Pip1Pip2Pim1);
1482 double M2_Pip1Pip2Pim2 = contract_11_0(Pip1Pip2Pim2, Pip1Pip2Pim2);
1483 double M2_Pim1Pim2Pip1 = contract_11_0(Pim1Pim2Pip1, Pim1Pim2Pip1);
1484 double M2_Pim1Pim2Pip2 = contract_11_0(Pim1Pim2Pip2, Pim1Pim2Pip2);
1485 double M2_D0 = contract_11_0(D0, D0);
1486
1487 complex<double> GS_rho770_11 = GS(M2_Pip1Pim1, m0_rho770, w0_rho770, m2_Pi, m2_Pi, rRes, 1);
1488 complex<double> GS_rho770_12 = GS(M2_Pip1Pim2, m0_rho770, w0_rho770, m2_Pi, m2_Pi, rRes, 1);
1489 complex<double> GS_rho770_21 = GS(M2_Pip2Pim1, m0_rho770, w0_rho770, m2_Pi, m2_Pi, rRes, 1);
1490 complex<double> GS_rho770_22 = GS(M2_Pip2Pim2, m0_rho770, w0_rho770, m2_Pi, m2_Pi, rRes, 1);
1491
1492 complex<double> GS_rho1450_11 = GS(M2_Pip1Pim1, m0_rho1450, w0_rho1450, m2_Pi, m2_Pi, rRes, 1);
1493 complex<double> GS_rho1450_12 = GS(M2_Pip1Pim2, m0_rho1450, w0_rho1450, m2_Pi, m2_Pi, rRes, 1);
1494 complex<double> GS_rho1450_21 = GS(M2_Pip2Pim1, m0_rho1450, w0_rho1450, m2_Pi, m2_Pi, rRes, 1);
1495 complex<double> GS_rho1450_22 = GS(M2_Pip2Pim2, m0_rho1450, w0_rho1450, m2_Pi, m2_Pi, rRes, 1);
1496
1497 complex<double> RBW_f21270_11 = RBW(M2_Pip1Pim1, m0_f21270, w0_f21270, m2_Pi, m2_Pi, rRes, 2);
1498 complex<double> RBW_f21270_12 = RBW(M2_Pip1Pim2, m0_f21270, w0_f21270, m2_Pi, m2_Pi, rRes, 2);
1499 complex<double> RBW_f21270_21 = RBW(M2_Pip2Pim1, m0_f21270, w0_f21270, m2_Pi, m2_Pi, rRes, 2);
1500 complex<double> RBW_f21270_22 = RBW(M2_Pip2Pim2, m0_f21270, w0_f21270, m2_Pi, m2_Pi, rRes, 2);
1501
1502 complex<double> PiPiS_11_0 = Fvector(M2_Pip1Pim1, s0_prod, 0);
1503 complex<double> PiPiS_12_0 = Fvector(M2_Pip1Pim2, s0_prod, 0);
1504 complex<double> PiPiS_21_0 = Fvector(M2_Pip2Pim1, s0_prod, 0);
1505 complex<double> PiPiS_22_0 = Fvector(M2_Pip2Pim2, s0_prod, 0);
1506
1507 complex<double> PiPiS_11_1 = Fvector(M2_Pip1Pim1, s0_prod, 1);
1508 complex<double> PiPiS_12_1 = Fvector(M2_Pip1Pim2, s0_prod, 1);
1509 complex<double> PiPiS_21_1 = Fvector(M2_Pip2Pim1, s0_prod, 1);
1510 complex<double> PiPiS_22_1 = Fvector(M2_Pip2Pim2, s0_prod, 1);
1511
1512 complex<double> PiPiS_11_5 = Fvector(M2_Pip1Pim1, s0_prod, 5);
1513 complex<double> PiPiS_12_5 = Fvector(M2_Pip1Pim2, s0_prod, 5);
1514 complex<double> PiPiS_21_5 = Fvector(M2_Pip2Pim1, s0_prod, 5);
1515 complex<double> PiPiS_22_5 = Fvector(M2_Pip2Pim2, s0_prod, 5);
1516
1517 complex<double> PiPiS_11_6 = Fvector(M2_Pip1Pim1, s0_prod, 6);
1518 complex<double> PiPiS_12_6 = Fvector(M2_Pip1Pim2, s0_prod, 6);
1519 complex<double> PiPiS_21_6 = Fvector(M2_Pip2Pim1, s0_prod, 6);
1520 complex<double> PiPiS_22_6 = Fvector(M2_Pip2Pim2, s0_prod, 6);
1521
1522 complex<double> RBW_a11260p_1 = RBWa1260(M2_Pip1Pip2Pim1, m0_a11260, g1_a11260, g2_a11260);
1523 complex<double> RBW_a11260p_2 = RBWa1260(M2_Pip1Pip2Pim2, m0_a11260, g1_a11260, g2_a11260);
1524 complex<double> RBW_a11260m_1 = RBWa1260(M2_Pim1Pim2Pip1, m0_a11260, g1_a11260, g2_a11260);
1525 complex<double> RBW_a11260m_2 = RBWa1260(M2_Pim1Pim2Pip2, m0_a11260, g1_a11260, g2_a11260);
1526
1527 complex<double> RBW_a21320p_1 = RBW(M2_Pip1Pip2Pim1, m0_a21320, w0_a21320, -1.0, -1.0, -1, -1);
1528 complex<double> RBW_a21320p_2 = RBW(M2_Pip1Pip2Pim2, m0_a21320, w0_a21320, -1.0, -1.0, -1, -1);
1529 complex<double> RBW_a21320m_1 = RBW(M2_Pim1Pim2Pip1, m0_a21320, w0_a21320, -1.0, -1.0, -1, -1);
1530 complex<double> RBW_a21320m_2 = RBW(M2_Pim1Pim2Pip2, m0_a21320, w0_a21320, -1.0, -1.0, -1, -1);
1531
1532 complex<double> RBW_pi1300p_1 = RBWpi1300(M2_Pip1Pip2Pim1, m0_pi1300, w0_pi1300);
1533 complex<double> RBW_pi1300p_2 = RBWpi1300(M2_Pip1Pip2Pim2, m0_pi1300, w0_pi1300);
1534 complex<double> RBW_pi1300m_1 = RBWpi1300(M2_Pim1Pim2Pip1, m0_pi1300, w0_pi1300);
1535 complex<double> RBW_pi1300m_2 = RBWpi1300(M2_Pim1Pim2Pip2, m0_pi1300, w0_pi1300);
1536
1537 complex<double> RBW_a11420p_1 = RBW(M2_Pip1Pip2Pim1, m0_a11420, w0_a11420, -1.0, -1.0, -1, -1);
1538 complex<double> RBW_a11420p_2 = RBW(M2_Pip1Pip2Pim2, m0_a11420, w0_a11420, -1.0, -1.0, -1, -1);
1539 complex<double> RBW_a11420m_1 = RBW(M2_Pim1Pim2Pip1, m0_a11420, w0_a11420, -1.0, -1.0, -1, -1);
1540 complex<double> RBW_a11420m_2 = RBW(M2_Pim1Pim2Pip2, m0_a11420, w0_a11420, -1.0, -1.0, -1, -1);
1541
1542 // D->XP 1-rank Projection
1543 vector<double> Proj1_3p1; Proj1_3p1.clear();
1544 vector<double> Proj1_3p2; Proj1_3p2.clear();
1545 vector<double> Proj1_3m1; Proj1_3m1.clear();
1546 vector<double> Proj1_3m2; Proj1_3m2.clear();
1547
1548 Proj1_3p1 = ProjectionTensors(Pip1Pip2Pim1,1);
1549 Proj1_3p2 = ProjectionTensors(Pip1Pip2Pim2,1);
1550 Proj1_3m1 = ProjectionTensors(Pim1Pim2Pip1,1);
1551 Proj1_3m2 = ProjectionTensors(Pim1Pim2Pip2,1);
1552
1553 // D->XP 2-rank Projection
1554 vector<double> Proj2_3p1; Proj2_3p1.clear();
1555 vector<double> Proj2_3p2; Proj2_3p2.clear();
1556 vector<double> Proj2_3m1; Proj2_3m1.clear();
1557 vector<double> Proj2_3m2; Proj2_3m2.clear();
1558
1559 Proj2_3p1 = ProjectionTensors(Pip1Pip2Pim1,2);
1560 Proj2_3p2 = ProjectionTensors(Pip1Pip2Pim2,2);
1561 Proj2_3m1 = ProjectionTensors(Pim1Pim2Pip1,2);
1562 Proj2_3m2 = ProjectionTensors(Pim1Pim2Pip2,2);
1563
1564 // X->PP Orbital
1565 vector<double> T1_Pip1Pim1; T1_Pip1Pim1.clear();
1566 vector<double> T1_Pip1Pim2; T1_Pip1Pim2.clear();
1567 vector<double> T1_Pip2Pim1; T1_Pip2Pim1.clear();
1568 vector<double> T1_Pip2Pim2; T1_Pip2Pim1.clear();
1569
1570 T1_Pip1Pim1 = OrbitalTensors(Pip1Pim1, Pip1, Pim1, rRes, 1);
1571 T1_Pip1Pim2 = OrbitalTensors(Pip1Pim2, Pip1, Pim2, rRes, 1);
1572 T1_Pip2Pim1 = OrbitalTensors(Pip2Pim1, Pip2, Pim1, rRes, 1);
1573 T1_Pip2Pim2 = OrbitalTensors(Pip2Pim2, Pip2, Pim2, rRes, 1);
1574
1575 vector<double> T1_Pim1Pip1; T1_Pim1Pip1.clear();
1576 vector<double> T1_Pim1Pip2; T1_Pim1Pip2.clear();
1577 vector<double> T1_Pim2Pip1; T1_Pim2Pip1.clear();
1578 vector<double> T1_Pim2Pip2; T1_Pim2Pip2.clear();
1579
1580 T1_Pim1Pip1 = OrbitalTensors(Pip1Pim1, Pim1, Pip1, rRes, 1);
1581 T1_Pim1Pip2 = OrbitalTensors(Pip2Pim1, Pim1, Pip2, rRes, 1);
1582 T1_Pim2Pip1 = OrbitalTensors(Pip1Pim2, Pim2, Pip1, rRes, 1);
1583 T1_Pim2Pip2 = OrbitalTensors(Pip2Pim2, Pim2, Pip2, rRes, 1);
1584
1585 vector<double> T2_Pip1Pim1; T2_Pip1Pim1.clear();
1586 vector<double> T2_Pip1Pim2; T2_Pip1Pim2.clear();
1587 vector<double> T2_Pip2Pim1; T2_Pip2Pim1.clear();
1588 vector<double> T2_Pip2Pim2; T2_Pip2Pim1.clear();
1589
1590 T2_Pip1Pim1 = OrbitalTensors(Pip1Pim1, Pip1, Pim1, rRes, 2);
1591 T2_Pip1Pim2 = OrbitalTensors(Pip1Pim2, Pip1, Pim2, rRes, 2);
1592 T2_Pip2Pim1 = OrbitalTensors(Pip2Pim1, Pip2, Pim1, rRes, 2);
1593 T2_Pip2Pim2 = OrbitalTensors(Pip2Pim2, Pip2, Pim2, rRes, 2);
1594
1595 // X->YP Orbital
1596 vector<double> T1_Pip1Pim1Pip2; T1_Pip1Pim1Pip2.clear();
1597 vector<double> T1_Pip2Pim1Pip1; T1_Pip2Pim1Pip1.clear();
1598 vector<double> T1_Pip1Pim2Pip2; T1_Pip1Pim2Pip2.clear();
1599 vector<double> T1_Pip2Pim2Pip1; T1_Pip2Pim2Pip1.clear();
1600 vector<double> T1_Pip1Pim1Pim2; T1_Pip1Pim1Pim2.clear();
1601 vector<double> T1_Pip1Pim2Pim1; T1_Pip1Pim2Pim1.clear();
1602 vector<double> T1_Pip2Pim1Pim2; T1_Pip2Pim1Pim2.clear();
1603 vector<double> T1_Pip2Pim2Pim1; T1_Pip2Pim2Pim1.clear();
1604
1605 T1_Pip1Pim1Pip2 = OrbitalTensors(Pip1Pip2Pim1, Pip1Pim1, Pip2, rRes, 1);
1606 T1_Pip2Pim1Pip1 = OrbitalTensors(Pip1Pip2Pim1, Pip2Pim1, Pip1, rRes, 1);
1607 T1_Pip1Pim2Pip2 = OrbitalTensors(Pip1Pip2Pim2, Pip1Pim2, Pip2, rRes, 1);
1608 T1_Pip2Pim2Pip1 = OrbitalTensors(Pip1Pip2Pim2, Pip2Pim2, Pip1, rRes, 1);
1609 T1_Pip1Pim1Pim2 = OrbitalTensors(Pim1Pim2Pip1, Pip1Pim1, Pim2, rRes, 1);
1610 T1_Pip2Pim1Pim2 = OrbitalTensors(Pim1Pim2Pip2, Pip2Pim1, Pim2, rRes, 1);
1611 T1_Pip1Pim2Pim1 = OrbitalTensors(Pim1Pim2Pip1, Pip1Pim2, Pim1, rRes, 1);
1612 T1_Pip2Pim2Pim1 = OrbitalTensors(Pim1Pim2Pip2, Pip2Pim2, Pim1, rRes, 1);
1613
1614 vector<double> T2_Pip1Pim1Pip2; T2_Pip1Pim1Pip2.clear();
1615 vector<double> T2_Pip2Pim1Pip1; T2_Pip2Pim1Pip1.clear();
1616 vector<double> T2_Pip1Pim2Pip2; T2_Pip1Pim2Pip2.clear();
1617 vector<double> T2_Pip2Pim2Pip1; T2_Pip2Pim2Pip1.clear();
1618 vector<double> T2_Pip1Pim1Pim2; T2_Pip1Pim1Pim2.clear();
1619 vector<double> T2_Pip2Pim1Pim2; T2_Pip2Pim1Pim2.clear();
1620 vector<double> T2_Pip1Pim2Pim1; T2_Pip1Pim2Pim1.clear();
1621 vector<double> T2_Pip2Pim2Pim1; T2_Pip2Pim2Pim1.clear();
1622
1623 T2_Pip1Pim1Pip2 = OrbitalTensors(Pip1Pip2Pim1, Pip1Pim1, Pip2, rRes, 2);
1624 T2_Pip2Pim1Pip1 = OrbitalTensors(Pip1Pip2Pim1, Pip2Pim1, Pip1, rRes, 2);
1625 T2_Pip1Pim2Pip2 = OrbitalTensors(Pip1Pip2Pim2, Pip1Pim2, Pip2, rRes, 2);
1626 T2_Pip2Pim2Pip1 = OrbitalTensors(Pip1Pip2Pim2, Pip2Pim2, Pip1, rRes, 2);
1627 T2_Pip1Pim1Pim2 = OrbitalTensors(Pim1Pim2Pip1, Pip1Pim1, Pim2, rRes, 2);
1628 T2_Pip2Pim1Pim2 = OrbitalTensors(Pim1Pim2Pip2, Pip2Pim1, Pim2, rRes, 2);
1629 T2_Pip1Pim2Pim1 = OrbitalTensors(Pim1Pim2Pip1, Pip1Pim2, Pim1, rRes, 2);
1630 T2_Pip2Pim2Pim1 = OrbitalTensors(Pim1Pim2Pip2, Pip2Pim2, Pim1, rRes, 2);
1631
1632 // D->XX Orbital
1633 vector<double> T1_2z11; T1_2z11.clear();
1634 vector<double> T1_2z12; T1_2z12.clear();
1635 vector<double> T1_2z21; T1_2z21.clear();
1636 vector<double> T1_2z22; T1_2z22.clear();
1637
1638 T1_2z11 = OrbitalTensors(D0, Pip1Pim1, Pip2Pim2, rD, 1);
1639 T1_2z12 = OrbitalTensors(D0, Pip2Pim2, Pip1Pim1, rD, 1);
1640 T1_2z21 = OrbitalTensors(D0, Pip1Pim2, Pip2Pim1, rD, 1);
1641 T1_2z22 = OrbitalTensors(D0, Pip2Pim1, Pip1Pim2, rD, 1);
1642
1643 vector<double> T2_2z11; T2_2z11.clear();
1644 vector<double> T2_2z12; T2_2z12.clear();
1645 vector<double> T2_2z21; T2_2z21.clear();
1646 vector<double> T2_2z22; T2_2z22.clear();
1647
1648 T2_2z11 = OrbitalTensors(D0, Pip1Pim1, Pip2Pim2, rD, 2);
1649 T2_2z12 = OrbitalTensors(D0, Pip2Pim2, Pip1Pim1, rD, 2);
1650 T2_2z21 = OrbitalTensors(D0, Pip1Pim2, Pip2Pim1, rD, 2);
1651 T2_2z22 = OrbitalTensors(D0, Pip2Pim1, Pip1Pim2, rD, 2);
1652
1653 // D->XP Orbital
1654 vector<double> T1_3p1; T1_3p1.clear();
1655 vector<double> T1_3p2; T1_3p2.clear();
1656 vector<double> T1_3m1; T1_3m1.clear();
1657 vector<double> T1_3m2; T1_3m2.clear();
1658
1659 T1_3p1 = OrbitalTensors(D0, Pip1Pip2Pim1, Pim2, rD, 1);
1660 T1_3p2 = OrbitalTensors(D0, Pip1Pip2Pim2, Pim1, rD, 1);
1661 T1_3m1 = OrbitalTensors(D0, Pim1Pim2Pip1, Pip2, rD, 1);
1662 T1_3m2 = OrbitalTensors(D0, Pim1Pim2Pip2, Pip1, rD, 1);
1663
1664 vector<double> T2_3p1; T2_3p1.clear();
1665 vector<double> T2_3p2; T2_3p2.clear();
1666 vector<double> T2_3m1; T2_3m1.clear();
1667 vector<double> T2_3m2; T2_3m2.clear();
1668
1669 T2_3p1 = OrbitalTensors(D0, Pip1Pip2Pim1, Pim2, rD, 2);
1670 T2_3p2 = OrbitalTensors(D0, Pip1Pip2Pim2, Pim1, rD, 2);
1671 T2_3m1 = OrbitalTensors(D0, Pim1Pim2Pip1, Pip2, rD, 2);
1672 T2_3m2 = OrbitalTensors(D0, Pim1Pim2Pip2, Pip1, rD, 2);
1673
1674 complex<double> amplitude(0,0);
1675
1676 // D0 -> a1(1260)+ {rho(770)0 pi+[S]} pi-
1677 double SF_Ap_S_VP_1 = contract_11_0(contract_21_1(Proj1_3p1, T1_Pip2Pim1), T1_3p1);
1678 double SF_Ap_S_VP_2 = contract_11_0(contract_21_1(Proj1_3p1, T1_Pip1Pim1), T1_3p1);
1679 double SF_Ap_S_VP_3 = contract_11_0(contract_21_1(Proj1_3p2, T1_Pip2Pim2), T1_3p2);
1680 double SF_Ap_S_VP_4 = contract_11_0(contract_21_1(Proj1_3p2, T1_Pip1Pim2), T1_3p2);
1681 amplitude += fitpara[0]*(SF_Ap_S_VP_1*RBW_a11260p_1*GS_rho770_21 + SF_Ap_S_VP_2*RBW_a11260p_1*GS_rho770_11 + SF_Ap_S_VP_3*RBW_a11260p_2*GS_rho770_22 + SF_Ap_S_VP_4*RBW_a11260p_2*GS_rho770_12);
1682
1683 // D0 -> a1(1260)+ {rho(770)0 pi+[D]} pi-
1684 double SF_Ap_D_VP_1 = contract_11_0(contract_21_1(T2_Pip2Pim1Pip1, T1_Pip2Pim1), T1_3p1);
1685 double SF_Ap_D_VP_2 = contract_11_0(contract_21_1(T2_Pip1Pim1Pip2, T1_Pip1Pim1), T1_3p1);
1686 double SF_Ap_D_VP_3 = contract_11_0(contract_21_1(T2_Pip2Pim2Pip1, T1_Pip2Pim2), T1_3p2);
1687 double SF_Ap_D_VP_4 = contract_11_0(contract_21_1(T2_Pip1Pim2Pip2, T1_Pip1Pim2), T1_3p2);
1688
1689 amplitude += fitpara[1]*(SF_Ap_D_VP_1*RBW_a11260p_1*GS_rho770_21 + SF_Ap_D_VP_2*RBW_a11260p_1*GS_rho770_11 + SF_Ap_D_VP_3*RBW_a11260p_2*GS_rho770_22 + SF_Ap_D_VP_4*RBW_a11260p_2*GS_rho770_12);
1690
1691 // D0 -> a1(1260)+ {f2(1270) pi+ [P]} pi-
1692 double SF_Ap_P_TP_1 = contract_11_0(contract_21_1(contract_42_2(Proj2_3p1, T2_Pip2Pim1), T1_Pip2Pim1Pip1), T1_3p1);
1693 double SF_Ap_P_TP_2 = contract_11_0(contract_21_1(contract_42_2(Proj2_3p1, T2_Pip1Pim1), T1_Pip1Pim1Pip2), T1_3p1);
1694 double SF_Ap_P_TP_3 = contract_11_0(contract_21_1(contract_42_2(Proj2_3p2, T2_Pip2Pim2), T1_Pip2Pim2Pip1), T1_3p2);
1695 double SF_Ap_P_TP_4 = contract_11_0(contract_21_1(contract_42_2(Proj2_3p2, T2_Pip1Pim2), T1_Pip1Pim2Pip2), T1_3p2);
1696
1697 amplitude += fitpara[2]*(SF_Ap_P_TP_1*RBW_a11260p_1*RBW_f21270_21 + SF_Ap_P_TP_2*RBW_a11260p_1*RBW_f21270_11 + SF_Ap_P_TP_3*RBW_a11260p_2*RBW_f21270_22 + SF_Ap_P_TP_4*RBW_a11260p_2*RBW_f21270_12);
1698
1699 // D0 -> a1(1260)+ {f0 pi+ [P]} pi-
1700 double SF_Ap_P_SP_1 = contract_11_0(T1_3p1, T1_Pip2Pim1Pip1);
1701 double SF_Ap_P_SP_2 = contract_11_0(T1_3p1, T1_Pip1Pim1Pip2);
1702 double SF_Ap_P_SP_3 = contract_11_0(T1_3p2, T1_Pip2Pim2Pip1);
1703 double SF_Ap_P_SP_4 = contract_11_0(T1_3p2, T1_Pip1Pim2Pip2);
1704
1705 amplitude += fitpara[3]*(SF_Ap_P_SP_1*RBW_a11260p_1*PiPiS_21_0 + SF_Ap_P_SP_2*RBW_a11260p_1*PiPiS_11_0 + SF_Ap_P_SP_3*RBW_a11260p_2*PiPiS_22_0 + SF_Ap_P_SP_4*RBW_a11260p_2*PiPiS_12_0);
1706 amplitude += fitpara[4]*(SF_Ap_P_SP_1*RBW_a11260p_1*PiPiS_21_1 + SF_Ap_P_SP_2*RBW_a11260p_1*PiPiS_11_1 + SF_Ap_P_SP_3*RBW_a11260p_2*PiPiS_22_1 + SF_Ap_P_SP_4*RBW_a11260p_2*PiPiS_12_1);
1707 amplitude += fitpara[5]*(SF_Ap_P_SP_1*RBW_a11260p_1*PiPiS_21_5 + SF_Ap_P_SP_2*RBW_a11260p_1*PiPiS_11_5 + SF_Ap_P_SP_3*RBW_a11260p_2*PiPiS_22_5 + SF_Ap_P_SP_4*RBW_a11260p_2*PiPiS_12_5);
1708
1709 // D0->a1(1260)- {rho(770)0 pi- [S]} pi+
1710 double SF_Am_S_VP_1 = contract_11_0(contract_21_1(Proj1_3m1, T1_Pim2Pip1), T1_3m1);
1711 double SF_Am_S_VP_2 = contract_11_0(contract_21_1(Proj1_3m1, T1_Pim1Pip1), T1_3m1);
1712 double SF_Am_S_VP_3 = contract_11_0(contract_21_1(Proj1_3m2, T1_Pim2Pip2), T1_3m2);
1713 double SF_Am_S_VP_4 = contract_11_0(contract_21_1(Proj1_3m2, T1_Pim1Pip2), T1_3m2);
1714
1715 amplitude += fitpara[0]*fitpara[6]*(SF_Am_S_VP_1*RBW_a11260m_1*GS_rho770_12 + SF_Am_S_VP_2*RBW_a11260m_1*GS_rho770_11 + SF_Am_S_VP_3*RBW_a11260m_2*GS_rho770_22 + SF_Am_S_VP_4*RBW_a11260m_2*GS_rho770_21);
1716
1717 // D0 -> a1(1260)- {rho(770)0 pi-[D]} pi+
1718 double SF_Am_D_VP_1 = contract_11_0(contract_21_1(T2_Pip1Pim2Pim1, T1_Pim2Pip1), T1_3m1);
1719 double SF_Am_D_VP_2 = contract_11_0(contract_21_1(T2_Pip1Pim1Pim2, T1_Pim1Pip1), T1_3m1);
1720 double SF_Am_D_VP_3 = contract_11_0(contract_21_1(T2_Pip2Pim2Pim1, T1_Pim2Pip2), T1_3m2);
1721 double SF_Am_D_VP_4 = contract_11_0(contract_21_1(T2_Pip2Pim1Pim2, T1_Pim1Pip2), T1_3m2);
1722
1723 amplitude += fitpara[1]*fitpara[6]*(SF_Am_D_VP_1*RBW_a11260m_1*GS_rho770_12 + SF_Am_D_VP_2*RBW_a11260m_1*GS_rho770_11 + SF_Am_D_VP_3*RBW_a11260m_2*GS_rho770_22 + SF_Am_D_VP_4*RBW_a11260m_2*GS_rho770_21);
1724
1725 // D0 -> a1(1260)- {f2(1270) pi- [P]} pi+
1726 double SF_Am_P_TP_1 = contract_11_0(contract_21_1(contract_42_2(Proj2_3m1, T2_Pip1Pim2), T1_Pip1Pim2Pim1), T1_3m1);
1727 double SF_Am_P_TP_2 = contract_11_0(contract_21_1(contract_42_2(Proj2_3m1, T2_Pip1Pim1), T1_Pip1Pim1Pim2), T1_3m1);
1728 double SF_Am_P_TP_3 = contract_11_0(contract_21_1(contract_42_2(Proj2_3m2, T2_Pip2Pim2), T1_Pip2Pim2Pim1), T1_3m2);
1729 double SF_Am_P_TP_4 = contract_11_0(contract_21_1(contract_42_2(Proj2_3m2, T2_Pip2Pim1), T1_Pip2Pim1Pim2), T1_3m2);
1730
1731 amplitude += fitpara[2]*fitpara[6]*(SF_Am_P_TP_1*RBW_a11260m_1*RBW_f21270_12 + SF_Am_P_TP_2*RBW_a11260m_1*RBW_f21270_11 + SF_Am_P_TP_3*RBW_a11260m_2*RBW_f21270_22 + SF_Am_P_TP_4*RBW_a11260m_2*RBW_f21270_21);
1732
1733 // D0 -> a1(1260)- {f0 pi- [P]} pi+
1734 double SF_Am_P_SP_1 = contract_11_0(T1_3m1, T1_Pip1Pim2Pim1);
1735 double SF_Am_P_SP_2 = contract_11_0(T1_3m1, T1_Pip1Pim1Pim2);
1736 double SF_Am_P_SP_3 = contract_11_0(T1_3m2, T1_Pip2Pim2Pim1);
1737 double SF_Am_P_SP_4 = contract_11_0(T1_3m2, T1_Pip2Pim1Pim2);
1738
1739 amplitude += fitpara[3]*fitpara[6]*(SF_Am_P_SP_1*RBW_a11260m_1*PiPiS_12_0 + SF_Am_P_SP_2*RBW_a11260m_1*PiPiS_11_0 + SF_Am_P_SP_3*RBW_a11260m_2*PiPiS_22_0 + SF_Am_P_SP_4*RBW_a11260m_2*PiPiS_21_0);
1740 amplitude += fitpara[4]*fitpara[6]*(SF_Am_P_SP_1*RBW_a11260m_1*PiPiS_12_1 + SF_Am_P_SP_2*RBW_a11260m_1*PiPiS_11_1 + SF_Am_P_SP_3*RBW_a11260m_2*PiPiS_22_1 + SF_Am_P_SP_4*RBW_a11260m_2*PiPiS_21_1);
1741 amplitude += fitpara[5]*fitpara[6]*(SF_Am_P_SP_1*RBW_a11260m_1*PiPiS_12_5 + SF_Am_P_SP_2*RBW_a11260m_1*PiPiS_11_5 + SF_Am_P_SP_3*RBW_a11260m_2*PiPiS_22_5 + SF_Am_P_SP_4*RBW_a11260m_2*PiPiS_21_5);
1742
1743 // D0 -> a1(1420)+ {rho(770)0 pi+[S]} pi-
1744// amplitude += fitpara[7]*(SF_Ap_S_VP_1*RBW_a11420p_1*GS_rho770_21 + SF_Ap_S_VP_2*RBW_a11420p_1*GS_rho770_11 + SF_Ap_S_VP_3*RBW_a11420p_2*GS_rho770_22 + SF_Ap_S_VP_4*RBW_a11420p_2*GS_rho770_12);
1745
1746 // D0 -> a1(1420)+ {f0 pi+[P]} pi-
1747 amplitude += fitpara[7]*(SF_Ap_P_SP_1*RBW_a11420p_1*PiPiS_21_5 + SF_Ap_P_SP_2*RBW_a11420p_1*PiPiS_11_5 + SF_Ap_P_SP_3*RBW_a11420p_2*PiPiS_22_5 + SF_Ap_P_SP_4*RBW_a11420p_2*PiPiS_12_5);
1748 amplitude += fitpara[8]*(SF_Ap_P_SP_1*RBW_a11420p_1*PiPiS_21_6 + SF_Ap_P_SP_2*RBW_a11420p_1*PiPiS_11_6 + SF_Ap_P_SP_3*RBW_a11420p_2*PiPiS_22_6 + SF_Ap_P_SP_4*RBW_a11420p_2*PiPiS_12_6);
1749
1750 // D0 -> a2(1320)+ {rho(770)0 pi+[D]} pi-
1751 double SF_Tp_D_VP_1 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3p1, T1_Pip2Pim1)), Pip1Pip2Pim1), contract_42_2(Proj2_3p1, T2_3p1)), T2_Pip2Pim1Pip1);
1752 double SF_Tp_D_VP_2 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3p1, T1_Pip1Pim1)), Pip1Pip2Pim1), contract_42_2(Proj2_3p1, T2_3p1)), T2_Pip1Pim1Pip2);
1753 double SF_Tp_D_VP_3 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3p2, T1_Pip2Pim2)), Pip1Pip2Pim2), contract_42_2(Proj2_3p2, T2_3p2)), T2_Pip2Pim2Pip1);
1754 double SF_Tp_D_VP_4 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3p2, T1_Pip1Pim2)), Pip1Pip2Pim2), contract_42_2(Proj2_3p2, T2_3p2)), T2_Pip1Pim2Pip2);
1755
1756 amplitude += fitpara[9]*(SF_Tp_D_VP_1*RBW_a21320p_1*GS_rho770_21 + SF_Tp_D_VP_2*RBW_a21320p_1*GS_rho770_11 + SF_Tp_D_VP_3*RBW_a21320p_2*GS_rho770_22 + SF_Tp_D_VP_4*RBW_a21320p_2*GS_rho770_12);
1757
1758 // D0 -> a2(1320)- {rho(770)0 pi-[D]} pi+
1759 double SF_Tm_D_VP_1 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3m1, T1_Pim2Pip1)), Pim1Pim2Pip1), contract_42_2(Proj2_3m1, T2_3m1)), T2_Pip1Pim2Pim1);
1760 double SF_Tm_D_VP_2 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3m1, T1_Pim1Pip1)), Pim1Pim2Pip1), contract_42_2(Proj2_3m1, T2_3m1)), T2_Pip1Pim1Pim2);
1761 double SF_Tm_D_VP_3 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3m2, T1_Pim2Pip2)), Pim1Pim2Pip2), contract_42_2(Proj2_3m2, T2_3m2)), T2_Pip2Pim2Pim1);
1762 double SF_Tm_D_VP_4 = contract_22_0(contract_22_2(contract_31_2(contract_41_3(epsilon_uvmn, contract_21_1(Proj1_3m2, T1_Pim1Pip2)), Pim1Pim2Pip2), contract_42_2(Proj2_3m2, T2_3m2)), T2_Pip2Pim1Pim2);
1763
1764 amplitude += fitpara[10]*(SF_Tm_D_VP_1*RBW_a21320m_1*GS_rho770_12 + SF_Tm_D_VP_2*RBW_a21320m_1*GS_rho770_11 + SF_Tm_D_VP_3*RBW_a21320m_2*GS_rho770_22 + SF_Tm_D_VP_4*RBW_a21320m_2*GS_rho770_21);
1765
1766 // D0 -> pi(1300)- {rho(770)0 pi-} pi+
1767 double SF_Pm_P_VP_1 = contract_11_0(T1_Pim2Pip1,T1_Pip1Pim2Pim1);
1768 double SF_Pm_P_VP_2 = contract_11_0(T1_Pim1Pip1,T1_Pip1Pim1Pim2);
1769 double SF_Pm_P_VP_3 = contract_11_0(T1_Pim2Pip2,T1_Pip2Pim2Pim1);
1770 double SF_Pm_P_VP_4 = contract_11_0(T1_Pim1Pip2,T1_Pip2Pim1Pim2);
1771
1772 amplitude += fitpara[11]*(SF_Pm_P_VP_1*GS_rho770_12*RBW_pi1300m_1 + SF_Pm_P_VP_2*GS_rho770_11*RBW_pi1300m_1 + SF_Pm_P_VP_3*GS_rho770_22*RBW_pi1300m_2 + SF_Pm_P_VP_4*GS_rho770_21*RBW_pi1300m_2);
1773/*
1774 // D0 -> pi(1300)- {f2(1270)0 pi-} pi+
1775 double SF_Pm_D_TP_1 = contract_22_0(T2_Pip1Pim2,T2_Pip1Pim2Pim1);
1776 double SF_Pm_D_TP_2 = contract_22_0(T2_Pip1Pim1,T2_Pip1Pim1Pim2);
1777 double SF_Pm_D_TP_3 = contract_22_0(T2_Pip2Pim2,T2_Pip2Pim2Pim1);
1778 double SF_Pm_D_TP_4 = contract_22_0(T2_Pip2Pim1,T2_Pip2Pim1Pim2);
1779
1780 amplitude += fitpara[12]*fitpara[11]*(SF_Pm_D_TP_1*RBW_f21270_12*RBW_pi1300m_1 + SF_Pm_D_TP_2*RBW_f21270_11*RBW_pi1300m_1 + SF_Pm_D_TP_3*RBW_f21270_22*RBW_pi1300m_2 + SF_Pm_D_TP_4*RBW_f21270_21*RBW_pi1300m_2);
1781*/
1782 // D0 -> pi(1300)- {f0 pi-} pi+
1783 amplitude += fitpara[12]*fitpara[11]*(RBW_pi1300m_1*PiPiS_12_0 + RBW_pi1300m_1*PiPiS_11_0 + RBW_pi1300m_2*PiPiS_22_0 + RBW_pi1300m_2*PiPiS_21_0);
1784// amplitude += fitpara[13]*fitpara[11]*(RBW_pi1300m_1*PiPiS_12_5 + RBW_pi1300m_1*PiPiS_11_5 + RBW_pi1300m_2*PiPiS_22_5 + RBW_pi1300m_2*PiPiS_21_5);
1785
1786 amplitude += fitpara[13]*fitpara[11]*(RBW_pi1300m_1*PiPiS_12_6 + RBW_pi1300m_1*PiPiS_11_6 + RBW_pi1300m_2*PiPiS_22_6 + RBW_pi1300m_2*PiPiS_21_6);
1787
1788 // D0 -> pi(1300)+ {rho(770)0 pi+} pi-
1789 double SF_Pp_P_VP_1 = contract_11_0(T1_Pip2Pim1,T1_Pip2Pim1Pip1);
1790 double SF_Pp_P_VP_2 = contract_11_0(T1_Pip1Pim1,T1_Pip1Pim1Pip2);
1791 double SF_Pp_P_VP_3 = contract_11_0(T1_Pip2Pim2,T1_Pip2Pim2Pip1);
1792 double SF_Pp_P_VP_4 = contract_11_0(T1_Pip1Pim2,T1_Pip1Pim2Pip2);
1793
1794 amplitude += fitpara[14]*(SF_Pp_P_VP_1*GS_rho770_21*RBW_pi1300p_1 + SF_Pp_P_VP_2*GS_rho770_11*RBW_pi1300p_1 + SF_Pp_P_VP_3*GS_rho770_22*RBW_pi1300p_2 + SF_Pp_P_VP_4*GS_rho770_12*RBW_pi1300p_2);
1795/*
1796 // D0 -> pi(1300)+ {f2(1270)0 pi+} pi-
1797 double SF_Pp_D_TP_1 = contract_22_0(T2_Pip2Pim1,T2_Pip2Pim1Pip1);
1798 double SF_Pp_D_TP_2 = contract_22_0(T2_Pip1Pim1,T2_Pip1Pim1Pip2);
1799 double SF_Pp_D_TP_3 = contract_22_0(T2_Pip2Pim2,T2_Pip2Pim2Pip1);
1800 double SF_Pp_D_TP_4 = contract_22_0(T2_Pip1Pim2,T2_Pip1Pim2Pip2);
1801
1802 amplitude += fitpara[12]*fitpara[15]*(SF_Pp_D_TP_1*RBW_f21270_21*RBW_pi1300p_1 + SF_Pp_D_TP_2*RBW_f21270_11*RBW_pi1300p_1 + SF_Pp_D_TP_3*RBW_f21270_22*RBW_pi1300p_2 + SF_Pp_D_TP_4*RBW_f21270_12*RBW_pi1300p_2);
1803*/
1804 // D0 -> pi(1300)+ {f0 pi+} pi-
1805 amplitude += fitpara[12]*fitpara[14]*(RBW_pi1300p_1*PiPiS_21_0 + RBW_pi1300p_1*PiPiS_11_0 + RBW_pi1300p_2*PiPiS_22_0 + RBW_pi1300p_2*PiPiS_12_0);
1806// amplitude += fitpara[13]*fitpara[15]*(RBW_pi1300p_1*PiPiS_21_5 + RBW_pi1300p_1*PiPiS_11_5 + RBW_pi1300p_2*PiPiS_22_5 + RBW_pi1300p_2*PiPiS_12_5);
1807
1808 amplitude += fitpara[13]*fitpara[14]*(RBW_pi1300p_1*PiPiS_21_6 + RBW_pi1300p_1*PiPiS_11_6 + RBW_pi1300p_2*PiPiS_22_6 + RBW_pi1300p_2*PiPiS_12_6);
1809
1810 // D0 -> rho rho [S]
1811 double SF_VV_S_1 = contract_11_0(T1_Pip1Pim1, T1_Pip2Pim2);
1812 double SF_VV_S_3 = contract_11_0(T1_Pip1Pim2, T1_Pip2Pim1);
1813
1814 amplitude += fitpara[15]*(SF_VV_S_1*GS_rho770_11*GS_rho770_22+SF_VV_S_3*GS_rho770_12*GS_rho770_21);
1815
1816 // D0 -> rho rho [P]
1817 double SF_VV_P_1 = contract_11_0(contract_21_1(contract_31_2(contract_41_3(epsilon_uvmn, T1_Pip1Pim1),T1_Pip2Pim2),T1_2z11), D0);
1818 double SF_VV_P_2 = contract_11_0(contract_21_1(contract_31_2(contract_41_3(epsilon_uvmn, T1_Pip2Pim2),T1_Pip1Pim1),T1_2z12), D0);
1819 double SF_VV_P_3 = contract_11_0(contract_21_1(contract_31_2(contract_41_3(epsilon_uvmn, T1_Pip1Pim2),T1_Pip2Pim1),T1_2z21), D0);
1820 double SF_VV_P_4 = contract_11_0(contract_21_1(contract_31_2(contract_41_3(epsilon_uvmn, T1_Pip2Pim1),T1_Pip1Pim2),T1_2z22), D0);
1821
1822 amplitude += fitpara[16]*(SF_VV_P_1*GS_rho770_11*GS_rho770_22+SF_VV_P_3*GS_rho770_12*GS_rho770_21);
1823
1824 // D0 -> rho rho [D]
1825 double SF_VV_D_1 = contract_11_0(contract_21_1(T2_2z11,T1_Pip2Pim2), T1_Pip1Pim1);
1826 double SF_VV_D_3 = contract_11_0(contract_21_1(T2_2z21,T1_Pip2Pim1), T1_Pip1Pim2);
1827
1828 amplitude += fitpara[17]*(SF_VV_D_1*GS_rho770_11*GS_rho770_22+SF_VV_D_3*GS_rho770_12*GS_rho770_21);
1829
1830 // D0 -> rho rho' [P]
1831 amplitude += fitpara[18]*(SF_VV_P_1*GS_rho770_11*GS_rho1450_22+SF_VV_P_2*GS_rho770_22*GS_rho1450_11 + SF_VV_P_3*GS_rho770_12*GS_rho1450_21 + SF_VV_P_3*GS_rho770_21*GS_rho1450_12);
1832
1833 // D0 ->rho f0
1834 double SF_VS_P_1 = contract_11_0(T1_Pip1Pim1,T1_2z11);
1835 double SF_VS_P_2 = contract_11_0(T1_Pip2Pim2,T1_2z12);
1836 double SF_VS_P_3 = contract_11_0(T1_Pip1Pim2,T1_2z21);
1837 double SF_VS_P_4 = contract_11_0(T1_Pip2Pim1,T1_2z22);
1838
1839 amplitude += fitpara[19]*(SF_VS_P_1*GS_rho770_11*PiPiS_22_0 + SF_VS_P_2*GS_rho770_22*PiPiS_11_0 + SF_VS_P_3*GS_rho770_12*PiPiS_21_0 + SF_VS_P_4*GS_rho770_21*PiPiS_12_0);
1840 amplitude += fitpara[20]*(SF_VS_P_1*GS_rho770_11*PiPiS_22_5 + SF_VS_P_2*GS_rho770_22*PiPiS_11_5 + SF_VS_P_3*GS_rho770_12*PiPiS_21_5 + SF_VS_P_4*GS_rho770_21*PiPiS_12_5);
1841 amplitude += fitpara[21]*(SF_VS_P_1*GS_rho770_11*PiPiS_22_6 + SF_VS_P_2*GS_rho770_22*PiPiS_11_6 + SF_VS_P_3*GS_rho770_12*PiPiS_21_6 + SF_VS_P_4*GS_rho770_21*PiPiS_12_6);
1842
1843 // D0 -> f0f0
1844 //00
1845 amplitude += fitpara[22]*(PiPiS_11_0*PiPiS_22_0 + PiPiS_12_0*PiPiS_21_0 + PiPiS_22_0*PiPiS_11_0 + PiPiS_21_0*PiPiS_12_0);
1846 amplitude += fitpara[23]*(PiPiS_11_0*PiPiS_22_1 + PiPiS_12_0*PiPiS_21_1 + PiPiS_22_0*PiPiS_11_1 + PiPiS_21_0*PiPiS_12_1);
1847 amplitude += fitpara[24]*(PiPiS_11_1*PiPiS_22_1 + PiPiS_12_1*PiPiS_21_1 + PiPiS_22_1*PiPiS_11_1 + PiPiS_21_1*PiPiS_12_1);
1848 amplitude += fitpara[25]*(PiPiS_11_1*PiPiS_22_5 + PiPiS_12_1*PiPiS_21_5 + PiPiS_22_1*PiPiS_11_5 + PiPiS_21_1*PiPiS_12_5);
1849 amplitude += fitpara[26]*(PiPiS_11_5*PiPiS_22_5 + PiPiS_12_5*PiPiS_21_5 + PiPiS_22_5*PiPiS_11_5 + PiPiS_21_5*PiPiS_12_5);
1850 amplitude += fitpara[27]*(PiPiS_11_5*PiPiS_22_6 + PiPiS_12_5*PiPiS_21_6 + PiPiS_22_5*PiPiS_11_6 + PiPiS_21_5*PiPiS_12_6);
1851
1852 // D0 -> f2 f0
1853 double SF_TS_D_1 = contract_22_0(T2_Pip1Pim1,T2_2z11);
1854 double SF_TS_D_2 = contract_22_0(T2_Pip2Pim2,T2_2z12);
1855 double SF_TS_D_3 = contract_22_0(T2_Pip1Pim2,T2_2z21);
1856 double SF_TS_D_4 = contract_22_0(T2_Pip2Pim1,T2_2z22);
1857
1858 amplitude += fitpara[28]*(SF_TS_D_1*RBW_f21270_11*PiPiS_22_5 + SF_TS_D_2*RBW_f21270_22*PiPiS_11_5 + SF_TS_D_3*RBW_f21270_12*PiPiS_21_5 + SF_TS_D_4*RBW_f21270_21*PiPiS_12_5);
1859 amplitude += fitpara[29]*(SF_TS_D_1*RBW_f21270_11*PiPiS_22_6 + SF_TS_D_2*RBW_f21270_22*PiPiS_11_6 + SF_TS_D_3*RBW_f21270_12*PiPiS_21_6 + SF_TS_D_4*RBW_f21270_21*PiPiS_12_6);
1860
1861 return amplitude;
1862
1863}
1864
1865int EvtD0To2pip2pim::CalAmp()
1866{
1867 m_AmpD0 = CalD0Amp();
1868 m_AmpDb = CalDbAmp();
1869 return 0;
1870}
1871
1872double EvtD0To2pip2pim::mag2(complex<double> x)
1873{
1874 double temp = x.real()*x.real() + x.imag()*x.imag();
1875 return temp;
1876}
1877
1878double EvtD0To2pip2pim::arg(complex<double> x)
1879{
1880 double temp = atan(x.imag()/x.real());
1881 if(x.real()<0) temp=temp+TMath::Pi();
1882 return temp;
1883}
1884double EvtD0To2pip2pim::Get_strongPhase()
1885{
1886 double temp = arg(m_AmpD0) - arg(m_AmpDb);
1887 while (temp < -TMath::Pi()){
1888 temp += 2.0*TMath::Pi();
1889 }
1890 while (temp > TMath::Pi()){
1891 temp -= 2.0*TMath::Pi();
1892 }
1893 return temp;
1894}
1895
1896double EvtD0To2pip2pim::AmplitudeSquare(int charm, int tagmode){
1897
1898 EvtVector4R dp1=GetDaugMomLab(0),dp2=GetDaugMomLab(1),dp3=GetDaugMomLab(2), dp4=GetDaugMomLab(3); // pi+ pi+ pi- pi-
1899 EvtVector4R mp = dp1 + dp2 + dp3 + dp4;
1900
1901 double emp = mp.get(0);
1902 EvtVector3R boostp3(-mp.get(1)/emp, -mp.get(2)/emp, -mp.get(3)/emp);
1903
1904 EvtVector4R dp1bst = boostTo(dp1, boostp3);
1905 EvtVector4R dp2bst = boostTo(dp2, boostp3);
1906 EvtVector4R dp3bst = boostTo(dp3, boostp3);
1907 EvtVector4R dp4bst = boostTo(dp4, boostp3);
1908
1909 double p4pip1[4], p4pip2[4], p4pim1[4], p4pim2[4];
1910 for(int i=0; i<3; i++){
1911 p4pip1[i]=dp1bst.get(i+1);
1912 p4pip2[i]=dp2bst.get(i+1);
1913 p4pim1[i]=dp3bst.get(i+1);
1914 p4pim2[i]=dp4bst.get(i+1);
1915 }
1916 p4pip1[3]=dp1bst.get(0);
1917 p4pip2[3]=dp2bst.get(0);
1918 p4pim1[3]=dp3bst.get(0);
1919 p4pim2[3]=dp4bst.get(0);
1920
1921 setInput(p4pip1, p4pim1, p4pip2, p4pim2);
1922 CalAmp();
1923 complex<double> ampD0, ampDb;
1924 if(charm>0){
1925 ampD0 = Get_AmpD0();
1926 ampDb = Get_AmpDb();
1927 }else{
1928 ampD0 = Get_AmpDb();
1929 ampDb = Get_AmpD0();
1930 }
1931
1932 double ampsq = 1e-20;
1933 double r_tag = 0, R_tag = 0, delta_tag = 0;
1934
1935 if (tagmode==1||tagmode==2||tagmode==3) {
1936 if(tagmode == 1){// Kpi
1937 r_tag = 0.0586;
1938 R_tag = 1;
1939 delta_tag = 192.1/180.0*3.1415926;
1940 }else if(tagmode == 2){// Kpipi0
1941 r_tag = 0.0441;
1942 R_tag = 0.79;
1943 delta_tag = 196.0/180.0*3.1415926;
1944 }else if(tagmode == 3){// K3pi
1945 r_tag = 0.0550;
1946 R_tag = 0.44;
1947 delta_tag = 161.0/180.0*3.1415926;
1948 }
1949 complex<double> qcf(r_tag*R_tag*cos(-delta_tag), r_tag*R_tag*sin(-delta_tag));
1950 complex<double> ampD0_part1 = ampD0 - qcf*ampDb;
1951 ampsq = mag2(ampD0_part1) + r_tag*r_tag*(1-R_tag*R_tag)*(mag2(ampDb));
1952 } else {
1953 ampsq = mag2(ampD0);
1954 }
1955
1956 return (ampsq <= 0) ? 1e-20 : ampsq;
1957}
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
double P(RecMdcKalTrack *trk)
double mass
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
TFile * f1
TF1 * g1
Double_t x[10]
int ID[no]
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
EvtTensor3C eps(const EvtVector3R &v)
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per saves r n generator level $ !Flag for chat level in output
Definition FoamA.h:89
const double mpi
Definition Gam4pikp.cxx:47
XmlRpcServer s
****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
TTree * t
Definition binning.cxx:23
void decay(EvtParticle *p)
virtual ~EvtD0To2pip2pim()
void getName(std::string &name)
EvtDecayBase * clone()
double getArg(int j)
void setProbMax(double prbmx)
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)
EvtVector4R getP4Lab()
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 mp
double double * m2
Definition qcdloop1.h:75