BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDTopipi0Eta.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtDTopipi0Eta.cc
12//
13// Description: Routine to handle three-body decays of D0/D0_bar or D+/D-, See BAM-680
14//
15// Modification history:
16//
17// Liaoyuan Dong Dec 11 2022 Module created
18//
19//------------------------------------------------------------------------
23#include "EvtGenBase/EvtPDL.hh"
29#include <stdlib.h>
30using namespace std;
31
33
34void EvtDTopipi0Eta::getName(std::string& model_name){
35 model_name="DTopipi0Eta";
36}
37
41
43 // check that there are 0 arguments
44 checkNArg(0);
45 checkNDaug(3);
50
51 phi[0] = -3.3276; rho[0] = 0.31478; //rho eta
52 phi[1] = 0.0; rho[1] = 1.0; //a0+ pi0
53 phi[2] = 0.0; rho[2] = -1.0; //a00 pi+
54
55 //cout << "Initializing DTopipi0Eta" << endl;
56 //for (int i=0; i<3; i++) {
57 // cout << i << " rho= " << rho[i] << " phi= " << phi[i] << endl;
58 //}
59 mrho = 0.77511;
60 ma0 = 0.99;
61 Grho = 0.1491;
62 Ga0 = 0.0756;
63
64 const double mk0 = 0.497614;
65 const double mass_Kaon = 0.49368;
66 const double mass_Pion = 0.13957;
67 const double mass_Pi0 = 0.1349766;
68 const double meta = 0.547862;
69 mpi = 0.13957;
70 mD = 1.86966;
71 sD = mD*mD;
72 spi = mpi*mpi;
73 snk = mk0*mk0;
74 sck = mass_Kaon*mass_Kaon;
75 scpi = mass_Pion*mass_Pion;
76 snpi = mass_Pi0*mass_Pi0;
77 seta = meta*meta;
78
79 pi = 3.1415926;
80
81 ci = EvtComplex(0.0,1.0);
82 one = EvtComplex(1.0,0.0);
83
84 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
85 for (int i=0; i<4; i++) {
86 for (int j=0; j<4; j++) {
87 G[i][j] = GG[i][j];
88 }
89 }
90
91}
92
96
98
99 // This piece of code could in principle be used to calculate maximum
100 // probablity on fly. But as it uses high number of points and model
101 // deals with single final state, we keep hardcoded number for now rather
102 // than adapting code to work here.
103
104// double maxprob = 0.0;
105// for(int ir=0;ir<=60000000;ir++){
106// p->initializePhaseSpace(getNDaug(),getDaugs());
107// EvtVector4R D1 = p->getDaug(0)->getP4();
108// EvtVector4R D2 = p->getDaug(1)->getP4();
109// EvtVector4R D3 = p->getDaug(2)->getP4();
110//
111// double P1[4], P2[4], P3[4];
112// P1[0] = D1.get(0); P1[1] = D1.get(1); P1[2] = D1.get(2); P1[3] = D1.get(3);
113// P2[0] = D2.get(0); P2[1] = D2.get(1); P2[2] = D2.get(2); P2[3] = D2.get(3);
114// P3[0] = D3.get(0); P3[1] = D3.get(1); P3[2] = D3.get(2); P3[3] = D3.get(3);
115//
116// double value;
117// value = calDalEva(P1, P2, P3);
118// if(value>maxprob) {
119// maxprob=value;
120// cout << "ir = " << ir << " maxProb= " << value << endl;
121// }
122// }
123// cout << "maxProb = " << maxprob << endl;
124
126 EvtVector4R D1 = p->getDaug(0)->getP4();
127 EvtVector4R D2 = p->getDaug(1)->getP4();
128 EvtVector4R D3 = p->getDaug(2)->getP4();
129
130 double P1[4], P2[4], P3[4];
131 P1[0] = D1.get(0); P1[1] = D1.get(1); P1[2] = D1.get(2); P1[3] = D1.get(3);
132 P2[0] = D2.get(0); P2[1] = D2.get(1); P2[2] = D2.get(2); P2[3] = D2.get(3);
133 P3[0] = D3.get(0); P3[1] = D3.get(1); P3[2] = D3.get(2); P3[3] = D3.get(3);
134
135 double value;
136 value = calDalEva(P1, P2, P3);
137 setProb(value);
138 return;
139
140}
141
142double EvtDTopipi0Eta::calDalEva(double P1[], double P2[], double P3[])
143{
144 //pi+ pi0 eta
145 //0: non-resonance
146 //1: resonance, RBW
147 //2: resonance, GS
148 //3: resonance, Flatte
149 //4: rho-omega mxing for omega
150 EvtComplex PDF[3];
151 EvtComplex cof, pdf, module;
152 double value;
153 PDF[0] = Spin_factor(P1, P2, P3, 1, 2, mrho, Grho); // rho+ eta
154 PDF[1] = Spin_factor(P1, P3, P2, 0, 30, ma0, Ga0); // a0+ pi0
155 PDF[2] = Spin_factor(P2, P3, P1, 0, 31, ma0, Ga0); // a00 pi+
156
157 pdf = EvtComplex(0.0,0.0);
158 for(int i=0; i<3; i++){
159 cof = EvtComplex(rho[i]*cos(phi[i]),rho[i]*sin(phi[i]));
160 pdf = pdf + cof*PDF[i];
161 }
162 module = conj(pdf)*pdf;
163 value = real(module);
164 return (value <= 0) ? 1e-20 : value;
165}
166
167EvtComplex EvtDTopipi0Eta::Spin_factor(double P1[], double P2[], double P3[], int spin, int flag, double mass_R, double width_R)
168{
169 //D-> R P3, R->P1 P2, 0: non-resonance 1: resonance, RBW 2: resonance, GS 3: resonance, Flatte 4: rho-omega mxing for omega
170 double R[4], s[3], sp2, B[2];
171 double tmp;
172 for(int i=0; i<4; i++){
173 R[i] = P1[i] + P2[i];
174 }
175 s[0] = dot(R,R);
176 s[1] = dot(P1, P1);
177 s[2] = dot(P2, P2);
178 sp2 = dot(P3,P3);
179
180 EvtComplex amp, prop, prop1, prop2;
181 EvtComplex rhokk, rhopieta;
182 if(spin == 0){
183 if(flag == 0) prop = one;
184 if(flag == 1) prop = propagatorRBW(mass_R,width_R,s[0],s[1],s[2],3.0,0);
185 if(flag == 30){
186 rhokk = Flatte_rhoab(s[0],snk,sck);
187 rhopieta = Flatte_rhoab(s[0],scpi,seta);
188 prop = 1.0/(mass_R*mass_R - s[0] - ci*(0.341*rhopieta+0.341*0.892*rhokk));
189 }
190 if(flag == 31){
191 double qKsK;
192 qKsK = 0.25*(s[0] + 3.899750596e-03)*(s[0] + 3.899750596e-03)/s[0] - 0.497614*0.497614;
193 if(qKsK > 0) rhokk = 2.0*sqrt(qKsK/s[0])*one;
194 if(qKsK < 0) rhokk = 2.0*sqrt(qKsK/s[0])*ci;
195 rhopieta = Flatte_rhoab(s[0],snpi,seta);
196 prop = 1.0/(mass_R*mass_R - s[0] - ci*(0.341*rhopieta+0.341*0.892*rhokk));
197 }
198 amp = prop;
199 }
200 else if(spin == 1){
201 if(flag == 0){
202 prop = EvtComplex(1.0,0.0);
203 }
204 if(flag == 1){
205 prop = propagatorRBW(mass_R,width_R,s[0],s[1],s[2],3.0,1);
206 }
207 if(flag == 2){
208 prop = propagatorGS(mass_R, width_R,s[0],s[1],s[2],3.0,1);
209 }
210 if(flag == 4){
211 prop1 = propagatorGS(mass_R, width_R,s[0],s[1],s[2],3.0,1);
212 prop2 = propagatorRBW(0.78266,0.01358,s[0],s[1],s[2],3.0,1);
213 prop = prop1*prop2;
214 }
215 double T1[4], t1[4];
216 calt1(R,P3,T1);
217 calt1(P1,P2,t1);
218 B[0] = barrier(1,s[0],s[1],s[2],3.0,mass_R);
219 B[1] = barrier(1,sD, s[0],sp2, 5.0,mD);
220 tmp = 0.0;
221 for(int i=0; i<4; i++){
222 tmp += T1[i]*t1[i]*G[i][i];
223 }
224 amp = tmp*prop*B[0]*B[1];
225 }
226 else if(spin ==2){
227 double T2[4][4], t2[4][4];
228 calt2(R,P3,T2);
229 calt2(P1,P2,t2);
230 B[0] = barrier(2,s[0],s[1],s[2],3.0,mass_R);
231 B[1] = barrier(2,sD, s[0],sp2, 5.0,mD);
232 tmp = 0.0;
233 for(int i=0; i<4; i++){
234 for(int j=0; j<4; j++){
235 tmp += T2[i][j]*t2[j][i]*G[j][j]*G[i][i];
236 }
237 }
238 if(flag == 0) prop = one;
239 if(flag == 1) prop = propagatorRBW(mass_R,width_R,s[0],s[1],s[2],3.0,2);
240 amp = tmp*prop*B[0]*B[1];
241 }
242 else{
243 cout<<"Only S, P, D wave allowed"<<endl;
244 }
245 return amp;
246}
247
248double EvtDTopipi0Eta::dot(double *a1, double *a2)
249{
250 double Dot = 0;
251 for(int i=0; i!=4; i++){
252 Dot += a1[i]*a2[i]*G[i][i];
253 }
254 return Dot;
255}
256
257double EvtDTopipi0Eta::Qabcs(double sa, double sb, double sc)
258{
259 double Qabcs = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
260 if(Qabcs < 0) Qabcs = 1e-16;
261 return Qabcs;
262}
263
264double EvtDTopipi0Eta::barrier(double l, double sa, double sb, double sc, double r, double mass)
265{
266 double sa0 = mass*mass;
267 double q0 = Qabcs(sa0,sb,sc);
268 double z0 = q0*r*r;
269 double q = Qabcs(sa,sb,sc);
270 q = sqrt(q);
271 double z = q*r;
272 z = z*z;
273 double F = 1;
274 if(l > 2) F = 0;
275 if(l == 0) F = 1;
276 if(l == 1) F = sqrt((1+z0)/(1+z));
277 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
278 return F;
279}
280
281void EvtDTopipi0Eta::calt1(double daug1[], double daug2[], double t1[])
282{
283 double p, pq;
284 double pa[4], qa[4];
285 for(int i=0; i!=4; i++){
286 pa[i] = daug1[i] + daug2[i];
287 qa[i] = daug1[i] - daug2[i];
288 }
289 p = dot(pa,pa);
290 pq = dot(pa,qa);
291 for(int i=0; i!=4; i++){
292 t1[i] = qa[i] - pq/p*pa[i];
293 }
294}
295
296void EvtDTopipi0Eta::calt2(double daug1[], double daug2[], double t2[][4])
297{
298 double p,r;
299 double pa[4], t1[4];
300 calt1(daug1,daug2,t1);
301 r = dot(t1,t1);
302 for(int i=0; i!=4; i++){
303 pa[i] = daug1[i] + daug2[i];
304 }
305 p = dot(pa,pa);
306 for(int i=0; i!=4; i++){
307 for(int j=0; j!=4; j++){
308 t2[i][j] = t1[i]*t1[j] - 1.0/3*r*(G[i][j]-pa[i]*pa[j]/p);
309 }
310 }
311}
312
313double EvtDTopipi0Eta::wid(double mass, double sa, double sb, double sc, double r, int l)
314{
315 double widm(0.), q(0.), q0(0.);
316 double sa0 = mass*mass;
317 double m = sqrt(sa);
318 q = Qabcs(sa,sb,sc);
319 q0 = Qabcs(sa0,sb,sc);
320 double z,z0;
321 z = q*r*r;
322 z0 = q0*r*r;
323 double t = q/q0;
324 double F(0.);
325 if(l == 0) F = 1;
326 if(l == 1) F = sqrt((1+z0)/(1+z));
327 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
328 widm = pow(t,l+0.5)*mass/m*F*F;
329 return widm;
330}
331
332EvtComplex EvtDTopipi0Eta::propagatorRBW(double mass, double width, double sa, double sb, double sc, double r, int l)
333{
334 EvtComplex prop=1.0/(mass*mass-sa-ci*mass*width*wid(mass,sa,sb,sc,r,l));
335 return prop;
336}
337
338double EvtDTopipi0Eta::h(double m, double q)
339{
340 double h = 2.0/pi*q/m*log((m+2*q)/(0.13957 + 0.134976));
341 return h;
342}
343
344double EvtDTopipi0Eta::dh(double mass, double q0)
345{
346 double dh = h(mass,q0)*(1.0/(8*q0*q0)-1.0/(2*mass*mass))+1.0/(2*pi*mass*mass);
347 return dh;
348}
349
350double EvtDTopipi0Eta::f(double mass, double sx, double q0, double q)
351{
352 double m = sqrt(sx);
353 double f = mass*mass/(pow(q0,3))*(q*q*(h(m,q)-h(mass,q0))+(mass*mass-sx)*q0*q0*dh(mass,q0));
354 return f;
355}
356
357double EvtDTopipi0Eta::d(double mass, double q0)
358{
359 double cmpi = 0.5*(0.13957 + 0.134976);
360 double mpi2 = cmpi*cmpi;
361 double d = 3.0/pi*mpi2/(q0*q0)*log((mass+2*q0)/(2*cmpi))+mass/(2*pi*q0) - (mpi2*mass)/(pi*pow(q0,3));
362 return d;
363}
364
365EvtComplex EvtDTopipi0Eta::propagatorGS(double mass, double width, double sa, double sb, double sc, double r, int l)
366{
367 double q = Qabcs(sa,sb,sc);
368 double sa0 = mass*mass;
369 double q0 = Qabcs(sa0,sb,sc);
370 q = sqrt(q);
371 q0 = sqrt(q0);
372 EvtComplex prop = (1+d(mass,q0)*width/mass)/(mass*mass-sa+width*f(mass,sa,q0,q)-ci*mass*width*wid(mass,sa,sb,sc,r,l));
373 return prop;
374}
375
376EvtComplex EvtDTopipi0Eta::Flatte_rhoab(double sa, double sb, double sc)
377{
378 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
379 EvtComplex rho;
380 if(q>0){
381 rho = 2.0*sqrt(q/sa)*one;
382 }
383 if(q<0){
384 rho = 2.0*sqrt(-q/sa)*ci;
385 }
386 return rho;
387}
388
389EvtComplex EvtDTopipi0Eta::propagatorFlatte(double mass, double width, double sx, double *sb, double *sc)
390{
391 const double g1sq = 0.5468*0.5468;
392 const double g2sq = 0.23*0.23;
393 EvtComplex rho1 = Flatte_rhoab(sx,sb[0],sc[0]);
394 EvtComplex rho2 = Flatte_rhoab(sx,sb[1],sc[1]);
395 EvtComplex prop = 1.0/(mass*mass-sx-ci*(g1sq*rho1+g2sq*rho2));
396 return prop;
397}
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
double mass
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
const double mass_Pion
double meta
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
virtual ~EvtDTopipi0Eta()
void getName(std::string &name)
EvtDecayBase * clone()
void decay(EvtParticle *p)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
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)
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 mk0
Definition inclks.cxx:46
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition TUtil.h:27
const double mpi2
Definition TConstant.h:28
float Dot(vector3 v1, vector3 v2)
Definition vector3.h:42