CMS 3D CMS Logo

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

#include <CmsMTDEndcapBuilder.h>

Inheritance diagram for CmsMTDEndcapBuilder:
CmsMTDLevelBuilder CmsMTDAbstractConstruction

Public Member Functions

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

Class which builds the ETL

Definition at line 11 of file CmsMTDEndcapBuilder.h.

Constructor & Destructor Documentation

CmsMTDEndcapBuilder::CmsMTDEndcapBuilder ( )

Definition at line 12 of file CmsMTDEndcapBuilder.cc.

13 {}

Member Function Documentation

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

Implements CmsMTDLevelBuilder.

Definition at line 16 of file CmsMTDEndcapBuilder.cc.

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

17 {
18  CmsMTDDiscBuilder theCmsMTDDiscBuilder;
19 
21  std::string subdet_name = subdet->name().fullname();
23  {
25  theCmsMTDDiscBuilder.build(fv,subdet,s);
26  break;
27  default:
28  throw cms::Exception("CmsMTDEndcapBuilder")<<" ERROR - I was expecting a Disk... 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
DDName const & name() const
void CmsMTDEndcapBuilder::sortNS ( DDFilteredView fv,
GeometricTimingDet det 
)
overrideprivatevirtual

Reimplemented from CmsMTDLevelBuilder.

Definition at line 37 of file CmsMTDEndcapBuilder.cc.

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

38 {
40 
41  std::stable_sort( comp.begin(), comp.end(), isLessModZ);
42 
43  for( uint32_t i = 0; i < comp.size(); i++ )
44  {
45  const uint32_t side = det->component(i)->translation().z() > 0 ? 1 : 0;
46  det->component(i)->setGeographicalID(ETLDetId(side,0,0,0));
47  }
48 }
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
static bool isLessModZ(const GeometricTimingDet *a, const GeometricTimingDet *b)
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer