CMS 3D CMS Logo

CmsMTDEndcapBuilder.cc
Go to the documentation of this file.
8 
9 #include <vector>
10 #include <bitset>
11 
13 
15  CmsMTDDiscBuilder theCmsMTDDiscBuilder;
16 
18  std::string subdet_name = subdet->name();
19  switch (theCmsMTDStringToEnum.type(fv.logicalPart().name().name())) {
21  theCmsMTDDiscBuilder.build(fv, subdet, s);
22  break;
23  default:
24  throw cms::Exception("CmsMTDEndcapBuilder")
25  << " ERROR - I was expecting a Disk... I got a " << fv.logicalPart().name();
26  }
27 
28  g->addComponent(subdet);
29 }
30 
34 
35  std::stable_sort(comp.begin(), comp.end(), isLessModZ);
36 
37  for (uint32_t i = 0; i < comp.size(); i++) {
38  const uint32_t side = det->component(i)->translation().z() > 0 ? 1 : 0;
39  det->component(i)->setGeographicalID(ETLDetId(side, 0, 0, 0));
40  }
41 }
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:59
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 *)
GeometricTimingDet * component(size_t index)
void setGeographicalID(DetId id)
void build(DDFilteredView &, GeometricTimingDet *, std::string) override
std::string const & name() const
void buildComponent(DDFilteredView &, GeometricTimingDet *, std::string) override
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
static bool isLessModZ(const GeometricTimingDet *a, const GeometricTimingDet *b)
void sortNS(DDFilteredView &, GeometricTimingDet *) override
const std::string & name() const
Returns the name.
Definition: DDName.cc:40
Translation const & translation() const