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

- Static Public Member Functions inherited from CmsTrackerLevelBuilder
static double getPhi (const GeometricDet *a)
 
static double getPhiGluedModule (const GeometricDet *a)
 
static double getPhiGluedModuleMirror (const GeometricDet *a)
 
static double getPhiMirror (const GeometricDet *a)
 
static double getPhiModule (const GeometricDet *a)
 
static double getPhiModuleMirror (const GeometricDet *a)
 
static bool isLessModZ (const GeometricDet *a, const GeometricDet *b)
 
static bool isLessR (const GeometricDet *a, const GeometricDet *b)
 
static bool isLessRModule (const GeometricDet *a, const GeometricDet *b)
 
static bool isLessZ (const GeometricDet *a, const GeometricDet *b)
 
static bool phiSortNP (const GeometricDet *a, const GeometricDet *b)
 
static bool subDetByType (const GeometricDet *a, const GeometricDet *b)
 
- 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 
)
overrideprivatevirtual

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 }
void addComponent(GeometricDet *)
void build(DDFilteredView &, GeometricDet *, std::string) override
static std::string getString(std::string const &, DDFilteredView *)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsTrackerSubStrctBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
overrideprivatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 51 of file CmsTrackerSubStrctBuilder.cc.

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

52 {
54 
55  switch( comp.front()->type())
56  {
58  std::sort( comp.begin(), comp.end(), isLessR);
59  break;
61  std::sort( comp.begin(), comp.end(), isLessR);
62  break;
64  std::sort( comp.begin(), comp.end(), isLessModZ);
65  break;
66  case GeometricDet::disk:
67  std::sort( comp.begin(), comp.end(), isLessModZ);
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
static bool isLessModZ(const GeometricDet *a, const GeometricDet *b)
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:176
static bool isLessR(const GeometricDet *a, const GeometricDet *b)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36