CMS 3D CMS Logo

PixelRecoUtilities.h
Go to the documentation of this file.
1 #ifndef PixelRecoUtilities_H
2 #define PixelRecoUtilities_H
6 #include <string>
7 
12 namespace PixelRecoUtilities {
13 
16  struct FieldAt0 {
17  FieldAt0(const edm::EventSetup& es);
19  };
20 
25  inline float fieldInInvGev(const edm::EventSetup& iSetup) {
26  static const FieldAt0 fieldAt0(iSetup);
27  return fieldAt0.fieldInInvGev;
28  }
29  // void MaginTesla(const edm::EventSetup& c);
33  template <typename T>
34  T bendingRadius(T pt, const edm::EventSetup& iSetup) {
35  return pt * fieldInInvGev(iSetup);
36  }
37 
41  template <typename T>
42  T curvature(T InversePt, const edm::EventSetup& iSetup) {
43  return InversePt / fieldInInvGev(iSetup);
44  }
45 
47  template <typename T>
49  return curvature * fieldInInvGev(iSetup);
50  }
51 
55  inline double longitudinalBendingCorrection(double radius, double pt, const edm::EventSetup& iSetup) {
56  double invCurv = bendingRadius(pt, iSetup);
57  if (invCurv == 0.)
58  return 0.;
59  return radius / 6. * radius * radius / (2. * invCurv * 2. * invCurv);
60  }
61 
62 } // namespace PixelRecoUtilities
63 
64 #endif
PixelRecoUtilities::fieldInInvGev
float fieldInInvGev(const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:25
ESHandle.h
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
PixelRecoUtilities::inversePt
T inversePt(T curvature, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:48
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
PixelRecoUtilities::FieldAt0::fieldInInvGev
float fieldInInvGev
Definition: PixelRecoUtilities.h:18
PixelRecoUtilities::FieldAt0::FieldAt0
FieldAt0(const edm::EventSetup &es)
Definition: PixelRecoUtilities.cc:9
PixelRecoUtilities::FieldAt0
Definition: PixelRecoUtilities.h:16
edm::EventSetup
Definition: EventSetup.h:58
PixelRecoUtilities
PixelRecoUtilities::longitudinalBendingCorrection
double longitudinalBendingCorrection(double radius, double pt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:55
T
long double T
Definition: Basic3DVectorLD.h:48
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
GlobalVector.h
EventSetup.h
PixelRecoUtilities::bendingRadius
T bendingRadius(T pt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:34