CMS 3D CMS Logo

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