CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
ColinsSoperVariables.h File Reference
#include "TLorentzVector.h"
#include "TVector3.h"

Go to the source code of this file.

Macros

#define CM_ENERGY   7000.0
 

Functions

void calCSVariables (TLorentzVector mu, TLorentzVector mubar, double *res, bool swap)
 

Macro Definition Documentation

#define CM_ENERGY   7000.0

Definition at line 4 of file ColinsSoperVariables.h.

Referenced by calCSVariables().

Function Documentation

void calCSVariables ( TLorentzVector  mu,
TLorentzVector  mubar,
double *  res,
bool  swap 
)
inline

Definition at line 10 of file ColinsSoperVariables.h.

References CM_ENERGY, funct::pow(), dttmaxenums::R, and mathSSE::sqrt().

Referenced by ColinsSoperVariablesComputer::produce().

10  {
11  // convention. beam direction is on the positive Z direction.
12  // beam contains quark flux.
13  TLorentzVector Pbeam(0, 0, CM_ENERGY / 2.0, CM_ENERGY / 2.0);
14  TLorentzVector Ptarget(0, 0, -CM_ENERGY / 2.0, CM_ENERGY / 2.0);
15 
16  TLorentzVector Q(mu + mubar);
17  /************************************************************************
18  *
19  * 1) cos(theta) = 2 Q^-1 (Q^2+Qt^2)^-1 (mu^+ mubar^- - mu^- mubar^+)
20  *
21  *
22  ************************************************************************/
23  double muplus = 1.0 / sqrt(2.0) * (mu.E() + mu.Z());
24  double muminus = 1.0 / sqrt(2.0) * (mu.E() - mu.Z());
25 
26  double mubarplus = 1.0 / sqrt(2.0) * (mubar.E() + mubar.Z());
27  double mubarminus = 1.0 / sqrt(2.0) * (mubar.E() - mubar.Z());
28 
29  double costheta =
30  2.0 / Q.Mag() / sqrt(pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) * (muplus * mubarminus - muminus * mubarplus);
31  if (swap)
32  costheta = -costheta;
33 
34  /************************************************************************
35  *
36  * 2) sin2(theta) = Q^-2 Dt^2 - Q^-2 (Q^2 + Qt^2)^-1 * (Dt dot Qt)^2
37  *
38  ************************************************************************/
39  TLorentzVector D(mu - mubar);
40  double dt_qt = D.X() * Q.X() + D.Y() * Q.Y();
41  double sin2theta =
42  pow(D.Pt() / Q.Mag(), 2) - 1.0 / pow(Q.Mag(), 2) / (pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) * pow(dt_qt, 2);
43 
44  /************************************************************************
45  *
46  * 3) tanphi = (Q^2 + Qt^2)^1/2 / Q (Dt dot R unit) /(Dt dot Qt unit)
47  *
48  ************************************************************************/
49  // unit vector on R direction
50  TVector3 R = Pbeam.Vect().Cross(Q.Vect());
51  TVector3 Runit = R.Unit();
52 
53  // unit vector on Qt
54  TVector3 Qt = Q.Vect();
55  Qt.SetZ(0);
56  TVector3 Qtunit = Qt.Unit();
57 
58  TVector3 Dt = D.Vect();
59  Dt.SetZ(0);
60  double tanphi = sqrt(pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) / Q.Mag() * Dt.Dot(Runit) / Dt.Dot(Qtunit);
61  if (swap)
62  tanphi = -tanphi;
63 
64  res[0] = costheta;
65  res[1] = sin2theta;
66  res[2] = tanphi;
67 }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
#define CM_ENERGY
T sqrt(T t)
Definition: SSEVec.h:19
const int mu
Definition: Constants.h:22
const int mubar
Definition: Constants.h:23
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29