12 TrackletLUT::TrackletLUT(
const Settings& settings) : settings_(settings), setup_(settings.
setup()) {}
15 unsigned int layerdisk,
bool isPS, std::array<double, 2> tan_range,
unsigned int nzbins,
unsigned int zbin) {
22 bool use_tan_range = !(tan_range[0] == -1 and tan_range[1] == -1);
23 bool use_zbins = (nzbins > 1);
27 int layerId =
barrel ? layerdisk + 1 : layerdisk +
N_LAYER - 1;
29 std::vector<const tt::SensorModule*> sensorModules;
34 if (sm.layerId() != layerId || sm.z() < 0 || sm.psModule() != isPS) {
39 const double term = (sm.numColumns() / 2 - 0.5) * sm.pitchCol();
40 double rmin = sm.r() - term *
std::abs(sm.sinTilt());
41 double rmax = sm.r() + term *
std::abs(sm.sinTilt());
50 if (mod_tan_max >= tan_range[0] && mod_tan_min <= tan_range[1]) {
51 sensorModules.push_back(&sm);
53 }
else if (use_zbins) {
57 bool useFlat = (zbin == 0);
58 bool isFlat = (sm.tilt() == 0);
60 if (useFlat and isFlat)
61 sensorModules.push_back(&sm);
62 else if (!useFlat and !isFlat)
63 sensorModules.push_back(&sm);
64 }
else if (nzbins == 13) {
65 if (sm.ringId(
setup_) == zbin)
66 sensorModules.push_back(&sm);
71 sensorModules.push_back(&sm);
76 static constexpr
double delta = 1.e-3;
82 stable_sort(sensorModules.begin(), sensorModules.end(), smallerR);
83 stable_sort(sensorModules.begin(), sensorModules.end(), smallerZ);
84 sensorModules.erase(
unique(sensorModules.begin(), sensorModules.end(), equalRZ), sensorModules.end());
92 std::array<double, 2> tan_range = {{2147483647, 0}};
96 for (
auto sm : sensorModules) {
97 const double term = (sm->numColumns() / 2 - 0.5) * sm->pitchCol();
98 double rmin = sm->r() - term *
std::abs(sm->sinTilt());
99 double rmax = sm->r() + term *
std::abs(sm->sinTilt());
107 if (mod_tan_min < tan_range[0])
108 tan_range[0] = mod_tan_min;
109 if (mod_tan_max > tan_range[1])
110 tan_range[1] = mod_tan_max;
116 const std::vector<const tt::SensorModule*>& sensorModules,
124 unsigned int bendbits = isPS ? 3 : 4;
126 std::vector<std::array<double, 2>> bendpars;
127 std::vector<std::array<double, 2>> bendminmax;
130 for (
int i = 0;
i < 1 << bendbits;
i++) {
131 bendpars.push_back({{99, 0}});
132 bendminmax.push_back({{99, -99}});
136 for (
auto sm : sensorModules) {
137 int window = sm->windowSize();
141 for (
int ibend = 0; ibend <= 2 *
window; ibend++) {
142 int FEbend = ibend -
window;
146 int bend = std::signbit(BEbend) ? (1 << bendbits) -
distance(encodingBend.begin(),
pos)
149 double bendmin = FEbend / 2.0 - FEbendcut;
150 double bendmax = FEbend / 2.0 + FEbendcut;
156 z_mod[0] =
std::abs(sm->z()) + (sm->numColumns() / 2 - 0.5) * sm->pitchCol() * sm->cosTilt();
157 z_mod[1] =
std::abs(sm->z()) - (sm->numColumns() / 2 - 0.5) * sm->pitchCol() * sm->cosTilt();
159 r_mod[0] = sm->r() - (sm->numColumns() / 2 - 0.5) * sm->pitchCol() *
std::abs(sm->sinTilt());
160 r_mod[1] = sm->r() + (sm->numColumns() / 2 - 0.5) * sm->pitchCol() *
std::abs(sm->sinTilt());
162 for (
int i = 0;
i < 2;
i++) {
163 double CF =
std::abs(sm->sinTilt()) * (z_mod[
i] / r_mod[
i]) + sm->cosTilt();
170 if (cbendmin < bendminmax[bend][0])
171 bendminmax.at(bend)[0] = cbendmin;
172 if (cbendmax > bendminmax[bend][1])
173 bendminmax.at(bend)[1] = cbendmax;
178 for (
int i = 0;
i < 1 << bendbits;
i++) {
179 double mid = (bendminmax[
i][1] + bendminmax[
i][0]) / 2;
180 double cut = (bendminmax[
i][1] - bendminmax[
i][0]) / 2;
182 bendpars[
i][0] = mid;
183 bendpars[
i][1] =
cut;
190 char cregion =
'A' +
region;
192 for (
unsigned int iSeed = 0; iSeed <
N_SEED; iSeed++) {
277 unsigned int layerdisk1,
278 unsigned int layerdisk2,
279 unsigned int nbitsfinephidiff,
291 int outerrbins = (1 << outerrbits);
315 int nbinsfinephidiff = (1 << nbitsfinephidiff);
317 for (
int iphibin = 0; iphibin < nbinsfinephidiff; iphibin++) {
318 int iphidiff = iphibin;
319 if (iphibin >= nbinsfinephidiff / 2) {
320 iphidiff = iphibin - nbinsfinephidiff;
324 double deltaphi = 1.5;
325 dphi[0] = (iphidiff - deltaphi) * dfinephi;
326 dphi[1] = (iphidiff + deltaphi) * dfinephi;
327 for (
int irouterbin = 0; irouterbin < outerrbins; irouterbin++) {
339 std::vector<std::array<double, 2>> bend_cuts_inner;
340 std::vector<std::array<double, 2>> bend_cuts_outer;
343 std::vector<const tt::SensorModule*> sminner;
344 std::vector<const tt::SensorModule*> smouter;
348 std::array<double, 2> tan_range = {{0, outer_tan_max}};
357 smouter =
getSensorModules(layerdisk2, isPSouter, {{outer_tan_min, outer_tan_max}});
358 std::array<double, 2> tan_range =
getTanRange(smouter);
366 smouter =
getSensorModules(layerdisk2, isPSouter, {{outer_tan_min, outer_tan_max}});
368 std::array<double, 2> tan_range =
getTanRange(smouter);
376 for (
int ibend = 0; ibend < (1 << nbendbitsinner); ibend++) {
379 bend_cuts_inner.push_back({{mid,
cut}});
381 for (
int ibend = 0; ibend < (1 << nbendbitsouter); ibend++) {
384 bend_cuts_outer.push_back({{mid,
cut}});
388 double bendinnermin = 20.0;
389 double bendinnermax = -20.0;
390 double bendoutermin = 20.0;
391 double bendoutermax = -20.0;
392 double rinvmin = 1.0;
393 double rinvmax = -1.0;
394 double absrinvmin = 1.0;
396 for (
int i2 = 0;
i2 < 2;
i2++) {
397 for (
int i3 = 0;
i3 < 2;
i3++) {
405 if (rinner >= router[
i3])
408 double rinv1 = (rinner < router[
i3]) ?
rinv(0.0, -dphi[
i2], rinner, router[
i3]) : 20.0;
414 if (abendinner < bendinnermin)
415 bendinnermin = abendinner;
416 if (abendinner > bendinnermax)
417 bendinnermax = abendinner;
418 if (abendouter < bendoutermin)
419 bendoutermin = abendouter;
420 if (abendouter > bendoutermax)
421 bendoutermax = abendouter;
436 double lowrinvcutte =
438 passptcut = rinvmin < rinvcutte and rinvmax > -rinvcutte;
439 bendfac = (rinvmin < lowrinvcutte and rinvmax > -lowrinvcutte)
443 passptcut = absrinvmin < rinvcutte;
448 for (
int ibend = 0; ibend < (1 << nbendbitsinner); ibend++) {
449 double bendminfac = (isPSinner and (ibend == 2
or ibend == 3)) ? bendfac : 1.0;
450 double bendmaxfac = (isPSinner and (ibend == 6
or ibend == 5)) ? bendfac : 1.0;
452 double mid = bend_cuts_inner.at(ibend)[0];
453 double cut = bend_cuts_inner.at(ibend)[1];
455 bool passinner = mid +
cut * bendmaxfac > bendinnermin && mid -
cut * bendminfac < bendinnermax;
457 table_.push_back(passinner && passptcut);
460 for (
int ibend = 0; ibend < (1 << nbendbitsouter); ibend++) {
461 double bendminfac = (isPSouter and (ibend == 2
or ibend == 3)) ? bendfac : 1.0;
462 double bendmaxfac = (isPSouter and (ibend == 6
or ibend == 5)) ? bendfac : 1.0;
464 double mid = bend_cuts_outer.at(ibend)[0];
465 double cut = bend_cuts_outer.at(ibend)[1];
467 bool passouter = mid +
cut * bendmaxfac > bendoutermin && mid -
cut * bendminfac < bendoutermax;
469 table_.push_back(passouter && passptcut);
478 char cTP =
'A' + iTP;
483 name_ +=
"_stubptinnercut.tab";
485 name_ +=
"_stubptoutercut.tab";
492 unsigned int layerdisk1,
493 unsigned int layerdisk2,
494 unsigned int iAllStub,
495 unsigned int nbitsfinephidiff,
496 unsigned int nbitsfinephi,
504 unsigned int nbendbitsinner = 3;
510 for (
int innerfinephi = 0; innerfinephi < (1 << nbitsfinephi); innerfinephi++) {
511 for (
int innerbend = 0; innerbend < (1 << nbendbitsinner); innerbend++) {
512 for (
int ir = 0; ir < (1 << nirbits); ir++) {
513 unsigned int usereg = 0;
514 for (
unsigned int ireg = 0; ireg <
settings_.
nvmte(1, iSeed); ireg++) {
516 for (
int ifinephiouter = 0; ifinephiouter < (1 <<
settings_.
nfinephi(1, iSeed)); ifinephiouter++) {
519 int idphi = outerfinephi - innerfinephi;
520 bool inrange = (idphi < (1 << (nbitsfinephidiff - 1))) && (idphi >= -(1 << (nbitsfinephidiff - 1)));
522 idphi = idphi + (1 << nbitsfinephidiff);
525 idphi1 = (idphi << 3) + ir;
526 int ptinnerindexnew = (idphi1 << nbendbitsinner) + innerbend;
527 match = match || (inrange && tplutinner.
lookup(ptinnerindexnew));
530 usereg = usereg | (1 << ireg);
540 char cTP =
'A' + iTP;
551 unsigned int layerdisk1,
552 unsigned int layerdisk2,
553 unsigned int innerphibits,
554 unsigned int outerphibits,
566 int outerrbins = (1 << outerrbits);
567 int innerphibins = (1 << innerphibits);
568 int outerphibins = (1 << outerphibits);
593 table_.resize((1 << nbendbitsinner),
false);
595 table_.resize((1 << nbendbitsouter),
false);
601 for (
int irouterbin = 0; irouterbin < outerrbins; irouterbin++) {
612 std::vector<std::array<double, 2>> bend_cuts_inner;
613 std::vector<std::array<double, 2>> bend_cuts_outer;
616 std::vector<const tt::SensorModule*> sminner;
617 std::vector<const tt::SensorModule*> smouter;
621 std::array<double, 2> tan_range = {{0, outer_tan_max}};
630 smouter =
getSensorModules(layerdisk2, isPSouter, {{outer_tan_min, outer_tan_max}});
631 std::array<double, 2> tan_range =
getTanRange(smouter);
639 smouter =
getSensorModules(layerdisk2, isPSouter, {{outer_tan_min, outer_tan_max}});
641 std::array<double, 2> tan_range =
getTanRange(smouter);
649 for (
int ibend = 0; ibend < (1 << nbendbitsinner); ibend++) {
652 bend_cuts_inner.push_back({{mid,
cut}});
654 for (
int ibend = 0; ibend < (1 << nbendbitsouter); ibend++) {
657 bend_cuts_outer.push_back({{mid,
cut}});
661 for (
int iphiinnerbin = 0; iphiinnerbin < innerphibins; iphiinnerbin++) {
662 phiinner[0] = innerphimin + iphiinnerbin * (innerphimax - innerphimin) / innerphibins;
663 phiinner[1] = innerphimin + (iphiinnerbin + 1) * (innerphimax - innerphimin) / innerphibins;
664 for (
int iphiouterbin = 0; iphiouterbin < outerphibins; iphiouterbin++) {
665 phiouter[0] = outerphimin + iphiouterbin * (outerphimax - outerphimin) / outerphibins;
666 phiouter[1] = outerphimin + (iphiouterbin + 1) * (outerphimax - outerphimin) / outerphibins;
668 double bendinnermin = 20.0;
669 double bendinnermax = -20.0;
670 double bendoutermin = 20.0;
671 double bendoutermax = -20.0;
672 double rinvmin = 1.0;
673 double rinvmax = -1.0;
674 double absrinvmin = 1.0;
676 for (
int i1 = 0;
i1 < 2;
i1++) {
677 for (
int i2 = 0;
i2 < 2;
i2++) {
678 for (
int i3 = 0;
i3 < 2;
i3++) {
687 if (rinner >= router[
i3])
691 double rinv1 = (rinner < router[
i3]) ? -
rinv(phiinner[
i1], phiouter[
i2], rinner, router[
i3]) : -20.0;
700 if (abendinner < bendinnermin)
701 bendinnermin = abendinner;
702 if (abendinner > bendinnermax)
703 bendinnermax = abendinner;
704 if (abendouter < bendoutermin)
705 bendoutermin = abendouter;
706 if (abendouter > bendoutermax)
707 bendoutermax = abendouter;
718 double lowrinvcutte = 0.002;
725 bendfac = (rinvmin < lowrinvcutte and rinvmax > -lowrinvcutte) ? 1.05 : 1.0;
732 for (
int ibend = 0; ibend < (1 << nbendbitsinner); ibend++) {
733 double bendminfac = (isPSinner and (ibend == 2
or ibend == 3)) ? bendfac : 1.0;
734 double bendmaxfac = (isPSinner and (ibend == 6
or ibend == 5)) ? bendfac : 1.0;
736 double mid = bend_cuts_inner.at(ibend)[0];
737 double cut = bend_cuts_inner.at(ibend)[1];
739 bool passinner = mid +
cut * bendmaxfac > bendinnermin && mid -
cut * bendminfac < bendinnermax;
745 table_.push_back(passinner && passptcut);
749 for (
int ibend = 0; ibend < (1 << nbendbitsouter); ibend++) {
750 double bendminfac = (isPSouter and (ibend == 2
or ibend == 3)) ? bendfac : 1.0;
751 double bendmaxfac = (isPSouter and (ibend == 6
or ibend == 5)) ? bendfac : 1.0;
753 double mid = bend_cuts_outer.at(ibend)[0];
754 double cut = bend_cuts_outer.at(ibend)[1];
756 bool passouter = mid +
cut * bendmaxfac > bendoutermin && mid -
cut * bendminfac < bendoutermax;
762 table_.push_back(passouter && passptcut);
774 name_ =
"VMSTE_" + innermem +
"_vmbendcut.tab";
776 name_ =
"VMSTE_" + outermem +
"_vmbendcut.tab";
779 name_ =
"TE_" + innermem.substr(0, innermem.size() - 2) +
"_" + outermem.substr(0, outermem.size() - 2);
781 name_ +=
"_stubptinnercut.tab";
783 name_ +=
"_stubptoutercut.tab";
792 unsigned int nphiderbits) {
793 unsigned int nsignbins = 2;
794 unsigned int nrbins = 1 << (nrbits);
795 unsigned int nphiderbins = 1 << (nphiderbits);
797 for (
unsigned int isignbin = 0; isignbin < nsignbins; isignbin++) {
798 for (
unsigned int irbin = 0; irbin < nrbins; irbin++) {
800 if (ir > (1 << (nrbits - 1)))
803 for (
unsigned int iphiderbin = 0; iphiderbin < nphiderbins; iphiderbin++) {
804 int iphider = iphiderbin;
805 if (iphider > (1 << (nphiderbits - 1)))
806 iphider -= (1 << nphiderbits);
810 double phider = iphider * k_phider;
816 double rinv = -phider * (2.0 *
t);
821 constexpr
double maxbend = (1 <<
NRINVBITS) - 1;
823 int ibendproj = 2.0 * bendproj + 0.5 * maxbend;
826 if (ibendproj > maxbend)
829 table_.push_back(ibendproj);
846 double roffset = 3.0;
848 for (
unsigned int ir = 0; ir < (1u << nrbits); ir++) {
859 rbin2 = clamp(rbin2, 0, ((1 <<
N_RZBITS) - 1));
862 assert(rbin2 - rbin1 <= 1);
864 int d = rbin1 != rbin2;
871 finer = clamp(finer, 0, ((1 << (
NFINERZBITS + 1)) - 1));
876 int word = (finer << (
N_RZBITS + N_DIFF_FLAG)) + (rbin1 << N_DIFF_FLAG) +
d;
884 name_ =
"ProjectionDiskRadius.tab";
890 double rinvhalf = 0.5 * ((1 << nrinv) - 1);
899 std::vector<std::array<double, 2>> bend_cuts;
903 std::vector<const tt::SensorModule*> sm =
getSensorModules(layerdisk, isPSmodule);
904 bend_cuts =
getBendCut(layerdisk, sm, isPSmodule, bendcutFE);
907 for (
unsigned int ibend = 0; ibend < (1u << nbits); ibend++) {
910 bend_cuts.push_back({{mid,
cut}});
914 for (
unsigned int irinv = 0; irinv < (1u << nrinv); irinv++) {
918 for (
unsigned int ibend = 0; ibend < (1u << nbits); ibend++) {
919 double mid = bend_cuts[ibend][0];
920 double cut = bend_cuts[ibend][1];
922 double pass = mid +
cut > projbend && mid -
cut < projbend;
928 std::vector<std::array<double, 2>> bend_cuts_2S;
929 std::vector<std::array<double, 2>> bend_cuts_PS;
933 std::vector<const tt::SensorModule*> sm2S =
getSensorModules(layerdisk,
false);
934 bend_cuts_2S =
getBendCut(layerdisk, sm2S,
false, bendcutFE2S);
937 std::vector<const tt::SensorModule*> smPS =
getSensorModules(layerdisk,
true);
938 bend_cuts_PS =
getBendCut(layerdisk, smPS,
true, bendcutFEPS);
941 for (
unsigned int ibend = 0; ibend < (1 <<
N_BENDBITS_2S); ibend++) {
944 bend_cuts_2S.push_back({{mid,
cut}});
946 for (
unsigned int ibend = 0; ibend < (1 <<
N_BENDBITS_PS); ibend++) {
949 bend_cuts_PS.push_back({{mid,
cut}});
953 for (
unsigned int iprojbend = 0; iprojbend < (1u << nrinv); iprojbend++) {
954 double projbend = 0.5 * (iprojbend - rinvhalf);
955 for (
unsigned int ibend = 0; ibend < (1 <<
N_BENDBITS_2S); ibend++) {
956 double mid = bend_cuts_2S[ibend][0];
957 double cut = bend_cuts_2S[ibend][1];
959 double pass = mid +
cut > projbend && mid -
cut < projbend;
964 for (
unsigned int iprojbend = 0; iprojbend < (1u << nrinv); iprojbend++) {
965 double projbend = 0.5 * (iprojbend - rinvhalf);
966 for (
unsigned int ibend = 0; ibend < (1 <<
N_BENDBITS_PS); ibend++) {
967 double mid = bend_cuts_PS[ibend][0];
968 double cut = bend_cuts_PS[ibend][1];
970 double pass = mid +
cut > projbend && mid -
cut < projbend;
988 unsigned int rbins = (1 << rbits);
989 unsigned int zbins = (1 << zbits);
1005 double dr = (rmax - rmin) / rbins;
1010 for (
unsigned int izbin = 0; izbin <
zbins; izbin++) {
1011 for (
unsigned int irbin = 0; irbin < rbins; irbin++) {
1012 double r = rmin + (irbin + 0.5) * dr;
1013 double z =
zmin + (izbin + 0.5) *
dz;
1016 int iznew = izbin - (1 << (zbits - 1));
1018 iznew += (1 << zbits);
1020 assert(iznew < (1 << zbits));
1021 z =
zmin + (iznew + 0.5) *
dz;
1023 int irnew = irbin - (1 << (rbits - 1));
1025 irnew += (1 << rbits);
1027 assert(irnew < (1 << rbits));
1028 r = rmin + (irnew + 0.5) * dr;
1032 unsigned int NRING =
1034 if (layerdisk >=
N_LAYER && irbin < 2 * NRING)
1054 if (
type == VMRTableType::disk) {
1077 if (
type == VMRTableType::inneroverlap) {
1083 if (
type == VMRTableType::innerthird) {
1109 if (
type == VMRTableType::disk) {
1121 if (
type == VMRTableType::inneroverlap) {
1138 char cregion =
'A' +
region;
1149 if (
type == VMRTableType::inneroverlap) {
1155 if (
type == VMRTableType::disk) {
1168 double constexpr zcutL2L3 = 52.0;
1174 double rratio1 = rmean / (r + 0.5 * dr);
1175 double rratio2 = rmean / (r - 0.5 * dr);
1177 double z1 = (z - 0.5 *
dz) * rratio1 +
z0cut * (rratio1 - 1.0);
1178 double z2 = (z + 0.5 *
dz) * rratio1 +
z0cut * (rratio1 - 1.0);
1179 double z3 = (z - 0.5 *
dz) * rratio2 +
z0cut * (rratio2 - 1.0);
1180 double z4 = (z + 0.5 *
dz) * rratio2 +
z0cut * (rratio2 - 1.0);
1181 double z5 = (z - 0.5 *
dz) * rratio1 -
z0cut * (rratio1 - 1.0);
1182 double z6 = (z + 0.5 *
dz) * rratio1 -
z0cut * (rratio1 - 1.0);
1183 double z7 = (z - 0.5 *
dz) * rratio2 -
z0cut * (rratio2 - 1.0);
1184 double z8 = (z + 0.5 *
dz) * rratio2 -
z0cut * (rratio2 - 1.0);
1214 int value = zbin1 / 8;
1216 if (zbin2 / 8 - zbin1 / 8 > 0)
1219 value += (zbin1 & 7);
1221 int deltaz = zbin2 - zbin1;
1226 value += (deltaz << 7);
1238 double r1 = (r + 0.5 * dr) * (zmean +
z0cut) / (z + 0.5 *
dz +
z0cut);
1239 double r2 = (r - 0.5 * dr) * (zmean -
z0cut) / (z + 0.5 *
dz -
z0cut);
1240 double r3 = (r + 0.5 * dr) * (zmean +
z0cut) / (z - 0.5 *
dz +
z0cut);
1241 double r4 = (r - 0.5 * dr) * (zmean -
z0cut) / (z - 0.5 *
dz -
z0cut);
1242 double r5 = (r + 0.5 * dr) * (zmean -
z0cut) / (z + 0.5 *
dz -
z0cut);
1243 double r6 = (r - 0.5 * dr) * (zmean +
z0cut) / (z + 0.5 *
dz +
z0cut);
1244 double r7 = (r + 0.5 * dr) * (zmean -
z0cut) / (z - 0.5 *
dz -
z0cut);
1245 double r8 = (r - 0.5 * dr) * (zmean +
z0cut) / (z - 0.5 *
dz +
z0cut);
1247 double rmin =
std::min({r1,
r2, r3, r4, r5, r6, r7, r8});
1248 double rmax =
std::max({r1,
r2, r3, r4, r5, r6, r7, r8});
1262 if (rmin > rmaxdisk)
1264 if (rmax > rmaxdisk)
1267 if (rmax < rmindisk)
1269 if (rmin < rmindisk)
1276 constexpr
double rminspec = 40.0;
1298 int value = rbin1 / 8;
1304 if (rbin2 / 8 - rbin1 / 8 > 0)
1307 value += (rbin1 & 7);
1309 int deltar = rbin2 - rbin1;
1327 unsigned int rbins = (1 << rbits);
1332 double dr = 2.0 * drmax / rbins;
1334 std::vector<std::array<double, 2>> bend_vals;
1337 std::vector<const tt::SensorModule*> sm =
getSensorModules(layerdisk, psmodule);
1338 bend_vals =
getBendCut(layerdisk, sm, psmodule);
1341 for (
int ibend = 0; ibend < 1 << bendbits; ibend++) {
1346 for (
int ibend = 0; ibend < 1 << bendbits; ibend++) {
1347 for (
unsigned int irbin = 0; irbin < rbins; irbin++) {
1348 double bend = -bend_vals[ibend][0];
1362 unsigned int layerdisk,
double bend,
unsigned int irbin,
double rmean,
double dr,
double drmax)
const {
1366 double Delta = (irbin + 0.5) * dr - drmax;
1369 double drnom = 0.18;
1374 int idphi = dphi / kphi;
1385 if (
name_.empty()) {
1392 for (
unsigned int i = 0;
i <
table_.size();
i++) {
1400 itable = (1 <<
nbits_) - 1;
1406 out << endl <<
"};" << endl;
1419 for (
unsigned int i = 0;
i <
table_.size();
i++) {
1423 itable = (1 <<
nbits_) - 1;
1427 out << uppercase << setfill(
'0') << setw(
width) << hex << itable <<
dec << endl;
double rphicutPS(unsigned int iSeed, unsigned int idisk) const
unsigned int vmrlutrbits(unsigned int layerdisk) const
void initBendMatch(unsigned int layerdisk)
constexpr unsigned int N_RZBITS
double sensorSpacing2S() const
double zmatchcut(unsigned int iSeed, unsigned int ilayer) const
double bendcutME(unsigned int layerdisk, bool isPSmodule) const
unsigned int nrbitsstub(unsigned int layerdisk) const
unsigned int NLONGVMBITS() const
void initmatchcut(unsigned int layerdisk, MatchType type, unsigned int region)
double rDSSinner(unsigned int iBin) const
double benddecode(int ibend, int layerdisk, bool isPSmodule) const
constexpr unsigned int NRINVBITS
constexpr unsigned int N_SEED
void initProjectionBend(double k_phider, unsigned int idisk, unsigned int nrbits, unsigned int nphiderbits)
void initteptlut(bool fillInner, bool fillTEMem, unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int innerphibits, unsigned int outerphibits, double innerphimin, double innerphimax, double outerphimin, double outerphimax, const std::string &innermem, const std::string &outermem)
double dphisectorHG() const
const Settings & settings_
static std::string LayerName(unsigned int ilayer)
constexpr unsigned int N_BENDBITS_2S
int lookup(unsigned int index) const
double rmindiskvm() const
double rphimatchcut(unsigned int iSeed, unsigned int ilayer) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
constexpr unsigned int N_DSS_MOD
int getphiCorrValue(unsigned int layerdisk, double bend, unsigned int irbin, double rmean, double dr, double drmax) const
static std::string to_string(const XMLCh *ch)
constexpr unsigned int N_BENDBITS_PS
const std::vector< double > & encodingBend(int windowSize, bool psModule) const
void initPhiCorrTable(unsigned int layerdisk, unsigned int rbits)
std::array< double, 2 > getTanRange(const std::vector< const tt::SensorModule *> &sensorModules)
unsigned int NLONGVMBINS() const
std::string tablePath() const
double rmindiskl2overlapvm() const
unsigned int nbitsallstubs(unsigned int layerdisk) const
double half2SmoduleWidth() const
double rmean(unsigned int iLayer) const
double rDSSouter(unsigned int iBin) const
const std::vector< SensorModule > & sensorModules() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
def unique(seq, keepstr=True)
double stripPitch(bool isPSmodule) const
Abs< T >::type abs(const T &t)
double bendcutme(int ibend, int layerdisk, bool isPSmodule) const
float degradeBend(bool psModule, int window, int bend) const
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
double convertFEBend(double FEbend, double sensorSep, double sensorSpacing, double CF, bool barrel, double r=0)
double bendcutte(int ibend, int layerdisk, bool isPSmodule) const
double zmean(unsigned int iDisk) const
unsigned int nvmte(unsigned int inner, unsigned int iSeed) const
constexpr unsigned int NFINERZBITS
double tan_theta(double r, double z, double z0, bool z0_max)
unsigned int nallstubs(unsigned int layerdisk) const
double rcut2S(unsigned int iSeed, unsigned int idisk) const
constexpr unsigned int N_PSLAYER
double rphicut2S(unsigned int iSeed, unsigned int idisk) const
const StubAlgorithmOfficial * stubAlgorithm() const
double rcutPS(unsigned int iSeed, unsigned int idisk) const
double rinv(double phi1, double phi2, double r1, double r2)
void initTPlut(bool fillInner, unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int nbitsfinephidiff, unsigned int iTP)
int nfinephi(unsigned int inner, unsigned int iSeed) const
unsigned int nbitsphiprojderL123() const
void initTPregionlut(unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int iAllStub, unsigned int nbitsfinephidiff, unsigned int nbitsfinephi, const TrackletLUT &tplutinner, unsigned int iTP)
std::vector< std::array< double, 2 > > getBendCut(unsigned int layerdisk, const std::vector< const tt::SensorModule *> &sensorModules, bool isPS, double FEbendcut=0)
double rmaxdiskvm() const
int getVMRLookup(unsigned int layerdisk, double z, double r, double dz, double dr, int iseed=-1) const
double zmaxdisk(unsigned int iDisk) const
std::vector< int > table_
double krprojshiftdisk() const
void initProjectionDiskRadius(int nrbits)
std::vector< const tt::SensorModule * > getSensorModules(unsigned int layerdisk, bool isPS, std::array< double, 2 > tan_range={{-1, -1}}, unsigned int nzbins=1, unsigned int zbin=0)
void initVMRTable(unsigned int layerdisk, VMRTableType type, int region=-1)
double bendstrip(double r, double rinv, double stripPitch, double sensorSpacing)
std::ofstream openfile(const std::string &dir, const std::string &fname, const char *file, int line)
double zmindisk(unsigned int iDisk) const
unsigned int vmrlutzbits(unsigned int layerdisk) const
double bendcutTE(unsigned int seed, bool inner) const
double rmaxdiskl1overlapvm() const