CMS 3D CMS Logo

List of all members | Private Member Functions
CmsMTDDiscBuilder Class Reference

#include <CmsMTDDiscBuilder.h>

Inheritance diagram for CmsMTDDiscBuilder:
CmsMTDLevelBuilder CmsMTDAbstractConstruction

Private Member Functions

void buildComponent (DDFilteredView &, GeometricTimingDet *, std::string) override
 
void sortNS (DDFilteredView &, GeometricTimingDet *) override
 

Additional Inherited Members

- Public Member Functions inherited from CmsMTDLevelBuilder
void build (DDFilteredView &, GeometricTimingDet *, std::string) override
 
 ~CmsMTDLevelBuilder () override
 
- Public Member Functions inherited from CmsMTDAbstractConstruction
virtual ~CmsMTDAbstractConstruction ()=default
 
- Static Public Member Functions inherited from CmsMTDLevelBuilder
static double getPhi (const GeometricTimingDet *a)
 
static double getPhiGluedModule (const GeometricTimingDet *a)
 
static double getPhiGluedModuleMirror (const GeometricTimingDet *a)
 
static double getPhiMirror (const GeometricTimingDet *a)
 
static double getPhiModule (const GeometricTimingDet *a)
 
static double getPhiModuleMirror (const GeometricTimingDet *a)
 
static bool isLessModZ (const GeometricTimingDet *a, const GeometricTimingDet *b)
 
static bool isLessR (const GeometricTimingDet *a, const GeometricTimingDet *b)
 
static bool isLessRModule (const GeometricTimingDet *a, const GeometricTimingDet *b)
 
static bool isLessZ (const GeometricTimingDet *a, const GeometricTimingDet *b)
 
static bool phiSortNP (const GeometricTimingDet *a, const GeometricTimingDet *b)
 
static bool subDetByType (const GeometricTimingDet *a, const GeometricTimingDet *b)
 
- Protected Attributes inherited from CmsMTDLevelBuilder
CmsMTDStringToEnum theCmsMTDStringToEnum
 

Detailed Description

Class which contructs Phase2 Outer Tracker/Discs.

Definition at line 11 of file CmsMTDDiscBuilder.h.

Member Function Documentation

void CmsMTDDiscBuilder::buildComponent ( DDFilteredView fv,
GeometricTimingDet g,
std::string  s 
)
overrideprivatevirtual

Implements CmsMTDLevelBuilder.

Definition at line 14 of file CmsMTDDiscBuilder.cc.

References GeometricTimingDet::addComponent(), CmsMTDLevelBuilder::build(), GeometricTimingDet::ETLRing, Exception, DDName::fullname(), DDFilteredView::logicalPart(), DDBase< N, C >::name(), and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
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
void addComponent(GeometricTimingDet *)
const std::string fullname() const
Definition: DDName.h:43
void build(DDFilteredView &, GeometricTimingDet *, std::string) override
void CmsMTDDiscBuilder::sortNS ( DDFilteredView fv,
GeometricTimingDet det 
)
overrideprivatevirtual

Reimplemented from CmsMTDLevelBuilder.

Definition at line 34 of file CmsMTDDiscBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricTimingDet::component(), GeometricTimingDet::components(), GeometricTimingDet::ETLRing, GeometricTimingDet::setGeographicalID(), and GeometricTimingDet::translation().

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 }
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
ConstGeometricTimingDetContainer & components()
DDTranslation const & translation() const
GeometricTimingDet * component(size_t index)
static bool isLessRModule(const GeometricTimingDet *a, const GeometricTimingDet *b)
void setGeographicalID(DetId id)
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:15
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer