test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelRecoUtilities.h
Go to the documentation of this file.
1 #ifndef PixelRecoUtilities_H
2 #define PixelRecoUtilities_H
6 #include <string>
7 
13 namespace PixelRecoUtilities {
14 
17  struct FieldAt0 {
18  FieldAt0(const edm::EventSetup& es);
20  };
21 
26  inline float fieldInInvGev(const edm::EventSetup& iSetup) {
27  static const FieldAt0 fieldAt0(iSetup);
28  return fieldAt0.fieldInInvGev;
29  }
30  // void MaginTesla(const edm::EventSetup& c);
34  template <typename T>
35  T bendingRadius(T pt,const edm::EventSetup& iSetup) {return pt*fieldInInvGev(iSetup);}
36 
40  template <typename T>
41  T curvature(T InversePt,const edm::EventSetup& iSetup) {return InversePt/fieldInInvGev(iSetup);}
42 
44  template <typename T>
45  T inversePt (T curvature,const edm::EventSetup& iSetup) {return curvature*fieldInInvGev(iSetup);}
46 
47 
51  inline double longitudinalBendingCorrection( double radius, double pt,const edm::EventSetup& iSetup) {
52  double invCurv = bendingRadius(pt,iSetup);
53  if ( invCurv == 0. ) return 0.;
54  return radius/6. * radius*radius/(2.*invCurv * 2.*invCurv);
55  }
56 
57 
58 }
59 
60 #endif
T inversePt(T curvature, const edm::EventSetup &iSetup)
T curvature(T InversePt, const edm::EventSetup &iSetup)
double longitudinalBendingCorrection(double radius, double pt, const edm::EventSetup &iSetup)
T bendingRadius(T pt, const edm::EventSetup &iSetup)
FieldAt0(const edm::EventSetup &es)
float fieldInInvGev(const edm::EventSetup &iSetup)
long double T