CMS 3D CMS Logo

CmsTrackerSubStrctBuilder.cc
Go to the documentation of this file.
11 #include <vector>
12 
13 #include <bitset>
14 
16 {}
17 
18 void
20 {
21  CmsTrackerLayerBuilder theCmsTrackerLayerBuilder;
22  CmsTrackerOTLayerBuilder theCmsTrackerOTLayerBuilder;
23  CmsTrackerWheelBuilder theCmsTrackerWheelBuilder;
24  CmsTrackerDiskBuilder theCmsTrackerDiskBuilder;
25 
28  {
30  theCmsTrackerLayerBuilder.build(fv,subdet,s);
31  break;
33  theCmsTrackerOTLayerBuilder.build(fv,subdet,s);
34  break;
36  theCmsTrackerWheelBuilder.build(fv,subdet,s);
37  break;
38  case GeometricDet::disk:
39  theCmsTrackerDiskBuilder.build(fv,subdet,s);
40  break;
41 
42  default:
43  edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
44  }
45 
46  g->addComponent(subdet);
47 
48 }
49 
50 void
52 {
54 
55  switch( comp.front()->type())
56  {
58  std::sort( comp.begin(), comp.end(), LessR());
59  break;
61  std::sort( comp.begin(), comp.end(), LessR());
62  break;
64  std::sort( comp.begin(), comp.end(), LessModZ());
65  break;
66  case GeometricDet::disk:
67  std::sort( comp.begin(), comp.end(), LessModZ());
68  break;
69  default:
70  edm::LogError( "CmsTrackerSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
71  }
72 
73  for( uint32_t i = 0; i < comp.size(); i++ )
74  {
75  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
76  }
77 }
78 
static std::string getString(std::string const &, DDFilteredView *)
void addComponent(GeometricDet *)
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
virtual void sortNS(DDFilteredView &, GeometricDet *)
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:176
virtual void build(DDFilteredView &, GeometricDet *, std::string)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36
virtual void buildComponent(DDFilteredView &, GeometricDet *, std::string)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum