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"}};
105 m_tracker =
pset.getUntrackedParameter<
bool>(
"Tracker",
true);
106 m_muon =
pset.getUntrackedParameter<
bool>(
"Muon",
true);
107 m_gem =
pset.getUntrackedParameter<
bool>(
"GEM",
false);
108 m_calo =
pset.getUntrackedParameter<
bool>(
"Calo",
true);
109 m_timing =
pset.getUntrackedParameter<
bool>(
"Timing",
false);
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;
182 unsigned int rawid =
chamber->geographicalId();
183 unsigned int current =
insert_id(rawid, fwRecoGeometry);
188 for (std::vector<const CSCLayer*>::const_iterator lit =
chamber->layers().begin(), lend =
chamber->layers().end();
194 unsigned int rawid =
layer->geographicalId();
195 unsigned int current =
insert_id(rawid, fwRecoGeometry);
226 unsigned int rawid =
chamber->geographicalId().rawId();
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) {
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"));
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);
504 const auto cor =
geom->getNewCorners(*it);
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();
519 auto center =
geom->getPosition(*it);
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;
638 path +=
"trackerParameters.xml";
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_caloGeomToken
const DetContainer & detsTIB() const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
virtual int nstrips() const =0
std::string trackerTopologyXML
float centreToIntersection() const override
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const FastTimeGeometry * m_ftlBarrelGeom
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
void addFTLGeometry(FWRecoGeometry &)
std::string fullPath() const
const DetContainer & detsPXB() const
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
void addTOBGeometry(FWRecoGeometry &)
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.
FWRecoGeometryESProducer(const edm::ParameterSet &)
void addTIBGeometry(FWRecoGeometry &)
float phiOfOneEdge() const override
static const int maxPoints_
const DetContainer & detsPXF() const
const GlobalTrackingGeometry * m_trackingGeom
Log< level::Error, false > LogError
void addRPCGeometry(FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
void swap(Association< C > &lhs, Association< C > &rhs)
std::unique_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
constexpr std::array< uint8_t, layerIndexSize > layer
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
int firstChannel() const
Returns the wire number of the first wire.
void addCaloGeometry(FWRecoGeometry &)
virtual float localX(float mpX) const =0
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
float wireAngle() const override
virtual float stripLength() const =0
const_iterator end() const
const FastTimeGeometry * m_ftlEndcapGeom
float cellWidth() const
Returns the cell width.
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_trackingGeomToken
const DetContainer & detsTOB() const
virtual float stripOffset(void) const
virtual bool isItBigPixelInX(int ixbin) const =0
bool isThere(GeomDetEnumerators::SubDetector subdet) const
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::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void addPixelForwardGeometry(FWRecoGeometry &)
const_iterator begin() const
void writeTrackerParametersXML(FWRecoGeometry &)
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
float angularWidth() const override
double wireSpacing() const
DetId geographicalId() const
The label of this GeomDet.
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
const TrackerGeomDet * idToDet(DetId) const override
const StripTopology & specificTopology() const
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(FWRecoGeometry &)
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlBarrelGeomToken
const Plane & surface() const
The nominal surface of the GeomDet.
float yCentreOfStripPlane() const override
const PositionType & position() const
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)
constexpr uint32_t rawId() const
get the raw id
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
~FWRecoGeometryESProducer(void) override
void addGEMGeometry(FWRecoGeometry &)
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual float pitch() const =0
int lastChannel() const
Returns the wire number of the last wire.
void addTIDGeometry(FWRecoGeometry &)
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
const DetContainer & detsTEC() const
const RotationType & rotation() const
void addPixelBarrelGeometry(FWRecoGeometry &)
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
virtual std::pair< float, float > pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
static constexpr float b2
const ChamberContainer & chambers() const
Return a vector of all chambers.
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlEndcapGeomToken
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
int channels() const
Returns the number of wires in the layer.
void addDTGeometry(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.
void addME0Geometry(FWRecoGeometry &)
const DetContainer & detsTID() const
float cellHeight() const
Returns the cell height.
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.