31#include "TLorentzVector.h"
48std::vector<double>
operator + (std::vector<double> &lhs, std::vector<double> &rhs) {
49 assert(
int(lhs.size()) ==
int(rhs.size()));
50 std::vector<double> sum; sum.clear();
52 for (
int i=0; i<int(lhs.size()); i++) {
53 sum.push_back(lhs[i]+rhs[i]);
62 model_name=
"D0ToKSpipipi0";
106 for(
int i=0; i<_nd; i++){
110 double prob = AmplitudeSquare();
115void EvtD0ToKSpipipi0::readInputFile() {
117 resonance_par[
"kstarm_892_mass"] = 0.89166;
118 resonance_par[
"kstarm_892_width"] = 0.0508;
119 resonance_par[
"kstar0_892_mass"] = 0.89581;
120 resonance_par[
"kstar0_892_width"] = 0.0474;
121 resonance_par[
"kstarp_892_mass"] = 0.89166;
122 resonance_par[
"kstarp_892_width"] = 0.0508;
123 resonance_par[
"k1m_1270_mass"] = 1.272;
124 resonance_par[
"k1m_1270_width"] = 0.087;
125 resonance_par[
"k10_1270_mass"] = 1.272;
126 resonance_par[
"k10_1270_width"] = 0.087;
127 resonance_par[
"k1m_1400_mass"] = 1.403;
128 resonance_par[
"k1m_1400_width"] = 0.174;
129 resonance_par[
"k10_1400_mass"] = 1.403;
130 resonance_par[
"k10_1400_width"] = 0.174;
131 resonance_par[
"kstarm_1410_mass"] = 1.414;
132 resonance_par[
"kstarm_1410_width"] = 0.232;
133 resonance_par[
"kstar0_1410_mass"] = 1.414;
134 resonance_par[
"kstar0_1410_width"] = 0.232;
135 resonance_par[
"k0starm_1430_mass"] = 1.425;
136 resonance_par[
"k0starm_1430_width"] = 0.27;
137 resonance_par[
"k0star0_1430_mass"] = 1.425;
138 resonance_par[
"k0star0_1430_width"] = 0.27;
139 resonance_par[
"k2starm_1430_mass"] = 1.4256;
140 resonance_par[
"k2starm_1430_width"] = 0.0985;
141 resonance_par[
"k2star0_1430_mass"] = 1.4324;
142 resonance_par[
"k2star0_1430_width"] = 0.109;
143 resonance_par[
"km_1460_mass"] = 1.46;
144 resonance_par[
"km_1460_width"] = 0.26;
145 resonance_par[
"k0_1460_mass"] = 1.46;
146 resonance_par[
"k0_1460_width"] = 0.26;
147 resonance_par[
"k2m_1580_mass"] = 1.58;
148 resonance_par[
"k2m_1580_width"] = 0.11;
149 resonance_par[
"k20_1580_mass"] = 1.58;
150 resonance_par[
"k20_1580_width"] = 0.11;
151 resonance_par[
"km_1630_mass"] = 1.595;
152 resonance_par[
"km_1630_width"] = 0.016;
153 resonance_par[
"k0_1630_mass"] = 1.595;
154 resonance_par[
"k0_1630_width"] = 0.016;
155 resonance_par[
"k1m_1650_mass"] = 1.65;
156 resonance_par[
"k1m_1650_width"] = 0.15;
157 resonance_par[
"k10_1650_mass"] = 1.65;
158 resonance_par[
"k10_1650_width"] = 0.15;
159 resonance_par[
"kstarm_1680_mass"] = 1.717;
160 resonance_par[
"kstarm_1680_width"] = 0.322;
161 resonance_par[
"kstar0_1680_mass"] = 1.717;
162 resonance_par[
"kstar0_1680_width"] = 0.322;
163 resonance_par[
"k2m_1770_mass"] = 1.773;
164 resonance_par[
"k2m_1770_width"] = 0.186;
165 resonance_par[
"k20_1770_mass"] = 1.773;
166 resonance_par[
"k20_1770_width"] = 0.186;
167 resonance_par[
"sigma_500_mass"] = 0.9264;
168 resonance_par[
"sigma_500_width"] = 0.45623;
169 resonance_par[
"sigma_500_gf"] = 0.0024;
170 resonance_par[
"f0_980_mass"] = 0.965;
171 resonance_par[
"f0_980_width"] = 0.055;
172 resonance_par[
"f0_980_g1"] = 0.165;
173 resonance_par[
"f0_980_g2"] = 4.21;
174 resonance_par[
"f0_1370_mass"] = 1.37;
175 resonance_par[
"f0_1370_width"] = 0.26;
176 resonance_par[
"f2_1270_mass"] = 1.275;
177 resonance_par[
"f2_1270_width"] = 0.185;
178 resonance_par[
"rhop_770_mass"] = 0.77511;
179 resonance_par[
"rhop_770_width"] = 0.1491;
180 resonance_par[
"rhom_770_mass"] = 0.77511;
181 resonance_par[
"rhom_770_width"] = 0.1491;
182 resonance_par[
"rho0_770_mass"] = 0.77526;
183 resonance_par[
"rho0_770_width"] = 0.1478;
184 resonance_par[
"omega_782_mass"] = 0.78265;
185 resonance_par[
"omega_782_width"] = 0.00849;
186 resonance_par[
"eta_547_mass"] = 0.547862;
187 resonance_par[
"eta_547_width"] = 0.00131;
188 resonance_par[
"phi_1020_mass"] = 1.01946;
189 resonance_par[
"phi_1020_width"] = 0.00426;
190 resonance_par[
"a10_1260_mass"] = 1.366;
191 resonance_par[
"a10_1260_width"] = 0.542;
192 resonance_par[
"kstarm_phsp_mass"] = 2;
193 resonance_par[
"kstarm_phsp_width"] = 90;
194 resonance_par[
"kstar0_phsp_mass"] = 2;
195 resonance_par[
"kstar0_phsp_width"] = 90;
196 resonance_par[
"kstarp_phsp_mass"] = 2;
197 resonance_par[
"kstarp_phsp_width"] = 90;
198 resonance_par[
"rhop_phsp_mass"] = 2;
199 resonance_par[
"rhop_phsp_width"] = 90;
200 resonance_par[
"rho0_phsp_mass"] = 2;
201 resonance_par[
"rho0_phsp_width"] = 90;
202 resonance_par[
"rhom_phsp_mass"] = 2;
203 resonance_par[
"rhom_phsp_width"] = 90;
204 resonance_par[
"k1m_phsp_mass"] = 2;
205 resonance_par[
"k1m_phsp_width"] = 90;
206 resonance_par[
"k10_phsp_mass"] = 2;
207 resonance_par[
"k10_phsp_width"] = 90;
208 resonance_par[
"k1p_phsp_mass"] = 2;
209 resonance_par[
"k1p_phsp_width"] = 90;
210 resonance_par[
"a10_phsp_mass"] = 2;
211 resonance_par[
"a10_phsp_width"] = 90;
216void EvtD0ToKSpipipi0::initPar() {
219 for (
int i=0; i<4; i++) {
220 for (
int j=0; j<4; j++) {
232 for (
int i=0; i<4; i++) {
233 for (
int j=0; j<4; j++) {
234 for (
int k=0; k<4; k++) {
235 for (
int l=0; l<4; l++) {
236 if (i==j || i==k || i==l || j==k || j==l || k==l) {
237 epsilon.push_back(0.0);
239 if (i==0 && j==1 && k==2 && l==3) epsilon.push_back( 1.0);
240 if (i==0 && j==1 && k==3 && l==2) epsilon.push_back(-1.0);
241 if (i==0 && j==2 && k==1 && l==3) epsilon.push_back(-1.0);
242 if (i==0 && j==2 && k==3 && l==1) epsilon.push_back( 1.0);
243 if (i==0 && j==3 && k==1 && l==2) epsilon.push_back( 1.0);
244 if (i==0 && j==3 && k==2 && l==1) epsilon.push_back(-1.0);
246 if (i==1 && j==0 && k==2 && l==3) epsilon.push_back(-1.0);
247 if (i==1 && j==0 && k==3 && l==2) epsilon.push_back( 1.0);
248 if (i==1 && j==2 && k==0 && l==3) epsilon.push_back( 1.0);
249 if (i==1 && j==2 && k==3 && l==0) epsilon.push_back(-1.0);
250 if (i==1 && j==3 && k==0 && l==2) epsilon.push_back(-1.0);
251 if (i==1 && j==3 && k==2 && l==0) epsilon.push_back( 1.0);
253 if (i==2 && j==0 && k==1 && l==3) epsilon.push_back( 1.0);
254 if (i==2 && j==0 && k==3 && l==1) epsilon.push_back(-1.0);
255 if (i==2 && j==1 && k==0 && l==3) epsilon.push_back(-1.0);
256 if (i==2 && j==1 && k==3 && l==0) epsilon.push_back( 1.0);
257 if (i==2 && j==3 && k==0 && l==1) epsilon.push_back( 1.0);
258 if (i==2 && j==3 && k==1 && l==0) epsilon.push_back(-1.0);
260 if (i==3 && j==0 && k==1 && l==2) epsilon.push_back(-1.0);
261 if (i==3 && j==0 && k==2 && l==1) epsilon.push_back( 1.0);
262 if (i==3 && j==1 && k==0 && l==2) epsilon.push_back( 1.0);
263 if (i==3 && j==1 && k==2 && l==0) epsilon.push_back(-1.0);
264 if (i==3 && j==2 && k==0 && l==1) epsilon.push_back(-1.0);
265 if (i==3 && j==2 && k==1 && l==0) epsilon.push_back( 1.0);
281void EvtD0ToKSpipipi0::addPartialWave(
EvtComplex amp,
double mag,
double pha) {
284 totalAmp += (amp * coeff);
288void EvtD0ToKSpipipi0::addPartialWave(
EvtComplex amp1,
EvtComplex amp2,
double mag,
double pha) {
291 totalAmp += (amp1 *amp2 * coeff);
294void EvtD0ToKSpipipi0::addPartialWave(
double t1,
EvtComplex resX,
EvtComplex resY,
double mag,
double pha) {
296 totalAmp += (t1 * resX * resY * coeff);
303 totalAmp += (t1 * resX1 * resY1 + fact * t2 * resX2 * resY2) * coeff;
311 double m2_ks0 = Ks0.
mass2();
312 double m2_pip = Pip.
mass2();
313 double m2_pim = Pim.
mass2();
314 double m2_pi0 =
Pi0.mass2();
315 double m2_ks0pip = (Ks0 + Pip).mass2();
316 double m2_ks0pim = (Ks0 + Pim).mass2();
317 double m2_ks0pi0 = (Ks0 +
Pi0).mass2();
318 double m2_pippim = (Pip + Pim).mass2();
319 double m2_pippi0 = (Pip +
Pi0).mass2();
320 double m2_pimpi0 = (Pim +
Pi0).mass2();
321 double m2_ks0pippim = (Ks0 + Pip + Pim).mass2();
322 double m2_ks0pippi0 = (Ks0 + Pip +
Pi0).mass2();
323 double m2_ks0pimpi0 = (Ks0 + Pim +
Pi0).mass2();
324 double m2_pippimpi0 = (Pip + Pim +
Pi0).mass2();
326 std::vector<double> ks0; ks0.clear();
327 ks0.push_back(Ks0.
get(1)); ks0.push_back(Ks0.
get(2)); ks0.push_back(Ks0.
get(3)); ks0.push_back(Ks0.
get(0));
328 std::vector<double> pip; pip.clear();
329 pip.push_back(Pip.
get(1)); pip.push_back(Pip.
get(2)); pip.push_back(Pip.
get(3)); pip.push_back(Pip.
get(0));
330 std::vector<double> pim; pim.clear();
331 pim.push_back(Pim.
get(1)); pim.push_back(Pim.
get(2)); pim.push_back(Pim.
get(3)); pim.push_back(Pim.
get(0));
332 std::vector<double> pi0; pi0.clear();
333 pi0.push_back(
Pi0.get(1)); pi0.push_back(
Pi0.get(2)); pi0.push_back(
Pi0.get(3)); pi0.push_back(
Pi0.get(0));
340 spinfactor[
"D2PP_P2SP_pippimpi0_pimpi0_0"] = D2PP_P2SP();
341 spinfactor[
"D2PP_P2SP_pippimpi0_pippi0_0"] = D2PP_P2SP();
342 spinfactor[
"D2PP_P2SP_pippimpi0_pippim_0"] = D2PP_P2SP();
343 spinfactor[
"D2PP_P2SP_ks0pimpi0_ks0pim_0"] = D2PP_P2SP();
344 spinfactor[
"D2PP_P2SP_ks0pimpi0_ks0pi0_0"] = D2PP_P2SP();
345 spinfactor[
"D2PP_P2SP_ks0pimpi0_pimpi0_0"] = D2PP_P2SP();
346 spinfactor[
"D2PP_P2SP_ks0pippi0_ks0pip_0"] = D2PP_P2SP();
347 spinfactor[
"D2PP_P2SP_ks0pippi0_ks0pi0_0"] = D2PP_P2SP();
348 spinfactor[
"D2PP_P2SP_ks0pippi0_pippi0_0"] = D2PP_P2SP();
349 spinfactor[
"D2PP_P2SP_ks0pippim_ks0pip_0"] = D2PP_P2SP();
350 spinfactor[
"D2PP_P2SP_ks0pippim_ks0pim_0"] = D2PP_P2SP();
351 spinfactor[
"D2PP_P2SP_ks0pippim_pippim_0"] = D2PP_P2SP();
354 spinfactor[
"D2PP_P2VP_pippimpi0_pimpi0_1"] = D2PP_P2VP(pi0, pim, pip, ks0, 1);
355 spinfactor[
"D2PP_P2VP_pippimpi0_pippi0_1"] = D2PP_P2VP(pip, pi0, pim, ks0, 1);
356 spinfactor[
"D2PP_P2VP_pippimpi0_pippim_1"] = D2PP_P2VP(pip, pim, pi0, ks0, 1);
357 spinfactor[
"D2PP_P2VP_ks0pimpi0_ks0pim_1"] = D2PP_P2VP(ks0, pim, pi0, pip, 1);
358 spinfactor[
"D2PP_P2VP_ks0pimpi0_ks0pi0_1"] = D2PP_P2VP(ks0, pi0, pim, pip, 1);
359 spinfactor[
"D2PP_P2VP_ks0pimpi0_pimpi0_1"] = D2PP_P2VP(pim, pi0, ks0, pip, 1);
360 spinfactor[
"D2PP_P2VP_ks0pippi0_ks0pip_1"] = D2PP_P2VP(ks0, pip, pi0, pim, 1);
361 spinfactor[
"D2PP_P2VP_ks0pippi0_ks0pi0_1"] = D2PP_P2VP(ks0, pi0, pip, pim, 1);
362 spinfactor[
"D2PP_P2VP_ks0pippi0_pippi0_1"] = D2PP_P2VP(pip, pi0, ks0, pim, 1);
363 spinfactor[
"D2PP_P2VP_ks0pippim_ks0pip_1"] = D2PP_P2VP(ks0, pip, pim, pi0, 1);
364 spinfactor[
"D2PP_P2VP_ks0pippim_ks0pim_1"] = D2PP_P2VP(ks0, pim, pip, pi0, 1);
365 spinfactor[
"D2PP_P2VP_ks0pippim_pippim_1"] = D2PP_P2VP(pip, pim, ks0, pi0, 1);
368 spinfactor[
"D2VP_V2VP_pippimpi0_pimpi0_1"] = D2VP_V2VP(pi0, pim, pip, ks0, 1);
369 spinfactor[
"D2VP_V2VP_pippimpi0_pippi0_1"] = D2VP_V2VP(pip, pi0, pim, ks0, 1);
370 spinfactor[
"D2VP_V2VP_pippimpi0_pippim_1"] = D2VP_V2VP(pip, pim, pi0, ks0, 1);
371 spinfactor[
"D2VP_V2VP_ks0pimpi0_ks0pim_1"] = D2VP_V2VP(ks0, pim, pi0, pip, 1);
372 spinfactor[
"D2VP_V2VP_ks0pimpi0_ks0pi0_1"] = D2VP_V2VP(ks0, pi0, pim, pip, 1);
373 spinfactor[
"D2VP_V2VP_ks0pimpi0_pimpi0_1"] = D2VP_V2VP(pim, pi0, ks0, pip, 1);
374 spinfactor[
"D2VP_V2VP_ks0pippi0_ks0pip_1"] = D2VP_V2VP(ks0, pip, pi0, pim, 1);
375 spinfactor[
"D2VP_V2VP_ks0pippi0_ks0pi0_1"] = D2VP_V2VP(ks0, pi0, pip, pim, 1);
376 spinfactor[
"D2VP_V2VP_ks0pippi0_pippi0_1"] = D2VP_V2VP(pip, pi0, ks0, pim, 1);
377 spinfactor[
"D2VP_V2VP_ks0pippim_ks0pip_1"] = D2VP_V2VP(ks0, pip, pim, pi0, 1);
378 spinfactor[
"D2VP_V2VP_ks0pippim_ks0pim_1"] = D2VP_V2VP(ks0, pim, pip, pi0, 1);
379 spinfactor[
"D2VP_V2VP_ks0pippim_pippim_1"] = D2VP_V2VP(pip, pim, ks0, pi0, 1);
382 spinfactor[
"D2AP_A2SP_pippimpi0_pimpi0_1"] = D2AP_A2SP(pi0, pim, pip, ks0, 1);
383 spinfactor[
"D2AP_A2SP_pippimpi0_pippi0_1"] = D2AP_A2SP(pip, pi0, pim, ks0, 1);
384 spinfactor[
"D2AP_A2SP_pippimpi0_pippim_1"] = D2AP_A2SP(pip, pim, pi0, ks0, 1);
385 spinfactor[
"D2AP_A2SP_ks0pimpi0_ks0pim_1"] = D2AP_A2SP(ks0, pim, pi0, pip, 1);
386 spinfactor[
"D2AP_A2SP_ks0pimpi0_ks0pi0_1"] = D2AP_A2SP(ks0, pi0, pim, pip, 1);
387 spinfactor[
"D2AP_A2SP_ks0pimpi0_pimpi0_1"] = D2AP_A2SP(pim, pi0, ks0, pip, 1);
388 spinfactor[
"D2AP_A2SP_ks0pippi0_ks0pip_1"] = D2AP_A2SP(ks0, pip, pi0, pim, 1);
389 spinfactor[
"D2AP_A2SP_ks0pippi0_ks0pi0_1"] = D2AP_A2SP(ks0, pi0, pip, pim, 1);
390 spinfactor[
"D2AP_A2SP_ks0pippi0_pippi0_1"] = D2AP_A2SP(pip, pi0, ks0, pim, 1);
391 spinfactor[
"D2AP_A2SP_ks0pippim_ks0pip_1"] = D2AP_A2SP(ks0, pip, pim, pi0, 1);
392 spinfactor[
"D2AP_A2SP_ks0pippim_ks0pim_1"] = D2AP_A2SP(ks0, pim, pip, pi0, 1);
393 spinfactor[
"D2AP_A2SP_ks0pippim_pippim_1"] = D2AP_A2SP(pip, pim, ks0, pi0, 1);
396 spinfactor[
"D2AP_A2VP_pippimpi0_pimpi0_0"] = D2AP_A2VP(pi0, pim, pip, ks0, 0);
397 spinfactor[
"D2AP_A2VP_pippimpi0_pippi0_0"] = D2AP_A2VP(pip, pi0, pim, ks0, 0);
398 spinfactor[
"D2AP_A2VP_pippimpi0_pippim_0"] = D2AP_A2VP(pip, pim, pi0, ks0, 0);
399 spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pim_0"] = D2AP_A2VP(ks0, pim, pi0, pip, 0);
400 spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pi0_0"] = D2AP_A2VP(ks0, pi0, pim, pip, 0);
401 spinfactor[
"D2AP_A2VP_ks0pimpi0_pimpi0_0"] = D2AP_A2VP(pim, pi0, ks0, pip, 0);
402 spinfactor[
"D2AP_A2VP_ks0pippi0_ks0pip_0"] = D2AP_A2VP(ks0, pip, pi0, pim, 0);
403 spinfactor[
"D2AP_A2VP_ks0pippi0_ks0pi0_0"] = D2AP_A2VP(ks0, pi0, pip, pim, 0);
404 spinfactor[
"D2AP_A2VP_ks0pippi0_pippi0_0"] = D2AP_A2VP(pip, pi0, ks0, pim, 0);
405 spinfactor[
"D2AP_A2VP_ks0pippim_ks0pip_0"] = D2AP_A2VP(ks0, pip, pim, pi0, 0);
406 spinfactor[
"D2AP_A2VP_ks0pippim_ks0pim_0"] = D2AP_A2VP(ks0, pim, pip, pi0, 0);
407 spinfactor[
"D2AP_A2VP_ks0pippim_pippim_0"] = D2AP_A2VP(pip, pim, ks0, pi0, 0);
408 spinfactor[
"D2AP_A2VP_pippimpi0_pimpi0_2"] = D2AP_A2VP(pi0, pim, pip, ks0, 2);
409 spinfactor[
"D2AP_A2VP_pippimpi0_pippi0_2"] = D2AP_A2VP(pip, pi0, pim, ks0, 2);
410 spinfactor[
"D2AP_A2VP_pippimpi0_pippim_2"] = D2AP_A2VP(pip, pim, pi0, ks0, 2);
411 spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pim_2"] = D2AP_A2VP(ks0, pim, pi0, pip, 2);
412 spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pi0_2"] = D2AP_A2VP(ks0, pi0, pim, pip, 2);
413 spinfactor[
"D2AP_A2VP_ks0pimpi0_pimpi0_2"] = D2AP_A2VP(pim, pi0, ks0, pip, 2);
414 spinfactor[
"D2AP_A2VP_ks0pippi0_ks0pip_2"] = D2AP_A2VP(ks0, pip, pi0, pim, 2);
415 spinfactor[
"D2AP_A2VP_ks0pippi0_ks0pi0_2"] = D2AP_A2VP(ks0, pi0, pip, pim, 2);
416 spinfactor[
"D2AP_A2VP_ks0pippi0_pippi0_2"] = D2AP_A2VP(pip, pi0, ks0, pim, 2);
417 spinfactor[
"D2AP_A2VP_ks0pippim_ks0pip_2"] = D2AP_A2VP(ks0, pip, pim, pi0, 2);
418 spinfactor[
"D2AP_A2VP_ks0pippim_ks0pim_2"] = D2AP_A2VP(ks0, pim, pip, pi0, 2);
419 spinfactor[
"D2AP_A2VP_ks0pippim_pippim_2"] = D2AP_A2VP(pip, pim, ks0, pi0, 2);
422 spinfactor[
"D2AP_A2TP_pippimpi0_pimpi0_1"] = D2AP_A2TP(pi0, pim, pip, ks0, 1);
423 spinfactor[
"D2AP_A2TP_pippimpi0_pippi0_1"] = D2AP_A2TP(pip, pi0, pim, ks0, 1);
424 spinfactor[
"D2AP_A2TP_pippimpi0_pippim_1"] = D2AP_A2TP(pip, pim, pi0, ks0, 1);
425 spinfactor[
"D2AP_A2TP_ks0pimpi0_ks0pim_1"] = D2AP_A2TP(ks0, pim, pi0, pip, 1);
426 spinfactor[
"D2AP_A2TP_ks0pimpi0_ks0pi0_1"] = D2AP_A2TP(ks0, pi0, pim, pip, 1);
427 spinfactor[
"D2AP_A2TP_ks0pimpi0_pimpi0_1"] = D2AP_A2TP(pim, pi0, ks0, pip, 1);
428 spinfactor[
"D2AP_A2TP_ks0pippi0_ks0pip_1"] = D2AP_A2TP(ks0, pip, pi0, pim, 1);
429 spinfactor[
"D2AP_A2TP_ks0pippi0_ks0pi0_1"] = D2AP_A2TP(ks0, pi0, pip, pim, 1);
430 spinfactor[
"D2AP_A2TP_ks0pippi0_pippi0_1"] = D2AP_A2TP(pip, pi0, ks0, pim, 1);
431 spinfactor[
"D2AP_A2TP_ks0pippim_ks0pip_1"] = D2AP_A2TP(ks0, pip, pim, pi0, 1);
432 spinfactor[
"D2AP_A2TP_ks0pippim_ks0pim_1"] = D2AP_A2TP(ks0, pim, pip, pi0, 1);
433 spinfactor[
"D2AP_A2TP_ks0pippim_pippim_1"] = D2AP_A2TP(pip, pim, ks0, pi0, 1);
436 spinfactor[
"D2TP_T2VP_pippimpi0_pimpi0_2"] = D2TP_T2VP(pi0, pim, pip, ks0, 2);
437 spinfactor[
"D2TP_T2VP_pippimpi0_pippi0_2"] = D2TP_T2VP(pip, pi0, pim, ks0, 2);
438 spinfactor[
"D2TP_T2VP_pippimpi0_pippim_2"] = D2TP_T2VP(pip, pim, pi0, ks0, 2);
439 spinfactor[
"D2TP_T2VP_ks0pimpi0_ks0pim_2"] = D2TP_T2VP(ks0, pim, pi0, pip, 2);
440 spinfactor[
"D2TP_T2VP_ks0pimpi0_ks0pi0_2"] = D2TP_T2VP(ks0, pi0, pim, pip, 2);
441 spinfactor[
"D2TP_T2VP_ks0pimpi0_pimpi0_2"] = D2TP_T2VP(pim, pi0, ks0, pip, 2);
442 spinfactor[
"D2TP_T2VP_ks0pippi0_ks0pip_2"] = D2TP_T2VP(ks0, pip, pi0, pim, 2);
443 spinfactor[
"D2TP_T2VP_ks0pippi0_ks0pi0_2"] = D2TP_T2VP(ks0, pi0, pip, pim, 2);
444 spinfactor[
"D2TP_T2VP_ks0pippi0_pippi0_2"] = D2TP_T2VP(pip, pi0, ks0, pim, 2);
445 spinfactor[
"D2TP_T2VP_ks0pippim_ks0pip_2"] = D2TP_T2VP(ks0, pip, pim, pi0, 2);
446 spinfactor[
"D2TP_T2VP_ks0pippim_ks0pim_2"] = D2TP_T2VP(ks0, pim, pip, pi0, 2);
447 spinfactor[
"D2TP_T2VP_ks0pippim_pippim_2"] = D2TP_T2VP(pip, pim, ks0, pi0, 2);
450 spinfactor[
"D2TP_T2TP_pippimpi0_pimpi0_2"] = D2TP_T2TP(pi0, pim, pip, ks0, 2);
451 spinfactor[
"D2TP_T2TP_pippimpi0_pippi0_2"] = D2TP_T2TP(pip, pi0, pim, ks0, 2);
452 spinfactor[
"D2TP_T2TP_pippimpi0_pippim_2"] = D2TP_T2TP(pip, pim, pi0, ks0, 2);
453 spinfactor[
"D2TP_T2TP_ks0pimpi0_ks0pim_2"] = D2TP_T2TP(ks0, pim, pi0, pip, 2);
454 spinfactor[
"D2TP_T2TP_ks0pimpi0_ks0pi0_2"] = D2TP_T2TP(ks0, pi0, pim, pip, 2);
455 spinfactor[
"D2TP_T2TP_ks0pimpi0_pimpi0_2"] = D2TP_T2TP(pim, pi0, ks0, pip, 2);
456 spinfactor[
"D2TP_T2TP_ks0pippi0_ks0pip_2"] = D2TP_T2TP(ks0, pip, pi0, pim, 2);
457 spinfactor[
"D2TP_T2TP_ks0pippi0_ks0pi0_2"] = D2TP_T2TP(ks0, pi0, pip, pim, 2);
458 spinfactor[
"D2TP_T2TP_ks0pippi0_pippi0_2"] = D2TP_T2TP(pip, pi0, ks0, pim, 2);
459 spinfactor[
"D2TP_T2TP_ks0pippim_ks0pip_2"] = D2TP_T2TP(ks0, pip, pim, pi0, 2);
460 spinfactor[
"D2TP_T2TP_ks0pippim_ks0pim_2"] = D2TP_T2TP(ks0, pim, pip, pi0, 2);
461 spinfactor[
"D2TP_T2TP_ks0pippim_pippim_2"] = D2TP_T2TP(pip, pim, ks0, pi0, 2);
464 spinfactor[
"D2PTP_PT2SP_pippimpi0_pimpi0_2"] = D2PTP_PT2SP(pi0, pim, pip, ks0, 2);
465 spinfactor[
"D2PTP_PT2SP_pippimpi0_pippi0_2"] = D2PTP_PT2SP(pip, pi0, pim, ks0, 2);
466 spinfactor[
"D2PTP_PT2SP_pippimpi0_pippim_2"] = D2PTP_PT2SP(pip, pim, pi0, ks0, 2);
467 spinfactor[
"D2PTP_PT2SP_ks0pimpi0_ks0pim_2"] = D2PTP_PT2SP(ks0, pim, pi0, pip, 2);
468 spinfactor[
"D2PTP_PT2SP_ks0pimpi0_ks0pi0_2"] = D2PTP_PT2SP(ks0, pi0, pim, pip, 2);
469 spinfactor[
"D2PTP_PT2SP_ks0pimpi0_pimpi0_2"] = D2PTP_PT2SP(pim, pi0, ks0, pip, 2);
470 spinfactor[
"D2PTP_PT2SP_ks0pippi0_ks0pip_2"] = D2PTP_PT2SP(ks0, pip, pi0, pim, 2);
471 spinfactor[
"D2PTP_PT2SP_ks0pippi0_ks0pi0_2"] = D2PTP_PT2SP(ks0, pi0, pip, pim, 2);
472 spinfactor[
"D2PTP_PT2SP_ks0pippi0_pippi0_2"] = D2PTP_PT2SP(pip, pi0, ks0, pim, 2);
473 spinfactor[
"D2PTP_PT2SP_ks0pippim_ks0pip_2"] = D2PTP_PT2SP(ks0, pip, pim, pi0, 2);
474 spinfactor[
"D2PTP_PT2SP_ks0pippim_ks0pim_2"] = D2PTP_PT2SP(ks0, pim, pip, pi0, 2);
475 spinfactor[
"D2PTP_PT2SP_ks0pippim_pippim_2"] = D2PTP_PT2SP(pip, pim, ks0, pi0, 2);
478 spinfactor[
"D2PTP_PT2VP_pippimpi0_pimpi0_2"] = D2PTP_PT2VP(pi0, pim, pip, ks0, 2);
479 spinfactor[
"D2PTP_PT2VP_pippimpi0_pippi0_2"] = D2PTP_PT2VP(pip, pi0, pim, ks0, 2);
480 spinfactor[
"D2PTP_PT2VP_pippimpi0_pippim_2"] = D2PTP_PT2VP(pip, pim, pi0, ks0, 2);
481 spinfactor[
"D2PTP_PT2VP_ks0pimpi0_ks0pim_2"] = D2PTP_PT2VP(ks0, pim, pi0, pip, 2);
482 spinfactor[
"D2PTP_PT2VP_ks0pimpi0_ks0pi0_2"] = D2PTP_PT2VP(ks0, pi0, pim, pip, 2);
483 spinfactor[
"D2PTP_PT2VP_ks0pimpi0_pimpi0_2"] = D2PTP_PT2VP(pim, pi0, ks0, pip, 2);
484 spinfactor[
"D2PTP_PT2VP_ks0pippi0_ks0pip_2"] = D2PTP_PT2VP(ks0, pip, pi0, pim, 2);
485 spinfactor[
"D2PTP_PT2VP_ks0pippi0_ks0pi0_2"] = D2PTP_PT2VP(ks0, pi0, pip, pim, 2);
486 spinfactor[
"D2PTP_PT2VP_ks0pippi0_pippi0_2"] = D2PTP_PT2VP(pip, pi0, ks0, pim, 2);
487 spinfactor[
"D2PTP_PT2VP_ks0pippim_ks0pip_2"] = D2PTP_PT2VP(ks0, pip, pim, pi0, 2);
488 spinfactor[
"D2PTP_PT2VP_ks0pippim_ks0pim_2"] = D2PTP_PT2VP(ks0, pim, pip, pi0, 2);
489 spinfactor[
"D2PTP_PT2VP_ks0pippim_pippim_2"] = D2PTP_PT2VP(pip, pim, ks0, pi0, 2);
492 spinfactor[
"D2PTP_PT2TP_pippimpi0_pimpi0_2"] = D2PTP_PT2TP(pi0, pim, pip, ks0, 2);
493 spinfactor[
"D2PTP_PT2TP_pippimpi0_pippi0_2"] = D2PTP_PT2TP(pip, pi0, pim, ks0, 2);
494 spinfactor[
"D2PTP_PT2TP_pippimpi0_pippim_2"] = D2PTP_PT2TP(pip, pim, pi0, ks0, 2);
495 spinfactor[
"D2PTP_PT2TP_ks0pimpi0_ks0pim_2"] = D2PTP_PT2TP(ks0, pim, pi0, pip, 2);
496 spinfactor[
"D2PTP_PT2TP_ks0pimpi0_ks0pi0_2"] = D2PTP_PT2TP(ks0, pi0, pim, pip, 2);
497 spinfactor[
"D2PTP_PT2TP_ks0pimpi0_pimpi0_2"] = D2PTP_PT2TP(pim, pi0, ks0, pip, 2);
498 spinfactor[
"D2PTP_PT2TP_ks0pippi0_ks0pip_2"] = D2PTP_PT2TP(ks0, pip, pi0, pim, 2);
499 spinfactor[
"D2PTP_PT2TP_ks0pippi0_ks0pi0_2"] = D2PTP_PT2TP(ks0, pi0, pip, pim, 2);
500 spinfactor[
"D2PTP_PT2TP_ks0pippi0_pippi0_2"] = D2PTP_PT2TP(pip, pi0, ks0, pim, 2);
501 spinfactor[
"D2PTP_PT2TP_ks0pippim_ks0pip_2"] = D2PTP_PT2TP(ks0, pip, pim, pi0, 2);
502 spinfactor[
"D2PTP_PT2TP_ks0pippim_ks0pim_2"] = D2PTP_PT2TP(ks0, pim, pip, pi0, 2);
503 spinfactor[
"D2PTP_PT2TP_ks0pippim_pippim_2"] = D2PTP_PT2TP(pip, pim, ks0, pi0, 2);
510 spinfactor[
"D2SS_ks0pim_pippi0_0"] = D2SS();
511 spinfactor[
"D2SS_ks0pi0_pippim_0"] = D2SS();
512 spinfactor[
"D2SS_ks0pip_pimpi0_0"] = D2SS();
515 spinfactor[
"D2VS_ks0pim_pippi0_1"] = D2VS(ks0, pim, pip, pi0, 1);
516 spinfactor[
"D2VS_ks0pi0_pippim_1"] = D2VS(ks0, pi0, pip, pim, 1);
517 spinfactor[
"D2VS_ks0pip_pimpi0_1"] = D2VS(ks0, pip, pim, pi0, 1);
518 spinfactor[
"D2VS_pimpi0_ks0pip_1"] = D2VS(pim, pi0, ks0, pip, 1);
519 spinfactor[
"D2VS_pippim_ks0pi0_1"] = D2VS(pip, pim, ks0, pi0, 1);
520 spinfactor[
"D2VS_pippi0_ks0pim_1"] = D2VS(pip, pi0, ks0, pim, 1);
523 spinfactor[
"D2VV_ks0pim_pippi0_0"] = D2VV(ks0, pim, pip, pi0, 0);
524 spinfactor[
"D2VV_ks0pi0_pippim_0"] = D2VV(ks0, pi0, pip, pim, 0);
525 spinfactor[
"D2VV_ks0pip_pimpi0_0"] = D2VV(ks0, pip, pim, pi0, 0);
526 spinfactor[
"D2VV_ks0pim_pippi0_1"] = D2VV(ks0, pim, pip, pi0, 1);
527 spinfactor[
"D2VV_ks0pi0_pippim_1"] = D2VV(ks0, pi0, pip, pim, 1);
528 spinfactor[
"D2VV_ks0pip_pimpi0_1"] = D2VV(ks0, pip, pim, pi0, 1);
529 spinfactor[
"D2VV_ks0pim_pippi0_2"] = D2VV(ks0, pim, pip, pi0, 2);
530 spinfactor[
"D2VV_ks0pi0_pippim_2"] = D2VV(ks0, pi0, pip, pim, 2);
531 spinfactor[
"D2VV_ks0pip_pimpi0_2"] = D2VV(ks0, pip, pim, pi0, 2);
534 spinfactor[
"D2TS_ks0pim_pippi0_2"] = D2TS(ks0, pim, pip, pi0, 2);
535 spinfactor[
"D2TS_ks0pi0_pippim_2"] = D2TS(ks0, pi0, pip, pim, 2);
536 spinfactor[
"D2TS_ks0pip_pimpi0_2"] = D2TS(ks0, pip, pim, pi0, 2);
537 spinfactor[
"D2TS_pimpi0_ks0pip_2"] = D2TS(pim, pi0, ks0, pip, 2);
538 spinfactor[
"D2TS_pippim_ks0pi0_2"] = D2TS(pip, pim, ks0, pi0, 2);
539 spinfactor[
"D2TS_pippi0_ks0pim_2"] = D2TS(pip, pi0, ks0, pim, 2);
542 spinfactor[
"D2TV_ks0pim_pippi0_1"] = D2TV(ks0, pim, pip, pi0, 1);
543 spinfactor[
"D2TV_ks0pi0_pippim_1"] = D2TV(ks0, pi0, pip, pim, 1);
544 spinfactor[
"D2TV_ks0pip_pimpi0_1"] = D2TV(ks0, pip, pim, pi0, 1);
545 spinfactor[
"D2TV_pimpi0_ks0pip_1"] = D2TV(pim, pi0, ks0, pip, 1);
546 spinfactor[
"D2TV_pippim_ks0pi0_1"] = D2TV(pip, pim, ks0, pi0, 1);
547 spinfactor[
"D2TV_pippi0_ks0pim_1"] = D2TV(pip, pi0, ks0, pim, 1);
548 spinfactor[
"D2TV_ks0pim_pippi0_2"] = D2TV(ks0, pim, pip, pi0, 2);
549 spinfactor[
"D2TV_ks0pi0_pippim_2"] = D2TV(ks0, pi0, pip, pim, 2);
550 spinfactor[
"D2TV_ks0pip_pimpi0_2"] = D2TV(ks0, pip, pim, pi0, 2);
551 spinfactor[
"D2TV_pimpi0_ks0pip_2"] = D2TV(pim, pi0, ks0, pip, 2);
552 spinfactor[
"D2TV_pippim_ks0pi0_2"] = D2TV(pip, pim, ks0, pi0, 2);
553 spinfactor[
"D2TV_pippi0_ks0pim_2"] = D2TV(pip, pi0, ks0, pim, 2);
556 spinfactor[
"D2TT_ks0pim_pippi0_0"] = D2TT(ks0, pim, pip, pi0, 0);
557 spinfactor[
"D2TT_ks0pi0_pippim_0"] = D2TT(ks0, pi0, pip, pim, 0);
558 spinfactor[
"D2TT_ks0pip_pimpi0_0"] = D2TT(ks0, pip, pim, pi0, 0);
559 spinfactor[
"D2TT_ks0pim_pippi0_1"] = D2TT(ks0, pim, pip, pi0, 1);
560 spinfactor[
"D2TT_ks0pi0_pippim_1"] = D2TT(ks0, pi0, pip, pim, 1);
561 spinfactor[
"D2TT_ks0pip_pimpi0_1"] = D2TT(ks0, pip, pim, pi0, 1);
562 spinfactor[
"D2TT_ks0pim_pippi0_2"] = D2TT(ks0, pim, pip, pi0, 2);
563 spinfactor[
"D2TT_ks0pi0_pippim_2"] = D2TT(ks0, pi0, pip, pim, 2);
564 spinfactor[
"D2TT_ks0pip_pimpi0_2"] = D2TT(ks0, pip, pim, pi0, 2);
573 double m2_ks0 = Ks0.
mass2();
574 double m2_pip = Pip.
mass2();
575 double m2_pim = Pim.
mass2();
576 double m2_pi0 =
Pi0.mass2();
577 double m2_ks0pip = (Ks0 + Pip).mass2();
578 double m2_ks0pim = (Ks0 + Pim).mass2();
579 double m2_ks0pi0 = (Ks0 +
Pi0).mass2();
580 double m2_pippim = (Pip + Pim).mass2();
581 double m2_pippi0 = (Pip +
Pi0).mass2();
582 double m2_pimpi0 = (Pim +
Pi0).mass2();
583 double m2_ks0pippim = (Ks0 + Pip + Pim).mass2();
584 double m2_ks0pippi0 = (Ks0 + Pip +
Pi0).mass2();
585 double m2_ks0pimpi0 = (Ks0 + Pim +
Pi0).mass2();
586 double m2_pippimpi0 = (Pip + Pim +
Pi0).mass2();
588 std::vector<double> ks0; ks0.clear();
589 ks0.push_back(Ks0.
get(1)); ks0.push_back(Ks0.
get(2)); ks0.push_back(Ks0.
get(3)); ks0.push_back(Ks0.
get(0));
590 std::vector<double> pip; pip.clear();
591 pip.push_back(Pip.
get(1)); pip.push_back(Pip.
get(2)); pip.push_back(Pip.
get(3)); pip.push_back(Pip.
get(0));
592 std::vector<double> pim; pim.clear();
593 pim.push_back(Pim.
get(1)); pim.push_back(Pim.
get(2)); pim.push_back(Pim.
get(3)); pim.push_back(Pim.
get(0));
594 std::vector<double> pi0; pi0.clear();
595 pi0.push_back(
Pi0.get(1)); pi0.push_back(
Pi0.get(2)); pi0.push_back(
Pi0.get(3)); pi0.push_back(
Pi0.get(0));
598 propagator[
"kstarm_892" ] = create_RBW_propagator(
"kstarm_892", m2_ks0pim, m2_ks0, m2_pim, 1);
599 propagator[
"kstar0_892" ] = create_RBW_propagator(
"kstar0_892", m2_ks0pi0, m2_ks0, m2_pi0, 1);
600 propagator[
"kstarp_892" ] = create_RBW_propagator(
"kstarp_892", m2_ks0pip, m2_ks0, m2_pip, 1);
601 propagator[
"k1m_1270" ] = create_BW_propagator(
"k1m_1270", m2_ks0pimpi0);
602 propagator[
"k10_1270" ] = create_BW_propagator(
"k10_1270", m2_ks0pippim);
603 propagator[
"k1m_1400" ] = create_BW_propagator(
"k1m_1400", m2_ks0pimpi0);
604 propagator[
"k10_1400" ] = create_BW_propagator(
"k10_1400", m2_ks0pippim);
605 propagator[
"kstarm2_1410" ] = create_BW_propagator(
"kstarm_1410", m2_ks0pim);
606 propagator[
"kstar02_1410" ] = create_BW_propagator(
"kstar0_1410", m2_ks0pi0);
607 propagator[
"kstarm3_1410" ] = create_BW_propagator(
"kstarm_1410", m2_ks0pimpi0);
608 propagator[
"kstar03_1410" ] = create_BW_propagator(
"kstar0_1410", m2_ks0pippim);
609 propagator[
"k0starm_1430" ] = create_KPiSLASS_propagator(
"k0starm_1430", m2_ks0pim, m2_ks0, m2_pim);
610 propagator[
"k0star0_1430" ] = create_KPiSLASS_propagator(
"k0star0_1430", m2_ks0pi0, m2_ks0, m2_pi0);
613 propagator[
"k2starm2_1430"] = create_BW_propagator(
"k2starm_1430", m2_ks0pim);
614 propagator[
"k2star02_1430"] = create_BW_propagator(
"k2star0_1430", m2_ks0pi0);
615 propagator[
"k2starm3_1430"] = create_BW_propagator(
"k2starm_1430", m2_ks0pimpi0);
616 propagator[
"k2star03_1430"] = create_BW_propagator(
"k2star0_1430", m2_ks0pippim);
617 propagator[
"km_1460" ] = create_BW_propagator(
"km_1460", m2_ks0pimpi0);
618 propagator[
"k0_1460" ] = create_BW_propagator(
"k0_1460", m2_ks0pippim);
619 propagator[
"k2m_1580" ] = create_BW_propagator(
"k2m_1580", m2_ks0pimpi0);
620 propagator[
"k20_1580" ] = create_BW_propagator(
"k20_1580", m2_ks0pippim);
621 propagator[
"km_1630" ] = create_BW_propagator(
"km_1630", m2_ks0pimpi0);
622 propagator[
"k0_1630" ] = create_BW_propagator(
"k0_1630", m2_ks0pippim);
623 propagator[
"k1m_1650" ] = create_BW_propagator(
"k1m_1650", m2_ks0pimpi0);
624 propagator[
"k10_1650" ] = create_BW_propagator(
"k10_1650", m2_ks0pippim);
625 propagator[
"kstarm2_1680" ] = create_BW_propagator(
"kstarm_1680", m2_ks0pim);
626 propagator[
"kstar02_1680" ] = create_BW_propagator(
"kstar0_1680", m2_ks0pi0);
627 propagator[
"kstarm3_1680" ] = create_BW_propagator(
"kstarm_1680", m2_ks0pimpi0);
628 propagator[
"kstar03_1680" ] = create_BW_propagator(
"kstar0_1680", m2_ks0pippim);
629 propagator[
"k2m_1770" ] = create_BW_propagator(
"k2m_1770", m2_ks0pimpi0);
630 propagator[
"k20_1770" ] = create_BW_propagator(
"k20_1770", m2_ks0pippim);
633 propagator[
"sigma_500" ] = create_sigma_propagator(
"sigma_500", m2_pippim);
634 propagator[
"rhop_770" ] = create_RBW_propagator(
"rhop_770", m2_pippi0, m2_pip, m2_pi0, 1);
635 propagator[
"rhom_770" ] = create_RBW_propagator(
"rhom_770", m2_pimpi0, m2_pim, m2_pi0, 1);
636 propagator[
"rho0_770" ] = create_GS_propagator(
"rho0_770", m2_pippim);
637 propagator[
"omega2_782" ] = create_BW_propagator(
"omega_782", m2_pippim);
638 propagator[
"f0_980" ] = create_Flatte2_propagator(
"f0_980", m2_pippim, mpion, mpion, mkaon, mkaon);
639 propagator[
"f0_1370" ] = create_BW_propagator(
"f0_1370", m2_pippim);
640 propagator[
"f2_1270" ] = create_BW_propagator(
"f2_1270", m2_pippim);
645 propagator[
"phi_1020" ] = create_BW_propagator(
"phi_1020", m2_pippimpi0);
647 propagator[
"omega3_782" ] = create_BW_propagator(
"omega_782", m2_pippimpi0);
649 propagator[
"eta_547" ] = create_BW_propagator(
"eta_547", m2_pippimpi0);
657 propagator[
"kstarm_phsp" ] = create_BW_propagator(
"kstarm_phsp", m2_ks0pim);
658 propagator[
"kstar0_phsp" ] = create_BW_propagator(
"kstar0_phsp", m2_ks0pi0);
659 propagator[
"kstarp_phsp" ] = create_BW_propagator(
"kstarp_phsp", m2_ks0pip);
660 propagator[
"rhop_phsp" ] = create_BW_propagator(
"rhop_phsp", m2_pippi0);
661 propagator[
"rhom_phsp" ] = create_BW_propagator(
"rhom_phsp", m2_pimpi0);
662 propagator[
"rho0_phsp" ] = create_BW_propagator(
"rho0_phsp", m2_pippim);
663 propagator[
"k1m_phsp" ] = create_BW_propagator(
"k1m_phsp", m2_ks0pimpi0);
664 propagator[
"k10_phsp" ] = create_BW_propagator(
"k10_phsp", m2_ks0pippim);
665 propagator[
"k1p_phsp" ] = create_BW_propagator(
"k1p_phsp", m2_ks0pippi0);
666 propagator[
"a10_phsp" ] = create_BW_propagator(
"a10_phsp", m2_pippimpi0);
674double EvtD0ToKSpipipi0::contract_11_0(vector<double> pa, vector<double> pb) {
675 assert(pa.size() == pb.size() && pa.size() == 4);
677 double temp = pa[3]*pb[3] - pa[0]*pb[0] - pa[1]*pb[1] - pa[2]*pb[2];
681vector<double> EvtD0ToKSpipipi0::contract_21_1(vector<double> pa, vector<double> pb){
682 assert(pa.size() == 16 && pb.size() == 4);
684 vector<double> temp; temp.clear();
685 for (
int i=0; i<4; i++) {
687 for (
int j=0; j<4; j++) {
689 sum += pa[idx]*pb[j]*g[4*j+j];
697double EvtD0ToKSpipipi0::contract_22_0(vector<double> pa, vector<double> pb){
698 assert(pa.size() == 16 && pb.size() == 16);
701 for (
int i=0; i<4; i++) {
702 for (
int j=0; j<4; j++) {
704 temp += pa[idx]*pb[idx]*g[4*i+i]*g[4*j+j];
711vector<double> EvtD0ToKSpipipi0::contract_31_2(vector<double> pa, vector<double> pb){
712 assert(pa.size() == 64 && pb.size() == 4);
714 vector<double> temp; temp.clear();
715 for (
int i=0; i<16; i++) {
717 for (
int j=0; j<4; j++) {
719 sum += pa[idx]*pb[j]*g[4*j+j];
727vector<double> EvtD0ToKSpipipi0::contract_41_3(vector<double> pa, vector<double> pb){
728 assert(pa.size() == 256 && pb.size()==4);
730 vector<double> temp; temp.clear();
731 for (
int i=0; i<64; i++) {
733 for (
int j=0; j<4; j++) {
735 sum += pa[idx]*pb[j]*g[4*j+j];
743vector<double> EvtD0ToKSpipipi0::contract_42_2(vector<double> pa, vector<double> pb){
744 assert(pa.size() == 256 && pb.size() == 16);
746 vector<double> temp; temp.clear();
747 for (
int i=0; i<16; i++) {
749 for (
int j=0; j<4; j++) {
750 for (
int k=0; k<4; k++) {
751 int idxa = i*16+j*4+k;
753 sum += pa[idxa] * pb[idxb] * g[4*j+j] * g[4*k+k];
762vector<double> EvtD0ToKSpipipi0::contract_22_2(vector<double> pa, vector<double> pb){
763 assert(pa.size() == 16 && pb.size() == 16);
765 vector<double> temp; temp.clear();
766 for (
int i=0; i<4; i++) {
767 for (
int j=0; j<4; j++) {
769 for (
int k=0; k<4; k++) {
772 sum += pa[idxa] * pb[idxb] * g[4*k+k];
784vector<double> EvtD0ToKSpipipi0::Proj(vector<double> pa,
int rank) {
786 cout<<
"Error: pa"<<endl;
790 cout<<
"Error: L<0 !!!"<<endl;
794 double msa = contract_11_0(pa, pa);
797 vector<double> proj_uv; proj_uv.clear();
798 for (
int i=0; i<4; i++) {
799 for (
int j=0; j<4; j++) {
801 double temp = -g[idx] + pa[i]*pa[j]/msa;
802 proj_uv.push_back(temp);
806 vector<double> proj; proj.clear();
809 vector<double>
t;
t.clear();
812 }
else if (rank==1) {
814 }
else if (rank==2) {
815 vector<double> proj_uvmn; proj_uvmn.clear();
816 for (
int i=0; i<4; i++) {
817 for (
int j=0; j<4; j++) {
818 for (
int k=0; k<4; k++) {
819 for (
int l=0; l<4; l++) {
821 int idx1_1 = 4*i + k;
822 int idx1_2 = 4*i + l;
823 int idx1_3 = 4*i + j;
825 int idx2_1 = 4*j + l;
826 int idx2_2 = 4*j + k;
827 int idx2_3 = 4*k + l;
829 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];
830 proj_uvmn.push_back(temp);
838 cout<<
"rank>2: please add it by yourself!!!"<<endl;
846vector<double> EvtD0ToKSpipipi0::OrbitalTensors(vector<double> pa, vector<double> pb, vector<double> pc,
double r,
int rank) {
847 assert(pa.size() == 4 && pb.size() == 4 && pc.size() == 4);
849 cout<<
"Error: L<0 !!!"<<endl;
854 vector<double> mr; mr.clear();
856 for(
int i=0; i<4; i++){
857 double temp = pb[i] - pc[i];
862 double msa = contract_11_0(pa, pa);
863 double msb = contract_11_0(pb, pb);
864 double msc = contract_11_0(pc, pc);
867 double top = msa + msb - msc;
868 double Q2abc = top*top/(4.0*msa) - msb;
873 double Q_02 = Q_0*Q_0;
874 double Q_04 = Q_02*Q_02;
878 double Q4abc = Q2abc*Q2abc;
882 double mB1 = sqrt(2.0/(Q2abc + Q_02));
883 double mB2 = sqrt(13.0/(Q4abc + (3.0*Q_02)*Q2abc + 9.0*Q_04));
888 vector<double> proj_uv; proj_uv.clear();
889 for (
int i=0; i<4; i++) {
890 for (
int j=0; j<4; j++) {
892 double temp = -g[idx] + pa[i]*pa[j]/msa;
893 proj_uv.push_back(temp);
897 vector<double> Bt; Bt.clear();
900 vector<double>
t;
t.clear();
904 vector<double> t_u; t_u.clear();
905 vector<double> Bt_u; Bt_u.clear();
906 for (
int i=0; i<4; i++) {
908 for (
int j=0; j<4; j++) {
910 temp += -proj_uv[idx]*mr[j]*g[j*4+j];
913 Bt_u.push_back(temp*mB1);
915 if (rank==1) Bt = Bt_u;
917 double t_u2 = contract_11_0(t_u,t_u);
919 vector<double> Bt_uv; Bt_uv.clear();
920 for (
int i=0; i<4; i++) {
921 for (
int j=0; j<4; j++) {
923 double temp = t_u[i]*t_u[j] + (1.0/3.0)*proj_uv[idx]*t_u2;
924 Bt_uv.push_back(temp*mB2);
927 if (rank==2) Bt = Bt_uv;
930 cout<<
"rank>2: please add it by yorself!!!"<<endl;
942double EvtD0ToKSpipipi0::D2PP_P2SP() {
944 double SF_D2PP_P2SP = 1.0;
950double EvtD0ToKSpipipi0::D2PP_P2VP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
951 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
954 vector<double> V = p1 +
p2;
955 vector<double> P2 =
p3;
956 vector<double>
P = V + P2;
957 vector<double> P1 =
p4;
959 vector<double> P_orbitals_Spin1OrbitalTensor = OrbitalTensors(
P, V, P2, rRes, 1);
960 vector<double> V_orbitals_Spin1OrbitalTensor = OrbitalTensors(V, p1,
p2, rRes, 1);
962 double SF_D2PP_P2VP = 0.;
963 SF_D2PP_P2VP = contract_11_0(P_orbitals_Spin1OrbitalTensor, V_orbitals_Spin1OrbitalTensor);
969double EvtD0ToKSpipipi0::D2VP_V2VP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
970 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
973 vector<double> V2 = p1 +
p2;
974 vector<double> P2 =
p3;
975 vector<double> V1 = V2 + P2;
976 vector<double> P1 =
p4;
977 vector<double> D = V1 + P1;
979 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D, V1, P1, rD , 1);
980 vector<double> V1_orbitals_Spin1OrbitalTensor = OrbitalTensors(V1, V2, P2, rRes, 1);
981 vector<double> V2_orbitals_Spin1OrbitalTensor = OrbitalTensors(V2, p1,
p2, rRes, 1);
982 vector<double> Proj1_V1 = Proj(V1, 1);
984 double SF_D2VP_V2VP = 0.;
985 SF_D2VP_V2VP = contract_11_0( contract_21_1(contract_31_2(contract_41_3(epsilon, V1), V2_orbitals_Spin1OrbitalTensor), V1_orbitals_Spin1OrbitalTensor), contract_21_1(Proj1_V1, D_orbitals_Spin1OrbitalTensor) );
992double EvtD0ToKSpipipi0::D2AP_A2SP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
993 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
996 vector<double> S = p1 +
p2;
997 vector<double> P2 =
p3;
998 vector<double>
A = S + P2;
999 vector<double> P1 =
p4;
1000 vector<double> D =
A + P1;
1002 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D, A, P1, rD , 1);
1003 vector<double> A_orbitals_Spin1OrbitalTensor = OrbitalTensors(A, S, P2, rRes, 1);
1005 double SF_D2AP_A2SP = 0.;
1006 SF_D2AP_A2SP = contract_11_0(D_orbitals_Spin1OrbitalTensor, A_orbitals_Spin1OrbitalTensor);
1007 return SF_D2AP_A2SP;
1012double EvtD0ToKSpipipi0::D2AP_A2VP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1013 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1016 vector<double> V = p1 +
p2;
1017 vector<double> P2 =
p3;
1018 vector<double>
A = V + P2;
1019 vector<double> P1 =
p4;
1020 vector<double> D =
A + P1;
1022 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D, A, P1, rD , 1);
1023 vector<double> A_orbitals_Spin2OrbitalTensor = OrbitalTensors(A, V, P2, rRes, 2);
1024 vector<double> V_orbitals_Spin1OrbitalTensor = OrbitalTensors(V, p1,
p2, rRes, 1);
1025 vector<double> Proj1_A = Proj(A, 1);
1027 double SF_D2AP_A2VP = 0.;
1028 if (l==0) {SF_D2AP_A2VP = contract_11_0(D_orbitals_Spin1OrbitalTensor, contract_21_1(Proj1_A, V_orbitals_Spin1OrbitalTensor));}
1029 if (l==2) {SF_D2AP_A2VP = contract_11_0(D_orbitals_Spin1OrbitalTensor, contract_21_1(A_orbitals_Spin2OrbitalTensor, V_orbitals_Spin1OrbitalTensor));}
1030 return SF_D2AP_A2VP;
1035double EvtD0ToKSpipipi0::D2AP_A2TP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1036 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1039 vector<double> T = p1 +
p2;
1040 vector<double> P2 =
p3;
1041 vector<double>
A = T + P2;
1042 vector<double> P1 =
p4;
1043 vector<double> D =
A + P1;
1045 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D, A, P1, rD , 1);
1046 vector<double> A_orbitals_Spin1OrbitalTensor = OrbitalTensors(A, T, P2, rRes, 1);
1047 vector<double> T_orbitals_Spin2OrbitalTensor = OrbitalTensors(T, p1,
p2, rRes, 2);
1048 vector<double> Proj2_A = Proj(A, 2);
1050 double SF_D2AP_A2TP = 0.;
1052 SF_D2AP_A2TP = contract_11_0(D_orbitals_Spin1OrbitalTensor, contract_21_1(contract_42_2(Proj2_A, T_orbitals_Spin2OrbitalTensor), A_orbitals_Spin1OrbitalTensor));
1053 return SF_D2AP_A2TP;
1058double EvtD0ToKSpipipi0::D2TP_T2VP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1059 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1062 vector<double> V = p1 +
p2;
1063 vector<double> P2 =
p3;
1064 vector<double> T = V + P2;
1065 vector<double> P1 =
p4;
1066 vector<double> D = T + P1;
1068 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D, T, P1, rD , 2);
1069 vector<double> T_orbitals_Spin2OrbitalTensor = OrbitalTensors(T, V, P2, rRes, 2);
1070 vector<double> V_orbitals_Spin1OrbitalTensor = OrbitalTensors(V, p1,
p2, rRes, 1);
1071 vector<double> Proj1_T = Proj(T, 1);
1072 vector<double> Proj2_T = Proj(T, 2);
1074 double SF_D2TP_T2VP = 0.;
1075 SF_D2TP_T2VP = contract_22_0( contract_42_2(Proj2_T, D_orbitals_Spin2OrbitalTensor), contract_22_2(contract_31_2(contract_41_3(epsilon, T), contract_21_1(Proj1_T, V_orbitals_Spin1OrbitalTensor)), T_orbitals_Spin2OrbitalTensor) );
1076 return SF_D2TP_T2VP;
1081double EvtD0ToKSpipipi0::D2TP_T2TP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1082 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1085 vector<double> T2 = p1 +
p2;
1086 vector<double> P2 =
p3;
1087 vector<double> T1 = T2 + P2;
1088 vector<double> P1 =
p4;
1089 vector<double> D = T1 + P1;
1091 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D , T1, P1, rD , 2);
1092 vector<double> T1_orbitals_Spin1OrbitalTensor = OrbitalTensors(T1, T2, P2, rRes, 1);
1093 vector<double> T2_orbitals_Spin2OrbitalTensor = OrbitalTensors(T2, p1,
p2, rRes, 2);
1094 vector<double> Proj2_T1 = Proj(T1, 2);
1096 double SF_D2TP_T2TP = 0.;
1097 SF_D2TP_T2TP = contract_22_0( contract_22_2(contract_31_2(contract_41_3(epsilon, T1), T1_orbitals_Spin1OrbitalTensor), T2_orbitals_Spin2OrbitalTensor), contract_42_2(Proj2_T1, D_orbitals_Spin2OrbitalTensor) );
1099 return SF_D2TP_T2TP;
1104double EvtD0ToKSpipipi0::D2PTP_PT2SP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1105 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1108 vector<double> S = p1 +
p2;
1109 vector<double> P2 =
p3;
1110 vector<double> PT = S + P2;
1111 vector<double> P1 =
p4;
1112 vector<double> D = PT + P1;
1114 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D , PT, P1, rD , 2);
1115 vector<double> PT_orbitals_Spin2OrbitalTensor = OrbitalTensors(PT, S, P2, rRes, 2);
1117 double SF_D2PTP_PT2SP = 0.;
1118 SF_D2PTP_PT2SP = contract_22_0(D_orbitals_Spin2OrbitalTensor, PT_orbitals_Spin2OrbitalTensor);
1119 return SF_D2PTP_PT2SP;
1124double EvtD0ToKSpipipi0::D2PTP_PT2VP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1125 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1128 vector<double> V = p1 +
p2;
1129 vector<double> P2 =
p3;
1130 vector<double> PT = V + P2;
1131 vector<double> P1 =
p4;
1132 vector<double> D = PT + P1;
1134 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D , PT, P1, rD , 2);
1135 vector<double> PT_orbitals_Spin1OrbitalTensor = OrbitalTensors(PT, V, P2, rRes, 1);
1136 vector<double> V_orbitals_Spin1OrbitalTensor = OrbitalTensors(V , p1,
p2, rRes, 1);
1137 vector<double> Proj2_PT = Proj(PT, 2);
1139 double SF_D2PTP_PT2VP = 0.;
1140 SF_D2PTP_PT2VP = contract_22_0(D_orbitals_Spin2OrbitalTensor, contract_31_2(contract_41_3(Proj2_PT, V_orbitals_Spin1OrbitalTensor), PT_orbitals_Spin1OrbitalTensor));
1141 return SF_D2PTP_PT2VP;
1146double EvtD0ToKSpipipi0::D2PTP_PT2TP(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1147 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1150 vector<double> T = p1 +
p2;
1151 vector<double> P2 =
p3;
1152 vector<double> PT = T + P2;
1153 vector<double> P1 =
p4;
1154 vector<double> D = PT + P1;
1156 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D , PT, P1, rD , 2);
1157 vector<double> T_orbitals_Spin2OrbitalTensor = OrbitalTensors(T , p1,
p2, rRes, 2);
1158 vector<double> Proj2_PT = Proj(PT, 2);
1160 double SF_D2PTP_PT2TP = 0.;
1161 SF_D2PTP_PT2TP = contract_22_0(D_orbitals_Spin2OrbitalTensor, contract_42_2(Proj2_PT, T_orbitals_Spin2OrbitalTensor));
1162 return SF_D2PTP_PT2TP;
1171double EvtD0ToKSpipipi0::D2SS() {
1173 double SF_D2SS = 1.0;
1179double EvtD0ToKSpipipi0::D2VS(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l){
1180 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1183 vector<double> V = p1 +
p2;
1184 vector<double> S =
p3 +
p4;
1185 vector<double> D = V + S;
1187 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D, V, S, rD , 1);
1188 vector<double> V_orbitals_Spin1OrbitalTensor = OrbitalTensors(V, p1,
p2, rRes, 1);
1190 double SF_D2VS = 0.;
1191 SF_D2VS = contract_11_0(D_orbitals_Spin1OrbitalTensor, V_orbitals_Spin1OrbitalTensor);
1197double EvtD0ToKSpipipi0::D2VV(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1198 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1201 vector<double> V1 = p1 +
p2;
1202 vector<double> V2 =
p3 +
p4;
1203 vector<double> D = V1 + V2;
1205 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D , V1, V2, rD , 1);
1206 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D , V1, V2, rD , 2);
1207 vector<double> V1_orbitals_Spin1OrbitalTensor = OrbitalTensors(V1, p1,
p2, rRes, 1);
1208 vector<double> V2_orbitals_Spin1OrbitalTensor = OrbitalTensors(V2,
p3,
p4, rRes, 1);
1211 if (l==0) {SF_D2VV = contract_11_0(V1_orbitals_Spin1OrbitalTensor, V2_orbitals_Spin1OrbitalTensor);}
1212 if (l==1) {SF_D2VV = contract_11_0(contract_21_1(contract_31_2( contract_41_3(epsilon, D), V2_orbitals_Spin1OrbitalTensor ), V1_orbitals_Spin1OrbitalTensor), D_orbitals_Spin1OrbitalTensor);}
1213 if (l==2) {SF_D2VV = contract_11_0(contract_21_1(D_orbitals_Spin2OrbitalTensor, V2_orbitals_Spin1OrbitalTensor), V1_orbitals_Spin1OrbitalTensor);}
1219double EvtD0ToKSpipipi0::D2TS(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1220 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1223 vector<double> T = p1 +
p2;
1224 vector<double> S =
p3 +
p4;
1225 vector<double> D = T + S;
1227 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D, T, S, rD , 2);
1228 vector<double> T_orbitals_Spin2OrbitalTensor = OrbitalTensors(T, p1,
p2, rRes, 2);
1230 double SF_D2TS = 0.;
1231 SF_D2TS = contract_22_0(D_orbitals_Spin2OrbitalTensor, T_orbitals_Spin2OrbitalTensor);
1237double EvtD0ToKSpipipi0::D2TV(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1238 assert(p1.size()==4 &&
p2.size()==4 &&
p3.size()==4 &&
p4.size()==4);
1241 vector<double> T = p1 +
p2;
1242 vector<double> V =
p3 +
p4;
1243 vector<double> D = T + V;
1245 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D, T, V, rD , 1);
1246 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D, T, V, rD , 2);
1247 vector<double> T_orbitals_Spin2OrbitalTensor = OrbitalTensors(T, p1,
p2, rRes, 2);
1248 vector<double> V_orbitals_Spin1OrbitalTensor = OrbitalTensors(V,
p3,
p4, rRes, 1);
1250 double SF_D2TV = 0.;
1251 if (l==1) {SF_D2TV = contract_11_0(D_orbitals_Spin1OrbitalTensor, contract_21_1(T_orbitals_Spin2OrbitalTensor, V_orbitals_Spin1OrbitalTensor));}
1252 if (l==2) {SF_D2TV = contract_22_0( contract_31_2(contract_41_3(epsilon, D), V_orbitals_Spin1OrbitalTensor), contract_22_2(D_orbitals_Spin2OrbitalTensor, T_orbitals_Spin2OrbitalTensor) );}
1258double EvtD0ToKSpipipi0::D2TT(vector<double> p1, vector<double>
p2, vector<double>
p3, vector<double>
p4,
int l) {
1260 vector<double> T1 = p1 +
p2;
1261 vector<double> T2 =
p3 +
p4;
1262 vector<double> D = T1 + T2;
1264 vector<double> D_orbitals_Spin1OrbitalTensor = OrbitalTensors(D , T1, T2, rD , 1);
1265 vector<double> D_orbitals_Spin2OrbitalTensor = OrbitalTensors(D , T1, T2, rD , 2);
1266 vector<double> T1_orbitals_Spin2OrbitalTensor = OrbitalTensors(T1, p1,
p2, rRes, 2);
1267 vector<double> T2_orbitals_Spin2OrbitalTensor = OrbitalTensors(T2,
p3,
p4, rRes, 2);
1269 double SF_D2TT = 0.;
1270 if (l==0) {SF_D2TT = contract_22_0(T1_orbitals_Spin2OrbitalTensor, T2_orbitals_Spin2OrbitalTensor);}
1271 if (l==1) {SF_D2TT = contract_22_0( contract_31_2(contract_41_3(epsilon, D), D_orbitals_Spin1OrbitalTensor), contract_22_2(T1_orbitals_Spin2OrbitalTensor, T2_orbitals_Spin2OrbitalTensor) );}
1272 if (l==2) {SF_D2TT = contract_22_0( D_orbitals_Spin2OrbitalTensor, contract_22_2(T1_orbitals_Spin2OrbitalTensor, T2_orbitals_Spin2OrbitalTensor) );}
1280double EvtD0ToKSpipipi0::fundecaymomentum(
double mr2,
double m1_2,
double m2_2) {
1281 double mr = sqrt(mr2);
1282 double poly = mr2*mr2 + m1_2*m1_2 + m2_2*m2_2 - 2.0*m1_2*mr2 - 2.0*m2_2*mr2 - 2.0*m1_2*m2_2;
1283 double ret = sqrt(poly)/(2.0*mr);
1289double EvtD0ToKSpipipi0::fundecaymomentum2(
double mr2,
double m1_2,
double m2_2) {
1290 double poly = mr2*mr2 + m1_2*m1_2 + m2_2*m2_2 - 2.0*m1_2*mr2 - 2.0*m2_2*mr2 - 2.0*m1_2*m2_2;
1291 double ret = poly/(4.0*mr2);
1297double EvtD0ToKSpipipi0::wid(
double mass,
double sa,
double sb,
double sc,
double r,
int l) {
1301 double m = sqrt(sa);
1302 double q = fundecaymomentum2(sa,sb,sc);
1303 double q0 = fundecaymomentum2(sa0,sb,sc);
1308 if(l == 1) F = sqrt((1.0+z0)/(1.0+z));
1309 if(l == 2) F = sqrt((9.0+3.0*z0+z0*z0)/(9.0+3.0*z+z*z));
1310 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));
1311 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));
1313 double t = sqrt(
q/q0);
1314 for(uint i=0; i<(2*l+1); i++) {
1317 widm *= (
mass/m*F*F);
1321EvtComplex EvtD0ToKSpipipi0::BW(
double mx2,
double mr,
double wr) {
1324 double denom_real = mr2 - mx2;
1325 double denom_imag = mr * wr;
1326 double denom = denom_real * denom_real + denom_imag * denom_imag;
1328 double output_x = 0., output_y = 0.;
1329 if (wr<0) {output_x = 1/sqrt(denom);}
1331 output_x = denom_real/denom;
1332 output_y = denom_imag/denom;
1344EvtComplex EvtD0ToKSpipipi0::RBW(
double mx2,
double mr,
double wr,
double m1_2,
double m2_2,
double r,
int l) {
1347 double denom_real = mr2 - mx2;
1348 double denom_imag = mr * wr * wid(mr, mx2, m1_2, m2_2, r, l);
1350 double denom = denom_real * denom_real + denom_imag * denom_imag;
1351 double output_x = denom_real/denom;
1352 double output_y = denom_imag/denom;
1360EvtComplex EvtD0ToKSpipipi0::LASS(
double mx2,
double m1_2,
double m2_2) {
1364 double m1430 = 1.463;
1365 double w1430 = 0.233;
1366 double sa0 = m1430*m1430;
1367 double q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4.0*sa0)-sb;
1368 if(q0<0) q0 = 1e-16;
1369 double qs = (sa+sb-sc)*(sa+sb-sc)/(4.0*sa)-sb;
1370 double q = sqrt(qs);
1371 double width = w1430*
q*m1430/sqrt(sa*q0);
1372 double temp_R = atan(m1430*width/(sa0-sa));
1373 if(temp_R<0) temp_R += math_pi;
1374 double deltaR = -5.31 + temp_R;
1375 double temp_F = atan(2.0*1.07*
q/(2.0+(-1.8)*1.07*qs));
1376 if(temp_F<0) temp_F += math_pi;
1377 double deltaF = 2.33 + temp_F;
1378 double output_x = 0.8*
sin(deltaF)*
cos(deltaF) +
sin(deltaR)*
cos(deltaR + 2.0*deltaF);
1379 double output_y = 0.8*
sin(deltaF)*
sin(deltaF) +
sin(deltaR)*
sin(deltaR + 2.0*deltaF);
1387double EvtD0ToKSpipipi0::h(
double m,
double q) {
1388 double h = 2.0/math_pi*
q/m*log((m+2.0*
q)/(2.0*
mass_Pion));
1392double EvtD0ToKSpipipi0::dh(
double m0,
double q0) {
1393 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);
1397double EvtD0ToKSpipipi0::f(
double m0,
double sx,
double q0,
double q) {
1398 double m = sqrt(sx);
1399 double f = m0*m0/(q0*q0*q0)*(
q*
q*(h(m,
q)-h(m0,q0))+(m0*m0-sx)*q0*q0*dh(m0,q0));
1403double EvtD0ToKSpipipi0::d(
double m0,
double q0) {
1405 + m0/(2.0*math_pi*q0) \
1410EvtComplex EvtD0ToKSpipipi0::GS(
double mx2,
double mr,
double wr,
double m1_2,
double m2_2,
double r,
int l) {
1413 double q = fundecaymomentum(mx2, m1_2, m2_2);
1414 double q0 = fundecaymomentum(mr2, m1_2, m2_2);
1415 double numer = 1.0+d(mr,q0)*wr/mr;
1416 double denom_real = mr2-mx2+wr*
f(mr,mx2,q0,
q);
1417 double denom_imag = mr*wr*wid(mr,mx2,m1_2,m2_2,r,l);
1419 double denom = denom_real*denom_real+denom_imag*denom_imag;
1420 double output_x = denom_real*numer/denom;
1421 double output_y = denom_imag*numer/denom;
1427EvtComplex EvtD0ToKSpipipi0::create_RBW_propagator(
string name,
double mx2,
double m1_2,
double m2_2,
int l) {
1428 double mr = resonance_par[name+
"_mass"];
1429 double wr = resonance_par[name+
"_width"];
1430 return RBW(mx2, mr, wr, m1_2, m2_2, rRes, l);
1433EvtComplex EvtD0ToKSpipipi0::create_BW_propagator(
string name,
double mx2){
1434 double mr = resonance_par[name+
"_mass"];
1435 double wr = resonance_par[name+
"_width"];
1436 return BW(mx2, mr, wr);
1439EvtComplex EvtD0ToKSpipipi0::create_GS_propagator(
string name,
double mx2){
1440 double mr = resonance_par[name+
"_mass"];
1441 double wr = resonance_par[name+
"_width"];
1442 return GS(mx2, mr, wr, mpip*mpip, mpim*mpim, rRes, 1);
1445EvtComplex EvtD0ToKSpipipi0::create_KPiSLASS_propagator(
string name,
double mx2,
double m1_2,
double m2_2){
1446 return LASS(mx2, m1_2, m2_2);
1450double EvtD0ToKSpipipi0::rho4pi(
double s) {
1453 double tmp=1.0-16.0*
mpi*
mpi/
s;
1455 if(tmp <= 0) ret = 0.0;
1456 else ret = sqrt(tmp)/(1.0+
exp(9.8f-3.5*
s));
1461double EvtD0ToKSpipipi0::rho2pi(
double s) {
1465 if(
s <= 4.0*
mpi*
mpi) ret = 0.0;
1466 else ret = sqrt(1.0-4.0*
mpi*
mpi/
s);
1471EvtComplex EvtD0ToKSpipipi0::sigma(
double mx2,
double mr,
double gf) {
1475 double diff = mr2-mx2;
1478 double g1=(0.5843+1.6663*mx2)*(mx2-
mpi*
mpi/2.0)/(mr2-
mpi*
mpi/2.0)*
exp(-(mx2-mr2)/1.082);
1481 double w1=
g1*rho2pi(mx2)/rho2pi(mr2);
1482 double w2=g2*rho4pi(mx2)/rho4pi(mr2);
1483 double ws=mr*(w1+w2);
1484 double denom=diff*diff+ws*ws;
1486 double output_x = diff/denom;
1487 double output_y = ws/denom;
1494EvtComplex EvtD0ToKSpipipi0::create_sigma_propagator(
string name,
double mx2) {
1496 double mr = resonance_par[name+
"_mass"];
1497 double wr = resonance_par[name+
"_width"];
1499 double gf = resonance_par[name+
"_gf"];
1501 return sigma(mx2, mr, gf);
1505EvtComplex EvtD0ToKSpipipi0::irho(
double mr2,
double m1_2,
double m2_2) {
1506 double mr = sqrt(mr2);
1507 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;
1509 double output_x = 0., output_y = 0.;
1510 if (poly >= 0) {output_x = 2.0*sqrt(poly)/(2.0*mr2); output_y = 0.;}
1511 if (poly < 0) {output_x = 0.; output_y = 2.0*sqrt(-1.0*poly)/(2.0*mr2);}
1518EvtComplex EvtD0ToKSpipipi0::Flatte2(
double mx2,
double mr2,
double g1,
double m1a,
double m1b,
double g2,
double m2a,
double m2b) {
1520 double diff = mr2-mx2;
1522 EvtComplex ps1 = irho(mx2, m1a*m1a, m1b*m1b);
1523 EvtComplex ps2 = irho(mx2, m2a*m2a, m2b*m2b);
1527 double ws =
real(iws);
1528 double denom = diff*diff + ws*ws;
1530 double output_x = diff/denom;
1531 double output_y = ws/denom;
1538EvtComplex EvtD0ToKSpipipi0::create_Flatte2_propagator(
string name,
double mx2,
double m1a,
double m1b,
double m2a,
double m2b) {
1539 double mr = resonance_par[name+
"_mass"];
1540 double wr = resonance_par[name+
"_width"];
1543 double g1 = resonance_par[name+
"_g1"];
1544 double g2 = resonance_par[name+
"_g2"];
1546 return Flatte2(mx2, mr2,
g1, m1a, m1b, g2, m2a, m2b);
1549void EvtD0ToKSpipipi0::readInputCoeff () {
1550 coefficient[
"phasespace"] = 0;
1551 coefficient[
"<kstarm_892|rhop_770>_0_mag"] = 25;
1552 coefficient[
"<kstarm_892|rhop_770>_0_phase"] = 0;
1553 coefficient[
"<kstarm_892|rhop_770>_1_mag"] = 11.2665;
1554 coefficient[
"<kstarm_892|rhop_770>_1_phase"] = 0.548994;
1555 coefficient[
"<kstarm_892|rhop_770>_2_mag"] = 6.73954;
1556 coefficient[
"<kstarm_892|rhop_770>_2_phase"] = 1.96845;
1557 coefficient[
"<kstar0_892|rho0_770>_0_mag"] = 9.62259;
1558 coefficient[
"<kstar0_892|rho0_770>_0_phase"] = 4.39676;
1559 coefficient[
"<kstar0_892|rho0_770>_1_mag"] = 3.49377;
1560 coefficient[
"<kstar0_892|rho0_770>_1_phase"] = -2.56438;
1561 coefficient[
"<kstar0_892|rho0_770>_2_mag"] = 3.30796;
1562 coefficient[
"<kstar0_892|rho0_770>_2_phase"] = 5.17417;
1563 coefficient[
"<omega3_782|rho_770>_1_mag"] = 14.1209;
1564 coefficient[
"<omega3_782|rho_770>_1_phase"] = 2.06989;
1565 coefficient[
"<phi_1020|rho_770>_1_mag"] = 0.835627;
1566 coefficient[
"<phi_1020|rho_770>_1_phase"] = -2.92636;
1567 coefficient[
"<eta_547|rhom_phsp>_1_mag"] = 81.3879;
1568 coefficient[
"<eta_547|rhom_phsp>_1_phase"] = -1.51303;
1569 coefficient[
"<eta_547|rhom_phsp>_0_mag"] = 72.5434;
1570 coefficient[
"<eta_547|rhom_phsp>_0_phase"] = 3.89337;
1571 coefficient[
"<k1m_1270|rhom_770>_0_mag"] = 48.1147;
1572 coefficient[
"<k1m_1270|rhom_770>_0_phase"] = -0.0202615;
1573 coefficient[
"<k1m_1270|kstar_892>_0_mag"] = 5.73667;
1574 coefficient[
"<k1m_1270|kstar_892>_0_phase"] = 3.92441;
1575 coefficient[
"<k1m_1270|k0star_1430>_1_mag"] = 72.8988;
1576 coefficient[
"<k1m_1270|k0star_1430>_1_phase"] = -1.12332;
1577 coefficient[
"<k10_1270|rho0_770>_0_mag"] = 14.6425;
1578 coefficient[
"<k10_1270|rho0_770>_0_phase"] = 0.882522;
1579 coefficient[
"<k10_1270|kstarm_892>_0_mag"] = 4.40263;
1580 coefficient[
"<k10_1270|kstarm_892>_0_phase"] = 0.299025;
1581 coefficient[
"<k10_1270|k0starm_1430>_1_mag"] = 57.4271;
1582 coefficient[
"<k10_1270|k0starm_1430>_1_phase"] = 1.25342;
1583 coefficient[
"<k1m_1400|kstar_892>_0_mag"] = 7.41837;
1584 coefficient[
"<k1m_1400|kstar_892>_0_phase"] = 2.60505;
1585 coefficient[
"<k10_1400|kstarm_892>_0_mag"] = -38.728;
1586 coefficient[
"<k10_1400|kstarm_892>_0_phase"] = 2.64084;
1587 coefficient[
"<kstar02_1410|rho0_770>_1_mag"] = 32.6332;
1588 coefficient[
"<kstar02_1410|rho0_770>_1_phase"] = 0.266067;
1589 coefficient[
"<kstarm2_1410|rhop_770>_0_mag"] = 84.8711;
1590 coefficient[
"<kstarm2_1410|rhop_770>_0_phase"] = -1.22924;
1591 coefficient[
"<kstarm2_1410|rhop_770>_1_mag"] = 30.6599;
1592 coefficient[
"<kstarm2_1410|rhop_770>_1_phase"] = -3.02164;
1593 coefficient[
"<kstarm2_1410|rhop_770>_2_mag"] = 23.5133;
1594 coefficient[
"<kstarm2_1410|rhop_770>_2_phase"] = 4.90416;
1595 coefficient[
"<kstarm3_1410|kstar_892>_1_mag"] = -5.00895;
1596 coefficient[
"<kstarm3_1410|kstar_892>_1_phase"] = 0.75297;
1597 coefficient[
"<kstarm3_1410|rhom_770>_1_mag"] = 21.0146;
1598 coefficient[
"<kstarm3_1410|rhom_770>_1_phase"] = 2.11827;
1599 coefficient[
"<km_1460|kstar_892>_1_mag"] = -18.5953;
1600 coefficient[
"<km_1460|kstar_892>_1_phase"] = 1.72652;
1601 coefficient[
"<km_1460|k0star_1430>_0_mag"] = 500;
1602 coefficient[
"<km_1460|k0star_1430>_0_phase"] = 3.22602;
1603 coefficient[
"<k0_1460|kstarm_892>_1_mag"] = 14.7543;
1604 coefficient[
"<k0_1460|kstarm_892>_1_phase"] = 0.510956;
1605 coefficient[
"<k1m_1650|kstar_892>_0_mag"] = 11.7635;
1606 coefficient[
"<k1m_1650|kstar_892>_0_phase"] = 2.59972;
1607 coefficient[
"<k10_1650|kstarm_892>_0_mag"] = 27.9014;
1608 coefficient[
"<k10_1650|kstarm_892>_0_phase"] = -1.07364;
1609 coefficient[
"<k1m_1650|rhom_770>_0_mag"] = 23.2323;
1610 coefficient[
"<k1m_1650|rhom_770>_0_phase"] = -1.33583;
1611 coefficient[
"<kstar03_1680|kstarm_892>_1_mag"] = 23.4824;
1612 coefficient[
"<kstar03_1680|kstarm_892>_1_phase"] = 0.139691;
1613 coefficient[
"<kstarm3_1680|kstar_892>_1_mag"] = 11.8553;
1614 coefficient[
"<kstarm3_1680|kstar_892>_1_phase"] = -3.47852;
1615 coefficient[
"<k0star0_1430|rho0_phsp>_0_mag"] = 500;
1616 coefficient[
"<k0star0_1430|rho0_phsp>_0_phase"] = -5.1306;
1617 coefficient[
"<k1p_phsp|rhop_770>_1_mag"] = 197.192;
1618 coefficient[
"<k1p_phsp|rhop_770>_1_phase"] = 0.35067;
1619 coefficient[
"<k1m_phsp|rhom_770>_1_mag"] = 151.864;
1620 coefficient[
"<k1m_phsp|rhom_770>_1_phase"] = -5.11224;
1621 coefficient[
"<k1m_phsp|rhom_770>_2_mag"] = 21.6383;
1622 coefficient[
"<k1m_phsp|rhom_770>_2_phase"] = -0.843621;
1623 coefficient[
"<k0starm_1430|rhop_phsp>_0_mag"] = -500;
1624 coefficient[
"<k0starm_1430|rhop_phsp>_0_phase"] = 4.00277;
1625 coefficient[
"<k0_1460|sigma_500>_0_mag"] = 500;
1626 coefficient[
"<k0_1460|sigma_500>_0_phase"] = -5.70929;
1627 coefficient[
"<k10_1270|f0_980>_1_mag"] = 106.293;
1628 coefficient[
"<k10_1270|f0_980>_1_phase"] = 0.947063;
1629 coefficient[
"<k10_1400|f0_1370>_1_mag"] = 184.717;
1630 coefficient[
"<k10_1400|f0_1370>_1_phase"] = -0.0197254;
1631 coefficient[
"<rho0_770|k0star0_1430>_1_mag"] = 159.521;
1632 coefficient[
"<rho0_770|k0star0_1430>_1_phase"] = 0.164038;
1633 coefficient[
"<k2starm3_1430|kstar_892>_2_mag"] = 0.400134;
1634 coefficient[
"<k2starm3_1430|kstar_892>_2_phase"] = 0.533053;
1635 coefficient[
"<k2star02_1430|f2_1270>_1_mag"] = 45.2478;
1636 coefficient[
"<k2star02_1430|f2_1270>_1_phase"] = 1.81556;
1637 coefficient[
"<kstar0_892|f0_980>_1_mag"] = 24.2878;
1638 coefficient[
"<kstar0_892|f0_980>_1_phase"] = 1.93217;
1639 coefficient[
"<kstarm_phsp|rhop_phsp>_0_mag"] = 500;
1640 coefficient[
"<kstarm_phsp|rhop_phsp>_0_phase"] = 1.48706;
1641 coefficient[
"<rho0_770|kstar0_phsp>_1_mag"] = 58.8657;
1642 coefficient[
"<rho0_770|kstar0_phsp>_1_phase"] = 3.54134;
1646double EvtD0ToKSpipipi0::amps() {
1656 createPropagator(ks0, pip, pim, pi0);
1657 createSpinfactor(ks0, pip, pim, pi0);
1663double f_isoConj = -1. * sqrt(2.0);
1664double one = 1.0, minus_one = -1.0;
1665addPartialWave(spinfactor[
"D2VV_ks0pim_pippi0_0"], propagator[
"kstarm_892"], propagator[
"rhop_770"], coefficient[
"<kstarm_892|rhop_770>_0_mag"], coefficient[
"<kstarm_892|rhop_770>_0_phase"]);
1666addPartialWave(spinfactor[
"D2VV_ks0pim_pippi0_1"], propagator[
"kstarm_892"], propagator[
"rhop_770"], coefficient[
"<kstarm_892|rhop_770>_1_mag"], coefficient[
"<kstarm_892|rhop_770>_1_phase"]);
1667addPartialWave(spinfactor[
"D2VV_ks0pim_pippi0_2"], propagator[
"kstarm_892"], propagator[
"rhop_770"], coefficient[
"<kstarm_892|rhop_770>_2_mag"], coefficient[
"<kstarm_892|rhop_770>_2_phase"]);
1668addPartialWave(spinfactor[
"D2VV_ks0pi0_pippim_0"], propagator[
"kstar0_892"], propagator[
"rho0_770"], coefficient[
"<kstar0_892|rho0_770>_0_mag"], coefficient[
"<kstar0_892|rho0_770>_0_phase"]);
1669addPartialWave(spinfactor[
"D2VV_ks0pi0_pippim_1"], propagator[
"kstar0_892"], propagator[
"rho0_770"], coefficient[
"<kstar0_892|rho0_770>_1_mag"], coefficient[
"<kstar0_892|rho0_770>_1_phase"]);
1670addPartialWave(spinfactor[
"D2VV_ks0pi0_pippim_2"], propagator[
"kstar0_892"], propagator[
"rho0_770"], coefficient[
"<kstar0_892|rho0_770>_2_mag"], coefficient[
"<kstar0_892|rho0_770>_2_phase"]);
1671EvtComplex omega_ks0_propagator = propagator[
"rhop_770"] * spinfactor[
"D2VP_V2VP_pippimpi0_pippi0_1"]
1672 + minus_one*propagator[
"rho0_770"] * spinfactor[
"D2VP_V2VP_pippimpi0_pippim_1"]
1673 + propagator[
"rhom_770"] * spinfactor[
"D2VP_V2VP_pippimpi0_pimpi0_1"];
1674addPartialWave(omega_ks0_propagator, propagator[
"omega3_782"], coefficient[
"<omega3_782|rho_770>_1_mag"], coefficient[
"<omega3_782|rho_770>_1_phase"]);
1675EvtComplex phi_ks0_propagator = propagator[
"rhop_770"] * spinfactor[
"D2VP_V2VP_pippimpi0_pippi0_1"]
1676 + minus_one*propagator[
"rho0_770"] * spinfactor[
"D2VP_V2VP_pippimpi0_pippim_1"]
1677 + propagator[
"rhom_770"] * spinfactor[
"D2VP_V2VP_pippimpi0_pimpi0_1"];
1678addPartialWave(phi_ks0_propagator, propagator[
"phi_1020"], coefficient[
"<phi_1020|rho_770>_1_mag"], coefficient[
"<phi_1020|rho_770>_1_phase"]);
1679addPartialWave(spinfactor[
"D2PP_P2VP_pippimpi0_pimpi0_1"], propagator[
"eta_547"], propagator[
"rhom_phsp"], coefficient[
"<eta_547|rhom_phsp>_1_mag"], coefficient[
"<eta_547|rhom_phsp>_1_phase"]);
1680addPartialWave(spinfactor[
"D2PP_P2SP_pippimpi0_pimpi0_0"], propagator[
"eta_547"], propagator[
"rhom_phsp"], coefficient[
"<eta_547|rhom_phsp>_0_mag"], coefficient[
"<eta_547|rhom_phsp>_0_phase"]);
1681addPartialWave(spinfactor[
"D2AP_A2VP_ks0pimpi0_pimpi0_0"], propagator[
"k1m_1270"], propagator[
"rhom_770"], coefficient[
"<k1m_1270|rhom_770>_0_mag"], coefficient[
"<k1m_1270|rhom_770>_0_phase"]);
1682addPartialWave(spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pim_0"], propagator[
"k1m_1270"], propagator[
"kstarm_892"], spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pi0_0"], propagator[
"k1m_1270"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<k1m_1270|kstar_892>_0_mag"], coefficient[
"<k1m_1270|kstar_892>_0_phase"]);
1683addPartialWave(spinfactor[
"D2AP_A2SP_ks0pimpi0_ks0pim_1"], propagator[
"k1m_1270"], propagator[
"k0starm_1430"], spinfactor[
"D2AP_A2SP_ks0pimpi0_ks0pi0_1"], propagator[
"k1m_1270"], propagator[
"k0star0_1430"], f_isoConj, coefficient[
"<k1m_1270|k0star_1430>_1_mag"], coefficient[
"<k1m_1270|k0star_1430>_1_phase"]);
1684addPartialWave(spinfactor[
"D2AP_A2VP_ks0pippim_pippim_0"], propagator[
"k10_1270"], propagator[
"rho0_770"], coefficient[
"<k10_1270|rho0_770>_0_mag"], coefficient[
"<k10_1270|rho0_770>_0_phase"]);
1685addPartialWave(spinfactor[
"D2AP_A2VP_ks0pippim_ks0pim_0"], propagator[
"k10_1270"], propagator[
"kstarm_892"], coefficient[
"<k10_1270|kstarm_892>_0_mag"], coefficient[
"<k10_1270|kstarm_892>_0_phase"]);
1686addPartialWave(spinfactor[
"D2AP_A2SP_ks0pippim_ks0pim_1"], propagator[
"k10_1270"], propagator[
"k0starm_1430"], coefficient[
"<k10_1270|k0starm_1430>_1_mag"], coefficient[
"<k10_1270|k0starm_1430>_1_phase"]);
1687addPartialWave(spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pim_0"], propagator[
"k1m_1400"], propagator[
"kstarm_892"], spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pi0_0"], propagator[
"k1m_1400"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<k1m_1400|kstar_892>_0_mag"], coefficient[
"<k1m_1400|kstar_892>_0_phase"]);
1688addPartialWave(spinfactor[
"D2AP_A2VP_ks0pippim_ks0pim_0"], propagator[
"k10_1400"], propagator[
"kstarm_892"], coefficient[
"<k10_1400|kstarm_892>_0_mag"], coefficient[
"<k10_1400|kstarm_892>_0_phase"]);
1689addPartialWave(spinfactor[
"D2VV_ks0pi0_pippim_1"], propagator[
"kstar02_1410"], propagator[
"rho0_770"], coefficient[
"<kstar02_1410|rho0_770>_1_mag"], coefficient[
"<kstar02_1410|rho0_770>_1_phase"]);
1690addPartialWave(spinfactor[
"D2VV_ks0pim_pippi0_0"], propagator[
"kstarm2_1410"], propagator[
"rhop_770"], coefficient[
"<kstarm2_1410|rhop_770>_0_mag"], coefficient[
"<kstarm2_1410|rhop_770>_0_phase"]);
1691addPartialWave(spinfactor[
"D2VV_ks0pim_pippi0_1"], propagator[
"kstarm2_1410"], propagator[
"rhop_770"], coefficient[
"<kstarm2_1410|rhop_770>_1_mag"], coefficient[
"<kstarm2_1410|rhop_770>_1_phase"]);
1692addPartialWave(spinfactor[
"D2VV_ks0pim_pippi0_2"], propagator[
"kstarm2_1410"], propagator[
"rhop_770"], coefficient[
"<kstarm2_1410|rhop_770>_2_mag"], coefficient[
"<kstarm2_1410|rhop_770>_2_phase"]);
1693addPartialWave(spinfactor[
"D2VP_V2VP_ks0pimpi0_ks0pim_1"], propagator[
"kstarm3_1410"], propagator[
"kstarm_892"], spinfactor[
"D2VP_V2VP_ks0pimpi0_ks0pi0_1"], propagator[
"kstarm3_1410"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<kstarm3_1410|kstar_892>_1_mag"], coefficient[
"<kstarm3_1410|kstar_892>_1_phase"]);
1694addPartialWave(spinfactor[
"D2VP_V2VP_ks0pimpi0_pimpi0_1"], propagator[
"kstarm3_1410"], propagator[
"rhom_770"], coefficient[
"<kstarm3_1410|rhom_770>_1_mag"], coefficient[
"<kstarm3_1410|rhom_770>_1_phase"]);
1695addPartialWave(spinfactor[
"D2PP_P2VP_ks0pimpi0_ks0pim_1"], propagator[
"km_1460"], propagator[
"kstarm_892"], spinfactor[
"D2PP_P2VP_ks0pimpi0_ks0pi0_1"], propagator[
"km_1460"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<km_1460|kstar_892>_1_mag"], coefficient[
"<km_1460|kstar_892>_1_phase"]);
1696addPartialWave(spinfactor[
"D2PP_P2SP_ks0pimpi0_ks0pim_0"], propagator[
"km_1460"], propagator[
"k0starm_1430"], spinfactor[
"D2PP_P2SP_ks0pimpi0_ks0pi0_0"], propagator[
"km_1460"], propagator[
"k0star0_1430"], f_isoConj, coefficient[
"<km_1460|k0star_1430>_0_mag"], coefficient[
"<km_1460|k0star_1430>_0_phase"]);
1697addPartialWave(spinfactor[
"D2PP_P2VP_ks0pippim_ks0pim_1"], propagator[
"k0_1460"], propagator[
"kstarm_892"], coefficient[
"<k0_1460|kstarm_892>_1_mag"], coefficient[
"<k0_1460|kstarm_892>_1_phase"]);
1698addPartialWave(spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pim_0"], propagator[
"k1m_1650"], propagator[
"kstarm_892"], spinfactor[
"D2AP_A2VP_ks0pimpi0_ks0pi0_0"], propagator[
"k1m_1650"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<k1m_1650|kstar_892>_0_mag"], coefficient[
"<k1m_1650|kstar_892>_0_phase"]);
1699addPartialWave(spinfactor[
"D2AP_A2VP_ks0pippim_ks0pim_0"], propagator[
"k10_1650"], propagator[
"kstarm_892"], coefficient[
"<k10_1650|kstarm_892>_0_mag"], coefficient[
"<k10_1650|kstarm_892>_0_phase"]);
1700addPartialWave(spinfactor[
"D2AP_A2VP_ks0pimpi0_pimpi0_0"], propagator[
"k1m_1650"], propagator[
"rhom_770"], coefficient[
"<k1m_1650|rhom_770>_0_mag"], coefficient[
"<k1m_1650|rhom_770>_0_phase"]);
1701addPartialWave(spinfactor[
"D2VP_V2VP_ks0pippim_ks0pim_1"], propagator[
"kstar03_1680"], propagator[
"kstarm_892"], coefficient[
"<kstar03_1680|kstarm_892>_1_mag"], coefficient[
"<kstar03_1680|kstarm_892>_1_phase"]);
1702addPartialWave(spinfactor[
"D2VP_V2VP_ks0pimpi0_ks0pim_1"], propagator[
"kstarm3_1680"], propagator[
"kstarm_892"], spinfactor[
"D2VP_V2VP_ks0pimpi0_ks0pi0_1"], propagator[
"kstarm3_1680"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<kstarm3_1680|kstar_892>_1_mag"], coefficient[
"<kstarm3_1680|kstar_892>_1_phase"]);
1703addPartialWave(spinfactor[
"D2SS_ks0pi0_pippim_0"], propagator[
"k0star0_1430"], propagator[
"rho0_phsp"], coefficient[
"<k0star0_1430|rho0_phsp>_0_mag"], coefficient[
"<k0star0_1430|rho0_phsp>_0_phase"]);
1704addPartialWave(spinfactor[
"D2PP_P2VP_ks0pippi0_pippi0_1"], propagator[
"k1p_phsp"], propagator[
"rhop_770"], coefficient[
"<k1p_phsp|rhop_770>_1_mag"], coefficient[
"<k1p_phsp|rhop_770>_1_phase"]);
1705addPartialWave(spinfactor[
"D2PP_P2VP_ks0pimpi0_pimpi0_1"], propagator[
"k1m_phsp"], propagator[
"rhom_770"], coefficient[
"<k1m_phsp|rhom_770>_1_mag"], coefficient[
"<k1m_phsp|rhom_770>_1_phase"]);
1706addPartialWave(spinfactor[
"D2AP_A2VP_ks0pimpi0_pimpi0_2"], propagator[
"k1m_phsp"], propagator[
"rhom_770"], coefficient[
"<k1m_phsp|rhom_770>_2_mag"], coefficient[
"<k1m_phsp|rhom_770>_2_phase"]);
1707addPartialWave(spinfactor[
"D2SS_ks0pim_pippi0_0"], propagator[
"k0starm_1430"], propagator[
"rhop_phsp"], coefficient[
"<k0starm_1430|rhop_phsp>_0_mag"], coefficient[
"<k0starm_1430|rhop_phsp>_0_phase"]);
1708addPartialWave(spinfactor[
"D2PP_P2SP_ks0pippim_pippim_0"], propagator[
"k0_1460"], propagator[
"sigma_500"], coefficient[
"<k0_1460|sigma_500>_0_mag"], coefficient[
"<k0_1460|sigma_500>_0_phase"]);
1709addPartialWave(spinfactor[
"D2AP_A2SP_ks0pippim_pippim_1"], propagator[
"k10_1270"], propagator[
"f0_980"], coefficient[
"<k10_1270|f0_980>_1_mag"], coefficient[
"<k10_1270|f0_980>_1_phase"]);
1710addPartialWave(spinfactor[
"D2AP_A2SP_ks0pippim_pippim_1"], propagator[
"k10_1400"], propagator[
"f0_1370"], coefficient[
"<k10_1400|f0_1370>_1_mag"], coefficient[
"<k10_1400|f0_1370>_1_phase"]);
1711addPartialWave(spinfactor[
"D2VS_pippim_ks0pi0_1"], propagator[
"rho0_770"], propagator[
"k0star0_1430"], coefficient[
"<rho0_770|k0star0_1430>_1_mag"], coefficient[
"<rho0_770|k0star0_1430>_1_phase"]);
1712addPartialWave(spinfactor[
"D2TP_T2VP_ks0pimpi0_ks0pim_2"], propagator[
"k2starm3_1430"], propagator[
"kstarm_892"], spinfactor[
"D2TP_T2VP_ks0pimpi0_ks0pi0_2"], propagator[
"k2starm3_1430"], propagator[
"kstar0_892"], f_isoConj, coefficient[
"<k2starm3_1430|kstar_892>_2_mag"], coefficient[
"<k2starm3_1430|kstar_892>_2_phase"]);
1713addPartialWave(spinfactor[
"D2TT_ks0pi0_pippim_1"], propagator[
"k2star02_1430"], propagator[
"f2_1270"], coefficient[
"<k2star02_1430|f2_1270>_1_mag"], coefficient[
"<k2star02_1430|f2_1270>_1_phase"]);
1714addPartialWave(spinfactor[
"D2VS_ks0pi0_pippim_1"], propagator[
"kstar0_892"], propagator[
"f0_980"], coefficient[
"<kstar0_892|f0_980>_1_mag"], coefficient[
"<kstar0_892|f0_980>_1_phase"]);
1715addPartialWave(spinfactor[
"D2SS_ks0pim_pippi0_0"], propagator[
"kstarm_phsp"], propagator[
"rhop_phsp"], coefficient[
"<kstarm_phsp|rhop_phsp>_0_mag"], coefficient[
"<kstarm_phsp|rhop_phsp>_0_phase"]);
1716addPartialWave(spinfactor[
"D2VS_pippim_ks0pi0_1"], propagator[
"rho0_770"], propagator[
"kstar0_phsp"], coefficient[
"<rho0_770|kstar0_phsp>_1_mag"], coefficient[
"<rho0_770|kstar0_phsp>_1_phase"]);
1718 double Amps =
abs2(totalAmp);
1723double EvtD0ToKSpipipi0::AmplitudeSquare() {
1724 _pd[0] = GetDaugMomCM(0);
1725 _pd[1] = GetDaugMomCM(1);
1726 _pd[2] = GetDaugMomCM(2);
1727 _pd[3] = GetDaugMomCM(3);
1728 double prob = amps();
1729 return (prob <= 0) ? 1e-20 : prob;
double sin(const BesAngle a)
double cos(const BesAngle a)
double P(RecMdcKalTrack *trk)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double imag(const EvtComplex &c)
double abs2(const EvtComplex &c)
EvtComplex exp(const EvtComplex &c)
std::vector< double > operator+(std::vector< double > &lhs, std::vector< double > &rhs)
string toString(const T &t)
*******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
****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
virtual ~EvtD0ToKSpipipi0()
void getName(std::string &name)
void decay(EvtParticle *p)
void checkSpinParent(EvtSpinType::spintype sp)
void setProbMax(double prbmx)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void setProb(double prob)
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double double double * p4
double precision pisqo6 one