CMS 3D CMS Logo

List of all members | Private Member Functions | Private Attributes
CmsTrackerRingBuilder< FilteredView > Class Template Reference

#include <CmsTrackerRingBuilder.h>

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

Private Member Functions

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

Private Attributes

std::string moduleName_
 

Additional Inherited Members

- 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
 
- Protected Attributes inherited from CmsTrackerLevelBuilder< FilteredView >
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

template<class FilteredView>
class CmsTrackerRingBuilder< FilteredView >

Class which constructs TID/TEC rings

Definition at line 12 of file CmsTrackerRingBuilder.h.

Member Function Documentation

◆ buildComponent()

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

Implements CmsTrackerLevelBuilder< FilteredView >.

Definition at line 15 of file CmsTrackerRingBuilder.cc.

References CmsDetConstruction< FilteredView >::buildComponent(), g, ExtractStringFromDDD< FilteredView >::getString(), and alignCSCRings::s.

15  {
17 
18  CmsDetConstruction<FilteredView> theCmsDetConstruction;
19  theCmsDetConstruction.buildComponent(fv, g, s);
20 }
static std::string getString(const std::string &, FilteredView *)
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
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override

◆ sortNS()

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

Reimplemented from CmsTrackerLevelBuilder< FilteredView >.

Definition at line 23 of file CmsTrackerRingBuilder.cc.

References funct::abs(), GeometricDet::addComponents(), GeometricDet::clearComponents(), AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), GeometricDet::DetUnit, CmsTrackerLevelBuilderHelper::getPhi(), CmsTrackerLevelBuilderHelper::getPhiGluedModule(), CmsTrackerLevelBuilderHelper::getPhiGluedModuleMirror(), CmsTrackerLevelBuilderHelper::getPhiMirror(), mps_fire::i, GeometricDet::mergedDet, GeometricDet::setGeographicalID(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, trackerStablePhiSort(), GeometricDet::translation(), and detailsBasic3DVector::z.

23  {
27 
28  switch (comp.front()->type()) {
31  break;
34  break;
35  default:
36  edm::LogError("CmsTrackerRingBuilder")
37  << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
38  }
39 
40  static std::string const TECGluedDet("TECGluedDet");
41  static std::string const TECDet("TECDet");
42 
43  // TEC
44  // Module Number: 3 bits [1,...,5 at most]
45  if (moduleName_ == TECGluedDet || moduleName_ == TECDet) {
46  // TEC-
47  if (det->translation().z() < 0 && moduleName_ == TECDet) {
49  }
50 
51  if (det->translation().z() < 0 && moduleName_ == TECGluedDet) {
53  }
54 
55  for (uint32_t i = 0; i < comp.size(); i++)
56  det->component(i)->setGeographicalID(i + 1);
57 
58  } else {
59  // TID
60  // Ring Side: 2 bits [back:1 front:2]
61  // Module Number: 5 bits [1,...,20 at most]
62  //
63  for (uint32_t i = 0; i < comp.size(); i++) {
64  if (std::abs(comp[i]->translation().z()) < std::abs(det->translation().z())) {
65  compfw.emplace_back(det->component(i));
66  } else {
67  compbw.emplace_back(det->component(i));
68  }
69  }
70 
71  for (uint32_t i = 0; i < compbw.size(); i++) {
72  uint32_t temp = i + 1;
73  temp |= (1 << 5);
74  compbw[i]->setGeographicalID(temp);
75  }
76 
77  for (uint32_t i = 0; i < compfw.size(); i++) {
78  uint32_t temp = i + 1;
79  temp |= (2 << 5);
80  compfw[i]->setGeographicalID(temp);
81  }
82 
83  det->clearComponents();
84  det->addComponents(compfw);
85  det->addComponents(compbw);
86  }
87 }
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:35
void clearComponents()
Definition: GeometricDet.h:165
void setGeographicalID(DetId id)
Definition: GeometricDet.h:100
static double getPhiMirror(const GeometricDet *a)
Log< level::Error, false > LogError
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:154
const Translation & translation() const
Definition: GeometricDet.h:103
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static double getPhiGluedModuleMirror(const GeometricDet *a)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:150
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
void addComponents(GeometricDetContainer const &cont)
static double getPhiGluedModule(const GeometricDet *a)
static double getPhi(const GeometricDet *a)

Member Data Documentation

◆ moduleName_

template<class FilteredView>
std::string CmsTrackerRingBuilder< FilteredView >::moduleName_
private

Definition at line 17 of file CmsTrackerRingBuilder.h.