CMS 3D CMS Logo

MkFitGeometryESProducer.cc
Go to the documentation of this file.
3 
11 
14 
16 
17 // mkFit includes
23 
24 #include <sstream>
25 
26 // #define DUMP_MKF_GEO
27 
28 //------------------------------------------------------------------------------
29 
31 public:
33 
34  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
35 
36  std::unique_ptr<MkFitGeometry> produce(const TrackerRecoGeometryRecord &iRecord);
37 
38 private:
39  struct GapCollector {
40  struct Interval {
41  float x, y;
42  };
43 
45  void extend_current(float q) {
48  }
50 
51  void add_interval(float x, float y);
52 
53  void sqrt_elements();
54  bool find_gap(Interval &itvl, float eps);
55  void print_gaps(std::ostream &ostr);
56 
57  std::list<Interval> m_coverage;
59  };
60  typedef std::unordered_map<int, GapCollector> layer_gap_map_t;
61 
62  struct MatHistBin {
63  float weight{0}, xi{0}, rl{0};
64  void add(float w, float x, float r) {
65  weight += w;
66  xi += w * x;
67  rl += w * r;
68  }
69  };
71 
72  void considerPoint(const GlobalPoint &gp, mkfit::LayerInfo &lay_info);
73  void fillShapeAndPlacement(const GeomDet *det,
74  mkfit::TrackerInfo &trk_info,
75  MaterialHistogram &material_histogram,
76  layer_gap_map_t *lgc_map = nullptr);
77  void addPixBGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
78  void addPixEGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
79  void addTIBGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
80  void addTOBGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
81  void addTIDGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
82  void addTECGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
83 
84  void findRZBox(const GlobalPoint &gp, float &rmin, float &rmax, float &zmin, float &zmax);
85  void aggregateMaterialInfo(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram);
86  void fillLayers(mkfit::TrackerInfo &trk_info);
87 
91 
92  const TrackerTopology *trackerTopo_ = nullptr;
93  const TrackerGeometry *trackerGeom_ = nullptr;
95 };
96 
98  auto cc = setWhatProduced(this);
99  geomToken_ = cc.consumes();
100  ttopoToken_ = cc.consumes();
101  trackerToken_ = cc.consumes();
102 }
103 
106  descriptions.addWithDefaultLabel(desc);
107 }
108 
109 //------------------------------------------------------------------------------
110 
112  if (x > y)
113  std::swap(x, y);
114  bool handled = false;
115  for (auto i = m_coverage.begin(); i != m_coverage.end(); ++i) {
116  if (y < i->x) { // fully on 'left'
117  m_coverage.insert(i, {x, y});
118  handled = true;
119  break;
120  } else if (x > i->y) { // fully on 'right'
121  continue;
122  } else if (x < i->x) { // sticking out on 'left'
123  i->x = x;
124  handled = true;
125  break;
126  } else if (y > i->y) { // sticking out on 'right'
127  i->y = y;
128  // check for overlap with the next interval, potentially merge
129  auto j = i;
130  ++j;
131  if (j != m_coverage.end() && i->y >= j->x) {
132  i->y = j->y;
133  m_coverage.erase(j);
134  }
135  handled = true;
136  break;
137  } else { // contained in current interval
138  handled = true;
139  break;
140  }
141  }
142  if (!handled) {
143  m_coverage.push_back({x, y});
144  }
145 }
146 
148  for (auto &itvl : m_coverage) {
149  itvl.x = std::sqrt(itvl.x);
150  itvl.y = std::sqrt(itvl.y);
151  }
152 }
153 
155  auto i = m_coverage.begin();
156  while (i != m_coverage.end()) {
157  auto j = i;
158  ++j;
159  if (j != m_coverage.end()) {
160  if (j->x - i->y > eps) {
161  itvl = {i->y, j->x};
162  return true;
163  }
164  i = j;
165  } else {
166  break;
167  }
168  }
169  return false;
170 }
171 
173  auto i = m_coverage.begin();
174  while (i != m_coverage.end()) {
175  auto j = i;
176  ++j;
177  if (j != m_coverage.end()) {
178  ostr << "(" << i->y << ", " << j->x << ")->" << j->x - i->y;
179  i = j;
180  } else {
181  break;
182  }
183  }
184 }
185 
186 //------------------------------------------------------------------------------
187 
189  // Use radius squared during bounding-region search.
190  float r = gp.perp2(), z = gp.z();
191  li.extend_limits(r, z);
192 }
193 
195  mkfit::TrackerInfo &trk_info,
196  MaterialHistogram &material_histogram,
197  layer_gap_map_t *lgc_map) {
198  const DetId detid = det->geographicalId();
199 
200  bool doubleSide = false; //double modules have double material
201  if (detid.subdetId() == SiStripSubdetector::TIB)
202  doubleSide = trackerTopo_->tibIsDoubleSide(detid);
203  else if (detid.subdetId() == SiStripSubdetector::TID)
204  doubleSide = trackerTopo_->tidIsDoubleSide(detid);
205  else if (detid.subdetId() == SiStripSubdetector::TOB)
206  doubleSide = trackerTopo_->tobIsDoubleSide(detid);
207  else if (detid.subdetId() == SiStripSubdetector::TEC)
208  doubleSide = trackerTopo_->tecIsDoubleSide(detid);
209 
210  float xy[4][2];
211  float half_length, dz;
212  const Bounds *b = &((det->surface()).bounds());
213 
214  if (const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *>(b)) {
215  // See sec. "TrapezoidalPlaneBounds parameters" in doc/reco-geom-notes.txt
216  std::array<const float, 4> const &par = b2->parameters();
217  xy[0][0] = -par[0];
218  xy[0][1] = -par[3];
219  xy[1][0] = -par[1];
220  xy[1][1] = par[3];
221  xy[2][0] = par[1];
222  xy[2][1] = par[3];
223  xy[3][0] = par[0];
224  xy[3][1] = -par[3];
225  half_length = par[3];
226  dz = par[2];
227 
228 #ifdef DUMP_MKF_GEO
229  printf("TRAP 0x%x %f %f %f %f ", detid.rawId(), par[0], par[1], par[2], par[3]);
230 #endif
231  } else if (const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *>(b)) {
232  // Rectangular
233  float dx = b2->width() * 0.5; // half width
234  float dy = b2->length() * 0.5; // half length
235  xy[0][0] = -dx;
236  xy[0][1] = -dy;
237  xy[1][0] = -dx;
238  xy[1][1] = dy;
239  xy[2][0] = dx;
240  xy[2][1] = dy;
241  xy[3][0] = dx;
242  xy[3][1] = -dy;
243  half_length = dy;
244  dz = b2->thickness() * 0.5; // half thickness
245 
246 #ifdef DUMP_MKF_GEO
247  printf("RECT 0x%x %f %f %f ", detid.rawId(), dx, dy, dz);
248 #endif
249  } else {
250  throw cms::Exception("UnimplementedFeature") << "unsupported Bounds class";
251  }
252 
253  const bool useMatched = false;
254  int lay =
256  trackerTopo_->layer(detid),
257  useMatched,
258  trackerTopo_->isStereo(detid),
259  trackerTopo_->side(detid) == static_cast<unsigned>(TrackerDetSide::PosEndcap));
260 #ifdef DUMP_MKF_GEO
261  printf(" subdet=%d layer=%d side=%d is_stereo=%d is_double_side=%d --> mkflayer=%d\n",
262  detid.subdetId(),
263  trackerTopo_->layer(detid),
264  trackerTopo_->side(detid),
265  trackerTopo_->isStereo(detid),
266  doubleSide,
267  lay);
268 #endif
269 
270  mkfit::LayerInfo &layer_info = trk_info.layer_nc(lay);
271  if (lgc_map) {
272  (*lgc_map)[lay].reset_current();
273  }
274  float zbox_min = 1000, zbox_max = 0, rbox_min = 1000, rbox_max = 0;
275  for (int i = 0; i < 4; ++i) {
276  Local3DPoint lp1(xy[i][0], xy[i][1], -dz);
277  Local3DPoint lp2(xy[i][0], xy[i][1], dz);
278  GlobalPoint gp1 = det->surface().toGlobal(lp1);
279  GlobalPoint gp2 = det->surface().toGlobal(lp2);
280  considerPoint(gp1, layer_info);
281  considerPoint(gp2, layer_info);
282  findRZBox(gp1, rbox_min, rbox_max, zbox_min, zbox_max);
283  findRZBox(gp2, rbox_min, rbox_max, zbox_min, zbox_max);
284  if (lgc_map) {
285  (*lgc_map)[lay].extend_current(gp1.perp2());
286  (*lgc_map)[lay].extend_current(gp2.perp2());
287  }
288  }
289  if (lgc_map) {
290  (*lgc_map)[lay].add_current();
291  }
292 
293  // Double-sided module (join of two modules) information is not used in mkFit and
294  // also not needed for the material calculation.
295  if (doubleSide)
296  return;
297 
298  // Module information
299  const auto &p = det->position();
300  auto z = det->rotation().z();
301  auto x = det->rotation().x();
302  layer_info.register_module(
303  {{p.x(), p.y(), p.z()}, {z.x(), z.y(), z.z()}, {x.x(), x.y(), x.z()}, half_length, detid.rawId()});
304  // Set some layer parameters (repeatedly, would require hard-coding otherwise)
305  layer_info.set_subdet(detid.subdetId());
306  layer_info.set_is_pixel(detid.subdetId() <= 2);
307  layer_info.set_is_stereo(trackerTopo_->isStereo(detid));
308  if (layerNrConv_.isPhase2() && !layer_info.is_pixel())
309  layer_info.set_has_charge(false);
310 
311  // Fill material
312  {
313  // module material
314  const float bbxi = det->surface().mediumProperties().xi();
315  const float radL = det->surface().mediumProperties().radLen();
316  // loop over bins to fill histogram with bbxi, radL and their weight, which the overlap surface in r-z with the cmsquare of a bin
317  const float iBin = trk_info.mat_range_z() / trk_info.mat_nbins_z();
318  const float jBin = trk_info.mat_range_r() / trk_info.mat_nbins_r();
319  for (int i = std::floor(zbox_min / iBin); i < std::ceil(zbox_max / iBin); i++) {
320  for (int j = std::floor(rbox_min / jBin); j < std::ceil(rbox_max / jBin); j++) {
321  const float iF = i * iBin;
322  const float jF = j * jBin;
323  float overlap = std::max(0.f, std::min(jF + jBin, rbox_max) - std::max(jF, rbox_min)) *
324  std::max(0.f, std::min(iF + iBin, zbox_max) - std::max(iF, zbox_min));
325  if (overlap > 0)
326  material_histogram(i, j).add(overlap, bbxi, radL);
327  }
328  }
329  }
330 }
331 
332 //==============================================================================
333 
334 // These functions do the following:
335 // 0. Detect bounding cylinder of each layer.
336 // 1. Setup LayerInfo data.
337 // 2. Establish short module ids.
338 // 3. Store module normal and strip direction vectors.
339 // 4. Extract stereo coverage holes where they exist (TEC, all but last 3 double-layers).
340 //
341 // See python/dumpMkFitGeometry.py and dumpMkFitGeometryPhase2.py
342 
344 #ifdef DUMP_MKF_GEO
345  printf("\n*** addPixBGeometry\n\n");
346 #endif
347  for (auto &det : trackerGeom_->detsPXB()) {
348  fillShapeAndPlacement(det, trk_info, material_histogram);
349  }
350 }
351 
353 #ifdef DUMP_MKF_GEO
354  printf("\n*** addPixEGeometry\n\n");
355 #endif
356  for (auto &det : trackerGeom_->detsPXF()) {
357  fillShapeAndPlacement(det, trk_info, material_histogram);
358  }
359 }
360 
362 #ifdef DUMP_MKF_GEO
363  printf("\n*** addTIBGeometry\n\n");
364 #endif
365  for (auto &det : trackerGeom_->detsTIB()) {
366  fillShapeAndPlacement(det, trk_info, material_histogram);
367  }
368 }
369 
371 #ifdef DUMP_MKF_GEO
372  printf("\n*** addTOBGeometry\n\n");
373 #endif
374  for (auto &det : trackerGeom_->detsTOB()) {
375  fillShapeAndPlacement(det, trk_info, material_histogram);
376  }
377 }
378 
380 #ifdef DUMP_MKF_GEO
381  printf("\n*** addTIDGeometry\n\n");
382 #endif
383  for (auto &det : trackerGeom_->detsTID()) {
384  fillShapeAndPlacement(det, trk_info, material_histogram);
385  }
386 }
387 
389 #ifdef DUMP_MKF_GEO
390  printf("\n*** addTECGeometry\n\n");
391 #endif
392  // For TEC we also need to discover hole in radial extents.
393  layer_gap_map_t lgc_map;
394  for (auto &det : trackerGeom_->detsTEC()) {
395  fillShapeAndPlacement(det, trk_info, material_histogram, &lgc_map);
396  }
397  // Now loop over the GapCollectors and see if there is a coverage gap.
398  std::ostringstream ostr;
399  ostr << "addTECGeometry() gap report:\n";
401  for (auto &[layer, gcol] : lgc_map) {
402  gcol.sqrt_elements();
403  if (gcol.find_gap(itvl, 0.5)) {
404  ostr << " layer: " << layer << ", gap: " << itvl.x << " -> " << itvl.y << " width = " << itvl.y - itvl.x << "\n";
405  ostr << " all gaps: ";
406  gcol.print_gaps(ostr);
407  ostr << "\n";
408  trk_info.layer_nc(layer).set_r_hole_range(itvl.x, itvl.y);
409  }
410  }
411  edm::LogVerbatim("MkFitGeometryESProducer") << ostr.str();
412 }
413 
414 void MkFitGeometryESProducer::findRZBox(const GlobalPoint &gp, float &rmin, float &rmax, float &zmin, float &zmax) {
415  float r = gp.perp(), z = std::abs(gp.z());
416  rmax = std::max(r, rmax);
417  rmin = std::min(r, rmin);
418  zmax = std::max(z, zmax);
419  zmin = std::min(z, zmin);
420 }
421 
423  MaterialHistogram &material_histogram) {
424  //from histogram (vector of tuples) to grid
425  for (int i = 0; i < trk_info.mat_nbins_z(); i++) {
426  for (int j = 0; j < trk_info.mat_nbins_r(); j++) {
427  const MatHistBin &mhb = material_histogram(i, j);
428  if (mhb.weight > 0) {
429  trk_info.material_bbxi(i, j) = mhb.xi / mhb.weight;
430  trk_info.material_radl(i, j) = mhb.rl / mhb.weight;
431  }
432  }
433  }
434 }
435 
437  mkfit::rectvec<int> rneighbor_map(trk_info.mat_nbins_z(), trk_info.mat_nbins_r());
438  mkfit::rectvec<int> zneighbor_map(trk_info.mat_nbins_z(), trk_info.mat_nbins_r());
439 
440  for (int im = 0; im < trk_info.n_layers(); ++im) {
441  const mkfit::LayerInfo &li = trk_info.layer(im);
442  if (!li.is_barrel() && li.zmax() < 0)
443  continue; // neg endcap covered by pos
444  int rin, rout, zmin, zmax;
445  rin = trk_info.mat_bin_r(li.rin());
446  rout = trk_info.mat_bin_r(li.rout()) + 1;
447  if (li.is_barrel()) {
448  zmin = 0;
449  zmax = trk_info.mat_bin_z(std::max(std::abs(li.zmax()), std::abs(li.zmin()))) + 1;
450  } else {
451  zmin = trk_info.mat_bin_z(li.zmin());
452  zmax = trk_info.mat_bin_z(li.zmax()) + 1;
453  }
454  for (int i = zmin; i < zmax; i++) {
455  for (int j = rin; j < rout; j++) {
456  if (trk_info.material_bbxi(i, j) == 0) {
457  float distancesqmin = 100000;
458  for (int i2 = zmin; i2 < zmax; i2++) {
459  for (int j2 = rin; j2 < rout; j2++) {
460  if (j == j2 && i == i2)
461  continue;
462  auto mydistsq = (i - i2) * (i - i2) + (j - j2) * (j - j2);
463  if (mydistsq < distancesqmin && trk_info.material_radl(i2, j2) > 0) {
464  distancesqmin = mydistsq;
465  zneighbor_map(i, j) = i2;
466  rneighbor_map(i, j) = j2;
467  }
468  }
469  } // can work on speedup here
470  }
471  }
472  }
473  for (int i = zmin; i < zmax; i++) {
474  for (int j = rin; j < rout; j++) {
475  if (trk_info.material_bbxi(i, j) == 0) {
476  int iN = zneighbor_map(i, j);
477  int jN = rneighbor_map(i, j);
478  trk_info.material_bbxi(i, j) = trk_info.material_bbxi(iN, jN);
479  trk_info.material_radl(i, j) = trk_info.material_radl(iN, jN);
480  }
481  }
482  }
483  } //module loop
484 }
485 
486 //------------------------------------------------------------------------------
487 // clang-format off
488 namespace {
489  const float phase1QBins[] = {
490  // PIXB, TIB, TOB
491  2.0, 2.0, 2.0, 2.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5,
492  // PIXE+, TID+, TEC+
493  1.0, 1.0, 1.0, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5,
494  // PIXE-, TID-, TEC-
495  1.0, 1.0, 1.0, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5
496  };
497  const float phase2QBins[] = {
498  // TODO: Review these numbers.
499  // PIXB, TOB
500  2.0, 2.0, 2.0, 2.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0,
501  // PIXE+, TEC+
502  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6,
503  // PIXE-, TEC-
504  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6
505  };
506 }
507 // clang-format on
508 //------------------------------------------------------------------------------
509 
510 std::unique_ptr<MkFitGeometry> MkFitGeometryESProducer::produce(const TrackerRecoGeometryRecord &iRecord) {
511  auto trackerInfo = std::make_unique<mkfit::TrackerInfo>();
512 
513  trackerGeom_ = &iRecord.get(geomToken_);
514  trackerTopo_ = &iRecord.get(ttopoToken_);
515 
516  const float *qBinDefaults = nullptr;
517 
518  // std::string path = "Geometry/TrackerCommonData/data/";
520  edm::LogInfo("MkFitGeometryESProducer") << "Extracting PhaseI geometry";
521  trackerInfo->create_layers(18, 27, 27);
522  qBinDefaults = phase1QBins;
523 
524  trackerInfo->create_material(300, 300.0f, 120, 120.0f);
527  edm::LogInfo("MkFitGeometryESProducer") << "Extracting PhaseII geometry";
529  trackerInfo->create_layers(16, 22, 22);
530  qBinDefaults = phase2QBins;
531  trackerInfo->create_material(300, 300.0f, 120, 120.0f);
532  } else {
533  throw cms::Exception("UnimplementedFeature") << "unsupported / unknowen geometry version";
534  }
535 
536  // Prepare layer boundaries for bounding-box search
537  for (int i = 0; i < trackerInfo->n_layers(); ++i) {
538  auto &li = trackerInfo->layer_nc(i);
539  li.set_limits(
541  li.reserve_modules(256);
542  }
543 
544  MaterialHistogram material_histogram(trackerInfo->mat_nbins_z(), trackerInfo->mat_nbins_r());
545 
546  // This works for both Phase1 and Phase2.
547  // Phase2 TrackerGeometry returns empty det-vectors for TIB and TEC.
548  addPixBGeometry(*trackerInfo, material_histogram);
549  addPixEGeometry(*trackerInfo, material_histogram);
550  addTIBGeometry(*trackerInfo, material_histogram);
551  addTIDGeometry(*trackerInfo, material_histogram);
552  addTOBGeometry(*trackerInfo, material_histogram);
553  addTECGeometry(*trackerInfo, material_histogram);
554 
555  // r_in/out kept as squares until here, root them
556  unsigned int n_mod = 0;
557  for (int i = 0; i < trackerInfo->n_layers(); ++i) {
558  auto &li = trackerInfo->layer_nc(i);
559  li.set_r_in_out(std::sqrt(li.rin()), std::sqrt(li.rout()));
560  li.set_propagate_to(li.is_barrel() ? li.r_mean() : li.z_mean());
561  li.set_q_bin(qBinDefaults[i]);
562  unsigned int maxsid = li.shrink_modules();
563 
564  n_mod += maxsid;
565 
566  // Make sure the short id fits in the 14 bits...
567  assert(maxsid < 1u << 13);
568  assert(n_mod > 0);
569  }
570 
571  // Material grid
572  aggregateMaterialInfo(*trackerInfo, material_histogram);
573  fillLayers(*trackerInfo);
574 
575  // Propagation configuration
576  {
577  using namespace mkfit;
578  PropagationConfig &pconf = trackerInfo->prop_config_nc();
579  pconf.backward_fit_to_pca = false;
584  else
590  pconf.apply_tracker_info(trackerInfo.get());
591  }
592 
593 #ifdef DUMP_MKF_GEO
594  printf("Total number of modules %u, 14-bits fit up to %u modules\n", n_mod, 1u << 13);
595 #endif
596 
597  return std::make_unique<MkFitGeometry>(iRecord.get(geomToken_),
598  iRecord.get(trackerToken_),
599  iRecord.get(ttopoToken_),
600  std::move(trackerInfo),
601  layerNrConv_);
602 }
603 
const DetContainer & detsTIB() const
Log< level::Info, true > LogVerbatim
constexpr int32_t ceil(float num)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
bool tibIsDoubleSide(const DetId &id) const
void extend_limits(float r, float z)
Definition: TrackerInfo.cc:33
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
bool tecIsDoubleSide(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
bool find_gap(Interval &itvl, float eps)
float rin() const
Definition: TrackerInfo.h:68
void addTIDGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
void set_r_hole_range(float rh1, float rh2)
Definition: TrackerInfo.cc:49
void addTOBGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
const DetContainer & detsPXB() const
void addTECGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
T w() const
PropagationFlags forward_fit_pflags
void fillLayers(mkfit::TrackerInfo &trk_info)
void addPixBGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > trackerToken_
PropagationFlags backward_fit_pflags
const DetContainer & detsPXF() const
Definition: weight.py:1
bool isStereo(const DetId &id) const
const TrackerTopology * trackerTopo_
unsigned int side(const DetId &id) const
assert(be >=bs)
MkFitGeometryESProducer(const edm::ParameterSet &iConfig)
LayerInfo & layer_nc(int l)
Definition: TrackerInfo.h:207
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
bool tobIsDoubleSide(const DetId &id) const
constexpr bool useMatched
float zmax() const
Definition: TrackerInfo.h:72
unsigned int layer(const DetId &id) const
int mat_nbins_r() const
Definition: TrackerInfo.h:228
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
Definition: GeomDet.h:46
PropagationFlags finding_inter_layer_pflags
Basic3DVector< T > x() const
float zmin() const
Definition: TrackerInfo.h:71
float material_radl(int binZ, int binR) const
Definition: TrackerInfo.h:236
const DetContainer & detsTOB() const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
const TrackerGeometry * trackerGeom_
bool isThere(GeomDetEnumerators::SubDetector subdet) const
T sqrt(T t)
Definition: SSEVec.h:23
float radLen() const
int n_layers() const
Definition: TrackerInfo.h:205
int mat_bin_z(float z) const
Definition: TrackerInfo.h:231
float mat_range_z() const
Definition: TrackerInfo.h:229
Basic3DVector< T > z() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void considerPoint(const GlobalPoint &gp, mkfit::LayerInfo &lay_info)
PropagationFlags seed_fit_pflags
double f[11][100]
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
void fillShapeAndPlacement(const GeomDet *det, mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram, layer_gap_map_t *lgc_map=nullptr)
void addTIBGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
PropagationFlags pca_prop_pflags
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
float mat_range_r() const
Definition: TrackerInfo.h:230
int mat_bin_r(float r) const
Definition: TrackerInfo.h:232
void add(float w, float x, float r)
bias2_t b2[25]
Definition: b2.h:9
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
const LayerInfo & layer(int l) const
Definition: TrackerInfo.h:206
Log< level::Info, false > LogInfo
Definition: DetId.h:17
void aggregateMaterialInfo(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
float material_bbxi(int binZ, int binR) const
Definition: TrackerInfo.h:235
double b
Definition: hdecay.h:120
float rout() const
Definition: TrackerInfo.h:69
void findRZBox(const GlobalPoint &gp, float &rmin, float &rmax, float &zmin, float &zmax)
T perp2() const
Definition: PV3DBase.h:68
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
mkfit::LayerNumberConverter layerNrConv_
void apply_tracker_info(const TrackerInfo *ti)
Definition: TrackerInfo.cc:13
void addPixEGeometry(mkfit::TrackerInfo &trk_info, MaterialHistogram &material_histogram)
float x
PropagationFlags finding_intra_layer_pflags
std::unique_ptr< MkFitGeometry > produce(const TrackerRecoGeometryRecord &iRecord)
const DetContainer & detsTEC() const
constexpr bool usePropToPlane
Definition: Config.h:51
Definition: Bounds.h:18
const MediumProperties & mediumProperties() const
Definition: Surface.h:83
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
int convertLayerNumber(int det, int lay, bool useMatched, int isStereo, bool posZ) const
float xi() const
def move(src, dest)
Definition: eostools.py:511
int mat_nbins_z() const
Definition: TrackerInfo.h:227
bool is_barrel() const
Definition: TrackerInfo.h:78
const DetContainer & detsTID() const
std::unordered_map< int, GapCollector > layer_gap_map_t