44 const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>(detUnit);
48 std::pair<float, float> pitch = topo->
pitch();
49 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
50 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
63 #define ADD_SISTRIP_TOPOLOGY(rawid, detUnit) \
64 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>(detUnit); \
66 if (const StripTopology* topo = dynamic_cast<const StripTopology*>(&det->specificTopology())) { \
67 fwRecoGeometry.idToName[rawid].topology[0] = 0; \
68 fwRecoGeometry.idToName[rawid].topology[1] = topo->nstrips(); \
69 fwRecoGeometry.idToName[rawid].topology[2] = topo->stripLength(); \
70 } else if (const RadialStripTopology* rtop = \
71 dynamic_cast<const RadialStripTopology*>(&(det->specificType().specificTopology()))) { \
72 fwRecoGeometry.idToName[rawid].topology[0] = 1; \
73 fwRecoGeometry.idToName[rawid].topology[3] = rtop->yAxisOrientation(); \
74 fwRecoGeometry.idToName[rawid].topology[4] = rtop->originToIntersection(); \
75 fwRecoGeometry.idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \
76 fwRecoGeometry.idToName[rawid].topology[6] = rtop->angularWidth(); \
77 } else if (dynamic_cast<const RectangularStripTopology*>(&(det->specificType().specificTopology()))) { \
78 fwRecoGeometry.idToName[rawid].topology[0] = 2; \
79 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \
80 } else if (dynamic_cast<const TrapezoidalStripTopology*>(&(det->specificType().specificTopology()))) { \
81 fwRecoGeometry.idToName[rawid].topology[0] = 3; \
82 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \
85 const Phase2TrackerGeomDetUnit* det = dynamic_cast<const Phase2TrackerGeomDetUnit*>(detUnit); \
87 if (const Phase2TrackerTopology* topo = \
88 dynamic_cast<const Phase2TrackerTopology*>(&(det->specificTopology()))) { \
89 fwRecoGeometry.idToName[rawid].topology[0] = topo->pitch().first; \
90 fwRecoGeometry.idToName[rawid].topology[1] = topo->pitch().second; \
96 const std::array<std::string, 3> hgcal_geom_names = {
97 {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"}};
101 m_tracker =
pset.getUntrackedParameter<
bool>(
"Tracker",
true);
102 m_muon =
pset.getUntrackedParameter<
bool>(
"Muon",
true);
103 m_calo =
pset.getUntrackedParameter<
bool>(
"Calo",
true);
104 m_timing =
pset.getUntrackedParameter<
bool>(
"Timing",
false);
123 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
158 fwRecoGeometry->idToName.resize(
m_current + 1);
159 std::vector<FWRecoGeom::Info>(fwRecoGeometry->idToName).swap(fwRecoGeometry->idToName);
160 std::sort(fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
162 return fwRecoGeometry;
172 unsigned int rawid =
chamber->geographicalId();
173 unsigned int current =
insert_id(rawid, fwRecoGeometry);
178 for (std::vector<const CSCLayer*>::const_iterator lit =
chamber->layers().begin(), lend =
chamber->layers().end();
184 unsigned int rawid =
layer->geographicalId();
185 unsigned int current =
insert_id(rawid, fwRecoGeometry);
216 unsigned int rawid =
chamber->geographicalId().rawId();
217 unsigned int current =
insert_id(rawid, fwRecoGeometry);
223 for (
auto it = dtGeometry->
layers().begin(),
end = dtGeometry->
layers().end(); it !=
end; ++it) {
227 unsigned int rawid =
layer->id().rawId();
228 unsigned int current =
insert_id(rawid, fwRecoGeometry);
242 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
243 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
244 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
255 for (
auto it = rpcGeom->
rolls().begin(),
end = rpcGeom->
rolls().end(); it !=
end; ++it) {
259 unsigned int current =
insert_id(rawid, fwRecoGeometry);
272 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
273 }
catch (std::runtime_error&
e) {
290 unsigned int rawid = sc->geographicalId().rawId();
291 unsigned int current =
insert_id(rawid, fwRecoGeometry);
296 for (
auto ch : gemGeom->
chambers()) {
298 unsigned int rawid = ch->geographicalId().rawId();
299 unsigned int current =
insert_id(rawid, fwRecoGeometry);
306 unsigned int rawid = roll->geographicalId().rawId();
307 unsigned int current =
insert_id(rawid, fwRecoGeometry);
318 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
319 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
320 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
324 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
328 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
329 }
catch (std::runtime_error&
e) {
348 unsigned int rawid = roll->geographicalId().rawId();
349 unsigned int current =
insert_id(rawid, fwRecoGeometry);
360 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
361 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
362 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
365 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
380 unsigned int rawid = detid.
rawId();
381 unsigned int current =
insert_id(rawid, fwRecoGeometry);
398 unsigned int rawid = detid.
rawId();
399 unsigned int current =
insert_id(rawid, fwRecoGeometry);
416 unsigned int rawid = detid.
rawId();
417 unsigned int current =
insert_id(rawid, fwRecoGeometry);
434 unsigned int rawid = detid.
rawId();
435 unsigned int current =
insert_id(rawid, fwRecoGeometry);
452 unsigned int rawid = detid.
rawId();
453 unsigned int current =
insert_id(rawid, fwRecoGeometry);
470 unsigned int rawid = detid.
rawId();
471 unsigned int current =
insert_id(rawid, fwRecoGeometry);
481 for (std::vector<DetId>::const_iterator it =
vid.begin(),
end =
vid.end(); it !=
end; ++it) {
482 unsigned int id =
insert_id(it->rawId(), fwRecoGeometry);
492 const auto cor =
geom->getNewCorners(*it);
500 for (
uint i = 0;
i < (cor.size() - 1); ++
i) {
501 fwRecoGeometry.
idToName[
id].points[
i * 3 + 0] = cor[
i].x();
502 fwRecoGeometry.
idToName[
id].points[
i * 3 + 1] = cor[
i].y();
503 fwRecoGeometry.
idToName[
id].points[
i * 3 + 2] = cor[
i].z();
507 auto center =
geom->getPosition(*it);
508 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 0] = center.x();
509 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 1] = center.y();
510 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 2] = center.z();
513 fwRecoGeometry.
idToName[
id].shape[3] = cor[cor.size() - 1].z();
516 fwRecoGeometry.
idToName[
id].topology[0] = cor.size() - 1;
524 unsigned int id =
insert_id(detid.rawId(), fwRecoGeometry);
526 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
530 unsigned int id =
insert_id(detid.rawId(), fwRecoGeometry);
532 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
539 fwRecoGeometry.
idToName.back().id = rawid;
545 std::vector<GlobalPoint>::const_iterator begin,
546 std::vector<GlobalPoint>::const_iterator
end,
548 unsigned int index(0);
549 for (std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i) {
565 std::array<const float, 4>
const& par =
b2->parameters();
569 fwRecoGeometry.
idToName[
id].shape[1] = par[0];
570 fwRecoGeometry.
idToName[
id].shape[2] = par[1];
571 fwRecoGeometry.
idToName[
id].shape[3] = par[2];
572 fwRecoGeometry.
idToName[
id].shape[4] = par[3];
577 fwRecoGeometry.
idToName[
id].shape[1] =
b2->width() * 0.5;
578 fwRecoGeometry.
idToName[
id].shape[2] =
b2->length() * 0.5;
579 fwRecoGeometry.
idToName[
id].shape[3] =
b2->thickness() * 0.5;
610 path +=
"trackerParameters.xml";