43 const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>(detUnit);
47 std::pair<float, float> pitch = topo->
pitch();
48 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
49 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
62 #define ADD_SISTRIP_TOPOLOGY(rawid, detUnit) \
63 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>(detUnit); \
65 if (const StripTopology* topo = dynamic_cast<const StripTopology*>(&det->specificTopology())) { \
66 fwRecoGeometry.idToName[rawid].topology[0] = 0; \
67 fwRecoGeometry.idToName[rawid].topology[1] = topo->nstrips(); \
68 fwRecoGeometry.idToName[rawid].topology[2] = topo->stripLength(); \
69 } else if (const RadialStripTopology* rtop = \
70 dynamic_cast<const RadialStripTopology*>(&(det->specificType().specificTopology()))) { \
71 fwRecoGeometry.idToName[rawid].topology[0] = 1; \
72 fwRecoGeometry.idToName[rawid].topology[3] = rtop->yAxisOrientation(); \
73 fwRecoGeometry.idToName[rawid].topology[4] = rtop->originToIntersection(); \
74 fwRecoGeometry.idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \
75 fwRecoGeometry.idToName[rawid].topology[6] = rtop->angularWidth(); \
76 } else if (dynamic_cast<const RectangularStripTopology*>(&(det->specificType().specificTopology()))) { \
77 fwRecoGeometry.idToName[rawid].topology[0] = 2; \
78 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \
79 } else if (dynamic_cast<const TrapezoidalStripTopology*>(&(det->specificType().specificTopology()))) { \
80 fwRecoGeometry.idToName[rawid].topology[0] = 3; \
81 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \
84 const Phase2TrackerGeomDetUnit* det = dynamic_cast<const Phase2TrackerGeomDetUnit*>(detUnit); \
86 if (const Phase2TrackerTopology* topo = \
87 dynamic_cast<const Phase2TrackerTopology*>(&(det->specificTopology()))) { \
88 fwRecoGeometry.idToName[rawid].topology[0] = topo->pitch().first; \
89 fwRecoGeometry.idToName[rawid].topology[1] = topo->pitch().second; \
95 const std::array<std::string, 3> hgcal_geom_names = {
96 {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"}};
100 m_tracker =
pset.getUntrackedParameter<
bool>(
"Tracker",
true);
101 m_muon =
pset.getUntrackedParameter<
bool>(
"Muon",
true);
102 m_calo =
pset.getUntrackedParameter<
bool>(
"Calo",
true);
103 m_timing =
pset.getUntrackedParameter<
bool>(
"Timing",
false);
122 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
157 fwRecoGeometry->idToName.resize(
m_current + 1);
158 std::vector<FWRecoGeom::Info>(fwRecoGeometry->idToName).swap(fwRecoGeometry->idToName);
159 std::sort(fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
161 return fwRecoGeometry;
171 unsigned int rawid =
chamber->geographicalId();
172 unsigned int current =
insert_id(rawid, fwRecoGeometry);
177 for (std::vector<const CSCLayer*>::const_iterator lit =
chamber->layers().begin(), lend =
chamber->layers().end();
184 unsigned int current =
insert_id(rawid, fwRecoGeometry);
215 unsigned int rawid =
chamber->geographicalId().rawId();
216 unsigned int current =
insert_id(rawid, fwRecoGeometry);
222 for (
auto it = dtGeometry->
layers().begin(),
end = dtGeometry->
layers().end(); it !=
end; ++it) {
226 unsigned int rawid = layer->
id().
rawId();
227 unsigned int current =
insert_id(rawid, fwRecoGeometry);
241 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
242 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
243 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
254 for (
auto it = rpcGeom->
rolls().begin(),
end = rpcGeom->
rolls().end(); it !=
end; ++it) {
258 unsigned int current =
insert_id(rawid, fwRecoGeometry);
271 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
272 }
catch (std::runtime_error&
e) {
289 unsigned int rawid = sc->geographicalId().rawId();
290 unsigned int current =
insert_id(rawid, fwRecoGeometry);
295 for (
auto ch : gemGeom->
chambers()) {
297 unsigned int rawid = ch->geographicalId().rawId();
298 unsigned int current =
insert_id(rawid, fwRecoGeometry);
305 unsigned int rawid = roll->geographicalId().rawId();
306 unsigned int current =
insert_id(rawid, fwRecoGeometry);
317 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
318 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
319 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
323 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
327 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
328 }
catch (std::runtime_error&
e) {
347 unsigned int rawid = roll->geographicalId().rawId();
348 unsigned int current =
insert_id(rawid, fwRecoGeometry);
359 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
360 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
361 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
364 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
379 unsigned int rawid = detid.
rawId();
380 unsigned int current =
insert_id(rawid, fwRecoGeometry);
397 unsigned int rawid = detid.
rawId();
398 unsigned int current =
insert_id(rawid, fwRecoGeometry);
415 unsigned int rawid = detid.
rawId();
416 unsigned int current =
insert_id(rawid, fwRecoGeometry);
433 unsigned int rawid = detid.
rawId();
434 unsigned int current =
insert_id(rawid, fwRecoGeometry);
451 unsigned int rawid = detid.
rawId();
452 unsigned int current =
insert_id(rawid, fwRecoGeometry);
469 unsigned int rawid = detid.
rawId();
470 unsigned int current =
insert_id(rawid, fwRecoGeometry);
480 for (std::vector<DetId>::const_iterator it =
vid.begin(),
end =
vid.end(); it !=
end; ++it) {
481 unsigned int id =
insert_id(it->rawId(), fwRecoGeometry);
491 const auto cor =
geom->getNewCorners(*it);
499 for (
uint i = 0;
i < (cor.size() - 1); ++
i) {
500 fwRecoGeometry.
idToName[
id].points[
i * 3 + 0] = cor[
i].x();
501 fwRecoGeometry.
idToName[
id].points[
i * 3 + 1] = cor[
i].y();
502 fwRecoGeometry.
idToName[
id].points[
i * 3 + 2] = cor[
i].z();
506 auto center =
geom->getPosition(*it);
507 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 0] = center.x();
508 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 1] = center.y();
509 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 2] = center.z();
512 fwRecoGeometry.
idToName[
id].shape[3] = cor[cor.size() - 1].z();
515 fwRecoGeometry.
idToName[
id].topology[0] = cor.size() - 1;
523 unsigned int id =
insert_id(detid.rawId(), fwRecoGeometry);
525 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
529 unsigned int id =
insert_id(detid.rawId(), fwRecoGeometry);
531 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
538 fwRecoGeometry.
idToName.back().id = rawid;
544 std::vector<GlobalPoint>::const_iterator
begin,
545 std::vector<GlobalPoint>::const_iterator
end,
547 unsigned int index(0);
548 for (std::vector<GlobalPoint>::const_iterator
i =
begin;
i !=
end; ++
i) {
564 std::array<const float, 4>
const& par =
b2->parameters();
568 fwRecoGeometry.
idToName[
id].shape[1] = par[0];
569 fwRecoGeometry.
idToName[
id].shape[2] = par[1];
570 fwRecoGeometry.
idToName[
id].shape[3] = par[2];
571 fwRecoGeometry.
idToName[
id].shape[4] = par[3];
576 fwRecoGeometry.
idToName[
id].shape[1] =
b2->width() * 0.5;
577 fwRecoGeometry.
idToName[
id].shape[2] =
b2->length() * 0.5;
578 fwRecoGeometry.
idToName[
id].shape[3] =
b2->thickness() * 0.5;
609 path +=
"trackerParameters.xml";