CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelTemplateSplit.h
Go to the documentation of this file.
1 //
2 // SiPixelTemplateSplit.cc (Version 2.30)
3 //
4 // Procedure to fit two templates (same angle hypotheses) to a single cluster
5 // Return two x- and two y-coordinates for the cluster
6 //
7 // Created by Morris Swartz on 04/10/08.
8 //
9 // Incorporate "cluster repair" to handle dead pixels
10 // Take truncation size from new pixmax information
11 // Change to allow template sizes to be changed at compile time
12 // Move interpolation range error to LogDebug
13 // Add q2bin = 5 and change 1-pixel probability to use new template info
14 // Add floor for probabilities (no exact zeros)
15 // Add ambiguity resolution with crude 2-D templates (v2.00)
16 // Pass all containers by alias to prevent excessive cpu-usage (v2.01)
17 // Add ambiguity resolution with fancy 2-D templates (v2.10)
18 // Make small change to indices for ambiguity resolution (v2.11)
19 // Tune x and y errors separately (v2.12)
20 // Use template cytemp/cxtemp methods to center the data cluster in the right place when the templates become asymmetric after irradiation (v2.20)
21 // Add charge probability to the splitter [tests consistency with a two-hit merged cluster hypothesis] (v2.20)
22 // Improve likelihood normalization slightly (v2.21)
23 // Replace hardwired pixel size derived errors with ones from templated pixel sizes (v2.22)
24 // Add shape and charge probabilities for the merged cluster hypothesis (v2.23)
25 // Incorporate VI-like speed improvements (v2.25)
26 // Improve speed by eliminating the triple index boost::multiarray objects and add speed switch to optimize the algorithm (v2.30)
27 //
28 
29 #ifndef SiPixelTemplateSplit_h
30 #define SiPixelTemplateSplit_h 1
31 
32 #include "SiPixelTemplateDefs.h"
33 
34 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
37 #else
38 #include "SiPixelTemplate.h"
39 #include "SiPixelTemplate2D.h"
40 #endif
41 
42 #include <vector>
43 #include "boost/multi_array.hpp"
44 
45 
46 
47 namespace SiPixelTemplateSplit
48  {
49 
50  typedef boost::multi_array<float, 2> array_2d;
51  typedef boost::multi_array<bool, 2> array_2d_bool;
52  typedef boost::multi_array<float, 3> array_3d;
53 
54 
55 
56  int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d& cluster,
57  std::vector<bool>& ydouble, std::vector<bool>& xdouble,
58  SiPixelTemplate& templ,
59  float& yrec1, float& yrec2, float& sigmay, float& prob2y,
60  float& xrec1, float& xrec2, float& sigmax, float& prob2x, int& q2bin, float& prob2Q, bool resolve, int speed, float& dchisq, bool deadpix,
61  std::vector<std::pair<int, int> >& zeropix, SiPixelTemplate2D& templ2D);
62 
63  int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d& cluster,
64  std::vector<bool>& ydouble, std::vector<bool>& xdouble,
65  SiPixelTemplate& templ,
66  float& yrec1, float& yrec2, float& sigmay, float& prob2y,
67  float& xrec1, float& xrec2, float& sigmax, float& prob2x, int& q2bin, float& prob2Q, bool resolve, int speed, float& dchisq, SiPixelTemplate2D& templ2D);
68 
69  int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d& cluster,
70  std::vector<bool>& ydouble, std::vector<bool>& xdouble,
71  SiPixelTemplate& templ,
72  float& yrec1, float& yrec2, float& sigmay, float& prob2y,
73  float& xrec1, float& xrec2, float& sigmax, float& prob2x, int& q2bin, float& prob2Q, bool resolve, float& dchisq, SiPixelTemplate2D& templ2D);
74 
75  int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d& cluster,
76  std::vector<bool>& ydouble, std::vector<bool>& xdouble,
77  SiPixelTemplate& templ,
78  float& yrec1, float& yrec2, float& sigmay, float& prob2y,
79  float& xrec1, float& xrec2, float& sigmax, float& prob2x, int& q2bin, float& prob2Q, SiPixelTemplate2D& templ2D);
80 
81  int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d& cluster,
82  std::vector<bool>& ydouble, std::vector<bool>& xdouble,
83  SiPixelTemplate& templ,
84  float& yrec1, float& yrec2, float& sigmay, float& prob2y,
85  float& xrec1, float& xrec2, float& sigmax, float& prob2x, int& q2bin, SiPixelTemplate2D& templ2D);
86 
87 }
88 
89 #endif
boost::multi_array< float, 3 > array_3d
int PixelTempSplit(int id, float cotalpha, float cotbeta, array_2d &cluster, std::vector< bool > &ydouble, std::vector< bool > &xdouble, SiPixelTemplate &templ, float &yrec1, float &yrec2, float &sigmay, float &prob2y, float &xrec1, float &xrec2, float &sigmax, float &prob2x, int &q2bin, float &prob2Q, bool resolve, int speed, float &dchisq, bool deadpix, std::vector< std::pair< int, int > > &zeropix, SiPixelTemplate2D &templ2D)
boost::multi_array< bool, 2 > array_2d_bool
boost::multi_array< float, 2 > array_2d