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  CmsDetConstruction<FilteredView> theCmsDetConstruction;
17  theCmsDetConstruction.buildComponent(fv, g, s);
18 }
19 
20 template <class FilteredView>
23  fv.firstChild();
26 
27  switch (comp.front()->type()) {
30  break;
33  break;
34  default:
35  edm::LogError("CmsTrackerRingBuilder")
36  << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
37  }
38 
39  static std::string const part("TkDDDStructure");
40  static std::string const TECGluedDet("TECGluedDet");
41  static std::string const TECDet("TECDet");
42 
44 
45  // TEC
46  // Module Number: 3 bits [1,...,5 at most]
47  if (pname == TECGluedDet || pname == TECDet) {
48  // TEC-
49  if (det->translation().z() < 0 && pname == TECDet) {
51  }
52 
53  if (det->translation().z() < 0 && pname == TECGluedDet) {
55  }
56 
57  for (uint32_t i = 0; i < comp.size(); i++)
58  det->component(i)->setGeographicalID(i + 1);
59 
60  } else {
61  // TID
62  // Ring Side: 2 bits [back:1 front:2]
63  // Module Number: 5 bits [1,...,20 at most]
64  //
65  for (uint32_t i = 0; i < comp.size(); i++) {
66  if (std::abs(comp[i]->translation().z()) < std::abs(det->translation().z())) {
67  compfw.emplace_back(det->component(i));
68  } else {
69  compbw.emplace_back(det->component(i));
70  }
71  }
72 
73  for (uint32_t i = 0; i < compbw.size(); i++) {
74  uint32_t temp = i + 1;
75  temp |= (1 << 5);
76  compbw[i]->setGeographicalID(temp);
77  }
78 
79  for (uint32_t i = 0; i < compfw.size(); i++) {
80  uint32_t temp = i + 1;
81  temp |= (2 << 5);
82  compfw[i]->setGeographicalID(temp);
83  }
84 
85  det->clearComponents();
86  det->addComponents(compfw);
87  det->addComponents(compbw);
88  }
89 
90  fv.parent();
91 }
92 
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:34
void clearComponents()
Definition: GeometricDet.h:104
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
static double getPhiMirror(const GeometricDet *a)
Translation const & translation() const
Definition: GeometricDet.h:120
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:139
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:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:33
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
static std::string getString(std::string const &, DDFilteredView *)
part
Definition: HCALResponse.h:20
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)