CMS 3D CMS Logo

SiPixelLorentzAngleCalibrationStruct.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiPixelLorentzAngle_SiPixelLorentzAngleCalibrationStruct_h
2 #define CalibTracker_SiPixelLorentzAngle_SiPixelLorentzAngleCalibrationStruct_h
3 
5 #include <unordered_map>
6 
8  static constexpr float cmToum = 10000.f;
9 
10  class Chebyshev {
11  public:
12  Chebyshev(int n, double xmin, double xmax) : fA(xmin), fB(xmax), fT(std::vector<double>(n + 1)) {}
13 
14  double operator()(const double* xx, const double* p) {
15  double x = (2.0 * xx[0] - fA - fB) / (fB - fA);
16  int npar = fT.size();
17 
18  if (npar == 1)
19  return p[0];
20  if (npar == 2)
21  return p[0] + x * p[1];
22  // build the polynomials
23  fT[0] = 1;
24  fT[1] = x;
25  for (int i = 2; i < npar; ++i) {
26  fT[i] = 2 * x * fT[i - 1] - fT[i - 2];
27  }
28  double sum = p[0] * fT[0];
29  for (int i = 1; i < npar; ++i) {
30  sum += p[i] * fT[i];
31  }
32  return sum;
33  }
34 
35  private:
36  double fA;
37  double fB;
38  std::vector<double> fT; // polynomial
39  std::vector<double> fC; // coefficients
40  };
41 } // namespace siPixelLACalibration
42 
44 public:
46 
47  using MonitorMap = std::unordered_map<uint32_t, dqm::reco::MonitorElement*>;
48 
49  int nlay;
50  std::vector<int> nModules_;
51  std::vector<int> nLadders_;
52  std::vector<std::string> BPixnewmodulename_;
53  std::vector<unsigned int> BPixnewDetIds_;
54  std::vector<int> BPixnewModule_;
55  std::vector<int> BPixnewLayer_;
56 
57  std::vector<std::string> FPixnewmodulename_;
58  std::vector<int> FPixnewDetIds_;
59  std::vector<int> FPixnewDisk_;
60  std::vector<int> FPixnewBlade_;
61  std::unordered_map<uint32_t, std::vector<uint32_t> > detIdsList;
62 
68 
69  // track monitoring
75 
76  // per-sector measurements
87 
88  // for fit quality
90 
91  // ouput LA maps
92  std::vector<dqm::reco::MonitorElement*> h2_byLayerLA_;
93  std::vector<dqm::reco::MonitorElement*> h2_byLayerDiff_;
94 
95  // FPix Minimal Cluster Size
96  static constexpr int nRings_ = 2;
97  static constexpr int nPanels_ = 2;
98  static constexpr int nSides_ = 2;
99  static constexpr int betaStartIdx_ = nRings_ * nPanels_ * nSides_;
100  static constexpr int nAngles_ = 2;
101 
105 
113 };
114 
115 #endif
std::vector< dqm::reco::MonitorElement * > h2_byLayerLA_
std::unordered_map< uint32_t, std::vector< uint32_t > > detIdsList
std::unordered_map< uint32_t, dqm::reco::MonitorElement * > MonitorMap
float x
double operator()(const double *xx, const double *p)
std::vector< dqm::reco::MonitorElement * > h2_byLayerDiff_