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;
141 SiStripTemplate(
const std::vector< SiStripTemplateStore > & theStripTemp) : theStripTemp_(theStripTemp) {id_current_ = -1; index_id_ = -1; cota_current_ = 0.; cotb_current_ = 0.;}
142 static bool pushfile(
int filenum, std::vector< SiStripTemplateStore > & theStripTemp_);
145 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 146 static bool pushfile(
const SiPixelTemplateDBObject& dbobject, std::vector< SiStripTemplateStore > & theStripTemp_);
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);
166 void xtemp3d_int(
int nxpix,
int& nxbins);
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);
188 float s50() {
return s50_;}
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;}
199 if(i==0){
return qmin_;}
else{
return qmin2_;}}
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;}
238 return chi2xavg_[
i];}
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;}
245 return chi2xmin_[
i];}
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;}
273 return xgsigc2m_[
i];}
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;}
280 return chi2xavgc2m_[
i];}
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;}
287 return chi2xminc2m_[
i];}
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;}
315 return xgsigbcn_[
i];}
356 float xparly0_[2][5];
357 float xparhy0_[2][5];
369 float xflparll_[4][6];
370 float xflparlh_[4][6];
371 float xflparhl_[4][6];
372 float xflparhh_[4][6];
379 float chi2xavgc2m_[4];
380 float chi2xminc2m_[4];
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 chi2xminone_
minimum of x chi^2 for 1 strip clusters
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 mpvvav
most probable charge in Vavilov distribution (not actually for larger kappa)
float sxone_
rms for one strip x-clusters
float qavg_spare
spare cluster charge
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 clslenx_
x-cluster length of smaller interpolated template in strips
float sxmax_
average strip signal for x-projection of cluster
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)
SiStripTemplate(const std::vector< SiStripTemplateStore > &theStripTemp)
Default constructor.
float xsize()
strip x-size (microns)
float chi2xavgone
average x chi^2 for 1 strip clusters
float xgsigc2m(int i)
1st pass chi2 min search: average sigma_x from Gaussian fit binned in 4 charge bins ...
float xxratio()
fractional distance in x between cotalpha templates
int index_id_
current index
float dxone_
mean offset/correction for one strip x-clusters
int id_current_
current id
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 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
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 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
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
SiStripTemplateHeader head
< template storage structure
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
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 sxone
rms for one strip x-clusters
float clslenx()
x-size of smaller interpolated template in strips
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
const std::vector< SiStripTemplateStore > & theStripTemp_
float cotb_current_
current cot beta
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 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
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
static const G4double kappa
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 qmin2_
tighter minimum cluster charge for valid hit (keeps 99.8% of simulated hits)
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 xsize_
Pixel x-size.
float xgsigbcn(int i)
1st pass chi2 min search: average sigma_x 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 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