CMS 3D CMS Logo

CmsMTDSubStrctBuilder.cc
Go to the documentation of this file.
8 #include <vector>
9 
10 #include <bitset>
11 
13 {}
14 
15 void
17 {
18  CmsMTDTrayBuilder theCmsMTDTrayBuilder;
19 
21 
22  switch( theCmsMTDStringToEnum.type( fv.logicalPart().name().fullname() ) ) {
24  theCmsMTDTrayBuilder.build(fv,subdet,side);
25  break;
26 
27  default:
28  throw cms::Exception("CmsMTDSubStrctBuilder")<<" ERROR - I was expecting a BTLLayer... I got a "<< fv.logicalPart().name().fullname();
29  }
30 
31  g->addComponent(subdet);
32 }
33 
35 void
37 {
39 
40  switch( comp.front()->type())
41  {
43  std::stable_sort( comp.begin(), comp.end(), isLessR);
44  break;
45  default:
46  edm::LogError( "CmsMTDSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
47  }
48 
49  for( uint32_t i = 0; i < comp.size(); i++ )
50  {
51  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
52  }
53 }
54 
GeometricTimingDet::GeometricTimingEnumType type(std::string const &) const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:74
static bool isLessR(const GeometricTimingDet *a, const GeometricTimingDet *b)
CmsMTDStringToEnum theCmsMTDStringToEnum
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
ConstGeometricTimingDetContainer & components()
void addComponent(GeometricTimingDet *)
const std::string fullname() const
Definition: DDName.h:43
GeometricTimingDet * component(size_t index)
void setGeographicalID(DetId id)
void build(DDFilteredView &, GeometricTimingDet *, std::string) override
void sortNS(DDFilteredView &, GeometricTimingDet *) override
void buildComponent(DDFilteredView &, GeometricTimingDet *, std::string) override
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer