CMS 3D CMS Logo

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

◆ CM_ENERGY

#define CM_ENERGY   7000.0

Definition at line 1 of file ColinsSoperVariables.h.

Function Documentation

◆ calCSVariables()

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

Definition at line 7 of file ColinsSoperVariables.h.

7  {
8  // convention. beam direction is on the positive Z direction.
9  // beam contains quark flux.
10  TLorentzVector Pbeam(0, 0, CM_ENERGY / 2.0, CM_ENERGY / 2.0);
11  TLorentzVector Ptarget(0, 0, -CM_ENERGY / 2.0, CM_ENERGY / 2.0);
12 
13  TLorentzVector Q(mu + mubar);
14  /************************************************************************
15  *
16  * 1) cos(theta) = 2 Q^-1 (Q^2+Qt^2)^-1 (mu^+ mubar^- - mu^- mubar^+)
17  *
18  *
19  ************************************************************************/
20  double muplus = 1.0 / sqrt(2.0) * (mu.E() + mu.Z());
21  double muminus = 1.0 / sqrt(2.0) * (mu.E() - mu.Z());
22 
23  double mubarplus = 1.0 / sqrt(2.0) * (mubar.E() + mubar.Z());
24  double mubarminus = 1.0 / sqrt(2.0) * (mubar.E() - mubar.Z());
25 
26  double costheta =
27  2.0 / Q.Mag() / sqrt(pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) * (muplus * mubarminus - muminus * mubarplus);
28  if (swap)
29  costheta = -costheta;
30 
31  /************************************************************************
32  *
33  * 2) sin2(theta) = Q^-2 Dt^2 - Q^-2 (Q^2 + Qt^2)^-1 * (Dt dot Qt)^2
34  *
35  ************************************************************************/
36  TLorentzVector D(mu - mubar);
37  double dt_qt = D.X() * Q.X() + D.Y() * Q.Y();
38  double sin2theta =
39  pow(D.Pt() / Q.Mag(), 2) - 1.0 / pow(Q.Mag(), 2) / (pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) * pow(dt_qt, 2);
40 
41  /************************************************************************
42  *
43  * 3) tanphi = (Q^2 + Qt^2)^1/2 / Q (Dt dot R unit) /(Dt dot Qt unit)
44  *
45  ************************************************************************/
46  // unit vector on R direction
47  TVector3 R = Pbeam.Vect().Cross(Q.Vect());
48  TVector3 Runit = R.Unit();
49 
50  // unit vector on Qt
51  TVector3 Qt = Q.Vect();
52  Qt.SetZ(0);
53  TVector3 Qtunit = Qt.Unit();
54 
55  TVector3 Dt = D.Vect();
56  Dt.SetZ(0);
57  double tanphi = sqrt(pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) / Q.Mag() * Dt.Dot(Runit) / Dt.Dot(Qtunit);
58  if (swap)
59  tanphi = -tanphi;
60 
61  res[0] = costheta;

References CM_ENERGY, amptDefaultParameters_cff::mu, RPCpg::mubar, BPhysicsValidation_cfi::muminus, BPhysicsValidation_cfi::muplus, funct::pow(), class-composition::Q, dttmaxenums::R, mathSSE::sqrt(), and edm::swap().

Referenced by ColinsSoperVariablesComputer::produce().

amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
edm::swap
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
class-composition.Q
Q
Definition: class-composition.py:82
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
BPhysicsValidation_cfi.muplus
muplus
Definition: BPhysicsValidation_cfi.py:18
CM_ENERGY
#define CM_ENERGY
Definition: ColinsSoperVariables.h:1
BPhysicsValidation_cfi.muminus
muminus
Definition: BPhysicsValidation_cfi.py:12
RPCpg::mubar
const int mubar
Definition: Constants.h:23
res
Definition: Electron.h:6
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
dttmaxenums::R
Definition: DTTMax.h:29