CMS 3D CMS Logo

CmsMTDBuilder.cc
Go to the documentation of this file.
7 
10 
11 #include <bitset>
12 
14 {}
15 
16 void
18 {
19  CmsMTDSubStrctBuilder theCmsMTDSubStrctBuilder;
20  CmsMTDEndcapBuilder theCmsMTDEndcapBuilder;
21 
23 
24  switch( theCmsMTDStringToEnum.type( fv.logicalPart().name().fullname() ) )
25  {
27  theCmsMTDEndcapBuilder.build( fv, subdet, s );
28  break;
30  theCmsMTDSubStrctBuilder.build( fv, subdet, s );
31  break;
32  default:
33  throw cms::Exception("CmsMTDBuilder") << " ERROR - I was expecting a SubDet, I got a " << fv.logicalPart().name().fullname();
34  }
35 
36  g->addComponent( subdet );
37 }
38 
41 void
43 {
45  std::stable_sort( comp.begin(), comp.end(), subDetByType());
46 
47  for( uint32_t i = 0; i < comp.size(); i++ )
48  {
49  const uint32_t side = det->component(i)->translation().z() > 0 ? 1 : 0;
50  switch( comp[i]->type() ) {
52  det->component(i)->setGeographicalID(BTLDetId(0,0,0,0,0));
53  break;
55  det->component(i)->setGeographicalID(ETLDetId(side,0,0,0));
56  break;
57  default:
58  throw cms::Exception("CmsMTDBuilder") << " ERROR - I was expecting a SubDet, I got a " << comp[i]->name();
59  }
60  }
61 }
62 
63 
64 
65 
type
Definition: HCALResponse.h:21
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
ConstGeometricTimingDetContainer & components()
DDTranslation const & translation() const
void addComponent(GeometricTimingDet *)
const std::string fullname() const
Definition: DDName.h:43
GeometricTimingDet * component(size_t index)
void sortNS(DDFilteredView &, GeometricTimingDet *) override
void setGeographicalID(DetId id)
void build(DDFilteredView &, GeometricTimingDet *, std::string) override
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
Definition: BTLDetId.h:17
void buildComponent(DDFilteredView &, GeometricTimingDet *, std::string) override
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer