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