CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelGenError.h
Go to the documentation of this file.
1 //
2 // SiPixelGenError.h (v1.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 //
9 
10 // Build the template storage structure from several pieces
11 
12 #ifndef SiPixelGenError_h
13 #define SiPixelGenError_h 1
14 
15 
16 #include<vector>
17 #include<cassert>
18 
19 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
22 #endif
23 
25  int runnum;
26  float cotalpha;
27  float cotbeta;
28  float qavg;
29  float pixmax;
30  float dyone;
31  float syone;
32  float dxone;
33  float sxone;
34  float dytwo;
35  float sytwo;
36  float dxtwo;
37  float sxtwo;
38  float qmin;
39  float qmin2;
40  float yavggen[4];
41  float yrmsgen[4];
42  float xavggen[4];
43  float xrmsgen[4];
44 } ;
45 
46 
47 
48 
49 
51  int ID;
52  int NTy;
53  int NTyx;
54  int NTxx;
55  int Dtype;
56  float qscale;
57  float lorywidth;
58  float lorxwidth;
59  float lorybias;
60  float lorxbias;
61  float Vbias;
62  float temperature;
63  float fluence;
64  float s50;
65  float ss50;
66  char title[80];
68  float Bfield;
69  float fbin[3];
70  float xsize;
71  float ysize;
72  float zsize;
73 } ;
74 
75 
76 
79  float cotbetaY[60];
80  float cotbetaX[5];
81  float cotalphaX[29];
84 } ;
85 
86 
87 // ******************************************************************************************
101 // ******************************************************************************************
103  public:
104  SiPixelGenError(const std::vector< SiPixelGenErrorStore > & thePixelTemp) : thePixelTemp_(thePixelTemp) { id_current_ = -1; index_id_ = -1;}
105 
106  static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > & thePixelTemp_); // load the private store with info from the
107  // file with the index (int) filenum
108 
109 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
110  static bool pushfile(const SiPixelGenErrorDBObject& dbobject, std::vector< SiPixelGenErrorStore > & thePixelTemp_); // load the private store with info from db
111 #endif
112 
113 // initialize the binary search information;
114  static void postInit(std::vector< SiPixelGenErrorStore > & thePixelTemp_);
115 
116 
117 // 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.
118  int qbin(int id, float cotalpha, float cotbeta, float locBz, float qclus, float& pixmx, float& sigmay, float& deltay, float& sigmax, float& deltax,
119  float& sy1, float& dy1, float& sy2, float& dy2, float& sx1, float& dx1, float& sx2, float& dx2);
120  // Overloaded method to provide only the LA parameters
121  int qbin(int id);
122 
123  float lorywidth() {return lorywidth_;}
124  float lorxwidth() {return lorxwidth_;}
125  float lorybias() {return lorybias_;}
126  float lorxbias() {return lorxbias_;}
127 
128  float fbin(int i) {
129 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
130  if(i < 0 || i > 2) {throw cms::Exception("DataCorrupt") << "SiPixelTemplate::chi2xminc2m called with illegal index = " << i << std::endl;}
131 #else
132  assert(i>=0 && i<3);
133 #endif
134  return fbin_[i];}
135  float xsize() {return xsize_;}
136  float ysize() {return ysize_;}
137  float zsize() {return zsize_;}
138 
139  private:
140 
141  // Keep current template interpolaion parameters
142 
144  int index_id_;
145 
146 
147  // Keep results of last interpolation to return through member functions
148 
149  float lorxwidth_;
150  float lorywidth_;
151  float lorxbias_;
152  float lorybias_;
153  float fbin_[3];
154  float xsize_;
155  float ysize_;
156  float zsize_;
157 
158 
159  // The actual template store is a std::vector container
160 
161  const std::vector< SiPixelGenErrorStore > & thePixelTemp_;
162 } ;
163 
164 
165 #endif
float xsize_
Pixel x-size.
int i
Definition: DBlmapReader.cc:9
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
&lt; 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
assert(m_qm.get())
int NTxx
number of Template x-entries in each slice
float fbin[3]
The QBin definitions in Q_clus/Q_avg.
float syone
rms for one pixel y-clusters
float ysize_
Pixel y-size.
float zsize
pixel size (for future use in upgraded geometry)
SiPixelGenErrorEntry enty[60]
60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fpix] ...
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)
static void postInit(std::vector< SiPixelGenErrorStore > &thePixelTemp_)
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
float fbin_[3]
The QBin definitions in Q_clus/Q_avg.
int ID
&lt; 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
&lt; template storage structure
float lorxwidth_
Lorentz x-width.
float ysize
pixel size (for future use in upgraded geometry)
char title[80]
template title
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
static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > &thePixelTemp_)
float pixmax
maximum charge for individual pixels in cluster
float sxtwo
rms 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)
SiPixelGenErrorEntry entx[5][29]
29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5...
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