CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
kinem Namespace Reference

Functions

double delta_eta (double eta1, double eta2)
 
double delta_phi (double ph11, double phi2)
 
double delta_R (double eta1, double phi1, double eta2, double phi2)
 
double eta (double x, double y, double z)
 
double eta (double xyz1[3], double xyz2[3])
 
double eta (float xyz1[3], float xyz2[3])
 
double eta (double th)
 
double phi (double x, double y)
 
double phi (double xy1[2], double xy2[2])
 
double phi (float xy1[2], float xy2[2])
 
double signed_delta_phi (double ph11, double phi2)
 
double tanl_from_theta (double theta)
 
double theta (double x, double y, double z)
 
double theta (double xyz1[3], double xyz2[3])
 
double theta (float xyz1[3], float xyz2[3])
 
double theta (double etap)
 
double theta_from_tanl (double tanl)
 
void uvectors (double u[3], double xyz1[3], double xyz2[3])
 
void uvectors (float u[3], float xyz1[3], float xyz2[3])
 
double y (double E, double pz)
 

Variables

const float EPSILON =1.E-10
 
const float ETA_LIMIT =15.0
 
const double PI =2.0*acos(0.)
 
const double TWOPI =2.0*PI
 

Function Documentation

double kinem::delta_eta ( double  eta1,
double  eta2 
)
inline
double kinem::delta_phi ( double  ph11,
double  phi2 
)
inline
double kinem::delta_R ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
inline

Definition at line 116 of file AnglesUtil.h.

References delta_phi(), and mathSSE::sqrt().

Referenced by EnergyScaleAnalyzer::analyze(), EnergyScaleAnalyzer::fillTree(), and CosmicRegionalSeedGenerator::regions().

117 {
118  double deta = eta1-eta2;
119  double dphi = kinem::delta_phi(phi1,phi2);
120  return sqrt(deta*deta + dphi*dphi);
121 }
T sqrt(T t)
Definition: SSEVec.h:48
double delta_phi(double ph11, double phi2)
Definition: AnglesUtil.h:91
double kinem::eta ( double  x,
double  y,
double  z 
)
inline

Definition at line 168 of file AnglesUtil.h.

References EPSILON, cmsBatch::log, and mathSSE::sqrt().

169 {
170  return 0.5*log((sqrt(x*x + y*y + z*z) + z + EPSILON) /
171  (sqrt(x*x + y*y + z*z) - z + EPSILON));
172 }
float float float z
T x() const
Cartesian x coordinate.
T sqrt(T t)
Definition: SSEVec.h:48
const float EPSILON
Definition: AnglesUtil.h:23
tuple log
Definition: cmsBatch.py:341
double kinem::eta ( double  xyz1[3],
double  xyz2[3] 
)
inline

Definition at line 152 of file AnglesUtil.h.

References eta, x(), detailsBasic3DVector::y, and detailsBasic3DVector::z.

153 {
154  double x=xyz2[0]-xyz1[0];
155  double y=xyz2[1]-xyz1[1];
156  double z=xyz2[2]-xyz1[2];
157  return eta(x, y, z);
158 }
float float float z
T x() const
Cartesian x coordinate.
double kinem::eta ( float  xyz1[3],
float  xyz2[3] 
)
inline

Definition at line 161 of file AnglesUtil.h.

References eta.

161  {
162  double dxyz1[3]={xyz1[0],xyz1[1],xyz1[2]};
163  double dxyz2[3]={xyz2[0],xyz2[1],xyz2[2]};
164  return eta(dxyz1,dxyz2);
165 }
double kinem::eta ( double  th)
inline

Definition at line 175 of file AnglesUtil.h.

References ETA_LIMIT, cmsBatch::log, PI, and funct::tan().

176 {
177  if(th == 0) return ETA_LIMIT;
178  if(th >= PI-0.0001) return -ETA_LIMIT;
179  return -log(tan(th/2.0));
180 }
#define PI
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
const float ETA_LIMIT
Definition: AnglesUtil.h:22
tuple log
Definition: cmsBatch.py:341
double kinem::phi ( double  x,
double  y 
)
inline

Definition at line 69 of file AnglesUtil.h.

References PHI, and TWOPI.

70 {
71  double PHI=atan2(y, x);
72  return (PHI>=0)? PHI : kinem::TWOPI+PHI;
73 }
T x() const
Cartesian x coordinate.
const double TWOPI
Definition: AnglesUtil.h:21
#define PHI
double kinem::phi ( double  xy1[2],
double  xy2[2] 
)
inline

Definition at line 83 of file AnglesUtil.h.

References phi(), x(), and detailsBasic3DVector::y.

84 {
85  double x=xy2[0]-xy1[0];
86  double y=xy2[1]-xy1[1];
87  return phi(x, y);
88 }
T x() const
Cartesian x coordinate.
Geom::Phi< T > phi() const
double kinem::phi ( float  xy1[2],
float  xy2[2] 
)
inline

Definition at line 76 of file AnglesUtil.h.

References phi().

76  {
77  double dxy1[2]={xy1[0],xy1[1]};
78  double dxy2[2]={xy2[0],xy2[1]};
79  return phi(dxy1,dxy2);
80  }
Geom::Phi< T > phi() const
double kinem::signed_delta_phi ( double  ph11,
double  phi2 
)
inline

