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 
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:139
CmsDetConstruction.h
GeometricDet::DetUnit
Definition: GeometricDet.h:69
trackerStablePhiSort
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
Definition: trackerStablePhiSort.h:9
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
CmsTrackerLevelBuilderHelper::getPhiGluedModule
static double getPhiGluedModule(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:81
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
CmsTrackerLevelBuilderHelper::getPhi
static double getPhi(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:42
alignCSCRings.s
s
Definition: alignCSCRings.py:92
part
part
Definition: HCALResponse.h:20
DDFilteredView.h
GeometricDet::mergedDet
Definition: GeometricDet.h:68
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:30
DDFilteredView.h
unpackData-CaloStage2.pname
pname
Definition: unpackData-CaloStage2.py:76
CmsTrackerLevelBuilderHelper::getPhiMirror
static double getPhiMirror(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:116
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CmsTrackerLevelBuilderHelper::getPhiGluedModuleMirror
static double getPhiGluedModuleMirror(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:128
edm::LogError
Definition: MessageLogger.h:183
GeometricDet::addComponents
void addComponents(GeometricDetContainer const &cont)
Definition: GeometricDet.cc:200
GeometricDet.h
CmsTrackerRingBuilder::sortNS
void sortNS(FilteredView &, GeometricDet *) override
Definition: CmsTrackerRingBuilder.cc:21
CmsTrackerRingBuilder
Definition: CmsTrackerRingBuilder.h:12
CmsDetConstruction
Definition: CmsDetConstruction.h:12
ExtractStringFromDDD.h
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:33
DetId.h
CmsDetConstruction::buildComponent
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
Definition: CmsDetConstruction.cc:50
trackerStablePhiSort.h
GeometricDet::GeometricDetContainer
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:34
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GeometricDet::translation
Translation const & translation() const
Definition: GeometricDet.h:120
GeometricDet::clearComponents
void clearComponents()
Definition: GeometricDet.h:104
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