test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CmsTrackerSubStrctBuilder.cc
Go to the documentation of this file.
10 #include <vector>
11 
12 #include <bitset>
13 
15 {}
16 
17 void
19 {
20  CmsTrackerLayerBuilder theCmsTrackerLayerBuilder;
21  CmsTrackerWheelBuilder theCmsTrackerWheelBuilder;
22  CmsTrackerDiskBuilder theCmsTrackerDiskBuilder;
23 
26  {
28  theCmsTrackerLayerBuilder.build(fv,subdet,s);
29  break;
31  theCmsTrackerLayerBuilder.build(fv,subdet,s);
32  break;
34  theCmsTrackerWheelBuilder.build(fv,subdet,s);
35  break;
36  case GeometricDet::disk:
37  theCmsTrackerDiskBuilder.build(fv,subdet,s);
38  break;
39 
40  default:
41  edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
42  }
43 
44  g->addComponent(subdet);
45 
46 }
47 
48 void
50 {
52 
53  switch( comp.front()->type())
54  {
56  std::sort( comp.begin(), comp.end(), LessR());
57  break;
59  std::sort( comp.begin(), comp.end(), LessR());
60  break;
62  std::sort( comp.begin(), comp.end(), LessModZ());
63  break;
64  case GeometricDet::disk:
65  std::sort( comp.begin(), comp.end(), LessModZ());
66  break;
67  default:
68  edm::LogError( "CmsTrackerSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
69  }
70 
71  for( uint32_t i = 0; i < comp.size(); i++ )
72  {
73  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
74  }
75 }
76 
static std::string getString(std::string const &, DDFilteredView *)
int i
Definition: DBlmapReader.cc:9
void addComponent(GeometricDet *)
void setGeographicalID(DetId id)
Definition: GeometricDet.h:80
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:174
virtual void build(DDFilteredView &, GeometricDet *, std::string)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:112
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