CMS 3D CMS Logo

SiPixelGenError.h
Go to the documentation of this file.
1 //
2 // SiPixelGenError.h (v2.00)
3 //
4 // Object to contain Lorentz drift and error information for the Generic Algorithm
5 //
6 // Created by Morris Swartz on 1/10/2014.
7 //
8 // Update for Phase 1 FPix, M.S. 1/15/17
9 //
10 
11 // Build the template storage structure from several pieces
12 
13 #ifndef SiPixelGenError_h
14 #define SiPixelGenError_h 1
15 
16 
17 #include<vector>
18 #include<cassert>
19 
20 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
23 #endif
24 
26  int runnum;
27  float cotalpha;
28  float cotbeta;
29  float qavg;
30  float pixmax;
31  float dyone;
32  float syone;
33  float dxone;
34  float sxone;
35  float dytwo;
36  float sytwo;
37  float dxtwo;
38  float sxtwo;
39  float qmin;
40  float qmin2;
41  float yavggen[4];
42  float yrmsgen[4];
43  float xavggen[4];
44  float xrmsgen[4];
45 } ;
46 
47 
48 
49 
50 
52  int ID;
53  int NTy;
54  int NTyx;
55  int NTxx;
56  int Dtype;
57  float qscale;
58  float lorywidth;
59  float lorxwidth;
60  float lorybias;
61  float lorxbias;
62  float Vbias;
63  float temperature;
64  float fluence;
65  float s50;
66  float ss50;
67  char title[80];
69  float Bfield;
70  float fbin[3];
71  float xsize;
72  float ysize;
73  float zsize;
74 } ;
75 
76 
77 
80  float cotbetaY[60];
81  float cotbetaX[5];
82  float cotalphaX[29];
84  SiPixelGenErrorEntry entx[5][29];
85 } ;
86 
87 
88 // ******************************************************************************************
102 // ******************************************************************************************
104 public:
105  SiPixelGenError(const std::vector< SiPixelGenErrorStore > & thePixelTemp) : thePixelTemp_(thePixelTemp) { id_current_ = -1; index_id_ = -1;}
106 
107  static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > & thePixelTemp_); // load the private store with info from the
108  // file with the index (int) filenum
109 
110 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
111  static bool pushfile(const SiPixelGenErrorDBObject& dbobject, std::vector< SiPixelGenErrorStore > & thePixelTemp_); // load the private store with info from db
112 #endif
113 
114  // initialize the binary search information;
115  static void postInit(std::vector< SiPixelGenErrorStore > & thePixelTemp_);
116 
117 
118  // Interpolate input beta angle to estimate the average charge. return qbin flag for input cluster charge, and estimate y/x errors and biases for the Generic Algorithm.
119  int qbin(int id, float cotalpha, float cotbeta, float locBz, float locBx, float qclus, float& pixmx, float& sigmay, float& deltay, float& sigmax, float& deltax,
120  float& sy1, float& dy1, float& sy2, float& dy2, float& sx1, float& dx1, float& sx2, float& dx2);
121  // Overloaded method to provide only the LA parameters
122  int qbin(int id);
123 
124  float lorywidth() {return lorywidth_;}
125  float lorxwidth() {return lorxwidth_;}
126  float lorybias() {return lorybias_;}
127  float lorxbias() {return lorxbias_;}
128 
129  float fbin(int i) {
130 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
131  if(i < 0 || i > 2) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xminc2m called with illegal index = " << i << std::endl;}
132 #else
133  assert(i>=0 && i<3);
134 #endif
135  return fbin_[i];}
136  float xsize() {return xsize_;}
137  float ysize() {return ysize_;}
138  float zsize() {return zsize_;}
139 
140 private:
141 
142  // Keep current template interpolaion parameters
143 
145  int index_id_;
146 
147 
148  // Keep results of last interpolation to return through member functions
149 
150  float lorxwidth_;
151  float lorywidth_;
152  float lorxbias_;
153  float lorybias_;
154  float fbin_[3];
155  float xsize_;
156  float ysize_;
157  float zsize_;
158 
159 
160  // The actual template store is a std::vector container
161 
162  const std::vector< SiPixelGenErrorStore > & thePixelTemp_;
163 } ;
164 
165 
166 #endif
float xsize_
Pixel x-size.
float qavg
average cluster charge for this set of track angles (now includes threshold effects) ...
float ss50
1/2 of the single hit dcol threshold in electrons
float qmin
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float lorxbias_
Lorentz x-width.
float Bfield
Bfield in Tesla.
float lorywidth_
Lorentz y-width (sign corrected for fpix frame)
int runnum
< Basic template entry corresponding to a single set of track angles
float yrmsgen[4]
generic algorithm: average y-rms of reconstruction binned in 4 charge bins
float dxone
mean offset/correction for one pixel x-clusters
float Vbias
detector bias potential in Volts
float xrmsgen[4]
generic algorithm: average x-rms of reconstruction binned in 4 charge bins
int NTxx
number of Template x-entries in each slice
float syone
rms for one pixel y-clusters
float ysize_
Pixel y-size.
float zsize
pixel size (for future use in upgraded geometry)
float s50
1/2 of the multihit dcol threshold in electrons
float cotalpha
cot(alpha) is proportional to cluster length in x and is basis of interpolation
float ysize()
pixel y-size (microns)
float lorxbias
estimate of x-lorentz bias
float fbin(int i)
Return lower bound of Qbin definition.
float temperature
detector temperature in deg K
float xsize
pixel size (for future use in upgraded geometry)
int templ_version
Version number of the template to ensure code compatibility.
float cotbeta
cot(beta) is proportional to cluster length in y and is basis of interpolation
int ID
< template header structure
float sxone
rms for one pixel x-clusters
float fluence
radiation fluence in n_eq/cm^2
float dytwo
mean offset/correction for one double-pixel y-clusters
float zsize_
Pixel z-size (thickness)
float lorxwidth()
signed lorentz x-width (microns)
float xsize()
pixel x-size (microns)
int NTy
number of Template y entries
float qscale
Charge scaling to match cmssw and pixelav.
float dxtwo
mean offset/correction for one double-pixel x-clusters
SiPixelGenErrorHeader head
< template storage structure
float lorxwidth_
Lorentz x-width.
float ysize
pixel size (for future use in upgraded geometry)
float sytwo
rms for one double-pixel y-clusters
float lorywidth
estimate of y-lorentz width for optimal resolution
float yavggen[4]
generic algorithm: average y-bias of reconstruction binned in 4 charge bins
float dyone
mean offset/correction for one pixel y-clusters
int id_current_
current id
const std::vector< SiPixelGenErrorStore > & thePixelTemp_
float lorywidth()
signed lorentz y-width (microns)
SiPixelGenError(const std::vector< SiPixelGenErrorStore > &thePixelTemp)
Constructor for cases in which template store already exists.
float lorxbias()
signed lorentz x-bias (microns)
float zsize()
pixel z-size or thickness (microns)
int Dtype
detector type (0=BPix, 1=FPix)
int NTyx
number of Template y-slices of x entries
float lorybias_
Lorentz y-width (sign corrected for fpix frame)
float xavggen[4]
generic algorithm: average x-bias of reconstruction binned in 4 charge bins
float pixmax
maximum charge for individual pixels in cluster
float sxtwo
rms for one double-pixel x-clusters
int index_id_
current index
float lorybias()
signed lorentz y-bias (microns)
float lorybias
estimate of y-lorentz bias
float lorxwidth
estimate of x-lorentz width for optimal resolution