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.30)
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 // V8.20 - Add methods to identify the central pixels in the x- and y-templates (to help align templates with clusters in radiation damaged detectors)
58 // Rename class variables from pxxxx (private xxxx) to xxxx_ to follow standard convention.
59 // Add compiler option to store the template entries in BOOST multiarrays of structs instead of simple c arrays
60 // (allows dynamic resizing template storage and has bounds checking but costs ~10% in execution time).
61 // V8.21 - Add new qbin method to use in cluster splitting
62 // V8.23 - Replace chi-min position errors with merged cluster chi2 probability info
63 // V8.25 - Incorporate VI's speed changes into the current version
64 // V8.26 - Modify the Vavilov lookups to work better with the FPix (offset y-templates)
65 // V8.30 - Change the splitting template generation and access to improve speed and eliminate triple index boost::multiarray
66 //
67 // Created by Morris Swartz on 10/27/06.
68 //
69 //
70 
71 // Build the template storage structure from several pieces
72 
73 #ifndef SiPixelTemplate_h
74 #define SiPixelTemplate_h 1
75 
76 #include "SiPixelTemplateDefs.h"
77 
78 #include<vector>
79 #include<cassert>
80 #include "boost/multi_array.hpp"
81 
82 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
85 #endif
86 
88  int runnum;
89  float alpha;
90  float cotalpha;
91  float beta;
92  float cotbeta;
93  float costrk[3];
94  float qavg;
95  float pixmax;
96  float symax;
97  float dyone;
98  float syone;
99  float sxmax;
100  float dxone;
101  float sxone;
102  float dytwo;
103  float sytwo;
104  float dxtwo;
105  float sxtwo;
106  float qmin;
107  float qmin2;
108  float yavggen[4];
109  float yrmsgen[4];
110  float xavggen[4];
111  float xrmsgen[4];
112 
113  float clsleny;
114  float clslenx;
115  float mpvvav;
116  float sigmavav;
117  float kappavav;
118  float mpvvav2;
119  float sigmavav2;
120  float kappavav2;
121  float ypar[2][5];
122  float ytemp[9][TYSIZE];
123  float xpar[2][5];
124  float xtemp[9][TXSIZE];
125  float yavg[4];
126  float yrms[4];
127  float ygx0[4];
128  float ygsig[4];
129  float yflpar[4][6];
130  float xavg[4];
131  float xrms[4];
132  float xgx0[4];
133  float xgsig[4];
134  float xflpar[4][6];
135  float chi2yavg[4];
136  float chi2ymin[4];
137  float chi2xavg[4];
138  float chi2xmin[4];
139  float chi2yavgone;
140  float chi2yminone;
141  float chi2xavgone;
142  float chi2xminone;
143  float yavgc2m[4];
144  float yrmsc2m[4];
145  float chi2yavgc2m[4];
146  float chi2yminc2m[4];
147  float xavgc2m[4];
148  float xrmsc2m[4];
149  float chi2xavgc2m[4];
150  float chi2xminc2m[4];
151  float ygx0gen[4];
152  float ygsiggen[4];
153  float xgx0gen[4];
154  float xgsiggen[4];
155  float qbfrac[3];
156  float fracyone;
157  float fracxone;
158  float fracytwo;
159  float fracxtwo;
160  float qavg_avg;
161  float qavg_spare;
162  float spare[1];
163 } ;
164 
165 
166 
167 
169  int ID;
170  int NTy;
171  int NTyx;
172  int NTxx;
173  int Dtype;
174  float qscale;
175  float lorywidth;
176  float lorxwidth;
177  float Vbias;
178  float temperature;
179  float fluence;
180  float s50;
181  char title[80];
183  float Bfield;
184 
185  float xsize;
186  float ysize;
187  float zsize;
188 } ;
189 
190 
191 
194  float cotbetaY[60];
195  float cotbetaX[5];
196  float cotalphaX[29];
197 #ifndef SI_PIXEL_TEMPLATE_USE_BOOST
200 #else
201  boost::multi_array<SiPixelTemplateEntry,1> enty;
202  boost::multi_array<SiPixelTemplateEntry,2> entx;
203 #endif
204 } ;
205 
206 
207 // ******************************************************************************************
225 // ******************************************************************************************
227  public:
229  bool pushfile(int filenum); // load the private store with info from the
230  // file with the index (int) filenum
231 
232 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
233  bool pushfile(const SiPixelTemplateDBObject& dbobject); // load the private store with info from db
234 #endif
235 
236  // initialize the rest;
237  void postInit();
238 
239 
240 // Interpolate input alpha and beta angles to produce a working template for each individual hit.
241  bool interpolate(int id, float cotalpha, float cotbeta, float locBz);
242 
243 // overload for compatibility.
244  bool interpolate(int id, float cotalpha, float cotbeta);
245 
246 // retreive interpolated templates.
247  void ytemp(int fybin, int lybin, float ytemplate[41][BYSIZE]);
248 
249  void xtemp(int fxbin, int lxbin, float xtemplate[41][BXSIZE]);
250 
251 //Method to estimate the central pixel of the interpolated y-template
252  int cytemp();
253 
254 //Method to estimate the central pixel of the interpolated x-template
255  int cxtemp();
256 
257 // new methods to build templates from two interpolated clusters (for splitting)
258  void ytemp3d_int(int nypix, int& nybins);
259 
260  void ytemp3d(int j, int k, std::vector<float>& ytemplate);
261 
262  void xtemp3d_int(int nxpix, int& nxbins);
263 
264  void xtemp3d(int j, int k, std::vector<float>& xtemplate);
265 
266 // Convert vector of projected signals into uncertainties for fitting.
267  void ysigma2(int fypix, int lypix, float sythr, float ysum[BYSIZE], float ysig2[BYSIZE]);
268 
269  void ysigma2(float qpixel, int index, float& ysig2);
270 
271  void xsigma2(int fxpix, int lxpix, float sxthr, float xsum[BXSIZE], float xsig2[BXSIZE]);
272 
273 // Interpolate qfl correction in y.
274  float yflcorr(int binq, float qfly);
275 
276 // Interpolate qfl correction in x.
277  float xflcorr(int binq, float qflx);
278 
279 // 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.
280 // int qbin(int id, float cotalpha, float cotbeta, float locBz, float qclus, float& pixmx, float& sigmay, float& deltay, float& sigmax, float& deltax,
281 // float& sy1, float& dy1, float& sy2, float& dy2, float& sx1, float& dx1, float& sx2, float& dx2, float& lorywidth, float& lorxwidth);
282 
283 // Overload for backward compatibility.
284  int qbin(int id, float cotalpha, float cotbeta, float locBz, float qclus, float& pixmx, float& sigmay, float& deltay, float& sigmax, float& deltax,
285  float& sy1, float& dy1, float& sy2, float& dy2, float& sx1, float& dx1, float& sx2, float& dx2);
286 
287 // Overload to use for cluster splitting
288  int qbin(int id, float cotalpha, float cotbeta, float qclus);
289 
290 // Overload to keep legacy interface
291  int qbin(int id, float cotbeta, float qclus);
292 
293 // Method to return template errors for fastsim
294  void temperrors(int id, float cotalpha, float cotbeta, int qBin, float& sigmay, float& sigmax, float& sy1, float& sy2, float& sx1, float& sx2);
295 
296 //Method to return qbin and size probabilities for fastsim
297  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);
298 
299 //Method to calculate simple 2D templates
300  bool simpletemplate2D(float xhitp, float yhitp, std::vector<bool>& ydouble, std::vector<bool>& xdouble, float template2d[BXM2][BYM2]);
301 
302 //Method to interpolate Vavilov distribution parameters
303  void vavilov_pars(double& mpv, double& sigma, double& kappa);
304 
305 //Method to interpolate 2-cluster Vavilov distribution parameters
306  void vavilov2_pars(double& mpv, double& sigma, double& kappa);
307 
308 
309  float qavg() {return qavg_;}
310  float pixmax() {return pixmax_;}
311  float qscale() {return qscale_;}
312  float s50() {return s50_;}
313  float symax() {return symax_;}
314  float dyone() {return dyone_;}
315  float syone() {return syone_;}
316  float dytwo() {return dytwo_;}
317  float sytwo() {return sytwo_;}
318  float sxmax() {return sxmax_;}
319  float dxone() {return dxone_;}
320  float sxone() {return sxone_;}
321  float dxtwo() {return dxtwo_;}
322  float sxtwo() {return sxtwo_;}
323  float qmin() {return qmin_;}
324  float qmin(int i) {
325 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
326  if(i < 0 || i > 1) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::qmin called with illegal index = " << i << std::endl;}
327 #else
328  assert(i>=0 && i<2);
329 #endif
330  if(i==0){return qmin_;}else{return qmin2_;}}
331  float clsleny() {return clsleny_;}
332  float clslenx() {return clslenx_;}
333  float yratio() {return yratio_;}
334  float yxratio() {return yxratio_;}
335  float xxratio() {return xxratio_;}
336  float yavg(int i) {
337 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
338  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yavg called with illegal index = " << i << std::endl;}
339 #else
340  assert(i>=0 && i<4);
341 #endif
342  return yavg_[i];}
343  float yrms(int i) {
344 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
345  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yrms called with illegal index = " << i << std::endl;}
346 #else
347  assert(i>=0 && i<4);
348 #endif
349  return yrms_[i];}
350  float ygx0(int i) {
351 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
352  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::ygx0 called with illegal index = " << i << std::endl;}
353 #else
354  assert(i>=0 && i<4);
355 #endif
356  return ygx0_[i];}
357  float ygsig(int i) {
358 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
359  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::ygsig called with illegal index = " << i << std::endl;}
360 #else
361  assert(i>=0 && i<4);
362 #endif
363  return ygsig_[i];}
364  float xavg(int i) {
365 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
366  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xavg called with illegal index = " << i << std::endl;}
367 #else
368  assert(i>=0 && i<4);
369 #endif
370  return xavg_[i];}
371  float xrms(int i) {
372 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
373  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xrms called with illegal index = " << i << std::endl;}
374 #else
375  assert(i>=0 && i<4);
376 #endif
377  return xrms_[i];}
378  float xgx0(int i) {
379 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
380  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xgx0 called with illegal index = " << i << std::endl;}
381 #else
382  assert(i>=0 && i<4);
383 #endif
384  return xgx0_[i];}
385  float xgsig(int i) {
386 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
387  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xgsig called with illegal index = " << i << std::endl;}
388 #else
389  assert(i>=0 && i<4);
390 #endif
391  return xgsig_[i];}
392  float chi2yavg(int i) {
393 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
394  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2yavg called with illegal index = " << i << std::endl;}
395 #else
396  assert(i>=0 && i<4);
397 #endif
398  return chi2yavg_[i];}
399  float chi2ymin(int i) {
400 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
401  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2ymin called with illegal index = " << i << std::endl;}
402 #else
403  assert(i>=0 && i<4);
404 #endif
405  return chi2ymin_[i];}
406  float chi2xavg(int i) {
407 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
408  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xavg called with illegal index = " << i << std::endl;}
409 #else
410  assert(i>=0 && i<4);
411 #endif
412  return chi2xavg_[i];}
413  float chi2xmin(int i) {
414 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
415  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xmin called with illegal index = " << i << std::endl;}
416 #else
417  assert(i>=0 && i<4);
418 #endif
419  return chi2xmin_[i];}
420  float yavgc2m(int i) {
421 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
422  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yavgc2m called with illegal index = " << i << std::endl;}
423 #else
424  assert(i>=0 && i<4);
425 #endif
426  return yavgc2m_[i];}
427  float yrmsc2m(int i) {
428 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
429  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::yrmsc2m called with illegal index = " << i << std::endl;}
430 #else
431  assert(i>=0 && i<4);
432 #endif
433  return yrmsc2m_[i];}
434  float chi2yavgc2m(int i) {
435 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
436  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2yavgc2m called with illegal index = " << i << std::endl;}
437 #else
438  assert(i>=0 && i<4);
439 #endif
440  return chi2yavgc2m_[i];}
441  float chi2yminc2m(int i) {
442 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
443  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2yminc2m called with illegal index = " << i << std::endl;}
444 #else
445  assert(i>=0 && i<4);
446 #endif
447  return chi2yminc2m_[i];}
448  float xavgc2m(int i) {
449 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
450  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xavgc2m called with illegal index = " << i << std::endl;}
451 #else
452  assert(i>=0 && i<4);
453 #endif
454  return xavgc2m_[i];}
455  float xrmsc2m(int i) {
456 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
457  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::xrmsc2m called with illegal index = " << i << std::endl;}
458 #else
459  assert(i>=0 && i<4);
460 #endif
461  return xrmsc2m_[i];}
462  float chi2xavgc2m(int i) {
463 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
464  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xavgc2m called with illegal index = " << i << std::endl;}
465 #else
466  assert(i>=0 && i<4);
467 #endif
468  return chi2xavgc2m_[i];}
469  float chi2xminc2m(int i) {
470 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
471  if(i < 0 || i > 3) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xminc2m called with illegal index = " << i << std::endl;}
472 #else
473  assert(i>=0 && i<4);
474 #endif
475  return chi2xminc2m_[i];}
476  float chi2yavgone() {return chi2yavgone_;}
477  float chi2yminone() {return chi2yminone_;}
478  float chi2xavgone() {return chi2xavgone_;}
479  float chi2xminone() {return chi2xminone_;}
480  float lorywidth() {return lorywidth_;}
481  float lorxwidth() {return lorxwidth_;}
482  float mpvvav() {return mpvvav_;}
483  float sigmavav() {return sigmavav_;}
484  float kappavav() {return kappavav_;}
485  float mpvvav2() {return mpvvav2_;}
486  float sigmavav2() {return sigmavav2_;}
487  float kappavav2() {return kappavav2_;}
488  float xsize() {return xsize_;}
489  float ysize() {return ysize_;}
490  float zsize() {return zsize_;}
491 // float yspare(int i) {assert(i>=0 && i<5); return pyspare[i];} //!< vector of 5 spares interpolated in beta only
492 // float xspare(int i) {assert(i>=0 && i<10); return pxspare[i];} //!< vector of 10 spares interpolated in alpha and beta
493 
494 
495  private:
496 
497  // Keep current template interpolaion parameters
498 
500  int index_id_;
503  float abs_cotb_;
504  bool success_;
505 
506 
507  // Keep results of last interpolation to return through member functions
508 
509  float qavg_;
510  float pixmax_;
511  float qscale_;
512  float s50_;
513  float symax_;
514  float syparmax_;
515  float dyone_;
516  float syone_;
517  float dytwo_;
518  float sytwo_;
519  float sxmax_;
520  float sxparmax_;
521  float dxone_;
522  float sxone_;
523  float dxtwo_;
524  float sxtwo_;
525  float qmin_;
526  float clsleny_;
527  float clslenx_;
528  float yratio_;
529  float yparl_[2][5];
530  float yparh_[2][5];
531  float xparly0_[2][5];
532  float xparhy0_[2][5];
533  float ytemp_[9][BYSIZE];
534  float yxratio_;
535  float xxratio_;
536  float xpar0_[2][5];
537  float xparl_[2][5];
538  float xparh_[2][5];
539  float xtemp_[9][BXSIZE];
540  float yavg_[4];
541  float yrms_[4];
542  float ygx0_[4];
543  float ygsig_[4];
544  float yflparl_[4][6];
545  float yflparh_[4][6];
546  float xavg_[4];
547  float xrms_[4];
548  float xgx0_[4];
549  float xgsig_[4];
550  float xflparll_[4][6];
551  float xflparlh_[4][6];
552  float xflparhl_[4][6];
553  float xflparhh_[4][6];
554  float chi2yavg_[4];
555  float chi2ymin_[4];
556  float chi2xavg_[4];
557  float chi2xmin_[4];
558  float yavgc2m_[4];
559  float yrmsc2m_[4];
560  float chi2yavgc2m_[4];
561  float chi2yminc2m_[4];
562  float xavgc2m_[4];
563  float xrmsc2m_[4];
564  float chi2xavgc2m_[4];
565  float chi2xminc2m_[4];
566  float chi2yavgone_;
567  float chi2yminone_;
568  float chi2xavgone_;
569  float chi2xminone_;
570  float qmin2_;
571  float mpvvav_;
572  float sigmavav_;
573  float kappavav_;
574  float mpvvav2_;
575  float sigmavav2_;
576  float kappavav2_;
577  float lorywidth_;
578  float lorxwidth_;
579  float xsize_;
580  float ysize_;
581  float zsize_;
582  float qavg_avg_;
583  float nybins_;
584  float nxbins_;
585  boost::multi_array<float,2> temp2dy_;
586  boost::multi_array<float,2> temp2dx_;
587 
588 
589  // The actual template store is a std::vector container
590 
591  std::vector< SiPixelTemplateStore > thePixelTemp_;
592 } ;
593 
594 
595 #endif
float yrmsc2m(int i)
1st pass chi2 min search: average y-rms of reconstruction binned in 4 charge bins ...
float cota_current_
current cot alpha
float qavg_avg
average cluster charge of clusters that are less than qavg (normalize 2-D simple templates) ...
float mpvvav_
most probable charge in Vavilov distribution (not actually for larger kappa)
int runnum
&lt; Basic template entry corresponding to a single set of track angles
float xflpar[4][6]
Aqfl-parameterized x-correction in 4 charge bins.
int i
Definition: DBlmapReader.cc:9
float xavg_[4]
average x-bias of reconstruction binned in 4 charge bins
float xrms[4]
average x-rms of reconstruction binned in 4 charge bins
void vavilov2_pars(double &mpv, double &sigma, double &kappa)
float xgx0_[4]
average x0 from Gaussian fit binned in 4 charge bins
#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 clsleny_
y-cluster length of smaller interpolated template in pixels
float xtemp[9][TXSIZE]
templates for x-reconstruction (binned over 1 central pixel)
float qavg
average cluster charge for this set of track angles (now includes threshold effects) ...
float pixmax_
maximum pixel charge
float chi2yavgc2m(int i)
1st pass chi2 min search: average y-chisq for merged clusters
float syone
rms for one pixel y-clusters
float chi2yavgone
average y chi^2 for 1 pixel clusters
float symax()
average pixel signal for y-projection of cluster
float kappavav2()
kappa parameter for 2-cluster Vavilov distribution
float yavg(int i)
average y-bias of reconstruction binned in 4 charge bins
int cytemp()
Return central pixel of y template pixels above readout threshold.
float abs_cotb_
absolute value of cot beta
float dyone
mean offset/correction for one pixel y-clusters
#define BYSIZE
float sigmavav
&quot;sigma&quot; scale fctor for Vavilov distribution
float fracxtwo
fraction of double pixel sample with xsize = 1
float xparhy0_[2][5]
projected x-pixel uncertainty parameterization for larger cotbeta (central alpha) ...
float yavggen[4]
generic algorithm: average y-bias of reconstruction binned in 4 charge bins
float chi2yminc2m_[4]
1st pass chi2 min search: minimum y-chisq for merged clusters
float sxmax
average pixel signal for x-projection of cluster
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 chi2xavgc2m_[4]
1st pass chi2 min search: average x-chisq for merged clusters
float chi2yminc2m[4]
1st pass chi2 min search: minimum of y chi^2 in 4 charge bins (merged clusters)
float xavgc2m[4]
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
#define TXSIZE
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 xrmsc2m_[4]
1st pass chi2 min search: average x-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 mpvvav()
most probable charge in Vavilov distribution (not actually for larger kappa)
float mpvvav2
most probable charge in Vavilov distribution for 2 merged clusters (not actually for larger kappa) ...
float clslenx()
x-size of smaller interpolated template in pixels
float sxmax_
average pixel signal for x-projection of cluster
boost::multi_array< float, 2 > temp2dx_
2d-primitive for spltting 3-d template
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 chi2yminone_
minimum of y chi^2 for 1 pixel clusters
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
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 chi2xavgone_
average x chi^2 for 1 pixel clusters
float qmin()
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float pixmax
maximum charge for individual pixels in cluster
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 chi2xavg_[4]
average x chi^2 in 4 charge bins
float chi2yavgc2m[4]
1st pass chi2 min search: average y chi^2 in 4 charge bins (merged clusters)
float qmin
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float chi2xavgc2m[4]
1st pass chi2 min search: average x chi^2 in 4 charge bins (merged clusters)
float ygx0_[4]
average y0 from Gaussian fit binned in 4 charge bins
float mpvvav2()
most probable charge in 2-cluster Vavilov distribution (not actually for larger kappa) ...
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 cotb_current_
current cot beta
float s50_
1/2 of the pixel threshold signal in adc units
float chi2xminc2m[4]
1st pass chi2 min search: minimum of x chi^2 in 4 charge bins (merged clusters)
int ID
&lt; template header structure
float Bfield
Bfield in Tesla.
float cotalpha
cot(alpha) is proportional to cluster length in x and is basis of interpolation
float temperature
detector temperature in deg K
float yavgc2m_[4]
1st pass chi2 min search: average y-bias of reconstruction binned in 4 charge bins ...
float chi2xminc2m_[4]
1st pass chi2 min search: minimum x-chisq for merged clusters
float chi2yminone()
//!&lt; minimum of y chi^2 for 1 pixel clusters
bool interpolate(int id, float cotalpha, float cotbeta, float locBz)
float sxone()
rms for one pixel x-clusters
float yrmsc2m[4]
1st pass chi2 min search: average y-rms of reconstruction binned in 4 charge bins ...
float qavg_
average cluster charge for this set of track angles
float lorywidth
estimate of y-lorentz width from single pixel offset
#define BXM2
float xflparlh_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for smaller cotbeta, larger cotalpha.
int cxtemp()
Return central pixel of x-template pixels above readout threshold.
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 chi2xavgc2m(int i)
1st pass chi2 min search: average x-chisq for merged clusters
float chi2ymin_[4]
minimum of y chi^2 in 4 charge bins
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 xgx0gen[4]
generic algorithm: average x0 from Gaussian fit binned in 4 charge bins
float dxone()
mean offset/correction for one pixel x-clusters
float sxparmax_
maximum pixel signal for parameterization of x uncertainties
float kappavav2_
kappa parameter for 2-cluster Vavilov distribution
float symax
average pixel signal for y-projection of cluster
float sigmavav_
&quot;sigma&quot; scale fctor for Vavilov distribution
float kappavav2
kappa parameter for Vavilov distribution for 2 merged clusters
float xgsig[4]
average sigma_x from Gaussian fit binned in 4 charge bins
std::vector< SiPixelTemplateStore > thePixelTemp_
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 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 lorywidth_
Lorentz y-width (sign corrected for fpix frame)
float clsleny()
y-size of smaller interpolated template in 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 ...
void ytemp3d(int j, int k, std::vector< float > &ytemplate)
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 xgx0[4]
average x0 from Gaussian fit binned in 4 charge bins
int j
Definition: DBlmapReader.cc:9
float xsize()
pixel x-size (microns)
char title[80]
template title
float sigmavav2_
&quot;sigma&quot; scale fctor for 2-cluster Vavilov distribution
#define BYM2
float sigmavav2()
&quot;sigma&quot; scale fctor for 2-cluster Vavilov distribution
void ytemp(int fybin, int lybin, float ytemplate[41][BYSIZE])
float yparl_[2][5]
projected y-pixel uncertainty parameterization for smaller cotbeta
float xpar0_[2][5]
projected x-pixel uncertainty parameterization for central cotalpha
float ygsiggen[4]
generic algorithm: average sigma_y from Gaussian fit binned 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 ysize_
Pixel y-size.
float xsize_
Pixel x-size.
float dytwo()
mean offset/correction for one double-pixel y-clusters
float kappavav_
kappa parameter for Vavilov distribution
float sxtwo
rms for one double-pixel x-clusters
bool success_
true if cotalpha, cotbeta are inside of the acceptance (dynamically loaded)
float syone_
rms for one pixel y-clusters
boost::multi_array< float, 2 > temp2dy_
2d-primitive for spltting 3-d template
int Dtype
detector type (0=BPix, 1=FPix)
float xflparhh_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for larger cotbeta, cotalpha.
float chi2yavg[4]
average y chi^2 in 4 charge bins
float alpha
alpha track angle (defined in CMS CMS IN 2004/014)
float chi2yminc2m(int i)
1st pass chi2 min search: minimum y-chisq for merged clusters
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 yflparl_[4][6]
Aqfl-parameterized y-correction in 4 charge bins for smaller cotbeta.
float ypar[2][5]
projected y-pixel uncertainty parameterization
float qavg_spare
spare cluster charge
float chi2yavgone_
average y chi^2 for 1 pixel clusters
int k[5][pyjets_maxn]
float dyone_
mean offset/correction for one pixel y-clusters
float yavgc2m(int i)
1st pass chi2 min search: average y-bias of reconstruction binned in 4 charge bins ...
float ytemp_[9][BYSIZE]
templates for y-reconstruction (binned over 5 central pixels)
void xtemp3d(int j, int k, std::vector< float > &xtemplate)
bool pushfile(int filenum)
float sxone_
rms for one pixel x-clusters
float dxtwo_
mean offset/correction for one double-pixel x-clusters
float chi2xminc2m(int i)
1st pass chi2 min search: minimum x-chisq for merged clusters
float ygx0(int i)
average y0 from Gaussian fit binned in 4 charge bins
float s50
1/2 of the readout threshold in ADC units
#define TYSIZE
float qscale_
charge scaling factor
float xparh_[2][5]
projected x-pixel uncertainty parameterization for larger cotalpha
float qmin(int i)
minimum cluster charge for valid hit (keeps 99.9% or 99.8% of simulated hits)
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 ygsig_[4]
average sigma_y from Gaussian fit binned in 4 charge bins
float Vbias
detector bias potential in Volts
float qmin2_
tighter minimum cluster charge for valid hit (keeps 99.8% of simulated hits)
float yrms_[4]
average y-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 ...
float xflparll_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for smaller cotbeta, cotalpha.
float qbfrac[3]
fraction of sample in qbin = 0-2 (&gt;=3 is the complement)
float syone()
rms for one pixel y-clusters
float xtemp_[9][BXSIZE]
templates for x-reconstruction (binned over 5 central pixels)
float sytwo_
rms for one double-pixel y-clusters
float xsize
pixel size (for future use in upgraded geometry)
void ytemp3d_int(int nypix, int &nybins)
float qavg_avg_
average of cluster charge less than qavg
float fracyone
fraction of sample with ysize = 1
float chi2yavgone()
//!&lt; average y chi^2 for 1 pixel clusters
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 chi2xminone_
minimum of x chi^2 for 1 pixel clusters
float yavg[4]
average y-bias of reconstruction binned in 4 charge bins
void xtemp3d_int(int nxpix, int &nxbins)
float qavg()
average cluster charge for this set of track angles
float xparl_[2][5]
projected x-pixel uncertainty parameterization for smaller cotalpha
float sxtwo_
rms for one double-pixel x-clusters
float sxmax()
average pixel signal for x-projection of cluster
float clslenx_
x-cluster length of smaller interpolated template in pixels
float chi2ymin[4]
minimum of y chi^2 in 4 charge bins
float yflparh_[4][6]
Aqfl-parameterized y-correction in 4 charge bins for larger cotbeta.
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
void xsigma2(int fxpix, int lxpix, float sxthr, float xsum[BXSIZE], float xsig2[BXSIZE])
float xparly0_[2][5]
projected x-pixel uncertainty parameterization for smaller cotbeta (central alpha) ...
float xrms_[4]
average x-rms of reconstruction binned in 4 charge bins
float symax_
average pixel signal for y-projection of cluster
float dxtwo
mean offset/correction for one double-pixel x-clusters
float yparh_[2][5]
projected y-pixel uncertainty parameterization for larger cotbeta
float chi2xavgone()
//!&lt; average x chi^2 for 1 pixel clusters
float pixmax()
maximum pixel charge
float xxratio_
fractional distance in x between cotalpha templates
float chi2yavg_[4]
average y chi^2 in 4 charge bins
float sigmavav()
&quot;sigma&quot; scale fctor for Vavilov distribution
float xflparhl_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for larger cotbeta, smaller cotalpha.
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 yflpar[4][6]
Aqfl-parameterized y-correction in 4 charge bins.
float yxratio_
fractional distance in y between x-slices of cotalpha templates
float sxone
rms for one pixel x-clusters
float xgx0(int i)
average x0 from Gaussian fit binned in 4 charge bins
float qmin_
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float dxone_
mean offset/correction for one pixel x-clusters
float chi2xmin[4]
minimum of x chi^2 in 4 charge bins
float lorxwidth_
Lorentz x-width.
float chi2xavg(int i)
averaage x chi^2 in 4 charge bins
float yavg_[4]
average y-bias of reconstruction binned in 4 charge bins
int index_id_
current index
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 costrk[3]
direction cosines of tracks used to generate this entry
float mpvvav2_
most probable charge in 2-cluster Vavilov distribution (not actually for larger kappa) ...
SiPixelTemplateEntry entx[5][29]
29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5...
float syparmax_
maximum pixel signal for parameterization of y uncertainties
float ygsig[4]
average sigma_y from Gaussian fit binned in 4 charge bins
SiPixelTemplateEntry enty[60]
60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fpix] ...
float nxbins_
number of bins in each dimension of the x-splitting template
float yrmsc2m_[4]
1st pass chi2 min search: average y-rms of reconstruction binned in 4 charge bins ...
float sigmavav2
&quot;sigma&quot; scale fctor for Vavilov distribution for 2 merged clusters
float sytwo
rms for one double-pixel y-clusters
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 dytwo_
mean offset/correction for one double-pixel y-clusters
float dxtwo()
mean offset/correction for one double-pixel x-clusters
int id_current_
current id
float ysize()
pixel y-size (microns)
float zsize_
Pixel z-size (thickness)
float chi2xavg[4]
average x chi^2 in 4 charge bins
float xrmsc2m(int i)
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
float yratio_
fractional distance in y between cotbeta templates
float chi2yavgc2m_[4]
1st pass chi2 min search: average y-chisq for merged clusters
float xxratio()
fractional distance in x between cotalpha templates
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 nybins_
number of bins in each dimension of the y-splitting template
float chi2xmin_[4]
minimum of x chi^2 in 4 charge bins
float clsleny
cluster y-length in pixels at signal height symax/2
float xgsig_[4]
sigma from Gaussian fit binned in 4 charge bins
SiPixelTemplate()
Default constructor.