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