File indexing completed on 2025-06-03 00:12:20
0001 #ifndef L1Trigger_TrackFindingTracklet_interface_Settings_h
0002 #define L1Trigger_TrackFindingTracklet_interface_Settings_h
0003
0004 #include <iostream>
0005 #include <string>
0006 #include <array>
0007 #include <set>
0008 #include <cassert>
0009 #include <cmath>
0010 #include <unordered_map>
0011 #include <map>
0012 #include <vector>
0013
0014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0015 #include "FWCore/Utilities/interface/Exception.h"
0016
0017 namespace tt {
0018 class Setup;
0019 }
0020
0021 namespace trklet {
0022
0023 constexpr unsigned int N_SECTOR = 9;
0024
0025 constexpr int N_LAYER = 6;
0026 constexpr int N_DISK = 5;
0027 constexpr unsigned int N_PSLAYER = 3;
0028 constexpr unsigned int N_SEED = 12;
0029 constexpr unsigned int N_SEED_PROMPT = 8;
0030
0031 constexpr unsigned int N_DSS_MOD = 5;
0032
0033 constexpr unsigned int N_BENDBITS_PS = 3;
0034 constexpr unsigned int N_BENDBITS_2S = 4;
0035
0036 constexpr unsigned int NRINVBITS = 5;
0037 constexpr unsigned int NFINERZBITS = 3;
0038 constexpr unsigned int NFINEPHIBITS = 3;
0039 constexpr unsigned int N_RZBITS = 3;
0040 constexpr unsigned int N_PHIBITS = 3;
0041
0042 constexpr unsigned int N_VMSTUBSMAX = 15;
0043 constexpr unsigned int N_BITSMEMADDRESS = 7;
0044
0045 constexpr double sixth = 1.0 / 6.0;
0046 constexpr double third = 1.0 / 3.0;
0047
0048 constexpr double VMROUTERCUTZL2 = 50.0;
0049 constexpr double VMROUTERCUTZL1L3L5 = 95.0;
0050 constexpr double VMROUTERCUTZL1 = 70.0;
0051 constexpr double VMROUTERCUTRD1D3 = 55.0;
0052
0053 enum Seed { L1L2 = 0, L2L3, L3L4, L5L6, D1D2, D3D4, L1D1, L2D1, L2L3L4, L4L5L6, L2L3D1, D1D2L2 };
0054 enum LayerDisk { L1 = 0, L2, L3, L4, L5, L6, D1, D2, D3, D4, D5 };
0055
0056 class Settings {
0057 public:
0058 Settings() {};
0059 ~Settings() = default;
0060 void passSetup(const tt::Setup* setup) { setup_ = setup; }
0061 const tt::Setup* setup() const { return setup_; }
0062
0063
0064 std::string const& fitPatternFile() const { return fitPatternFile_; }
0065 std::string const& processingModulesFile() const { return processingModulesFile_; }
0066 std::string const& memoryModulesFile() const { return memoryModulesFile_; }
0067 std::string const& wiresFile() const { return wiresFile_; }
0068 std::string const& tableTEDFile() const { return tableTEDFile_; }
0069 std::string const& tableTREFile() const { return tableTREFile_; }
0070
0071 void setFitPatternFile(std::string fitPatternFileName) { fitPatternFile_ = fitPatternFileName; }
0072 void setProcessingModulesFile(std::string processingModulesFileName) {
0073 processingModulesFile_ = processingModulesFileName;
0074 }
0075 void setMemoryModulesFile(std::string memoryModulesFileName) { memoryModulesFile_ = memoryModulesFileName; }
0076 void setWiresFile(std::string wiresFileName) { wiresFile_ = wiresFileName; }
0077 void setTableTEDFile(std::string tableTEDFileName) { tableTEDFile_ = tableTEDFileName; }
0078 void setTableTREFile(std::string tableTREFileName) { tableTREFile_ = tableTREFileName; }
0079
0080 unsigned int nzbitsstub(unsigned int layerdisk) const { return nzbitsstub_[layerdisk]; }
0081 unsigned int nphibitsstub(unsigned int layerdisk) const { return nphibitsstub_[layerdisk]; }
0082 unsigned int nrbitsstub(unsigned int layerdisk) const { return nrbitsstub_[layerdisk]; }
0083
0084 unsigned int nrbitsprojderdisk() const { return nrbitsprojderdisk_; }
0085 unsigned int nbitsphiprojderL123() const { return nbitsphiprojderL123_; }
0086 unsigned int nbitsphiprojderL456() const { return nbitsphiprojderL456_; }
0087 unsigned int nbitszprojderL123() const { return nbitszprojderL123_; }
0088 unsigned int nbitszprojderL456() const { return nbitszprojderL456_; }
0089
0090 unsigned int nbendbitsmedisk() const { return nbendbitsmedisk_; }
0091
0092 bool useSeed(unsigned int iSeed) const { return useseeding_.find(iSeed) != useseeding_.end(); }
0093 unsigned int nbitsvmte(unsigned int inner, unsigned int iSeed) const {
0094 if (combined_) {
0095 return nbitsvmtecm_[inner][iSeed];
0096 }
0097 return nbitsvmte_[inner][iSeed];
0098 }
0099 unsigned int nvmte(unsigned int inner, unsigned int iSeed) const { return (1 << nbitsvmte(inner, iSeed)); }
0100
0101 unsigned int nbitsvmme(unsigned int layerdisk) const { return nbitsvmme_[layerdisk]; }
0102 unsigned int nvmme(unsigned int layerdisk) const { return (1 << nbitsvmme_[layerdisk]); }
0103
0104 unsigned int nbitsallstubs(unsigned int layerdisk) const { return nbitsallstubs_[layerdisk]; }
0105 unsigned int nallstubs(unsigned int layerdisk) const { return (1 << nbitsallstubs_[layerdisk]); }
0106
0107 bool writeMonitorData(std::string module) const {
0108 if (writeMonitorData_.find(module) == writeMonitorData_.end()) {
0109 throw cms::Exception("BadConfig") << "Settings::writeMonitorData module = " << module << " not known";
0110 }
0111 return writeMonitorData_.at(module);
0112 }
0113
0114 unsigned int maxStep(std::string module) const {
0115 if (maxstep_.find(module) == maxstep_.end()) {
0116 throw cms::Exception("BadConfig")
0117 << __FILE__ << " " << __LINE__ << " maxStep module = " << module << " not known";
0118 }
0119 return extended_ ? (maxstep_.at(module) + maxstepoffset_extended_) : (maxstep_.at(module) + maxstepoffset_);
0120 }
0121
0122 double zlength() const { return zlength_; }
0123 double rmaxdisk() const { return rmaxdisk_; }
0124 double rmindisk() const { return rmindisk_; }
0125
0126 double drmax() const { return rmaxdisk_ / deltarzfract_; }
0127 double dzmax() const { return zlength_ / deltarzfract_; }
0128
0129 double half2SmoduleWidth() const { return half2SmoduleWidth_; }
0130
0131 int nfinephi(unsigned int inner, unsigned int iSeed) const { return nfinephi_[inner][iSeed]; }
0132 double nphireg(unsigned int inner, unsigned int iSeed) const {
0133 if (combined_) {
0134 return nphiregcm_[inner][iSeed];
0135 }
0136 return nphireg_[inner][iSeed];
0137 }
0138 double lutwidthtab(unsigned int inner, unsigned int iSeed) const { return lutwidthtab_[inner][iSeed]; }
0139 double lutwidthtabextended(unsigned int inner, unsigned int iSeed) const {
0140 return lutwidthtabextended_[inner][iSeed];
0141 }
0142
0143 unsigned int seedlayers(int inner, int seed) const {
0144 int layerdisk = seedlayers_[seed][inner];
0145 assert(layerdisk >= 0);
0146 return layerdisk;
0147 }
0148
0149 unsigned int teunits(unsigned int iSeed) const { return teunits_[iSeed]; }
0150 unsigned int trpunits(unsigned int iSeed) const { return trpunits_[iSeed]; }
0151
0152 unsigned int NTC(int seed) const { return ntc_[seed]; }
0153
0154 unsigned int projlayers(unsigned int iSeed, unsigned int i) const { return projlayers_[iSeed][i]; }
0155 unsigned int projdisks(unsigned int iSeed, unsigned int i) const { return projdisks_[iSeed][i]; }
0156 double rphimatchcut(unsigned int iSeed, unsigned int ilayer) const { return rphimatchcut_[ilayer][iSeed]; }
0157 double zmatchcut(unsigned int iSeed, unsigned int ilayer) const { return zmatchcut_[ilayer][iSeed]; }
0158 double rphicutPS(unsigned int iSeed, unsigned int idisk) const { return rphicutPS_[idisk][iSeed]; }
0159 double rcutPS(unsigned int iSeed, unsigned int idisk) const { return rcutPS_[idisk][iSeed]; }
0160 double rphicut2S(unsigned int iSeed, unsigned int idisk) const { return rphicut2S_[idisk][iSeed]; }
0161 double rcut2S(unsigned int iSeed, unsigned int idisk) const { return rcut2S_[idisk][iSeed]; }
0162
0163 double rmean(unsigned int iLayer) const { return irmean_[iLayer] * rmaxdisk_ / 4096; }
0164 double rmax(unsigned int iLayer) const { return rmean(iLayer) + drmax(); }
0165 double rmin(unsigned int iLayer) const { return rmean(iLayer) - drmax(); }
0166 double zmean(unsigned int iDisk) const { return izmean_[iDisk] * zlength_ / 2048; }
0167 double zmax(unsigned int iDisk) const { return zmean(iDisk) + dzmax(); }
0168 double zmin(unsigned int iDisk) const { return zmean(iDisk) - dzmax(); }
0169
0170 double zmindisk(unsigned int iDisk) const { return zmean(iDisk) - zsepdisk_ / 2; }
0171 double zmaxdisk(unsigned int iDisk) const { return zmean(iDisk) + zsepdisk_ / 2; }
0172
0173 double rDSSinner(unsigned int iBin) const {
0174 return rDSSinner_mod_[iBin / 2] + halfstrip_ * ((iBin % 2 == 0) ? -1 : 1);
0175 }
0176 double rDSSouter(unsigned int iBin) const {
0177 return rDSSouter_mod_[iBin / 2] + halfstrip_ * ((iBin % 2 == 0) ? -1 : 1);
0178 }
0179
0180 unsigned int vmrlutzbits(unsigned int layerdisk) const { return vmrlutzbits_[layerdisk]; }
0181 unsigned int vmrlutrbits(unsigned int layerdisk) const { return vmrlutrbits_[layerdisk]; }
0182
0183 bool printDebugKF() const { return printDebugKF_; }
0184 bool debugTracklet() const { return debugTracklet_; }
0185 bool writetrace() const { return writetrace_; }
0186
0187 bool warnNoMem() const { return warnNoMem_; }
0188 bool warnNoDer() const { return warnNoDer_; }
0189
0190 bool writeMem() const { return writeMem_; }
0191 bool writeTable() const { return writeTable_; }
0192 bool writeConfig() const { return writeConfig_; }
0193
0194 std::string memPath() const { return memPath_; }
0195 std::string tablePath() const { return tablePath_; }
0196
0197 bool writeVerilog() const { return writeVerilog_; }
0198 bool writeHLS() const { return writeHLS_; }
0199 bool writeInvTable() const { return writeInvTable_; }
0200 bool writeHLSInvTable() const { return writeHLSInvTable_; }
0201
0202 unsigned int writememsect() const { return writememsect_; }
0203
0204 bool enableTripletTables() const { return enableTripletTables_; }
0205 bool writeTripletTables() const { return writeTripletTables_; }
0206
0207 bool writeoutReal() const { return writeoutReal_; }
0208
0209 bool bookHistos() const { return bookHistos_; }
0210
0211 double ptcut() const { return ptcut_; }
0212 double rinvcut() const { return 0.01 * c_ * bfield_ / ptcut_; }
0213
0214 double c() const { return c_; }
0215
0216 double rinvmax() const { return 0.01 * c_ * bfield_ / ptmin_; }
0217
0218 int alphashift() const { return alphashift_; }
0219 int nbitsalpha() const { return nbitsalpha_; }
0220 int alphaBitsTable() const { return alphaBitsTable_; }
0221 int nrinvBitsTable() const { return nrinvBitsTable_; }
0222
0223 unsigned int MEBinsBits() const { return MEBinsBits_; }
0224 unsigned int MEBins() const { return 1u << MEBinsBits_; }
0225 unsigned int MEBinsDisks() const { return MEBinsDisks_; }
0226 unsigned int maxStubsPerBin() const { return maxStubsPerBin_; }
0227
0228 std::string geomext() const {
0229 std::string geo = extended_ ? "hourglassExtended" : "hourglass";
0230 if (combined_)
0231 geo += "Combined";
0232 return geo;
0233 }
0234
0235 bool exactderivatives() const { return exactderivatives_; }
0236 bool exactderivativesforfloating() const { return exactderivativesforfloating_; }
0237 bool useapprox() const { return useapprox_; }
0238 bool usephicritapprox() const { return usephicritapprox_; }
0239
0240 unsigned int minIndStubs() const { return minIndStubs_; }
0241 std::string removalType() const { return removalType_; }
0242 std::string mergeComparison() const { return mergeComparison_; }
0243 bool doKF() const { return doKF_; }
0244 bool doMultipleMatches() const { return doMultipleMatches_; }
0245 bool fakefit() const { return fakefit_; }
0246 void setFakefit(bool fakefit) { fakefit_ = fakefit; }
0247 bool storeTrackBuilderOutput() const { return storeTrackBuilderOutput_; }
0248 void setStoreTrackBuilderOutput(bool storeTrackBuilderOutput) {
0249 storeTrackBuilderOutput_ = storeTrackBuilderOutput;
0250 }
0251 void setRemovalType(std::string removalType) { removalType_ = removalType; }
0252 void setDoMultipleMatches(bool doMultipleMatches) { doMultipleMatches_ = doMultipleMatches; }
0253
0254
0255 unsigned int nHelixPar() const { return nHelixPar_; }
0256 void setNHelixPar(unsigned int nHelixPar) { nHelixPar_ = nHelixPar; }
0257
0258 bool extended() const { return extended_; }
0259 void setExtended(bool extended) { extended_ = extended; }
0260 bool duplicateMPs() const { return duplicateMPs_; }
0261 const std::array<bool, N_LAYER + N_DISK>& layersDisksDuplicatedEqualProjBalance() const {
0262 return layersDisksDuplicatedEqualProjBalance_;
0263 }
0264 const std::array<bool, N_LAYER + N_DISK>& layersDisksDuplicatedWeightedProjBalance() const {
0265 return layersDisksDuplicatedWeightedProjBalance_;
0266 }
0267 bool combined() const { return combined_; }
0268 void setCombined(bool combined) { combined_ = combined; }
0269 bool reduced() const { return reduced_; }
0270 void setReduced(bool reduced) { reduced_ = reduced; }
0271 bool inventStubs() const { return inventStubs_; }
0272 void setInventStubs(bool inventStubs) { inventStubs_ = inventStubs; }
0273
0274 double bfield() const { return bfield_; }
0275 void setBfield(double bfield) { bfield_ = bfield; }
0276
0277 unsigned int nStrips(bool isPSmodule) const { return isPSmodule ? nStrips_PS_ : nStrips_2S_; }
0278 void setNStrips_PS(unsigned int nStrips_PS) { nStrips_PS_ = nStrips_PS; }
0279 void setNStrips_2S(unsigned int nStrips_2S) { nStrips_2S_ = nStrips_2S; }
0280
0281 double stripPitch(bool isPSmodule) const { return isPSmodule ? stripPitch_PS_ : stripPitch_2S_; }
0282 void setStripPitch_PS(double stripPitch_PS) { stripPitch_PS_ = stripPitch_PS; }
0283 void setStripPitch_2S(double stripPitch_2S) { stripPitch_2S_ = stripPitch_2S; }
0284
0285 double sensorSpacing2S() const { return sensorSpacing_2S_; }
0286
0287 double stripLength(bool isPSmodule) const { return isPSmodule ? stripLength_PS_ : stripLength_2S_; }
0288 void setStripLength_PS(double stripLength_PS) { stripLength_PS_ = stripLength_PS; }
0289 void setStripLength_2S(double stripLength_2S) { stripLength_2S_ = stripLength_2S; }
0290
0291
0292
0293 double rinvOverlapSize() const { return rinvOverlapSize_; }
0294
0295 double phiOverlapSize() const { return phiOverlapSize_; }
0296
0297 unsigned int numTracksComparedPerBin() const { return numTracksComparedPerBin_; }
0298
0299 const std::vector<double>& rinvBins() const { return rinvBins_; }
0300
0301 const std::vector<double>& phiBins() const { return phiBins_; }
0302
0303 std::string skimfile() const { return skimfile_; }
0304 void setSkimfile(std::string skimfile) { skimfile_ = skimfile; }
0305
0306 unsigned int nbitstrackletindex() const { return nbitstrackletindex_; }
0307 void setNbitstrackletindex(unsigned int nbitstrackletindex) { nbitstrackletindex_ = nbitstrackletindex; }
0308
0309 unsigned int nbitsitc() const { return nbitsitc_; }
0310 unsigned int nbitsseed() const { return (extended_ ? nbitsseedextended_ : nbitsseed_); }
0311 unsigned int nbitstcindex() const { return nbitsseed() + nbitsitc(); }
0312 void setNbitsitc(unsigned int nbitsitc) { nbitsitc_ = nbitsitc; }
0313 void setNbitsseed(unsigned int nbitsseed) { nbitsseed_ = nbitsseed; }
0314 void setNbitsseedextended(unsigned int nbitsseed) { nbitsseedextended_ = nbitsseed; }
0315
0316
0317 double dphisectorHG() const {
0318
0319 double rsectmin = 21.8;
0320 double rsectmax = 112.7;
0321 return 2 * M_PI / N_SECTOR + rinvmax() * std::max(rcrit_ - rsectmin, rsectmax - rcrit_);
0322 }
0323
0324 double rcrit() const { return rcrit_; }
0325
0326 double dphisector() const { return 2 * M_PI / N_SECTOR; }
0327
0328 double phicritmin() const { return 0.5 * dphisectorHG() - M_PI / N_SECTOR; }
0329 double phicritmax() const { return dphisectorHG() - 0.5 * dphisectorHG() + M_PI / N_SECTOR; }
0330
0331 double phicritminmc() const { return phicritmin() - dphicritmc_; }
0332 double phicritmaxmc() const { return phicritmax() + dphicritmc_; }
0333
0334
0335 double kphi() const { return dphisectorHG() / (1 << nphibitsstub(0)); }
0336 double kphi1() const { return dphisectorHG() / (1 << nphibitsstub(N_LAYER - 1)); }
0337 double kphi(unsigned int layerdisk) const { return dphisectorHG() / (1 << nphibitsstub(layerdisk)); }
0338
0339 double kz() const { return 2.0 * zlength_ / (1 << nzbitsstub_[0]); }
0340 double kz(unsigned int layerdisk) const { return 2.0 * zlength_ / (1 << nzbitsstub_[layerdisk]); }
0341 double kr() const { return rmaxdisk_ / (1 << nrbitsstub_[N_LAYER]); }
0342 double krbarrel() const { return 2.0 * drmax() / (1 << nrbitsstub_[0]); }
0343
0344 double maxrinv() const { return maxrinv_; }
0345 double maxd0() const { return maxd0_; }
0346 unsigned int nbitsd0() const { return nbitsd0_; }
0347
0348 double kd0() const { return 2 * maxd0_ / (1 << nbitsd0_); }
0349
0350 double rinvcutte() const { return 0.01 * c_ * bfield_ / ptcutte_; }
0351
0352 double rmindiskvm() const { return rmindiskvm_; }
0353 double rmaxdiskvm() const { return rmaxdiskvm_; }
0354
0355 double rmaxdiskl1overlapvm() const { return rmaxdiskl1overlapvm_; }
0356 double rmindiskl2overlapvm() const { return rmindiskl2overlapvm_; }
0357 double rmindiskl3overlapvm() const { return rmindiskl3overlapvm_; }
0358
0359 double rPS2S() const { return rPS2S_; }
0360
0361 double z0cut() const { return z0cut_; }
0362
0363 double disp_z0cut() const { return disp_z0cut_; }
0364
0365 unsigned int NLONGVMBITS() const { return NLONGVMBITS_; }
0366 unsigned int NLONGVMBINS() const { return (1 << NLONGVMBITS_); }
0367
0368 unsigned int ntrackletmax() const { return ((1 << nbitstrackletindex_) - 1); }
0369
0370
0371 int nbitsrinv() const { return nbitsrinv_; }
0372 int nbitsphi0() const { return nbitsphi0_; }
0373 int nbitst() const { return nbitst_; }
0374 int nbitsz0() const { return nbitsz0_; }
0375
0376
0377 int rinv_shift() const { return rinv_shift_; }
0378 int phi0_shift() const { return phi0_shift_; }
0379 int t_shift() const { return t_shift_; }
0380 int z0_shift() const { return z0_shift_; }
0381
0382
0383
0384
0385 int SS_phiL_shift() const { return SS_phiL_shift_; }
0386 int PS_zL_shift() const { return PS_zL_shift_; }
0387
0388 int SS_phiderL_shift() const { return SS_phiderL_shift_; }
0389 int PS_zderL_shift() const { return PS_zderL_shift_; }
0390 int SS_zderL_shift() const { return SS_zderL_shift_; }
0391
0392
0393 int SS_phiD_shift() const { return SS_phiD_shift_; }
0394 int PS_rD_shift() const { return PS_rD_shift_; }
0395
0396 int SS_phiderD_shift() const { return SS_phiderD_shift_; }
0397 int PS_rderD_shift() const { return PS_rderD_shift_; }
0398
0399
0400 int phi0bitshift() const { return phi0bitshift_; }
0401 int phiderbitshift() const { return phiderbitshift_; }
0402 int zderbitshift() const { return zderbitshift_; }
0403
0404 int phiresidbits() const { return phiresidbits_; }
0405 int zresidbits() const { return zresidbits_; }
0406 int rresidbits() const { return rresidbits_; }
0407
0408
0409 int fitrinvbitshift() const { return fitrinvbitshift_; }
0410 int fitphi0bitshift() const { return fitphi0bitshift_; }
0411 int fittbitshift() const { return fittbitshift_; }
0412 int fitz0bitshift() const { return fitz0bitshift_; }
0413
0414
0415 int rcorrbits() const { return rcorrbits_; }
0416
0417 int chisqphifactbits() const { return chisqphifactbits_; }
0418 int chisqzfactbits() const { return chisqzfactbits_; }
0419
0420
0421
0422 double krinvpars() const {
0423 int shift = ceil(-log2(0.02 * rmaxdisk_ / ((1 << nbitsrinv_) * dphisectorHG())));
0424 return dphisectorHG() / rmaxdisk_ / (1 << shift);
0425 }
0426 double kphi0pars() const { return 2 * kphi1(); }
0427 double ktpars() const { return maxt_ / (1 << nbitst_); }
0428 double kz0pars() const { return kz(); }
0429 double kd0pars() const { return kd0(); }
0430
0431 double kphider() const { return kphi() / kr() / 256; }
0432 double kphiderdisk() const { return kphi() / kr() / 128; }
0433 double kzder() const { return 1.0 / 64; }
0434 double krder() const { return 1.0 / 128; }
0435
0436
0437
0438 double krprojshiftdisk() const { return 2 * kr(); }
0439
0440 double benddecode(unsigned int ibend, unsigned int layerdisk, bool isPSmodule) const {
0441 if (layerdisk >= N_LAYER && (!isPSmodule))
0442 layerdisk += N_DISK;
0443 double bend = benddecode_[layerdisk][ibend];
0444 assert(bend < 99.0);
0445 return bend;
0446 }
0447
0448 double bendcut(unsigned int ibend, unsigned int layerdisk, bool isPSmodule) const {
0449 if (layerdisk >= N_LAYER && (!isPSmodule))
0450 layerdisk += N_DISK;
0451 double bendcut = bendcut_[layerdisk][ibend];
0452 if (bendcut <= 0.0)
0453 std::cout << "bendcut : " << layerdisk << " " << ibend << " " << isPSmodule << std::endl;
0454 assert(bendcut > 0.0);
0455 return bendcut;
0456 }
0457
0458
0459 std::string slotToDTCname(unsigned int slot) const { return slotToDTCname_.at(slot); }
0460
0461
0462 const std::vector<int>& dtcLayers(const std::string& dtcName) const {
0463 auto iter = dtclayers_.find(dtcName);
0464 assert(iter != dtclayers_.end());
0465 return iter->second;
0466 }
0467
0468 double bendcutte(int ibend, int layerdisk, bool isPSmodule) const { return bendcut(ibend, layerdisk, isPSmodule); }
0469
0470 double bendcutme(int ibend, int layerdisk, bool isPSmodule) const {
0471
0472 double fact = (layerdisk < N_LAYER) ? 1.0 : 1.8;
0473 return fact * bendcut(ibend, layerdisk, isPSmodule);
0474 }
0475
0476 bool useCalcBendCuts = true;
0477
0478 double bendcutTE(unsigned int seed, bool inner) const {
0479 if (inner) {
0480 return bendcutTE_[seed][0];
0481 } else {
0482 return bendcutTE_[seed][1];
0483 }
0484 }
0485
0486 double bendcutME(unsigned int layerdisk, bool isPSmodule) const {
0487 if (layerdisk >= N_LAYER && (!isPSmodule))
0488 layerdisk += N_DISK;
0489
0490 return bendcutME_[layerdisk];
0491 }
0492
0493
0494 std::array<std::array<int, 3>, N_SEED> seedlayers() const { return seedlayers_; }
0495
0496
0497 std::array<std::array<unsigned int, N_LAYER - 2>, N_SEED> projlayers() const { return projlayers_; }
0498
0499
0500 std::array<std::array<unsigned int, N_DISK>, N_SEED> projdisks() const { return projdisks_; }
0501
0502 private:
0503 const tt::Setup* setup_;
0504
0505 std::string fitPatternFile_;
0506 std::string processingModulesFile_;
0507 std::string memoryModulesFile_;
0508 std::string wiresFile_;
0509 std::string tableTEDFile_;
0510 std::string tableTREFile_;
0511
0512 double rcrit_{55.0};
0513
0514 double dphicritmc_{0.005};
0515
0516
0517 double deltarzfract_{32.0};
0518
0519 double maxt_{32.0};
0520
0521 std::array<unsigned int, N_LAYER> irmean_{{851, 1269, 1784, 2347, 2936, 3697}};
0522 std::array<unsigned int, N_DISK> izmean_{{2239, 2645, 3163, 3782, 4523}};
0523
0524 std::array<unsigned int, N_LAYER + N_DISK> nzbitsstub_{{12, 12, 12, 8, 8, 8, 7, 7, 7, 7, 7}};
0525 std::array<unsigned int, N_LAYER + N_DISK> nphibitsstub_{{14, 14, 14, 17, 17, 17, 14, 14, 14, 14, 14}};
0526 std::array<unsigned int, N_LAYER + N_DISK> nrbitsstub_{{7, 7, 7, 7, 7, 7, 12, 12, 12, 12, 12}};
0527
0528 unsigned int nrbitsprojderdisk_{9};
0529 unsigned int nbitsphiprojderL123_{10};
0530 unsigned int nbitsphiprojderL456_{10};
0531 unsigned int nbitszprojderL123_{10};
0532 unsigned int nbitszprojderL456_{9};
0533
0534 unsigned int nbendbitsmedisk_{4};
0535
0536 std::set<unsigned int> useseeding_{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
0537
0538 std::array<unsigned int, N_LAYER + N_DISK> nbitsallstubs_{{3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}};
0539 std::array<unsigned int, N_LAYER + N_DISK> nbitsvmme_{{2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2}};
0540 std::array<std::array<unsigned int, N_SEED>, 3> nbitsvmte_{
0541 {{{2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 2}},
0542 {{3, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2}},
0543 {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1}}}};
0544
0545 std::array<std::array<unsigned int, N_SEED>, 3> nbitsvmtecm_{
0546 {{{2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 2}},
0547 {{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2}},
0548 {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1}}}};
0549
0550
0551
0552 std::vector<std::string> slotToDTCname_{
0553 "PS10G_1", "PS10G_2", "PS10G_3", "PS10G_4", "PS_1", "PS_2", "2S_1", "2S_2", "2S_3", "2S_4", "2S_5", "2S_6"};
0554
0555 std::map<std::string, std::vector<int> > dtclayers_{{"PS10G_1", {0, 6, 8, 10}},
0556 {"PS10G_2", {0, 7, 9}},
0557 {"PS10G_3", {1, 7}},
0558 {"PS10G_4", {6, 8, 10}},
0559 {"PS_1", {2, 7}},
0560 {"PS_2", {2, 9}},
0561 {"2S_1", {3, 4}},
0562 {"2S_2", {4}},
0563 {"2S_3", {5}},
0564 {"2S_4", {5, 8}},
0565 {"2S_5", {6, 9}},
0566 {"2S_6", {7, 10}}};
0567
0568 double rmindiskvm_{22.5};
0569 double rmaxdiskvm_{67.0};
0570
0571 double rmaxdiskl1overlapvm_{45.0};
0572 double rmindiskl2overlapvm_{40.0};
0573 double rmindiskl3overlapvm_{50.0};
0574
0575 double rPS2S_{60.0};
0576
0577 double z0cut_{15.0};
0578
0579 double disp_z0cut_{27.0};
0580
0581 unsigned int NLONGVMBITS_{3};
0582
0583 double zlength_{120.0};
0584 double rmaxdisk_{120.0};
0585 double rmindisk_{20.0};
0586
0587 double zsepdisk_{1.5};
0588
0589 double half2SmoduleWidth_{4.57};
0590
0591 double maxrinv_{0.006};
0592 double maxd0_{10.0};
0593
0594 unsigned int nbitsd0_{13};
0595
0596 double ptmin_{2.0};
0597
0598 double ptcutte_{1.8};
0599
0600
0601 unsigned int nbitstrackletindex_{7};
0602
0603 unsigned int nbitsitc_{4};
0604
0605 unsigned int nbitsseed_{3};
0606 unsigned int nbitsseedextended_{4};
0607
0608
0609
0610 int nbitsrinv_{14};
0611 int nbitsphi0_{18};
0612 int nbitst_{14};
0613 int nbitsz0_{10};
0614
0615
0616 int rinv_shift_{-8};
0617 int phi0_shift_{1};
0618 int t_shift_{-10};
0619 int z0_shift_{0};
0620
0621
0622
0623
0624 int SS_phiL_shift_{0};
0625 int PS_zL_shift_{0};
0626
0627 int SS_phiderL_shift_{-5};
0628 int PS_zderL_shift_{-7};
0629 int SS_zderL_shift_{-7};
0630
0631
0632 int SS_phiD_shift_{3};
0633 int PS_rD_shift_{1};
0634
0635 int SS_phiderD_shift_{-4};
0636 int PS_rderD_shift_{-6};
0637
0638
0639 int phi0bitshift_{1};
0640 int phiderbitshift_{7};
0641 int zderbitshift_{6};
0642
0643 int phiresidbits_{12};
0644 int zresidbits_{9};
0645 int rresidbits_{7};
0646
0647
0648 int fitrinvbitshift_{9};
0649 int fitphi0bitshift_{6};
0650 int fittbitshift_{10};
0651 int fitz0bitshift_{8};
0652
0653
0654 int rcorrbits_{6};
0655
0656 int chisqphifactbits_{14};
0657 int chisqzfactbits_{14};
0658
0659 std::array<unsigned int, N_SEED> teunits_{{5, 2, 5, 3, 3, 2, 3, 2, 0, 0, 0, 0}};
0660 std::array<unsigned int, N_SEED> trpunits_{{0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10}};
0661
0662 std::array<unsigned int, N_LAYER + N_DISK> vmrlutzbits_{
0663 {7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 3}};
0664 std::array<unsigned int, N_LAYER + N_DISK> vmrlutrbits_{
0665 {4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8}};
0666
0667 std::array<std::array<unsigned int, N_SEED>, 3> nfinephi_{
0668 {{{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}},
0669 {{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}},
0670 {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3}}}};
0671
0672
0673
0674 std::array<std::array<unsigned int, N_SEED>, 3> nphireg_{
0675 {{{5, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4}},
0676 {{5, 4, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4}},
0677 {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4}}}};
0678
0679
0680 std::array<std::array<unsigned int, N_SEED>, 3> nphiregcm_{
0681 {{{5, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4}},
0682 {{5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4}},
0683 {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4}}}};
0684
0685
0686 std::array<std::array<unsigned int, N_SEED>, 3> lutwidthtab_{{{{10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 11, 0}},
0687 {{6, 6, 6, 6, 10, 10, 10, 10, 0, 0, 6, 0}},
0688 {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6}}}};
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698 std::array<std::array<unsigned int, N_SEED>, 3> lutwidthtabextended_{
0699 {{{21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}},
0700 {{21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}},
0701 {{21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}}}};
0702
0703
0704 std::array<std::array<int, 3>, N_SEED> seedlayers_{{{{0, 1, -1}},
0705 {{1, 2, -1}},
0706 {{2, 3, -1}},
0707 {{4, 5, -1}},
0708 {{6, 7, -1}},
0709 {{8, 9, -1}},
0710 {{0, 6, -1}},
0711 {{1, 6, -1}},
0712 {{2, 3, 1}},
0713 {{4, 5, 3}},
0714 {{1, 2, 6}},
0715 {{6, 7, 1}}}};
0716
0717
0718 std::array<unsigned int, N_SEED> ntc_{{12, 4, 4, 4, 4, 4, 8, 4, 0, 0, 0, 0}};
0719
0720
0721 std::array<std::array<unsigned int, N_LAYER - 2>, N_SEED> projlayers_{{{{3, 4, 5, 6}},
0722 {{1, 4, 5, 6}},
0723 {{1, 2, 5, 6}},
0724 {{1, 2, 3, 4}},
0725 {{1, 2}},
0726 {{1}},
0727 {{}},
0728 {{1}},
0729 {{1, 5, 6}},
0730 {{1, 2, 3}},
0731 {{1}},
0732 {{1}}}};
0733
0734
0735 std::array<std::array<unsigned int, N_DISK>, N_SEED> projdisks_{{{{1, 2, 3, 4}},
0736 {{1, 2, 3, 4}},
0737 {{1, 2}},
0738 {{}},
0739 {{3, 4, 5}},
0740 {{1, 2, 5}},
0741 {{2, 3, 4, 5}},
0742 {{2, 3, 4}},
0743 {{1, 2, 3}},
0744 {{}},
0745 {{2, 3, 4}},
0746 {{3, 4}}}};
0747
0748
0749 std::array<std::array<double, N_SEED>, N_LAYER> rphimatchcut_{
0750 {{{0.0, 0.1, 0.07, 0.08, 0.07, 0.05, 0.0, 0.05, 0.08, 0.15, 0.125, 0.15}},
0751 {{0.0, 0.0, 0.06, 0.08, 0.05, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0}},
0752 {{0.1, 0.0, 0.0, 0.08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.08, 0.0, 0.0}},
0753 {{0.19, 0.19, 0.0, 0.05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}},
0754 {{0.4, 0.4, 0.08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.08, 0.0, 0.0, 0.0}},
0755 {{0.5, 0.0, 0.19, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0}}}};
0756
0757
0758 std::array<std::array<double, N_SEED>, N_LAYER> zmatchcut_{
0759 {{{0.0, 0.7, 5.5, 15.0, 1.5, 2.0, 0.0, 1.5, 1.0, 8.0, 1.0, 1.5}},
0760 {{0.0, 0.0, 3.5, 15.0, 1.25, 0.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0}},
0761 {{0.7, 0.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0}},
0762 {{3.0, 3.0, 0.0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}},
0763 {{3.0, 3.0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.5, 0.0, 0.0, 0.0}},
0764 {{4.0, 0.0, 9.5, 0.0, 0.0, 0.0, 0.0, 0.0, 4.5, 0.0, 0.0, 0.0}}}};
0765
0766
0767 std::array<std::array<double, N_SEED>, N_DISK> rphicutPS_{
0768 {{{0.2, 0.2, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}},
0769 {{0.2, 0.2, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.15, 0.0}},
0770 {{0.25, 0.2, 0.0, 0.0, 0.15, 0.0, 0.2, 0.15, 0.0, 0.0, 0.0, 0.2}},
0771 {{0.5, 0.2, 0.0, 0.0, 0.2, 0.0, 0.3, 0.5, 0.0, 0.0, 0.0, 0.0}},
0772 {{0.0, 0.0, 0.0, 0.0, 0.25, 0.1, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0}}}};
0773
0774
0775 std::array<std::array<double, N_SEED>, N_DISK> rcutPS_{
0776 {{{0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}},
0777 {{0.5, 0.5, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 0.5, 0.0}},
0778 {{0.5, 0.5, 0.0, 0.0, 0.5, 0.0, 0.6, 0.8, 0.0, 0.0, 0.0, 0.4}},
0779 {{0.5, 0.5, 0.0, 0.0, 0.8, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0}},
0780 {{0.0, 0.0, 0.0, 0.0, 1.0, 0.5, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0}}}};
0781
0782
0783 std::array<std::array<double, N_SEED>, N_DISK> rphicut2S_{
0784 {{{0.5, 0.5, 0.8, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0}},
0785 {{0.5, 0.5, 0.8, 0.0, 0.0, 0.0, 0.5, 0.15, 0.3, 0.0, 0.68, 0.0}},
0786 {{0.5, 0.5, 0.0, 0.0, 0.15, 0.0, 0.2, 0.25, 0.0, 0.0, 0.8, 0.1}},
0787 {{0.5, 0.5, 0.0, 0.0, 0.2, 0.0, 0.25, 0.5, 0.0, 0.0, 0.6, 0.4}},
0788 {{0.0, 0.0, 0.0, 0.0, 0.4, 0.2, 0.4, 0.0, 0.0, 0.0, 0.0, 0.8}}}};
0789
0790
0791 std::array<std::array<double, N_SEED>, N_DISK> rcut2S_{
0792 {{{3.8, 3.8, 3.8, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0}},
0793 {{3.8, 3.8, 3.8, 0.0, 0.0, 0.0, 3.8, 3.4, 3.0, 0.0, 3.0, 0.0}},
0794 {{3.6, 3.8, 0.0, 0.0, 3.6, 0.0, 3.6, 3.8, 0.0, 0.0, 3.8, 3.0}},
0795 {{3.6, 3.8, 0.0, 0.0, 3.6, 0.0, 3.5, 3.8, 0.0, 0.0, 3.0, 3.0}},
0796 {{0.0, 0.0, 0.0, 0.0, 3.6, 3.4, 3.7, 0.0, 0.0, 0.0, 0.0, 3.0}}}};
0797
0798
0799 std::array<std::array<double, 16>, 16> benddecode_{
0800 {{{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}},
0801 {{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}},
0802 {{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}},
0803 {{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}},
0804 {{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}},
0805 {{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}},
0806 {{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}},
0807 {{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}},
0808 {{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}},
0809 {{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}},
0810 {{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}},
0811 {{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}},
0812 {{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}},
0813 {{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}},
0814 {{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}},
0815 {{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}}}};
0816
0817
0818 std::array<std::array<double, 16>, 16> bendcut_{
0819 {{{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}},
0820 {{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}},
0821 {{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}},
0822 {{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}},
0823 {{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}},
0824 {{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}},
0825 {{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}},
0826 {{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}},
0827 {{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}},
0828 {{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}},
0829 {{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}},
0830 {{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}},
0831 {{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}},
0832 {{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}},
0833 {{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}},
0834 {{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}}}};
0835
0836 double FEbendcut = sqrt(1 / 6.0);
0837
0838 double bendcutTE_[N_SEED_PROMPT][2] = {{2.2 * FEbendcut, 2.5 * FEbendcut},
0839 {2.0 * FEbendcut, 2.0 * FEbendcut},
0840 {2.0 * FEbendcut, 2.6 * FEbendcut},
0841 {2.4 * FEbendcut, 2.4 * FEbendcut},
0842 {2.5 * FEbendcut, 2.2 * FEbendcut},
0843 {2.0 * FEbendcut, 2.0 * FEbendcut},
0844 {2.0 * FEbendcut, 2.4 * FEbendcut},
0845 {2.2 * FEbendcut, 2.2 * FEbendcut}};
0846
0847 double bendcutME_[N_LAYER + 2 * N_DISK] = {2.0 * FEbendcut,
0848 2.5 * FEbendcut,
0849 2.0 * FEbendcut,
0850 2.5 * FEbendcut,
0851 2.2 * FEbendcut,
0852 2.3 * FEbendcut,
0853 4.0 * FEbendcut,
0854 3.5 * FEbendcut,
0855 3.5 * FEbendcut,
0856 3.5 * FEbendcut,
0857 2.7 * FEbendcut,
0858 3.5 * FEbendcut,
0859 3.4 * FEbendcut,
0860 3.5 * FEbendcut,
0861 3.7 * FEbendcut,
0862 3.5 * FEbendcut};
0863
0864
0865
0866
0867 unsigned int maxstepoffset_{0};
0868
0869 unsigned int maxstepoffset_extended_{10000};
0870
0871
0872
0873
0874 std::unordered_map<std::string, unsigned int> maxstep_{
0875 {"IR", 156},
0876
0877
0878
0879 {"VMR", 107},
0880 {"TE", 107},
0881 {"TC", 108},
0882 {"PR", 108},
0883 {"ME", 108},
0884
0885
0886
0887 {"MC", 108},
0888 {"TB", 108},
0889 {"MP", 108},
0890 {"TP", 108},
0891 {"TPD", 108},
0892 {"TRE", 108},
0893 {"DR", 108}};
0894
0895
0896
0897
0898 std::unordered_map<std::string, bool> writeMonitorData_{{"IL", false},
0899 {"TE", false},
0900 {"CT", false},
0901 {"HitPattern", false},
0902 {"ChiSq", false},
0903 {"Seeds", false},
0904 {"FT", false},
0905 {"Residuals", false},
0906 {"StubBend", false},
0907 {"MC", false},
0908 {"MP", false},
0909 {"ME", false},
0910 {"AP", false},
0911 {"VMP", false},
0912 {"TrackProjOcc", false},
0913 {"TC", false},
0914 {"Pars", false},
0915 {"TPars", false},
0916 {"TPD", false},
0917 {"TrackletPars", false},
0918 {"TED", false},
0919 {"TP", false},
0920 {"TRE", false},
0921 {"VMR", false},
0922 {"StubsLayer", false},
0923 {"StubsLayerSector", false},
0924 {"HitEff", false},
0925 {"MatchEff", false},
0926 {"IFit", false},
0927 {"AS", false},
0928 {"WriteEmptyProj", false}};
0929
0930 std::array<double, N_DSS_MOD> rDSSinner_mod_{{68.9391, 78.7750, 85.4550, 96.3150, 102.3160}};
0931 std::array<double, N_DSS_MOD> rDSSouter_mod_{{66.4903, 76.7750, 84.4562, 94.9920, 102.3160}};
0932
0933
0934 double halfstrip_{2.5};
0935
0936
0937 bool printDebugKF_{false};
0938 bool debugTracklet_{false};
0939 bool writetrace_{false};
0940
0941 bool warnNoMem_{false};
0942 bool warnNoDer_{false};
0943
0944
0945 bool writeMem_{false};
0946 bool writeTable_{false};
0947 bool writeConfig_{false};
0948 std::string memPath_{"../data/MemPrints/"};
0949 std::string tablePath_{"../data/LUTs/"};
0950
0951
0952 bool writeVerilog_{false};
0953 bool writeHLS_{false};
0954 bool writeInvTable_{false};
0955 bool writeHLSInvTable_{false};
0956
0957 unsigned int writememsect_{3};
0958
0959 bool enableTripletTables_{false};
0960
0961
0962 bool writeTripletTables_{false};
0963
0964
0965
0966
0967 bool writeoutReal_{false};
0968
0969
0970 bool bookHistos_{false};
0971
0972
0973 double ptcut_{1.91};
0974
0975
0976 int alphashift_{12};
0977 int nbitsalpha_{4};
0978 int alphaBitsTable_{2};
0979 int nrinvBitsTable_{3};
0980
0981 unsigned int MEBinsBits_{3};
0982 unsigned int MEBinsDisks_{8};
0983 unsigned int maxStubsPerBin_{15};
0984
0985
0986 bool exactderivatives_{false};
0987 bool exactderivativesforfloating_{true};
0988 bool useapprox_{true};
0989 bool usephicritapprox_{false};
0990
0991
0992
0993
0994
0995 unsigned int minIndStubs_{3};
0996
0997 #ifdef USEHYBRID
0998
0999 std::string removalType_{"merge"};
1000
1001
1002
1003 std::string mergeComparison_{"CompareBest"};
1004 bool doKF_{true};
1005 #else
1006 std::string removalType_{"ichi"};
1007 std::string mergeComparison_{""};
1008 bool doKF_{false};
1009 #endif
1010
1011
1012
1013
1014
1015
1016 bool doMultipleMatches_{true};
1017
1018
1019
1020 bool fakefit_{false};
1021
1022 bool storeTrackBuilderOutput_{false};
1023
1024
1025 unsigned int nHelixPar_{4};
1026 bool extended_{false};
1027 bool reduced_{false};
1028 bool inventStubs_{false};
1029
1030
1031 bool combined_{true};
1032
1033
1034
1035
1036
1037
1038
1039 bool duplicateMPs_{false};
1040
1041
1042
1043
1044
1045
1046 std::array<bool, N_LAYER + N_DISK> layersDisksDuplicatedEqualProjBalance_{
1047 {false, false, false, false, false, false, false, false, false, false, false}};
1048
1049
1050
1051 std::array<bool, N_LAYER + N_DISK> layersDisksDuplicatedWeightedProjBalance_{
1052 {false, false, false, false, false, false, false, false, false, false, false}};
1053
1054
1055
1056
1057
1058 std::string skimfile_{""};
1059
1060 double bfield_{3.8112};
1061 double c_{0.299792458};
1062
1063 unsigned int nStrips_PS_{960};
1064 unsigned int nStrips_2S_{1016};
1065
1066 double stripPitch_PS_{0.01};
1067 double stripPitch_2S_{0.009};
1068
1069 double stripLength_PS_{0.1467};
1070 double stripLength_2S_{5.0250};
1071
1072
1073
1074
1075
1076 std::vector<double> rinvBins_{-rinvcut(), rinvcut()};
1077 std::vector<double> phiBins_{0, dphisectorHG()};
1078
1079 double rinvOverlapSize_{0.0004};
1080
1081 double phiOverlapSize_{M_PI / 360};
1082
1083 int numTracksComparedPerBin_{9999};
1084
1085 double sensorSpacing_2S_{0.18};
1086 };
1087
1088 constexpr unsigned int N_TILTED_RINGS = 12;
1089 constexpr std::array<unsigned int, N_PSLAYER> N_MOD_PLANK = {{7, 11, 15}};
1090
1091 constexpr unsigned int N_TRKLSEED = 7;
1092 constexpr unsigned int N_PROJ = 4;
1093
1094
1095 constexpr unsigned int N_FITPARAM = 4;
1096 constexpr unsigned int N_FITSTUB = 6;
1097
1098 constexpr unsigned int N_TRACKDER_PTBIN = 4;
1099 constexpr unsigned int N_TRACKDER_INDEX = 1000;
1100
1101 }
1102
1103 #endif