Definition at line 104 of file AnglesUtil.h.

References PI, and TWOPI.

105 {
106  double phia=phi1;
107  if(phi1>PI) phia=phi1-kinem::TWOPI;
108  double phib=phi2;
109  if(phi2>PI) phib=phi2-kinem::TWOPI;
110  double dphi=phia-phib;
111  if(dphi>PI) dphi-=kinem::TWOPI;
112  if(dphi<-PI) dphi+=kinem::TWOPI;
113  return dphi;
114 }
#define PI
const double TWOPI
Definition: AnglesUtil.h:21
double kinem::tanl_from_theta ( double  theta)
inline

Definition at line 217 of file AnglesUtil.h.

References PI, and funct::tan().

217  {
218  return tan(PI/2.0 - theta);
219 }
#define PI
Geom::Theta< T > theta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double kinem::theta ( double  x,
double  y,
double  z 
)
inline

Definition at line 140 of file AnglesUtil.h.

References mathSSE::sqrt().

141 {
142  return atan2(sqrt(x*x + y*y), z);
143 }
float float float z
T x() const
Cartesian x coordinate.
T sqrt(T t)
Definition: SSEVec.h:48
double kinem::theta ( double  xyz1[3],
double  xyz2[3] 
)
inline

Definition at line 124 of file AnglesUtil.h.

References theta(), x(), detailsBasic3DVector::y, and detailsBasic3DVector::z.

125 {
126  double x=xyz2[0]-xyz1[0];
127  double y=xyz2[1]-xyz1[1];
128  double z=xyz2[2]-xyz1[2];
129  return theta(x, y, z);
130 }
Geom::Theta< T > theta() const
float float float z
T x() const
Cartesian x coordinate.
double kinem::theta ( float  xyz1[3],
float  xyz2[3] 
)
inline

Definition at line 133 of file AnglesUtil.h.

References theta().

133  {
134  double dxyz1[3]={xyz1[0],xyz1[1],xyz1[2]};
135  double dxyz2[3]={xyz2[0],xyz2[1],xyz2[2]};
136  return theta(dxyz1,dxyz2);
137 }
Geom::Theta< T > theta() const
double kinem::theta ( double  etap)
inline

Definition at line 146 of file AnglesUtil.h.

References create_public_lumi_plots::exp.

147 {
148  return 2.0*atan(exp(-etap));
149 }
double kinem::theta_from_tanl ( double  tanl)
inline

Definition at line 222 of file AnglesUtil.h.

References PI.

222  {
223  return PI/2.0 - atan(tanl);
224 }
#define PI
void kinem::uvectors ( double  u[3],
double  xyz1[3],
double  xyz2[3] 
)
inline

Definition at line 189 of file AnglesUtil.h.

References alignCSCRings::s, and mathSSE::sqrt().

Referenced by uvectors().

189  {
190  double xdiff=xyz2[0]-xyz1[0];
191  double ydiff=xyz2[1]-xyz1[1];
192  double zdiff=xyz2[2]-xyz1[2];
193  double s=sqrt(xdiff*xdiff+ydiff*ydiff+zdiff*zdiff);
194  if(s > 0) {
195  u[0]=xdiff/s;
196  u[1]=ydiff/s;
197  u[2]=zdiff/s;
198  }else{
199  u[0]=0;
200  u[1]=0;
201  u[2]=0;
202  }
203 }
T sqrt(T t)
Definition: SSEVec.h:48
void kinem::uvectors ( float  u[3],
float  xyz1[3],
float  xyz2[3] 
)
inline

Definition at line 206 of file AnglesUtil.h.

References uvectors().

206  {
207  double du[3];
208  double dxyz1[3]={xyz1[0],xyz1[1],xyz1[2]};
209  double dxyz2[3]={xyz2[0],xyz2[1],xyz2[2]};
210  uvectors(du,dxyz1,dxyz2);
211  u[0]=du[0];
212  u[1]=du[1];
213  u[2]=du[2];
214 }
void uvectors(double u[3], double xyz1[3], double xyz2[3])
Definition: AnglesUtil.h:189
double kinem::y ( double  E,
double  pz 
)
inline

Definition at line 183 of file AnglesUtil.h.

References EPSILON, and cmsBatch::log.

184 {
185  return 0.5 * log ((E+pz+EPSILON)/(E-pz+EPSILON));
186 }
const float EPSILON
Definition: AnglesUtil.h:23
tuple log
Definition: cmsBatch.py:341

Variable Documentation

const float kinem::EPSILON =1.E-10

Definition at line 23 of file AnglesUtil.h.

Referenced by eta(), MSLayersAtAngle::findLayer(), and y().

const float kinem::ETA_LIMIT =15.0

Definition at line 22 of file AnglesUtil.h.

Referenced by eta().

const double kinem::PI =2.0*acos(0.)

Definition at line 20 of file AnglesUtil.h.

const double kinem::TWOPI =2.0*PI

Definition at line 21 of file AnglesUtil.h.

Referenced by delta_phi(), phi(), and signed_delta_phi().