CMS 3D CMS Logo

CmsMTDDiscBuilder.cc
Go to the documentation of this file.
8 #include <vector>
9 #include <algorithm>
10 
11 using namespace std;
12 
13 void
15 {
16  CmsMTDETLRingBuilder theCmsMTDETLRingBuilder;
17  const std::string ringname = fv.logicalPart().name().fullname().substr(0,8);
18  GeometricTimingDet * subdet = new GeometricTimingDet( &fv, theCmsMTDStringToEnum.type( ringname ));
19 
20  switch( theCmsMTDStringToEnum.type( ringname ))
21  {
23  theCmsMTDETLRingBuilder.build( fv, subdet, s );
24  break;
25  default:
26  throw cms::Exception( "CmsMTDDiscBuilder" ) << " ERROR - I was expecting a Ring, I got a " << ringname;
27  }
28 
29  g->addComponent( subdet );
30 }
31 
33 void
35 {
36 
37 
39 
40  switch(det->components().front()->type()){
42  std::stable_sort(comp.begin(),comp.end(),isLessRModule);
43  break;
44  default:
45  edm::LogError("CmsMTDDiscBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type();
46  }
47 
49  uint32_t totalrings = comp.size();
50 
51  const uint32_t side = det->translation().z() > 0 ? 1 : 0;
52 
53  for ( uint32_t rn=0; rn<totalrings; ++rn) {
54  det->component(rn)->setGeographicalID(ETLDetId(side,rn+1,0,0));
55  }
56 
57 }
58 
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:74
void sortNS(DDFilteredView &, GeometricTimingDet *) override
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()
DDTranslation const & translation() const
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 buildComponent(DDFilteredView &, GeometricTimingDet *, std::string) override
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer