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 16 of file CmsMTDSubStrctBuilder.cc.

17 {}

Member Function Documentation

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

Implements CmsMTDLevelBuilder.

Definition at line 20 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().

21 {
22  CmsMTDTrayBuilder theCmsMTDTrayBuilder;
23 
25 
26  switch( theCmsMTDStringToEnum.type( fv.logicalPart().name().fullname() ) ) {
28  theCmsMTDTrayBuilder.build(fv,subdet,side);
29  break;
30 
31  default:
32  throw cms::Exception("CmsMTDSubStrctBuilder")<<" ERROR - I was expecting a BTLLayer... I got a "<< fv.logicalPart().name().fullname();
33  }
34 
35  g->addComponent(subdet);
36 }
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 40 of file CmsMTDSubStrctBuilder.cc.

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

41 {
43 
44  switch( comp.front()->type())
45  {
47  std::stable_sort( comp.begin(), comp.end(), isLessR);
48  break;
49  default:
50  edm::LogError( "CmsMTDSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
51  }
52 
53  for( uint32_t i = 0; i < comp.size(); i++ )
54  {
55  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
56  }
57 }
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