CMS 3D CMS Logo

SiPixelTemplateReco2D.h
Go to the documentation of this file.
1 //
2 // SiPixelTemplateReco2D.cc (Version 2.60)
3 // Updated to work with the 2D template generation code
4 // 2.10 - Add y-lorentz drift to estimate starting point [for FPix]
5 // 2.10 - Remove >1 pixel requirement
6 // 2.20 - Fix major bug, change chi2 scan to 9x5 [YxX]
7 // 2.30 - Allow one pixel clusters, improve cosmetics for increased style points from judges
8 // 2.50 - Add variable cluster shifting to make the position parameter space more symmetric,
9 // also fix potential problems with variable size input clusters and double pixel flags
10 // 2.55 - Fix another double pixel flag problem and a small pseudopixel problem in the edgegflagy = 3 case.
11 // 2.60 - Modify the algorithm to return the point with the best chi2 from the starting point scan when
12 // the iterative procedure does not converge [eg 1 pixel clusters]
13 
14 //
15 //
16 // Created by Morris Swartz on 7/13/17.
17 //
18 //
19 
20 #ifndef SiPixelTemplateReco2D_h
21 #define SiPixelTemplateReco2D_h 1
22 
23 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
26 #else
27 #include "SiPixelTemplateDefs.h"
28 #include "SiPixelTemplate2D.h"
29 #endif
30 
31 #include <vector>
32 
33 #ifndef SiPixelTemplateClusMatrix2D
34 #define SiPixelTemplateClusMatrix2D 1
35 
37 
38  struct ClusMatrix {
39  float & operator()(int x, int y) { return matrix[mcol*x+y];}
40  float operator()(int x, int y) const { return matrix[mcol*x+y];}
41  float * matrix;
42  bool * xdouble;
43  bool * ydouble;
44  int mrow, mcol;
45  };
46 #endif
47 
48  int PixelTempReco3D(int id, float cotalpha, float cotbeta, float locBz, float locBx, int edgeflagy, int edgeflagx,
49  ClusMatrix & cluster, SiPixelTemplate2D& templ,
50  float& yrec, float& sigmay, float& xrec, float& sigmax, float& probxy, float& probQ, int& qbin, float& deltay, int& npixel);
51 
52  int PixelTempReco3D(int id, float cotalpha, float cotbeta, float locBz, float locBx, int edgeflagy, int edgeflagx,
53  ClusMatrix & cluster, SiPixelTemplate2D& templ,
54  float& yrec, float& sigmay, float& xrec, float& sigmax, float& probxy, float& probQ, int& qbin, float& deltay);
55 
56 
57 }
58 
59 #endif
float operator()(int x, int y) const
int PixelTempReco3D(int id, float cotalpha, float cotbeta, float locBz, float locBx, int edgeflagy, int edgeflagx, ClusMatrix &cluster, SiPixelTemplate2D &templ, float &yrec, float &sigmay, float &xrec, float &sigmax, float &probxy, float &probQ, int &qbin, float &deltay, int &npixel)