CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CmsTrackerBuilder.cc
Go to the documentation of this file.
7 
11 
12 #include <bitset>
13 
15 {}
16 
17 void
19 {
20  CmsTrackerSubStrctBuilder theCmsTrackerSubStrctBuilder;
21  CmsTrackerPixelPhase1EndcapBuilder theCmsTrackerPixelPhase1EndcapBuilder;
22  CmsTrackerPixelPhase2EndcapBuilder theCmsTrackerPixelPhase2EndcapBuilder;
23 
26  {
28  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
29  break;
31  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
32  break;
34  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
35  break;
37  theCmsTrackerPixelPhase1EndcapBuilder.build( fv, subdet, s );
38  break;
40  theCmsTrackerPixelPhase2EndcapBuilder.build( fv, subdet, s );
41  break;
43  theCmsTrackerPixelPhase2EndcapBuilder.build( fv, subdet, s );
44  break;
45  case GeometricDet::TIB:
46  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
47  break;
48  case GeometricDet::TOB:
49  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
50  break;
52  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
53  break;
54  case GeometricDet::TEC:
55  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
56  break;
57  case GeometricDet::TID:
58  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
59  break;
60  default:
61  edm::LogError( "CmsTrackerBuilder" ) << " ERROR - I was expecting a SubDet, I got a " << ExtractStringFromDDD::getString( s, &fv );
62  }
63 
64  g->addComponent( subdet );
65 }
66 
67 void
69 {
71  std::stable_sort( comp.begin(), comp.end(), subDetByType());
72 
73  for( uint32_t i = 0; i < comp.size(); i++ )
74  {
75  uint32_t temp= comp[i]->type();
76  det->component(i)->setGeographicalID(temp%100); // it relies on the fact that the GeometricDet::GDEnumType enumerators used to identify the subdetectors in the upgrade geometries are equal to the ones of the present detector + n*100
77  }
78 }
79 
80 
81 
82 
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
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)
virtual void buildComponent(DDFilteredView &, GeometricDet *, std::string)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:112
virtual void sortNS(DDFilteredView &, GeometricDet *)
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum