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