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