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 | Private Attributes
CmsTrackerSubStrctBuilder Class Reference

#include <CmsTrackerSubStrctBuilder.h>

Inheritance diagram for CmsTrackerSubStrctBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Public Member Functions

 CmsTrackerSubStrctBuilder (unsigned int totalBlade)
 
- 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 *)
 

Private Attributes

unsigned int m_totalBlade
 

Additional Inherited Members

- Protected Attributes inherited from CmsTrackerLevelBuilder
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

Classes which abuilds all the tracker substructures

Definition at line 11 of file CmsTrackerSubStrctBuilder.h.

Constructor & Destructor Documentation

CmsTrackerSubStrctBuilder::CmsTrackerSubStrctBuilder ( unsigned int  totalBlade)

Definition at line 14 of file CmsTrackerSubStrctBuilder.cc.

15  : m_totalBlade( totalBlade )
16 {}

Member Function Documentation

void CmsTrackerSubStrctBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
)
privatevirtual

Implements CmsTrackerLevelBuilder.

Definition at line 19 of file CmsTrackerSubStrctBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), GeometricDet::disk, ExtractStringFromDDD::getString(), GeometricDet::layer, m_totalBlade, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, CmsTrackerStringToEnum::type(), and GeometricDet::wheel.

20 {
21  CmsTrackerLayerBuilder theCmsTrackerLayerBuilder;
22  CmsTrackerWheelBuilder theCmsTrackerWheelBuilder;
23  CmsTrackerDiskBuilder theCmsTrackerDiskBuilder( m_totalBlade );
24 
27  {
29  theCmsTrackerLayerBuilder.build(fv,subdet,s);
30  break;
32  theCmsTrackerWheelBuilder.build(fv,subdet,s);
33  break;
34  case GeometricDet::disk:
35  theCmsTrackerDiskBuilder.build(fv,subdet,s);
36  break;
37 
38  default:
39  edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
40  }
41 
42  g->addComponent(subdet);
43 
44 }
static std::string getString(std::string const &, DDFilteredView *)
void addComponent(GeometricDet *)
virtual void build(DDFilteredView &, GeometricDet *, std::string)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsTrackerSubStrctBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
privatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 47 of file CmsTrackerSubStrctBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), GeometricDet::disk, i, GeometricDet::layer, GeometricDet::setGeographicalID(), python.multivaluedict::sort(), and GeometricDet::wheel.

48 {
50 
51  switch( comp.front()->type())
52  {
54  std::sort( comp.begin(), comp.end(), LessR());
55  break;
57  std::sort( comp.begin(), comp.end(), LessModZ());
58  break;
59  case GeometricDet::disk:
60  std::sort( comp.begin(), comp.end(), LessModZ());
61  break;
62  default:
63  edm::LogError( "CmsTrackerSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
64  }
65 
66  for( uint32_t i = 0; i < comp.size(); i++ )
67  {
68  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
69  }
70 }
int i
Definition: DBlmapReader.cc:9
void setGeographicalID(DetId id)
Definition: GeometricDet.h:75
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:169
GeometricDet * component(size_t index)
Definition: GeometricDet.h:107
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36

Member Data Documentation

unsigned int CmsTrackerSubStrctBuilder::m_totalBlade
private

Definition at line 19 of file CmsTrackerSubStrctBuilder.h.

Referenced by buildComponent().