36 model_name=
"D0ToKSKK";
65 massB1_a00 = 0.547862;
66 massB2_a00 = 0.134977;
67 massC1_a00 = 0.497614;
68 massC2_a00 = 0.497614;
76 massB1_a0p = 0.547862;
92 phase_a2m = -0.138591;
97 mag_a0_1450m = 0.210031;
98 phase_a0_1450m = -0.23412;
100 mass_a0_1450m = 1.474;
101 width_a0_1450m = 0.265;
131 double value = EvaluateAmp(D1, D2, D3);
137 double m23sq = (p4_d2 + p4_d3).mass2();
138 double m13sq = (p4_d1 + p4_d3).mass2();
139 double m12sq = (p4_d1 + p4_d2).mass2();
140 double cosTheta23_1v2 = helicityAngle(MD,m2,m3,m1,m23sq,m12sq);
141 double cosTheta13_1v2 = helicityAngle(MD,m1,m3,m2,m13sq,m12sq);
142 double cosTheta12_2v3 = helicityAngle(MD,m2,m1,m3,m12sq,m23sq);
145 std::complex<double> Amp_a00 = GetCoefficient(mag_a00,phase_a00)*AmpFlatteRes(m23sq,mass_a00,m2,m3,gA_a00,massB1_a00,massB2_a00,gB_a00,massC1_a00,massC2_a00,gC_a00,spin_a00,mesonRadius)/10.194701039;
146 std::complex<double> Amp_a0p = GetCoefficient(mag_a0p,phase_a0p)*AmpFlatteRes(m13sq,mass_a0p,m1,m3,gA_a0p,massB1_a0p,massB2_a0p,gB_a0p,spin_a0p,mesonRadius)/12.861154457;
147 std::complex<double> Amp_phi = GetCoefficient(mag_phi,phase_phi)*AmpRelBreitWignerRes(m23sq,mass_phi,m2,m3,width_phi,spin_phi,mesonRadius) *Wigner_d(spin_phi,0,0,acos(cosTheta23_1v2))/715.1406308838;
148 std::complex<double> Amp_a2p = GetCoefficient(mag_a2p,phase_a2p)*AmpRelBreitWignerRes(m13sq,mass_a2p,m1,m3,width_a2p,spin_a2p,mesonRadius) *Wigner_d(spin_a2p,0,0,acos(cosTheta13_1v2))/340.70301058;
149 std::complex<double> Amp_a2m = GetCoefficient(mag_a2m,phase_a2m)*AmpRelBreitWignerRes(m12sq,mass_a2m,m1,m2,width_a2m,spin_a2m,mesonRadius) *Wigner_d(spin_a2m,0,0,acos(cosTheta12_2v3))/340.737568318;
150 std::complex<double> Amp_a0_1450m = GetCoefficient(mag_a0_1450m,phase_a0_1450m)*AmpRelBreitWignerRes(m12sq,mass_a0_1450m,m1,m2,width_a0_1450m,spin_a0_1450m,mesonRadius)/8.9320553176;
153 std::complex<double> Amp = Amp_a00 + Amp_a0p + Amp_phi + Amp_a2p + Amp_a2m + Amp_a0_1450m;
154 double value = std::norm(Amp);
158double EvtD0ToKSKK::helicityAngle(
double M,
double m,
double m2,
double mSpec,
double invMassSqA,
double invMassSqB) {
160 double eCms = (invMassSqA + m*m -
m2*
m2)/(2*sqrt(invMassSqA));
161 double pCms = eCms*eCms - m*m;
163 double eSpecCms = (M*M - mSpec*mSpec - invMassSqA)/( 2*sqrt(invMassSqA));
164 double pSpecCms = eSpecCms*eSpecCms - mSpec*mSpec;
165 double cosAngle = -(invMassSqB - m*m - mSpec*mSpec - 2*eCms*eSpecCms)/(2*sqrt(pCms*pSpecCms));
169std::complex<double> EvtD0ToKSKK::AmpRelBreitWignerRes(
double mSq,
double mR,
double ma,
double mb,
double width,
unsigned int J,
double mesonRadius) {
172 std::complex<double> i(0,1);
173 double sqrtS = sqrt(mSq);
174 double barrier = FormFactor(sqrtS,ma,mb,J,mesonRadius)/FormFactor(mR,ma,mb,J,mesonRadius);
175 std::complex<double> qTerm = pow( (phspFactor(sqrtS,ma,mb)/phspFactor(mR,ma,mb))*sqrtS/mR, (2*J+1) )*mR/sqrtS;
176 std::complex<double> g_final = widthToCoupling(mSq,mR,width,ma,mb,J,mesonRadius);
177 std::complex<double> denom = std::complex<double>(mR*mR-mSq, 0) + (-1.0)*i*sqrtS*(width*qTerm*barrier);
178 std::complex<double> result = g_final/denom;
182std::complex<double> EvtD0ToKSKK::widthToCoupling(
double mSq,
double mR,
double width,
double ma,
double mb,
double spin,
double mesonRadius) {
183 double sqrtS = sqrt(mSq);
184 std::complex<double> gammaA(1,0);
186 std::complex<double>
q = qValue(mR,ma,mb);
187 double ffR = FormFactor(mR,ma,mb,spin,mesonRadius);
188 std::complex<double> qR = pow(
q,spin);
191 std::complex<double> rho = phspFactor(sqrtS,ma,mb);
192 std::complex<double> denom = gammaA*sqrt(rho);
193 std::complex<double> res = std::complex<double>(sqrt(mR*width), 0)/denom;
197std::complex<double> EvtD0ToKSKK::AmpFlatteRes(
double mSq,
double mR,
double massA1,
double massA2,
double gA,
double massB1,
double massB2,
double couplingB,
unsigned int J,
double mesonRadius) {
198 std::complex<double> i(0,1);
199 double sqrtS = sqrt(mSq);
200 std::complex<double> termA = gA*gA*phspFactor(sqrtS,massA1,massA2);
201 std::complex<double> termB = couplingB*couplingB*phspFactor(sqrtS, massB1, massB2);
202 std::complex<double> denom = std::complex<double>(mR*mR-mSq, 0) + (-1.0)*i*(termA + termB);
203 std::complex<double> result = std::complex<double>(gA, 0) / denom;
206std::complex<double> EvtD0ToKSKK::AmpFlatteRes(
double mSq,
double mR,
double massA1,
double massA2,
double gA,
double massB1,
double massB2,
double couplingB,
double massC1,
double massC2,
double couplingC,
unsigned int J,
double mesonRadius) {
207 std::complex<double> i(0,1);
208 double sqrtS = sqrt(mSq);
209 std::complex<double> termA = gA*gA*phspFactor(sqrtS,massA1,massA2);
210 std::complex<double> termB = couplingB*couplingB*phspFactor(sqrtS, massB1, massB2);
211 std::complex<double> termC = couplingC*couplingC*phspFactor(sqrtS, massC1, massC2);
212 std::complex<double> denom = std::complex<double>(mR*mR-mSq, 0) + (-1.0)*i*(termA + termB + termC);
213 std::complex<double> result = std::complex<double>(gA, 0) / denom;
217double EvtD0ToKSKK::FormFactor(
double sqrtS,
double ma,
double mb,
double spin,
double mesonRadius) {
218 if(spin==0){
return 1.0; }
219 std::complex<double>
q = qValue(sqrtS,ma,mb);
222 double qSq = std::norm(
q);
223 double z = qSq*mesonRadius*mesonRadius;
226 return( sqrt(2*z/(z+1)) );
229 return ( sqrt( 13*z*z/( (z-3)*(z-3)+9*z ) ) );
234std::complex<double> EvtD0ToKSKK::phspFactor(
double sqrtS,
double ma,
double mb) {
247 double s = sqrtS*sqrtS;
248 std::complex<double> i(0,1);
249 std::complex<double> rho;
250 double q = sqrt( fabs(qSqValue(sqrtS,ma,mb)*4/
s) );
252 rho = -
q/
M_PI*log(fabs((1+
q)/(1-
q)));
253 }
else if( 0<
s &&
s<=(ma+mb)*(ma+mb) ){
254 rho = ( -2.0*
q/
M_PI * atan(1/
q) )/(i*16.0*
M_PI*sqrtS);
255 }
else if( (ma+mb)*(ma+mb)<
s ){
256 rho = ( -
q/
M_PI*log( fabs((1+
q)/(1-
q)) )+i*
q )/(i*16.0*
M_PI*sqrtS);
261std::complex<double> EvtD0ToKSKK::qValue(
double sqrtS,
double ma,
double mb) {
262 return phspFactor(sqrtS,ma,mb)*8.0*
M_PI*sqrtS;
265double EvtD0ToKSKK::qSqValue(
double sqrtS,
double ma,
double mb) {
266 double mapb = ma + mb;
267 double mamb = ma - mb;
268 double xSq = sqrtS*sqrtS;
269 double t1 = xSq - mapb*mapb;
270 double t2 = xSq - mamb*mamb;
271 return ( t1*t2/(4*xSq) );
274std::complex<double> EvtD0ToKSKK::GetCoefficient(
double mag,
double phase)
const {
275 return std::complex<double>(fabs(mag)*
cos(phase), fabs(mag)*
sin(phase));
278double EvtD0ToKSKK::Wigner_d(
unsigned int __j,
unsigned int __m,
unsigned int __n,
double __beta) {
279 int J = (int)(2.*__j);
280 int M = (int)(2.*__m);
281 int N = (int)(2.*__n);
282 int temp_M, k,
k_low, k_hi;
283 double const_term = 0.0, sum_term = 0.0, d = 1.0;
284 int m_p_n, j_p_m, j_p_n, j_m_m, j_m_n;
285 int kmn1, kmn2, jmnk, jmk, jnk;
288 if (J < 0 || abs (M) > J ||
abs (N) > J) {
290 cout <<
"d: you have entered an illegal number for J, M, N." << endl;
291 cout <<
"Must follow these rules: J >= 0, abs(M) <= J, and abs(N) <= J."
293 cout <<
"J = " << J <<
" M = " << M <<
" N = " << N << endl;
298 __beta = fabs (__beta);
310 kk = (double)factorial(j_p_m)*(double)factorial(j_m_m)*(double)factorial(j_p_n)*(double)factorial(j_m_n);
311 const_term = pow((-1.0),(j_p_m)) * sqrt(kk);
313 k_low = ((m_p_n>0) ? m_p_n:0);
314 k_hi = ((j_p_m<j_p_n) ? j_p_m:j_p_n);
316 for (k =
k_low; k <= k_hi; k++) {
317 kmn1 = 2*k - (M + N)/2;
318 jmnk = J + (M + N)/2 - 2*k;
321 kmn2 = k - (M + N)/2;
322 sum_term += pow((-1.0), (k)) *((pow(
cos(__beta/2.0), kmn1)) *(pow(
sin(__beta/2.0), jmnk)))/(factorial(k) *factorial(jmk) *factorial(jnk) *factorial(kmn2));
325 d = const_term*sum_term*sqrt(2.0*__j+1.0);
329int EvtD0ToKSKK::factorial(
int i) {
331 if((i == 0)||(i == 1))
f = 1;
double sin(const BesAngle a)
double cos(const BesAngle a)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
****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
void getName(std::string &name)
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)
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)