CMS 3D CMS Logo

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 ()
 
- Public Member Functions inherited from CmsTrackerAbstractConstruction
virtual ~CmsTrackerAbstractConstruction ()=default
 

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 15 of file CmsTrackerSubStrctBuilder.cc.

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, GeometricDet::OTPhase2Layer, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, CmsTrackerStringToEnum::type(), and GeometricDet::wheel.

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

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

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