CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelTemplate.h
Go to the documentation of this file.
1 //
2 // SiPixelTemplate.h (v8.13)
3 //
4 // Add goodness-of-fit info and spare entries to templates, version number in template header, more error checking
5 // Add correction for (Q_F-Q_L)/(Q_F+Q_L) bias
6 // Add cot(beta) reflection to reduce y-entries and more sophisticated x-interpolation
7 // Fix small index searching bug in interpolate method
8 // Change interpolation indexing to avoid complier complaining about possible un-initialized variables
9 // Replace containers with static arrays in calls to ysigma2 and xsigma2
10 // Add external threshold to calls to ysigma2 and xsigma2, fix parameter signal max for xsigma2
11 // Return to 5 pixel spanning but adjust boundaries to use only when needed
12 // Implement improved (faster) chi2min search that depends on pixel types
13 // Fill template arrays in single calls to this object
14 // Add qmin to the template
15 // Add qscale to match charge scales
16 // Small improvement to x-chisquare interpolation
17 // Enlarge SiPixelTemplateStore to accommodate larger templates and increased alpha acceptance (reduce PT threshold to ~200 MeV)
18 // Store x and y cluster sizes in fractional pixels to facilitate cluster splitting
19 // Keep interpolated central 9 template bins in private storage and expand/shift in the getter functions (faster for speed=2/3) and easier to build 3d templates
20 // Store error and bias information for the simple chi^2 min position analysis (no interpolation or Q_{FB} corrections) to use in cluster splitting
21 // To save time, the gaussian centers and sigma are not interpolated right now (they aren't currently used). They can be restored by un-commenting lines in the interpolate method.
22 // Add a new method to calculate qbin for input cotbeta and cluster charge. To be used for error estimation of merged clusters in PixelCPEGeneric.
23 // Add bias info for Barrel and FPix separately in the header
24 // Improve the charge estimation for larger cot(alpha) tracks
25 // Change interpolate method to return false boolean if track angles are outside of range
26 // Add template info and method for truncation information
27 // Change to allow template sizes to be changed at compile time
28 // Fix bug in track angle checking
29 // Accommodate Dave's new DB pushfile which overloads the old method (file input)
30 // Add CPEGeneric error information and expand qbin method to access useful info for PixelCPEGeneric
31 // Fix large cot(alpha) bug in qmin interpolation
32 // Add second qmin to allow a qbin=5 state
33 // Use interpolated chi^2 info for one-pixel clusters
34 // Separate BPix and FPix charge scales and thresholds
35 // Fix DB pushfile version number checking bug.
36 // Remove assert from qbin method
37 // Replace asserts with exceptions in CMSSW
38 // Change calling sequence to interpolate method to handle cot(beta)<0 for FPix cosmics
39 // Add getter for pixelav Lorentz width estimates to qbin method
40 // Add check on template size to interpolate and qbin methods
41 // Add qbin population information, charge distribution information
42 //
43 // V7.00 - Decouple BPix and FPix information into separate templates
44 // Add methods to facilitate improved cluster splitting
45 // Fix small charge scaling bug (affects FPix only)
46 // Change y-slice used for the x-template to be closer to the actual cotalpha-cotbeta point
47 // (there is some weak breakdown of x-y factorization in the FPix after irradiation)
48 //
49 // V8.00 - Add method to calculate a simple 2D template
50 // Reorganize the interpolate method to extract header info only once per ID
51 // V8.01 - Improve simple template normalization
52 // V8.05 - Change qbin normalization to work better after irradiation
53 // V8.10 - Add Vavilov distribution interpolation
54 // V8.11 - Renormalize the x-templates for Guofan's cluster size calculation
55 // V8.12 - Technical fix to qavg issue.
56 // V8.13 - Fix qbin and fastsim interpolaters to avoid changing class variables
57 //
58 // Created by Morris Swartz on 10/27/06.
59 // Copyright 2006 __TheJohnsHopkinsUniversity__. All rights reserved.
60 //
61 //
62 
63 // Build the template storage structure from several pieces
64 
65 #ifndef SiPixelTemplate_h
66 #define SiPixelTemplate_h 1
67 
68 #include "SiPixelTemplateDefs.h"
69 
70 #include<vector>
71 #include<cassert>
72 #include "boost/multi_array.hpp"
73 
74 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
77 #endif
78 
79 typedef boost::multi_array<float, 3> array_3d;
80 
82  int runnum;
83  float alpha;
84  float cotalpha;
85  float beta;
86  float cotbeta;
87  float costrk[3];
88  float qavg;
89  float pixmax;
90  float symax;
91  float dyone;
92  float syone;
93  float sxmax;
94  float dxone;
95  float sxone;
96  float dytwo;
97  float sytwo;
98  float dxtwo;
99  float sxtwo;
100  float qmin;
101  float qmin2;
102  float clsleny;
103  float clslenx;
104  float mpvvav;
105  float sigmavav;
106  float kappavav;
107  float ypar[2][5];
108  float ytemp[9][TYSIZE];
109  float xpar[2][5];
110  float xtemp[9][TXSIZE];
111  float yavg[4];
112  float yrms[4];
113  float ygx0[4];
114  float ygsig[4];
115  float yflpar[4][6];
116  float xavg[4];
117  float xrms[4];
118  float xgx0[4];
119  float xgsig[4];
120  float xflpar[4][6];
121  float chi2yavg[4];
122  float chi2ymin[4];
123  float chi2xavg[4];
124  float chi2xmin[4];
125  float chi2yavgone;
126  float chi2yminone;
127  float chi2xavgone;
128  float chi2xminone;
129  float yavgc2m[4];
130  float yrmsc2m[4];
131  float ygx0c2m[4];
132  float ygsigc2m[4];
133  float xavgc2m[4];
134  float xrmsc2m[4];
135  float xgx0c2m[4];
136  float xgsigc2m[4];
137  float yavggen[4];
138  float yrmsgen[4];
139  float ygx0gen[4];
140  float ygsiggen[4];
141  float xavggen[4];
142  float xrmsgen[4];
143  float xgx0gen[4];
144  float xgsiggen[4];
145  float qbfrac[3];
146  float fracyone;
147  float fracxone;
148  float fracytwo;
149  float fracxtwo;
150  float qavg_avg;
151  float qavg_spare;
152  float spare[4];
153 } ;
154 
155 
156 
157 
159  char title[80];
160  int ID;
162  float Bfield;
163  int NTy;
164  int NTyx;
165  int NTxx;
166  int Dtype;
167  float Vbias;
168  float temperature;
169  float fluence;
170  float qscale;
171  float s50;
172  float lorywidth;
173  float lorxwidth;
174  float xsize;
175  float ysize;
176  float zsize;
177 } ;
178 
179 
180 
185 } ;
186 
187 
188 // ******************************************************************************************
206 // ******************************************************************************************
208  public:
210  bool pushfile(int filenum); // load the private store with info from the
211  // file with the index (int) filenum
212 
213 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
214  bool pushfile(const SiPixelTemplateDBObject& dbobject); // load the private store with info from db
215 #endif
216 
217 
218 // Interpolate input alpha and beta angles to produce a working template for each individual hit.
219  bool interpolate(int id, float cotalpha, float cotbeta, float locBz);
220 
221 // overload for compatibility.
222  bool interpolate(int id, float cotalpha, float cotbeta);
223 
224 // retreive interpolated templates.
225  void ytemp(int fybin, int lybin, float ytemplate[41][BYSIZE]);
226 
227  void xtemp(int fxbin, int lxbin, float xtemplate[41][BXSIZE]);
228 
229 // new methods to build templates from two interpolated clusters (for splitting)
230  void ytemp3d(int nypix, array_3d& ytemplate);
231 
232  void xtemp3d(int nxpix, array_3d& xtemplate);
233 
234 // Convert vector of projected signals into uncertainties for fitting.
235  void ysigma2(int fypix, int lypix, float sythr, float ysum[BYSIZE], float ysig2[BYSIZE]);
236 
237  void ysigma2(float qpixel, int index, float& ysig2);
238 
239  void xsigma2(int fxpix, int lxpix, float sxthr, float xsum[BXSIZE], float xsig2[BXSIZE]);
240 
241 // Interpolate qfl correction in y.
242  float yflcorr(int binq, float qfly);
243 
244 // Interpolate qfl correction in x.
245  float xflcorr(int binq, float qflx);
246 
247 // 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.
248  int qbin(int id, float cotalpha, float cotbeta, float locBz, float qclus, float& pixmx, float& sigmay, float& deltay, float& sigmax, float& deltax,
249  float& sy1, float& dy1, float& sy2, float& dy2, float& sx1, float& dx1, float& sx2, float& dx2, float& lorywidth, float& lorxwidth);
250 
251 // Overload for backward compatibility.
252  int qbin(int id, float cotalpha, float cotbeta, float locBz, float qclus, float& pixmx, float& sigmay, float& deltay, float& sigmax, float& deltax,
253  float& sy1, float& dy1, float& sy2, float& dy2, float& sx1, float& dx1, float& sx2, float& dx2);
254 
255 // Overload to keep legacy interface
256  int qbin(int id, float cotbeta, float qclus);
257 
258 // Method to return template errors for fastsim
259  void temperrors(int id, float cotalpha, float cotbeta, int qBin, float& sigmay, float& sigmax, float& sy1, float& sy2, float& sx1, float& sx2);
260 
261 //Method to return qbin and size probabilities for fastsim
262  void qbin_dist(int id, float cotalpha, float cotbeta, float qbin_frac[4], float& ny1_frac, float& ny2_frac, float& nx1_frac, float& nx2_frac);
263 
264 //Method to calculate simple 2D templates
265  bool simpletemplate2D(float xhitp, float yhitp, std::vector<bool>& ydouble, std::vector<bool>& xdouble, float template2d[BXM2][BYM2]);
266 
267 //Method to interpolate Vavilov distribution parameters
268  void vavilov_pars(double& mpv, double& sigma, double& kappa);
269 
270 
271  float qavg() {return pqavg;}
272  float pixmax() {return ppixmax;}
273  float qscale() {return pqscale;}
274  float s50() {return ps50;}
275  float symax() {return psymax;}
276  float dyone() {return pdyone;}
277  float syone() {return psyone;}
278  float dytwo() {return pdytwo;}
279  float sytwo() {return psytwo;}
280  float sxmax() {return psxmax;}
281  float dxone() {return pdxone;}
282  float sxone() {return psxone;}
283  float dxtwo() {return pdxtwo;}
284  float sxtwo() {return psxtwo;}
285  float qmin() {return pqmin;}
286  float qmin(int i) {
287 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
288  if(i < 0 || i > 1) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::qmin called with illegal index = " << i << std::endl;}
289 #else
290  assert(i>=0 && i<2);
291 #endif
292  if(i==0){return pqmin;}else{return pqmin2;}}
293  float clsleny() {return pclsleny;}
294  float clslenx() {return pclslenx;}
295  float yratio() {return pyratio;}
296  float yxratio() {return pyxratio;}
297  float xxratio() {return pxxratio;}
298  float yavg(int i) {
299 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
300  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yavg called with illegal index = " << i << std::endl;}
301 #else
302  assert(i>=0 && i<4);
303 #endif
304  return pyavg[i];}
305  float yrms(int i) {
306 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
307  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yrms called with illegal index = " << i << std::endl;}
308 #else
309  assert(i>=0 && i<4);
310 #endif
311  return pyrms[i];}
312  float ygx0(int i) {
313 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
314  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::ygx0 called with illegal index = " << i << std::endl;}
315 #else
316  assert(i>=0 && i<4);
317 #endif
318  return pygx0[i];}
319  float ygsig(int i) {
320 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
321  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::ygsig called with illegal index = " << i << std::endl;}
322 #else
323  assert(i>=0 && i<4);
324 #endif
325  return pygsig[i];}
326  float xavg(int i) {
327 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
328  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xavg called with illegal index = " << i << std::endl;}
329 #else
330  assert(i>=0 && i<4);
331 #endif
332  return pxavg[i];}
333  float xrms(int i) {
334 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
335  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xrms called with illegal index = " << i << std::endl;}
336 #else
337  assert(i>=0 && i<4);
338 #endif
339  return pxrms[i];}
340  float xgx0(int i) {
341 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
342  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xgx0 called with illegal index = " << i << std::endl;}
343 #else
344  assert(i>=0 && i<4);
345 #endif
346  return pxgx0[i];}
347  float xgsig(int i) {
348 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
349  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xgsig called with illegal index = " << i << std::endl;}
350 #else
351  assert(i>=0 && i<4);
352 #endif
353  return pxgsig[i];}
354  float chi2yavg(int i) {
355 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
356  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2yavg called with illegal index = " << i << std::endl;}
357 #else
358  assert(i>=0 && i<4);
359 #endif
360  return pchi2yavg[i];}
361  float chi2ymin(int i) {
362 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
363  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2ymin called with illegal index = " << i << std::endl;}
364 #else
365  assert(i>=0 && i<4);
366 #endif
367  return pchi2ymin[i];}
368  float chi2xavg(int i) {
369 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
370  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xavg called with illegal index = " << i << std::endl;}
371 #else
372  assert(i>=0 && i<4);
373 #endif
374  return pchi2xavg[i];}
375  float chi2xmin(int i) {
376 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
377  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xmin called with illegal index = " << i << std::endl;}
378 #else
379  assert(i>=0 && i<4);
380 #endif
381  return pchi2xmin[i];}
382  float yavgc2m(int i) {
383 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
384  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yavgc2m called with illegal index = " << i << std::endl;}
385 #else
386  assert(i>=0 && i<4);
387 #endif
388  return pyavgc2m[i];}
389  float yrmsc2m(int i) {
390 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
391  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yrmsc2m called with illegal index = " << i << std::endl;}
392 #else
393  assert(i>=0 && i<4);
394 #endif
395  return pyrmsc2m[i];}
396  float ygx0c2m(int i) {
397 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
398  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::ygx0c2m called with illegal index = " << i << std::endl;}
399 #else
400  assert(i>=0 && i<4);
401 #endif
402  return pygx0c2m[i];}
403  float ygsigc2m(int i) {
404 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
405  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::ygsigc2m called with illegal index = " << i << std::endl;}
406 #else
407  assert(i>=0 && i<4);
408 #endif
409  return pygsigc2m[i];}
410  float xavgc2m(int i) {
411 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
412  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xavgc2m called with illegal index = " << i << std::endl;}
413 #else
414  assert(i>=0 && i<4);
415 #endif
416  return pxavgc2m[i];}
417  float xrmsc2m(int i) {
418 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
419  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xrmsc2m called with illegal index = " << i << std::endl;}
420 #else
421  assert(i>=0 && i<4);
422 #endif
423  return pxrmsc2m[i];}
424  float xgx0c2m(int i) {
425 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
426  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xgx0cm2 called with illegal index = " << i << std::endl;}
427 #else
428  assert(i>=0 && i<4);
429 #endif
430  return pxgx0c2m[i];}
431  float xgsigc2m(int i) {
432 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
433  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xgsigc2m called with illegal index = " << i << std::endl;}
434 #else
435  assert(i>=0 && i<4);
436 #endif
437  return pxgsigc2m[i];}
438  float chi2yavgone() {return pchi2yavgone;}
439  float chi2yminone() {return pchi2yminone;}
440  float chi2xavgone() {return pchi2xavgone;}
441  float chi2xminone() {return pchi2xminone;}
442  float lorywidth() {return plorywidth;}
443  float lorxwidth() {return plorxwidth;}
444  float mpvvav() {return pmpvvav;}
445  float sigmavav() {return psigmavav;}
446  float kappavav() {return pkappavav;}
447  float xsize() {return pxsize;}
448  float ysize() {return pysize;}
449  float zsize() {return pzsize;}
450 // float yspare(int i) {assert(i>=0 && i<5); return pyspare[i];} //!< vector of 5 spares interpolated in beta only
451 // float xspare(int i) {assert(i>=0 && i<10); return pxspare[i];} //!< vector of 10 spares interpolated in alpha and beta
452 
453 
454  private:
455 
456  // Keep current template interpolaion parameters
457 
459  int index_id;
460  float cota_current;
461  float cotb_current;
462  float abs_cotb;
463  bool success;
464 
465 
466  // Keep results of last interpolation to return through member functions
467 
468  float pqavg;
469  float ppixmax;
470  float pqscale;
471  float ps50;
472  float psymax;
473  float psyparmax;
474  float pdyone;
475  float psyone;
476  float pdytwo;
477  float psytwo;
478  float psxmax;
479  float psxparmax;
480  float pdxone;
481  float psxone;
482  float pdxtwo;
483  float psxtwo;
484  float pqmin;
485  float pclsleny;
486  float pclslenx;
487  float pyratio;
488  float pyparl[2][5];
489  float pyparh[2][5];
490  float pxparly0[2][5];
491  float pxparhy0[2][5];
492  float pytemp[9][BYSIZE];
493  float pyxratio;
494  float pxxratio;
495  float pxpar0[2][5];
496  float pxparl[2][5];
497  float pxparh[2][5];
498  float pxtemp[9][BXSIZE];
499  float pyavg[4];
500  float pyrms[4];
501  float pygx0[4];
502  float pygsig[4];
503  float pyflparl[4][6];
504  float pyflparh[4][6];
505  float pxavg[4];
506  float pxrms[4];
507  float pxgx0[4];
508  float pxgsig[4];
509  float pxflparll[4][6];
510  float pxflparlh[4][6];
511  float pxflparhl[4][6];
512  float pxflparhh[4][6];
513  float pchi2yavg[4];
514  float pchi2ymin[4];
515  float pchi2xavg[4];
516  float pchi2xmin[4];
517  float pyavgc2m[4];
518  float pyrmsc2m[4];
519  float pygx0c2m[4];
520  float pygsigc2m[4];
521  float pxavgc2m[4];
522  float pxrmsc2m[4];
523  float pxgx0c2m[4];
524  float pxgsigc2m[4];
525  float pchi2yavgone;
526  float pchi2yminone;
527  float pchi2xavgone;
528  float pchi2xminone;
529  float pqmin2;
530  float pmpvvav;
531  float psigmavav;
532  float pkappavav;
533  float plorywidth;
534  float plorxwidth;
535  float pxsize;
536  float pysize;
537  float pzsize;
538  float pqavg_avg;
539 
540 
541  // The actual template store is a std::vector container
542 
543  std::vector< SiPixelTemplateStore > thePixelTemp;
544 } ;
545 
546 
547 #endif
float yrmsc2m(int i)
1st pass chi2 min search: average y-rms of reconstruction binned in 4 charge bins ...
float pchi2yavgone
average y chi^2 for 1 pixel clusters
float qavg_avg
average cluster charge of clusters that are less than qavg (normalize 2-D simple templates) ...
int runnum
&lt; Basic template entry corresponding to a single set of track angles
float pyflparh[4][6]
Aqfl-parameterized y-correction in 4 charge bins for larger cotbeta.
float xflpar[4][6]
Aqfl-parameterized x-correction in 4 charge bins.
int i
Definition: DBlmapReader.cc:9
float pxgx0[4]
average x0 from Gaussian fit binned in 4 charge bins
float xrms[4]
average x-rms of reconstruction binned in 4 charge bins
bool success
true if cotalpha, cotbeta are inside of the acceptance (dynamically loaded)
#define BXSIZE
float clslenx
cluster x-length in pixels at signal height sxmax/2
float chi2xminone()
//!&lt; minimum of x chi^2 for 1 pixel clusters
float pdxtwo
mean offset/correction for one double-pixel x-clusters
int qbin(int id, float cotalpha, float cotbeta, float locBz, float qclus, float &pixmx, float &sigmay, float &deltay, float &sigmax, float &deltax, float &sy1, float &dy1, float &sy2, float &dy2, float &sx1, float &dx1, float &sx2, float &dx2, float &lorywidth, float &lorxwidth)
float xtemp[9][TXSIZE]
templates for x-reconstruction (binned over 1 central pixel)
float pygsigc2m[4]
1st pass chi2 min search: average sigma_y from Gaussian fit binned in 4 charge bins ...
float qavg
average cluster charge for this set of track angles (now includes threshold effects) ...
std::vector< SiPixelTemplateStore > thePixelTemp
void ytemp3d(int nypix, array_3d &ytemplate)
float xgx0c2m(int i)
1st pass chi2 min search: average x0 from Gaussian fit binned in 4 charge bins
float syone
rms for one pixel y-clusters
float chi2yavgone
average y chi^2 for 1 pixel clusters
float pxparhy0[2][5]
projected x-pixel uncertainty parameterization for larger cotbeta (central alpha) ...
float symax()
average pixel signal for y-projection of cluster
float psigmavav
&quot;sigma&quot; scale fctor for Vavilov distribution
float yavg(int i)
average y-bias of reconstruction binned in 4 charge bins
float dyone
mean offset/correction for one pixel y-clusters
#define BYSIZE
float psxmax
average pixel signal for x-projection of cluster
float sigmavav
&quot;sigma&quot; scale fctor for Vavilov distribution
float fracxtwo
fraction of double pixel sample with xsize = 1
float yavggen[4]
generic algorithm: average y-bias of reconstruction binned in 4 charge bins
float sxmax
average pixel signal for x-projection of cluster
float pxrmsc2m[4]
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
float xavgc2m[4]
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
#define TXSIZE
float pqscale
charge scaling factor
float pxparl[2][5]
projected x-pixel uncertainty parameterization for smaller cotalpha
float chi2xavgone
average x chi^2 for 1 pixel clusters
float fracytwo
fraction of double pixel sample with ysize = 1
float yrms[4]
average y-rms of reconstruction binned in 4 charge bins
float chi2xmin(int i)
minimum y chi^2 in 4 charge bins
int NTxx
number of Template x-entries in each slice
float ytemp[9][TYSIZE]
templates for y-reconstruction (binned over 1 central pixel)
float ygx0c2m[4]
1st pass chi2 min search: average y0 from Gaussian fit binned in 4 charge bins
float mpvvav()
most probable charge in Vavilov distribution (not actually for larger kappa)
float clslenx()
x-size of smaller interpolated template in pixels
float psyparmax
maximum pixel signal for parameterization of y uncertainties
float ygx0gen[4]
generic algorithm: average y0 from Gaussian fit binned in 4 charge bins
float xavg[4]
average x-bias of reconstruction binned in 4 charge bins
float pxparly0[2][5]
projected x-pixel uncertainty parameterization for smaller cotbeta (central alpha) ...
float pzsize
Pixel z-size (thickness)
float chi2ymin(int i)
minimum y chi^2 in 4 charge bins
float yratio()
fractional distance in y between cotbeta templates
float fluence
radiation fluence in n_eq/cm^2
float dytwo
mean offset/correction for one double-pixel y-clusters
int id_current
current id
float xrms(int i)
average x-rms of reconstruction binned in 4 charge bins
float ysize
pixel size (for future use in upgraded geometry)
float dxone
mean offset/correction for one pixel x-clusters
float pclslenx
x-cluster length of smaller interpolated template in pixels
float qmin()
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float pygx0[4]
average y0 from Gaussian fit binned in 4 charge bins
float pixmax
maximum charge for individual pixels in cluster
float pmpvvav
most probable charge in Vavilov distribution (not actually for larger kappa)
float zsize()
pixel z-size or thickness (microns)
float xavgc2m(int i)
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float qscale
Charge scaling to match cmssw and pixelav.
float pchi2yminone
minimum of y chi^2 for 1 pixel clusters
float qmin
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float psxparmax
maximum pixel signal for parameterization of x uncertainties
float xflcorr(int binq, float qflx)
float sytwo()
rms for one double-pixel y-clusters
float xgsiggen[4]
generic algorithm: average sigma_x from Gaussian fit binned in 4 charge bins
float pdytwo
mean offset/correction for one double-pixel y-clusters
int ID
template ID number
float Bfield
Bfield in Tesla.
float cotalpha
cot(alpha) is proportional to cluster length in x and is basis of interpolation
float abs_cotb
absolute value of cot beta
float temperature
detector temperature in deg K
float chi2yminone()
//!&lt; minimum of y chi^2 for 1 pixel clusters
float pyparl[2][5]
projected y-pixel uncertainty parameterization for smaller cotbeta
bool interpolate(int id, float cotalpha, float cotbeta, float locBz)
float sxone()
rms for one pixel x-clusters
float plorywidth
Lorentz y-width (sign corrected for fpix frame)
float yrmsc2m[4]
1st pass chi2 min search: average y-rms of reconstruction binned in 4 charge bins ...
float lorywidth
estimate of y-lorentz width from single pixel offset
float pyavgc2m[4]
1st pass chi2 min search: average y-bias of reconstruction binned in 4 charge bins ...
float pxxratio
fractional distance in x between cotalpha templates
float pxsize
Pixel x-size.
#define BXM2
float pyratio
fractional distance in y between cotbeta templates
int templ_version
Version number of the template to ensure code compatibility.
float qscale()
charge scaling factor
float xpar[2][5]
projected x-pixel uncertainty parameterization
float ygx0[4]
average y0 from Gaussian fit binned in 4 charge bins
bool simpletemplate2D(float xhitp, float yhitp, std::vector< bool > &ydouble, std::vector< bool > &xdouble, float template2d[BXM2][BYM2])
Make simple 2-D templates from track angles set in interpolate and hit position.
float pxgsig[4]
sigma from Gaussian fit binned in 4 charge bins
float pxpar0[2][5]
projected x-pixel uncertainty parameterization for central cotalpha
float xgx0gen[4]
generic algorithm: average x0 from Gaussian fit binned in 4 charge bins
float dxone()
mean offset/correction for one pixel x-clusters
void xtemp3d(int nxpix, array_3d &xtemplate)
float symax
average pixel signal for y-projection of cluster
float ygx0c2m(int i)
1st pass chi2 min search: average y0 from Gaussian fit binned in 4 charge bins
float pyparh[2][5]
projected y-pixel uncertainty parameterization for larger cotbeta
float xgsig[4]
average sigma_x from Gaussian fit binned in 4 charge bins
float kappavav()
kappa parameter for Vavilov distribution
float cotbeta
cot(beta) is proportional to cluster length in y and is basis of interpolation
float chi2yavg(int i)
average y chi^2 in 4 charge bins
float beta
beta track angle (defined in CMS CMS IN 2004/014)
void vavilov_pars(double &mpv, double &sigma, double &kappa)
float lorxwidth()
signed lorentz x-width (microns)
float lorywidth()
signed lorentz y-width (microns)
float pxflparlh[4][6]
Aqfl-parameterized x-correction in 4 charge bins for smaller cotbeta, larger cotalpha.
float ygsig(int i)
average sigma_y from Gaussian fit binned in 4 charge bins
void xtemp(int fxbin, int lxbin, float xtemplate[41][BXSIZE])
float yrms(int i)
average y-rms of reconstruction binned in 4 charge bins
float pdyone
mean offset/correction for one pixel y-clusters
float clsleny()
y-size of smaller interpolated template in pixels
float pxgsigc2m[4]
1st pass chi2 min search: sigma from Gaussian fit binned in 4 charge bins
float pytemp[9][BYSIZE]
templates for y-reconstruction (binned over 5 central pixels)
float yflcorr(int binq, float qfly)
float xrmsc2m[4]
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
float ppixmax
maximum pixel charge
void temperrors(int id, float cotalpha, float cotbeta, int qBin, float &sigmay, float &sigmax, float &sy1, float &sy2, float &sx1, float &sx2)
float lorxwidth
estimate of x-lorentz width from single pixel offset
float plorxwidth
Lorentz x-width.
float xgx0[4]
average x0 from Gaussian fit binned in 4 charge bins
float xsize()
pixel x-size (microns)
float ygsigc2m[4]
1st pass chi2 min search: average sigma_y from Gaussian fit binned in 4 charge bins ...
char title[80]
&lt; template header structure
#define BYM2
void ytemp(int fybin, int lybin, float ytemplate[41][BYSIZE])
float pchi2xavg[4]
average x chi^2 in 4 charge bins
float ygsiggen[4]
generic algorithm: average sigma_y from Gaussian fit binned in 4 charge bins
float xgsigc2m[4]
1st pass chi2 min search: average sigma_x from Gaussian fit binned in 4 charge bins ...
float pchi2xmin[4]
minimum of x chi^2 in 4 charge bins
float fracxone
fraction of sample with xsize = 1
float sxtwo()
rms for one double-pixel x-clusters
float mpvvav
most probable charge in Vavilov distribution (not actually for larger kappa)
float pxflparhl[4][6]
Aqfl-parameterized x-correction in 4 charge bins for larger cotbeta, smaller cotalpha.
float dytwo()
mean offset/correction for one double-pixel y-clusters
float cotb_current
current cot beta
float pxrms[4]
average x-rms of reconstruction binned in 4 charge bins
float pyavg[4]
average y-bias of reconstruction binned in 4 charge bins
float sxtwo
rms for one double-pixel x-clusters
float pdxone
mean offset/correction for one pixel x-clusters
int Dtype
detector type (0=BPix, 1=FPix)
float pchi2ymin[4]
minimum of y chi^2 in 4 charge bins
float chi2yavg[4]
average y chi^2 in 4 charge bins
float alpha
alpha track angle (defined in CMS CMS IN 2004/014)
float pchi2yavg[4]
average y chi^2 in 4 charge bins
SiPixelTemplateHeader head
&lt; template storage structure
float s50()
1/2 of the pixel threshold signal in electrons
float chi2xminone
minimum of x chi^2 for 1 pixel clusters
float ypar[2][5]
projected y-pixel uncertainty parameterization
float xgsigc2m(int i)
1st pass chi2 min search: average sigma_x from Gaussian fit binned in 4 charge bins ...
float qavg_spare
spare cluster charge
float pyrmsc2m[4]
1st pass chi2 min search: average y-rms of reconstruction binned in 4 charge bins ...
float ps50
1/2 of the pixel threshold signal in adc units
float yavgc2m(int i)
1st pass chi2 min search: average y-bias of reconstruction binned in 4 charge bins ...
bool pushfile(int filenum)
float ygx0(int i)
average y0 from Gaussian fit binned in 4 charge bins
float pygx0c2m[4]
1st pass chi2 min search: average y0 from Gaussian fit binned in 4 charge bins
float s50
1/2 of the readout threshold in ADC units
#define TYSIZE
float pyxratio
fractional distance in y between x-slices of cotalpha templates
float qmin(int i)
minimum cluster charge for valid hit (keeps 99.9% or 99.8% of simulated hits)
float pxflparll[4][6]
Aqfl-parameterized x-correction in 4 charge bins for smaller cotbeta, cotalpha.
float zsize
pixel size (for future use in upgraded geometry)
void qbin_dist(int id, float cotalpha, float cotbeta, float qbin_frac[4], float &ny1_frac, float &ny2_frac, float &nx1_frac, float &nx2_frac)
float pyflparl[4][6]
Aqfl-parameterized y-correction in 4 charge bins for smaller cotbeta.
float Vbias
detector bias potential in Volts
float qbfrac[3]
fraction of sample in qbin = 0-2 (&gt;=3 is the complement)
float syone()
rms for one pixel y-clusters
float xsize
pixel size (for future use in upgraded geometry)
float fracyone
fraction of sample with ysize = 1
float chi2yavgone()
//!&lt; average y chi^2 for 1 pixel clusters
int index_id
current index
float pxavgc2m[4]
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float qmin2
tighter minimum cluster charge for valid hit (keeps 99.8% of simulated hits)
float yxratio()
fractional distance in y between cotalpha templates slices
float xgx0c2m[4]
1st pass chi2 min search: average x0 from Gaussian fit binned in 4 charge bins
float yavg[4]
average y-bias of reconstruction binned in 4 charge bins
float qavg()
average cluster charge for this set of track angles
float ygsigc2m(int i)
1st pass chi2 min search: average sigma_y from Gaussian fit binned in 4 charge bins ...
float sxmax()
average pixel signal for x-projection of cluster
float pqavg_avg
average of cluster charge less than qavg
float pqmin
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float chi2ymin[4]
minimum of y chi^2 in 4 charge bins
float yavgc2m[4]
1st pass chi2 min search: average y-bias of reconstruction binned in 4 charge bins ...
int NTy
number of Template y entries
float psxone
rms for one pixel x-clusters
void xsigma2(int fxpix, int lxpix, float sxthr, float xsum[BXSIZE], float xsig2[BXSIZE])
float dxtwo
mean offset/correction for one double-pixel x-clusters
float pxgx0c2m[4]
1st pass chi2 min search: average x0 from Gaussian fit binned in 4 charge bins
float chi2xavgone()
//!&lt; average x chi^2 for 1 pixel clusters
float pxavg[4]
average x-bias of reconstruction binned in 4 charge bins
float pixmax()
maximum pixel charge
float psytwo
rms for one double-pixel y-clusters
float sigmavav()
&quot;sigma&quot; scale fctor for Vavilov distribution
void ysigma2(int fypix, int lypix, float sythr, float ysum[BYSIZE], float ysig2[BYSIZE])
int NTyx
number of Template y-slices of x entries
float psxtwo
rms for one double-pixel x-clusters
float yflpar[4][6]
Aqfl-parameterized y-correction in 4 charge bins.
float sxone
rms for one pixel x-clusters
float xgx0(int i)
average x0 from Gaussian fit binned in 4 charge bins
float pyrms[4]
average y-rms of reconstruction binned in 4 charge bins
float chi2xmin[4]
minimum of x chi^2 in 4 charge bins
float cota_current
current cot alpha
float chi2xavg(int i)
averaage x chi^2 in 4 charge bins
float chi2yminone
minimum of y chi^2 for 1 pixel clusters
float xgsig(int i)
average sigma_x from Gaussian fit binned in 4 charge bins
float pclsleny
y-cluster length of smaller interpolated template in pixels
float pysize
Pixel y-size.
float costrk[3]
direction cosines of tracks used to generate this entry
float pchi2xminone
minimum of x chi^2 for 1 pixel clusters
SiPixelTemplateEntry entx[5][29]
29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5...
float ygsig[4]
average sigma_y from Gaussian fit binned in 4 charge bins
float pqavg
average cluster charge for this set of track angles
SiPixelTemplateEntry enty[60]
60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fpix] ...
float sytwo
rms for one double-pixel y-clusters
float pxparh[2][5]
projected x-pixel uncertainty parameterization for larger cotalpha
float pchi2xavgone
average x chi^2 for 1 pixel clusters
float psymax
average pixel signal for y-projection of cluster
float dyone()
mean offset/correction for one pixel y-clusters
float xavg(int i)
average x-bias of reconstruction binned in 4 charge bins
float xrmsgen[4]
generic algorithm: average x-rms of reconstruction binned in 4 charge bins
float dxtwo()
mean offset/correction for one double-pixel x-clusters
float ysize()
pixel y-size (microns)
float pkappavav
kappa parameter for Vavilov distribution
float pygsig[4]
average sigma_y from Gaussian fit binned in 4 charge bins
float pxtemp[9][BXSIZE]
templates for x-reconstruction (binned over 5 central pixels)
float chi2xavg[4]
average x chi^2 in 4 charge bins
boost::multi_array< float, 3 > array_3d
float xrmsc2m(int i)
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
float pxflparhh[4][6]
Aqfl-parameterized x-correction in 4 charge bins for larger cotbeta, cotalpha.
float psyone
rms for one pixel y-clusters
float xxratio()
fractional distance in x between cotalpha templates
float pqmin2
tighter minimum cluster charge for valid hit (keeps 99.8% of simulated hits)
float kappavav
kappa parameter for Vavilov distribution
float xavggen[4]
generic algorithm: average x-bias of reconstruction binned in 4 charge bins
float yrmsgen[4]
generic algorithm: average y-rms of reconstruction binned in 4 charge bins
float clsleny
cluster y-length in pixels at signal height symax/2
SiPixelTemplate()
Default constructor.