CMS 3D CMS Logo

CmsTrackerWheelBuilder.cc
Go to the documentation of this file.
11 
12 #include <vector>
13 #include <bitset>
14 
15 template <class FilteredView>
17  CmsTrackerRingBuilder<FilteredView> theCmsTrackerRingBuilder;
18  CmsTrackerPetalBuilder<FilteredView> theCmsTrackerPetalBuilder;
19 
20  GeometricDet* subdet = new GeometricDet(&fv,
25  case GeometricDet::ring:
26  theCmsTrackerRingBuilder.build(fv, subdet, s);
27  break;
29  theCmsTrackerPetalBuilder.build(fv, subdet, s);
30  break;
31  default:
32  edm::LogError("CmsTrackerWheelBuilder") << " ERROR - I was expecting a Ring or Petal, I got a "
34  }
35  g->addComponent(subdet);
36 }
37 
38 template <class FilteredView>
41 
42  if (!comp.empty()) {
43  if (comp.front()->type() == GeometricDet::petal) {
46  compfw.clear();
47  compbw.clear();
48  for (uint32_t i = 0; i < comp.size(); i++) {
49  if (std::abs(comp[i]->translation().z()) < std::abs(det->translation().z())) {
50  compfw.emplace_back(det->component(i));
51  } else {
52  compbw.emplace_back(det->component(i));
53  }
54  }
55 
58 
59  //
60  // TEC
61  // Wheel Part: 3 bits [back:1 front:2]
62  // Petal Number: 4 bits [1,...,8]
63  //
64  for (uint32_t i = 0; i < compbw.size(); i++) {
65  uint32_t temp = i + 1;
66  temp |= (1 << 4);
67  compbw[i]->setGeographicalID(DetId(temp));
68  }
69  for (uint32_t i = 0; i < compfw.size(); i++) {
70  uint32_t temp = i + 1;
71  temp |= (2 << 4);
72  compfw[i]->setGeographicalID(DetId(temp));
73  }
74 
75  det->clearComponents();
76  det->addComponents(compfw);
77  det->addComponents(compbw);
78 
79  } else {
80  std::stable_sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessRModule);
81 
82  // TID
83  // Disk Number: 2 bits [1,2,3]
84  for (uint32_t i = 0; i < comp.size(); i++) {
85  det->component(i)->setGeographicalID(DetId(i + 1));
86  }
87  }
88  } else {
89  edm::LogError("CmsTrackerWheelBuilder") << "Where are the Petals or Rings?";
90  }
91 }
92 
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
CmsTrackerLevelBuilder
Definition: CmsTrackerLevelBuilder.h:31
AlCaHLTBitMon_QueryRunRegistry.comp
string comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
GeometricDet::petal
Definition: GeometricDet.h:61
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:150
trackerStablePhiSort
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
Definition: trackerStablePhiSort.h:9
GeometricDet::ring
Definition: GeometricDet.h:62
GeometricDet::translation
const Translation & translation() const
Definition: GeometricDet.h:100
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
ExtractStringFromDDD
Definition: ExtractStringFromDDD.h:12
CmsTrackerLevelBuilderHelper::getPhiModule
static double getPhiModule(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:49
CmsTrackerWheelBuilder::sortNS
void sortNS(FilteredView &, GeometricDet *) override
Definition: CmsTrackerWheelBuilder.cc:39
DetId
Definition: DetId.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDFilteredView.h
CmsTrackerRingBuilder.h
GeometricDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
CmsTrackerWheelBuilder.h
CmsTrackerPetalBuilder
Definition: CmsTrackerPetalBuilder.h:12
GeometricDet
Definition: GeometricDet.h:31
DDFilteredView.h
CmsTrackerLevelBuilder::build
void build(FilteredView &, GeometricDet *, const std::string &) override
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
GeometricDet::addComponents
void addComponents(GeometricDetContainer const &cont)
Definition: GeometricDet.cc:266
CmsTrackerWheelBuilder
Definition: CmsTrackerWheelBuilder.h:12
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GeometricDet.h
CmsTrackerLevelBuilderHelper::isLessRModule
static bool isLessRModule(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:136
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CmsTrackerRingBuilder
Definition: CmsTrackerRingBuilder.h:12
ExtractStringFromDDD.h
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:146
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
DetId.h
CmsTrackerWheelBuilder::buildComponent
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override
Definition: CmsTrackerWheelBuilder.cc:16
trackerStablePhiSort.h
GeometricDet::GeometricDetContainer
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:35
CmsTrackerPetalBuilder.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GeometricDet::clearComponents
void clearComponents()
Definition: GeometricDet.h:161
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