test
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
CmsTrackerSubStrctBuilder Class Reference

#include <CmsTrackerSubStrctBuilder.h>

Inheritance diagram for CmsTrackerSubStrctBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Public Member Functions

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

Classes which abuilds all the tracker substructures

Definition at line 11 of file CmsTrackerSubStrctBuilder.h.

Constructor & Destructor Documentation

CmsTrackerSubStrctBuilder::CmsTrackerSubStrctBuilder ( )

Definition at line 14 of file CmsTrackerSubStrctBuilder.cc.

15 {}

Member Function Documentation

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

Implements CmsTrackerLevelBuilder.

Definition at line 18 of file CmsTrackerSubStrctBuilder.cc.

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

19 {
20  CmsTrackerLayerBuilder theCmsTrackerLayerBuilder;
21  CmsTrackerWheelBuilder theCmsTrackerWheelBuilder;
22  CmsTrackerDiskBuilder theCmsTrackerDiskBuilder;
23 
26  {
28  theCmsTrackerLayerBuilder.build(fv,subdet,s);
29  break;
31  theCmsTrackerLayerBuilder.build(fv,subdet,s);
32  break;
34  theCmsTrackerWheelBuilder.build(fv,subdet,s);
35  break;
36  case GeometricDet::disk:
37  theCmsTrackerDiskBuilder.build(fv,subdet,s);
38  break;
39 
40  default:
41  edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
42  }
43 
44  g->addComponent(subdet);
45 
46 }
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 49 of file CmsTrackerSubStrctBuilder.cc.

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

50 {
52 
53  switch( comp.front()->type())
54  {
56  std::sort( comp.begin(), comp.end(), LessR());
57  break;
59  std::sort( comp.begin(), comp.end(), LessR());
60  break;
62  std::sort( comp.begin(), comp.end(), LessModZ());
63  break;
64  case GeometricDet::disk:
65  std::sort( comp.begin(), comp.end(), LessModZ());
66  break;
67  default:
68  edm::LogError( "CmsTrackerSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
69  }
70 
71  for( uint32_t i = 0; i < comp.size(); i++ )
72  {
73  det->component(i)->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
74  }
75 }
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