CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Setup.cc
Go to the documentation of this file.
6 
7 #include <cmath>
8 #include <algorithm>
9 #include <vector>
10 #include <set>
11 #include <string>
12 #include <sstream>
13 
14 using namespace std;
15 using namespace edm;
16 
17 namespace trackerDTC {
18 
21  const TrackerGeometry& trackerGeometry,
22  const TrackerTopology& trackerTopology,
23  const TrackerDetToDTCELinkCablingMap& cablingMap,
24  const StubAlgorithmOfficial& stubAlgorithm,
25  const ParameterSet& pSetStubAlgorithm,
26  const ParameterSet& pSetGeometryConfiguration,
27  const ParameterSetID& pSetIdTTStubAlgorithm,
28  const ParameterSetID& pSetIdGeometryConfiguration)
29  : magneticField_(&magneticField),
30  trackerGeometry_(&trackerGeometry),
31  trackerTopology_(&trackerTopology),
32  cablingMap_(&cablingMap),
33  stubAlgorithm_(&stubAlgorithm),
34  pSetSA_(&pSetStubAlgorithm),
35  pSetGC_(&pSetGeometryConfiguration),
36  pSetIdTTStubAlgorithm_(pSetIdTTStubAlgorithm),
37  pSetIdGeometryConfiguration_(pSetIdGeometryConfiguration),
38  // DD4hep
39  fromDD4hep_(iConfig.getParameter<bool>("fromDD4hep")),
40  // Parameter to check if configured Tracker Geometry is supported
41  pSetSG_(iConfig.getParameter<ParameterSet>("SupportedGeometry")),
42  sgXMLLabel_(pSetSG_.getParameter<string>("XMLLabel")),
43  sgXMLPath_(pSetSG_.getParameter<string>("XMLPath")),
44  sgXMLFile_(pSetSG_.getParameter<string>("XMLFile")),
45  sgXMLVersions_(pSetSG_.getParameter<vector<string>>("XMLVersions")),
46  // Parameter to check if Process History is consistent with process configuration
47  pSetPH_(iConfig.getParameter<ParameterSet>("ProcessHistory")),
48  phGeometryConfiguration_(pSetPH_.getParameter<string>("GeometryConfiguration")),
49  phTTStubAlgorithm_(pSetPH_.getParameter<string>("TTStubAlgorithm")),
50  // Common track finding parameter
51  pSetTF_(iConfig.getParameter<ParameterSet>("TrackFinding")),
52  beamWindowZ_(pSetTF_.getParameter<double>("BeamWindowZ")),
53  matchedLayers_(pSetTF_.getParameter<int>("MatchedLayers")),
54  matchedLayersPS_(pSetTF_.getParameter<int>("MatchedLayersPS")),
55  unMatchedStubs_(pSetTF_.getParameter<int>("UnMatchedStubs")),
56  unMatchedStubsPS_(pSetTF_.getParameter<int>("UnMatchedStubsPS")),
57  // TMTT specific parameter
58  pSetTMTT_(iConfig.getParameter<ParameterSet>("TMTT")),
59  minPt_(pSetTMTT_.getParameter<double>("MinPt")),
60  maxEta_(pSetTMTT_.getParameter<double>("MaxEta")),
61  chosenRofPhi_(pSetTMTT_.getParameter<double>("ChosenRofPhi")),
62  numLayers_(pSetTMTT_.getParameter<int>("NumLayers")),
63  widthR_(pSetTMTT_.getParameter<int>("WidthR")),
64  widthPhi_(pSetTMTT_.getParameter<int>("WidthPhi")),
65  widthZ_(pSetTMTT_.getParameter<int>("WidthZ")),
66  // Hybrid specific parameter
67  pSetHybrid_(iConfig.getParameter<ParameterSet>("Hybrid")),
68  hybridMinPt_(pSetHybrid_.getParameter<double>("MinPt")),
69  hybridMaxEta_(pSetHybrid_.getParameter<double>("MaxEta")),
70  hybridChosenRofPhi_(pSetHybrid_.getParameter<double>("ChosenRofPhi")),
71  hybridNumLayers_(pSetHybrid_.getParameter<int>("NumLayers")),
72  hybridNumRingsPS_(pSetHybrid_.getParameter<vector<int>>("NumRingsPS")),
73  hybridWidthsR_(pSetHybrid_.getParameter<vector<int>>("WidthsR")),
74  hybridWidthsZ_(pSetHybrid_.getParameter<vector<int>>("WidthsZ")),
75  hybridWidthsPhi_(pSetHybrid_.getParameter<vector<int>>("WidthsPhi")),
76  hybridWidthsAlpha_(pSetHybrid_.getParameter<vector<int>>("WidthsAlpha")),
77  hybridWidthsBend_(pSetHybrid_.getParameter<vector<int>>("WidthsBend")),
78  hybridRangesR_(pSetHybrid_.getParameter<vector<double>>("RangesR")),
79  hybridRangesZ_(pSetHybrid_.getParameter<vector<double>>("RangesZ")),
80  hybridRangesAlpha_(pSetHybrid_.getParameter<vector<double>>("RangesAlpha")),
81  hybridLayerRs_(pSetHybrid_.getParameter<vector<double>>("LayerRs")),
82  hybridDiskZs_(pSetHybrid_.getParameter<vector<double>>("DiskZs")),
83  hybridDisk2SRsSet_(pSetHybrid_.getParameter<vector<ParameterSet>>("Disk2SRsSet")),
84  // Parameter specifying TrackingParticle used for Efficiency measurements
85  pSetTP_(iConfig.getParameter<ParameterSet>("TrackingParticle")),
86  tpMaxEta_(pSetTP_.getParameter<double>("MaxEta")),
87  tpMaxVertR_(pSetTP_.getParameter<double>("MaxVertR")),
88  tpMaxVertZ_(pSetTP_.getParameter<double>("MaxVertZ")),
89  tpMaxD0_(pSetTP_.getParameter<double>("MaxD0")),
90  tpMinLayers_(pSetTP_.getParameter<int>("MinLayers")),
91  tpMinLayersPS_(pSetTP_.getParameter<int>("MinLayersPS")),
92  // Fimrware specific Parameter
93  pSetFW_(iConfig.getParameter<ParameterSet>("Firmware")),
94  numFramesInfra_(pSetFW_.getParameter<int>("NumFramesInfra")),
95  freqLHC_(pSetFW_.getParameter<double>("FreqLHC")),
96  freqBE_(pSetFW_.getParameter<double>("FreqBE")),
97  tmpFE_(pSetFW_.getParameter<int>("TMP_FE")),
98  tmpTFP_(pSetFW_.getParameter<int>("TMP_TFP")),
99  speedOfLight_(pSetFW_.getParameter<double>("SpeedOfLight")),
100  bField_(pSetFW_.getParameter<double>("BField")),
101  bFieldError_(pSetFW_.getParameter<double>("BFieldError")),
102  outerRadius_(pSetFW_.getParameter<double>("OuterRadius")),
103  innerRadius_(pSetFW_.getParameter<double>("InnerRadius")),
104  halfLength_(pSetFW_.getParameter<double>("HalfLength")),
105  maxPitch_(pSetFW_.getParameter<double>("MaxPitch")),
106  // Parmeter specifying front-end
107  pSetFE_(iConfig.getParameter<ParameterSet>("FrontEnd")),
108  widthBend_(pSetFE_.getParameter<int>("WidthBend")),
109  widthCol_(pSetFE_.getParameter<int>("WidthCol")),
110  widthRow_(pSetFE_.getParameter<int>("WidthRow")),
111  baseBend_(pSetFE_.getParameter<double>("BaseBend")),
112  baseCol_(pSetFE_.getParameter<double>("BaseCol")),
113  baseRow_(pSetFE_.getParameter<double>("BaseRow")),
114  baseWindowSize_(pSetFE_.getParameter<double>("BaseWindowSize")),
115  bendCut_(pSetFE_.getParameter<double>("BendCut")),
116  // Parmeter specifying DTC
117  pSetDTC_(iConfig.getParameter<ParameterSet>("DTC")),
118  numRegions_(pSetDTC_.getParameter<int>("NumRegions")),
119  numOverlappingRegions_(pSetDTC_.getParameter<int>("NumOverlappingRegions")),
120  numATCASlots_(pSetDTC_.getParameter<int>("NumATCASlots")),
121  numDTCsPerRegion_(pSetDTC_.getParameter<int>("NumDTCsPerRegion")),
122  numModulesPerDTC_(pSetDTC_.getParameter<int>("NumModulesPerDTC")),
123  dtcNumRoutingBlocks_(pSetDTC_.getParameter<int>("NumRoutingBlocks")),
124  dtcDepthMemory_(pSetDTC_.getParameter<int>("DepthMemory")),
125  dtcWidthRowLUT_(pSetDTC_.getParameter<int>("WidthRowLUT")),
126  dtcWidthQoverPt_(pSetDTC_.getParameter<int>("WidthQoverPt")),
127  offsetDetIdDSV_(pSetDTC_.getParameter<int>("OffsetDetIdDSV")),
128  offsetDetIdTP_(pSetDTC_.getParameter<int>("OffsetDetIdTP")),
129  offsetLayerDisks_(pSetDTC_.getParameter<int>("OffsetLayerDisks")),
130  offsetLayerId_(pSetDTC_.getParameter<int>("OffsetLayerId")),
131  // Parmeter specifying GeometricProcessor
132  pSetGP_(iConfig.getParameter<ParameterSet>("GeometricProcessor")),
133  numSectorsPhi_(pSetGP_.getParameter<int>("NumSectorsPhi")),
134  chosenRofZ_(pSetGP_.getParameter<double>("ChosenRofZ")),
135  neededRangeChiZ_(pSetGP_.getParameter<double>("RangeChiZ")),
136  gpDepthMemory_(pSetGP_.getParameter<int>("DepthMemory")),
137  boundariesEta_(pSetGP_.getParameter<vector<double>>("BoundariesEta")),
138  // Parmeter specifying HoughTransform
139  pSetHT_(iConfig.getParameter<ParameterSet>("HoughTransform")),
140  htNumBinsQoverPt_(pSetHT_.getParameter<int>("NumBinsQoverPt")),
141  htNumBinsPhiT_(pSetHT_.getParameter<int>("NumBinsPhiT")),
142  htMinLayers_(pSetHT_.getParameter<int>("MinLayers")),
143  htDepthMemory_(pSetHT_.getParameter<int>("DepthMemory")),
144  // Parmeter specifying MiniHoughTransform
145  pSetMHT_(iConfig.getParameter<ParameterSet>("MiniHoughTransform")),
146  mhtNumBinsQoverPt_(pSetMHT_.getParameter<int>("NumBinsQoverPt")),
147  mhtNumBinsPhiT_(pSetMHT_.getParameter<int>("NumBinsPhiT")),
148  mhtNumDLB_(pSetMHT_.getParameter<int>("NumDLB")),
149  mhtMinLayers_(pSetMHT_.getParameter<int>("MinLayers")),
150  // Parmeter specifying SeedFilter
151  pSetSF_(iConfig.getParameter<ParameterSet>("SeedFilter")),
152  sfPowerBaseCot_(pSetSF_.getParameter<int>("PowerBaseCot")),
153  sfBaseDiffZ_(pSetSF_.getParameter<int>("BaseDiffZ")),
154  sfMinLayers_(pSetSF_.getParameter<int>("MinLayers")),
155  // Parmeter specifying KalmanFilter
156  pSetKF_(iConfig.getParameter<ParameterSet>("KalmanFilter")),
157  kfWidthLutInvPhi_(pSetKF_.getParameter<int>("WidthLutInvPhi")),
158  kfWidthLutInvZ_(pSetKF_.getParameter<int>("WidthLutInvZ")),
159  kfNumTracks_(pSetKF_.getParameter<int>("NumTracks")),
160  kfMinLayers_(pSetKF_.getParameter<int>("MinLayers")),
161  kfMaxLayers_(pSetKF_.getParameter<int>("MaxLayers")),
162  kfMaxStubsPerLayer_(pSetKF_.getParameter<int>("MaxStubsPerLayer")),
163  kfMaxSkippedLayers_(pSetKF_.getParameter<int>("MaxSkippedLayers")),
164  kfBaseShiftr0_(pSetKF_.getParameter<int>("BaseShiftr0")),
165  kfBaseShiftr02_(pSetKF_.getParameter<int>("BaseShiftr02")),
166  kfBaseShiftv0_(pSetKF_.getParameter<int>("BaseShiftv0")),
167  kfBaseShiftS00_(pSetKF_.getParameter<int>("BaseShiftS00")),
168  kfBaseShiftS01_(pSetKF_.getParameter<int>("BaseShiftS01")),
169  kfBaseShiftK00_(pSetKF_.getParameter<int>("BaseShiftK00")),
170  kfBaseShiftK10_(pSetKF_.getParameter<int>("BaseShiftK10")),
171  kfBaseShiftR00_(pSetKF_.getParameter<int>("BaseShiftR00")),
172  kfBaseShiftInvR00_(pSetKF_.getParameter<int>("BaseShiftInvR00")),
173  kfBaseShiftChi20_(pSetKF_.getParameter<int>("BaseShiftChi20")),
174  kfBaseShiftC00_(pSetKF_.getParameter<int>("BaseShiftC00")),
175  kfBaseShiftC01_(pSetKF_.getParameter<int>("BaseShiftC01")),
176  kfBaseShiftC11_(pSetKF_.getParameter<int>("BaseShiftC11")),
177  kfBaseShiftr1_(pSetKF_.getParameter<int>("BaseShiftr1")),
178  kfBaseShiftr12_(pSetKF_.getParameter<int>("BaseShiftr12")),
179  kfBaseShiftv1_(pSetKF_.getParameter<int>("BaseShiftv1")),
180  kfBaseShiftS12_(pSetKF_.getParameter<int>("BaseShiftS12")),
181  kfBaseShiftS13_(pSetKF_.getParameter<int>("BaseShiftS13")),
182  kfBaseShiftK21_(pSetKF_.getParameter<int>("BaseShiftK21")),
183  kfBaseShiftK31_(pSetKF_.getParameter<int>("BaseShiftK31")),
184  kfBaseShiftR11_(pSetKF_.getParameter<int>("BaseShiftR11")),
185  kfBaseShiftInvR11_(pSetKF_.getParameter<int>("BaseShiftInvR11")),
186  kfBaseShiftChi21_(pSetKF_.getParameter<int>("BaseShiftChi21")),
187  kfBaseShiftC22_(pSetKF_.getParameter<int>("BaseShiftC22")),
188  kfBaseShiftC23_(pSetKF_.getParameter<int>("BaseShiftC23")),
189  kfBaseShiftC33_(pSetKF_.getParameter<int>("BaseShiftC33")),
190  kfBaseShiftChi2_(pSetKF_.getParameter<int>("BaseShiftChi2")),
191  // Parmeter specifying DuplicateRemoval
192  pSetDR_(iConfig.getParameter<ParameterSet>("DuplicateRemoval")),
193  drDepthMemory_(pSetDR_.getParameter<int>("DepthMemory")),
194  drWidthPhi0_(pSetDR_.getParameter<int>("WidthPhi0")),
195  drWidthQoverPt_(pSetDR_.getParameter<int>("WidthQoverPt")),
196  drWidthCot_(pSetDR_.getParameter<int>("WidthCot")),
197  drWidthZ0_(pSetDR_.getParameter<int>("WidthZ0")) {
199  // check if bField is supported
201  // check if geometry is supported
202  checkGeometry();
204  return;
205  // derive constants
207  // convert configuration of TTStubAlgorithm
209  // create all possible encodingsBend
210  encodingsBendPS_.reserve(maxWindowSize_ + 1);
211  encodingsBend2S_.reserve(maxWindowSize_ + 1);
214  // create encodingsLayerId
216  encodeLayerId();
217  // create sensor modules
219  }
220 
221  // checks current configuration vs input sample configuration
222  void Setup::checkHistory(const ProcessHistory& processHistory) const {
223  const pset::Registry* psetRegistry = pset::Registry::instance();
224  // check used TTStubAlgorithm in input producer
225  checkHistory(processHistory, psetRegistry, phTTStubAlgorithm_, pSetIdTTStubAlgorithm_);
226  // check used GeometryConfiguration in input producer
228  }
229 
230  // checks consitency between history and current configuration for a specific module
231  void Setup::checkHistory(const ProcessHistory& ph,
232  const pset::Registry* pr,
233  const string& label,
234  const ParameterSetID& pSetId) const {
235  vector<pair<string, ParameterSet>> pSets;
236  pSets.reserve(ph.size());
237  for (const ProcessConfiguration& pc : ph) {
238  const ParameterSet* pSet = pr->getMapped(pc.parameterSetID());
239  if (pSet && pSet->exists(label))
240  pSets.emplace_back(pc.processName(), pSet->getParameterSet(label));
241  }
242  if (pSets.empty()) {
243  cms::Exception exception("BadConfiguration");
244  exception << label << " not found in process history.";
245  exception.addContext("tt::Setup::checkHistory");
246  throw exception;
247  }
248  auto consistent = [&pSetId](const pair<string, ParameterSet>& p) { return p.second.id() == pSetId; };
249  if (!all_of(pSets.begin(), pSets.end(), consistent)) {
250  const ParameterSet& pSetProcess = getParameterSet(pSetId);
251  cms::Exception exception("BadConfiguration");
252  exception.addContext("tt::Setup::checkHistory");
253  exception << label << " inconsistent with History." << endl;
254  exception << "Current Configuration:" << endl << pSetProcess.dump() << endl;
255  for (const pair<string, ParameterSet>& p : pSets)
256  if (!consistent(p))
257  exception << "Process " << p.first << " Configuration:" << endl << dumpDiff(p.second, pSetProcess) << endl;
258  throw exception;
259  }
260  }
261 
262  // dumps pSetHistory where incosistent lines with pSetProcess are highlighted
263  string Setup::dumpDiff(const ParameterSet& pSetHistory, const ParameterSet& pSetProcess) const {
264  stringstream ssHistory, ssProcess, ss;
265  ssHistory << pSetHistory.dump();
266  ssProcess << pSetProcess.dump();
267  string lineHistory, lineProcess;
268  for (; getline(ssHistory, lineHistory) && getline(ssProcess, lineProcess);)
269  ss << (lineHistory != lineProcess ? "\033[1;31m" : "") << lineHistory << "\033[0m" << endl;
270  return ss.str();
271  }
272 
273  // converts tk layout id into dtc id
274  int Setup::dtcId(int tkLayoutId) const {
275  checkTKLayoutId(tkLayoutId);
276  const int tkId = tkLayoutId - 1;
277  const int side = tkId / (numRegions_ * numATCASlots_);
278  const int region = (tkId % (numRegions_ * numATCASlots_)) / numATCASlots_;
279  const int slot = tkId % numATCASlots_;
280  return region * numDTCsPerRegion_ + side * numATCASlots_ + slot;
281  }
282 
283  // converts dtc id into tk layout id
284  int Setup::tkLayoutId(int dtcId) const {
285  checkDTCId(dtcId);
286  const int slot = dtcId % numATCASlots_;
287  const int region = dtcId / numDTCsPerRegion_;
288  const int side = (dtcId % numDTCsPerRegion_) / numATCASlots_;
289  return (side * numRegions_ + region) * numATCASlots_ + slot + 1;
290  }
291 
292  // converts TFP identifier (region[0-8], channel[0-47]) into dtc id
293  int Setup::dtcId(int tfpRegion, int tfpChannel) const {
294  checkTFPIdentifier(tfpRegion, tfpChannel);
295  const int dtcChannel = numOverlappingRegions_ - (tfpChannel / numDTCsPerRegion_) - 1;
296  const int dtcBoard = tfpChannel % numDTCsPerRegion_;
297  const int dtcRegion = tfpRegion - dtcChannel >= 0 ? tfpRegion - dtcChannel : tfpRegion - dtcChannel + numRegions_;
298  return dtcRegion * numDTCsPerRegion_ + dtcBoard;
299  }
300 
301  // checks if given DTC id is connected to PS or 2S sensormodules
302  bool Setup::psModule(int dtcId) const {
303  checkDTCId(dtcId);
304  // from tklayout: first 3 are 10 gbps PS, next 3 are 5 gbps PS and residual 6 are 5 gbps 2S modules
305  return slot(dtcId) < numATCASlots_ / 2;
306  }
307 
308  // checks if given dtcId is connected to -z (false) or +z (true)
309  bool Setup::side(int dtcId) const {
310  checkDTCId(dtcId);
311  const int side = (dtcId % numDTCsPerRegion_) / numATCASlots_;
312  // from tkLayout: first 12 +z, next 12 -z
313  return side == 0;
314  }
315 
316  // ATCA slot number [0-11] of given dtcId
317  int Setup::slot(int dtcId) const {
318  checkDTCId(dtcId);
319  return dtcId % numATCASlots_;
320  }
321 
322  // sensor module for det id
323  SensorModule* Setup::sensorModule(const DetId& detId) const {
324  const auto it = detIdToSensorModule_.find(detId);
325  if (it == detIdToSensorModule_.end()) {
326  cms::Exception exception("NullPtr");
327  exception << "Unknown DetId used.";
328  exception.addContext("tt::Setup::sensorModule");
329  throw exception;
330  }
331  return it->second;
332  }
333 
334  // index = encoded bend, value = decoded bend for given window size and module type
335  const vector<double>& Setup::encodingBend(int windowSize, bool psModule) const {
336  const vector<vector<double>>& encodingsBend = psModule ? encodingsBendPS_ : encodingsBend2S_;
337  return encodingsBend.at(windowSize);
338  }
339 
340  // index = encoded layerId, inner value = decoded layerId for given dtcId or tfp channel
341  const vector<int>& Setup::encodingLayerId(int dtcId) const {
342  const int index = dtcId % numDTCsPerRegion_;
343  return encodingsLayerId_.at(index);
344  }
345 
346  // check if bField is supported
348  const double bFieldES = magneticField_->inTesla(GlobalPoint(0., 0., 0.)).z();
349  if (abs(bField_ - bFieldES) > bFieldError_) {
350  configurationSupported_ = false;
351  LogWarning("ConfigurationNotSupported")
352  << "Magnetic Field from EventSetup (" << bFieldES << ") differs more then " << bFieldError_
353  << " from supported value (" << bField_ << "). ";
354  }
355  }
356 
357  // check if geometry is supported
359  //FIX ME: Can we assume that geometry used in dd4hep wf supports L1Track?
360  if (!fromDD4hep_) {
361  const vector<string>& geomXMLFiles = pSetGC_->getParameter<vector<string>>(sgXMLLabel_);
362  string version;
363  for (const string& geomXMLFile : geomXMLFiles) {
364  const auto begin = geomXMLFile.find(sgXMLPath_) + sgXMLPath_.size();
365  const auto end = geomXMLFile.find(sgXMLFile_);
366  if (begin != string::npos && end != string::npos)
367  version = geomXMLFile.substr(begin, end - begin - 1);
368  }
369  if (version.empty()) {
370  cms::Exception exception("LogicError");
371  exception << "No " << sgXMLPath_ << "*/" << sgXMLFile_ << " found in GeometryConfiguration";
372  exception.addContext("tt::Setup::checkGeometry");
373  throw exception;
374  }
375  if (find(sgXMLVersions_.begin(), sgXMLVersions_.end(), version) == sgXMLVersions_.end()) {
376  configurationSupported_ = false;
377  LogWarning("ConfigurationNotSupported")
378  << "Geometry Configuration " << sgXMLPath_ << version << "/" << sgXMLFile_ << " is not supported. ";
379  }
380  }
381  }
382 
383  // convert configuration of TTStubAlgorithm
385  numTiltedLayerRings_ = pSetSA_->getParameter<vector<double>>("NTiltedRings");
386  windowSizeBarrelLayers_ = pSetSA_->getParameter<vector<double>>("BarrelCut");
387  const auto& pSetsTiltedLayer = pSetSA_->getParameter<vector<ParameterSet>>("TiltedBarrelCutSet");
388  const auto& pSetsEncapDisks = pSetSA_->getParameter<vector<ParameterSet>>("EndcapCutSet");
389  windowSizeTiltedLayerRings_.reserve(pSetsTiltedLayer.size());
390  for (const auto& pSet : pSetsTiltedLayer)
391  windowSizeTiltedLayerRings_.emplace_back(pSet.getParameter<vector<double>>("TiltedCut"));
392  windowSizeEndcapDisksRings_.reserve(pSetsEncapDisks.size());
393  for (const auto& pSet : pSetsEncapDisks)
394  windowSizeEndcapDisksRings_.emplace_back(pSet.getParameter<vector<double>>("EndcapCut"));
395  maxWindowSize_ = -1;
396  for (const auto& windowss : {windowSizeTiltedLayerRings_, windowSizeEndcapDisksRings_, {windowSizeBarrelLayers_}})
397  for (const auto& windows : windowss)
398  for (const auto& window : windows)
400  }
401 
402  // create bend encodings
403  void Setup::encodeBend(vector<vector<double>>& encodings, bool ps) const {
404  for (int window = 0; window < maxWindowSize_ + 1; window++) {
405  set<double> encoding;
406  for (int bend = 0; bend < window + 1; bend++)
407  encoding.insert(stubAlgorithm_->degradeBend(ps, window, bend));
408  encodings.emplace_back(encoding.begin(), encoding.end());
409  }
410  }
411 
412  // create encodingsLayerId
414  vector<vector<DTCELinkId>> dtcELinkIds(numDTCs_);
415  for (vector<DTCELinkId>& dtcELinkId : dtcELinkIds)
416  dtcELinkId.reserve(numModulesPerDTC_);
417  for (const DTCELinkId& dtcLinkId : cablingMap_->getKnownDTCELinkIds())
418  dtcELinkIds[dtcId(dtcLinkId.dtc_id())].push_back(dtcLinkId);
419  for (int dtcBoard = 0; dtcBoard < numDTCsPerRegion_; dtcBoard++) {
420  set<int> encodingLayerId;
421  for (int region = 0; region < numRegions_; region++) {
422  const int dtcId = region * numDTCsPerRegion_ + dtcBoard;
423  for (const DTCELinkId& dtcLinkId : dtcELinkIds[dtcId]) {
424  const DetId& detId = cablingMap_->dtcELinkIdToDetId(dtcLinkId)->second;
425  const bool barrel = detId.subdetId() == StripSubdetector::TOB;
426  const int layerId =
428  encodingLayerId.insert(layerId);
429  }
430  }
431  // check configuration
432  if ((int)encodingLayerId.size() > hybridNumLayers_) {
433  cms::Exception exception("overflow");
434  exception << "Cabling map connects more than " << hybridNumLayers_ << " layers to a DTC.";
435  exception.addContext("tt::Setup::Setup");
436  throw exception;
437  }
438  encodingsLayerId_.emplace_back(encodingLayerId.begin(), encodingLayerId.end());
439  }
440  }
441 
442  // create sensor modules
444  sensorModules_.reserve(numModules_);
445  dtcModules_ = vector<vector<SensorModule*>>(numDTCs_);
446  for (vector<SensorModule*>& dtcModules : dtcModules_)
447  dtcModules.reserve(numModulesPerDTC_);
448  // loop over all tracker modules
449  for (const DetId& detId : trackerGeometry_->detIds()) {
450  // skip pixel detector
451  if (detId.subdetId() == PixelSubdetector::PixelBarrel || detId.subdetId() == PixelSubdetector::PixelEndcap)
452  continue;
453  // skip multiple detIds per module
454  if (!trackerTopology_->isLower(detId))
455  continue;
456  // lowerDetId - 1 = tk layout det id
457  const DetId detIdTkLayout = detId + offsetDetIdTP_;
458  // tk layout dtc id, lowerDetId - 1 = tk lyout det id
459  const int tklId = cablingMap_->detIdToDTCELinkId(detIdTkLayout).first->second.dtc_id();
460  // track trigger dtc id [0-215]
461  const int dtcId = Setup::dtcId(tklId);
462  // collection of so far connected modules to this dtc
463  vector<SensorModule*>& dtcModules = dtcModules_[dtcId];
464  // construct sendor module
465  sensorModules_.emplace_back(*this, detId, dtcId, dtcModules.size());
467  // store connection between detId and sensor module
468  detIdToSensorModule_.emplace(detId, sensorModule);
469  // store connection between dtcId and sensor module
470  dtcModules.push_back(sensorModule);
471  }
472  for (vector<SensorModule*>& dtcModules : dtcModules_) {
473  dtcModules.shrink_to_fit();
474  // check configuration
475  if ((int)dtcModules.size() > numModulesPerDTC_) {
476  cms::Exception exception("overflow");
477  exception << "Cabling map connects more than " << numModulesPerDTC_ << " modules to a DTC.";
478  exception.addContext("tt::Setup::Setup");
479  throw exception;
480  }
481  }
482  }
483 
484  // derive constants
486  // emp
487  const int numFramesPerBX = freqBE_ / freqLHC_;
488  numFrames_ = numFramesPerBX * tmpTFP_ - 1;
489  numFramesIO_ = numFramesPerBX * tmpTFP_ - numFramesInfra_;
490  numFramesFE_ = numFramesPerBX * tmpFE_ - numFramesInfra_;
491  // common track finding
492  invPtToDphi_ = speedOfLight_ * bField_ / 2000.;
493  baseRegion_ = 2. * M_PI / numRegions_;
494  // gp
496  maxCot_ = sinh(maxEta_);
498  numSectorsEta_ = boundariesEta_.size() - 1;
501  // ht
504  const double rangeQoverPt = 2. * invPtToDphi_ / minPt_;
505  htBaseQoverPt_ = rangeQoverPt / htNumBinsQoverPt_;
507  // tmtt
508  widthLayer_ = ceil(log2(numLayers_));
509  const double baseRgen = htBasePhiT_ / htBaseQoverPt_;
510  const double rangeR = 2. * max(abs(outerRadius_ - chosenRofPhi_), abs(innerRadius_ - chosenRofPhi_));
511  const int baseShiftR = ceil(log2(rangeR / baseRgen / pow(2., widthR_)));
512  baseR_ = baseRgen * pow(2., baseShiftR);
513  const double rangeZ = 2. * halfLength_;
514  const int baseShiftZ = ceil(log2(rangeZ / baseR_ / pow(2., widthZ_)));
515  baseZ_ = baseR_ * pow(2., baseShiftZ);
516  const double rangePhiDTC = baseRegion_ + rangeQoverPt * baseR_ * pow(2., widthR_) / 4.;
517  widthPhiDTC_ = widthPhi_ + ceil(log2(rangePhiDTC / baseRegion_));
518  const int baseShiftPhi = ceil(log2(rangePhiDTC / htBasePhiT_ / pow(2., widthPhiDTC_)));
519  basePhi_ = htBasePhiT_ * pow(2., baseShiftPhi);
520  const double neededRangeChiPhi = 2. * htBasePhiT_;
521  widthChiPhi_ = ceil(log2(neededRangeChiPhi / basePhi_));
522  // hybrid
523  const double hybridRangeQoverPt = 2. * invPtToDphi_ / hybridMinPt_;
524  const double hybridRangeR =
526  const double hybridRangePhi = baseRegion_ + hybridRangeR * hybridRangeQoverPt / 2.;
529  for (int type = 0; type < SensorModule::NumTypes; type++)
530  hybridBasesZ_.emplace_back(hybridRangesZ_.at(type) / pow(2., hybridWidthsZ_.at(type)));
531  hybridBasesR_.reserve(SensorModule::NumTypes);
532  for (int type = 0; type < SensorModule::NumTypes; type++)
533  hybridBasesR_.emplace_back(hybridRangesR_.at(type) / pow(2., hybridWidthsR_.at(type)));
535  hybridBasesPhi_.reserve(SensorModule::NumTypes);
536  for (int type = 0; type < SensorModule::NumTypes; type++)
537  hybridBasesPhi_.emplace_back(hybridRangePhi / pow(2., hybridWidthsPhi_.at(type)));
538  hybridBasesAlpha_.reserve(SensorModule::NumTypes);
539  for (int type = 0; type < SensorModule::NumTypes; type++)
541  hybridNumsUnusedBits_.reserve(SensorModule::NumTypes);
542  for (int type = 0; type < SensorModule::NumTypes; type++)
547  disk2SRs_.reserve(hybridDisk2SRsSet_.size());
548  for (const auto& pSet : hybridDisk2SRsSet_)
549  disk2SRs_.emplace_back(pSet.getParameter<vector<double>>("Disk2SRs"));
550  // dtc
552  numDTCsPerTFP_ = numDTCsPerRegion_ * numOverlappingRegions_;
556  const double maxRangeQoverPt = max(rangeQoverPt, hybridRangeQoverPt);
557  const int baseShiftQoverPt = htWidthQoverPt_ - dtcWidthQoverPt_ + ceil(log2(maxRangeQoverPt / rangeQoverPt));
558  dtcBaseQoverPt_ = htBaseQoverPt_ * pow(2., baseShiftQoverPt);
559  const int baseDiffM = dtcWidthRowLUT_ - widthRow_;
560  dtcBaseM_ = basePhi_ * pow(2., baseDiffM);
561  const double x1 = pow(2, widthRow_) * baseRow_ * maxPitch_ / 2.;
562  const double x0 = x1 - pow(2, dtcWidthRowLUT_) * baseRow_ * maxPitch_;
563  const double maxM = atan2(x1, innerRadius_) - atan2(x0, innerRadius_);
564  dtcWidthM_ = ceil(log2(maxM / dtcBaseM_));
567  // mht
570  mhtWidthPhiT_ = ceil(log2(htNumBinsPhiT_ * mhtNumBinsPhiT_));
573  // SF
576  // DR
579  drBaseCot_ = floor(log2(2. * maxCot_ * pow(2, -drWidthCot_)));
580  drBaseZ0_ = baseZ_ * pow(2, ceil(log2(2. * beamWindowZ_ / baseZ_)) - drWidthZ0_);
581  // KF
587  kfBasem1_ = baseZ_;
588  kfBaseH00_ = baseR_;
589  kfBaseH12_ = baseR_;
593  kfBasev0_ = pow(2, kfBaseShiftv0_) * kfBasex1_ * kfBasex1_;
595  kfBaseS01_ = pow(2, kfBaseShiftS01_) * kfBasex1_ * kfBasex1_;
598  kfBaseR00_ = pow(2, kfBaseShiftR00_) * kfBasex1_ * kfBasex1_;
599  kfBaseInvR00_ = pow(2, kfBaseShiftInvR00_) / kfBasex1_ / kfBasex1_;
602  kfBaseC01_ = pow(2, kfBaseShiftC01_) * kfBasex0_ * kfBasex1_;
603  kfBaseC11_ = pow(2, kfBaseShiftC11_) * kfBasex1_ * kfBasex1_;
606  kfBasev1_ = pow(2, kfBaseShiftv1_) * kfBasex3_ * kfBasex3_;
608  kfBaseS13_ = pow(2, kfBaseShiftS13_) * kfBasex3_ * kfBasex3_;
611  kfBaseR11_ = pow(2, kfBaseShiftR11_) * kfBasex3_ * kfBasex3_;
612  kfBaseInvR11_ = pow(2, kfBaseShiftInvR11_) / kfBasex3_ / kfBasex3_;
615  kfBaseC23_ = pow(2, kfBaseShiftC23_) * kfBasex2_ * kfBasex3_;
616  kfBaseC33_ = pow(2, kfBaseShiftC33_) * kfBasex3_ * kfBasex3_;
617  }
618 
619  // returns bit accurate position of a stub from a given tfp identifier region [0-8] channel [0-47]
620  GlobalPoint Setup::stubPos(bool hybrid, const TTDTC::Frame& frame, int tfpRegion, int tfpChannel) const {
621  GlobalPoint p;
622  if (frame.first.isNull())
623  return p;
624  TTBV bv(frame.second);
625  if (hybrid) {
626  const DetId& detId = frame.first->getDetId();
627  const int dtcId = Setup::dtcId(tfpRegion, tfpChannel);
628  const bool barrel = detId.subdetId() == StripSubdetector::TOB;
629  const bool psModule = Setup::psModule(dtcId);
630  const int layerId =
631  (barrel ? trackerTopology_->layer(detId) : trackerTopology_->tidWheel(detId)) - offsetLayerId_;
632  const bool side = Setup::side(dtcId);
634  if (barrel && psModule)
635  type = SensorModule::BarrelPS;
636  if (barrel && !psModule)
637  type = SensorModule::Barrel2S;
638  if (!barrel && psModule)
639  type = SensorModule::DiskPS;
640  if (!barrel && !psModule)
641  type = SensorModule::Disk2S;
642  const int widthBend = hybridWidthsBend_.at(type);
643  const int widthAlpha = hybridWidthsAlpha_.at(type);
644  const int widthPhi = hybridWidthsPhi_.at(type);
645  const int widthZ = hybridWidthsZ_.at(type);
646  const int widthR = hybridWidthsR_.at(type);
647  const double basePhi = hybridBasesPhi_.at(type);
648  const double baseZ = hybridBasesZ_.at(type);
649  const double baseR = hybridBasesR_.at(type);
650  // parse bit vector
651  bv >>= 1 + hybridWidthLayer_ + widthBend + widthAlpha;
652  double phi = (bv.val(widthPhi, 0, true) + .5) * basePhi;
653  bv >>= widthPhi;
654  double z = (bv.val(widthZ, 0, true) + .5) * baseZ;
655  bv >>= widthZ;
656  double r = (bv.val(widthR, 0, barrel) + .5) * baseR;
657  if (barrel) {
658  r += hybridLayerRs_.at(layerId);
659  } else {
660  z += hybridDiskZs_.at(layerId) * (side ? 1. : -1.);
661  }
662  phi = deltaPhi(phi + tfpRegion * baseRegion_);
663  if (type == SensorModule::Disk2S) {
664  r = bv.val(widthR);
665  r = disk2SRs_.at(layerId).at((int)r);
666  }
667  p = GlobalPoint(GlobalPoint::Cylindrical(r, phi, z));
668  } else {
670  double z = (bv.val(widthZ_, 0, true) + .5) * baseZ_;
671  bv >>= widthZ_;
672  double phi = (bv.val(widthPhiDTC_, 0, true) + .5) * basePhi_;
673  bv >>= widthPhiDTC_;
674  double r = (bv.val(widthR_, 0, true) + .5) * baseR_;
675  bv >>= widthR_;
676  r = r + chosenRofPhi_;
677  phi = deltaPhi(phi + tfpRegion * baseRegion_);
678  p = GlobalPoint(GlobalPoint::Cylindrical(r, phi, z));
679  }
680  return p;
681  }
682 
683  // returns global TTStub position
684  GlobalPoint Setup::stubPos(const TTStubRef& ttStubRef) const {
685  const DetId detId = ttStubRef->getDetId() + offsetDetIdDSV_;
686  const GeomDetUnit* det = trackerGeometry_->idToDetUnit(detId);
687  const PixelTopology* topol =
688  dynamic_cast<const PixelTopology*>(&(dynamic_cast<const PixelGeomDetUnit*>(det)->specificTopology()));
689  const Plane& plane = dynamic_cast<const PixelGeomDetUnit*>(det)->surface();
690  const MeasurementPoint& mp = ttStubRef->clusterRef(0)->findAverageLocalCoordinatesCentered();
691  return plane.toGlobal(topol->localPosition(mp));
692  }
693 
694  // range check of dtc id
695  void Setup::checkDTCId(int dtcId) const {
696  if (dtcId < 0 || dtcId >= numDTCsPerRegion_ * numRegions_) {
697  cms::Exception exception("out_of_range");
698  exception.addContext("trackerDTC::Setup::checkDTCId");
699  exception << "Used DTC Id (" << dtcId << ") "
700  << "is out of range 0 to " << numDTCsPerRegion_ * numRegions_ - 1 << ".";
701  throw exception;
702  }
703  }
704 
705  // range check of tklayout id
706  void Setup::checkTKLayoutId(int tkLayoutId) const {
707  if (tkLayoutId <= 0 || tkLayoutId > numDTCsPerRegion_ * numRegions_) {
708  cms::Exception exception("out_of_range");
709  exception.addContext("trackerDTC::Setup::checkTKLayoutId");
710  exception << "Used TKLayout Id (" << tkLayoutId << ") "
711  << "is out of range 1 to " << numDTCsPerRegion_ * numRegions_ << ".";
712  throw exception;
713  }
714  }
715 
716  // range check of tfp identifier
717  void Setup::checkTFPIdentifier(int tfpRegion, int tfpChannel) const {
718  const bool oorRegion = tfpRegion >= numRegions_ || tfpRegion < 0;
719  const bool oorChannel = tfpChannel >= numDTCsPerTFP_ || tfpChannel < 0;
720  if (oorRegion || oorChannel) {
721  cms::Exception exception("out_of_range");
722  exception.addContext("trackerDTC::Setup::checkTFPIdentifier");
723  if (oorRegion)
724  exception << "Requested Processing Region "
725  << "(" << tfpRegion << ") "
726  << "is out of range 0 to " << numRegions_ - 1 << ".";
727  if (oorChannel)
728  exception << "Requested TFP Channel "
729  << "(" << tfpChannel << ") "
730  << "is out of range 0 to " << numDTCsPerTFP_ - 1 << ".";
731  throw exception;
732  }
733  }
734 
735 } // namespace trackerDTC
Class for &quot;official&quot; algorithm to be used in TTStubBuilder.
int numFramesIO_
Definition: Setup.h:761
int maxWindowSize_
Definition: Setup.h:754
double kfBasex3_
Definition: Setup.h:895
double kfBaser12_
Definition: Setup.h:903
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
double baseWindowSize_
Definition: Setup.h:600
void checkMagneticField()
Definition: Setup.cc:347
constexpr int32_t ceil(float num)
double kfBaseS12_
Definition: Setup.h:907
void encodeLayerId()
Definition: Setup.cc:413
std::vector< std::vector< double > > windowSizeEndcapDisksRings_
Definition: Setup.h:752
int numDTCsPerTFP_
Definition: Setup.h:812
def window
Definition: svgfig.py:643
size_type size() const
int kfBaseShiftS01_
Definition: Setup.h:699
std::vector< int > hybridNumsUnusedBits_
Definition: Setup.h:803
std::string dumpDiff(const edm::ParameterSet &pSetHistory, const edm::ParameterSet &pSetProcess) const
Definition: Setup.cc:263
double maxEta_
Definition: Setup.h:496
int hybridNumLayers_
Definition: Setup.h:517
double dtcBaseQoverPt_
Definition: Setup.h:822
const std::vector< double > & encodingBend(int windowSize, bool psModule) const
Definition: Setup.cc:335
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::string phGeometryConfiguration_
Definition: Setup.h:474
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
double kfBasem0_
Definition: Setup.h:888
std::vector< std::vector< double > > disk2SRs_
Definition: Setup.h:805
double drBaseZ0_
Definition: Setup.h:936
double drBasePhi0_
Definition: Setup.h:934
std::vector< int > hybridWidthsR_
Definition: Setup.h:521
const TrackerTopology * trackerTopology_
Definition: Setup.h:443
int kfBaseShiftChi2_
Definition: Setup.h:721
int kfBaseShiftInvR11_
Definition: Setup.h:716
int kfBaseShiftK31_
Definition: Setup.h:714
int mhtNumBinsPhiT_
Definition: Setup.h:664
bool side(int dtcId) const
Definition: Setup.cc:309
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
Definition: TTBV.h:18
int dtcNumRoutingBlocks_
Definition: Setup.h:617
edm::ParameterSetID pSetIdGeometryConfiguration_
Definition: Setup.h:455
int kfBaseShiftK00_
Definition: Setup.h:700
double chosenRofPhi_
Definition: Setup.h:498
std::string dump(unsigned int indent=0) const
static PFTauRenderPlugin instance
int kfBaseShiftr0_
Definition: Setup.h:695
std::vector< edm::ParameterSet > hybridDisk2SRsSet_
Definition: Setup.h:541
double hybridChosenRofPhi_
Definition: Setup.h:515
int kfBaseShiftR11_
Definition: Setup.h:715
double maxCot_
Definition: Setup.h:847
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
int tkLayoutId(int dtcId) const
Definition: Setup.cc:284
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
double innerRadius_
Definition: Setup.h:579
double baseZ_
Definition: Setup.h:776
std::vector< int > hybridWidthsZ_
Definition: Setup.h:523
double kfBaseChi2_
Definition: Setup.h:929
std::vector< double > boundariesEta_
Definition: Setup.h:646
float degradeBend(bool psModule, int window, int bend) const
double baseR() const
Definition: Setup.h:132
double hybridMaxEta_
Definition: Setup.h:513
void checkGeometry()
Definition: Setup.cc:358
ParameterSet const & getParameterSet(ParameterSetID const &id)
std::vector< double > hybridLayerRs_
Definition: Setup.h:537
int kfBaseShiftC00_
Definition: Setup.h:705
int widthPhiDTC_
Definition: Setup.h:826
int kfBaseShiftC11_
Definition: Setup.h:707
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< std::vector< SensorModule * > > dtcModules_
Definition: Setup.h:836
int kfBaseShiftr12_
Definition: Setup.h:709
std::vector< double > hybridDiskZs_
Definition: Setup.h:539
int offsetDetIdDSV_
Definition: Setup.h:625
bool exists(std::string const &parameterName) const
checks if a parameter exists
int kfBaseShiftC23_
Definition: Setup.h:719
std::string phTTStubAlgorithm_
Definition: Setup.h:476
int numDTCsPerRegion_
Definition: Setup.h:613
bool fromDD4hep_
Definition: Setup.h:458
tuple magneticField
int dtcNumUnusedBits_
Definition: Setup.h:780
unsigned int tidWheel(const DetId &id) const
double invPtToDphi_
Definition: Setup.h:765
std::unordered_map< DTCELinkId, uint32_t >::const_iterator dtcELinkIdToDetId(DTCELinkId const &) const
Resolves the raw DetId of the detector connected to the eLink identified by a DTCELinkId.
double sfBaseZT_
Definition: Setup.h:884
std::unordered_map< DetId, SensorModule * > detIdToSensorModule_
Definition: Setup.h:838
int sfBaseDiffZ_
Definition: Setup.h:675
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
double freqLHC_
Definition: Setup.h:563
void encodeBend(std::vector< std::vector< double >> &, bool) const
Definition: Setup.cc:403
std::vector< double > hybridRangesAlpha_
Definition: Setup.h:535
std::vector< DTCELinkId > getKnownDTCELinkIds() const
Returns a vector containing all elink DTCELinkId nown to the map.
std::vector< int > hybridWidthsPhi_
Definition: Setup.h:525
int offsetLayerDisks_
Definition: Setup.h:629
Definition: Plane.h:16
int kfBaseShiftS00_
Definition: Setup.h:698
double baseRow_
Definition: Setup.h:598
const StubAlgorithmOfficial * stubAlgorithm_
Definition: Setup.h:447
const TrackerDetToDTCELinkCablingMap * cablingMap_
Definition: Setup.h:445
int kfBaseShiftv0_
Definition: Setup.h:697
double deltaPhi(double lhs, double rhs=0.)
Definition: Setup.h:35
GlobalPoint stubPos(bool hybrid, const TTDTC::Frame &frame, int tfpRegion, int tfpChannel) const
Definition: Setup.cc:620
double maxZT_
Definition: Setup.h:845
int numSectorsEta_
Definition: Setup.h:638
double dtcBaseM_
Definition: Setup.h:824
double maxPitch_
Definition: Setup.h:583
bool isLower(const DetId &id) const
double minPt_
Definition: Setup.h:494
int mhtWidthQoverPt_
Definition: Setup.h:871
char const * label
double kfBaser0_
Definition: Setup.h:900
int numATCASlots_
Definition: Setup.h:611
double freqBE_
Definition: Setup.h:565
int kfBaseShiftS13_
Definition: Setup.h:712
std::vector< std::string > sgXMLVersions_
Definition: Setup.h:469
double drBaseQoverPt_
Definition: Setup.h:933
int slot(int dtcId) const
Definition: Setup.cc:317
int htNumBinsPhiT_
Definition: Setup.h:653
double kfBasev0_
Definition: Setup.h:890
int kfBaseShiftv1_
Definition: Setup.h:710
int htWidthPhiT_
Definition: Setup.h:858
int kfBaseShiftr1_
Definition: Setup.h:708
int drWidthPhi0_
Definition: Setup.h:728
int val() const
Definition: TTBV.h:217
std::vector< std::vector< double > > encodingsBendPS_
Definition: Setup.h:828
T z() const
Definition: PV3DBase.h:61
int dtcWidthRowLUT_
Definition: Setup.h:621
double basePhi_
Definition: Setup.h:778
int mhtNumCells_
Definition: Setup.h:869
const std::vector< int > & encodingLayerId(int tfpChannel) const
Definition: Setup.cc:341
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
double kfBaseC33_
Definition: Setup.h:926
int widthBend() const
Definition: Setup.h:203
double kfBaseR00_
Definition: Setup.h:909
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int kfBaseShiftC22_
Definition: Setup.h:718
int dtcWidthQoverPt_
Definition: Setup.h:623
void checkTFPIdentifier(int tfpRegion, int tfpChannel) const
Definition: Setup.cc:717
double outerRadius_
Definition: Setup.h:577
bool getMapped(key_type const &k, value_type &result) const
Definition: Registry.cc:17
double mhtBaseQoverPt_
Definition: Setup.h:875
int numSectorsPhi_
Definition: Setup.h:636
void checkTKLayoutId(int tkLayoutId) const
Definition: Setup.cc:706
int numOverlappingRegions_
Definition: Setup.h:609
const edm::ParameterSet * pSetGC_
Definition: Setup.h:451
double kfBaseC11_
Definition: Setup.h:921
double kfBaseChi20_
Definition: Setup.h:927
double kfBaseS13_
Definition: Setup.h:908
int widthChiPhi_
Definition: Setup.h:860
static constexpr auto TOB
double bField_
Definition: Setup.h:573
double kfBaseC23_
Definition: Setup.h:925
std::vector< int > hybridWidthsAlpha_
Definition: Setup.h:527
int kfBaseShiftK10_
Definition: Setup.h:701
double kfBasex0_
Definition: Setup.h:892
int mhtNumBinsQoverPt_
Definition: Setup.h:662
double drBaseCot_
Definition: Setup.h:935
chosenRofZ_(50.0)
std::string sgXMLLabel_
Definition: Setup.h:463
double kfBasex1_
Definition: Setup.h:893
const MagneticField * magneticField_
Definition: Setup.h:439
std::vector< double > hybridBasesAlpha_
Definition: Setup.h:793
int dtcId(int tklId) const
Definition: Setup.cc:274
static constexpr int S
Definition: TTBV.h:20
#define M_PI
void consumeStubAlgorithm()
Definition: Setup.cc:384
bool configurationSupported_
Definition: Setup.h:741
int kfBaseShiftC01_
Definition: Setup.h:706
int numFramesInfra_
Definition: Setup.h:561
int kfBaseShiftChi21_
Definition: Setup.h:717
std::string sgXMLFile_
Definition: Setup.h:467
double kfBaseS00_
Definition: Setup.h:904
int sfPowerBaseCot_
Definition: Setup.h:673
std::vector< int > hybridWidthsBend_
Definition: Setup.h:529
Definition: DetId.h:17
double kfBaseH00_
Definition: Setup.h:897
std::vector< double > hybridBasesZ_
Definition: Setup.h:791
std::pair< TTStubRef, BV > Frame
Definition: TTDTC.h:22
int dtcNumMergedRows_
Definition: Setup.h:818
double kfBaser02_
Definition: Setup.h:902
std::vector< double > hybridRangesR_
Definition: Setup.h:531
std::vector< SensorModule > sensorModules_
Definition: Setup.h:834
int kfBaseShiftInvR00_
Definition: Setup.h:703
double neededRangeChiZ_
Definition: Setup.h:642
ParameterSet const & getParameterSet(std::string const &) const
bool psModule(int dtcId) const
Definition: Setup.cc:302
SensorModule * sensorModule(const DetId &detId) const
Definition: Setup.cc:323
int kfBaseShiftK21_
Definition: Setup.h:713
int kfBaseShiftR00_
Definition: Setup.h:702
double basePhi() const
Definition: Setup.h:136
void produceSensorModules()
Definition: Setup.cc:443
std::vector< std::vector< int > > encodingsLayerId_
Definition: Setup.h:832
double baseR_
Definition: Setup.h:774
int widthSectorEta_
Definition: Setup.h:849
double hybridMaxCot_
Definition: Setup.h:801
double chosenRofZ_
Definition: Setup.h:640
int kfBaseShiftS12_
Definition: Setup.h:711
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double kfBaseR11_
Definition: Setup.h:910
double baseSector_
Definition: Setup.h:843
std::vector< double > hybridBasesPhi_
Definition: Setup.h:789
double kfBasex2_
Definition: Setup.h:894
void addContext(std::string const &context)
Definition: Exception.cc:165
std::pair< std::unordered_multimap< uint32_t, DTCELinkId >::const_iterator, std::unordered_multimap< uint32_t, DTCELinkId >::const_iterator > detIdToDTCELinkId(uint32_t const) const
Resolves one or more DTCELinkId of eLinks which are connected to the detector identified by the given...
double mhtBasePhiT_
Definition: Setup.h:877
double kfBaseK21_
Definition: Setup.h:915
std::vector< double > windowSizeBarrelLayers_
Definition: Setup.h:748
double kfBaser1_
Definition: Setup.h:901
int htWidthQoverPt_
Definition: Setup.h:856
std::vector< double > numTiltedLayerRings_
Definition: Setup.h:746
void checkDTCId(int dtcId) const
Definition: Setup.cc:695
double kfBaseK31_
Definition: Setup.h:916
double kfBaseK10_
Definition: Setup.h:914
unsigned int layer(const DetId &id) const
deadvectors[0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
double hybridMinPt_
Definition: Setup.h:511
std::vector< double > hybridBasesR_
Definition: Setup.h:787
int widthR() const
Definition: Setup.h:124
int offsetLayerId_
Definition: Setup.h:631
std::vector< std::vector< double > > windowSizeTiltedLayerRings_
Definition: Setup.h:750
std::string sgXMLPath_
Definition: Setup.h:465
double kfBaseInvR11_
Definition: Setup.h:912
std::vector< std::vector< double > > encodingsBend2S_
Definition: Setup.h:830
double htBasePhiT_
Definition: Setup.h:864
double sfBaseCot_
Definition: Setup.h:882
int kfBaseShiftr02_
Definition: Setup.h:696
const edm::ParameterSet * pSetSA_
Definition: Setup.h:449
string end
Definition: dataset.py:937
int kfBaseShiftC33_
Definition: Setup.h:720
double baseZ() const
Definition: Setup.h:134
double baseRegion_
Definition: Setup.h:767
std::vector< double > hybridRangesZ_
Definition: Setup.h:533
int widthPhi() const
Definition: Setup.h:126
double kfBaseS01_
Definition: Setup.h:905
double kfBaseChi21_
Definition: Setup.h:928
int offsetDetIdTP_
Definition: Setup.h:627
int numFramesFE_
Definition: Setup.h:763
const std::vector< SensorModule * > & dtcModules(int dtcId) const
Definition: Setup.h:262
edm::ParameterSetID pSetIdTTStubAlgorithm_
Definition: Setup.h:453
int mhtWidthPhiT_
Definition: Setup.h:873
double kfBaseH12_
Definition: Setup.h:899
double kfBasem1_
Definition: Setup.h:889
int dtcNumModulesPerRoutingBlock_
Definition: Setup.h:816
double kfBaseC00_
Definition: Setup.h:918
Log< level::Warning, false > LogWarning
double kfBaseK00_
Definition: Setup.h:913
double kfBaseC01_
Definition: Setup.h:919
int drWidthQoverPt_
Definition: Setup.h:730
double kfBaseC22_
Definition: Setup.h:924
double beamWindowZ_
Definition: Setup.h:481
double speedOfLight_
Definition: Setup.h:571
double halfLength_
Definition: Setup.h:581
int kfBaseShiftChi20_
Definition: Setup.h:704
double kfBaseInvR00_
Definition: Setup.h:911
void checkHistory(const edm::ProcessHistory &processHistory) const
Definition: Setup.cc:222
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
double kfBasev1_
Definition: Setup.h:891
int numModulesPerDTC_
Definition: Setup.h:615
void calculateConstants()
Definition: Setup.cc:485
double bFieldError_
Definition: Setup.h:575
int hybridWidthLayer_
Definition: Setup.h:785
const TrackerGeometry * trackerGeometry_
Definition: Setup.h:441
int widthZ() const
Definition: Setup.h:128
double htBaseQoverPt_
Definition: Setup.h:862
int htNumBinsQoverPt_
Definition: Setup.h:651