Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:06

0001 //
0002 //  SiPixelTemplateReco2D.cc (Version 2.60)
0003 //  Updated to work with the 2D template generation code
0004 //  2.10 - Add y-lorentz drift to estimate starting point [for FPix]
0005 //  2.10 - Remove >1 pixel requirement
0006 //  2.20 - Fix major bug, change chi2 scan to 9x5 [YxX]
0007 //  2.30 - Allow one pixel clusters, improve cosmetics for increased style points from judges
0008 //  2.50 - Add variable cluster shifting to make the position parameter space more symmetric,
0009 //         also fix potential problems with variable size input clusters and double pixel flags
0010 //  2.55 - Fix another double pixel flag problem and a small pseudopixel problem in the edgegflagy = 3 case.
0011 //  2.60 - Modify the algorithm to return the point with the best chi2 from the starting point scan when
0012 //         the iterative procedure does not converge [eg 1 pixel clusters]
0013 
0014 //
0015 //
0016 //  Created by Morris Swartz on 7/13/17.
0017 //
0018 //
0019 
0020 #ifndef SiPixelTemplateReco2D_h
0021 #define SiPixelTemplateReco2D_h 1
0022 
0023 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
0024 #include "CondFormats/SiPixelTransient/interface/SiPixelTemplateDefs.h"
0025 #include "CondFormats/SiPixelTransient/interface/SiPixelTemplate2D.h"
0026 #else
0027 #include "SiPixelTemplateDefs.h"
0028 #include "SiPixelTemplate2D.h"
0029 #endif
0030 
0031 #include <vector>
0032 
0033 #ifndef SiPixelTemplateClusMatrix2D
0034 #define SiPixelTemplateClusMatrix2D 1
0035 
0036 namespace SiPixelTemplateReco2D {
0037 
0038   struct ClusMatrix {
0039     float& operator()(int x, int y) { return matrix[mcol * x + y]; }
0040     float operator()(int x, int y) const { return matrix[mcol * x + y]; }
0041     float* matrix;
0042     bool* xdouble;
0043     bool* ydouble;
0044     int mrow, mcol;
0045   };
0046 #endif
0047 
0048   int PixelTempReco2D(int id,
0049                       float cotalpha,
0050                       float cotbeta,
0051                       float locBz,
0052                       float locBx,
0053                       int edgeflagy,
0054                       int edgeflagx,
0055                       ClusMatrix& cluster,
0056                       SiPixelTemplate2D& templ,
0057                       float& yrec,
0058                       float& sigmay,
0059                       float& xrec,
0060                       float& sigmax,
0061                       float& probxy,
0062                       float& probQ,
0063                       int& qbin,
0064                       float& deltay,
0065                       int& npixel);
0066 
0067   int PixelTempReco2D(int id,
0068                       float cotalpha,
0069                       float cotbeta,
0070                       float locBz,
0071                       float locBx,
0072                       int edgeflagy,
0073                       int edgeflagx,
0074                       ClusMatrix& cluster,
0075                       SiPixelTemplate2D& templ,
0076                       float& yrec,
0077                       float& sigmay,
0078                       float& xrec,
0079                       float& sigmax,
0080                       float& probxy,
0081                       float& probQ,
0082                       int& qbin,
0083                       float& deltay);
0084 }
0085 
0086 #endif