CMS 3D CMS Logo

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 
19  Setup::Setup(const ParameterSet& iConfig,
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 {
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_;
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;
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)));
527  for (int type = 0; type < SensorModule::NumTypes; type++)
528  hybridBasesR_.emplace_back(hybridRangesR_.at(type) / pow(2., hybridWidthsR_.at(type)));
531  for (int type = 0; type < SensorModule::NumTypes; type++)
532  hybridBasesPhi_.emplace_back(hybridRangePhi / pow(2., hybridWidthsPhi_.at(type)));
534  for (int type = 0; type < SensorModule::NumTypes; type++)
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
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
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_;
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 =
627  const bool side = Setup::side(dtcId);
629  if (barrel && psModule)
631  if (barrel && !psModule)
633  if (!barrel && psModule)
635  if (!barrel && !psModule)
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  }
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_);
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
trackerDTC::Setup::hybridWidthsR_
std::vector< int > hybridWidthsR_
Definition: Setup.h:517
trackerDTC::Setup::kfBaseShiftChi2_
int kfBaseShiftChi2_
Definition: Setup.h:717
trackerDTC::Setup::dtcModules
const std::vector< SensorModule * > & dtcModules(int dtcId) const
Definition: Setup.h:261
trackerDTC::Setup::kfBaseC01_
double kfBaseC01_
Definition: Setup.h:915
trackerDTC::Setup::kfBaseShiftS12_
int kfBaseShiftS12_
Definition: Setup.h:707
Point2DBase
Definition: Point2DBase.h:9
trackerDTC::Setup::encodingsLayerId_
std::vector< std::vector< int > > encodingsLayerId_
Definition: Setup.h:828
trackerDTC::Setup::widthZ_
int widthZ_
Definition: Setup.h:502
trackerDTC::Setup::dtcNumRoutingBlocks_
int dtcNumRoutingBlocks_
Definition: Setup.h:613
trackerDTC::Setup::dtcBaseM_
double dtcBaseM_
Definition: Setup.h:820
trackerDTC::SensorModule::NumTypes
Definition: SensorModule.h:16
trackerDTC::Setup::hybridMaxCot_
double hybridMaxCot_
Definition: Setup.h:797
trackerDTC::SensorModule::BarrelPS
Definition: SensorModule.h:16
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
trackerDTC::Setup::windowSizeBarrelLayers_
std::vector< double > windowSizeBarrelLayers_
Definition: Setup.h:744
TrackerDetToDTCELinkCablingMap
Definition: TrackerDetToDTCELinkCablingMap.h:29
trackerDTC::Setup::numLayers_
int numLayers_
Definition: Setup.h:496
trackerDTC::Setup::kfBaseChi20_
double kfBaseChi20_
Definition: Setup.h:923
trackerDTC::Setup::kfBaseS13_
double kfBaseS13_
Definition: Setup.h:904
trackerDTC::Setup::mhtWidthQoverPt_
int mhtWidthQoverPt_
Definition: Setup.h:867
trackerDTC::Setup::kfBaseK10_
double kfBaseK10_
Definition: Setup.h:910
trackerDTC::Setup::kfBasex2_
double kfBasex2_
Definition: Setup.h:890
PixelSubdetector.h
cmsPseudoTrapShapesXML_cfi.geomXMLFiles
geomXMLFiles
Definition: cmsPseudoTrapShapesXML_cfi.py:4
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
trackerDTC::Setup::kfBasex0_
double kfBasex0_
Definition: Setup.h:888
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
trackerDTC::SensorModule
Definition: SensorModule.h:11
trackerDTC::Setup::baseR
double baseR() const
Definition: Setup.h:131
DTCELinkId
Definition: DTCELinkId.h:28
GeomDet
Definition: GeomDet.h:27
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
TTBV::val
int val() const
Definition: TTBV.h:217
trackerDTC::Setup::drBaseCot_
double drBaseCot_
Definition: Setup.h:931
trackerDTC::Setup::baseZ_
double baseZ_
Definition: Setup.h:772
trackerDTC::Setup::tmpTFP_
int tmpTFP_
Definition: Setup.h:565
TrackerTopology::isLower
bool isLower(const DetId &id) const
Definition: TrackerTopology.cc:195
trackerDTC::Setup::configurationSupported_
bool configurationSupported_
Definition: Setup.h:737
trackerDTC::Setup::htWidthPhiT_
int htWidthPhiT_
Definition: Setup.h:854
trackerDTC::Setup::widthPhi
int widthPhi() const
Definition: Setup.h:125
trackerDTC::Setup::numFramesIO_
int numFramesIO_
Definition: Setup.h:757
trackerDTC::Setup::sgXMLVersions_
std::vector< std::string > sgXMLVersions_
Definition: Setup.h:465
trackerDTC::Setup::encodingBend
const std::vector< double > & encodingBend(int windowSize, bool psModule) const
Definition: Setup.cc:333
trackerDTC::Setup::sgXMLFile_
std::string sgXMLFile_
Definition: Setup.h:463
trackerDTC::Setup::sfBaseZT_
double sfBaseZT_
Definition: Setup.h:880
trackerDTC::Setup::baseZ
double baseZ() const
Definition: Setup.h:133
trackerDTC::Setup::checkMagneticField
void checkMagneticField()
Definition: Setup.cc:345
trackerDTC::Setup::hybridBasesZ_
std::vector< double > hybridBasesZ_
Definition: Setup.h:787
trackerDTC::Setup::hybridNumsUnusedBits_
std::vector< int > hybridNumsUnusedBits_
Definition: Setup.h:799
trackerDTC::Setup::dumpDiff
std::string dumpDiff(const edm::ParameterSet &pSetHistory, const edm::ParameterSet &pSetProcess) const
Definition: Setup.cc:261
edm
HLT enums.
Definition: AlignableModifier.h:19
trackerDTC::Setup::numFramesInfra_
int numFramesInfra_
Definition: Setup.h:557
trackerDTC::Setup::kfBaseShiftr02_
int kfBaseShiftr02_
Definition: Setup.h:692
TrackerTopology
Definition: TrackerTopology.h:16
trackerDTC::Setup::dtcBaseQoverPt_
double dtcBaseQoverPt_
Definition: Setup.h:818
trackerDTC::Setup::pSetSA_
const edm::ParameterSet * pSetSA_
Definition: Setup.h:448
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
trackerDTC::Setup::windowSizeEndcapDisksRings_
std::vector< std::vector< double > > windowSizeEndcapDisksRings_
Definition: Setup.h:748
trackerDTC::Setup::phTTStubAlgorithm_
std::string phTTStubAlgorithm_
Definition: Setup.h:472
trackerDTC::Setup::kfBaseShiftr1_
int kfBaseShiftr1_
Definition: Setup.h:704
TTBV::S
static constexpr int S
Definition: TTBV.h:20
trackerDTC::Setup::side
bool side(int dtcId) const
Definition: Setup.cc:307
trackerDTC::Setup::offsetLayerDisks_
int offsetLayerDisks_
Definition: Setup.h:625
trackerDTC::Setup::widthPhi_
int widthPhi_
Definition: Setup.h:500
trackerDTC::Setup::numFrames_
int numFrames_
Definition: Setup.h:755
trackerDTC::Setup::mhtNumCells_
int mhtNumCells_
Definition: Setup.h:865
svgfig.window
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
trackerDTC::Setup::widthSectorEta_
int widthSectorEta_
Definition: Setup.h:845
bmtfDigis_cfi.Setup
Setup
Definition: bmtfDigis_cfi.py:5
trackerDTC::Setup::chosenRofPhi_
double chosenRofPhi_
Definition: Setup.h:494
trackerDTC::Setup::numDTCs_
int numDTCs_
Definition: Setup.h:806
trackerDTC::Setup::kfBaseShiftK21_
int kfBaseShiftK21_
Definition: Setup.h:709
trackerDTC::Setup::kfBaseShiftR00_
int kfBaseShiftR00_
Definition: Setup.h:698
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
TTStubAlgorithm_official::degradeBend
float degradeBend(bool psModule, int window, int bend) const
trackerDTC::Setup::numRegions_
int numRegions_
Definition: Setup.h:603
trackerDTC::Setup::sfBaseDiffZ_
int sfBaseDiffZ_
Definition: Setup.h:671
trackerDTC::Setup::kfBaseShiftC22_
int kfBaseShiftC22_
Definition: Setup.h:714
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
trackerDTC::Setup::drWidthCot_
int drWidthCot_
Definition: Setup.h:728
trackerDTC::Setup::mhtBaseQoverPt_
double mhtBaseQoverPt_
Definition: Setup.h:871
trackerDTC::Setup::checkTFPIdentifier
void checkTFPIdentifier(int tfpRegion, int tfpChannel) const
Definition: Setup.cc:712
trackerDTC::Setup::drWidthZ0_
int drWidthZ0_
Definition: Setup.h:730
trackerDTC::Setup::bField_
double bField_
Definition: Setup.h:569
trackerDTC::Setup::disk2SRs_
std::vector< std::vector< double > > disk2SRs_
Definition: Setup.h:801
trackerDTC::Setup::kfBaseInvR00_
double kfBaseInvR00_
Definition: Setup.h:907
trackerDTC::Setup::checkDTCId
void checkDTCId(int dtcId) const
Definition: Setup.cc:690
trackerDTC::Setup::kfBaseShiftK00_
int kfBaseShiftK00_
Definition: Setup.h:696
HLT_FULL_cff.magneticField
magneticField
Definition: HLT_FULL_cff.py:348
trackerDTC::Setup::numOverlappingRegions_
int numOverlappingRegions_
Definition: Setup.h:605
TTStubAlgorithm_official
Class for "official" algorithm to be used in TTStubBuilder.
Definition: TTStubAlgorithm_official.h:37
trackerDTC::Setup::kfBaseShiftK31_
int kfBaseShiftK31_
Definition: Setup.h:710
trackerDTC::Setup::numATCASlots_
int numATCASlots_
Definition: Setup.h:607
trackerDTC::Setup::mhtNumBinsPhiT_
int mhtNumBinsPhiT_
Definition: Setup.h:660
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
trackerDTC::Setup::calculateConstants
void calculateConstants()
Definition: Setup.cc:480
trackerDTC::Setup::kfBaseK31_
double kfBaseK31_
Definition: Setup.h:912
trackerDTC::Setup::hybridBasesAlpha_
std::vector< double > hybridBasesAlpha_
Definition: Setup.h:789
TrackerDetToDTCELinkCablingMap::getKnownDTCELinkIds
std::vector< DTCELinkId > getKnownDTCELinkIds() const
Returns a vector containing all elink DTCELinkId nown to the map.
Definition: TrackerDetToDTCELinkCablingMap.cc:48
trackerDTC::SensorModule::Type
Type
Definition: SensorModule.h:16
trackerDTC::Setup::innerRadius_
double innerRadius_
Definition: Setup.h:575
trackerDTC::Setup::freqBE_
double freqBE_
Definition: Setup.h:561
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
trackerDTC::Setup::htNumBinsQoverPt_
int htNumBinsQoverPt_
Definition: Setup.h:647
trackerDTC::Setup::kfBaseShiftC01_
int kfBaseShiftC01_
Definition: Setup.h:702
trackerDTC::Setup::maxPitch_
double maxPitch_
Definition: Setup.h:579
trackerDTC::Setup::hybridLayerRs_
std::vector< double > hybridLayerRs_
Definition: Setup.h:533
edm::Ref< TTStubDetSetVec, TTStub< Ref_Phase2TrackerDigi_ > >
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
trackerDTC::Setup::htBasePhiT_
double htBasePhiT_
Definition: Setup.h:860
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
trackerDTC::Setup::tkLayoutId
int tkLayoutId(int dtcId) const
Definition: Setup.cc:282
trackerDTC::Setup::kfBaseShiftC11_
int kfBaseShiftC11_
Definition: Setup.h:703
trackerDTC::Setup::offsetDetIdDSV_
int offsetDetIdDSV_
Definition: Setup.h:621
trackerDTC::Setup::offsetDetIdTP_
int offsetDetIdTP_
Definition: Setup.h:623
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
DetId
Definition: DetId.h:17
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
trackerDTC::Setup::kfBaseShiftC33_
int kfBaseShiftC33_
Definition: Setup.h:716
TrackerDetToDTCELinkCablingMap::detIdToDTCELinkId
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...
Definition: TrackerDetToDTCELinkCablingMap.cc:27
trackerDTC::Setup::hybridRangesR_
std::vector< double > hybridRangesR_
Definition: Setup.h:527
trackerDTC::Setup::neededRangeChiZ_
double neededRangeChiZ_
Definition: Setup.h:638
trackerDTC::Setup::slot
int slot(int dtcId) const
Definition: Setup.cc:315
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
trackerDTC::Setup::kfBaseShiftS01_
int kfBaseShiftS01_
Definition: Setup.h:695
ProcessConfiguration.h
trackerDTC::Setup::sensorModule
SensorModule * sensorModule(const DetId &detId) const
Definition: Setup.cc:321
trackerDTC::Setup::checkHistory
void checkHistory(const edm::ProcessHistory &processHistory) const
Definition: Setup.cc:220
trackerDTC::Setup::kfBasem1_
double kfBasem1_
Definition: Setup.h:885
trackerDTC::Setup::dtcWidthQoverPt_
int dtcWidthQoverPt_
Definition: Setup.h:619
trackerDTC::Setup::hybridNumLayers_
int hybridNumLayers_
Definition: Setup.h:513
trackerDTC::Setup::beamWindowZ_
double beamWindowZ_
Definition: Setup.h:477
edm::ParameterSet::dump
std::string dump(unsigned int indent=0) const
Definition: ParameterSet.cc:832
Geom::Cylindrical2Cartesian
Definition: CoordinateSets.h:34
trackerDTC::Setup::freqLHC_
double freqLHC_
Definition: Setup.h:559
mps_fire.end
end
Definition: mps_fire.py:242
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
trackerDTC::Setup::kfBaseShiftInvR11_
int kfBaseShiftInvR11_
Definition: Setup.h:712
trackerDTC::Setup::widthChiPhi_
int widthChiPhi_
Definition: Setup.h:856
trackerDTC::Setup::kfBasev1_
double kfBasev1_
Definition: Setup.h:887
trackerDTC::Setup::numTiltedLayerRings_
std::vector< double > numTiltedLayerRings_
Definition: Setup.h:742
edm::Hash< ParameterSetType >
trackerDTC::Setup::cablingMap_
const TrackerDetToDTCELinkCablingMap * cablingMap_
Definition: Setup.h:444
trackerDTC::Setup::maxZT_
double maxZT_
Definition: Setup.h:841
trackerDTC::Setup::kfBasex1_
double kfBasex1_
Definition: Setup.h:889
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
trackerDTC::Setup::widthBend
int widthBend() const
Definition: Setup.h:202
trackerDTC::SensorModule::DiskPS
Definition: SensorModule.h:16
Point3DBase< float, GlobalTag >
trackerDTC::Setup::numModules_
int numModules_
Definition: Setup.h:810
PixelTopology
Definition: PixelTopology.h:10
trackerDTC::Setup::hybridWidthsZ_
std::vector< int > hybridWidthsZ_
Definition: Setup.h:519
trackerDTC::SensorModule::Disk2S
Definition: SensorModule.h:16
trackerDTC::Setup::kfBaseInvR11_
double kfBaseInvR11_
Definition: Setup.h:908
trackerDTC::Setup::drBaseQoverPt_
double drBaseQoverPt_
Definition: Setup.h:929
trackerDTC::Setup::widthChiZ_
int widthChiZ_
Definition: Setup.h:847
trackerDTC::Setup::widthLayer_
int widthLayer_
Definition: Setup.h:768
trackerDTC::Setup::sfBaseCot_
double sfBaseCot_
Definition: Setup.h:878
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
trackerDTC::Setup::dtcId
int dtcId(int tklId) const
Definition: Setup.cc:272
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trackerDTC::Setup::hybridMaxEta_
double hybridMaxEta_
Definition: Setup.h:509
edm::ProcessHistory::size
size_type size() const
Definition: ProcessHistory.h:52
trackerDTC::Setup::kfBaseH00_
double kfBaseH00_
Definition: Setup.h:893
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
trackerDTC::Setup::kfBasex3_
double kfBasex3_
Definition: Setup.h:891
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
trackerDTC::Setup::kfBaseS01_
double kfBaseS01_
Definition: Setup.h:901
trackerDTC::Setup::magneticField_
const MagneticField * magneticField_
Definition: Setup.h:438
trackerDTC::Setup::encodeLayerId
void encodeLayerId()
Definition: Setup.cc:408
trackerDTC::Setup::hybridWidthsBend_
std::vector< int > hybridWidthsBend_
Definition: Setup.h:525
trackerDTC::Setup::kfBaseShiftr12_
int kfBaseShiftr12_
Definition: Setup.h:705
trackerDTC::Setup::dtcNumMergedRows_
int dtcNumMergedRows_
Definition: Setup.h:814
trackerDTC::Setup::kfBaseS12_
double kfBaseS12_
Definition: Setup.h:903
edm::ParameterSet
Definition: ParameterSet.h:47
TrackerDetToDTCELinkCablingMap::dtcELinkIdToDetId
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.
Definition: TrackerDetToDTCELinkCablingMap.cc:12
trackerDTC::Setup::invPtToDphi_
double invPtToDphi_
Definition: Setup.h:761
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:39
trackerDTC::Setup::numFramesFE_
int numFramesFE_
Definition: Setup.h:759
trackerDTC::Setup::kfBaseShiftChi21_
int kfBaseShiftChi21_
Definition: Setup.h:713
trackerDTC::Setup::pSetIdTTStubAlgorithm_
edm::ParameterSetID pSetIdTTStubAlgorithm_
Definition: Setup.h:452
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
trackerDTC::Setup::kfBaseH12_
double kfBaseH12_
Definition: Setup.h:895
trackerDTC::Setup::dtcNumModulesPerRoutingBlock_
int dtcNumModulesPerRoutingBlock_
Definition: Setup.h:812
trackerDTC::Setup::kfBaseShiftInvR00_
int kfBaseShiftInvR00_
Definition: Setup.h:699
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
trackerDTC::Setup::kfBaseC33_
double kfBaseC33_
Definition: Setup.h:922
trackerDTC::Setup::kfBaseR00_
double kfBaseR00_
Definition: Setup.h:905
trackerDTC::Setup::maxEta_
double maxEta_
Definition: Setup.h:492
trackerDTC::Setup::chosenRofZ_
double chosenRofZ_
Definition: Setup.h:636
trackerDTC::Setup::widthR
int widthR() const
Definition: Setup.h:123
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
trackerDTC::Setup::trackerTopology_
const TrackerTopology * trackerTopology_
Definition: Setup.h:442
trackerDTC::Setup::encodingsBendPS_
std::vector< std::vector< double > > encodingsBendPS_
Definition: Setup.h:824
trackerDTC::Setup::basePhi_
double basePhi_
Definition: Setup.h:774
trackerDTC::Setup::drWidthQoverPt_
int drWidthQoverPt_
Definition: Setup.h:726
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:84949
createfilelist.int
int
Definition: createfilelist.py:10
trackerDTC::Setup::baseRow_
double baseRow_
Definition: Setup.h:594
trackerDTC::Setup::kfBaseC22_
double kfBaseC22_
Definition: Setup.h:920
trackerDTC::Setup::dtcWidthRowLUT_
int dtcWidthRowLUT_
Definition: Setup.h:617
trackerDTC::Setup::pSetGC_
const edm::ParameterSet * pSetGC_
Definition: Setup.h:450
trackerDTC::Setup::htWidthQoverPt_
int htWidthQoverPt_
Definition: Setup.h:852
trackerDTC::Setup::kfBaseShiftR11_
int kfBaseShiftR11_
Definition: Setup.h:711
trackerDTC::Setup::kfBaseC23_
double kfBaseC23_
Definition: Setup.h:921
trackerDTC::Setup::stubAlgorithm_
const StubAlgorithmOfficial * stubAlgorithm_
Definition: Setup.h:446
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trackerDTC::Setup::widthZ
int widthZ() const
Definition: Setup.h:127
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
trackerDTC::Setup::drBaseZ0_
double drBaseZ0_
Definition: Setup.h:932
trackerDTC::Setup::hybridBasesR_
std::vector< double > hybridBasesR_
Definition: Setup.h:783
trackerDTC::Setup::encodeBend
void encodeBend(std::vector< std::vector< double >> &, bool) const
Definition: Setup.cc:398
trackerDTC::Setup::basePhi
double basePhi() const
Definition: Setup.h:135
trackerDTC::Setup::tmpFE_
int tmpFE_
Definition: Setup.h:563
trackerDTC::Setup::bFieldError_
double bFieldError_
Definition: Setup.h:571
TTBV
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
Definition: TTBV.h:18
trackerDTC::Setup::outerRadius_
double outerRadius_
Definition: Setup.h:573
trackerDTC::Setup::maxCot_
double maxCot_
Definition: Setup.h:843
trackerDTC::Setup::windowSizeTiltedLayerRings_
std::vector< std::vector< double > > windowSizeTiltedLayerRings_
Definition: Setup.h:746
trackerDTC::Setup::pSetIdGeometryConfiguration_
edm::ParameterSetID pSetIdGeometryConfiguration_
Definition: Setup.h:454
trackerDTC::Setup::kfBaseShiftr0_
int kfBaseShiftr0_
Definition: Setup.h:691
trackerDTC::Setup::hybridWidthLayer_
int hybridWidthLayer_
Definition: Setup.h:781
trackerDTC
Definition: DTC.h:10
trackerDTC::Setup::hybridWidthsAlpha_
std::vector< int > hybridWidthsAlpha_
Definition: Setup.h:523
trackerDTC::Setup::kfBaseK21_
double kfBaseK21_
Definition: Setup.h:911
trackerDTC::Setup::numSectorsPhi_
int numSectorsPhi_
Definition: Setup.h:632
trackerDTC::Setup::widthR_
int widthR_
Definition: Setup.h:498
trackerDTC::Setup::checkGeometry
void checkGeometry()
Definition: Setup.cc:356
trackerDTC::Setup::dtcModules_
std::vector< std::vector< SensorModule * > > dtcModules_
Definition: Setup.h:832
trackerDTC::Setup::maxWindowSize_
int maxWindowSize_
Definition: Setup.h:750
trackerDTC::Setup::baseWindowSize_
double baseWindowSize_
Definition: Setup.h:596
trackerDTC::Setup::kfBaser0_
double kfBaser0_
Definition: Setup.h:896
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
trackerDTC::Setup::kfBaser12_
double kfBaser12_
Definition: Setup.h:899
trackerDTC::Setup::mhtNumBinsQoverPt_
int mhtNumBinsQoverPt_
Definition: Setup.h:658
trackerDTC::Setup::sfPowerBaseCot_
int sfPowerBaseCot_
Definition: Setup.h:669
alignCSCRings.r
r
Definition: alignCSCRings.py:93
trackerDTC::Setup::offsetLayerId_
int offsetLayerId_
Definition: Setup.h:627
trackerDTC::Setup::numDTCsPerTFP_
int numDTCsPerTFP_
Definition: Setup.h:808
trackerDTC::Setup::encodingLayerId
const std::vector< int > & encodingLayerId(int tfpChannel) const
Definition: Setup.cc:339
Setup.h
trackerDTC::Setup::kfBaseShiftC23_
int kfBaseShiftC23_
Definition: Setup.h:715
trackerDTC::Setup::numDTCsPerRegion_
int numDTCsPerRegion_
Definition: Setup.h:609
edm::getParameterSet
ParameterSet const & getParameterSet(ParameterSetID const &id)
Definition: ParameterSet.cc:862
std
Definition: JetResolutionObject.h:76
trackerDTC::Setup::mhtWidthPhiT_
int mhtWidthPhiT_
Definition: Setup.h:869
trackerDTC::Setup::dtcNumUnusedBits_
int dtcNumUnusedBits_
Definition: Setup.h:776
trackerDTC::Setup::dtcWidthM_
int dtcWidthM_
Definition: Setup.h:816
trackerDTC::Setup::checkTKLayoutId
void checkTKLayoutId(int tkLayoutId) const
Definition: Setup.cc:701
trackerDTC::Setup::produceSensorModules
void produceSensorModules()
Definition: Setup.cc:438
trackerDTC::Setup::detIdToSensorModule_
std::unordered_map< DetId, SensorModule * > detIdToSensorModule_
Definition: Setup.h:834
trackerDTC::Setup::baseR_
double baseR_
Definition: Setup.h:770
trackerDTC::Setup::hybridRangesAlpha_
std::vector< double > hybridRangesAlpha_
Definition: Setup.h:531
trackerDTC::Setup::psModule
bool psModule(int dtcId) const
Definition: Setup.cc:300
trackerDTC::Setup::kfBaseChi21_
double kfBaseChi21_
Definition: Setup.h:924
trklet::bend
double bend(double r, double rinv, double stripPitch)
Definition: Util.h:160
trackerDTC::Setup::phGeometryConfiguration_
std::string phGeometryConfiguration_
Definition: Setup.h:470
trackerDTC::Setup::baseSector_
double baseSector_
Definition: Setup.h:839
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
trackerDTC::Setup::hybridBasesPhi_
std::vector< double > hybridBasesPhi_
Definition: Setup.h:785
trackerDTC::deltaPhi
double deltaPhi(double lhs, double rhs=0.)
Definition: Setup.h:34
trackerDTC::Setup::kfBasem0_
double kfBasem0_
Definition: Setup.h:884
trackerDTC::Setup::speedOfLight_
double speedOfLight_
Definition: Setup.h:567
trackerDTC::Setup::stubPos
GlobalPoint stubPos(bool hybrid, const TTDTC::Frame &frame, int tfpRegion, int tfpChannel) const
Definition: Setup.cc:615
Plane
Definition: Plane.h:16
trackerDTC::Setup::hybridWidthsPhi_
std::vector< int > hybridWidthsPhi_
Definition: Setup.h:521
trackerDTC::Setup::mhtBasePhiT_
double mhtBasePhiT_
Definition: Setup.h:873
TTDTC::Frame
std::pair< TTStubRef, BV > Frame
Definition: TTDTC.h:22
trackerDTC::Setup::kfBaser1_
double kfBaser1_
Definition: Setup.h:897
trackerDTC::Setup::kfBaseC00_
double kfBaseC00_
Definition: Setup.h:914
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
trackerDTC::Setup::numSectorsEta_
int numSectorsEta_
Definition: Setup.h:634
trackerDTC::Setup::drBasePhi0_
double drBasePhi0_
Definition: Setup.h:930
trackerDTC::Setup::kfBaseK00_
double kfBaseK00_
Definition: Setup.h:909
trackerDTC::Setup::kfBaseShiftS00_
int kfBaseShiftS00_
Definition: Setup.h:694
trackerDTC::Setup::hybridMinPt_
double hybridMinPt_
Definition: Setup.h:507
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
trackerDTC::Setup::hybridChosenRofPhi_
double hybridChosenRofPhi_
Definition: Setup.h:511
trackerDTC::Setup::kfBaseR11_
double kfBaseR11_
Definition: Setup.h:906
trackerDTC::Setup::numModulesPerDTC_
int numModulesPerDTC_
Definition: Setup.h:611
TrackerGeometry::detIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: TrackerGeometry.h:64
Exception.h
trackerDTC::Setup::boundariesEta_
std::vector< double > boundariesEta_
Definition: Setup.h:642
trackerDTC::Setup::hybridDisk2SRsSet_
std::vector< edm::ParameterSet > hybridDisk2SRsSet_
Definition: Setup.h:537
trackerDTC::Setup::kfBaseC11_
double kfBaseC11_
Definition: Setup.h:917
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trackerDTC::Setup::encodingsBend2S_
std::vector< std::vector< double > > encodingsBend2S_
Definition: Setup.h:826
trackerDTC::Setup::kfBaseShiftChi20_
int kfBaseShiftChi20_
Definition: Setup.h:700
trackerDTC::Setup::kfBaseShiftK10_
int kfBaseShiftK10_
Definition: Setup.h:697
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
trackerDTC::Setup::kfBaseChi2_
double kfBaseChi2_
Definition: Setup.h:925
trackerDTC::Setup::htBaseQoverPt_
double htBaseQoverPt_
Definition: Setup.h:858
cms::Exception
Definition: Exception.h:70
trackerDTC::Setup::sgXMLLabel_
std::string sgXMLLabel_
Definition: Setup.h:459
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::ProcessHistory
Definition: ProcessHistory.h:13
trackerDTC::Setup::widthPhiDTC_
int widthPhiDTC_
Definition: Setup.h:822
trackerDTC::Setup::kfBaseShiftC00_
int kfBaseShiftC00_
Definition: Setup.h:701
trackerDTC::Setup::minPt_
double minPt_
Definition: Setup.h:490
trackerDTC::Setup::hybridDiskZs_
std::vector< double > hybridDiskZs_
Definition: Setup.h:535
trackerDTC::Setup::kfBaseShiftS13_
int kfBaseShiftS13_
Definition: Setup.h:708
trackerDTC::Setup::sgXMLPath_
std::string sgXMLPath_
Definition: Setup.h:461
TTBV.h
trackerDTC::Setup::trackerGeometry_
const TrackerGeometry * trackerGeometry_
Definition: Setup.h:440
trackerDTC::Setup::kfBaseShiftv1_
int kfBaseShiftv1_
Definition: Setup.h:706
trackerDTC::Setup::consumeStubAlgorithm
void consumeStubAlgorithm()
Definition: Setup.cc:379
MagneticField
Definition: MagneticField.h:19
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
trackerDTC::Setup::htNumBinsPhiT_
int htNumBinsPhiT_
Definition: Setup.h:649
trackerDTC::Setup::drWidthPhi0_
int drWidthPhi0_
Definition: Setup.h:724
trackerDTC::Setup::baseRegion_
double baseRegion_
Definition: Setup.h:763
trackerDTC::Setup::kfBaseS00_
double kfBaseS00_
Definition: Setup.h:900
label
const char * label
Definition: PFTauDecayModeTools.cc:11
trackerDTC::Setup::kfBasev0_
double kfBasev0_
Definition: Setup.h:886
trackerDTC::Setup::hybridRangesZ_
std::vector< double > hybridRangesZ_
Definition: Setup.h:529
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
edm::pset::Registry
Definition: Registry.h:26
trackerDTC::Setup::widthRow_
int widthRow_
Definition: Setup.h:588
trackerDTC::Setup::kfBaser02_
double kfBaser02_
Definition: Setup.h:898
trackerDTC::Setup::halfLength_
double halfLength_
Definition: Setup.h:577
TrackerGeometry
Definition: TrackerGeometry.h:14
trackerDTC::Setup::sensorModules_
std::vector< SensorModule > sensorModules_
Definition: Setup.h:830
trackerDTC::Setup::kfBaseShiftv0_
int kfBaseShiftv0_
Definition: Setup.h:693
trackerDTC::SensorModule::Barrel2S
Definition: SensorModule.h:16