27 #ifndef SiPixelTemplate2D_h 28 #define SiPixelTemplate2D_h 1 32 #include "boost/multi_array.hpp" 34 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 111 if (entry!=
nullptr) {
143 SiPixelTemplate2D(
const std::vector< SiPixelTemplateStore2D > & thePixelTemp) : thePixelTemp_(thePixelTemp) {id_current_ = -1; index_id_ = -1; cota_current_ = 0.; cotb_current_ = 0.;}
147 static bool pushfile(
int filenum, std::vector< SiPixelTemplateStore2D > & pixelTemp,
std::string dir =
"");
149 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 155 void sideload(
SiPixelTemplateEntry2D*
entry,
int iDtype,
float locBx,
float locBz,
float lorwdy,
float lorwdx,
float q50,
float fbin[3],
float xsize,
float ysize,
float zsize);
165 bool xytemp(
float xhit,
float yhit,
bool ydouble[
BYM2],
bool xdouble[
BXM2],
float template2d[BXM2][BYM2],
bool dervatives,
float dpdx2d[2][BXM2][BYM2],
float& QTemplate);
169 bool xytemp(
float xhit,
float yhit,
bool ydouble[BYM2],
bool xdouble[BXM2],
float template2d[BXM2][BYM2]);
173 bool xytemp(
int id,
float cotalpha,
float cotbeta,
float xhit,
float yhit, std::vector<bool>& ydouble, std::vector<bool>& xdouble,
float template2d[BXM2][BYM2]);
175 void xysigma2(
float qpixel,
int index,
float& xysig2);
179 void landau_par(
float lanpar[2][5]);
184 float s50() {
return s50_;}
186 float scalex(
int i) {
if(checkIllegalIndex(
"scalex",3,i)) {
return scalex_[
i];}
else {
return 0.f;}}
187 float scaley(
int i) {
if(checkIllegalIndex(
"scaley",3,i)) {
return scaley_[
i];}
else {
return 0.f;}}
188 float offsetx(
int i) {
if(checkIllegalIndex(
"offsetx",3,i)) {
return offsetx_[
i];}
else {
return 0.f;}}
189 float offsety(
int i) {
if(checkIllegalIndex(
"offsety",3,i)) {
return offsety_[
i];}
else {
return 0.f;}}
190 float fbin(
int i) {
if(checkIllegalIndex(
"fbin",2,i)) {
return fbin_[
i];}
else {
return 0.f;}}
217 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 218 if(i < 0 || i > indMax) {
throw cms::Exception(
"DataCorrupt") <<
"SiPixelTemplate2D::"<< whichMethod <<
" called with illegal index = " << i << std::endl;}
220 assert(i>=0 && i<indMax+1);
265 float xypary0x0_[2][5];
266 float xypary1x0_[2][5];
267 float xypary0x1_[2][5];
float pixmax
maximum charge for individual pixels in cluster
bool checkIllegalIndex(const std::string whichMethod, int indMax, int i)
float adcotb_
fractional pixel distance of cot(beta) from iy0_
float kappavav_
kappa parameter in Vavilov distribution
float deltacota_
cot(alpha) bin size
float delyavg()
average difference between clsleny_ and cluster length [with threshold effects]
float chi2ppix_
average chi^2 per struck pixel
float xsize()
pixel x-size (microns)
int jx1_
index of next-nearest cot(alpha) bin
float chi2avgone
average y chi^2 for 1 pixel clusters
float qavg
average cluster charge for this set of track angles
float chi2ppix()
average chi^2 per struck pixel
int runnum
< Basic template entry corresponding to a single set of track angles
int jx0_
index of nearest cot(alpha) bin
float deltacotb_
cot(beta) bin size
SiPixelTemplateHeader2D head
< template storage structure
float qavg_
average cluster charge for this set of track angles
float cotalpha1_
maximum cot(alpha) covered
float xsize_
Pixel x-size.
int Dtype_
flags BPix (=0) or FPix (=1)
float scalexavg()
x-reco error scaling factor
bool flip_y_
flip y sign-sensitive quantities
float clslenx_
projected x-length of cluster
float clsleny
cluster y-length in pixels at signal height symax/2
float sxymax
average pixel signal for use of the error parameterization
float xypar[2][5]
pixel uncertainty parameterization
float chi2avgone_
average chi^2 for 1 pixel clusters
float scaleyavg
average y-error scale factor
float chi2minone
minimum of y chi^2 for 1 pixel clusters
float delyavg_
average difference between clsleny_ and cluster length [with threshold effects]
float sxymax_
average pixel signal for y-projection of cluster
int Nxx_
number of cot(alpha)-entries (rows) in template
int index_id_
current index
float delyavg
average length difference between template and cluster
float delysig
rms of length difference between template and cluster
float scaleyavg()
y-reco error scaling factor
float scalexavg_
average x-error scale factor
float chi2scale_
scale factor for chi2 distribution
float s50()
1/2 of the pixel threshold signal in adc units
float lorydrift_
Lorentz y-drift.
const SiPixelTemplateEntry2D * entry01_
float offsetx(int i)
x-offset in 4 charge bins
float cotbeta
cot(beta) is proportional to cluster length in y and is basis of interpolation
int iymax
the maximum nonzero pixel yindex in template (saves time during interpolation)
float adcota_
fractional pixel distance of cot(alpha) from jx0_
float clslenx()
cluster x-size
float sigmavav_
scale factor in Vavilov distribution
int storesize()
return the size of the template store (the number of stored IDs
int imin_
min y index of templated cluster
int iymin
the minimum nonzero pixel yindex in template (saves time during interpolation)
short int xytemp[7][7][21][7]
templates for y-reconstruction (binned over 1 central pixel)
float chi2avgone()
average y chi^2 for 1 pixel clusters
const SiPixelTemplateEntry2D * entry00_
float mpvvav
most probable charge in Vavilov distribution (not actually for larger kappa)
float s50_
1/2 of the pixel threshold signal in adc units
float cotbeta0_
minimum cot(beta) covered
float scalex[4]
x-error scale factor in 4 charge bins
int jxmax
the maximum nonzero pixel xindex in template (saves time during interpolation)
int imax_
max y index of templated cluster
float lanpar[2][5]
pixel landau distribution parameters
float costrk[3]
direction cosines of tracks used to generate this entry
float offsetx[4]
x-offset in 4 charge bins
float chi2minone_
minimum of chi^2 for 1 pixel clusters
float scalex(int i)
x-error scale factor in 4 charge bins
float lorxdrift_
Lorentz x-drift.
int jxmin
the minimum nonzero pixel xindex in template (saves time during interpolation)
float chi2minone()
minimum of y chi^2 for 1 pixel clusters
float cotalpha0_
minimum cot(alpha) covered
float chi2scale()
scale factor for chi^2 distribution
float sigmavav
"sigma" scale fctor for Vavilov distribution
float cotalpha
cot(alpha) is proportional to cluster length in x and is basis of interpolation
float lorxdrift()
signed lorentz x-width (microns)
const SiPixelTemplateEntry2D * entry10_
float mpvvav()
most probable Q in Vavilov distribution
int iy1_
index of next-nearest cot(beta) bin
float clsleny_
projected y-length of cluster
bool flip_x_
flip x sign-sensitive quantities
float zsize_
Pixel z-size (thickness)
SiPixelTemplate2D(const std::vector< SiPixelTemplateStore2D > &thePixelTemp)
Default constructor.
float offsety[4]
y-offset in 4 charge bins
int Nyx_
number of cot(beta)-entries (columns) in template
float chi2scale
scale factor for the chi2 distribution
float clslenx
cluster x-length in pixels at signal height sxmax/2
float kappavav()
kappa parameter in Vavilov distribution
float cota_current_
current cot alpha
float pixmax()
maximum pixel charge
float lorxwidth_
Lorentz x-width.
float lorydrift()
signed lorentz y-width (microns)
float sxymax()
max pixel signal for pixel error calculation
float pixmax_
maximum pixel charge
float cotbeta1_
maximum cot(beta) covered
float scalexavg
average x-error scale factor
int jmax_
max x index of templated cluster
float mpvvav_
most probable Q in Vavilov distribution
float ysize()
pixel y-size (microns)
float sizex()
return x size of template cluster
float qscale()
charge scaling factor
float sizey()
return y size of template cluster
float scaley[4]
y-error scale factor in 4 charge bins
float qavg()
average cluster charge for this set of track angles
float fbin(int i)
Return lower bound of Qbin definition.
bool success_
true if cotalpha, cotbeta are inside of the acceptance (dynamically loaded)
float ysize_
Pixel y-size.
float scaleyavg_
average y-error scale factor
float cotb_current_
current cot beta
float chi2ppix
average chi^2 per pixel
float delysig()
rms difference between clsleny_ and cluster length [with threshold effects]
float zsize()
pixel z-size or thickness (microns)
float offsety(int i)
y-offset in 4 charge bins
float lorywidth_
Lorentz y-width (sign corrected for fpix frame)
float qscale_
charge scaling factor
int iy0_
index of nearest cot(beta) bin
const std::vector< SiPixelTemplateStore2D > & thePixelTemp_
float kappavav
kappa parameter for Vavilov distribution
float clsleny()
cluster y-size
int id_current_
current id
int jmin_
min x index of templated cluster
float delysig_
rms of difference between clsleny_ and cluster length [with threshold effects]
float sigmavav()
scale factor in Vavilov distribution
float scaley(int i)
y-error scale factor in 4 charge bins