CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
virtual void build (DDFilteredView &, GeometricDet *, std::string)
 
virtual ~CmsTrackerLevelBuilder ()
 

Private Member Functions

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

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 
)
privatevirtual

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 *)
virtual void build(DDFilteredView &, GeometricDet *, std::string)
DDName const & name() const
Definition: GeometricDet.h:144
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsTrackerPixelPhase1EndcapBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
privatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 38 of file CmsTrackerPixelPhase1EndcapBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), 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 }
int i
Definition: DBlmapReader.cc:9
void setGeographicalID(DetId id)
Definition: GeometricDet.h:80
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:174
GeometricDet * component(size_t index)
Definition: GeometricDet.h:112
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36