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(), isLessR);
59  break;
61  std::sort( comp.begin(), comp.end(), isLessR);
62  break;
64  std::sort( comp.begin(), comp.end(), isLessModZ);
65  break;
66  case GeometricDet::disk:
67  std::sort( comp.begin(), comp.end(), isLessModZ);
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 
void addComponent(GeometricDet *)
void build(DDFilteredView &, GeometricDet *, std::string) override
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
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
static bool isLessModZ(const GeometricDet *a, const GeometricDet *b)
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:176
void buildComponent(DDFilteredView &, GeometricDet *, std::string) override
static bool isLessR(const GeometricDet *a, const GeometricDet *b)
void sortNS(DDFilteredView &, GeometricDet *) override
static std::string getString(std::string const &, DDFilteredView *)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum