BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
TUtil.h
Go to the documentation of this file.
1#include "TLorentzVector.h"
2#include "TConstant.h"
3#include <complex>
4
5typedef std::complex<double> complex_t;
6
7inline complex_t operator+(const double &x, const complex_t &y) {
8 return y + x;
9}
10
11inline complex_t operator-(const double &x, const complex_t &y) {
12 return -(y - x);
13}
14
15namespace rb{
16 inline double Gamma(const double Q2,
17 const double M2, const double G,
18 const double mkpp2, const double mkmp2){
19 const double mkmp22 = mkmp2*mkmp2;
20 double beta2_q = (Q2*Q2 - 2*Q2*mkpp2 + mkmp22)/pow(Q2 - mkpp2,2);
21 double beta2_M = (M2*M2 - 2*M2*mkpp2 + mkmp22)/pow(M2 - mkpp2,2);
22 double beta2 = beta2_q/beta2_M;
23 double beta = sqrt(beta2);
24 return G*M2/Q2*beta2*beta;
25 }
26
27 inline complex_t R(double Q2,
28 double M2, double G,
29 double Mp2, double Mm2){
30 if(Q2<Mp2) return 0;
31 const complex_t I(0,1);
32 double Q = sqrt(Q2);
33 complex_t prop = M2/(Q2 - M2 + I*(Gamma(Q2,M2,G,Mp2,Mm2)*Q));
34 return prop;
35 }
36
37 inline TLorentzVector PseudoScalars3(const TLorentzVector &qp,
38 const TLorentzVector &qm,
39 const TLorentzVector &q0){
40 // The hadronic current
41 // here for 3pi J_\mu=\epsilon_{a b g \mu}q+_{a}q-_{b}q0_{g}
42
43 double Jx = qp.Y()*qm.Z()*q0.T()
44 - qp.Y()*qm.T()*q0.Z()
45 + qp.T()*qm.Y()*q0.Z()
46 - qp.T()*qm.Z()*q0.Y()
47 + qp.Z()*qm.T()*q0.Y()
48 - qp.Z()*qm.Y()*q0.T();
49
50 double Jy = qp.X()*qm.Z()*q0.T()
51 - qp.X()*qm.T()*q0.Z()
52 + qp.T()*qm.X()*q0.Z()
53 - qp.T()*qm.Z()*q0.X()
54 + qp.Z()*qm.T()*q0.X()
55 - qp.Z()*qm.X()*q0.T();
56
57 double Jz = qp.Y()*qm.X()*q0.T()
58 - qp.Y()*qm.T()*q0.X()
59 + qp.T()*qm.Y()*q0.X()
60 - qp.T()*qm.X()*q0.Y()
61 + qp.X()*qm.T()*q0.Y()
62 - qp.X()*qm.Y()*q0.T();
63
64 double Jt = qp.Y()*qm.Z()*q0.X()
65 - qp.Y()*qm.X()*q0.Z()
66 + qp.X()*qm.Y()*q0.Z()
67 - qp.X()*qm.Z()*q0.Y()
68 + qp.Z()*qm.X()*q0.Y()
69 - qp.Z()*qm.Y()*q0.X();
70
71 TLorentzVector J(Jx,Jy,Jz,Jt);
72 return J;
73 }
74
75}
Double_t x[10]
const DifComplex I
complex_t operator-(const double &x, const complex_t &y)
Definition: TUtil.h:11
complex_t operator+(const double &x, const complex_t &y)
Definition: TUtil.h:7
std::complex< double > complex_t
Definition: TUtil.h:5
double y[1000]
Definition: TConstant.h:3
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27
double Gamma(const double Q2, const double M2, const double G, const double mkpp2, const double mkmp2)
Definition: TUtil.h:16
TLorentzVector PseudoScalars3(const TLorentzVector &qp, const TLorentzVector &qm, const TLorentzVector &q0)
Definition: TUtil.h:37