51 std::pair<float, float> pitch = topo->
pitch();
52 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
53 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
66 #define ADD_SISTRIP_TOPOLOGY(rawid, detUnit) \ 67 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>(detUnit); \ 69 if (const StripTopology* topo = dynamic_cast<const StripTopology*>(&det->specificTopology())) { \ 70 fwRecoGeometry.idToName[rawid].topology[0] = 0; \ 71 fwRecoGeometry.idToName[rawid].topology[1] = topo->nstrips(); \ 72 fwRecoGeometry.idToName[rawid].topology[2] = topo->stripLength(); \ 74 if (const RadialStripTopology* rtop = \ 75 dynamic_cast<const RadialStripTopology*>(&(det->specificType().specificTopology()))) { \ 76 fwRecoGeometry.idToName[rawid].topology[0] = 1; \ 77 fwRecoGeometry.idToName[rawid].topology[3] = rtop->yAxisOrientation(); \ 78 fwRecoGeometry.idToName[rawid].topology[4] = rtop->originToIntersection(); \ 79 fwRecoGeometry.idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \ 80 fwRecoGeometry.idToName[rawid].topology[6] = rtop->angularWidth(); \ 81 } else if (const RectangularStripTopology* topo = \ 82 dynamic_cast<const RectangularStripTopology*>(&(det->specificType().specificTopology()))) { \ 83 fwRecoGeometry.idToName[rawid].topology[0] = 2; \ 84 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \ 85 } else if (const TrapezoidalStripTopology* topo = \ 86 dynamic_cast<const TrapezoidalStripTopology*>(&(det->specificType().specificTopology()))) { \ 87 fwRecoGeometry.idToName[rawid].topology[0] = 3; \ 88 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \ 91 const Phase2TrackerGeomDetUnit* det = dynamic_cast<const Phase2TrackerGeomDetUnit*>(detUnit); \ 93 if (const Phase2TrackerTopology* topo = \ 94 dynamic_cast<const Phase2TrackerTopology*>(&(det->specificTopology()))) { \ 95 fwRecoGeometry.idToName[rawid].topology[0] = topo->pitch().first; \ 96 fwRecoGeometry.idToName[rawid].topology[1] = topo->pitch().second; \ 110 std::pair<float, float> pitch = topo.
pitch();
111 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
112 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
120 const std::array<std::string, 3> hgcal_geom_names = {
121 {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"}};
125 m_tracker =
pset.getUntrackedParameter<
bool>(
"Tracker",
true);
126 m_muon =
pset.getUntrackedParameter<
bool>(
"Muon",
true);
127 m_gem =
pset.getUntrackedParameter<
bool>(
"GEM",
false);
128 m_calo =
pset.getUntrackedParameter<
bool>(
"Calo",
true);
129 m_timing =
pset.getUntrackedParameter<
bool>(
"Timing",
false);
150 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
185 fwRecoGeometry->idToName.resize(
m_current + 1);
186 std::vector<FWRecoGeom::Info>(fwRecoGeometry->idToName).
swap(fwRecoGeometry->idToName);
187 std::sort(fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
189 return fwRecoGeometry;
199 unsigned int rawid =
chamber->geographicalId();
200 unsigned int current =
insert_id(rawid, fwRecoGeometry);
205 for (std::vector<const CSCLayer*>::const_iterator lit =
chamber->layers().begin(), lend =
chamber->layers().end();
211 unsigned int rawid =
layer->geographicalId();
212 unsigned int current =
insert_id(rawid, fwRecoGeometry);
243 unsigned int rawid =
chamber->geographicalId().rawId();
244 unsigned int current =
insert_id(rawid, fwRecoGeometry);
254 unsigned int rawid =
layer->id().rawId();
255 unsigned int current =
insert_id(rawid, fwRecoGeometry);
269 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
270 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
271 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
285 unsigned int rawid =
roll->geographicalId().rawId();
286 unsigned int current =
insert_id(rawid, fwRecoGeometry);
299 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
300 }
catch (std::runtime_error&
e) {
317 unsigned int rawid = sc->geographicalId().rawId();
318 unsigned int current =
insert_id(rawid, fwRecoGeometry);
323 for (
auto ch : gemGeom->
chambers()) {
325 unsigned int rawid = ch->geographicalId().rawId();
326 unsigned int current =
insert_id(rawid, fwRecoGeometry);
333 unsigned int rawid =
roll->geographicalId().rawId();
334 unsigned int current =
insert_id(rawid, fwRecoGeometry);
345 fwRecoGeometry.
idToName[current].topology[3] =
roll->localPitch(lTop);
346 fwRecoGeometry.
idToName[current].topology[4] =
roll->localPitch(lBottom);
347 fwRecoGeometry.
idToName[current].topology[5] =
roll->npads();
351 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
355 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
356 }
catch (std::runtime_error&
e) {
375 unsigned int rawid =
roll->geographicalId().rawId();
376 unsigned int current =
insert_id(rawid, fwRecoGeometry);
387 fwRecoGeometry.
idToName[current].topology[3] =
roll->localPitch(lTop);
388 fwRecoGeometry.
idToName[current].topology[4] =
roll->localPitch(lBottom);
389 fwRecoGeometry.
idToName[current].topology[5] =
roll->npads();
392 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
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);
479 unsigned int rawid = detid.
rawId();
480 unsigned int current =
insert_id(rawid, fwRecoGeometry);
497 unsigned int rawid = detid.
rawId();
498 unsigned int current =
insert_id(rawid, fwRecoGeometry);
508 std::set<DetId>
cache;
509 for (std::vector<DetId>::const_iterator
it =
vid.begin(),
end =
vid.end();
it !=
end; ++
it) {
510 unsigned int id =
insert_id(
it->rawId(), fwRecoGeometry);
522 const auto cor =
geom->getNewCorners(*
it);
530 for (
uint i = 0;
i < (cor.size() - 1); ++
i) {
531 fwRecoGeometry.
idToName[
id].points[
i * 3 + 0] = cor[
i].x();
532 fwRecoGeometry.
idToName[
id].points[
i * 3 + 1] = cor[
i].y();
533 fwRecoGeometry.
idToName[
id].points[
i * 3 + 2] = cor[
i].z();
537 auto center =
geom->getPosition(*
it);
538 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 0] = center.x();
539 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 1] = center.y();
540 fwRecoGeometry.
idToName[
id].points[(cor.size() - 1) * 3 + 2] = center.z();
546 fwRecoGeometry.
idToName[
id].shape[3] = cor[cor.size() - 1].z();
549 fwRecoGeometry.
idToName[
id].topology[0] = cor.size() - 1;
582 auto val_x = (cor[0].x() - cor[3].x());
583 auto val_y = (cor[0].y() - cor[3].y());
584 auto val = round(std::acos(val_y /
std::sqrt(val_x * val_x + val_y * val_y)) /
M_PI * 180.);
601 DetId wafer_detid =
it->rawId() | maskZeroUV;
604 auto [iter, is_new] =
cache.insert(wafer_detid);
606 unsigned int local_id =
insert_id(wafer_detid, fwRecoGeometry);
607 auto const& dddConstants =
geom->topology().dddConstants();
608 auto wafer_size =
static_cast<float>(dddConstants.waferSize(
true));
610 auto r = wafer_size / 2.f;
611 float x[6] = {-
r, -
r, 0.f,
r,
r, 0.f};
612 float y[6] = {
R / 2.f, -
R / 2.f, -
R, -
R / 2.f,
R / 2.f,
R};
613 float z[6] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
614 for (
unsigned int i = 0;
i < 6; ++
i) {
615 HepGeom::Point3D<float> wafer_corner(
x[
i],
y[
i],
z[
i]);
617 geom->topology().dddConstants().waferLocal2Global(wafer_corner, wafer_detid,
true,
true,
false);
626 fwRecoGeometry.
idToName[local_id].matrix[0] = 1.0;
627 fwRecoGeometry.
idToName[local_id].matrix[4] = 1.0;
628 fwRecoGeometry.
idToName[local_id].matrix[8] = 1.0;
631 fwRecoGeometry.
idToName[local_id].shape[3] = cor[cor.size() - 1].z();
634 fwRecoGeometry.
idToName[local_id].topology[0] = 6;
640 fwRecoGeometry.
idToName[local_id].topology[2] = rhtools.
zside(
it->rawId());
646 fwRecoGeometry.
idToName[local_id].topology[4] =
660 DetId detid = det->geographicalId();
661 unsigned int rawid = detid.
rawId();
662 unsigned int current =
insert_id(rawid, fwRecoGeometry);
673 fwRecoGeometry.
idToName.back().id = rawid;
679 std::vector<GlobalPoint>::const_iterator begin,
680 std::vector<GlobalPoint>::const_iterator
end,
682 unsigned int index(0);
683 for (std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i) {
699 std::array<const float, 4>
const& par =
b2->parameters();
703 fwRecoGeometry.
idToName[
id].shape[1] = par[0];
704 fwRecoGeometry.
idToName[
id].shape[2] = par[1];
705 fwRecoGeometry.
idToName[
id].shape[3] = par[2];
706 fwRecoGeometry.
idToName[
id].shape[4] = par[3];
711 fwRecoGeometry.
idToName[
id].shape[1] =
b2->width() * 0.5;
712 fwRecoGeometry.
idToName[
id].shape[2] =
b2->length() * 0.5;
713 fwRecoGeometry.
idToName[
id].shape[3] =
b2->thickness() * 0.5;
744 path +=
"trackerParameters.xml";
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_caloGeomToken
const DetContainer & detsTIB() const
static constexpr uint32_t kHGCalCellUOffset
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.
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, 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 &)
FWRecoGeometryESProducer(const edm::ParameterSet &)
virtual const Topology & topology() const
uint32_t cc[maxCellsPerHit]
void addTIBGeometry(FWRecoGeometry &)
virtual const PixelTopology & specificTopology() const
float phiOfOneEdge() const override
static const int maxPoints_
static constexpr uint32_t kHGCalCellVMask
const DetContainer & detsPXF() const
const GlobalTrackingGeometry * m_trackingGeom
Log< level::Error, false > LogError
void addMTDGeometry(FWRecoGeometry &)
void addRPCGeometry(FWRecoGeometry &)
void ADD_MTD_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
void swap(Association< C > &lhs, Association< C > &rhs)
std::unique_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
const MTDGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const MTDGeometry * m_mtdGeom
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 DetContainer & detUnits() const override
Returm a vector of all GeomDet.
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
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
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(FWRecoGeometry &)
static constexpr uint32_t kHGCalCellUMask
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
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
std::pair< float, float > pitch() const 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 &)
const ChamberContainer & chambers() const
Return a vector of all chambers.
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.
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
static constexpr uint32_t kHGCalCellVOffset
void addME0Geometry(FWRecoGeometry &)
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > m_mtdGeomToken
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.