CMS 3D CMS Logo

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

#include <CmsTrackerPixelPhase1EndcapBuilder.h>

Inheritance diagram for CmsTrackerPixelPhase1EndcapBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Public Member Functions

 CmsTrackerPixelPhase1EndcapBuilder ()
 
- Public Member Functions inherited from CmsTrackerLevelBuilder
void build (DDFilteredView &, GeometricDet *, std::string) override
 
 ~CmsTrackerLevelBuilder () override
 
- Public Member Functions inherited from CmsTrackerAbstractConstruction
virtual ~CmsTrackerAbstractConstruction ()=default
 

Private Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from CmsTrackerLevelBuilder
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

Class which builds the pixel phase 1 endcap

Definition at line 11 of file CmsTrackerPixelPhase1EndcapBuilder.h.

Constructor & Destructor Documentation

CmsTrackerPixelPhase1EndcapBuilder::CmsTrackerPixelPhase1EndcapBuilder ( )

Definition at line 12 of file CmsTrackerPixelPhase1EndcapBuilder.cc.

13 {}

Member Function Documentation

void CmsTrackerPixelPhase1EndcapBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
)
overrideprivatevirtual

Implements CmsTrackerLevelBuilder.

Definition at line 16 of file CmsTrackerPixelPhase1EndcapBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), ExtractStringFromDDD::getString(), LogDebug, GeometricDet::name(), GeometricDet::PixelPhase1Disk, AlCaHLTBitMon_QueryRunRegistry::string, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, and CmsTrackerStringToEnum::type().

17 {
18  CmsTrackerPhase1DiskBuilder theCmsTrackerPhase1DiskBuilder;
19 
21  std::string subdet_name = subdet->name();
23  {
25  LogDebug("DiskNames") << "The name of the components is: " << subdet_name;
26  theCmsTrackerPhase1DiskBuilder.build(fv,subdet,s);
27  break;
28 
29  default:
30  edm::LogError("CmsTrackerPixelPhase1EndcapBuilder")<<" ERROR - I was expecting a Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
31  }
32 
33  g->addComponent(subdet);
34 
35 }
#define LogDebug(id)
static std::string getString(std::string const &, DDFilteredView *)
void addComponent(GeometricDet *)
void build(DDFilteredView &, GeometricDet *, std::string) override
DDName const & name() const
Definition: GeometricDet.h:146
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsTrackerPixelPhase1EndcapBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
overrideprivatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 38 of file CmsTrackerPixelPhase1EndcapBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), mps_fire::i, GeometricDet::PixelPhase1Disk, and GeometricDet::setGeographicalID().

39 {
41 
42  switch( comp.front()->type())
43  {
45  std::sort( comp.begin(), comp.end(), LessModZ());
46  break;
47  default:
48  edm::LogError( "CmsTrackerPixelPhase1EndcapBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
49  }
50 
51  for( uint32_t i = 0; i < comp.size(); i++ )
52  {
53  det->component(i)->setGeographicalID(i+1); // Every subdetector: Disk Number
54  }
55 }
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:176
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36