16 #ifndef SiStripTemplate_h
17 #define SiStripTemplate_h 1
23 #include "boost/multi_array.hpp"
25 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
110 #ifndef SI_STRIP_TEMPLATE_USE_BOOST
114 boost::multi_array<SiStripTemplateEntry,1>
enty;
115 boost::multi_array<SiStripTemplateEntry,2>
entx;
145 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
151 bool interpolate(
int id,
float cotalpha,
float cotbeta,
float locBy);
154 bool interpolate(
int id,
float cotalpha,
float cotbeta);
157 void xtemp(
int fxbin,
int lxbin,
float xtemplate[41][
BSXSIZE]);
160 void sxtemp(
float xhit, std::vector<float>& cluster);
168 void xtemp3d(
int j,
int k, std::vector<float>& xtemplate);
171 void xsigma2(
int fxstrp,
int lxstrp,
float sxthr,
float xsum[
BSXSIZE],
float xsig2[BSXSIZE]);
174 float xflcorr(
int binq,
float qflx);
177 int qbin(
int id,
float cotalpha,
float cotbeta,
float qclus);
180 void vavilov_pars(
double& mpv,
double& sigma,
double& kappa);
183 void vavilov2_pars(
double& mpv,
double& sigma,
double& kappa);
194 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
195 if(i < 0 || i > 1) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::qmin called with illegal index = " << i << std::endl;}
205 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
206 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xavg called with illegal index = " << i << std::endl;}
212 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
213 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xrms called with illegal index = " << i << std::endl;}
219 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
220 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xgx0 called with illegal index = " << i << std::endl;}
226 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
227 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xgsig called with illegal index = " << i << std::endl;}
233 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
234 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::chi2xavg called with illegal index = " << i << std::endl;}
240 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
241 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::chi2xmin called with illegal index = " << i << std::endl;}
247 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
248 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xavgc2m called with illegal index = " << i << std::endl;}
254 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
255 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xrmsc2m called with illegal index = " << i << std::endl;}
261 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
262 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xgx0cm2 called with illegal index = " << i << std::endl;}
268 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
269 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xgsigc2m called with illegal index = " << i << std::endl;}
275 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
276 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiPixelTemplate::chi2xavgc2m called with illegal index = " << i << std::endl;}
282 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
283 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiPixelTemplate::chi2xminc2m called with illegal index = " << i << std::endl;}
289 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
290 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xavgbcn called with illegal index = " << i << std::endl;}
296 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
297 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xrmsbcn called with illegal index = " << i << std::endl;}
303 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
304 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xgx0cm2 called with illegal index = " << i << std::endl;}
310 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
311 if(i < 0 || i > 3) {
throw cms::Exception(
"DataCorrupt") <<
"SiStripTemplate::xgsigbcn called with illegal index = " << i << std::endl;}
float xflparlh_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for smaller cotbeta, larger cotalpha.
float clslenx
cluster x-length in strips at signal height sxmax/2
float qmin_
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float zsize()
strip z-size or thickness (microns)
float xavgc2m[4]
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float xrmsbcn_[4]
barycenter: average x-rms of reconstruction binned in 4 charge bins
float xflparll_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for smaller cotbeta, cotalpha.
float xparh_[2][5]
projected x-strip uncertainty parameterization for larger cotalpha
float chi2xminone_
minimum of x chi^2 for 1 strip clusters
float xgx0_[4]
average x0 from Gaussian fit binned in 4 charge bins
float xrms_[4]
average x-rms of reconstruction binned in 4 charge bins
float xavggen[4]
generic algorithm: average x-bias of reconstruction binned in 4 charge bins
float chi2xavgone_
average x chi^2 for 1 strip clusters
float xavgc2m(int i)
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float yratio_
fractional distance in y between y-slices of cotbeta templates
float xrmsgen[4]
generic algorithm: average x-rms of reconstruction binned in 4 charge bins
float beta
beta track angle (defined in CMS CMS IN 2004/014)
float chi2xavgc2m(int i)
1st pass chi2 min search: average x-chisq for merged clusters
float ysize()
strip y-size (microns)
float qbfrac[3]
fraction of sample in qbin = 0-2 (>=3 is the complement)
float qavg_avg
average cluster charge of clusters that are less than qavg (normalize 2-D simple templates) ...
float xavgc2m_[4]
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float mpvvav
most probable charge in Vavilov distribution (not actually for larger kappa)
float xparl_[2][5]
projected x-strip uncertainty parameterization for smaller cotalpha
float sxone_
rms for one strip x-clusters
float qavg_spare
spare cluster charge
float xflparhl_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for larger cotbeta, smaller cotalpha.
void vavilov2_pars(double &mpv, double &sigma, double &kappa)
float xflparhh_[4][6]
Aqfl-parameterized x-correction in 4 charge bins for larger cotbeta, cotalpha.
float chi2xavg(int i)
averaage x chi^2 in 4 charge bins
float costrk[3]
direction cosines of tracks used to generate this entry
float chi2xavgc2m_[4]
1st pass chi2 min search: average x-chisq for merged clusters
float clslenx_
x-cluster length of smaller interpolated template in strips
float sxmax_
average strip signal for x-projection of cluster
std::vector< SiStripTemplateStore > theStripTemp_
float xgsiggen[4]
generic algorithm: average sigma_x from Gaussian fit binned in 4 charge bins
float chi2xavgc2m[4]
1st pass chi2 min search: average x chi^2 in 4 charge bins (merged clusters)
SiStripTemplateEntry enty[31]
60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fstrp] ...
float xsize()
strip x-size (microns)
float chi2xavgone
average x chi^2 for 1 strip clusters
void xtemp(int fxbin, int lxbin, float xtemplate[41][17+4])
float xgsigc2m(int i)
1st pass chi2 min search: average sigma_x from Gaussian fit binned in 4 charge bins ...
float xparly0_[2][5]
projected x-strip uncertainty parameterization for smaller cotbeta (central alpha) ...
void xtemp3d(int j, int k, std::vector< float > &xtemplate)
float xavgbcn_[4]
barycenter: average x-bias of reconstruction binned in 4 charge bins
float xxratio()
fractional distance in x between cotalpha templates
int index_id_
current index
void vavilov_pars(double &mpv, double &sigma, double &kappa)
float chi2xminc2m_[4]
1st pass chi2 min search: minimum x-chisq for merged clusters
float dxone_
mean offset/correction for one strip x-clusters
int id_current_
current id
void xsigma2(int fxstrp, int lxstrp, float sxthr, float xsum[17+4], float xsig2[17+4])
bool success_
true if cotalpha, cotbeta are inside of the acceptance (dynamically loaded)
float qavg()
average cluster charge for this set of track angles
float dxone
mean offset/correction for one strip x-clusters
float kappavav2_
kappa parameter for 2-cluster Vavilov distribution
float xtemp_[9][17+4]
templates for x-reconstruction (binned over 5 central strips)
float chi2xminone()
//!< minimum of x chi^2 for 1 strip clusters
float kappavav_
kappa parameter for Vavilov distribution
float xflpar[4][6]
Aqfl-parameterized x-correction in 4 charge bins.
float sxparmax_
maximum strip signal for parameterization of x uncertainties
int qbin(int id, float cotalpha, float cotbeta, float qclus)
float sigmavav2
"sigma" scale fctor for Vavilov distribution for 2 merged clusters
float xavg[4]
average x-bias of reconstruction binned in 4 charge bins
int runnum
< Basic template entry corresponding to a single set of track angles
float xtemp[9][17]
templates for x-reconstruction (binned over 1 central strip)
float kappavav2
kappa parameter for Vavilov distribution for 2 merged clusters
float xgsig(int i)
average sigma_x from Gaussian fit binned in 4 charge bins
float xrmsbcn(int i)
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
float lorxwidth()
signed lorentz x-width (microns)
float xgsig_[4]
sigma from Gaussian fit binned in 4 charge bins
float xavgbcn[4]
barycenter: average x-bias of reconstruction binned in 4 charge bins
float xgx0(int i)
average x0 from Gaussian fit binned in 4 charge bins
float qavg_avg_
average of cluster charge less than qavg
SiStripTemplateEntry entx[5][73]
29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5...
float xpar0_[2][5]
projected x-strip uncertainty parameterization for central cotalpha
float xflcorr(int binq, float qflx)
float qmin()
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float syparmax_
maximum strip signal for parameterization of y-slice x uncertainties
float chi2xavg[4]
average x chi^2 in 4 charge bins
float lorxwidth_
Lorentz x-width.
float sigmavav2_
"sigma" scale fctor for 2-cluster Vavilov distribution
float sigmavav_
"sigma" scale fctor for Vavilov distribution
float sigmavav()
"sigma" scale fctor for Vavilov distribution
bool pushfile(int filenum)
void xtemp3d_int(int nxpix, int &nxbins)
SiStripTemplateHeader head
< template storage structure
int cxtemp()
Return central pixel of x-template pixels above readout threshold.
float chi2xminc2m[4]
1st pass chi2 min search: minimum of x chi^2 in 4 charge bins (merged clusters)
float xavg(int i)
average x-bias of reconstruction binned in 4 charge bins
float qavg_
average cluster charge for this set of track angles
float dxone()
mean offset/correction for one strip x-clusters
SiStripTemplate()
Default constructor.
float xgx0c2m(int i)
1st pass chi2 min search: average x0 from Gaussian fit binned in 4 charge bins
float fracxone
fraction of sample with xsize = 1
float yxratio_
fractional distance in y between x-slices of cotalpha templates
float mpvvav2
most probable charge in Vavilov distribution for 2 merged clusters (not actually for larger kappa) ...
float xrmsbcn[4]
barycenter: average x-rms of reconstruction binned in 4 charge bins
float mpvvav2_
most probable charge in 2-cluster Vavilov distribution (not actually for larger kappa) ...
float xgx0c2m_[4]
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float sxone
rms for one strip x-clusters
float clslenx()
x-size of smaller interpolated template in strips
float xavg_[4]
average x-bias of reconstruction binned in 4 charge bins
float qscale()
charge scaling factor
float sxtwo_
rms for one double-strip x-clusters
float abs_cotb_
absolute value of cot beta
float dxtwo_
mean offset/correction for one double-strip x-clusters
float yratio()
fractional distance in y between cotbeta templates
float cotb_current_
current cot beta
float chi2xavg_[4]
average x chi^2 in 4 charge bins
float xavgbcn(int i)
1st pass chi2 min search: average x-bias of reconstruction binned in 4 charge bins ...
float nxbins_
number of bins in each dimension of the x-splitting template
float chi2xavgone()
//!< average x chi^2 for 1 strip clusters
float xparhy0_[2][5]
projected x-strip uncertainty parameterization for larger cotbeta (central alpha) ...
float chi2xmin(int i)
minimum y chi^2 in 4 charge bins
float xgx0c2m[4]
1st pass chi2 min search: average x0 from Gaussian fit binned in 4 charge bins
float xrms(int i)
average x-rms of reconstruction binned in 4 charge bins
float kappavav
kappa parameter for Vavilov distribution
float xgx0bcn(int i)
1st pass chi2 min search: average x0 from Gaussian fit binned in 4 charge bins
float s50()
1/2 of the strip threshold signal in electrons
float chi2xminone
minimum of x chi^2 for 1 strip clusters
float qavg
average cluster charge for this set of track angles (now includes threshold effects) ...
float xrmsc2m(int i)
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
float pixmax_
maximum strip charge
void sxtemp(float xhit, std::vector< float > &cluster)
float alpha
alpha track angle (defined in CMS CMS IN 2004/014)
boost::multi_array< float, 2 > temp2dx_
2d-primitive for spltting 3-d template
float qscale_
charge scaling factor
float sxone()
rms for one strip x-clusters
float xgx0bcn[4]
barycenter: average x0 from Gaussian fit binned in 4 charge bins
float xgx0gen[4]
generic algorithm: average x0 from Gaussian fit binned in 4 charge bins
float xgsigbcn[4]
barycenter: average sigma_x from Gaussian fit binned in 4 charge bins
float chi2xminc2m(int i)
1st pass chi2 min search: minimum x-chisq for merged clusters
float xxratio_
fractional distance in x between cotalpha templates
float cotalpha
cot(alpha) is proportional to cluster length in x and is basis of interpolation
float kappavav()
kappa parameter for Vavilov distribution
float ysize_
Pixel y-size.
float sxmax()
average strip signal for x-projection of cluster
float mpvvav()
most probable charge in Vavilov distribution (not actually for larger kappa)
float chi2xmin[4]
minimum of x chi^2 in 4 charge bins
float sigmavav
"sigma" scale fctor for Vavilov distribution
float s50_
1/2 of the strip threshold signal in adc units
float yxratio()
fractional distance in y between cotalpha templates slices
float xgx0[4]
average x0 from Gaussian fit binned in 4 charge bins
float xrms[4]
average x-rms of reconstruction binned in 4 charge bins
float mpvvav_
most probable charge in Vavilov distribution (not actually for larger kappa)
float xpar[2][5]
projected x-strip uncertainty parameterization
float zsize_
Pixel z-size (thickness)
float xgsigbcn_[4]
barycenter: average x-rms of reconstruction binned in 4 charge bins
float qmin2_
tighter minimum cluster charge for valid hit (keeps 99.8% of simulated hits)
float xgsigc2m_[4]
1st pass chi2 min search: average x-rms of reconstruction binned in 4 charge bins ...
bool interpolate(int id, float cotalpha, float cotbeta, float locBy)
float qmin2
tighter minimum cluster charge for valid hit (keeps 99.8% of simulated hits)
float sxmax
average strip signal for x-projection of cluster
float qmin(int i)
minimum cluster charge for valid hit (keeps 99.9% or 99.8% of simulated hits)
float xrmsc2m_[4]
1st pass chi2 min search: average x-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 xsize_
Pixel x-size.
float chi2xmin_[4]
minimum of x chi^2 in 4 charge bins
float xgsigbcn(int i)
1st pass chi2 min search: average sigma_x from Gaussian fit binned in 4 charge bins ...
float xgx0bcn_[4]
barycenter: average x-bias of reconstruction 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 xgsig[4]
average sigma_x from Gaussian fit binned in 4 charge bins
float cotbeta
cot(beta) is proportional to cluster length in y and is basis of interpolation
float qmin
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float cota_current_
current cot alpha