CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions
CmsTrackerSubStrctBuilder< FilteredView > Class Template Reference

#include <CmsTrackerSubStrctBuilder.h>

Inheritance diagram for CmsTrackerSubStrctBuilder< FilteredView >:
CmsTrackerLevelBuilder< FilteredView > CmsTrackerAbstractConstruction< FilteredView >

Public Member Functions

 CmsTrackerSubStrctBuilder ()
 
- Public Member Functions inherited from CmsTrackerLevelBuilder< FilteredView >
void build (FilteredView &, GeometricDet *, const std::string &) override
 
template<>
void build (DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
template<>
void build (cms::DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
 ~CmsTrackerLevelBuilder () override
 
- Public Member Functions inherited from CmsTrackerAbstractConstruction< FilteredView >
virtual ~CmsTrackerAbstractConstruction ()=default
 

Private Member Functions

void buildComponent (FilteredView &, GeometricDet *, const std::string &) override
 
void sortNS (FilteredView &, GeometricDet *) override
 

Additional Inherited Members

- Protected Attributes inherited from CmsTrackerLevelBuilder< FilteredView >
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

template<class FilteredView>
class CmsTrackerSubStrctBuilder< FilteredView >

Classes which abuilds all the tracker substructures

Definition at line 12 of file CmsTrackerSubStrctBuilder.h.

Constructor & Destructor Documentation

template<class FilteredView>
CmsTrackerSubStrctBuilder< FilteredView >::CmsTrackerSubStrctBuilder ( )
inline

Definition at line 14 of file CmsTrackerSubStrctBuilder.h.

14 {}

Member Function Documentation

template<class FilteredView >
void CmsTrackerSubStrctBuilder< FilteredView >::buildComponent ( FilteredView &  fv,
GeometricDet g,
const std::string &  s 
)
overrideprivatevirtual

Implements CmsTrackerLevelBuilder< FilteredView >.

Definition at line 17 of file CmsTrackerSubStrctBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder< FilteredView >::build(), GeometricDet::disk, ExtractStringFromDDD< FilteredView >::getString(), GeometricDet::layer, GeometricDet::OTPhase2Layer, and GeometricDet::wheel.

17  {
18  CmsTrackerLayerBuilder<FilteredView> theCmsTrackerLayerBuilder;
19  CmsTrackerOTLayerBuilder<FilteredView> theCmsTrackerOTLayerBuilder;
20  CmsTrackerWheelBuilder<FilteredView> theCmsTrackerWheelBuilder;
21  CmsTrackerDiskBuilder<FilteredView> theCmsTrackerDiskBuilder;
22 
23  GeometricDet* subdet = new GeometricDet(&fv,
29  theCmsTrackerLayerBuilder.build(fv, subdet, s);
30  break;
32  theCmsTrackerOTLayerBuilder.build(fv, subdet, s);
33  break;
35  theCmsTrackerWheelBuilder.build(fv, subdet, s);
36  break;
37  case GeometricDet::disk:
38  theCmsTrackerDiskBuilder.build(fv, subdet, s);
39  break;
40 
41  default:
42  edm::LogError("CmsTrackerSubStrctBuilder") << " ERROR - I was expecting a Layer ,Wheel or Disk... I got a "
44  }
45 
46  g->addComponent(subdet);
47 }
static std::string getString(const std::string &, FilteredView *)
void addComponent(GeometricDet *)
Log< level::Error, false > LogError
void build(FilteredView &, GeometricDet *, const std::string &) override
template<class FilteredView >
void CmsTrackerSubStrctBuilder< FilteredView >::sortNS ( FilteredView &  fv,
GeometricDet det 
)
overrideprivatevirtual

Reimplemented from CmsTrackerLevelBuilder< FilteredView >.

Definition at line 50 of file CmsTrackerSubStrctBuilder.cc.

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

50  {
52 
53  switch (comp.front()->type()) {
55  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessR);
56  break;
58  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessR);
59  break;
61  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessModZ);
62  break;
63  case GeometricDet::disk:
64  std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessModZ);
65  break;
66  default:
67  edm::LogError("CmsTrackerSubStrctBuilder")
68  << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
69  }
70 
71  for (uint32_t i = 0; i < comp.size(); i++) {
72  det->component(i)->setGeographicalID(i + 1); // Every subdetector: Layer/Disk/Wheel Number
73  }
74 }
void setGeographicalID(DetId id)
Definition: GeometricDet.h:99
Log< level::Error, false > LogError
static bool isLessModZ(const GeometricDet *a, const GeometricDet *b)
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:152
static bool isLessR(const GeometricDet *a, const GeometricDet *b)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:148
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34