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"}};
112 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
149 fwRecoGeometry->idToName.resize(
m_current + 1);
150 std::vector<FWRecoGeom::Info>(fwRecoGeometry->idToName).
swap(fwRecoGeometry->idToName);
151 std::sort(fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
153 return fwRecoGeometry;
164 unsigned int current =
insert_id(rawid, fwRecoGeometry);
169 for (std::vector<const CSCLayer*>::const_iterator lit = chamber->
layers().begin(), lend = chamber->
layers().end();
176 unsigned int current =
insert_id(rawid, fwRecoGeometry);
208 unsigned int current =
insert_id(rawid, fwRecoGeometry);
214 for (
auto it = dtGeometry->
layers().begin(),
end = dtGeometry->
layers().end(); it !=
end; ++it) {
218 unsigned int rawid = layer->
id().
rawId();
219 unsigned int current =
insert_id(rawid, fwRecoGeometry);
233 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
234 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
235 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
246 for (
auto it = rpcGeom->
rolls().begin(),
end = rpcGeom->
rolls().end(); it !=
end; ++it) {
250 unsigned int current =
insert_id(rawid, fwRecoGeometry);
263 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
264 }
catch (std::runtime_error&
e) {
281 unsigned int rawid =
sc->geographicalId().rawId();
282 unsigned int current =
insert_id(rawid, fwRecoGeometry);
287 for (
auto ch : gemGeom->
chambers()) {
289 unsigned int rawid = ch->geographicalId().rawId();
290 unsigned int current =
insert_id(rawid, fwRecoGeometry);
297 unsigned int rawid = roll->geographicalId().rawId();
298 unsigned int current =
insert_id(rawid, fwRecoGeometry);
309 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
310 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
311 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
315 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
319 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
320 }
catch (std::runtime_error&
e) {
325 edm::LogError(
"FWRecoGeometry") <<
" GEM geometry not found " << exception.
what() << std::endl;
339 unsigned int rawid = roll->geographicalId().rawId();
340 unsigned int current =
insert_id(rawid, fwRecoGeometry);
351 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
352 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
353 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
356 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
358 edm::LogError(
"FWRecoGeometry") <<
" ME0 geometry not found " << exception.
what() << std::endl;
371 unsigned int rawid = detid.
rawId();
372 unsigned int current =
insert_id(rawid, fwRecoGeometry);
389 unsigned int rawid = detid.
rawId();
390 unsigned int current =
insert_id(rawid, fwRecoGeometry);
407 unsigned int rawid = detid.
rawId();
408 unsigned int current =
insert_id(rawid, fwRecoGeometry);
425 unsigned int rawid = detid.
rawId();
426 unsigned int current =
insert_id(rawid, fwRecoGeometry);
443 unsigned int rawid = detid.
rawId();
444 unsigned int current =
insert_id(rawid, fwRecoGeometry);
461 unsigned int rawid = detid.
rawId();
462 unsigned int current =
insert_id(rawid, fwRecoGeometry);
472 for (std::vector<DetId>::const_iterator it = vid.begin(),
end = vid.end(); it !=
end; ++it) {
473 unsigned int id =
insert_id(it->rawId(), fwRecoGeometry);
491 for (
uint i = 0;
i < (cor.size() - 1); ++
i) {
492 fwRecoGeometry.
idToName[
id].points[
i * 3 + 0] = cor[
i].x();
493 fwRecoGeometry.
idToName[
id].points[
i * 3 + 1] = cor[
i].y();
494 fwRecoGeometry.
idToName[
id].points[
i * 3 + 2] = cor[
i].z();
499 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 0] = center.x();
500 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 1] = center.y();
501 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 2] = center.z();
504 fwRecoGeometry.
idToName[
id].shape[3] = cor[cor.size() - 1].z();
507 fwRecoGeometry.
idToName[
id].topology[0] = cor.size() - 1;
515 for (std::vector<DetId>::const_iterator it = vid.begin(),
end = vid.end(); it !=
end; ++it) {
516 unsigned int id =
insert_id(it->rawId(), fwRecoGeometry);
518 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
522 for (std::vector<DetId>::const_iterator it = vid.begin(),
end = vid.end(); it !=
end; ++it) {
523 unsigned int id =
insert_id(it->rawId(), fwRecoGeometry);
525 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
532 fwRecoGeometry.
idToName.back().id = rawid;
538 std::vector<GlobalPoint>::const_iterator
begin,
539 std::vector<GlobalPoint>::const_iterator
end,
541 unsigned int index(0);
542 for (std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i) {
558 std::array<const float, 4>
const& par = b2->parameters();
562 fwRecoGeometry.
idToName[
id].shape[1] = par[0];
563 fwRecoGeometry.
idToName[
id].shape[2] = par[1];
564 fwRecoGeometry.
idToName[
id].shape[3] = par[2];
565 fwRecoGeometry.
idToName[
id].shape[4] = par[3];
570 fwRecoGeometry.
idToName[
id].shape[1] = b2->width() * 0.5;
571 fwRecoGeometry.
idToName[
id].shape[2] = b2->length() * 0.5;
572 fwRecoGeometry.
idToName[
id].shape[3] = b2->thickness() * 0.5;
577 fwRecoGeometry.
idToName[
id].translation[0] = pos.
x();
578 fwRecoGeometry.
idToName[
id].translation[1] = pos.
y();
579 fwRecoGeometry.
idToName[
id].translation[2] = pos.
z();
603 path +=
"trackerParameters.xml";
605 std::ifstream
t(fullPath);
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
std::string trackerTopologyXML
edm::ESHandle< FastTimeGeometry > m_ftlBarrelGeom
virtual float stripLength() const =0
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
const CSCWireTopology * wireTopology() const
const std::vector< const CSCLayer * > & layers() const
Return all layers.
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
void addFTLGeometry(FWRecoGeometry &)
void addTOBGeometry(FWRecoGeometry &)
float centreToIntersection() const override
FWRecoGeometryESProducer(const edm::ParameterSet &)
void addTIBGeometry(FWRecoGeometry &)
DTLayerId id() const
Return the DetId of this SL.
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
static const int maxPoints_
constexpr uint32_t rawId() const
get the raw id
float cellWidth() const
Returns the cell width.
const_iterator begin() const
GlobalPoint getPosition(const DetId &id) const
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
char const * what() const override
const ChamberContainer & chambers() const
Return a vector of all chambers.
double wireSpacing() const
void addRPCGeometry(FWRecoGeometry &)
virtual bool isItBigPixelInX(int ixbin) const =0
const StripTopology & specificTopology() const
const TrackerGeometry * m_trackerGeom
const Plane & surface() const
The nominal surface of the GeomDet.
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
void swap(Association< C > &lhs, Association< C > &rhs)
std::unique_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
int firstChannel() const
Returns the wire number of the first wire.
virtual std::pair< float, float > pitch() const =0
void fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end, FWRecoGeometry &)
FWRecoGeom::InfoMap idToName
bool isThere(GeomDetEnumerators::SubDetector subdet) const
void addCaloGeometry(FWRecoGeometry &)
int lastChannel() const
Returns the wire number of the last wire.
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const DTTopology & specificTopology() const
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const DetContainer & detsTEC() const
float yCentreOfStripPlane() const override
edm::ESHandle< FastTimeGeometry > m_ftlEndcapGeom
const DepRecordT getRecord() const
void addPixelForwardGeometry(FWRecoGeometry &)
void writeTrackerParametersXML(FWRecoGeometry &)
const DetContainer & detsPXB() const
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
virtual float localX(float mpX) const =0
DetId geographicalId() const
The label of this GeomDet.
float phiOfOneEdge() const override
float cellHeight() const
Returns the cell height.
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
const DetContainer & detsTIB() const
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(FWRecoGeometry &)
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
const CSCStripTopology * topology() const
virtual float stripOffset(void) const
float yAxisOrientation() const override
int channels() const
Returns the number of wires in the layer.
const CaloGeometry * m_caloGeom
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
virtual int nstrips() const =0
CornersVec getNewCorners(const DetId &id) const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
~FWRecoGeometryESProducer(void) override
float angularWidth() const override
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
void addGEMGeometry(FWRecoGeometry &)
const_iterator end() const
const DetContainer & detsPXF() const
const TrackerGeomDet * idToDet(DetId) const override
const DetContainer & detsTOB() const
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
void addTIDGeometry(FWRecoGeometry &)
const RotationType & rotation() const
std::string fullPath() const
virtual float pitch() const =0
virtual float localY(float mpY) const =0
void addPixelBarrelGeometry(FWRecoGeometry &)
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
float wireAngle() const override
const PositionType & position() const
T const * product() const
const CSCLayerGeometry * geometry() const
void addDTGeometry(FWRecoGeometry &)
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
void addME0Geometry(FWRecoGeometry &)
const DetContainer & detsTID() const
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.