33 # define ADD_PIXEL_TOPOLOGY( rawid, detUnit ) \
34 const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>( detUnit ); \
37 const PixelTopology* topo = &det->specificTopology(); \
38 m_fwGeometry->idToName[rawid].topology[0] = topo->nrows(); \
39 m_fwGeometry->idToName[rawid].topology[1] = topo->ncolumns(); \
42 # define ADD_SISTRIP_TOPOLOGY( rawid, detUnit ) \
43 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>( detUnit ); \
46 const StripTopology* topo = dynamic_cast<const StripTopology*>( &det->specificTopology() ); \
47 m_fwGeometry->idToName[rawid].topology[0] = 0; \
48 m_fwGeometry->idToName[rawid].topology[1] = topo->nstrips(); \
49 m_fwGeometry->idToName[rawid].topology[2] = topo->stripLength(); \
50 if( const RadialStripTopology* rtop = dynamic_cast<const RadialStripTopology*>( &(det->specificType().specificTopology()) ) ) \
52 m_fwGeometry->idToName[rawid].topology[0] = 1; \
53 m_fwGeometry->idToName[rawid].topology[3] = rtop->yAxisOrientation(); \
54 m_fwGeometry->idToName[rawid].topology[4] = rtop->originToIntersection(); \
55 m_fwGeometry->idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \
56 m_fwGeometry->idToName[rawid].topology[6] = rtop->angularWidth(); \
58 else if( dynamic_cast<const RectangularStripTopology*>( &(det->specificType().specificTopology()) ) ) \
60 m_fwGeometry->idToName[rawid].topology[0] = 2; \
61 m_fwGeometry->idToName[rawid].topology[3] = topo->pitch(); \
63 else if( dynamic_cast<const TrapezoidalStripTopology*>( &(det->specificType().specificTopology()) ) ) \
65 m_fwGeometry->idToName[rawid].topology[0] = 3; \
66 m_fwGeometry->idToName[rawid].topology[3] = topo->pitch(); \
71 static const std::array<std::string,3> hgcal_geom_names = { {
"HGCalEESensitive",
72 "HGCalHESiliconSensitive",
73 "HGCalHEScintillatorSensitive" } };
89 std::shared_ptr<FWRecoGeometry>
143 for(
auto it = cscGeometry->
chambers().begin(),
152 unsigned int current =
insert_id( rawid );
157 for( std::vector< const CSCLayer* >::const_iterator lit = chamber->
layers().begin(),
158 lend = chamber->
layers().end();
166 unsigned int current =
insert_id( rawid );
195 for(
auto it = dtGeometry->
chambers().begin(),
204 unsigned int current =
insert_id( rawid );
210 for(
auto it = dtGeometry->
layers().begin(),
218 unsigned int rawid = layer->
id().
rawId();
219 unsigned int current =
insert_id( rawid );
233 m_fwGeometry->idToName[current].topology[6] = surf.bounds().width();
234 m_fwGeometry->idToName[current].topology[7] = surf.bounds().thickness();
235 m_fwGeometry->idToName[current].topology[8] = surf.bounds().length();
248 for(
auto it = rpcGeom->
rolls().begin(),
256 unsigned int current =
insert_id( rawid );
270 m_fwGeometry->extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
272 catch (std::runtime_error &
e) {
294 unsigned int rawid =
sc->geographicalId().rawId();
295 unsigned int current =
insert_id( rawid );
304 unsigned int rawid = ch->geographicalId().rawId();
305 unsigned int current =
insert_id( rawid );
314 unsigned int rawid = roll->geographicalId().rawId();
315 unsigned int current =
insert_id( rawid );
326 m_fwGeometry->idToName[current].topology[3] = roll->localPitch(lTop);
327 m_fwGeometry->idToName[current].topology[4] = roll->localPitch(lBottom);
328 m_fwGeometry->idToName[current].topology[5] = roll->npads();
332 m_fwGeometry->extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
336 m_fwGeometry->extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
338 catch (std::runtime_error &
e) {
345 edm::LogError(
"FWRecoGeometry") <<
" GEM geometry not found " << exception.
what() << std::endl;
364 unsigned int rawid = roll->geographicalId().rawId();
365 unsigned int current =
insert_id( rawid );
376 m_fwGeometry->idToName[current].topology[3] = roll->localPitch(lTop);
377 m_fwGeometry->idToName[current].topology[4] = roll->localPitch(lBottom);
378 m_fwGeometry->idToName[current].topology[5] = roll->npads();
381 m_fwGeometry->extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
385 edm::LogError(
"FWRecoGeometry") <<
" ME0 geometry not found " << exception.
what() << std::endl;
401 unsigned int rawid = detid.
rawId();
402 unsigned int current =
insert_id( rawid );
422 unsigned int rawid = detid.
rawId();
423 unsigned int current =
insert_id( rawid );
443 unsigned int rawid = detid.
rawId();
444 unsigned int current =
insert_id( rawid );
464 unsigned int rawid = detid.
rawId();
465 unsigned int current =
insert_id( rawid );
485 unsigned int rawid = detid.
rawId();
486 unsigned int current =
insert_id( rawid );
506 unsigned int rawid = detid.
rawId();
507 unsigned int current =
insert_id( rawid );
519 for( std::vector<DetId>::const_iterator it = vid.begin(),
522 unsigned int id =
insert_id( it->rawId());
539 for( std::vector<DetId>::const_iterator it = vid.begin(),
542 unsigned int id =
insert_id( it->rawId());
548 for( std::vector<DetId>::const_iterator it = vid.begin(),
551 unsigned int id =
insert_id( it->rawId());
570 unsigned int index( 0 );
571 for( std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i )
590 std::array< const float, 4 >
const & par = b2->parameters ();
603 m_fwGeometry->idToName[id].shape[1] = b2->width() * 0.5;
604 m_fwGeometry->idToName[id].shape[2] = b2->length() * 0.5;
605 m_fwGeometry->idToName[id].shape[3] = b2->thickness() * 0.5;
virtual char const * what() const
virtual int nstrips() const =0
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
T getUntrackedParameter(std::string const &, T const &) const
edm::ESHandle< FastTimeGeometry > m_ftlBarrelGeom
const std::vector< const CSCLayer * > & layers() const
Return all layers.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
void addPixelForwardGeometry(void)
const CSCWireTopology * wireTopology() const
void addTIBGeometry(void)
void addTECGeometry(void)
float yCentreOfStripPlane() const
std::shared_ptr< FWRecoGeometry > m_fwGeometry
virtual ~FWRecoGeometryESProducer(void)
FWRecoGeometryESProducer(const edm::ParameterSet &)
DTLayerId id() const
Return the DetId of this SL.
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
void addRPCGeometry(void)
float cellWidth() const
Returns the cell width.
const_iterator begin() const
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const ChamberContainer & chambers() const
Return a vector of all chambers.
double wireSpacing() const
const StripTopology & specificTopology() const
const TrackerGeometry * m_trackerGeom
const Plane & surface() const
The nominal surface of the GeomDet.
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.
void swap(Association< C > &lhs, Association< C > &rhs)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
int firstChannel() const
Returns the wire number of the first wire.
uint32_t rawId() const
get the raw id
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
const DepRecordT & getRecord() const
void addPixelBarrelGeometry(void)
int lastChannel() const
Returns the wire number of the last wire.
const DTTopology & specificTopology() const
virtual float stripLength() const =0
const DetContainer & detsTEC() const
void addCaloGeometry(void)
edm::ESHandle< FastTimeGeometry > m_ftlEndcapGeom
void addCSCGeometry(void)
float yAxisOrientation() const
void addFTLGeometry(void)
void get(HolderT &iHolder) const
const DetContainer & detsPXB() const
void addGEMGeometry(void)
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
DetId geographicalId() const
The label of this GeomDet.
float centreToIntersection() const
float phiOfOneEdge() const
float cellHeight() const
Returns the cell height.
float angularWidth() const
#define ADD_PIXEL_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id)
const DetContainer & detsTIB() const
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
void addTIDGeometry(void)
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
const CSCStripTopology * topology() const
void fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end)
virtual float stripOffset(void) const
int channels() const
Returns the number of wires in the layer.
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
void addME0Geometry(void)
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
std::shared_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
edm::ESHandle< CaloGeometry > m_caloGeom
const_iterator end() const
virtual float pitch() const =0
const DetContainer & detsPXF() const
const DetContainer & detsTOB() const
const RotationType & rotation() const
volatile std::atomic< bool > shutdown_flag false
const PositionType & position() const
const CSCLayerGeometry * geometry() const
void addTOBGeometry(void)
const DetContainer & detsTID() const
const TrackerGeomDet * idToDet(DetId) const