CMS 3D CMS Logo

Settings.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_Settings_h
2 #define L1Trigger_TrackFindingTracklet_interface_Settings_h
3 
4 #include <iostream>
5 #include <string>
6 #include <array>
7 #include <set>
8 #include <cassert>
9 #include <cmath>
10 #include <unordered_map>
11 #include <map>
12 #include <vector>
13 
16 
17 namespace trklet {
18 
19  constexpr unsigned int N_SECTOR = 9; // # of phi sectors for L1TK processing
20 
21  constexpr int N_LAYER = 6; // # of barrel layers assumed
22  constexpr int N_DISK = 5; // # of endcap disks assumed
23  constexpr unsigned int N_PSLAYER = 3; // # of barrel PS layers assumed
24  constexpr unsigned int N_SEED = 12; // # of tracklet+triplet seeds
25  constexpr unsigned int N_SEED_PROMPT = 8; // # of tracklet (prompt) seeds
26 
27  constexpr unsigned int N_DSS_MOD = 5; // # of rings with 2S modules per disk
28 
29  constexpr unsigned int N_BENDBITS_PS = 3; // Number of bend bits for PS modules
30  constexpr unsigned int N_BENDBITS_2S = 4; // Number of bend bits for 2S modules
31 
32  constexpr unsigned int NRINVBITS = 5; //number of bit for rinv in bend match table
33  constexpr unsigned int NFINERZBITS = 3; //number of bit for r or z within a r/z bin
34  constexpr unsigned int NFINEPHIBITS = 3; //number of bits for phi within a vm bin
35  constexpr unsigned int N_RZBITS = 3; //number of bit for the r/z bins
36  constexpr unsigned int N_PHIBITS = 3; //number of bit for the phi bins
37 
38  constexpr unsigned int N_VMSTUBSMAX = 15; // maximum number of stubs in VM bin
39  constexpr unsigned int N_BITSMEMADDRESS = 7; // Number of bits for address in memories
40 
41  constexpr double sixth = 1.0 / 6.0; //Commonly used factor
42  constexpr double third = 1.0 / 3.0; //Commonly used factor
43 
44  constexpr double VMROUTERCUTZL2 = 50.0; //Min L2 z for inner allstub
45  constexpr double VMROUTERCUTZL1L3L5 = 95.0; //Max z for inner barrel layers
46  constexpr double VMROUTERCUTZL1 = 70.0; //Max z for L1 barrel seeding
47  constexpr double VMROUTERCUTRD1D3 = 55.0; //Max r for disk seeds
48 
50  enum LayerDisk { L1 = 0, L2, L3, L4, L5, L6, D1, D2, D3, D4, D5 };
51 
52  class Settings {
53  public:
55  //Comment out to run tracklet-only algorithm
56 #ifdef CMSSW_GIT_HASH
57 #ifndef USEHYBRID
58 #pragma message "USEHYBRID is undefined, so Hybrid L1 tracking disabled."
59 #endif
60 #endif
61  }
62 
63  ~Settings() = default;
64 
65  // processing & memory modules, wiring, etc.
66  std::string const& fitPatternFile() const { return fitPatternFile_; }
69  std::string const& wiresFile() const { return wiresFile_; }
70  std::string const& tableTEDFile() const { return tableTEDFile_; }
71  std::string const& tableTREFile() const { return tableTREFile_; }
72 
73  void setFitPatternFile(std::string fitPatternFileName) { fitPatternFile_ = fitPatternFileName; }
74  void setProcessingModulesFile(std::string processingModulesFileName) {
75  processingModulesFile_ = processingModulesFileName;
76  }
77  void setMemoryModulesFile(std::string memoryModulesFileName) { memoryModulesFile_ = memoryModulesFileName; }
78  void setWiresFile(std::string wiresFileName) { wiresFile_ = wiresFileName; }
79  void setTableTEDFile(std::string tableTEDFileName) { tableTEDFile_ = tableTEDFileName; }
80  void setTableTREFile(std::string tableTREFileName) { tableTREFile_ = tableTREFileName; }
81 
82  unsigned int nzbitsstub(unsigned int layerdisk) const { return nzbitsstub_[layerdisk]; }
83  unsigned int nphibitsstub(unsigned int layerdisk) const { return nphibitsstub_[layerdisk]; }
84  unsigned int nrbitsstub(unsigned int layerdisk) const { return nrbitsstub_[layerdisk]; }
85 
86  unsigned int nrbitsprojderdisk() const { return nrbitsprojderdisk_; }
87  unsigned int nbitsphiprojderL123() const { return nbitsphiprojderL123_; }
88  unsigned int nbitsphiprojderL456() const { return nbitsphiprojderL456_; }
89  unsigned int nbitszprojderL123() const { return nbitszprojderL123_; }
90  unsigned int nbitszprojderL456() const { return nbitszprojderL456_; }
91 
92  unsigned int nbendbitsmedisk() const { return nbendbitsmedisk_; }
93 
94  bool useSeed(unsigned int iSeed) const { return useseeding_.find(iSeed) != useseeding_.end(); }
95  unsigned int nbitsvmte(unsigned int inner, unsigned int iSeed) const {
96  if (combined_) {
97  return nbitsvmtecm_[inner][iSeed];
98  }
99  return nbitsvmte_[inner][iSeed];
100  }
101  unsigned int nvmte(unsigned int inner, unsigned int iSeed) const { return (1 << nbitsvmte(inner, iSeed)); }
102 
103  unsigned int nbitsvmme(unsigned int layerdisk) const { return nbitsvmme_[layerdisk]; }
104  unsigned int nvmme(unsigned int layerdisk) const { return (1 << nbitsvmme_[layerdisk]); }
105 
106  unsigned int nbitsallstubs(unsigned int layerdisk) const { return nbitsallstubs_[layerdisk]; }
107  unsigned int nallstubs(unsigned int layerdisk) const { return (1 << nbitsallstubs_[layerdisk]); }
108 
110  if (writeMonitorData_.find(module) == writeMonitorData_.end()) {
111  throw cms::Exception("BadConfig") << "Settings::writeMonitorData module = " << module << " not known";
112  }
113  return writeMonitorData_.at(module);
114  }
115 
116  unsigned int maxStep(std::string module) const {
117  if (maxstep_.find(module) == maxstep_.end()) {
118  throw cms::Exception("BadConfig")
119  << __FILE__ << " " << __LINE__ << " maxStep module = " << module << " not known";
120  }
122  }
123 
124  double zlength() const { return zlength_; }
125  double rmaxdisk() const { return rmaxdisk_; }
126  double rmindisk() const { return rmindisk_; }
127 
128  double drmax() const { return rmaxdisk_ / deltarzfract_; }
129  double dzmax() const { return zlength_ / deltarzfract_; }
130 
131  double half2SmoduleWidth() const { return half2SmoduleWidth_; }
132 
133  int nfinephi(unsigned int inner, unsigned int iSeed) const { return nfinephi_[inner][iSeed]; }
134  double nphireg(unsigned int inner, unsigned int iSeed) const {
135  if (combined_) {
136  return nphiregcm_[inner][iSeed];
137  }
138  return nphireg_[inner][iSeed];
139  }
140  double lutwidthtab(unsigned int inner, unsigned int iSeed) const { return lutwidthtab_[inner][iSeed]; }
141  double lutwidthtabextended(unsigned int inner, unsigned int iSeed) const {
142  return lutwidthtabextended_[inner][iSeed];
143  }
144 
145  unsigned int seedlayers(int inner, int seed) const {
146  int layerdisk = seedlayers_[seed][inner];
147  assert(layerdisk >= 0);
148  return layerdisk;
149  }
150 
151  unsigned int teunits(unsigned int iSeed) const { return teunits_[iSeed]; }
152 
153  unsigned int NTC(int seed) const { return ntc_[seed]; }
154 
155  unsigned int projlayers(unsigned int iSeed, unsigned int i) const { return projlayers_[iSeed][i]; }
156  unsigned int projdisks(unsigned int iSeed, unsigned int i) const { return projdisks_[iSeed][i]; }
157  double rphimatchcut(unsigned int iSeed, unsigned int ilayer) const { return rphimatchcut_[ilayer][iSeed]; }
158  double zmatchcut(unsigned int iSeed, unsigned int ilayer) const { return zmatchcut_[ilayer][iSeed]; }
159  double rphicutPS(unsigned int iSeed, unsigned int idisk) const { return rphicutPS_[idisk][iSeed]; }
160  double rcutPS(unsigned int iSeed, unsigned int idisk) const { return rcutPS_[idisk][iSeed]; }
161  double rphicut2S(unsigned int iSeed, unsigned int idisk) const { return rphicut2S_[idisk][iSeed]; }
162  double rcut2S(unsigned int iSeed, unsigned int idisk) const { return rcut2S_[idisk][iSeed]; }
163 
164  double rmean(unsigned int iLayer) const { return irmean_[iLayer] * rmaxdisk_ / 4096; }
165  double rmax(unsigned int iLayer) const { return rmean(iLayer) + drmax(); }
166  double rmin(unsigned int iLayer) const { return rmean(iLayer) - drmax(); }
167  double zmean(unsigned int iDisk) const { return izmean_[iDisk] * zlength_ / 2048; }
168  double zmax(unsigned int iDisk) const { return zmean(iDisk) + dzmax(); }
169  double zmin(unsigned int iDisk) const { return zmean(iDisk) - dzmax(); }
170 
171  double rDSSinner(unsigned int iBin) const {
172  return rDSSinner_mod_[iBin / 2] + halfstrip_ * ((iBin % 2 == 0) ? -1 : 1);
173  }
174  double rDSSouter(unsigned int iBin) const {
175  return rDSSouter_mod_[iBin / 2] + halfstrip_ * ((iBin % 2 == 0) ? -1 : 1);
176  }
177 
178  unsigned int vmrlutzbits(unsigned int layerdisk) const { return vmrlutzbits_[layerdisk]; }
179  unsigned int vmrlutrbits(unsigned int layerdisk) const { return vmrlutrbits_[layerdisk]; }
180 
181  bool printDebugKF() const { return printDebugKF_; }
182  bool debugTracklet() const { return debugTracklet_; }
183  bool writetrace() const { return writetrace_; }
184 
185  bool warnNoMem() const { return warnNoMem_; }
186  bool warnNoDer() const { return warnNoDer_; }
187 
188  bool writeMem() const { return writeMem_; }
189  bool writeTable() const { return writeTable_; }
190  bool writeConfig() const { return writeConfig_; }
191 
192  std::string memPath() const { return memPath_; }
193  std::string tablePath() const { return tablePath_; }
194 
195  bool writeVerilog() const { return writeVerilog_; }
196  bool writeHLS() const { return writeHLS_; }
197  bool writeInvTable() const { return writeInvTable_; }
198  bool writeHLSInvTable() const { return writeHLSInvTable_; }
199 
200  unsigned int writememsect() const { return writememsect_; }
201 
202  bool enableTripletTables() const { return enableTripletTables_; }
203  bool writeTripletTables() const { return writeTripletTables_; }
204 
205  bool writeoutReal() const { return writeoutReal_; }
206 
207  bool bookHistos() const { return bookHistos_; }
208 
209  double ptcut() const { return ptcut_; }
210  double rinvcut() const { return 0.01 * c_ * bfield_ / ptcut_; } //0.01 to convert to cm-1
211 
212  double c() const { return c_; }
213 
214  double rinvmax() const { return 0.01 * c_ * bfield_ / ptmin_; }
215 
216  int alphashift() const { return alphashift_; }
217  int nbitsalpha() const { return nbitsalpha_; }
218  int alphaBitsTable() const { return alphaBitsTable_; }
219  int nrinvBitsTable() const { return nrinvBitsTable_; }
220 
221  unsigned int MEBinsBits() const { return MEBinsBits_; }
222  unsigned int MEBins() const { return 1u << MEBinsBits_; }
223  unsigned int MEBinsDisks() const { return MEBinsDisks_; }
224  unsigned int maxStubsPerBin() const { return maxStubsPerBin_; }
225 
227  std::string geo = extended_ ? "hourglassExtended" : "hourglass";
228  if (combined_)
229  geo += "Combined";
230  return geo;
231  }
232 
233  bool exactderivatives() const { return exactderivatives_; }
235  bool useapprox() const { return useapprox_; }
236  bool usephicritapprox() const { return usephicritapprox_; }
237 
238  unsigned int minIndStubs() const { return minIndStubs_; }
241  bool doKF() const { return doKF_; }
242  bool doMultipleMatches() const { return doMultipleMatches_; }
243  bool fakefit() const { return fakefit_; }
244  void setFakefit(bool fakefit) { fakefit_ = fakefit; }
248  }
251 
252  // configurable
253  unsigned int nHelixPar() const { return nHelixPar_; }
254  void setNHelixPar(unsigned int nHelixPar) { nHelixPar_ = nHelixPar; }
255 
256  bool extended() const { return extended_; }
258  bool combined() const { return combined_; }
260  bool reduced() const { return reduced_; }
261  void setReduced(bool reduced) { reduced_ = reduced; }
262 
263  double bfield() const { return bfield_; }
264  void setBfield(double bfield) { bfield_ = bfield; }
265 
266  unsigned int nStrips(bool isPSmodule) const { return isPSmodule ? nStrips_PS_ : nStrips_2S_; }
267  void setNStrips_PS(unsigned int nStrips_PS) { nStrips_PS_ = nStrips_PS; }
268  void setNStrips_2S(unsigned int nStrips_2S) { nStrips_2S_ = nStrips_2S; }
269 
270  double stripPitch(bool isPSmodule) const { return isPSmodule ? stripPitch_PS_ : stripPitch_2S_; }
271  void setStripPitch_PS(double stripPitch_PS) { stripPitch_PS_ = stripPitch_PS; }
272  void setStripPitch_2S(double stripPitch_2S) { stripPitch_2S_ = stripPitch_2S; }
273 
274  double stripLength(bool isPSmodule) const { return isPSmodule ? stripLength_PS_ : stripLength_2S_; }
275  void setStripLength_PS(double stripLength_PS) { stripLength_PS_ = stripLength_PS; }
276  void setStripLength_2S(double stripLength_2S) { stripLength_2S_ = stripLength_2S; }
277 
278  std::string skimfile() const { return skimfile_; }
280 
281  unsigned int nbitstrackletindex() const { return nbitstrackletindex_; }
283 
284  unsigned int nbitsitc() const { return nbitsitc_; }
285  unsigned int nbitsseed() const { return (extended_ ? nbitsseedextended_ : nbitsseed_); }
286  unsigned int nbitstcindex() const { return nbitsseed() + nbitsitc(); }
287  void setNbitsitc(unsigned int nbitsitc) { nbitsitc_ = nbitsitc; }
288  void setNbitsseed(unsigned int nbitsseed) { nbitsseed_ = nbitsseed; }
290 
291  // Phi width of nonant including overlaps (at widest point).
292  double dphisectorHG() const {
293  //These values are used in the DTC emulation code.
294  double rsectmin = 21.8;
295  double rsectmax = 112.7;
296  return 2 * M_PI / N_SECTOR + rinvmax() * std::max(rcrit_ - rsectmin, rsectmax - rcrit_);
297  }
298 
299  double rcrit() const { return rcrit_; }
300 
301  double dphisector() const { return 2 * M_PI / N_SECTOR; }
302 
303  double phicritmin() const { return 0.5 * dphisectorHG() - M_PI / N_SECTOR; }
304  double phicritmax() const { return dphisectorHG() - 0.5 * dphisectorHG() + M_PI / N_SECTOR; }
305 
306  double phicritminmc() const { return phicritmin() - dphicritmc_; }
307  double phicritmaxmc() const { return phicritmax() + dphicritmc_; }
308 
309  // Stub digitization granularities
310  double kphi() const { return dphisectorHG() / (1 << nphibitsstub(0)); }
311  double kphi1() const { return dphisectorHG() / (1 << nphibitsstub(N_LAYER - 1)); }
312  double kphi(unsigned int layerdisk) const { return dphisectorHG() / (1 << nphibitsstub(layerdisk)); }
313 
314  double kz() const { return 2.0 * zlength_ / (1 << nzbitsstub_[0]); }
315  double kz(unsigned int layerdisk) const { return 2.0 * zlength_ / (1 << nzbitsstub_[layerdisk]); }
316  double kr() const { return rmaxdisk_ / (1 << nrbitsstub_[N_LAYER]); }
317  double krbarrel() const { return 2.0 * drmax() / (1 << nrbitsstub_[0]); }
318 
319  double maxrinv() const { return maxrinv_; }
320  double maxd0() const { return maxd0_; }
321  unsigned int nbitsd0() const { return nbitsd0_; }
322 
323  double kd0() const { return 2 * maxd0_ / (1 << nbitsd0_); }
324 
325  double rinvcutte() const { return 0.01 * c_ * bfield_ / ptcutte_; } //0.01 to convert to cm-1
326 
327  double rmindiskvm() const { return rmindiskvm_; }
328  double rmaxdiskvm() const { return rmaxdiskvm_; }
329 
330  double rmaxdiskl1overlapvm() const { return rmaxdiskl1overlapvm_; }
331  double rmindiskl2overlapvm() const { return rmindiskl2overlapvm_; }
332  double rmindiskl3overlapvm() const { return rmindiskl3overlapvm_; }
333 
334  double rPS2S() const { return rPS2S_; }
335 
336  double z0cut() const { return z0cut_; }
337 
338  double disp_z0cut() const { return disp_z0cut_; }
339 
340  unsigned int NLONGVMBITS() const { return NLONGVMBITS_; }
341  unsigned int NLONGVMBINS() const { return (1 << NLONGVMBITS_); }
342 
343  unsigned int ntrackletmax() const { return ((1 << nbitstrackletindex_) - 1); }
344 
345  //Bits used to store track parameter in tracklet
346  int nbitsrinv() const { return nbitsrinv_; }
347  int nbitsphi0() const { return nbitsphi0_; }
348  int nbitst() const { return nbitst_; }
349  int nbitsz0() const { return nbitsz0_; }
350 
351  //track and tracklet parameters
352  int rinv_shift() const { return rinv_shift_; }
353  int phi0_shift() const { return phi0_shift_; }
354  int t_shift() const { return t_shift_; }
355  int z0_shift() const { return z0_shift_; }
356 
357  //projections are coarsened from global to stub precision
358 
359  //projection to R parameters
360  int SS_phiL_shift() const { return SS_phiL_shift_; }
361  int PS_zL_shift() const { return PS_zL_shift_; }
362 
363  int SS_phiderL_shift() const { return SS_phiderL_shift_; }
364  int PS_zderL_shift() const { return PS_zderL_shift_; }
365  int SS_zderL_shift() const { return SS_zderL_shift_; }
366 
367  //projection to Z parameters
368  int SS_phiD_shift() const { return SS_phiD_shift_; }
369  int PS_rD_shift() const { return PS_rD_shift_; }
370 
371  int SS_phiderD_shift() const { return SS_phiderD_shift_; }
372  int PS_rderD_shift() const { return PS_rderD_shift_; }
373 
374  //numbers needed for matches & fit, unclear what they are.
375  int phi0bitshift() const { return phi0bitshift_; }
376  int phiderbitshift() const { return phiderbitshift_; }
377  int zderbitshift() const { return zderbitshift_; }
378 
379  int phiresidbits() const { return phiresidbits_; }
380  int zresidbits() const { return zresidbits_; }
381  int rresidbits() const { return rresidbits_; }
382 
383  //Trackfit
384  int fitrinvbitshift() const { return fitrinvbitshift_; }
385  int fitphi0bitshift() const { return fitphi0bitshift_; }
386  int fittbitshift() const { return fittbitshift_; }
387  int fitz0bitshift() const { return fitz0bitshift_; }
388 
389  //r correction bits
390  int rcorrbits() const { return rcorrbits_; }
391 
392  int chisqphifactbits() const { return chisqphifactbits_; }
393  int chisqzfactbits() const { return chisqzfactbits_; }
394 
395  // Helix param digisation granularities
396  //0.02 here is the maximum range in rinv values that can be represented
397  double krinvpars() const {
398  int shift = ceil(-log2(0.02 * rmaxdisk_ / ((1 << nbitsrinv_) * dphisectorHG())));
399  return dphisectorHG() / rmaxdisk_ / (1 << shift);
400  }
401  double kphi0pars() const { return 2 * kphi1(); }
402  double ktpars() const { return maxt_ / (1 << nbitst_); }
403  double kz0pars() const { return kz(); }
404  double kd0pars() const { return kd0(); }
405 
406  double kphider() const { return kphi() / kr() / 256; }
407  double kphiderdisk() const { return kphi() / kr() / 128; }
408  double kzder() const { return 1.0 / 64; }
409  double krder() const { return 1.0 / 128; }
410 
411  //This is a 'historical accident' and should be fixed so that we don't
412  //have the factor if 2
413  double krprojshiftdisk() const { return 2 * kr(); }
414 
415  double benddecode(int ibend, int layerdisk, bool isPSmodule) const {
416  if (layerdisk >= N_LAYER && (!isPSmodule))
417  layerdisk += (N_LAYER - 1);
418  double bend = benddecode_[layerdisk][ibend];
419  assert(bend < 99.0);
420  return bend;
421  }
422 
423  double bendcut(int ibend, int layerdisk, bool isPSmodule) const {
424  if (layerdisk >= N_LAYER && (!isPSmodule))
425  layerdisk += N_DISK;
426  double bendcut = bendcut_[layerdisk][ibend];
427  if (bendcut <= 0.0)
428  std::cout << "bendcut : " << layerdisk << " " << ibend << " " << isPSmodule << std::endl;
429  assert(bendcut > 0.0);
430  return bendcut;
431  }
432 
433  // DTC in given ATCA crate slot.
434  std::string slotToDTCname(unsigned int slot) const { return slotToDTCname_.at(slot); }
435 
436  // Tracker layers read by given DTC.
437  const std::vector<int>& dtcLayers(const std::string& dtcName) const {
438  auto iter = dtclayers_.find(dtcName);
439  assert(iter != dtclayers_.end());
440  return iter->second;
441  }
442 
443  double bendcutte(int ibend, int layerdisk, bool isPSmodule) const { return bendcut(ibend, layerdisk, isPSmodule); }
444 
445  double bendcutme(int ibend, int layerdisk, bool isPSmodule) const {
446  //Should understand why larger cut needed in disks
447  double fact = (layerdisk < N_LAYER) ? 1.0 : 1.8;
448  return fact * bendcut(ibend, layerdisk, isPSmodule);
449  }
450 
451  //layers/disks used by each seed
452  std::array<std::array<int, 3>, N_SEED> seedlayers() const { return seedlayers_; }
453 
454  //projection layers by seed index. For each seeding index (row) the list of layers that we consider projections to
455  std::array<std::array<unsigned int, N_LAYER - 2>, N_SEED> projlayers() const { return projlayers_; }
456 
457  //projection disks by seed index. For each seeding index (row) the list of diks that we consider projections to
458  std::array<std::array<unsigned int, N_DISK>, N_SEED> projdisks() const { return projdisks_; }
459 
460  private:
467 
468  double rcrit_{55.0}; // critical radius for the hourglass configuration
469 
470  double dphicritmc_{0.005};
471 
472  //fraction of full r and z range that stubs can be located within layer/disk
473  double deltarzfract_{32.0};
474 
475  double maxt_{32.0}; //range in t that we must cover
476 
477  std::array<unsigned int, N_LAYER> irmean_{{851, 1269, 1784, 2347, 2936, 3697}};
478  std::array<unsigned int, N_DISK> izmean_{{2239, 2645, 3163, 3782, 4523}};
479 
480  std::array<unsigned int, N_LAYER + N_DISK> nzbitsstub_{{12, 12, 12, 8, 8, 8, 7, 7, 7, 7, 7}};
481  std::array<unsigned int, N_LAYER + N_DISK> nphibitsstub_{{14, 14, 14, 17, 17, 17, 14, 14, 14, 14, 14}};
482  std::array<unsigned int, N_LAYER + N_DISK> nrbitsstub_{{7, 7, 7, 7, 7, 7, 12, 12, 12, 12, 12}};
483 
484  unsigned int nrbitsprojderdisk_{9};
485  unsigned int nbitsphiprojderL123_{10};
486  unsigned int nbitsphiprojderL456_{10};
487  unsigned int nbitszprojderL123_{10};
488  unsigned int nbitszprojderL456_{9};
489 
490  unsigned int nbendbitsmedisk_{4}; // Always 4 bits even for PS disk hits, for HLS compatibility
491 
492  std::set<unsigned int> useseeding_{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
493 
494  std::array<unsigned int, N_LAYER + N_DISK> nbitsallstubs_{{3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}};
495  std::array<unsigned int, N_LAYER + N_DISK> nbitsvmme_{{2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2}};
496  std::array<std::array<unsigned int, N_SEED>, 3> nbitsvmte_{
497  {{{2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 2}}, // (3 = #stubs/triplet, only row 1+2 used for tracklet)
498  {{3, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2}},
499  {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1}}}};
500 
501  std::array<std::array<unsigned int, N_SEED>, 3> nbitsvmtecm_{
502  {{{2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 2}}, // (3 = #stubs/triplet, only row 1+2 used for tracklet)
503  {{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2}},
504  {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1}}}};
505 
506  // FIX: There should be 3 PS10G slots & 3 PS (5G) ones.
507  // (Will change output files used by HLS).
508  std::vector<std::string> slotToDTCname_{
509  "PS10G_1", "PS10G_2", "PS10G_3", "PS10G_4", "PS_1", "PS_2", "2S_1", "2S_2", "2S_3", "2S_4", "2S_5", "2S_6"};
510 
511  std::map<std::string, std::vector<int> > dtclayers_{{"PS10G_1", {0, 6, 8, 10}},
512  {"PS10G_2", {0, 7, 9}},
513  {"PS10G_3", {1, 7}},
514  {"PS10G_4", {6, 8, 10}},
515  {"PS_1", {2, 7}},
516  {"PS_2", {2, 9}},
517  {"2S_1", {3, 4}},
518  {"2S_2", {4}},
519  {"2S_3", {5}},
520  {"2S_4", {5, 8}},
521  {"2S_5", {6, 9}},
522  {"2S_6", {7, 10}}};
523 
524  double rmindiskvm_{22.5};
525  double rmaxdiskvm_{67.0};
526 
527  double rmaxdiskl1overlapvm_{45.0};
528  double rmindiskl2overlapvm_{40.0};
529  double rmindiskl3overlapvm_{50.0};
530 
531  double rPS2S_{60.0};
532 
533  double z0cut_{15.0};
534 
535  double disp_z0cut_{27.0};
536 
537  unsigned int NLONGVMBITS_{3};
538 
539  double zlength_{120.0};
540  double rmaxdisk_{120.0};
541  double rmindisk_{20.0};
542 
543  double half2SmoduleWidth_{4.57};
544 
545  double maxrinv_{0.006};
546  double maxd0_{10.0};
547 
548  unsigned int nbitsd0_{13};
549 
550  double ptmin_{2.0}; //minumim pt for tracks
551 
552  double ptcutte_{1.8}; //Minimum pt in TE
553 
554  // VALUE AUTOMATICALLY INCREASED FOR EXTENDED TRACKING BY PYTHON CFG
555  unsigned int nbitstrackletindex_{7}; //Bits used to store the tracklet index
556 
557  unsigned int nbitsitc_{4}; //Bits used to store the iTC, a unique
558  //identifier assigned to each TC within a sector
559  unsigned int nbitsseed_{3}; //Bits used to store the seed number
560  unsigned int nbitsseedextended_{4}; //Bits used to store the seed number
561  //in the extended project
562 
563  //Bits used to store track parameter in tracklet
564  int nbitsrinv_{14};
565  int nbitsphi0_{18};
566  int nbitst_{14};
567  int nbitsz0_{10};
568 
569  //track and tracklet parameters
570  int rinv_shift_{-8}; // Krinv = 2^shift * Kphi/Kr
571  int phi0_shift_{1}; // Kphi0 = 2^shift * Kphi
572  int t_shift_{-10}; // Kt = 2^shift * Kz/Kr
573  int z0_shift_{0}; // Kz0 = 2^shift * kz
574 
575  //projections are coarsened from global to stub precision
576 
577  //projection to R parameters
579  int PS_zL_shift_{0}; // z projections have global precision in ITC
580 
582  int PS_zderL_shift_{-7}; // Kderz = 2^shift * Kz/Kr
584 
585  //projection to Z parameters
587  int PS_rD_shift_{1}; // a bug?! coarser by a factor of two then stubs??
588 
590  int PS_rderD_shift_{-6}; //Kderrdisk = 2^shift * Kr/Kz
591 
592  //numbers needed for matches & fit, unclear what they are.
596 
597  int phiresidbits_{12};
598  int zresidbits_{9};
599  int rresidbits_{7};
600 
601  //Trackfit
602  int fitrinvbitshift_{9}; //6 OK?
603  int fitphi0bitshift_{6}; //4 OK?
604  int fittbitshift_{10}; //4 OK? //lower number gives rounding problems
605  int fitz0bitshift_{8}; //6 OK?
606 
607  //r correction bits
608  int rcorrbits_{6};
609 
612 
613  std::array<unsigned int, N_SEED> teunits_{{5, 2, 5, 3, 3, 2, 3, 2, 0, 0, 0, 0}}; //teunits used by seed
614 
615  std::array<unsigned int, N_LAYER + N_DISK> vmrlutzbits_{
616  {7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 3}}; // zbits used by LUT in VMR
617  std::array<unsigned int, N_LAYER + N_DISK> vmrlutrbits_{
618  {4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8}}; // rbits used by LUT in VMR
619 
620  std::array<std::array<unsigned int, N_SEED>, 3> nfinephi_{
621  {{{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}}, //inner (3 = #stubs/triplet, only row 1+2 used for tracklet)
622  {{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}}, //outer
623  {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3}}}}; //outermost (triplets only)
624 
625  //These are the number of bits used for the VM regions in the TE by seedindex
626  //FIXME not independed nbitsvmte
627  std::array<std::array<unsigned int, N_SEED>, 3> nphireg_{
628  {{{5, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4}}, //inner
629  {{5, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4}}, //outer
630  {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4}}}}; //outermost (triplets only)
631 
632  //For combined modules
633  std::array<std::array<unsigned int, N_SEED>, 3> nphiregcm_{
634  {{{5, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4}}, //inner
635  {{5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4}}, //outer
636  {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4}}}}; //outermost (triplets only)
637 
638  // These are the number of bits to represent lutval for VM memories in TE
639  std::array<std::array<unsigned int, N_SEED>, 3> lutwidthtab_{{{{10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 11, 0}},
640  {{6, 6, 6, 6, 10, 10, 10, 10, 0, 0, 6, 0}},
641  {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6}}}};
642 
643  // These are the number of bits to represent lutval for VM memories in TED
644  // TO DO: tune lutwidthtabextended_ values
645 
646  /* std::array<std::array<unsigned int, N_SEED>, 3> lutwidthtabextended_{ */
647  /* {{{11, 11, 21, 21, 21, 21, 11, 11, 0, 0, 21, 0}}, */
648  /* {{6, 6, 6, 6, 10, 10, 10, 10, 0, 0, 6, 0}}, */
649  /* {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6}}}}; */
650 
651  std::array<std::array<unsigned int, N_SEED>, 3> lutwidthtabextended_{
652  {{{21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}},
653  {{21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}},
654  {{21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}}}};
655 
656  //layers/disks used by each seed
657  std::array<std::array<int, 3>, N_SEED> seedlayers_{{{{0, 1, -1}}, //L1L2
658  {{1, 2, -1}}, //1 L2L3
659  {{2, 3, -1}}, //2 L3L4
660  {{4, 5, -1}}, //3 L5L6
661  {{6, 7, -1}}, //4 D1D2
662  {{8, 9, -1}}, //5 D3D4
663  {{0, 6, -1}}, //6 L1D1
664  {{1, 6, -1}}, //7 L2D1
665  {{2, 3, 1}}, //8 L2L3L4
666  {{4, 5, 3}}, //9 L4L5L6
667  {{1, 2, 6}}, //10 L2L3D1
668  {{6, 7, 1}}}}; //11 D1D2L2
669 
670  //Number of tracklet calculators for the prompt seeding combinations
671  std::array<unsigned int, N_SEED> ntc_{{12, 4, 4, 4, 4, 4, 8, 4, 0, 0, 0, 0}};
672 
673  //projection layers by seed index. For each seeding index (row) the list of layers that we consider projections to
674  std::array<std::array<unsigned int, N_LAYER - 2>, N_SEED> projlayers_{{{{3, 4, 5, 6}}, //0 L1L2
675  {{1, 4, 5, 6}}, //1 L2L3
676  {{1, 2, 5, 6}}, //2 L3L4
677  {{1, 2, 3, 4}}, //3 L5L6
678  {{1, 2}}, //4 D1D2
679  {{1}}, //5 D3D4
680  {{}}, //6 L1D1
681  {{1}}, //7 L2D1
682  {{1, 5, 6}}, //8 L2L3L4
683  {{1, 2, 3}}, //9 L4L5L6
684  {{1}}, //10 L2L3D1
685  {{1}}}}; //11 D1D2L2
686 
687  //projection disks by seed index. For each seeding index (row) the list of diks that we consider projections to
688  std::array<std::array<unsigned int, N_DISK>, N_SEED> projdisks_{{{{1, 2, 3, 4}}, //0 L1L2
689  {{1, 2, 3, 4}}, //1 L2L3
690  {{1, 2}}, //2 L3L4
691  {{}}, //3 L5L6
692  {{3, 4, 5}}, //4 D1D2
693  {{1, 2, 5}}, //5 D3D4
694  {{2, 3, 4, 5}}, //6 L1D1
695  {{2, 3, 4}}, //7 L2D1
696  {{1, 2, 3}}, //8 L2L3L4
697  {{}}, //9 L4L5L6
698  {{2, 3, 4}}, //10 L2L3D1
699  {{3, 4}}}}; //11 D1D2L2
700 
701  //rphi cuts for layers - the column is the seedindex
702  std::array<std::array<double, N_SEED>, N_LAYER> rphimatchcut_{
703  {{{0.0, 0.1, 0.07, 0.08, 0.07, 0.05, 0.0, 0.05, 0.08, 0.15, 0.125, 0.15}}, //Layer 1
704  {{0.0, 0.0, 0.06, 0.08, 0.05, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0}}, //Layer 2
705  {{0.1, 0.0, 0.0, 0.08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.08, 0.0, 0.0}}, //Layer 3
706  {{0.19, 0.19, 0.0, 0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}, //Layer 4
707  {{0.4, 0.4, 0.08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.08, 0.0, 0.0, 0.0}}, //Layer 5
708  {{0.5, 0.0, 0.19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0}}}}; //Layer 6
709 
710  //z cuts for layers - the column is the seedindex
711  std::array<std::array<double, N_SEED>, N_LAYER> zmatchcut_{
712  {{{0.0, 0.7, 5.5, 15.0, 1.5, 2.0, 0.0, 1.5, 1.0, 8.0, 1.0, 1.5}}, //Layer 1
713  {{0.0, 0.0, 3.5, 15.0, 1.25, 0.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0}}, //Layer 2
714  {{0.7, 0.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0}}, //Layer 3
715  {{3.0, 3.0, 0.0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}, //Layer 4
716  {{3.0, 3.0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.5, 0.0, 0.0, 0.0}}, //Layer 5
717  {{4.0, 0.0, 9.5, 0.0, 0.0, 0.0, 0.0, 0.0, 4.5, 0.0, 0.0, 0.0}}}}; //Layer 6
718 
719  //rphi cuts for PS modules in disks - the column is the seedindex
720  std::array<std::array<double, N_SEED>, N_DISK> rphicutPS_{
721  {{{0.2, 0.2, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}, //disk 1
722  {{0.2, 0.2, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.15, 0.0}}, //disk 2
723  {{0.25, 0.2, 0.0, 0.0, 0.15, 0.0, 0.2, 0.15, 0.0, 0.0, 0.0, 0.2}}, //disk 3
724  {{0.5, 0.2, 0.0, 0.0, 0.2, 0.0, 0.3, 0.5, 0.0, 0.0, 0.0, 0.0}}, //disk 4
725  {{0.0, 0.0, 0.0, 0.0, 0.25, 0.1, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0}}}}; //disk 5
726 
727  //r cuts for PS modules in disks - the column is the seedindex
728  std::array<std::array<double, N_SEED>, N_DISK> rcutPS_{
729  {{{0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}, //disk 1
730  {{0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 0.5, 0.0}}, //disk 2
731  {{0.5, 0.5, 0.0, 0.0, 0.5, 0.0, 0.6, 0.8, 0.0, 0.0, 0.0, 0.4}}, //disk 3
732  {{0.5, 0.5, 0.0, 0.0, 0.8, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0}}, //disk 4
733  {{0.0, 0.0, 0.0, 0.0, 1.0, 0.5, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0}}}}; //disk 5
734 
735  //rphi cuts for 2S modules in disks = the column is the seedindex
736  std::array<std::array<double, N_SEED>, N_DISK> rphicut2S_{
737  {{{0.5, 0.5, 0.8, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0}}, //disk 1
738  {{0.5, 0.5, 0.8, 0.0, 0.0, 0.0, 0.5, 0.15, 0.3, 0.0, 0.68, 0.0}}, //disk 2
739  {{0.5, 0.5, 0.0, 0.0, 0.15, 0.0, 0.2, 0.25, 0.0, 0.0, 0.8, 0.1}}, //disk 3
740  {{0.5, 0.5, 0.0, 0.0, 0.2, 0.0, 0.25, 0.5, 0.0, 0.0, 0.6, 0.4}}, //disk 4
741  {{0.0, 0.0, 0.0, 0.0, 0.4, 0.2, 0.4, 0.0, 0.0, 0.0, 0.0, 0.8}}}}; //disk 5
742 
743  //r cuts for 2S modules in disks -the column is the seedindex
744  std::array<std::array<double, N_SEED>, N_DISK> rcut2S_{
745  {{{3.8, 3.8, 3.8, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0}}, //disk 1
746  {{3.8, 3.8, 3.8, 0.0, 0.0, 0.0, 3.8, 3.4, 3.0, 0.0, 3.0, 0.0}}, //disk 2
747  {{3.6, 3.8, 0.0, 0.0, 3.6, 0.0, 3.6, 3.8, 0.0, 0.0, 3.8, 3.0}}, //disk 3
748  {{3.6, 3.8, 0.0, 0.0, 3.6, 0.0, 3.5, 3.8, 0.0, 0.0, 3.0, 3.0}}, //disk 4
749  {{0.0, 0.0, 0.0, 0.0, 3.6, 3.4, 3.7, 0.0, 0.0, 0.0, 0.0, 3.0}}}}; //disk 5
750 
751  //returns the mean bend (in strips at a 1.8 mm separation) for bendcode
752  std::array<std::array<double, 16>, 16> benddecode_{
753  {{{0.0, 0.5, 0.7, 0.8, 89.9, -1.0, -0.9, -0.8, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //L1 PS
754  {{0.0, 0.7, 1.0, 1.5, 89.9, -1.5, -1.0, -0.7, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //L2 PS
755  {{0.0, 1.0, 1.8, 2.2, 89.9, -2.2, -1.8, -1.0, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //L3 PS
756  {{0.0, 0.7, 1.2, 1.8, 2.1, 2.6, 3.2, 3.5, 89.9, -3.5, -3.2, -2.6, -2.1, -1.8, -1.2, -0.7}}, //L4 2S
757  {{0.0, 0.8, 1.2, 1.8, 2.2, 3.2, 4.1, 4.4, 89.9, -4.4, -4.1, -3.2, -2.2, -1.8, -1.2, -0.8}}, //L5 2S
758  {{0.0, 0.9, 1.8, 2.8, 3.8, 4.5, 5.3, 5.9, 89.9, -5.9, -5.3, -4.5, -3.8, -2.8, -1.8, -0.9}}, //L6 2S
759  {{0.0, 0.8, 1.2, 2.0, 89.9, -2.0, -1.2, -0.8, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //D1 PS
760  {{0.0, 1.5, 1.8, 2.4, 89.9, -2.4, -1.8, -1.4, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //D2 PS
761  {{0.0, 1.7, 2.0, 2.2, 89.9, -2.2, -2.0, -1.7, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //D3 PS
762  {{0.0, 1.8, 2.0, 2.4, 89.9, -2.4, -2.0, -1.8, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //D4 PS
763  {{0.0, 2.0, 2.2, 2.4, 89.9, -2.4, -2.0, -1.8, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9, 99.9}}, //D5 PS
764  {{0.0, 1.8, 2.3, 2.5, 3.0, 3.9, 4.5, 5.2, 89.9, -5.2, -4.5, -3.9, -3.0, -2.5, -2.3, -1.8}}, //D1 2S
765  {{0.0, 2.0, 2.4, 2.9, 3.2, 4.0, 4.8, 5.2, 89.9, -5.2, -4.8, -4.0, -3.2, -2.9, -2.4, -2.0}}, //D2 2S
766  {{0.0, 2.0, 2.4, 2.7, 3.6, 3.7, 4.4, 4.6, 89.9, -4.6, -4.4, -3.7, -3.6, -2.7, -2.4, -2.0}}, //D3 2S
767  {{0.0, 2.0, 2.6, 3.2, 3.8, 4.0, 4.4, 4.4, 89.9, -4.4, -4.4, -4.0, -3.8, -3.2, -2.6, -2.0}}, //D4 2S
768  {{0.0, 2.0, 3.2, 3.4, 3.9, 3.9, 4.4, 4.4, 89.9, -4.4, -4.4, -3.9, -3.9, -3.4, -3.2, -2.0}}}}; //D5 2S
769 
770  //returns the bend 'cut' (in strips at a 1.8 mm separation) for bendcode
771  std::array<std::array<double, 16>, 16> bendcut_{
772  {{{1.5, 1.2, 0.8, 0.8, 99.9, 0.8, 0.8, 1.2, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //L1 PS
773  {{1.5, 1.3, 1.0, 1.0, 99.9, 1.0, 1.0, 1.3, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //L2 PS
774  {{1.6, 1.5, 1.0, 1.0, 99.9, 1.0, 1.0, 1.5, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //L3 PS
775  {{1.6, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 99.9, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}}, //L4 2S
776  {{1.6, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 99.9, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}}, //L5 2S
777  {{1.6, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 99.9, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}}, //L6 2S
778  {{1.8, 1.6, 1.6, 1.6, 99.9, 1.6, 1.6, 1.6, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //D1 PS
779  {{1.8, 1.6, 1.6, 1.6, 99.9, 1.6, 1.6, 1.6, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //D2 PS
780  {{1.8, 1.6, 1.6, 1.6, 99.9, 1.6, 1.6, 1.6, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //D3 PS
781  {{2.2, 1.6, 1.6, 1.6, 99.9, 1.6, 1.6, 1.6, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //D4 PS
782  {{2.2, 1.6, 1.6, 1.6, 99.9, 1.6, 1.6, 1.6, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}}, //D5 PS
783  {{2.0, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, 1.5, 99.9, 1.5, 1.5, 1.5, 1.5, 1.2, 1.2, 1.2}}, //D1 2S
784  {{2.0, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, 1.5, 99.9, 1.5, 1.5, 1.5, 1.5, 1.2, 1.2, 1.2}}, //D2 2S
785  {{2.2, 1.5, 1.5, 1.5, 2.0, 2.0, 2.0, 2.0, 99.9, 2.0, 2.0, 2.0, 2.0, 1.5, 1.5, 1.5}}, //D3 2S
786  {{2.5, 1.5, 1.5, 2.0, 2.0, 2.0, 2.0, 2.0, 99.9, 2.0, 2.0, 2.0, 2.0, 2.0, 1.5, 1.5}}, //D4 2S
787  {{2.5, 1.5, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 99.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.5}}}}; //D5 2S
788 
789  // Offset to the maximum number of steps in each processing step:
790  // Set to 0 (default) means standard truncation
791  // Set to large value, e.g. 10000, to disable truncation
792  unsigned int maxstepoffset_{0};
793  // turn off truncation for displaced tracking (not implemented properly for displaced seeding)
794  unsigned int maxstepoffset_extended_{10000};
795 
796  //Number of processing steps for one event (108=18TM*240MHz/40MHz)
797 
798  //IR should be set to 108 to match the FW for the summer chain, but ultimately should be at 156
799  std::unordered_map<std::string, unsigned int> maxstep_{{"IR", 156}, //IR will run at a higher clock speed to handle
800  //input links running at 25 Gbits/s
801  //Set to 108 to match firmware project 240 MHz clock
802 
803  {"VMR", 107},
804  {"TE", 107},
805  {"TC", 108},
806  {"PR", 108},
807  {"ME", 108},
808  //NOTE: The MC is set to 108, but `mergedepth`
809  //removes 3 iterations to emulate the delay
810  //due to the HLS priority encoder
811  {"MC", 108},
812  {"TB", 108},
813  {"MP", 108},
814  {"TP", 108},
815  {"TRE", 108}};
816 
817  // If set to true this will generate debub printout in text files
818  std::unordered_map<std::string, bool> writeMonitorData_{{"IL", false},
819  {"TE", false},
820  {"CT", false},
821  {"HitPattern", false},
822  {"ChiSq", false},
823  {"Seeds", false},
824  {"FT", false},
825  {"Residuals", false},
826  {"StubBend", false},
827  {"MC", false},
828  {"MP", false},
829  {"ME", false},
830  {"AP", false},
831  {"VMP", false},
832  {"TrackProjOcc", false},
833  {"TC", false},
834  {"Pars", false},
835  {"TPars", false},
836  {"TPD", false},
837  {"TrackletPars", false},
838  {"TED", false},
839  {"TP", false},
840  {"TRE", false},
841  {"VMR", false},
842  {"StubsLayer", false},
843  {"StubsLayerSector", false},
844  {"HitEff", false},
845  {"MatchEff", false},
846  {"IFit", false},
847  {"AS", false},
848  {"WriteEmptyProj", false}};
849 
850  std::array<double, N_DSS_MOD> rDSSinner_mod_{{68.9391, 78.7750, 85.4550, 96.3150, 102.3160}};
851  std::array<double, N_DSS_MOD> rDSSouter_mod_{{66.4903, 76.7750, 84.4562, 94.9920, 102.3160}};
852 
853  //we want the center of the two strip positions in a module, not just the center of a module
854  double halfstrip_{2.5};
855 
856  // various printouts for debugging and warnings
857  bool printDebugKF_{false}; // if true print lots of debugging statements related to the KF fit
858  bool debugTracklet_{false}; //Print detailed debug information about tracklet tracking
859  bool writetrace_{false}; //Print out details about parsing configuration files
860 
861  bool warnNoMem_{false}; //If true will print out warnings about missing projection memories
862  bool warnNoDer_{false}; //If true will print out warnings about missing track fit derivatives
863 
864  //--- These used to create files needed by HLS code.
865  bool writeMem_{false}; //If true will print out content of memories (between algo steps) to files
866  bool writeTable_{false}; //If true will print out content of LUTs to files
867  bool writeConfig_{false}; //If true will print out the autogenerated configuration as files
868  std::string memPath_{"../data/MemPrints/"}; //path for writing memories
869  std::string tablePath_{"../data/LUTs/"}; //path for writing LUTs
870 
871  // Write various lookup tables and autogenerated code (from iMath)
872  bool writeVerilog_{false}; //Write out auto-generated Verilog mudules used by TCs
873  bool writeHLS_{false}; //Write out auto-generated HLS mudules used by TCs
874  bool writeInvTable_{false}; //Write out tables of drinv and invt in tracklet calculator for Verilog module
875  bool writeHLSInvTable_{false}; //Write out tables of drinv and invt in tracklet calculator for HLS module
876 
877  unsigned int writememsect_{3}; //writemem only for this sector (note that the files will have _4 extension)
878 
879  bool enableTripletTables_{false}; //Enable the application of the TED and
880  //TRE tables; when this flag is false,
881  //the tables will not be read from disk
882  bool writeTripletTables_{false}; //Train and write the TED and TRE tables. N.B.: the tables
883  //cannot be applied while they are being trained, i.e.,
884  //this flag effectively turns off the cuts in
885  //TrackletEngineDisplaced and TripletEngine
886 
887  bool writeoutReal_{false};
888 
889  //set to true/false to turn on/off histogram booking internal to the tracking (class "HistBase/HistImp", does nothing in central CMSSW)
890  bool bookHistos_{false};
891 
892  // pt constants
893  double ptcut_{1.91}; //Minimum pt cut
894 
895  // Parameters for bit sizes
896  int alphashift_{12};
897  int nbitsalpha_{4}; //bits used to store alpha
898  int alphaBitsTable_{2}; //For number of bits in track derivative table
899  int nrinvBitsTable_{3}; //number of bits for tabulating rinv dependence
900 
901  unsigned int MEBinsBits_{3};
902  unsigned int MEBinsDisks_{8}; //on each side
903  unsigned int maxStubsPerBin_{15}; //16 causes overflow!
904 
905  // Options for chisq fit
906  bool exactderivatives_{false};
907  bool exactderivativesforfloating_{true}; //only for the floating point
908  bool useapprox_{true}; //use approximate postion based on integer representation for floating point
909  bool usephicritapprox_{false}; //use floating point approximate version of phicrit cut if true
910 
911  // Duplicate Removal
912  // "merge" (hybrid dup removal)
913  // "ichi" (pairwise, keep track with best ichisq), "nstub" (pairwise, keep track with more stubs)
914  // "grid" (TMTT-like removal), "" (no removal)
915  unsigned int minIndStubs_{3}; // not used with merge removal
916 
917 #ifdef USEHYBRID
918  // Duplicate track removal algo. VALUE HERE OVERRIDDEN BY PYTHON CFG
919  std::string removalType_{"merge"};
920  // "CompareBest" (recommended) Compares only the best stub in each track for each region (best = smallest phi residual)
921  // and will merge the two tracks if stubs are shared in three or more regions
922  // "CompareAll" Compares all stubs in a region, looking for matches, and will merge the two tracks if stubs are shared in three or more regions
923  std::string mergeComparison_{"CompareBest"};
924  bool doKF_{true};
925 #else
928  bool doKF_{false};
929 #endif
930 
931  // VALUE OVERRIDDEN BY PYTHON CFG
932  // When false, match calculator does not save multiple matches, even when doKF=true.
933  // This is a temporary fix for compatibilty with HLS. We will need to implement multiple match
934  // printing in emulator eventually, possibly after CMSSW-integration inspired rewrites
935  // Use false when generating HLS files, use true when doing full hybrid tracking
936  bool doMultipleMatches_{true};
937 
938  // NEXT 2 VALUES OVERRIDDEN BY PYTHON CFG
939  // if true, run a dummy fit, producing TTracks directly from output of tracklet pattern reco stage
940  bool fakefit_{false};
941  // if true, EDProducer fills additional bit & clock accurate TrackBuilder EDProduct
943 
944  // NEXT 3 VALUES OVERRIDDEN BY PYTHON CFG
945  unsigned int nHelixPar_{4}; // 4 or 5 param helix fit
946  bool extended_{false}; // turn on displaced tracking
947  bool reduced_{false}; // use reduced (Summer Chain) config
948 
949  // Use combined TP (TE+TC) and MP (PR+ME+MC) configuration (with prompt tracking)
950  bool combined_{false};
951  // N.B. To use combined modules with extended tracking, edit
952  // Tracklet_cfi.py to refer to *_hourglassExtendedCombined.dat,
953  // but leave combined_=false.
954 
955  std::string skimfile_{""}; //if not empty events will be written out in ascii format to this file
956 
957  double bfield_{3.8112}; //B-field in T
958  double c_{0.299792458}; //speed of light m/ns
959 
960  unsigned int nStrips_PS_{960};
961  unsigned int nStrips_2S_{1016};
962 
963  double stripPitch_PS_{0.01};
964  double stripPitch_2S_{0.009};
965 
966  double stripLength_PS_{0.1467};
967  double stripLength_2S_{5.0250};
968  };
969 
970  constexpr unsigned int N_TILTED_RINGS = 12; // # of tilted rings per half-layer in TBPS layers
971  constexpr std::array<unsigned int, N_PSLAYER> N_MOD_PLANK = {{7, 11, 15}}; // # of flat barrel modules/plank in TBPS
972 
973  constexpr unsigned int N_TRKLSEED = 7; // # of tracklet seeds
974  constexpr unsigned int N_PROJ = 4; // # of projections (beyond stubs from tracklet seed)
975 
976  // chi2 fitting
977  constexpr unsigned int N_FITPARAM = 4; // # of fit parameters for chi2 fit
978  constexpr unsigned int N_FITSTUB = 6; // max # of number of stubs used
979 
980  constexpr unsigned int N_TRACKDER_PTBIN = 4;
981  constexpr unsigned int N_TRACKDER_INDEX = 1000;
982 
983 } // namespace trklet
984 
985 #endif
unsigned int MEBinsBits() const
Definition: Settings.h:221
double rphicutPS(unsigned int iSeed, unsigned int idisk) const
Definition: Settings.h:159
unsigned int NLONGVMBITS_
Definition: Settings.h:537
void setStripLength_PS(double stripLength_PS)
Definition: Settings.h:275
unsigned int vmrlutrbits(unsigned int layerdisk) const
Definition: Settings.h:179
unsigned int writememsect_
Definition: Settings.h:877
std::array< std::array< double, N_SEED >, N_DISK > rcut2S_
Definition: Settings.h:744
unsigned int nHelixPar_
Definition: Settings.h:945
constexpr int32_t ceil(float num)
constexpr unsigned int N_RZBITS
Definition: Settings.h:35
int zderbitshift() const
Definition: Settings.h:377
double dphicritmc_
Definition: Settings.h:470
std::array< unsigned int, N_SEED > teunits_
Definition: Settings.h:613
void setMemoryModulesFile(std::string memoryModulesFileName)
Definition: Settings.h:77
double kz() const
Definition: Settings.h:314
double stripLength(bool isPSmodule) const
Definition: Settings.h:274
std::string memoryModulesFile_
Definition: Settings.h:463
const std::vector< int > & dtcLayers(const std::string &dtcName) const
Definition: Settings.h:437
int chisqzfactbits() const
Definition: Settings.h:393
int PS_rD_shift() const
Definition: Settings.h:369
int PS_zL_shift() const
Definition: Settings.h:361
double zmatchcut(unsigned int iSeed, unsigned int ilayer) const
Definition: Settings.h:158
constexpr double VMROUTERCUTZL1L3L5
Definition: Settings.h:45
int nrinvBitsTable() const
Definition: Settings.h:219
bool writeInvTable_
Definition: Settings.h:874
constexpr int N_DISK
Definition: Settings.h:22
bool writeHLS() const
Definition: Settings.h:196
unsigned int maxStep(std::string module) const
Definition: Settings.h:116
double disp_z0cut_
Definition: Settings.h:535
int PS_rderD_shift() const
Definition: Settings.h:372
std::string tablePath_
Definition: Settings.h:869
int PS_zderL_shift() const
Definition: Settings.h:364
double lutwidthtab(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:140
bool bookHistos() const
Definition: Settings.h:207
unsigned int nrbitsstub(unsigned int layerdisk) const
Definition: Settings.h:84
double rPS2S() const
Definition: Settings.h:334
bool writeTable() const
Definition: Settings.h:189
double zmax(unsigned int iDisk) const
Definition: Settings.h:168
void setStoreTrackBuilderOutput(bool storeTrackBuilderOutput)
Definition: Settings.h:246
bool writeVerilog_
Definition: Settings.h:872
double kphi1() const
Definition: Settings.h:311
std::array< std::array< int, 3 >, N_SEED > seedlayers() const
Definition: Settings.h:452
unsigned int NLONGVMBITS() const
Definition: Settings.h:340
std::array< std::array< double, 16 >, 16 > bendcut_
Definition: Settings.h:771
constexpr double VMROUTERCUTZL1
Definition: Settings.h:46
double kphiderdisk() const
Definition: Settings.h:407
int alphaBitsTable() const
Definition: Settings.h:218
unsigned int nStrips_PS_
Definition: Settings.h:960
double rDSSinner(unsigned int iBin) const
Definition: Settings.h:171
std::string skimfile() const
Definition: Settings.h:278
unsigned int nbitstrackletindex() const
Definition: Settings.h:281
unsigned int NTC(int seed) const
Definition: Settings.h:153
double kz0pars() const
Definition: Settings.h:403
unsigned int seedlayers(int inner, int seed) const
Definition: Settings.h:145
void setFitPatternFile(std::string fitPatternFileName)
Definition: Settings.h:73
double stripLength_PS_
Definition: Settings.h:966
void setStripLength_2S(double stripLength_2S)
Definition: Settings.h:276
double benddecode(int ibend, int layerdisk, bool isPSmodule) const
Definition: Settings.h:415
std::array< std::array< unsigned int, N_SEED >, 3 > nphireg_
Definition: Settings.h:627
double kphider() const
Definition: Settings.h:406
constexpr unsigned int NRINVBITS
Definition: Settings.h:32
bool enableTripletTables() const
Definition: Settings.h:202
std::unordered_map< std::string, bool > writeMonitorData_
Definition: Settings.h:818
constexpr unsigned int N_SEED
Definition: Settings.h:24
bool combined() const
Definition: Settings.h:258
unsigned int maxstepoffset_
Definition: Settings.h:792
LayerDisk
Definition: Settings.h:50
bool enableTripletTables_
Definition: Settings.h:879
double disp_z0cut() const
Definition: Settings.h:338
std::string const & wiresFile() const
Definition: Settings.h:69
std::string const & tableTREFile() const
Definition: Settings.h:71
std::string geomext() const
Definition: Settings.h:226
double dphisectorHG() const
Definition: Settings.h:292
double phicritmaxmc() const
Definition: Settings.h:307
double kphi(unsigned int layerdisk) const
Definition: Settings.h:312
unsigned int MEBinsDisks_
Definition: Settings.h:902
double rmindisk() const
Definition: Settings.h:126
std::string wiresFile_
Definition: Settings.h:464
unsigned int nbendbitsmedisk() const
Definition: Settings.h:92
std::string slotToDTCname(unsigned int slot) const
Definition: Settings.h:434
double maxd0() const
Definition: Settings.h:320
double zlength() const
Definition: Settings.h:124
double deltarzfract_
Definition: Settings.h:473
double rinvmax() const
Definition: Settings.h:214
double bendcut(int ibend, int layerdisk, bool isPSmodule) const
Definition: Settings.h:423
unsigned int nbitsseed() const
Definition: Settings.h:285
constexpr unsigned int N_BENDBITS_2S
Definition: Settings.h:30
constexpr unsigned int N_PROJ
Definition: Settings.h:974
bool writeVerilog() const
Definition: Settings.h:195
void setNStrips_2S(unsigned int nStrips_2S)
Definition: Settings.h:268
unsigned int MEBinsDisks() const
Definition: Settings.h:223
void setReduced(bool reduced)
Definition: Settings.h:261
bool writeMem() const
Definition: Settings.h:188
bool exactderivatives() const
Definition: Settings.h:233
bool exactderivativesforfloating() const
Definition: Settings.h:234
std::array< unsigned int, N_LAYER > irmean_
Definition: Settings.h:477
double krder() const
Definition: Settings.h:409
double rmindiskvm() const
Definition: Settings.h:327
double kd0pars() const
Definition: Settings.h:404
double ktpars() const
Definition: Settings.h:402
bool writetrace() const
Definition: Settings.h:183
bool printDebugKF() const
Definition: Settings.h:181
double rphimatchcut(unsigned int iSeed, unsigned int ilayer) const
Definition: Settings.h:157
double krinvpars() const
Definition: Settings.h:397
std::set< unsigned int > useseeding_
Definition: Settings.h:492
std::array< std::array< unsigned int, N_LAYER - 2 >, N_SEED > projlayers_
Definition: Settings.h:674
int phi0_shift() const
Definition: Settings.h:353
double dzmax() const
Definition: Settings.h:129
double stripLength_2S_
Definition: Settings.h:967
unsigned int minIndStubs() const
Definition: Settings.h:238
double ptcut() const
Definition: Settings.h:209
bool reduced() const
Definition: Settings.h:260
constexpr unsigned int N_VMSTUBSMAX
Definition: Settings.h:38
constexpr unsigned int N_DSS_MOD
Definition: Settings.h:27
assert(be >=bs)
unsigned int minIndStubs_
Definition: Settings.h:915
constexpr double VMROUTERCUTZL2
Definition: Settings.h:44
unsigned int nbitsd0() const
Definition: Settings.h:321
double zmin(unsigned int iDisk) const
Definition: Settings.h:169
double phicritminmc() const
Definition: Settings.h:306
void setNbitsseedextended(unsigned int nbitsseed)
Definition: Settings.h:289
int fittbitshift() const
Definition: Settings.h:386
std::string processingModulesFile_
Definition: Settings.h:462
void setNStrips_PS(unsigned int nStrips_PS)
Definition: Settings.h:267
std::string const & tableTEDFile() const
Definition: Settings.h:70
std::string tableTEDFile_
Definition: Settings.h:465
constexpr unsigned int N_BENDBITS_PS
Definition: Settings.h:29
int fitz0bitshift() const
Definition: Settings.h:387
constexpr double third
Definition: Settings.h:42
unsigned int nbitszprojderL123_
Definition: Settings.h:487
int rresidbits() const
Definition: Settings.h:381
bool writeHLSInvTable_
Definition: Settings.h:875
unsigned int NLONGVMBINS() const
Definition: Settings.h:341
double kphi0pars() const
Definition: Settings.h:401
bool warnNoMem() const
Definition: Settings.h:185
unsigned int nbitszprojderL456() const
Definition: Settings.h:90
std::string skimfile_
Definition: Settings.h:955
std::string memPath() const
Definition: Settings.h:192
int rcorrbits() const
Definition: Settings.h:390
unsigned int projlayers(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:155
unsigned int nrbitsprojderdisk_
Definition: Settings.h:484
void setRemovalType(std::string removalType)
Definition: Settings.h:249
std::string tablePath() const
Definition: Settings.h:193
int SS_phiderD_shift_
Definition: Settings.h:589
std::string memPath_
Definition: Settings.h:868
int nbitst() const
Definition: Settings.h:348
unsigned int nrbitsprojderdisk() const
Definition: Settings.h:86
unsigned int nbitsphiprojderL456() const
Definition: Settings.h:88
double rmindiskl2overlapvm() const
Definition: Settings.h:331
std::array< unsigned int, N_LAYER+N_DISK > nphibitsstub_
Definition: Settings.h:481
double kzder() const
Definition: Settings.h:408
double zlength_
Definition: Settings.h:539
unsigned int nbitsallstubs(unsigned int layerdisk) const
Definition: Settings.h:106
double dphisector() const
Definition: Settings.h:301
std::array< std::array< unsigned int, N_SEED >, 3 > nbitsvmtecm_
Definition: Settings.h:501
unsigned int nbitsseedextended_
Definition: Settings.h:560
int SS_phiderL_shift_
Definition: Settings.h:581
~Settings()=default
double half2SmoduleWidth() const
Definition: Settings.h:131
unsigned int nzbitsstub(unsigned int layerdisk) const
Definition: Settings.h:82
unsigned int nphibitsstub(unsigned int layerdisk) const
Definition: Settings.h:83
double rmean(unsigned int iLayer) const
Definition: Settings.h:164
unsigned int nbitszprojderL123() const
Definition: Settings.h:89
std::array< unsigned int, N_LAYER+N_DISK > nrbitsstub_
Definition: Settings.h:482
int t_shift() const
Definition: Settings.h:354
constexpr std::array< unsigned int, N_PSLAYER > N_MOD_PLANK
Definition: Settings.h:971
unsigned int nbitsseed_
Definition: Settings.h:559
void setStripPitch_PS(double stripPitch_PS)
Definition: Settings.h:271
std::array< double, N_DSS_MOD > rDSSinner_mod_
Definition: Settings.h:850
double phicritmin() const
Definition: Settings.h:303
std::array< std::array< unsigned int, N_SEED >, 3 > lutwidthtabextended_
Definition: Settings.h:651
double rmindiskl3overlapvm() const
Definition: Settings.h:332
double rDSSouter(unsigned int iBin) const
Definition: Settings.h:174
constexpr unsigned int N_TILTED_RINGS
Definition: Settings.h:970
double ptcutte_
Definition: Settings.h:552
double maxrinv_
Definition: Settings.h:545
constexpr unsigned int N_TRKLSEED
Definition: Settings.h:973
unsigned int MEBinsBits_
Definition: Settings.h:901
int nbitsrinv() const
Definition: Settings.h:346
double bfield() const
Definition: Settings.h:263
double stripPitch(bool isPSmodule) const
Definition: Settings.h:270
double rmindiskvm_
Definition: Settings.h:524
std::array< std::array< double, N_SEED >, N_DISK > rphicutPS_
Definition: Settings.h:720
double half2SmoduleWidth_
Definition: Settings.h:543
std::array< std::array< unsigned int, N_SEED >, 3 > nphiregcm_
Definition: Settings.h:633
unsigned int nbitsvmte(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:95
constexpr double VMROUTERCUTRD1D3
Definition: Settings.h:47
void setSkimfile(std::string skimfile)
Definition: Settings.h:279
double bendcutme(int ibend, int layerdisk, bool isPSmodule) const
Definition: Settings.h:445
unsigned int nStrips(bool isPSmodule) const
Definition: Settings.h:266
double lutwidthtabextended(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:141
std::array< std::array< unsigned int, N_LAYER - 2 >, N_SEED > projlayers() const
Definition: Settings.h:455
unsigned int nbitsphiprojderL456_
Definition: Settings.h:486
double rmindisk_
Definition: Settings.h:541
std::string removalType() const
Definition: Settings.h:239
std::array< unsigned int, N_LAYER+N_DISK > nbitsallstubs_
Definition: Settings.h:494
bool doMultipleMatches() const
Definition: Settings.h:242
int alphashift() const
Definition: Settings.h:216
unsigned int MEBins() const
Definition: Settings.h:222
std::string fitPatternFile_
Definition: Settings.h:461
std::array< unsigned int, N_LAYER+N_DISK > vmrlutzbits_
Definition: Settings.h:615
bool fakefit() const
Definition: Settings.h:243
double rinvcut() const
Definition: Settings.h:210
unsigned int projdisks(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:156
double bfield_
Definition: Settings.h:957
unsigned int nbitsitc() const
Definition: Settings.h:284
unsigned int nbitsvmme(unsigned int layerdisk) const
Definition: Settings.h:103
void setFakefit(bool fakefit)
Definition: Settings.h:244
std::string const & fitPatternFile() const
Definition: Settings.h:66
int z0_shift() const
Definition: Settings.h:355
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
double rmaxdiskl1overlapvm_
Definition: Settings.h:527
double stripPitch_2S_
Definition: Settings.h:964
double bendcutte(int ibend, int layerdisk, bool isPSmodule) const
Definition: Settings.h:443
std::string const & memoryModulesFile() const
Definition: Settings.h:68
double zmean(unsigned int iDisk) const
Definition: Settings.h:167
unsigned int nbitstcindex() const
Definition: Settings.h:286
unsigned int nvmte(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:101
#define M_PI
std::array< std::array< double, N_SEED >, N_DISK > rphicut2S_
Definition: Settings.h:736
constexpr unsigned int NFINERZBITS
Definition: Settings.h:33
int SS_phiD_shift() const
Definition: Settings.h:368
unsigned int nallstubs(unsigned int layerdisk) const
Definition: Settings.h:107
bool debugTracklet() const
Definition: Settings.h:182
constexpr unsigned int N_SECTOR
Definition: Settings.h:19
double rcut2S(unsigned int iSeed, unsigned int idisk) const
Definition: Settings.h:162
int SS_phiderD_shift() const
Definition: Settings.h:371
unsigned int nbitszprojderL456_
Definition: Settings.h:488
double stripPitch_PS_
Definition: Settings.h:963
unsigned int maxstepoffset_extended_
Definition: Settings.h:794
constexpr unsigned int N_PSLAYER
Definition: Settings.h:23
constexpr unsigned int N_TRACKDER_PTBIN
Definition: Settings.h:980
double kr() const
Definition: Settings.h:316
unsigned int nbitsphiprojderL123_
Definition: Settings.h:485
unsigned int nbitstrackletindex_
Definition: Settings.h:555
const double fact
std::array< std::array< double, 16 >, 16 > benddecode_
Definition: Settings.h:752
double drmax() const
Definition: Settings.h:128
double z0cut() const
Definition: Settings.h:336
bool doMultipleMatches_
Definition: Settings.h:936
bool storeTrackBuilderOutput() const
Definition: Settings.h:245
double rmaxdisk() const
Definition: Settings.h:125
double rmaxdiskvm_
Definition: Settings.h:525
double rphicut2S(unsigned int iSeed, unsigned int idisk) const
Definition: Settings.h:161
unsigned int nbitsitc_
Definition: Settings.h:557
std::array< unsigned int, N_LAYER+N_DISK > vmrlutrbits_
Definition: Settings.h:617
double rcutPS(unsigned int iSeed, unsigned int idisk) const
Definition: Settings.h:160
double kd0() const
Definition: Settings.h:323
bool printDebugKF_
Definition: Settings.h:857
void setProcessingModulesFile(std::string processingModulesFileName)
Definition: Settings.h:74
std::array< std::array< double, N_SEED >, N_LAYER > zmatchcut_
Definition: Settings.h:711
std::array< std::array< unsigned int, N_SEED >, 3 > nfinephi_
Definition: Settings.h:620
unsigned int nHelixPar() const
Definition: Settings.h:253
double kz(unsigned int layerdisk) const
Definition: Settings.h:315
constexpr unsigned int NFINEPHIBITS
Definition: Settings.h:34
unsigned int nbitsd0_
Definition: Settings.h:548
double rmax(unsigned int iLayer) const
Definition: Settings.h:165
std::array< std::array< double, N_SEED >, N_DISK > rcutPS_
Definition: Settings.h:728
std::string const & processingModulesFile() const
Definition: Settings.h:67
constexpr unsigned int N_TRACKDER_INDEX
Definition: Settings.h:981
bool writeTripletTables_
Definition: Settings.h:882
constexpr unsigned int N_FITPARAM
Definition: Settings.h:977
double rmindiskl2overlapvm_
Definition: Settings.h:528
int nfinephi(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:133
int SS_phiderL_shift() const
Definition: Settings.h:363
void setDoMultipleMatches(bool doMultipleMatches)
Definition: Settings.h:250
bool writeConfig() const
Definition: Settings.h:190
unsigned int nbitsphiprojderL123() const
Definition: Settings.h:87
bool storeTrackBuilderOutput_
Definition: Settings.h:942
int chisqphifactbits_
Definition: Settings.h:610
bool useSeed(unsigned int iSeed) const
Definition: Settings.h:94
void setNbitsitc(unsigned int nbitsitc)
Definition: Settings.h:287
double c() const
Definition: Settings.h:212
std::string mergeComparison() const
Definition: Settings.h:240
bool extended() const
Definition: Settings.h:256
bool writeHLSInvTable() const
Definition: Settings.h:198
constexpr double sixth
Definition: Settings.h:41
unsigned int nvmme(unsigned int layerdisk) const
Definition: Settings.h:104
std::string removalType_
Definition: Settings.h:926
int zresidbits() const
Definition: Settings.h:380
unsigned int maxStubsPerBin() const
Definition: Settings.h:224
double halfstrip_
Definition: Settings.h:854
std::string mergeComparison_
Definition: Settings.h:927
std::array< unsigned int, N_LAYER+N_DISK > nbitsvmme_
Definition: Settings.h:495
unsigned int teunits(unsigned int iSeed) const
Definition: Settings.h:151
int phiresidbits() const
Definition: Settings.h:379
unsigned int nbendbitsmedisk_
Definition: Settings.h:490
double nphireg(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:134
std::vector< std::string > slotToDTCname_
Definition: Settings.h:508
int fitphi0bitshift_
Definition: Settings.h:603
bool writeoutReal() const
Definition: Settings.h:205
double rmin(unsigned int iLayer) const
Definition: Settings.h:166
int rinv_shift() const
Definition: Settings.h:352
unsigned int nStrips_2S_
Definition: Settings.h:961
constexpr unsigned int N_FITSTUB
Definition: Settings.h:978
void setNbitstrackletindex(unsigned int nbitstrackletindex)
Definition: Settings.h:282
double rmindiskl3overlapvm_
Definition: Settings.h:529
static unsigned int const shift
double rmaxdiskvm() const
Definition: Settings.h:328
void setNHelixPar(unsigned int nHelixPar)
Definition: Settings.h:254
unsigned int ntrackletmax() const
Definition: Settings.h:343
int fitrinvbitshift() const
Definition: Settings.h:384
std::array< std::array< unsigned int, N_SEED >, 3 > nbitsvmte_
Definition: Settings.h:496
bool writeInvTable() const
Definition: Settings.h:197
int nbitsalpha() const
Definition: Settings.h:217
void setWiresFile(std::string wiresFileName)
Definition: Settings.h:78
double phicritmax() const
Definition: Settings.h:304
int chisqphifactbits() const
Definition: Settings.h:392
std::array< std::array< unsigned int, N_DISK >, N_SEED > projdisks_
Definition: Settings.h:688
bool exactderivativesforfloating_
Definition: Settings.h:907
void setBfield(double bfield)
Definition: Settings.h:264
void setTableTREFile(std::string tableTREFileName)
Definition: Settings.h:80
double rinvcutte() const
Definition: Settings.h:325
double krbarrel() const
Definition: Settings.h:317
std::array< std::array< unsigned int, N_SEED >, 3 > lutwidthtab_
Definition: Settings.h:639
double krprojshiftdisk() const
Definition: Settings.h:413
int fitrinvbitshift_
Definition: Settings.h:602
double maxrinv() const
Definition: Settings.h:319
std::array< std::array< int, 3 >, N_SEED > seedlayers_
Definition: Settings.h:657
std::array< unsigned int, N_LAYER+N_DISK > nzbitsstub_
Definition: Settings.h:480
double kphi() const
Definition: Settings.h:310
int nbitsphi0() const
Definition: Settings.h:347
bool usephicritapprox() const
Definition: Settings.h:236
void setTableTEDFile(std::string tableTEDFileName)
Definition: Settings.h:79
int fitphi0bitshift() const
Definition: Settings.h:385
bool doKF() const
Definition: Settings.h:241
bool usephicritapprox_
Definition: Settings.h:909
int SS_zderL_shift() const
Definition: Settings.h:365
void setNbitsseed(unsigned int nbitsseed)
Definition: Settings.h:288
std::array< std::array< unsigned int, N_DISK >, N_SEED > projdisks() const
Definition: Settings.h:458
int nbitsz0() const
Definition: Settings.h:349
std::unordered_map< std::string, unsigned int > maxstep_
Definition: Settings.h:799
void setStripPitch_2S(double stripPitch_2S)
Definition: Settings.h:272
bool debugTracklet_
Definition: Settings.h:858
int SS_phiL_shift() const
Definition: Settings.h:360
bool writeTripletTables() const
Definition: Settings.h:203
std::array< std::array< double, N_SEED >, N_LAYER > rphimatchcut_
Definition: Settings.h:702
constexpr unsigned int N_PHIBITS
Definition: Settings.h:36
std::map< std::string, std::vector< int > > dtclayers_
Definition: Settings.h:511
bool writeoutReal_
Definition: Settings.h:887
bool useapprox() const
Definition: Settings.h:235
std::array< unsigned int, N_SEED > ntc_
Definition: Settings.h:671
void setCombined(bool combined)
Definition: Settings.h:259
constexpr unsigned int N_BITSMEMADDRESS
Definition: Settings.h:39
bool exactderivatives_
Definition: Settings.h:906
void setExtended(bool extended)
Definition: Settings.h:257
int phiderbitshift() const
Definition: Settings.h:376
unsigned int writememsect() const
Definition: Settings.h:200
bool warnNoDer() const
Definition: Settings.h:186
std::string tableTREFile_
Definition: Settings.h:466
std::array< unsigned int, N_DISK > izmean_
Definition: Settings.h:478
int phi0bitshift() const
Definition: Settings.h:375
constexpr unsigned int N_SEED_PROMPT
Definition: Settings.h:25
unsigned int maxStubsPerBin_
Definition: Settings.h:903
unsigned int vmrlutzbits(unsigned int layerdisk) const
Definition: Settings.h:178
constexpr int N_LAYER
Definition: Settings.h:21
double rmaxdiskl1overlapvm() const
Definition: Settings.h:330
double rcrit() const
Definition: Settings.h:299
double rmaxdisk_
Definition: Settings.h:540
std::array< double, N_DSS_MOD > rDSSouter_mod_
Definition: Settings.h:851