49 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
60 #include "Math/DistFunc.h"
64 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
68 #define LOGERROR(x) edm::LogError(x)
69 #define LOGDEBUG(x) LogDebug(x)
77 #define LOGERROR(x) std::cout << x << ": "
78 #define LOGDEBUG(x) std::cout << x << ": "
79 #define ENDL std::endl
82 using namespace SiPixelTemplateReco;
126 std::vector<bool>& ydouble, std::vector<bool>& xdouble,
128 float& yrec,
float& sigmay,
float& proby,
float& xrec,
float& sigmax,
float& probx,
int& qbin,
int speed,
bool deadpix, std::vector<std::pair<int, int> >& zeropix,
133 int i,
j,
k, minbin, binl, binh, binq, midpix, fypix, nypix, lypix, logypx;
134 int fxpix, nxpix, lxpix, logxpx, shifty, shiftx, nyzero[
TYSIZE];
136 int deltaj, jmin, jmax, fxbin, lxbin, fybin, lybin, djy, djx;
138 float sythr, sxthr, rnorm,
delta, sigma, sigavg, pseudopix, qscale, q50;
139 float ss2, ssa, sa2, ssba, saba, sba2, rat, fq, qtotal, qpixel;
140 float originx, originy, qfy, qly, qfx, qlx, bias,
maxpix, minmax;
141 double chi2x, meanx, chi2y, meany, chi2ymin, chi2xmin, chi21max;
142 double hchi2, hndof, prvav, mpv, sigmaQ,
kappa, xvav, beta2;
144 float chi2ybin[41], chi2xbin[41], ysig2[
BYSIZE], xsig2[
BXSIZE];
146 bool yd[
BYSIZE], xd[
BXSIZE], anyyd, anyxd, calc_probQ, use_VVIObj;
148 const float probmin={1.110223e-16};
149 const float probQmin={1.e-5};
153 const double mean1pix={0.100}, chi21min={0.160};
158 if(!templ.
interpolate(
id, cotalpha, cotbeta, locBz)) {
159 if (
theVerboseLevel > 2) {
LOGDEBUG(
"SiPixelTemplateReco") <<
"input cluster direction cot(alpha) = " << cotalpha <<
", cot(beta) = " << cotbeta<<
", local B_z = " << locBz <<
", template ID = " <<
id <<
", no reconstruction performed" <<
ENDL;}
173 if(speed < -1) use_VVIObj =
true;
179 if(speed < 5) use_VVIObj =
true;
185 xsize = templ.
xsize();
186 ysize = templ.
ysize();
191 pseudopix = 0.2f*q50;
199 if(cluster.num_dimensions() != 2) {
200 LOGERROR(
"SiPixelTemplateReco") <<
"input cluster container (BOOST Multiarray) has wrong number of dimensions" <<
ENDL;
203 nclusx = (int)cluster.shape()[0];
204 nclusy = (int)cluster.shape()[1];
205 if(nclusx != (
int)xdouble.size()) {
206 LOGERROR(
"SiPixelTemplateReco") <<
"input cluster container x-size is not equal to double pixel flag container size" <<
ENDL;
209 if(nclusy != (
int)ydouble.size()) {
210 LOGERROR(
"SiPixelTemplateReco") <<
"input cluster container y-size is not equal to double pixel flag container size" <<
ENDL;
221 for(j=0; j<nclusx; ++
j)
222 for(i=0; i<nclusy; ++
i)
223 if(cluster[j][i] > 0) {cluster[
j][
i] *= qscale;}
229 for(i=0; i<nclusy; ++
i) {
231 if(ydouble[i]) {maxpix *=2.f;}
232 for(j=0; j<nclusx; ++
j) {
233 qtotal += cluster[
j][
i];
234 if(cluster[j][i] > maxpix) {cluster[
j][
i] =
maxpix;}
241 fypix =
BYM3; lypix = -1;
242 for(i=0; i<nclusy; ++
i) {
243 ysum[
i] = 0.f; nyzero[
i] = 0;
245 for(j=0; j<nclusx; ++
j) {
246 ysum[
i] += cluster[
j][
i];
250 if(i < fypix) {fypix =
i;}
251 if(i > lypix) {lypix =
i;}
259 std::vector<std::pair<int, int> >::const_iterator zeroIter = zeropix.begin(), zeroEnd = zeropix.end();
260 for ( ; zeroIter != zeroEnd; ++zeroIter ) {
261 i = zeroIter->second;
262 if(i<0 || i>
TYSIZE-1) {
LOGERROR(
"SiPixelTemplateReco") <<
"dead pixel column y-index " << i <<
", no reconstruction performed" <<
ENDL;
268 if(i < fypix) {fypix =
i;}
269 if(i > lypix) {lypix =
i;}
272 nypix = lypix-fypix+1;
276 for (zeroIter = zeropix.begin(); zeroIter != zeroEnd; ++zeroIter ) {
277 i = zeroIter->second; j = zeroIter->first;
278 if(j<0 || j>
TXSIZE-1) {
LOGERROR(
"SiPixelTemplateReco") <<
"dead pixel column x-index " << j <<
", no reconstruction performed" <<
ENDL;
280 if((i == fypix || i == lypix) && nypix > 1) {maxpix = templ.
symax()/2.;}
else {maxpix = templ.
symax();}
281 if(ydouble[i]) {maxpix *=2.;}
282 if(nyzero[i] > 0 && nyzero[i] < 3) {qpixel = (maxpix - ysum[
i])/(
float)nyzero[
i];}
else {qpixel = 1.;}
283 if(qpixel < 1.) {qpixel = 1.;}
284 cluster[
j][
i] = qpixel;
293 for(i=0; i<
BYSIZE; ++
i) { ysum[
i] = 0.f; yd[
i] =
false;}
296 for(i=0; i<nclusy; ++
i) {
297 for(j=0; j<nclusx; ++
j) {
298 ysum[
k] += cluster[
j][
i];
314 if(k >
BYM1) {
break;}
319 for(i=0; i<
BXSIZE; ++
i) { xsum[
i] = 0.f; xd[
i] =
false;}
322 for(j=0; j<nclusx; ++
j) {
323 for(i=0; i<nclusy; ++
i) {
324 xsum[
k] += cluster[
j][
i];
340 if(k >
BXM1) {
break;}
351 if(fypix == -1) {fypix =
i;}
353 ysort[logypx] = ysum[
i];
365 if((lypix-fypix+1) != nypix || nypix == 0) {
366 LOGDEBUG(
"SiPixelTemplateReco") <<
"y-length of pixel cluster doesn't agree with number of pixels above threshold" <<
ENDL;
368 LOGDEBUG(
"SiPixelTemplateReco") <<
"ysum[] = ";
369 for(i=0; i<BYSIZE-1; ++
i) {
LOGDEBUG(
"SiPixelTemplateReco") << ysum[
i] <<
", ";}
370 LOGDEBUG(
"SiPixelTemplateReco") << ysum[BYSIZE-1] <<
ENDL;
379 LOGDEBUG(
"SiPixelTemplateReco") <<
"y-length of pixel cluster is larger than maximum template size" <<
ENDL;
381 LOGDEBUG(
"SiPixelTemplateReco") <<
"ysum[] = ";
382 for(i=0; i<BYSIZE-1; ++
i) {
LOGDEBUG(
"SiPixelTemplateReco") << ysum[
i] <<
", ";}
383 LOGDEBUG(
"SiPixelTemplateReco") << ysum[BYSIZE-1] <<
ENDL;
396 midpix = (fypix+lypix)/2;
397 shifty = templ.
cytemp() - midpix;
399 for(i=lypix; i>=fypix; --
i) {
400 ysum[i+shifty] = ysum[
i];
402 yd[i+shifty] = yd[
i];
405 }
else if (shifty < 0) {
406 for(i=fypix; i<=lypix; ++
i) {
407 ysum[i+shifty] = ysum[
i];
409 yd[i+shifty] = yd[
i];
418 if(fypix > 1 && fypix <
BYM2) {
419 ysum[fypix-1] = pseudopix;
420 ysum[fypix-2] = pseudopix;
422 if(lypix > 1 && lypix <
BYM2) {
423 ysum[lypix+1] = pseudopix;
424 ysum[lypix+2] = pseudopix;
443 if(fxpix == -1) {fxpix =
i;}
445 xsort[logxpx] = xsum[
i];
457 if((lxpix-fxpix+1) != nxpix) {
459 LOGDEBUG(
"SiPixelTemplateReco") <<
"x-length of pixel cluster doesn't agree with number of pixels above threshold" <<
ENDL;
461 LOGDEBUG(
"SiPixelTemplateReco") <<
"xsum[] = ";
462 for(i=0; i<BXSIZE-1; ++
i) {
LOGDEBUG(
"SiPixelTemplateReco") << xsum[
i] <<
", ";}
463 LOGDEBUG(
"SiPixelTemplateReco") << ysum[BXSIZE-1] <<
ENDL;
473 LOGDEBUG(
"SiPixelTemplateReco") <<
"x-length of pixel cluster is larger than maximum template size" <<
ENDL;
475 LOGDEBUG(
"SiPixelTemplateReco") <<
"xsum[] = ";
476 for(i=0; i<BXSIZE-1; ++
i) {
LOGDEBUG(
"SiPixelTemplateReco") << xsum[
i] <<
", ";}
477 LOGDEBUG(
"SiPixelTemplateReco") << ysum[BXSIZE-1] <<
ENDL;
490 midpix = (fxpix+lxpix)/2;
491 shiftx = templ.
cxtemp() - midpix;
493 for(i=lxpix; i>=fxpix; --
i) {
494 xsum[i+shiftx] = xsum[
i];
496 xd[i+shiftx] = xd[
i];
499 }
else if (shiftx < 0) {
500 for(i=fxpix; i<=lxpix; ++
i) {
501 xsum[i+shiftx] = xsum[
i];
503 xd[i+shiftx] = xd[
i];
512 if(fxpix > 1 && fxpix <
BXM2) {
513 xsum[fxpix-1] = pseudopix;
514 xsum[fxpix-2] = pseudopix;
516 if(lxpix > 1 && lxpix <
BXM2) {
517 xsum[lxpix+1] = pseudopix;
518 xsum[lxpix+2] = pseudopix;
531 fq = qtotal/templ.
qavg();
549 if(!deadpix && qtotal < 0.95
f*templ.
qmin()) {qbin = 5;}
else {
550 if(!deadpix && qtotal < 0.95
f*templ.
qmin(1)) {qbin = 4;}
555 " cot(alpha) = " << cotalpha <<
" cot(beta) = " << cotbeta <<
556 " nclusx = " << nclusx <<
" nclusy = " << nclusy <<
ENDL;
564 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
565 if(speed < 0 || speed > 3) {
566 throw cms::Exception(
"DataCorrupt") <<
"SiPixelTemplateReco::PixelTempReco2D called with illegal speed = " << speed << std::endl;
569 assert(speed >= 0 && speed < 4);
571 fybin = 2; lybin = 38; fxbin = 2; lxbin = 38; djy = 1; djx = 1;
573 fybin = 8; lybin = 32;
574 if(yd[fypix]) {fybin = 4; lybin = 36;}
576 if(yd[lypix-1]) {fybin = 4; lybin = 36;}
578 fxbin = 8; lxbin = 32;
579 if(xd[fxpix]) {fxbin = 4; lxbin = 36;}
581 if(xd[lxpix-1]) {fxbin = 4; lxbin = 36;}
588 if(!anyyd) {djy = 4;}
589 if(!anyxd) {djx = 4;}
595 "fypix " << fypix <<
" lypix = " << lypix <<
596 " fybin = " << fybin <<
" lybin = " << lybin <<
597 " djy = " << djy <<
" logypx = " << logypx <<
ENDL;
599 "fxpix " << fxpix <<
" lxpix = " << lxpix <<
600 " fxbin = " << fxbin <<
" lxbin = " << lxbin <<
601 " djx = " << djx <<
" logxpx = " << logxpx <<
ENDL;
606 templ.
ytemp(fybin, lybin, ytemp);
608 templ.
xtemp(fxbin, lxbin, xtemp);
619 if(yd[i] && !yd[i+1]) {
620 for(j=fybin; j<=lybin; ++
j) {
624 sigavg = (ytemp[
j][
i] + ytemp[
j][i+1])/2.
f;
625 ytemp[
j][
i] = sigavg;
626 ytemp[
j][i+1] = sigavg;
637 sythr = 1.1*(templ.
symax());
642 if(logypx == 1) {sythr = 1.01f*ysort[0];}
else {
643 if (ysort[1] > sythr) { sythr = 1.01f*ysort[1]; }
649 templ.
ysigma2(fypix, lypix, sythr, ysum, ysig2);
654 for(i=fybin; i<=lybin; ++
i) { chi2ybin[
i] = -1.e15f;}
656 for(i=fypix-2; i<=lypix+2; ++
i) {
657 yw2[
i] = 1.f/ysig2[
i];
658 ysw[
i] = ysum[
i]*yw2[
i];
659 ss2 += ysum[
i]*ysw[
i];
667 for(j=jmin; j<=jmax; j+=deltaj) {
668 if(chi2ybin[j] < -100.
f) {
671 for(i=fypix-2; i<=lypix+2; ++
i) {
672 ssa += ysw[
i]*ytemp[
j][
i];
673 sa2 += ytemp[
j][
i]*ytemp[
j][
i]*yw2[
i];
676 if(rat <= 0.
f) {
LOGERROR(
"SiPixelTemplateReco") <<
"illegal chi2ymin normalization (1) = " << rat <<
ENDL; rat = 1.;}
677 chi2ybin[
j]=ss2-2.f*ssa/rat+sa2/(rat*rat);
679 if(chi2ybin[j] < chi2ymin) {
680 chi2ymin = chi2ybin[
j];
685 if(minbin > fybin) {jmin = minbin - deltaj;}
else {jmin = fybin;}
686 if(minbin < lybin) {jmax = minbin + deltaj;}
else {jmax = lybin;}
691 "minbin " << minbin <<
" chi2ymin = " << chi2ymin <<
ENDL;
699 delta = templ.
dyone();
700 sigma = templ.
syone();
702 delta = templ.
dytwo();
703 sigma = templ.
sytwo();
706 yrec = 0.5f*(fypix+lypix-2*shifty+2.f*originy)*ysize-delta;
715 chi21max = fmax(chi21min, (
double)templ.
chi2yminone());
717 if(chi2ymin < 0.) {chi2ymin = 0.;}
719 meany = fmax(mean1pix, (
double)templ.
chi2yavgone());
720 hchi2 = chi2ymin/2.; hndof = meany/2.;
729 if(binl < fybin) { binl = fybin;}
730 if(binh > lybin) { binh = lybin;}
736 for(i=fypix-2; i<=lypix+2; ++
i) {
737 ssa += ysw[
i]*ytemp[binl][
i];
738 sa2 += ytemp[binl][
i]*ytemp[binl][
i]*yw2[
i];
739 ssba += ysw[
i]*(ytemp[binh][
i] - ytemp[binl][
i]);
740 saba += ytemp[binl][
i]*(ytemp[binh][
i] - ytemp[binl][
i])*yw2[i];
741 sba2 += (ytemp[binh][
i] - ytemp[binl][
i])*(ytemp[binh][i] - ytemp[binl][i])*yw2[
i];
746 rat=(ssba*ssa-ss2*saba)/(ss2*sba2-ssba*ssba);
747 if(rat < 0.
f) {rat=0.f;}
748 if(rat > 1.
f) {rat=1.0f;}
749 rnorm = (ssa+rat*ssba)/ss2;
754 if(yd[fypix]) {qfy+=ysum[fypix+1];}
757 if(yd[lypix-1]) {qly+=ysum[lypix-1];}
764 float qyfrac = (qfy-qly)/(qfy+qly);
765 bias = templ.
yflcorr(binq,qyfrac)+templ.
yavg(binq);
769 yrec = (0.125f*binl+
BHY-2.5f+rat*(binh-binl)*0.125
f-(
float)shifty+originy)*ysize - bias;
770 sigmay = templ.
yrms(binq);
774 if(rnorm <= 0.) {
LOGERROR(
"SiPixelTemplateReco") <<
"illegal chi2y normalization (2) = " << rnorm <<
ENDL; rnorm = 1.;}
775 chi2y=ss2-2./rnorm*ssa-2./rnorm*rat*ssba+(sa2+2.*rat*saba+rat*rat*sba2)/(rnorm*rnorm)-templ.
chi2ymin(binq);
776 if(chi2y < 0.0) {chi2y = 0.0;}
778 if(meany < 0.01) {meany = 0.01;}
782 hchi2 = chi2y/2.; hndof = meany/2.;
795 if(xd[i] && !xd[i+1]) {
796 for(j=fxbin; j<=lxbin; ++
j) {
800 sigavg = (xtemp[
j][
i] + xtemp[
j][i+1])/2.
f;
801 xtemp[
j][
i] = sigavg;
802 xtemp[
j][i+1] = sigavg;
813 sxthr = 1.1f*templ.
sxmax();
817 if(logxpx == 1) {sxthr = 1.01f*xsort[0];}
else {
818 if (xsort[1] > sxthr) { sxthr = 1.01f*xsort[1]; }
824 templ.
xsigma2(fxpix, lxpix, sxthr, xsum, xsig2);
829 for(i=fxbin; i<=lxbin; ++
i) { chi2xbin[
i] = -1.e15f;}
831 for(i=fxpix-2; i<=lxpix+2; ++
i) {
832 xw2[
i] = 1.f/xsig2[
i];
833 xsw[
i] = xsum[
i]*xw2[
i];
834 ss2 += xsum[
i]*xsw[
i];
841 for(j=jmin; j<=jmax; j+=deltaj) {
842 if(chi2xbin[j] < -100.
f) {
845 for(i=fxpix-2; i<=lxpix+2; ++
i) {
846 ssa += xsw[
i]*xtemp[
j][
i];
847 sa2 += xtemp[
j][
i]*xtemp[
j][
i]*xw2[
i];
850 if(rat <= 0.
f) {
LOGERROR(
"SiPixelTemplateReco") <<
"illegal chi2xmin normalization (1) = " << rat <<
ENDL; rat = 1.;}
851 chi2xbin[
j]=ss2-2.f*ssa/rat+sa2/(rat*rat);
853 if(chi2xbin[j] < chi2xmin) {
854 chi2xmin = chi2xbin[
j];
859 if(minbin > fxbin) {jmin = minbin - deltaj;}
else {jmin = fxbin;}
860 if(minbin < lxbin) {jmax = minbin + deltaj;}
else {jmax = lxbin;}
865 "minbin " << minbin <<
" chi2xmin = " << chi2xmin <<
ENDL;
873 delta = templ.
dxone();
874 sigma = templ.
sxone();
876 delta = templ.
dxtwo();
877 sigma = templ.
sxtwo();
879 xrec = 0.5*(fxpix+lxpix-2*shiftx+2.*originx)*xsize-delta;
888 chi21max = fmax(chi21min, (
double)templ.
chi2xminone());
890 if(chi2xmin < 0.) {chi2xmin = 0.;}
891 meanx = fmax(mean1pix, (
double)templ.
chi2xavgone());
892 hchi2 = chi2xmin/2.; hndof = meanx/2.;
901 if(binl < fxbin) { binl = fxbin;}
902 if(binh > lxbin) { binh = lxbin;}
908 for(i=fxpix-2; i<=lxpix+2; ++
i) {
909 ssa += xsw[
i]*xtemp[binl][
i];
910 sa2 += xtemp[binl][
i]*xtemp[binl][
i]*xw2[
i];
911 ssba += xsw[
i]*(xtemp[binh][
i] - xtemp[binl][
i]);
912 saba += xtemp[binl][
i]*(xtemp[binh][
i] - xtemp[binl][
i])*xw2[i];
913 sba2 += (xtemp[binh][
i] - xtemp[binl][
i])*(xtemp[binh][i] - xtemp[binl][i])*xw2[
i];
918 rat=(ssba*ssa-ss2*saba)/(ss2*sba2-ssba*ssba);
919 if(rat < 0.
f) {rat=0.f;}
920 if(rat > 1.
f) {rat=1.0f;}
921 rnorm = (ssa+rat*ssba)/ss2;
926 if(xd[fxpix]) {qfx+=xsum[fxpix+1];}
929 if(xd[lxpix-1]) {qlx+=xsum[lxpix-1];}
936 float qxfrac = (qfx-qlx)/(qfx+qlx);
937 bias = templ.
xflcorr(binq,qxfrac)+templ.
xavg(binq);
941 xrec = (0.125f*binl+
BHX-2.5f+rat*(binh-binl)*0.125
f-(
float)shiftx+originx)*xsize - bias;
942 sigmax = templ.
xrms(binq);
946 if(rnorm <= 0.) {
LOGERROR(
"SiPixelTemplateReco") <<
"illegal chi2x normalization (2) = " << rnorm <<
ENDL; rnorm = 1.;}
947 chi2x=ss2-2./rnorm*ssa-2./rnorm*rat*ssba+(sa2+2.*rat*saba+rat*rat*sba2)/(rnorm*rnorm)-templ.
chi2xmin(binq);
948 if(chi2x < 0.0) {chi2x = 0.0;}
950 if(meanx < 0.01) {meanx = 0.01;}
954 hchi2 = chi2x/2.; hndof = meanx/2.;
960 if(proby < probmin) {proby = probmin;}
961 if(probx < probmin) {probx = probmin;}
970 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
971 if((sigmaQ <=0.) || (mpv <= 0.) || (kappa < 0.01) || (kappa > 9.9)) {
972 throw cms::Exception(
"DataCorrupt") <<
"SiPixelTemplateReco::Vavilov parameters mpv/sigmaQ/kappa = " << mpv <<
"/" << sigmaQ <<
"/" << kappa << std::endl;
975 assert((sigmaQ > 0.) && (mpv > 0.) && (kappa > 0.01) && (kappa < 10.));
977 xvav = ((double)qtotal-mpv)/sigmaQ;
981 VVIObjF vvidist(kappa, beta2, 1);
982 prvav = vvidist.
fcn(xvav);
985 prvav = TMath::VavilovI(xvav, kappa, beta2);
991 if(probQ < probQmin) {probQ = probQmin;}
1029 std::vector<bool>& ydouble, std::vector<bool>& xdouble,
1031 float& yrec,
float& sigmay,
float& proby,
float& xrec,
float& sigmax,
float& probx,
int& qbin,
int speed,
1036 const bool deadpix =
false;
1037 std::vector<std::pair<int, int> > zeropix;
1040 yrec, sigmay, proby, xrec, sigmax, probx, qbin, speed, deadpix, zeropix, probQ);
1073 std::vector<bool>& ydouble, std::vector<bool>& xdouble,
1075 float& yrec,
float& sigmay,
float& proby,
float& xrec,
float& sigmax,
float& probx,
int& qbin,
int speed,
1080 const bool deadpix =
false;
1081 std::vector<std::pair<int, int> > zeropix;
1083 if(cotbeta < 0.) {locBz = -locBz;}
1086 yrec, sigmay, proby, xrec, sigmax, probx, qbin, speed, deadpix, zeropix, probQ);
1117 std::vector<bool>& ydouble, std::vector<bool>& xdouble,
1119 float& yrec,
float& sigmay,
float& proby,
float& xrec,
float& sigmax,
float& probx,
int& qbin,
int speed)
1123 const bool deadpix =
false;
1124 std::vector<std::pair<int, int> > zeropix;
1126 if(cotbeta < 0.) {locBz = -locBz;}
1128 if(speed < 0) speed = 0;
1129 if(speed > 3) speed = 3;
1132 yrec, sigmay, proby, xrec, sigmax, probx, qbin, speed, deadpix, zeropix, probQ);
float chi2xminone()
//!< minimum of x chi^2 for 1 pixel clusters
float symax()
average pixel signal for y-projection of cluster
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 chi2xmin(int i)
minimum y chi^2 in 4 charge bins
float chi2ymin(int i)
minimum y chi^2 in 4 charge bins
float xrms(int i)
average x-rms of reconstruction binned in 4 charge bins
float qmin()
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
float xflcorr(int binq, float qflx)
float sytwo()
rms for one double-pixel y-clusters
float chi2yminone()
//!< 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
int cxtemp()
Return central pixel of x-template pixels above readout threshold.
float qscale()
charge scaling factor
boost::multi_array< float, 2 > array_2d
float dxone()
mean offset/correction for one pixel x-clusters
static int theVerboseLevel
float chi2yavg(int i)
average y chi^2 in 4 charge bins
void vavilov_pars(double &mpv, double &sigma, double &kappa)
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 yflcorr(int binq, float qfly)
float xsize()
pixel x-size (microns)
void ytemp(int fybin, int lybin, float ytemplate[41][BYSIZE])
float sxtwo()
rms for one double-pixel x-clusters
int PixelTempReco2D(int id, float cotalpha, float cotbeta, float locBz, array_2d &cluster, std::vector< bool > &ydouble, std::vector< bool > &xdouble, SiPixelTemplate &templ, float &yrec, float &sigmay, float &proby, float &xrec, float &sigmax, float &probx, int &qbin, int speed, bool deadpix, std::vector< std::pair< int, int > > &zeropix, float &probQ)
float dytwo()
mean offset/correction for one double-pixel y-clusters
float s50()
1/2 of the pixel threshold signal in electrons
float syone()
rms for one pixel y-clusters
float chi2yavgone()
//!< average y chi^2 for 1 pixel clusters
float qavg()
average cluster charge for this set of track angles
float sxmax()
average pixel signal for x-projection of cluster
void xsigma2(int fxpix, int lxpix, float sxthr, float xsum[BXSIZE], float xsig2[BXSIZE])
float chi2xavgone()
//!< average x chi^2 for 1 pixel clusters
float pixmax()
maximum pixel charge
void ysigma2(int fypix, int lypix, float sythr, float ysum[BYSIZE], float ysig2[BYSIZE])
static const G4double kappa
float chi2xavg(int i)
averaage x chi^2 in 4 charge bins
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 dxtwo()
mean offset/correction for one double-pixel x-clusters
float ysize()
pixel y-size (microns)