CMS 3D CMS Logo

CmsTrackerSubStrctBuilder.cc
Go to the documentation of this file.
12 #include <vector>
13 
14 #include <bitset>
15 
16 template <class FilteredView>
18  CmsTrackerLayerBuilder<FilteredView> theCmsTrackerLayerBuilder;
19  CmsTrackerOTLayerBuilder<FilteredView> theCmsTrackerOTLayerBuilder;
20  CmsTrackerWheelBuilder<FilteredView> theCmsTrackerWheelBuilder;
21  CmsTrackerDiskBuilder<FilteredView> theCmsTrackerDiskBuilder;
22 
23  GeometricDet* subdet = new GeometricDet(&fv,
29  theCmsTrackerLayerBuilder.build(fv, subdet, s);
30  break;
32  theCmsTrackerOTLayerBuilder.build(fv, subdet, s);
33  break;
35  theCmsTrackerWheelBuilder.build(fv, subdet, s);
36  break;
37  case GeometricDet::disk:
38  theCmsTrackerDiskBuilder.build(fv, subdet, s);
39  break;
40 
41  default:
42  edm::LogError("CmsTrackerSubStrctBuilder") << " ERROR - I was expecting a Layer ,Wheel or Disk... I got a "
44  }
45 
46  g->addComponent(subdet);
47 }
48 
49 template <class FilteredView>
52 
53  switch (comp.front()->type()) {
56  break;
59  break;
62  break;
63  case GeometricDet::disk:
65  break;
66  default:
67  edm::LogError("CmsTrackerSubStrctBuilder")
68  << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
69  }
70 
71  for (uint32_t i = 0; i < comp.size(); i++) {
72  det->component(i)->setGeographicalID(i + 1); // Every subdetector: Layer/Disk/Wheel Number
73  }
74 }
75 
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
static std::string getString(const std::string &, FilteredView *)
void setGeographicalID(DetId id)
Definition: GeometricDet.h:99
Log< level::Error, false > LogError
static bool isLessModZ(const GeometricDet *a, const GeometricDet *b)
void build(FilteredView &, GeometricDet *, const std::string &) override
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:151
static bool isLessR(const GeometricDet *a, const GeometricDet *b)
void sortNS(FilteredView &, GeometricDet *) override
GeometricDet * component(size_t index)
Definition: GeometricDet.h:147
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34