17 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 33 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 37 #define LOGERROR(x) LogError(x) 38 #define LOGWARNING(x) LogWarning(x) 39 #define LOGINFO(x) LogInfo(x) 45 #define LOGERROR(x) std::cout << x << ": " 46 #define LOGINFO(x) std::cout << x << ": " 47 #define LOGWARNING(x) std::cout << x << ": " 48 #define ENDL std::endl 63 float costrk[3]={0,0,0};
67 const int code_version={1};
73 std::ostringstream tout;
77 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 78 tout << dir <<
"generror_summary_zp" 79 << std::setw(4) << std::setfill(
'0') << std::right << filenum <<
".out" << std::ends;
82 tempfile = (
file.fullPath()).c_str();
84 tout <<
"generror_summary_zp" << std::setw(4) << std::setfill(
'0') << std::right << filenum <<
".out" << std::ends;
86 tempfile = tempf.c_str();
93 if(in_file.is_open()) {
101 for (i=0; (c=in_file.get()) !=
'\n'; ++
i) {
106 LOGINFO(
"SiPixelGenError") <<
"Loading Pixel GenError File - " << theCurrentTemp.
head.
title <<
ENDL;
116 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file, no GenError load" <<
ENDL;
return false;}
119 <<
", NTy = " << theCurrentTemp.
head.
NTy <<
", NTyx = " << theCurrentTemp.
head.
NTyx<<
", NTxx = " << theCurrentTemp.
head.
NTxx <<
", Dtype = " << theCurrentTemp.
head.
Dtype 120 <<
", Bias voltage " << theCurrentTemp.
head.
Vbias <<
", temperature " 122 <<
", 1/2 multi dcol threshold " << theCurrentTemp.
head.
s50 <<
", 1/2 single dcol threshold " << theCurrentTemp.
head.
ss50 125 <<
", Q/Q_avg fractions for Qbin defs " << theCurrentTemp.
head.
fbin[0] <<
", " << theCurrentTemp.
head.
fbin[1]
126 <<
", " << theCurrentTemp.
head.
fbin[2]
129 if(theCurrentTemp.
head.
templ_version < code_version) {
LOGERROR(
"SiPixelGenError") <<
"code expects version " << code_version <<
", no GenError load" <<
ENDL;
return false;}
131 #ifdef SI_PIXEL_TEMPLATE_USE_BOOST 140 theCurrentTemp.
enty.resize(boost::extents[theCurrentTemp.
head.
NTy]);
148 for (i=0; i < theCurrentTemp.
head.
NTy; ++
i) {
150 in_file >> theCurrentTemp.
enty[
i].
runnum >> costrk[0] >> costrk[1] >> costrk[2];
152 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 1, no GenError load, run # " << theCurrentTemp.
enty[
i].
runnum <<
ENDL;
return false;}
163 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 2, no GenError load, run # " << theCurrentTemp.
enty[
i].
runnum <<
ENDL;
return false;}
168 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 3, no GenError load, run # " << theCurrentTemp.
enty[
i].
runnum <<
ENDL;
return false;}
170 if(theCurrentTemp.
enty[i].
qmin <= 0.) {
LOGERROR(
"SiPixelGenError") <<
"Error in GenError ID " << theCurrentTemp.
head.
ID <<
" qmin = " << theCurrentTemp.
enty[
i].
qmin <<
", run # " << theCurrentTemp.
enty[
i].
runnum <<
ENDL;
return false;}
173 for (j=0; j<4; ++j) {
177 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 14a, no GenError load, run # " << theCurrentTemp.
enty[
i].
runnum <<
ENDL;
return false;}
185 for (k=0; k < theCurrentTemp.
head.
NTyx; ++
k) {
187 for (i=0; i < theCurrentTemp.
head.
NTxx; ++
i) {
189 in_file >> theCurrentTemp.
entx[
k][
i].
runnum >> costrk[0] >> costrk[1] >> costrk[2];
191 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 17, no GenError load, run # " << theCurrentTemp.
entx[
k][
i].
runnum <<
ENDL;
return false;}
202 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 18, no GenError load, run # " << theCurrentTemp.
entx[
k][
i].
runnum <<
ENDL;
return false;}
208 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 19, no GenError load, run # " << theCurrentTemp.
entx[
k][
i].
runnum <<
ENDL;
return false;}
211 for (j=0; j<4; ++j) {
215 if(in_file.fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 30a, no GenError load, run # " << theCurrentTemp.
entx[
k][
i].
runnum <<
ENDL;
return false;}
226 pixelTemp.push_back(theCurrentTemp);
236 LOGERROR(
"SiPixelGenError") <<
"Error opening File" << tempfile <<
ENDL;
244 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 252 std::vector< SiPixelGenErrorStore > & pixelTemp) {
257 float costrk[3]={0,0,0};
259 const int code_version={1};
266 auto tmpPtr = std::make_unique<SiPixelGenErrorStore>();
267 auto & theCurrentTemp = *tmpPtr;
275 for (i=0; i<20; ++
i) {
277 theCurrentTemp.head.title[4*
i] = temp.
c[0];
278 theCurrentTemp.head.title[4*i+1] = temp.
c[1];
279 theCurrentTemp.head.title[4*i+2] = temp.
c[2];
280 theCurrentTemp.head.title[4*i+3] = temp.
c[3];
284 theCurrentTemp.head.title[79] =
'\0';
285 LOGINFO(
"SiPixelGenError") <<
"Loading Pixel GenError File - " 286 << theCurrentTemp.head.title <<
ENDL;
290 db >> theCurrentTemp.head.ID >> theCurrentTemp.head.templ_version >> theCurrentTemp.head.Bfield >> theCurrentTemp.head.NTy >> theCurrentTemp.head.NTyx >> theCurrentTemp.head.NTxx >> theCurrentTemp.head.Dtype >> theCurrentTemp.head.Vbias >>
291 theCurrentTemp.head.temperature >> theCurrentTemp.head.fluence >> theCurrentTemp.head.qscale >> theCurrentTemp.head.s50 >>
292 theCurrentTemp.head.lorywidth >> theCurrentTemp.head.lorxwidth >> theCurrentTemp.head.ysize >> theCurrentTemp.head.xsize >>
293 theCurrentTemp.head.zsize >> theCurrentTemp.head.ss50 >> theCurrentTemp.head.lorybias >> theCurrentTemp.head.lorxbias >>
294 theCurrentTemp.head.fbin[0] >> theCurrentTemp.head.fbin[1] >> theCurrentTemp.head.fbin[2];
297 <<
"Error reading file, no GenError load" <<
ENDL;
return false;}
299 LOGINFO(
"SiPixelGenError") <<
"GenError ID = " << theCurrentTemp.head.ID <<
", GenError Version " << theCurrentTemp.head.templ_version <<
", Bfield = " << theCurrentTemp.head.Bfield
300 <<
", NTy = " << theCurrentTemp.head.NTy <<
", NTyx = " << theCurrentTemp.head.NTyx<<
", NTxx = " << theCurrentTemp.head.NTxx <<
", Dtype = " << theCurrentTemp.head.Dtype
301 <<
", Bias voltage " << theCurrentTemp.head.Vbias <<
", temperature " 302 << theCurrentTemp.head.temperature <<
", fluence " << theCurrentTemp.head.fluence <<
", Q-scaling factor " << theCurrentTemp.head.qscale
303 <<
", 1/2 multi dcol threshold " << theCurrentTemp.head.s50 <<
", 1/2 single dcol threshold " << theCurrentTemp.head.ss50
304 <<
", y Lorentz Width " << theCurrentTemp.head.lorywidth <<
", y Lorentz Bias " << theCurrentTemp.head.lorybias
305 <<
", x Lorentz width " << theCurrentTemp.head.lorxwidth <<
", x Lorentz Bias " << theCurrentTemp.head.lorxbias
306 <<
", Q/Q_avg fractions for Qbin defs " << theCurrentTemp.head.fbin[0] <<
", " << theCurrentTemp.head.fbin[1]
307 <<
", " << theCurrentTemp.head.fbin[2]
308 <<
", pixel x-size " << theCurrentTemp.head.xsize <<
", y-size " << theCurrentTemp.head.ysize <<
", zsize " << theCurrentTemp.head.zsize <<
ENDL;
310 LOGINFO(
"SiPixelGenError") <<
"Loading Pixel GenError - " 311 << theCurrentTemp.head.title <<
" version " 312 <<theCurrentTemp.head.templ_version <<
" code v." 313 <<code_version<<
ENDL;
314 if(theCurrentTemp.head.templ_version < code_version) {
315 LOGERROR(
"SiPixelGenError") <<
"code expects version " << code_version
316 <<
", no GenError load" <<
ENDL;
return false;}
318 #ifdef SI_PIXEL_TEMPLATE_USE_BOOST 323 theCurrentTemp.cotbetaY =
new float[theCurrentTemp.head.NTy];
324 theCurrentTemp.cotbetaX =
new float[theCurrentTemp.head.NTyx];
325 theCurrentTemp.cotalphaX =
new float[theCurrentTemp.head.NTxx];
327 theCurrentTemp.enty.resize(boost::extents[theCurrentTemp.head.NTy]);
329 theCurrentTemp.entx.resize(boost::extents[theCurrentTemp.head.NTyx][theCurrentTemp.head.NTxx]);
335 for (i=0; i < theCurrentTemp.head.NTy; ++
i) {
337 db >> theCurrentTemp.enty[
i].runnum >> costrk[0] >> costrk[1] >> costrk[2];
339 if(db.
fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 1, no GenError load, run # " << theCurrentTemp.enty[
i].runnum <<
ENDL;
return false;}
343 theCurrentTemp.enty[
i].cotalpha = costrk[0]/costrk[2];
345 theCurrentTemp.enty[
i].cotbeta = costrk[1]/costrk[2];
347 db >> theCurrentTemp.enty[
i].qavg >> theCurrentTemp.enty[
i].pixmax >> theCurrentTemp.enty[
i].dyone
348 >> theCurrentTemp.enty[
i].syone >> theCurrentTemp.enty[
i].dxone >> theCurrentTemp.enty[
i].sxone;
350 if(db.
fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 2, no GenError load, run # " << theCurrentTemp.enty[
i].runnum <<
ENDL;
return false;}
352 db >> theCurrentTemp.enty[
i].dytwo >> theCurrentTemp.enty[
i].sytwo >> theCurrentTemp.enty[
i].dxtwo
353 >> theCurrentTemp.enty[
i].sxtwo >> theCurrentTemp.enty[
i].qmin >> theCurrentTemp.enty[
i].qmin2;
355 for (j=0; j<4; ++j) {
357 db >> theCurrentTemp.enty[
i].yavggen[j] >> theCurrentTemp.enty[
i].yrmsgen[j] >> theCurrentTemp.enty[
i].xavggen[j] >> theCurrentTemp.enty[
i].xrmsgen[j];
359 if(db.
fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 14a, no GenError load, run # " << theCurrentTemp.enty[
i].runnum <<
ENDL;
return false;}
366 for (k=0; k < theCurrentTemp.head.NTyx; ++
k) {
368 for (i=0; i < theCurrentTemp.head.NTxx; ++
i) {
370 db >> theCurrentTemp.entx[
k][
i].runnum >> costrk[0] >> costrk[1] >> costrk[2];
372 if(db.
fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 17, no GenError load, run # " << theCurrentTemp.entx[
k][
i].runnum <<
ENDL;
return false;}
376 theCurrentTemp.entx[
k][
i].cotalpha = costrk[0]/costrk[2];
378 theCurrentTemp.entx[
k][
i].cotbeta = costrk[1]/costrk[2];
380 db >> theCurrentTemp.entx[
k][
i].qavg >> theCurrentTemp.entx[
k][
i].pixmax >> theCurrentTemp.entx[
k][
i].dyone
381 >> theCurrentTemp.entx[
k][
i].syone >> theCurrentTemp.entx[
k][
i].dxone >> theCurrentTemp.entx[
k][
i].sxone;
383 if(db.
fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 18, no GenError load, run # " << theCurrentTemp.entx[
k][
i].runnum <<
ENDL;
return false;}
385 db >> theCurrentTemp.entx[
k][
i].dytwo >> theCurrentTemp.entx[
k][
i].sytwo >> theCurrentTemp.entx[
k][
i].dxtwo
386 >> theCurrentTemp.entx[
k][
i].sxtwo >> theCurrentTemp.entx[
k][
i].qmin >> theCurrentTemp.entx[
k][
i].qmin2;
388 for (j=0; j<4; ++j) {
390 db >> theCurrentTemp.entx[
k][
i].yavggen[j] >> theCurrentTemp.entx[
k][
i].yrmsgen[j] >> theCurrentTemp.entx[
k][
i].xavggen[j] >> theCurrentTemp.entx[
k][
i].xrmsgen[j];
392 if(db.
fail()) {
LOGERROR(
"SiPixelGenError") <<
"Error reading file 30a, no GenError load, run # " << theCurrentTemp.entx[
k][
i].runnum <<
ENDL;
return false;}
401 pixelTemp.push_back(theCurrentTemp);
414 for (
auto & templ : thePixelTemp_) {
415 for (
auto iy=0; iy<templ.head.NTy; ++iy ) templ.cotbetaY[iy]=templ.enty[iy].cotbeta;
416 for (
auto iy=0; iy<templ.head.NTyx; ++iy ) templ.cotbetaX[iy]= templ.entx[iy][0].cotbeta;
417 for (
auto ix=0; ix<templ.head.NTxx; ++ix ) templ.cotalphaX[ix]=templ.entx[0][ix].cotalpha;
452 if(
id != id_current_) {
455 for(
int i=0;
i<(
int)thePixelTemp_.size(); ++
i) {
456 if(
id == thePixelTemp_[
i].head.ID) {
460 lorywidth_ = thePixelTemp_[
i].head.lorywidth;
461 lorxwidth_ = thePixelTemp_[
i].head.lorxwidth;
462 lorybias_ = thePixelTemp_[
i].head.lorybias;
463 lorxbias_ = thePixelTemp_[
i].head.lorxbias;
468 xsize_ = thePixelTemp_[
i].head.xsize;
469 ysize_ = thePixelTemp_[
i].head.ysize;
470 zsize_ = thePixelTemp_[
i].head.zsize;
480 int SiPixelGenError::qbin(
int id,
float cotalpha,
float cotbeta,
float locBz,
float locBx,
float qclus,
bool irradiationCorrections,
481 int& pixmx,
float& sigmay,
float& deltay,
float& sigmax,
float& deltax,
482 float& sy1,
float& dy1,
float& sy2,
float& dy2,
float& sx1,
float& dx1,
483 float& sx2,
float& dx2)
491 if(
id != id_current_) {
494 for(
int i=0;
i<(
int)thePixelTemp_.size(); ++
i) {
495 if(
id == thePixelTemp_[
i].head.ID) {
498 lorywidth_ = thePixelTemp_[
i].head.lorywidth;
499 lorxwidth_ = thePixelTemp_[
i].head.lorxwidth;
500 lorybias_ = thePixelTemp_[
i].head.lorybias;
501 lorxbias_ = thePixelTemp_[
i].head.lorxbias;
502 for(
int j=0; j<3; ++j) {fbin_[j] = thePixelTemp_[
i].head.fbin[j];}
506 xsize_ = thePixelTemp_[
i].head.xsize;
507 ysize_ = thePixelTemp_[
i].head.ysize;
508 zsize_ = thePixelTemp_[
i].head.zsize;
515 int index = index_id_;
517 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 518 if(index < 0 || index >= (
int)thePixelTemp_.size()) {
519 throw cms::Exception(
"DataCorrupt") <<
"SiPixelGenError::qbin can't find needed GenError ID = " <<
id << std::endl;
522 assert(index >= 0 && index < (
int)thePixelTemp_.size());
528 auto const & templ = thePixelTemp_[
index];
536 auto cotalpha0 = thePixelTemp_[
index].enty[0].cotalpha;
537 auto qcorrect=
std::sqrt((1.
f+cotbeta*cotbeta+cotalpha*cotalpha)/(1.
f+cotbeta*cotbeta+cotalpha0*cotalpha0));
541 float cota = cotalpha;
543 bool flip_y;
bool flip_x;
547 switch(thePixelTemp_[index_id_].head.Dtype) {
549 if(cotbeta < 0.
f) {flip_y =
true;}
563 if(locBx*locBz < 0.
f) {
575 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 576 throw cms::Exception(
"DataCorrupt") <<
"SiPixelGenError::illegal subdetector ID = " << thePixelTemp_[index_id_].head.Dtype << std::endl;
578 std::cout <<
"SiPixelGenError::illegal subdetector ID = " << thePixelTemp_[index_id_].head.Dtype << std::endl;
585 lorybias_ = -lorybias_;
586 lorywidth_ = -lorywidth_;
589 lorxbias_ = -lorxbias_;
590 lorxwidth_ = -lorxwidth_;
594 auto qscale = thePixelTemp_[
index].head.qscale;
604 auto Ny = thePixelTemp_[
index].head.NTy;
605 auto Nyx = thePixelTemp_[
index].head.NTyx;
606 auto Nxx = thePixelTemp_[
index].head.NTxx;
608 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 609 if(Ny < 2 || Nyx < 1 || Nxx < 2) {
610 throw cms::Exception(
"DataCorrupt") <<
"GenError ID = " << id_current_ <<
"has too few entries: Ny/Nyx/Nxx = " << Ny <<
"/" << Nyx <<
"/" << Nxx << std::endl;
613 assert(Ny > 1 && Nyx > 0 && Nxx > 1);
623 auto j = std::lower_bound(templ.cotbetaY,templ.cotbetaY+Ny,cotb);
624 if (j==templ.cotbetaY+Ny) { --j; yratio = 1.f; }
625 else if (j==templ.cotbetaY) { ++j; yratio = 0.f;}
626 else { yratio = (cotb - (*(j-1)) )/( (*j) - (*(j-1)) ) ; }
628 ihigh = j-templ.cotbetaY;
636 auto qavg = (1.f - yratio)*thePixelTemp_[index].enty[ilow].qavg + yratio*thePixelTemp_[index].enty[ihigh].qavg;
638 auto qmin = (1.f - yratio)*thePixelTemp_[index].enty[ilow].qmin + yratio*thePixelTemp_[index].enty[ihigh].qmin;
640 auto qmin2 = (1.f - yratio)*thePixelTemp_[index].enty[ilow].qmin2 + yratio*thePixelTemp_[index].enty[ihigh].qmin2;
644 #ifndef SI_PIXEL_TEMPLATE_STANDALONE 645 if(qavg <= 0.
f || qmin <= 0.
f) {
646 throw cms::Exception(
"DataCorrupt") <<
"SiPixelGenError::qbin, qavg or qmin <= 0," 647 <<
" Probably someone called the generic pixel reconstruction with an illegal trajectory state" << std::endl;
650 assert(qavg > 0.
f && qmin > 0.
f);
655 auto qtotal = qscale*qclus;
659 auto fq = qtotal/qavg;
675 auto yrmsgen =(1.f - yratio)*thePixelTemp_[index].enty[ilow].yrmsgen[binq] + yratio*thePixelTemp_[index].enty[ihigh].yrmsgen[binq];
676 sy1 = (1.f - yratio)*thePixelTemp_[index].enty[ilow].syone + yratio*thePixelTemp_[index].enty[ihigh].syone;
677 sy2 = (1.f - yratio)*thePixelTemp_[index].enty[ilow].sytwo + yratio*thePixelTemp_[index].enty[ihigh].sytwo;
687 auto j = std::lower_bound(templ.cotbetaX,templ.cotbetaX+Nyx,acotb);
688 if (j==templ.cotbetaX+Nyx) { --j; yxratio = 1.f; }
689 else if (j==templ.cotbetaX) { ++j; yxratio = 0.f;}
690 else { yxratio = (acotb - (*(j-1)) )/( (*j) - (*(j-1)) ) ; }
692 iyhigh = j-templ.cotbetaX;
701 auto j = std::lower_bound(templ.cotalphaX,templ.cotalphaX+Nxx,cota);
702 if (j==templ.cotalphaX+Nxx) { --j; xxratio = 1.f; }
703 else if (j==templ.cotalphaX) { ++j; xxratio = 0.f;}
704 else { xxratio = (cota - (*(j-1)) )/( (*j) - (*(j-1)) ) ; }
706 ihigh = j-templ.cotalphaX;
712 sx1 = (1.f - xxratio)*thePixelTemp_[index].entx[0][ilow].sxone + xxratio*thePixelTemp_[index].entx[0][ihigh].sxone;
713 sx2 = (1.f - xxratio)*thePixelTemp_[index].entx[0][ilow].sxtwo + xxratio*thePixelTemp_[index].entx[0][ihigh].sxtwo;
717 pixmx=(1.f - yxratio)*((1.
f - xxratio)*thePixelTemp_[
index].entx[iylow][ilow].pixmax + xxratio*thePixelTemp_[
index].entx[iylow][ihigh].pixmax)
718 +yxratio*((1.
f - xxratio)*thePixelTemp_[
index].entx[iyhigh][ilow].pixmax + xxratio*thePixelTemp_[
index].entx[iyhigh][ihigh].pixmax);
720 auto xrmsgen = (1.f - yxratio)*((1.
f - xxratio)*thePixelTemp_[
index].entx[iylow][ilow].xrmsgen[binq] + xxratio*thePixelTemp_[
index].entx[iylow][ihigh].xrmsgen[binq])
721 +yxratio*((1.
f - xxratio)*thePixelTemp_[
index].entx[iyhigh][ilow].xrmsgen[binq] + xxratio*thePixelTemp_[
index].entx[iyhigh][ihigh].xrmsgen[binq]);
724 if(irradiationCorrections) {
725 auto yavggen =(1.f - yratio)*thePixelTemp_[index].enty[ilow].yavggen[binq] + yratio*thePixelTemp_[index].enty[ihigh].yavggen[binq];
726 if(flip_y) {yavggen = -yavggen;}
728 dy1 = (1.f - yratio)*thePixelTemp_[index].enty[ilow].dyone + yratio*thePixelTemp_[index].enty[ihigh].dyone;
729 if(flip_y) {dy1 = -dy1;}
730 dy2 = (1.f - yratio)*thePixelTemp_[index].enty[ilow].dytwo + yratio*thePixelTemp_[index].enty[ihigh].dytwo;
731 if(flip_y) {dy2 = -dy2;}
733 auto xavggen = (1.f - yxratio)*((1.
f - xxratio)*thePixelTemp_[
index].entx[iylow][ilow].xavggen[binq] + xxratio*thePixelTemp_[
index].entx[iylow][ihigh].xavggen[binq])
734 +yxratio*((1.
f - xxratio)*thePixelTemp_[
index].entx[iyhigh][ilow].xavggen[binq] + xxratio*thePixelTemp_[
index].entx[iyhigh][ihigh].xavggen[binq]);
735 if(flip_x) {xavggen = -xavggen;}
737 dx1 = (1.f - xxratio)*thePixelTemp_[index].entx[0][ilow].dxone + xxratio*thePixelTemp_[index].entx[0][ihigh].dxone;
738 if(flip_x) {dx1 = -dx1;}
739 dx2 = (1.f - xxratio)*thePixelTemp_[index].entx[0][ilow].dxtwo + xxratio*thePixelTemp_[index].entx[0][ihigh].dxtwo;
740 if(flip_x) {dx2 = -dx2;}
752 if(qtotal < 0.95
f*qmin) {binq = 5;}
else {
if(qtotal < 0.95
f*qmin2) {binq = 4;}}
759 float& pixmx,
float& sigmay,
float& deltay,
float& sigmax,
float& deltax,
760 float& sy1,
float& dy1,
float& sy2,
float& dy2,
float& sx1,
float& dx1,
761 float& sx2,
float& dx2)
765 bool irradiationCorrections =
true;
769 ipixmx, sigmay, deltay, sigmax, deltax, sy1, dy1, sy2, dy2, sx1, dx1, sx2, dx2);
771 pixmx = (
float)ipixmx;
float qavg
average cluster charge for this set of track angles (now includes threshold effects) ...
float qmin
minimum cluster charge for valid hit (keeps 99.9% of simulated hits)
int runnum
< 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
static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > &pixelTemp, std::string dir="")
float xrmsgen[4]
generic algorithm: average x-rms of reconstruction binned in 4 charge bins
float syone
rms for one pixel y-clusters
SiPixelGenErrorEntry enty[60]
60 Barrel y templates spanning cluster lengths from 0px to +18px [28 entries for fpix] ...
float cotalpha
cot(alpha) is proportional to cluster length in x and is basis of interpolation
int qbin(int id, float cotalpha, float cotbeta, float locBz, float locBx, float qclus, bool irradiationCorrections, int &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)
static void postInit(std::vector< SiPixelGenErrorStore > &thePixelTemp_)
float cotbeta
cot(beta) is proportional to cluster length in y and is basis of interpolation
std::vector< float > sVector() const
float sxone
rms for one pixel x-clusters
Abs< T >::type abs(const T &t)
float dytwo
mean offset/correction for one double-pixel y-clusters
float dxtwo
mean offset/correction for one double-pixel x-clusters
SiPixelGenErrorHeader head
< template storage structure
void incrementIndex(int i)
float sytwo
rms for one double-pixel y-clusters
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
float xavggen[4]
generic algorithm: average x-bias of reconstruction binned in 4 charge bins
float pixmax
maximum charge for individual pixels in cluster
float sxtwo
rms for one double-pixel x-clusters
SiPixelGenErrorEntry entx[5][29]
29 Barrel x templates spanning cluster lengths from -6px (-1.125Rad) to +6px (+1.125Rad) in each of 5...