CMS 3D CMS Logo

CmsMTDSubStrctBuilder.cc
Go to the documentation of this file.
8 #include <vector>
9 
10 #include <bitset>
11 
12 namespace {
13  constexpr std::array<const char*,2> sides{ { "PositiveZ","NegativeZ" } };
14 }
15 
17 {}
18 
19 void
21 {
22  CmsMTDTrayBuilder theCmsMTDTrayBuilder;
23 
25 
26  switch( theCmsMTDStringToEnum.type( fv.logicalPart().name().fullname() ) ) {
28  theCmsMTDTrayBuilder.build(fv,subdet,side);
29  break;
30 
31  default:
32  throw cms::Exception("CmsMTDSubStrctBuilder")<<" ERROR - I was expecting a BTLLayer... I got a "<< fv.logicalPart().name().fullname();
33  }
34 
35  g->addComponent(subdet);
36 }
37 
39 void
41 {
43 
44  switch( comp.front()->type())
45  {
47  std::stable_sort( comp.begin(), comp.end(), LessR());
48  break;
49  default:
50  edm::LogError( "CmsMTDSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
51  }
52 
53  for( uint32_t i = 0; i < comp.size(); i++ )
54  {
55  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
56  }
57 }
58 
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
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
#define constexpr
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