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 
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:149
CmsDetConstruction.h
GeometricDet::DetUnit
Definition: GeometricDet.h:65
trackerStablePhiSort
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
Definition: trackerStablePhiSort.h:9
GeometricDet::translation
const Translation & translation() const
Definition: GeometricDet.h:100
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
CmsTrackerLevelBuilderHelper::getPhiGluedModule
static double getPhiGluedModule(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:83
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
CmsTrackerLevelBuilderHelper::getPhi
static double getPhi(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:44
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDFilteredView.h
GeometricDet::mergedDet
Definition: GeometricDet.h:64
CmsTrackerRingBuilder::buildComponent
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
Definition: CmsTrackerRingBuilder.cc:15
CmsTrackerRingBuilder.h
GeometricDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
GeometricDet
Definition: GeometricDet.h:31
DDFilteredView.h
CmsTrackerLevelBuilderHelper::getPhiMirror
static double getPhiMirror(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:118
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CmsTrackerLevelBuilderHelper::getPhiGluedModuleMirror
static double getPhiGluedModuleMirror(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:130
GeometricDet::addComponents
void addComponents(GeometricDetContainer const &cont)
Definition: GeometricDet.cc:240
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GeometricDet.h
CmsTrackerRingBuilder::sortNS
void sortNS(FilteredView &, GeometricDet *) override
Definition: CmsTrackerRingBuilder.cc:23
CmsTrackerRingBuilder
Definition: CmsTrackerRingBuilder.h:12
CmsDetConstruction
Definition: CmsDetConstruction.h:12
ExtractStringFromDDD.h
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:145
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
DetId.h
CmsDetConstruction::buildComponent
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
trackerStablePhiSort.h
GeometricDet::GeometricDetContainer
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:35
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GeometricDet::clearComponents
void clearComponents()
Definition: GeometricDet.h:160
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