CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
CmsMTDSubStrctBuilder Class Reference

#include <CmsMTDSubStrctBuilder.h>

Inheritance diagram for CmsMTDSubStrctBuilder:
CmsMTDLevelBuilder CmsMTDAbstractConstruction

Public Member Functions

 CmsMTDSubStrctBuilder ()
 
- Public Member Functions inherited from CmsMTDLevelBuilder
void build (DDFilteredView &, GeometricTimingDet *, std::string) override
 
 ~CmsMTDLevelBuilder () override
 
- Public Member Functions inherited from CmsMTDAbstractConstruction
virtual ~CmsMTDAbstractConstruction ()=default
 

Private Member Functions

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

Additional Inherited Members

- 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

Classes which abuilds all the tracker substructures

Definition at line 11 of file CmsMTDSubStrctBuilder.h.

Constructor & Destructor Documentation

CmsMTDSubStrctBuilder::CmsMTDSubStrctBuilder ( )

Definition at line 12 of file CmsMTDSubStrctBuilder.cc.

13 {}

Member Function Documentation

void CmsMTDSubStrctBuilder::buildComponent ( DDFilteredView fv,
GeometricTimingDet g,
std::string  side 
)
overrideprivatevirtual

Implements CmsMTDLevelBuilder.

Definition at line 16 of file CmsMTDSubStrctBuilder.cc.

References GeometricTimingDet::addComponent(), GeometricTimingDet::BTLLayer, CmsMTDLevelBuilder::build(), Exception, DDName::fullname(), DDFilteredView::logicalPart(), DDBase< N, C >::name(), CmsMTDLevelBuilder::theCmsMTDStringToEnum, and CmsMTDStringToEnum::type().

17 {
18  CmsMTDTrayBuilder theCmsMTDTrayBuilder;
19 
21 
22  switch( theCmsMTDStringToEnum.type( fv.logicalPart().name().fullname() ) ) {
24  theCmsMTDTrayBuilder.build(fv,subdet,side);
25  break;
26 
27  default:
28  throw cms::Exception("CmsMTDSubStrctBuilder")<<" ERROR - I was expecting a BTLLayer... I got a "<< fv.logicalPart().name().fullname();
29  }
30 
31  g->addComponent(subdet);
32 }
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 CmsMTDSubStrctBuilder::sortNS ( DDFilteredView fv,
GeometricTimingDet det 
)
overrideprivatevirtual

Reimplemented from CmsMTDLevelBuilder.

Definition at line 36 of file CmsMTDSubStrctBuilder.cc.

References GeometricTimingDet::BTLLayer, AlCaHLTBitMon_QueryRunRegistry::comp, GeometricTimingDet::component(), GeometricTimingDet::components(), mps_fire::i, CmsMTDLevelBuilder::isLessR(), and GeometricTimingDet::setGeographicalID().

37 {
39 
40  switch( comp.front()->type())
41  {
43  std::stable_sort( comp.begin(), comp.end(), isLessR);
44  break;
45  default:
46  edm::LogError( "CmsMTDSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
47  }
48 
49  for( uint32_t i = 0; i < comp.size(); i++ )
50  {
51  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
52  }
53 }
static bool isLessR(const GeometricTimingDet *a, const GeometricTimingDet *b)
ConstGeometricTimingDetContainer & components()
GeometricTimingDet * component(size_t index)
void setGeographicalID(DetId id)
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer