CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
36 namespace SiPixelTemplateReco2D {
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 PixelTempReco2D(int id,
49  float cotalpha,
50  float cotbeta,
51  float locBz,
52  float locBx,
53  int edgeflagy,
54  int edgeflagx,
55  ClusMatrix& cluster,
56  SiPixelTemplate2D& templ,
57  float& yrec,
58  float& sigmay,
59  float& xrec,
60  float& sigmax,
61  float& probxy,
62  float& probQ,
63  int& qbin,
64  float& deltay,
65  int& npixel);
66 
67  int PixelTempReco2D(int id,
68  float cotalpha,
69  float cotbeta,
70  float locBz,
71  float locBx,
72  int edgeflagy,
73  int edgeflagx,
74  ClusMatrix& cluster,
75  SiPixelTemplate2D& templ,
76  float& yrec,
77  float& sigmay,
78  float& xrec,
79  float& sigmax,
80  float& probxy,
81  float& probQ,
82  int& qbin,
83  float& deltay);
84 }
85 
86 #endif
float operator()(int x, int y) const
int PixelTempReco2D(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)