CMS 3D CMS Logo

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

#include <CmsMTDBuilder.h>

Inheritance diagram for CmsMTDBuilder:
CmsMTDLevelBuilder CmsMTDAbstractConstruction

Public Member Functions

 CmsMTDBuilder ()
 
- 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

Abstract Class to construct a Level in the hierarchy

Definition at line 11 of file CmsMTDBuilder.h.

Constructor & Destructor Documentation

CmsMTDBuilder::CmsMTDBuilder ( )

Definition at line 13 of file CmsMTDBuilder.cc.

14 {}

Member Function Documentation

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

Implements CmsMTDLevelBuilder.

Definition at line 17 of file CmsMTDBuilder.cc.

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

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 }
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 CmsMTDBuilder::sortNS ( DDFilteredView fv,
GeometricTimingDet det 
)
overrideprivatevirtual

Reimplemented from CmsMTDLevelBuilder.

Definition at line 42 of file CmsMTDBuilder.cc.

References GeometricTimingDet::BTL, AlCaHLTBitMon_QueryRunRegistry::comp, GeometricTimingDet::component(), GeometricTimingDet::components(), GeometricTimingDet::ETL, Exception, mps_fire::i, GeometricTimingDet::setGeographicalID(), CmsMTDLevelBuilder::subDetByType(), and GeometricTimingDet::translation().

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 }
type
Definition: HCALResponse.h:21
static bool subDetByType(const GeometricTimingDet *a, const GeometricTimingDet *b)
ConstGeometricTimingDetContainer & components()
DDTranslation const & translation() const
GeometricTimingDet * component(size_t index)
void setGeographicalID(DetId id)
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:18
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer