CMS 3D CMS Logo

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 >
template<>
void build (cms::DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
template<>
void build (DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
void build (FilteredView &, GeometricDet *, const std::string &) override
 
 ~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

◆ CmsTrackerSubStrctBuilder()

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

Definition at line 14 of file CmsTrackerSubStrctBuilder.h.

14 {}

Member Function Documentation

◆ buildComponent()

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.

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 }

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

◆ sortNS()

template<class FilteredView >
void CmsTrackerSubStrctBuilder< FilteredView >::sortNS ( FilteredView &  fv,
GeometricDet det 
)
overrideprivatevirtual

Reimplemented from CmsTrackerLevelBuilder< FilteredView >.

Definition at line 50 of file CmsTrackerSubStrctBuilder.cc.

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 }

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.

GeometricDet::OTPhase2Layer
Definition: GeometricDet.h:73
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
CmsTrackerLevelBuilder
Definition: CmsTrackerLevelBuilder.h:31
mps_fire.i
i
Definition: mps_fire.py:428
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:149
GeometricDet::wheel
Definition: GeometricDet.h:58
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
ExtractStringFromDDD
Definition: ExtractStringFromDDD.h:12
CmsTrackerLevelBuilderHelper::isLessR
static bool isLessR(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:140
CmsTrackerDiskBuilder
Definition: CmsTrackerDiskBuilder.h:12
alignCSCRings.s
s
Definition: alignCSCRings.py:92
GeometricDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
GeometricDet::disk
Definition: GeometricDet.h:66
GeometricDet
Definition: GeometricDet.h:31
CmsTrackerLevelBuilderHelper::isLessModZ
static bool isLessModZ(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:40
CmsTrackerLevelBuilder::build
void build(FilteredView &, GeometricDet *, const std::string &) override
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
CmsTrackerWheelBuilder
Definition: CmsTrackerWheelBuilder.h:12
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CmsTrackerLayerBuilder
Definition: CmsTrackerLayerBuilder.h:12
CmsTrackerOTLayerBuilder
Definition: CmsTrackerOTLayerBuilder.h:12
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:145
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
GeometricDet::layer
Definition: GeometricDet.h:57
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4