31 # define ADD_PIXEL_TOPOLOGY( rawid, detUnit ) \
32 const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>( detUnit ); \
35 const PixelTopology* topo = &det->specificTopology(); \
36 m_fwGeometry->idToName[rawid].topology[0] = topo->nrows(); \
37 m_fwGeometry->idToName[rawid].topology[1] = topo->ncolumns(); \
40 # define ADD_SISTRIP_TOPOLOGY( rawid, detUnit ) \
41 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>( detUnit ); \
44 const StripTopology* topo = dynamic_cast<const StripTopology*>( &det->specificTopology() ); \
45 m_fwGeometry->idToName[rawid].topology[0] = 0; \
46 m_fwGeometry->idToName[rawid].topology[1] = topo->nstrips(); \
47 m_fwGeometry->idToName[rawid].topology[2] = topo->stripLength(); \
48 if( const RadialStripTopology* rtop = dynamic_cast<const RadialStripTopology*>( &(det->specificType().specificTopology()) ) ) \
50 m_fwGeometry->idToName[rawid].topology[0] = 1; \
51 m_fwGeometry->idToName[rawid].topology[3] = rtop->yAxisOrientation(); \
52 m_fwGeometry->idToName[rawid].topology[4] = rtop->originToIntersection(); \
53 m_fwGeometry->idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \
54 m_fwGeometry->idToName[rawid].topology[6] = rtop->angularWidth(); \
56 else if( dynamic_cast<const RectangularStripTopology*>( &(det->specificType().specificTopology()) ) ) \
58 m_fwGeometry->idToName[rawid].topology[0] = 2; \
59 m_fwGeometry->idToName[rawid].topology[3] = topo->pitch(); \
61 else if( dynamic_cast<const TrapezoidalStripTopology*>( &(det->specificType().specificTopology()) ) ) \
63 m_fwGeometry->idToName[rawid].topology[0] = 3; \
64 m_fwGeometry->idToName[rawid].topology[3] = topo->pitch(); \
69 static const std::array<std::string,3> hgcal_geom_names = { {
"HGCalEESensitive",
70 "HGCalHESiliconSensitive",
71 "HGCalHEScintillatorSensitive" } };
83 boost::shared_ptr<FWRecoGeometry>
97 for(
const auto&
name : hgcal_geom_names ) {
100 if(
test.isValid() ) {
130 for(
auto it = cscGeometry->
chambers().begin(),
139 unsigned int current =
insert_id( rawid );
144 for( std::vector< const CSCLayer* >::const_iterator lit = chamber->
layers().begin(),
145 lend = chamber->
layers().end();
153 unsigned int current =
insert_id( rawid );
182 for(
auto it = dtGeometry->
chambers().begin(),
191 unsigned int current =
insert_id( rawid );
197 for(
auto it = dtGeometry->
layers().begin(),
205 unsigned int rawid = layer->
id().
rawId();
206 unsigned int current =
insert_id( rawid );
220 m_fwGeometry->idToName[current].topology[6] = surf.bounds().width();
221 m_fwGeometry->idToName[current].topology[7] = surf.bounds().thickness();
222 m_fwGeometry->idToName[current].topology[8] = surf.bounds().length();
235 for(
auto it = rpcGeom->
rolls().begin(),
243 unsigned int current =
insert_id( rawid );
257 m_fwGeometry->extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
259 catch (std::runtime_error &
e) {
279 unsigned int rawid = roll->geographicalId().rawId();
280 unsigned int current =
insert_id( rawid );
291 m_fwGeometry->idToName[current].topology[3] = roll->localPitch(lTop);
292 m_fwGeometry->idToName[current].topology[4] = roll->localPitch(lBottom);
293 m_fwGeometry->idToName[current].topology[5] = roll->npads();
297 m_fwGeometry->extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
301 m_fwGeometry->extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
303 catch (std::runtime_error &
e) {
310 edm::LogError(
"FWRecoGeometry") <<
" GEM geometry not found " << exception.
what() << std::endl;
329 unsigned int rawid = roll->geographicalId().rawId();
330 unsigned int current =
insert_id( rawid );
341 m_fwGeometry->idToName[current].topology[3] = roll->localPitch(lTop);
342 m_fwGeometry->idToName[current].topology[4] = roll->localPitch(lBottom);
343 m_fwGeometry->idToName[current].topology[5] = roll->npads();
346 m_fwGeometry->extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
350 edm::LogError(
"FWRecoGeometry") <<
" ME0 geometry not found " << exception.
what() << std::endl;
366 unsigned int rawid = detid.
rawId();
367 unsigned int current =
insert_id( rawid );
387 unsigned int rawid = detid.
rawId();
388 unsigned int current =
insert_id( rawid );
408 unsigned int rawid = detid.
rawId();
409 unsigned int current =
insert_id( rawid );
429 unsigned int rawid = detid.
rawId();
430 unsigned int current =
insert_id( rawid );
450 unsigned int rawid = detid.
rawId();
451 unsigned int current =
insert_id( rawid );
471 unsigned int rawid = detid.
rawId();
472 unsigned int current =
insert_id( rawid );
483 std::vector<DetId> vid =
m_caloGeom->getValidDetIds();
484 for( std::vector<DetId>::const_iterator it = vid.begin(),
489 unsigned int id =
insert_id( it->rawId());
493 const auto& hgcprod = *hgc;
494 const auto& vid = hgcprod.getValidDetIds();
495 for(
const auto&
id : vid ) {
496 uint32_t intid =
insert_id(
id.rawId() );
497 const auto& cor = hgcprod.getCorners(
id );
516 unsigned int index( 0 );
517 for( std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i )
536 std::array< const float, 4 >
const & par = b2->parameters ();
549 m_fwGeometry->idToName[id].shape[1] = b2->width() * 0.5;
550 m_fwGeometry->idToName[id].shape[2] = b2->length() * 0.5;
551 m_fwGeometry->idToName[id].shape[3] = b2->thickness() * 0.5;
virtual char const * what() const
void swap(ora::Record &rh, ora::Record &lh)
virtual int nstrips() const =0
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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
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.
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.
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
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)
void addCSCGeometry(void)
float yAxisOrientation() const
const DetContainer & detsPXB() const
void addGEMGeometry(void)
boost::shared_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
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
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)
std::vector< edm::ESHandle< HGCalGeometry > > m_hgcalGeoms
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)
edm::ESHandle< CaloGeometry > m_caloGeom
virtual float pitch() const =0
const DetContainer & detsPXF() const
const DetContainer & detsTOB() const
const RotationType & rotation() const
const PositionType & position() const
const CSCLayerGeometry * geometry() const
void addTOBGeometry(void)
const DetContainer & detsTID() const
const TrackerGeomDet * idToDet(DetId) const