1 #define CM_ENERGY 7000.0
2 #include "TLorentzVector.h"
9 double *res,
bool swap) {
17 TLorentzVector
Q(mu+mubar);
24 double muplus = 1.0/
sqrt(2.0) * (mu.E() + mu.Z());
25 double muminus = 1.0/
sqrt(2.0) * (mu.E() - mu.Z());
27 double mubarplus = 1.0/
sqrt(2.0) * (mubar.E() + mubar.Z());
28 double mubarminus = 1.0/
sqrt(2.0) * (mubar.E() - mubar.Z());
30 double costheta = 2.0 / Q.Mag() /
sqrt(
pow(Q.Mag(), 2) +
pow(Q.Pt(), 2)) *
31 (muplus * mubarminus - muminus * mubarplus);
32 if (swap) costheta = -costheta;
41 TLorentzVector
D(mu-mubar);
42 double dt_qt = D.X()*Q.X() + D.Y()*Q.Y();
43 double sin2theta =
pow(D.Pt()/Q.Mag(), 2)
44 - 1.0/
pow(Q.Mag(), 2)/(
pow(Q.Mag(), 2) +
pow(Q.Pt(), 2))*
pow(dt_qt, 2);
54 TVector3
R = Pbeam.Vect().Cross(Q.Vect());
55 TVector3 Runit = R.Unit();
59 TVector3 Qt = Q.Vect(); Qt.SetZ(0);
60 TVector3 Qtunit = Qt.Unit();
63 TVector3 Dt = D.Vect(); Dt.SetZ(0);
64 double tanphi =
sqrt(
pow(Q.Mag(), 2) +
pow(Q.Pt(), 2)) / Q.Mag() *
65 Dt.Dot(Runit) / Dt.Dot(Qtunit);
66 if (swap) tanphi = -tanphi;
void swap(ora::Record &rh, ora::Record &lh)
DecomposeProduct< arg, typename Div::arg > D
void calCSVariables(TLorentzVector mu, TLorentzVector mubar, double *res, bool swap)
Power< A, B >::type pow(const A &a, const B &b)