CMS 3D CMS Logo

CmsTrackerRingBuilder.cc
Go to the documentation of this file.
10 
11 #include <vector>
12 #include <bitset>
13 
14 template <class FilteredView>
16  moduleName_ = ExtractStringFromDDD<FilteredView>::getString("TkDDDStructure", &fv);
17 
18  CmsDetConstruction<FilteredView> theCmsDetConstruction;
19  theCmsDetConstruction.buildComponent(fv, g, s);
20 }
21 
22 template <class FilteredView>
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 }
88 
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:35
static std::string getString(const std::string &, FilteredView *)
void clearComponents()
Definition: GeometricDet.h:163
void setGeographicalID(DetId id)
Definition: GeometricDet.h:99
static double getPhiMirror(const GeometricDet *a)
Log< level::Error, false > LogError
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
float float float z
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:152
const Translation & translation() const
Definition: GeometricDet.h:102
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:148
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
void sortNS(FilteredView &, GeometricDet *) override
void addComponents(GeometricDetContainer const &cont)
static double getPhiGluedModule(const GeometricDet *a)
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
static double getPhi(const GeometricDet *a)