CMS 3D CMS Logo

CmsMTDDiscBuilder.cc
Go to the documentation of this file.
9 #include <vector>
10 #include <algorithm>
11 
12 using namespace std;
13 
14 void
16 {
17  CmsMTDETLRingBuilder theCmsMTDETLRingBuilder;
18  const std::string ringname = fv.logicalPart().name().fullname().substr(0,8);
19  GeometricTimingDet * subdet = new GeometricTimingDet( &fv, theCmsMTDStringToEnum.type( ringname ));
20 
21  switch( theCmsMTDStringToEnum.type( ringname ))
22  {
24  theCmsMTDETLRingBuilder.build( fv, subdet, s );
25  break;
26  default:
27  throw cms::Exception( "CmsMTDDiscBuilder" ) << " ERROR - I was expecting a Ring, I got a " << ringname;
28  }
29 
30  g->addComponent( subdet );
31 }
32 
34 void
36 {
37 
38 
40 
41  switch(det->components().front()->type()){
43  std::stable_sort(comp.begin(),comp.end(),isLessRModule);
44  break;
45  default:
46  edm::LogError("CmsMTDDiscBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type();
47  }
48 
50  uint32_t totalrings = comp.size();
51 
52  const uint32_t side = det->translation().z() > 0 ? 1 : 0;
53 
54  for ( uint32_t rn=0; rn<totalrings; ++rn) {
55  det->component(rn)->setGeographicalID(ETLDetId(side,rn+1,0,0));
56  }
57 
58 }
59 
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