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()) {
55  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessR);
56  break;
58  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessR);
59  break;
61  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessModZ);
62  break;
63  case GeometricDet::disk:
64  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessModZ);
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 
GeometricDet::OTPhase2Layer
Definition: GeometricDet.h:77
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
CmsTrackerLevelBuilder
Definition: CmsTrackerLevelBuilder.h:31
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
CmsTrackerSubStrctBuilder.h
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:139
CmsTrackerSubStrctBuilder::sortNS
void sortNS(FilteredView &, GeometricDet *) override
Definition: CmsTrackerSubStrctBuilder.cc:50
GeometricDet::wheel
Definition: GeometricDet.h:62
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
ExtractStringFromDDD
Definition: ExtractStringFromDDD.h:12
CmsTrackerLayerBuilder.h
CmsTrackerLevelBuilderHelper::isLessR
static bool isLessR(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:138
CmsTrackerDiskBuilder
Definition: CmsTrackerDiskBuilder.h:12
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDFilteredView.h
GeometricDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
CmsTrackerWheelBuilder.h
GeometricDet::disk
Definition: GeometricDet.h:70
GeometricDet
Definition: GeometricDet.h:30
DDFilteredView.h
CmsTrackerLevelBuilderHelper::isLessModZ
static bool isLessModZ(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogError
Definition: MessageLogger.h:183
CmsTrackerLevelBuilder::build
void build(FilteredView &, GeometricDet *, const std::string &) override
Definition: CmsTrackerLevelBuilder.cc:141
CmsTrackerDiskBuilder.h
CmsTrackerWheelBuilder
Definition: CmsTrackerWheelBuilder.h:12
CmsTrackerOTLayerBuilder.h
GeometricDet.h
CmsTrackerLayerBuilder
Definition: CmsTrackerLayerBuilder.h:12
CmsTrackerOTLayerBuilder
Definition: CmsTrackerOTLayerBuilder.h:12
ExtractStringFromDDD.h
type
type
Definition: HCALResponse.h:21
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:33
DetId.h
CmsTrackerSubStrctBuilder
Definition: CmsTrackerSubStrctBuilder.h:12
GeometricDet::layer
Definition: GeometricDet.h:61
CmsTrackerSubStrctBuilder::buildComponent
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
Definition: CmsTrackerSubStrctBuilder.cc:17
g
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