49 std::pair<float, float> pitch = topo->
pitch();
50 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
51 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
64 #define ADD_SISTRIP_TOPOLOGY(rawid, detUnit) \
65 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>(detUnit); \
67 if (const StripTopology* topo = dynamic_cast<const StripTopology*>(&det->specificTopology())) { \
68 fwRecoGeometry.idToName[rawid].topology[0] = 0; \
69 fwRecoGeometry.idToName[rawid].topology[1] = topo->nstrips(); \
70 fwRecoGeometry.idToName[rawid].topology[2] = topo->stripLength(); \
72 if (const RadialStripTopology* rtop = \
73 dynamic_cast<const RadialStripTopology*>(&(det->specificType().specificTopology()))) { \
74 fwRecoGeometry.idToName[rawid].topology[0] = 1; \
75 fwRecoGeometry.idToName[rawid].topology[3] = rtop->yAxisOrientation(); \
76 fwRecoGeometry.idToName[rawid].topology[4] = rtop->originToIntersection(); \
77 fwRecoGeometry.idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \
78 fwRecoGeometry.idToName[rawid].topology[6] = rtop->angularWidth(); \
79 } else if (const RectangularStripTopology* topo = \
80 dynamic_cast<const RectangularStripTopology*>(&(det->specificType().specificTopology()))) { \
81 fwRecoGeometry.idToName[rawid].topology[0] = 2; \
82 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \
83 } else if (const TrapezoidalStripTopology* topo = \
84 dynamic_cast<const TrapezoidalStripTopology*>(&(det->specificType().specificTopology()))) { \
85 fwRecoGeometry.idToName[rawid].topology[0] = 3; \
86 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \
89 const Phase2TrackerGeomDetUnit* det = dynamic_cast<const Phase2TrackerGeomDetUnit*>(detUnit); \
91 if (const Phase2TrackerTopology* topo = \
92 dynamic_cast<const Phase2TrackerTopology*>(&(det->specificTopology()))) { \
93 fwRecoGeometry.idToName[rawid].topology[0] = topo->pitch().first; \
94 fwRecoGeometry.idToName[rawid].topology[1] = topo->pitch().second; \
100 const std::array<std::string, 3> hgcal_geom_names = {
101 {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"}};
131 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
168 fwRecoGeometry->idToName.resize(
m_current + 1);
169 std::vector<FWRecoGeom::Info>(fwRecoGeometry->idToName).
swap(fwRecoGeometry->idToName);
170 std::sort(fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
172 return fwRecoGeometry;
183 unsigned int current =
insert_id(rawid, fwRecoGeometry);
188 for (std::vector<const CSCLayer*>::const_iterator lit = chamber->
layers().begin(), lend = chamber->
layers().end();
195 unsigned int current =
insert_id(rawid, fwRecoGeometry);
227 unsigned int current =
insert_id(rawid, fwRecoGeometry);
233 for (
auto it = dtGeometry->
layers().begin(),
end = dtGeometry->
layers().end(); it !=
end; ++it) {
237 unsigned int rawid = layer->
id().
rawId();
238 unsigned int current =
insert_id(rawid, fwRecoGeometry);
252 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
253 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
254 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
265 for (
auto it = rpcGeom->
rolls().begin(),
end = rpcGeom->
rolls().end(); it !=
end; ++it) {
269 unsigned int current =
insert_id(rawid, fwRecoGeometry);
282 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
283 }
catch (std::runtime_error&
e) {
300 unsigned int rawid = sc->geographicalId().rawId();
301 unsigned int current =
insert_id(rawid, fwRecoGeometry);
306 for (
auto ch : gemGeom->
chambers()) {
308 unsigned int rawid = ch->geographicalId().rawId();
309 unsigned int current =
insert_id(rawid, fwRecoGeometry);
316 unsigned int rawid = roll->geographicalId().rawId();
317 unsigned int current =
insert_id(rawid, fwRecoGeometry);
328 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
329 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
330 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
334 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
338 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
339 }
catch (std::runtime_error&
e) {
344 edm::LogError(
"FWRecoGeometry") <<
" GEM geometry not found " << exception.
what() << std::endl;
358 unsigned int rawid = roll->geographicalId().rawId();
359 unsigned int current =
insert_id(rawid, fwRecoGeometry);
370 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
371 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
372 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
375 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
377 edm::LogError(
"FWRecoGeometry") <<
" ME0 geometry not found " << exception.
what() << std::endl;
390 unsigned int rawid = detid.
rawId();
391 unsigned int current =
insert_id(rawid, fwRecoGeometry);
408 unsigned int rawid = detid.
rawId();
409 unsigned int current =
insert_id(rawid, fwRecoGeometry);
426 unsigned int rawid = detid.
rawId();
427 unsigned int current =
insert_id(rawid, fwRecoGeometry);
444 unsigned int rawid = detid.
rawId();
445 unsigned int current =
insert_id(rawid, fwRecoGeometry);
462 unsigned int rawid = detid.
rawId();
463 unsigned int current =
insert_id(rawid, fwRecoGeometry);
480 unsigned int rawid = detid.
rawId();
481 unsigned int current =
insert_id(rawid, fwRecoGeometry);
491 for (std::vector<DetId>::const_iterator it = vid.begin(),
end = vid.end(); it !=
end; ++it) {
492 unsigned int id =
insert_id(it->rawId(), fwRecoGeometry);
512 for (
uint i = 0;
i < (cor.size() - 1); ++
i) {
513 fwRecoGeometry.
idToName[
id].points[
i * 3 + 0] = cor[
i].x();
514 fwRecoGeometry.
idToName[
id].points[
i * 3 + 1] = cor[
i].y();
515 fwRecoGeometry.
idToName[
id].points[
i * 3 + 2] = cor[
i].z();
520 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 0] = center.x();
521 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 1] = center.y();
522 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 2] = center.z();
525 fwRecoGeometry.
idToName[
id].shape[3] = cor[cor.size() - 1].z();
528 fwRecoGeometry.
idToName[
id].topology[0] = cor.size() - 1;
552 unsigned int id =
insert_id(detid.rawId(), fwRecoGeometry);
554 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
558 unsigned int id =
insert_id(detid.rawId(), fwRecoGeometry);
560 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
567 fwRecoGeometry.
idToName.back().id = rawid;
573 std::vector<GlobalPoint>::const_iterator
begin,
574 std::vector<GlobalPoint>::const_iterator
end,
576 unsigned int index(0);
577 for (std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i) {
593 std::array<const float, 4>
const& par =
b2->parameters();
597 fwRecoGeometry.
idToName[
id].shape[1] = par[0];
598 fwRecoGeometry.
idToName[
id].shape[2] = par[1];
599 fwRecoGeometry.
idToName[
id].shape[3] = par[2];
600 fwRecoGeometry.
idToName[
id].shape[4] = par[3];
605 fwRecoGeometry.
idToName[
id].shape[1] =
b2->width() * 0.5;
606 fwRecoGeometry.
idToName[
id].shape[2] =
b2->length() * 0.5;
607 fwRecoGeometry.
idToName[
id].shape[3] =
b2->thickness() * 0.5;
612 fwRecoGeometry.
idToName[
id].translation[0] = pos.
x();
613 fwRecoGeometry.
idToName[
id].translation[1] = pos.
y();
614 fwRecoGeometry.
idToName[
id].translation[2] = pos.
z();
638 path +=
"trackerParameters.xml";
640 std::ifstream
t(fullPath);
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_caloGeomToken
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
virtual int nstrips() const =0
T getUntrackedParameter(std::string const &, T const &) const
std::string trackerTopologyXML
float centreToIntersection() const override
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
const CSCWireTopology * wireTopology() const
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const FastTimeGeometry * m_ftlBarrelGeom
const std::vector< const CSCLayer * > & layers() const
Return all layers.
uint16_t *__restrict__ id
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
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< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void addFTLGeometry(FWRecoGeometry &)
void addTOBGeometry(FWRecoGeometry &)
FWRecoGeometryESProducer(const edm::ParameterSet &)
void addTIBGeometry(FWRecoGeometry &)
CornersVec getNewCorners(const DetId &id, bool debug=false) const
DTLayerId id() const
Return the DetId of this SL.
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
float phiOfOneEdge() const override
static const int maxPoints_
constexpr uint32_t rawId() const
get the raw id
float cellWidth() const
Returns the cell width.
const_iterator begin() const
const GlobalTrackingGeometry * m_trackingGeom
const ChamberContainer & chambers() const
Return a vector of all chambers.
Log< level::Error, false > LogError
double wireSpacing() const
void addRPCGeometry(FWRecoGeometry &)
const StripTopology & specificTopology() const
const TrackerGeometry * m_trackerGeom
const Plane & surface() const
The nominal surface of the GeomDet.
void swap(Association< C > &lhs, Association< C > &rhs)
std::unique_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
constexpr std::array< uint8_t, layerIndexSize > layer
int firstChannel() const
Returns the wire number of the first wire.
float yAxisOrientation() const override
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 &)
virtual float localX(float mpX) const =0
int lastChannel() const
Returns the wire number of the last wire.
const DTTopology & specificTopology() const
float wireAngle() const override
virtual float stripLength() const =0
const FastTimeGeometry * m_ftlEndcapGeom
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_trackingGeomToken
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const DetContainer & detsTEC() const
virtual bool isItBigPixelInX(int ixbin) const =0
const DepRecordT getRecord() const
void addPixelForwardGeometry(FWRecoGeometry &)
void writeTrackerParametersXML(FWRecoGeometry &)
const DetContainer & detsPXB() const
char const * what() const noexceptoverride
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.
DetId geographicalId() const
The label of this GeomDet.
float angularWidth() const override
float cellHeight() const
Returns the cell height.
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
const TrackerGeomDet * idToDet(DetId) const override
const DetContainer & detsTIB() const
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(FWRecoGeometry &)
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlBarrelGeomToken
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 yCentreOfStripPlane() const override
int channels() const
Returns the number of wires in the layer.
const CaloGeometry * m_caloGeom
virtual float localY(float mpY) const =0
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)
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
~FWRecoGeometryESProducer(void) override
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
void addGEMGeometry(FWRecoGeometry &)
GlobalPoint getPosition(const DetId &id, bool debug=false) const
const_iterator end() const
virtual float pitch() const =0
const DetContainer & detsPXF() const
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
void addPixelBarrelGeometry(FWRecoGeometry &)
virtual std::pair< float, float > pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
static constexpr float b2
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlEndcapGeomToken
const PositionType & position() const
const CSCLayerGeometry * geometry() const
void addDTGeometry(FWRecoGeometry &)
void addME0Geometry(FWRecoGeometry &)
const DetContainer & detsTID() const
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.