BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDsToEtapipi0.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// Environment:
3// This software is part of the EvtGen package developed jointly
4// for the BaBar and CLEO collaborations. If you use all or part
5// of it, please give an appropriate acknowledgement.
6//
7// Copyright Information: See EvtGen/COPYRIGHT
8// Copyright (C) 1998 Caltech, UCSB
9//
10// Module: EvtDsToEtapipi0.cc
11//
12// Description: Routine to handle three-body decays of Ds+/Ds-
13//
14// Modification history:
15// Liaoyuan Dong Sun Jun 02 01:23:25 2024 Module created
16//------------------------------------------------------------------------
18#include <fstream>
19#include <stdlib.h>
22#include "EvtGenBase/EvtPDL.hh"
27#include <string>
30using std::endl;
31
33
34void EvtDsToEtapipi0::getName(std::string& model_name){
35 model_name="DsToEtapipi0";
36}
37
41
43 // check that there are 0 arguments
44 checkNArg(0);
45 checkNDaug(3);
50
51 phi[1] = 0.783116;
52 phi[2] = 2.8811;
53 rho[1] = 1.50567;
54 rho[2] = 0.845892;
55 rho[0] = 1;
56 phi[0] = 0;
57
58 //cout << "DsToEtapipi0 :" << endl;
59 //for (int i=0; i<3; i++) {
60 // cout << i << " rho= " << rho[i] << " phi= " << phi[i] << endl;
61 //}
62
63 mD = 1.86486;
64 mDs = 1.9683;
65 rRes = 3.0;
66 rD = 5.0;
67 metap = 0.95778;
68 mkstr = 0.89594;
69 mk0 = 0.497614;
70 mass_Kaon = 0.49368;
71 mass_Pion = 0.13957;
72 mass_Pi0 = 0.1349766;
73 math_pi = 3.1415926;
74 mrho = 0.77549;
75 Grho = 0.1491;
76 ma0 = 0.980;
77 Ga0 = 0.0756;
78 meta = 0.547862;
79 int GG[4][4] = { {1,0,0,0}, {0,-1,0,0}, {0,0,-1,0}, {0,0,0,-1} };
80 for (int i=0; i<4; i++) {
81 for (int j=0; j<4; j++) {
82 G[i][j] = GG[i][j];
83 }
84 }
85}
86
90
92/*
93 double maxprob = 0.0;
94 for(int ir=0;ir<=60000000;ir++){
95 p->initializePhaseSpace(getNDaug(),getDaugs());
96 EvtVector4R D1 = p->getDaug(0)->getP4();
97 EvtVector4R D2 = p->getDaug(1)->getP4();
98 EvtVector4R D3 = p->getDaug(2)->getP4();
99
100 double P1[4], P2[4], P3[4];
101 P1[0] = D1.get(0); P1[1] = D1.get(1); P1[2] = D1.get(2); P1[3] = D1.get(3);
102 P2[0] = D2.get(0); P2[1] = D2.get(1); P2[2] = D2.get(2); P2[3] = D2.get(3);
103 P3[0] = D3.get(0); P3[1] = D3.get(1); P3[2] = D3.get(2); P3[3] = D3.get(3);
104
105 double value;
106 value = calDalEva(P1, P2, P3);
107 if(value>maxprob) {
108 maxprob=value;
109 printf("ir = %d, maxprob = %.10f\n", ir, value);
110 }
111 }
112 printf("MAXprob = %.10f\n",maxprob);
113*/
115 EvtVector4R D1 = p->getDaug(0)->getP4();
116 EvtVector4R D2 = p->getDaug(1)->getP4();
117 EvtVector4R D3 = p->getDaug(2)->getP4();
118
119 double P1[4], P2[4], P3[4];
120 P1[0] = D1.get(0); P1[1] = D1.get(1); P1[2] = D1.get(2); P1[3] = D1.get(3);
121 P2[0] = D2.get(0); P2[1] = D2.get(1); P2[2] = D2.get(2); P2[3] = D2.get(3);
122 P3[0] = D3.get(0); P3[1] = D3.get(1); P3[2] = D3.get(2); P3[3] = D3.get(3);
123
124 double value;
125 value = calDalEva(P1, P2, P3);
126 setProb(value);
127 return ;
128}
129
130Double_t EvtDsToEtapipi0::calDalEva(Double_t P1[], Double_t P2[], Double_t P3[])
131{
132 //pi pi0 eta
133 //flag two numbers X, Y, X = spin, Y = is Resonant.
134 TComplex PDF[4], cof, pdf, module;
135 PDF[0] = Spin_factor(P1, P2, P3, 1, 1);
136 PDF[1] = Spin_factor(P1, P2, P3, 1, 0);
137 PDF[2] = Spin_factor(P1, P3, P2, 0, 31) - Spin_factor(P2, P3, P1, 0, 30);
138
139 pdf = TComplex(0,0);
140 for(Int_t i=0; i<4; i++){
141 cof = TComplex(rho[i]*TMath::Cos(phi[i]),rho[i]*TMath::Sin(phi[i]));
142 pdf += cof*PDF[i];
143 }
144 module = pdf*TComplex::Conjugate(pdf);
145 Double_t value;
146 value = module.Re();
147 return (value <= 0) ? 1e-20 : value;
148}
149
150TComplex EvtDsToEtapipi0::Spin_factor(Double_t P1[], Double_t P2[], Double_t P3[], Int_t spin, Int_t flag)
151{
152 //D-> R P3, R->P1 P2
153 //flag 0, non-res, 1, RBW, 30, Flatte for a0^0(980), 31 Flatte for a0^+(980)
154 Double_t R[4], s[3], sp2, sDs, B[2], snk, sck;
155 for(Int_t i=0; i<4; i++){
156 R[i] = P1[i] + P2[i];
157 }
158 s[0] = SCADot(R,R);
159 s[1] = SCADot(P1, P1);
160 s[2] = SCADot(P2, P2);
161 sp2 = SCADot(P3,P3);
162 sDs = mDs*mDs;
163 snk = mk0*mk0;
164 sck = mass_Kaon*mass_Kaon;
165 TComplex amp(0,0), prop;
166 Double_t tmp(0.);
167 //-----------for prop-------------------------
168 Double_t mass(0.99);
169 TComplex ci(0,1);
170 TComplex rhokk, rhopieta;
171 if(spin == 0){
172 if(flag == 0) prop = TComplex::One();
173 if(flag == 1) prop = propagatorRBW(ma0,Ga0,s[0],s[1],s[2],3.0,0);
174 if(flag == 30){
175 rhokk = Flatte_rhoab(s[0],sck,sck);
176 rhopieta = Flatte_rhoab(s[0],s[1],s[2]);
177 prop = 1.0/(mass*mass - s[0] - ci*(0.341*rhopieta+0.341*0.892*rhokk));
178 }
179 if(flag == 31){
180 rhokk = Flatte_rhoab(s[0],snk,sck);
181 rhopieta = Flatte_rhoab(s[0],s[1],s[2]);
182 prop = 1.0/(mass*mass - s[0] - ci*(0.341*rhopieta+0.341*0.892*rhokk));
183 }
184 amp = prop;
185 }
186 else if(spin == 1){
187 Double_t m_res;
188 if(flag == 0){
189 prop = TComplex::One();
190 m_res = mrho;
191 }
192 if(flag == 1){
193 prop = propagatorRBW(mrho,Grho,s[0],s[1],s[2],3.0,1);// only rho for res. 1^- term
194 m_res = mrho;
195 }
196 tmp = 0;
197 Double_t T1[4], t1[4];
198 calt1(R,P3,T1);
199 calt1(P1,P2,t1);
200 B[0] = barrierNeo(1,s[0],s[1],s[2],3.0,m_res); //spin1 only rho
201 B[1] = barrierNeo(1,sDs,s[0],sp2,5.0,1.9683);
202 for(Int_t i=0; i<4; i++){
203 tmp += T1[i]*t1[i]*G[i][i];
204 }
205 amp = tmp*prop*B[0]*B[1];
206 }
207 else if(spin ==2){
208 tmp = 0;
209 Double_t T2[4][4], t2[4][4];
210 calt2(R,P3,T2);
211 calt2(P1,P2,t2);
212 B[0] = barrierNeo(2,s[0],s[1],s[2],3.0,mrho); //wait for changed
213 B[1] = barrierNeo(2,sDs,s[0],sp2,5.0,1.9683);
214 for(Int_t i=0; i<4; i++){
215 for(Int_t j=0; j<4; j++){
216 tmp += T2[i][j]*t2[j][i]*G[j][j]*G[i][i];
217 }
218 }
219 if(flag == 0) prop = TComplex::One();
220 if(flag == 1) prop = propagatorRBW(mrho,Grho,s[0],s[1],s[2],3.0,1);
221 // If D wave res. term is found, please use corresponding mass and width for each resonance.
222 amp = tmp*prop*B[0]*B[1];
223 }
224 else{
225 cout<<"Only S, P, D wave allowed"<<endl;
226 }
227 return amp;
228}
229
230void EvtDsToEtapipi0::Com_Multi(double a1[2], double a2[2], double res[2]){
231 res[0] = a1[0]*a2[0]-a1[1]*a2[1];
232 res[1] = a1[1]*a2[0]+a1[0]*a2[1];
233}
234void EvtDsToEtapipi0::Com_Divide(double a1[2], double a2[2], double res[2]){
235 res[0] = (a1[0]*a2[0]+a1[1]*a2[1])/(a2[0]*a2[0]+a2[1]*a2[1]);
236 res[1] = (a1[1]*a2[0]-a1[0]*a2[1])/(a2[0]*a2[0]+a2[1]*a2[1]);
237}
238
239double EvtDsToEtapipi0::SCADot(double a1[4], double a2[4])
240{
241 double _cal = 0.;
242 _cal = a1[0]*a2[0]-a1[1]*a2[1]-a1[2]*a2[2]-a1[3]*a2[3];
243 return _cal;
244}
245double EvtDsToEtapipi0::barrierNeo(int l, double sa, double sb, double sc, double r, double mR)
246{
247 double mR2=mR*mR;
248 double pAB=0.25*(sa+sb-sc)*(sa+sb-sc)/sa-sb;
249 double pR =0.25*(mR2+sb-sc)*(mR2+sb-sc)/mR2-sb;
250 double zAB= pAB*r*r;
251 double zR = pR *r*r;
252 double F = 0.0;
253 if(l == 0) F = 1;
254 if(l == 1) F = sqrt((1+zR)/(1+zAB));
255 if(l == 2) F = sqrt((9+3*zAB+zAB*zAB)/(9+3*zAB+zAB*zAB));
256 return F;
257}
258//------------------spin-------------------------------------------
259void EvtDsToEtapipi0::calt1(double daug1[4], double daug2[4], double t1[4]){
260 double p, pq;
261 double pa[4], qa[4];
262 for(int i=0; i<4; i++){
263 pa[i] = daug1[i] + daug2[i];
264 qa[i] = daug1[i] - daug2[i];
265 }
266 p = SCADot(pa,pa);
267 pq = SCADot(pa,qa);
268 for(int i=0; i<4; i++){
269 t1[i] = qa[i] - pq/p*pa[i];
270 }
271}
272void EvtDsToEtapipi0::calt2(double daug1[4], double daug2[4], double t2[4][4]){
273 double p, r;
274 double pa[4], t1[4];
275 calt1(daug1,daug2,t1);
276 r = SCADot(t1,t1);
277 for(int i=0; i<4; i++){
278 pa[i] = daug1[i] + daug2[i];
279 }
280 p = SCADot(pa,pa);
281 for(int i=0; i<4; i++){
282 for(int j=0; j<4; j++){
283 t2[i][j] = t1[i]*t1[j] - 1.0/3*r*(G[i][j]-pa[i]*pa[j]/p);
284 }
285 }
286}
287//-------------------prop--------------------------------------------
288double EvtDsToEtapipi0::wid(double mass, double sa, double sb, double sc, double r, int l){
289 double widm = 0.;
290 double q = 0.;
291 double q0 = 0.;
292 double sa0 = mass*mass;
293 double m = sqrt(sa);
294 q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
295 if(q<0) q = 1e-16;
296 q0 = (sa0+sb-sc)*(sa0+sb-sc)/(4*sa0)-sb;
297 if(q0<0) q0 = 1e-16;
298 // double F = barrier(l,sa,sb,sc,r);
299 double z = q*r*r;
300 double z0 = q0*r*r;
301 double F = 0;
302 if(l == 0) F = 1;
303 if(l == 1) F = sqrt((1+z0)/(1+z));
304 if(l == 2) F = sqrt((9+3*z0+z0*z0)/(9+3*z+z*z));
305 double t = q/q0;
306 widm = pow(t,l+0.5)*mass/m*F*F;
307 return widm;
308}
309
310void EvtDsToEtapipi0::Flatte_rhoab(double sa, double sb, double sc, double rho[2])
311{
312 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
313 double b[2];
314 if(q>0) {
315 rho[0]=2* sqrt(q/sa);
316 rho[1]=0;
317 }
318 else if(q<0){
319 rho[0]=0;
320 rho[1]=2*sqrt(-q/sa);
321 }
322}
323
324TComplex EvtDsToEtapipi0::Flatte_rhoab(double sa, double sb, double sc)
325{
326 double q = (sa+sb-sc)*(sa+sb-sc)/(4*sa)-sb;
327 TComplex rho;
328 TComplex ci(0,1);
329 if(q>0){
330 rho = 2.0*sqrt(q/sa)*(TComplex::One());
331 }
332 if(q<0){
333 rho = 2.0*sqrt(-q/sa)*ci;
334 }
335 return rho;
336}
337
338TComplex EvtDsToEtapipi0::propagatorRBW(double mass, double width, double sa, double sb, double sc, double r, int l)
339{
340 TComplex ci(0,1);
341 TComplex prop=1.0/(mass*mass-sa-ci*mass*width*wid(mass,sa,sb,sc,r,l));
342 return prop;
343}
double mass
complex< double > TComplex
Definition Dalitz.h:14
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 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)
void decay(EvtParticle *p)
void getName(std::string &name)
virtual ~EvtDsToEtapipi0()
EvtDecayBase * clone()
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
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition TUtil.h:27
const double b
Definition slope.cxx:9