48 std::pair<float,float> pitch = topo->
pitch();
49 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
50 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
63 # define ADD_SISTRIP_TOPOLOGY( rawid, detUnit ) \ 64 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>( detUnit ); \ 67 if( const StripTopology* topo = dynamic_cast<const StripTopology*>( &det->specificTopology())) \ 69 fwRecoGeometry.idToName[rawid].topology[0] = 0; \ 70 fwRecoGeometry.idToName[rawid].topology[1] = topo->nstrips(); \ 71 fwRecoGeometry.idToName[rawid].topology[2] = topo->stripLength(); \ 73 if( const RadialStripTopology* rtop = dynamic_cast<const RadialStripTopology*>( &(det->specificType().specificTopology()))) \ 75 fwRecoGeometry.idToName[rawid].topology[0] = 1; \ 76 fwRecoGeometry.idToName[rawid].topology[3] = rtop->yAxisOrientation(); \ 77 fwRecoGeometry.idToName[rawid].topology[4] = rtop->originToIntersection(); \ 78 fwRecoGeometry.idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \ 79 fwRecoGeometry.idToName[rawid].topology[6] = rtop->angularWidth(); \ 81 else if( dynamic_cast<const RectangularStripTopology*>( &(det->specificType().specificTopology()))) \ 83 fwRecoGeometry.idToName[rawid].topology[0] = 2; \ 84 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \ 86 else if( dynamic_cast<const TrapezoidalStripTopology*>( &(det->specificType().specificTopology()))) \ 88 fwRecoGeometry.idToName[rawid].topology[0] = 3; \ 89 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \ 94 const Phase2TrackerGeomDetUnit* det = dynamic_cast<const Phase2TrackerGeomDetUnit*>( detUnit ); \ 97 if( const Phase2TrackerTopology *topo = dynamic_cast<const Phase2TrackerTopology *>( &(det->specificTopology()))) \ 99 fwRecoGeometry.idToName[rawid].topology[0] = topo->pitch().first; \ 100 fwRecoGeometry.idToName[rawid].topology[1] = topo->pitch().second;\ 106 const std::array<std::string,3> hgcal_geom_names = { {
"HGCalEESensitive",
107 "HGCalHESiliconSensitive",
108 "HGCalHEScintillatorSensitive" } };
124 std::unique_ptr<FWRecoGeometry>
129 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
169 fwRecoGeometry->idToName.resize(
m_current + 1 );
170 std::vector<FWRecoGeom::Info>( fwRecoGeometry->idToName ).
swap( fwRecoGeometry->idToName );
171 std::sort( fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
173 return fwRecoGeometry;
181 for(
auto it = cscGeometry->
chambers().begin(),
190 unsigned int current =
insert_id( rawid, fwRecoGeometry );
195 for( std::vector< const CSCLayer* >::const_iterator lit = chamber->
layers().begin(),
196 lend = chamber->
layers().end();
204 unsigned int current =
insert_id( rawid, fwRecoGeometry );
233 for(
auto it = dtGeometry->
chambers().begin(),
242 unsigned int current =
insert_id( rawid, fwRecoGeometry );
248 for(
auto it = dtGeometry->
layers().begin(),
256 unsigned int rawid = layer->
id().
rawId();
257 unsigned int current =
insert_id( rawid, fwRecoGeometry );
271 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
272 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
273 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
286 for(
auto it = rpcGeom->
rolls().begin(),
294 unsigned int current =
insert_id( rawid, fwRecoGeometry );
308 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
310 catch (std::runtime_error &
e) {
332 unsigned int rawid =
sc->geographicalId().rawId();
333 unsigned int current =
insert_id( rawid, fwRecoGeometry );
342 unsigned int rawid = ch->geographicalId().rawId();
343 unsigned int current =
insert_id( rawid, fwRecoGeometry );
352 unsigned int rawid = roll->geographicalId().rawId();
353 unsigned int current =
insert_id( rawid, fwRecoGeometry );
364 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
365 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
366 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
370 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
374 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
376 catch (std::runtime_error &
e) {
383 edm::LogError(
"FWRecoGeometry") <<
" GEM geometry not found " << exception.
what() << std::endl;
402 unsigned int rawid = roll->geographicalId().rawId();
403 unsigned int current =
insert_id( rawid, fwRecoGeometry );
414 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
415 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
416 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
419 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
423 edm::LogError(
"FWRecoGeometry") <<
" ME0 geometry not found " << exception.
what() << std::endl;
439 unsigned int rawid = detid.
rawId();
440 unsigned int current =
insert_id( rawid, fwRecoGeometry );
460 unsigned int rawid = detid.
rawId();
461 unsigned int current =
insert_id( rawid, fwRecoGeometry );
481 unsigned int rawid = detid.
rawId();
482 unsigned int current =
insert_id( rawid, fwRecoGeometry );
502 unsigned int rawid = detid.
rawId();
503 unsigned int current =
insert_id( rawid, fwRecoGeometry );
523 unsigned int rawid = detid.
rawId();
524 unsigned int current =
insert_id( rawid, fwRecoGeometry );
544 unsigned int rawid = detid.
rawId();
545 unsigned int current =
insert_id( rawid, fwRecoGeometry );
557 for( std::vector<DetId>::const_iterator it = vid.begin(),
560 unsigned int id =
insert_id( it->rawId(), fwRecoGeometry);
580 for(
uint i = 0;
i < (cor.size()-1); ++
i){
588 fwRecoGeometry.
idToName[
id].points[(cor.size()-1)*3 + 0] = center.x();
589 fwRecoGeometry.
idToName[
id].points[(cor.size()-1)*3 + 1] = center.y();
590 fwRecoGeometry.
idToName[
id].points[(cor.size()-1)*3 + 2] = center.z();
593 fwRecoGeometry.
idToName[
id].shape[3] = cor[cor.size()-1].z();
596 fwRecoGeometry.
idToName[
id].topology[0] = cor.size() - 1;
606 for( std::vector<DetId>::const_iterator it = vid.begin(),
609 unsigned int id =
insert_id( it->rawId(), fwRecoGeometry);
611 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
615 for( std::vector<DetId>::const_iterator it = vid.begin(),
618 unsigned int id =
insert_id( it->rawId(), fwRecoGeometry);
620 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
630 fwRecoGeometry.
idToName.back().id = rawid;
637 std::vector<GlobalPoint>::const_iterator
begin,
638 std::vector<GlobalPoint>::const_iterator
end,
641 unsigned int index( 0 );
642 for( std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i )
662 std::array< const float, 4 >
const & par = b2->parameters ();
666 fwRecoGeometry.
idToName[
id].shape[1] = par [0];
667 fwRecoGeometry.
idToName[
id].shape[2] = par [1];
668 fwRecoGeometry.
idToName[
id].shape[3] = par [2];
669 fwRecoGeometry.
idToName[
id].shape[4] = par [3];
675 fwRecoGeometry.
idToName[
id].shape[1] = b2->width() * 0.5;
676 fwRecoGeometry.
idToName[
id].shape[2] = b2->length() * 0.5;
677 fwRecoGeometry.
idToName[
id].shape[3] = b2->thickness() * 0.5;
682 fwRecoGeometry.
idToName[
id].translation[0] = pos.
x();
683 fwRecoGeometry.
idToName[
id].translation[1] = pos.
y();
684 fwRecoGeometry.
idToName[
id].translation[2] = pos.
z();
712 path +=
"trackerParameters.xml";
714 std::ifstream
t(fullPath);
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
std::string trackerTopologyXML
edm::ESHandle< FastTimeGeometry > m_ftlBarrelGeom
virtual float stripLength() const =0
const std::vector< const CSCLayer * > & layers() const
Return all layers.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
const CSCWireTopology * wireTopology() const
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
void addFTLGeometry(FWRecoGeometry &)
void addTOBGeometry(FWRecoGeometry &)
float centreToIntersection() const override
FWRecoGeometryESProducer(const edm::ParameterSet &)
void addTIBGeometry(FWRecoGeometry &)
DTLayerId id() const
Return the DetId of this SL.
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
static const int maxPoints_
constexpr uint32_t rawId() const
get the raw id
virtual std::pair< float, float > pitch() const =0
float cellWidth() const
Returns the cell width.
const_iterator begin() const
GlobalPoint getPosition(const DetId &id) const
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
char const * what() const override
const ChamberContainer & chambers() const
Return a vector of all chambers.
double wireSpacing() const
void addRPCGeometry(FWRecoGeometry &)
virtual bool isItBigPixelInX(int ixbin) const =0
const StripTopology & specificTopology() const
const TrackerGeometry * m_trackerGeom
const Plane & surface() const
The nominal surface of the GeomDet.
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)
void swap(Association< C > &lhs, Association< C > &rhs)
std::unique_ptr< FWRecoGeometry > produce(const FWRecoGeometryRecord &)
int firstChannel() const
Returns the wire number of the first wire.
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 &)
int lastChannel() const
Returns the wire number of the last wire.
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const DTTopology & specificTopology() const
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const DetContainer & detsTEC() const
float yCentreOfStripPlane() const override
edm::ESHandle< FastTimeGeometry > m_ftlEndcapGeom
const DepRecordT getRecord() const
void addPixelForwardGeometry(FWRecoGeometry &)
void writeTrackerParametersXML(FWRecoGeometry &)
const DetContainer & detsPXB() const
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.
virtual float localX(float mpX) const =0
DetId geographicalId() const
The label of this GeomDet.
float phiOfOneEdge() const override
float cellHeight() const
Returns the cell height.
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
const DetContainer & detsTIB() const
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(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.
const CSCStripTopology * topology() const
virtual float stripOffset(void) const
float yAxisOrientation() const override
int channels() const
Returns the number of wires in the layer.
const CaloGeometry * m_caloGeom
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
virtual int nstrips() const =0
CornersVec getNewCorners(const DetId &id) const
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
float angularWidth() const override
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
void addGEMGeometry(FWRecoGeometry &)
const_iterator end() const
const DetContainer & detsPXF() const
const TrackerGeomDet * idToDet(DetId) const override
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
virtual float pitch() const =0
virtual float localY(float mpY) const =0
void addPixelBarrelGeometry(FWRecoGeometry &)
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
float wireAngle() const override
const PositionType & position() const
T const * product() 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.