47 std::pair<float,float> pitch = topo->
pitch();
48 fwRecoGeometry.
idToName[rawid].topology[0] = pitch.first;
49 fwRecoGeometry.
idToName[rawid].topology[1] = pitch.second;
59 # define ADD_SISTRIP_TOPOLOGY( rawid, detUnit ) \ 60 const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>( detUnit ); \ 63 const StripTopology* topo = dynamic_cast<const StripTopology*>( &det->specificTopology() ); \ 64 fwRecoGeometry.idToName[rawid].topology[0] = 0; \ 65 fwRecoGeometry.idToName[rawid].topology[1] = topo->nstrips(); \ 66 fwRecoGeometry.idToName[rawid].topology[2] = topo->stripLength(); \ 67 if( const RadialStripTopology* rtop = dynamic_cast<const RadialStripTopology*>( &(det->specificType().specificTopology()) ) ) \ 69 fwRecoGeometry.idToName[rawid].topology[0] = 1; \ 70 fwRecoGeometry.idToName[rawid].topology[3] = rtop->yAxisOrientation(); \ 71 fwRecoGeometry.idToName[rawid].topology[4] = rtop->originToIntersection(); \ 72 fwRecoGeometry.idToName[rawid].topology[5] = rtop->phiOfOneEdge(); \ 73 fwRecoGeometry.idToName[rawid].topology[6] = rtop->angularWidth(); \ 75 else if( dynamic_cast<const RectangularStripTopology*>( &(det->specificType().specificTopology()) ) ) \ 77 fwRecoGeometry.idToName[rawid].topology[0] = 2; \ 78 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \ 80 else if( dynamic_cast<const TrapezoidalStripTopology*>( &(det->specificType().specificTopology()) ) ) \ 82 fwRecoGeometry.idToName[rawid].topology[0] = 3; \ 83 fwRecoGeometry.idToName[rawid].topology[3] = topo->pitch(); \ 88 const std::array<std::string,3> hgcal_geom_names = { {
"HGCalEESensitive",
89 "HGCalHESiliconSensitive",
90 "HGCalHEScintillatorSensitive" } };
106 std::unique_ptr<FWRecoGeometry>
111 auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
151 fwRecoGeometry->idToName.resize(
m_current + 1 );
152 std::vector<FWRecoGeom::Info>( fwRecoGeometry->idToName ).
swap( fwRecoGeometry->idToName );
153 std::sort( fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
155 return fwRecoGeometry;
163 for(
auto it = cscGeometry->
chambers().begin(),
172 unsigned int current =
insert_id( rawid, fwRecoGeometry );
177 for( std::vector< const CSCLayer* >::const_iterator lit = chamber->
layers().begin(),
178 lend = chamber->
layers().end();
186 unsigned int current =
insert_id( rawid, fwRecoGeometry );
215 for(
auto it = dtGeometry->
chambers().begin(),
224 unsigned int current =
insert_id( rawid, fwRecoGeometry );
230 for(
auto it = dtGeometry->
layers().begin(),
238 unsigned int rawid = layer->
id().
rawId();
239 unsigned int current =
insert_id( rawid, fwRecoGeometry );
253 fwRecoGeometry.
idToName[current].topology[6] = surf.bounds().width();
254 fwRecoGeometry.
idToName[current].topology[7] = surf.bounds().thickness();
255 fwRecoGeometry.
idToName[current].topology[8] = surf.bounds().length();
268 for(
auto it = rpcGeom->
rolls().begin(),
276 unsigned int current =
insert_id( rawid, fwRecoGeometry );
290 fwRecoGeometry.
extraDet.Add(
new TNamed(
"RE4",
"RPC endcap station 4"));
292 catch (std::runtime_error &
e) {
314 unsigned int rawid =
sc->geographicalId().rawId();
315 unsigned int current =
insert_id( rawid, fwRecoGeometry );
324 unsigned int rawid = ch->geographicalId().rawId();
325 unsigned int current =
insert_id( rawid, fwRecoGeometry );
334 unsigned int rawid = roll->geographicalId().rawId();
335 unsigned int current =
insert_id( rawid, fwRecoGeometry );
346 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
347 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
348 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
352 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GEM",
"GEM muon detector"));
356 fwRecoGeometry.
extraDet.Add(
new TNamed(
"GE2",
"GEM endcap station 2"));
358 catch (std::runtime_error &
e) {
365 edm::LogError(
"FWRecoGeometry") <<
" GEM geometry not found " << exception.
what() << std::endl;
384 unsigned int rawid = roll->geographicalId().rawId();
385 unsigned int current =
insert_id( rawid, fwRecoGeometry );
396 fwRecoGeometry.
idToName[current].topology[3] = roll->localPitch(lTop);
397 fwRecoGeometry.
idToName[current].topology[4] = roll->localPitch(lBottom);
398 fwRecoGeometry.
idToName[current].topology[5] = roll->npads();
401 fwRecoGeometry.
extraDet.Add(
new TNamed(
"ME0",
"ME0 muon detector"));
405 edm::LogError(
"FWRecoGeometry") <<
" ME0 geometry not found " << exception.
what() << std::endl;
421 unsigned int rawid = detid.
rawId();
422 unsigned int current =
insert_id( rawid, fwRecoGeometry );
442 unsigned int rawid = detid.
rawId();
443 unsigned int current =
insert_id( rawid, fwRecoGeometry );
463 unsigned int rawid = detid.
rawId();
464 unsigned int current =
insert_id( rawid, fwRecoGeometry );
484 unsigned int rawid = detid.
rawId();
485 unsigned int current =
insert_id( rawid, fwRecoGeometry );
505 unsigned int rawid = detid.
rawId();
506 unsigned int current =
insert_id( rawid, fwRecoGeometry );
526 unsigned int rawid = detid.
rawId();
527 unsigned int current =
insert_id( rawid, fwRecoGeometry );
539 for( std::vector<DetId>::const_iterator it = vid.begin(),
542 unsigned int id =
insert_id( it->rawId(), fwRecoGeometry);
555 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry );
565 for( std::vector<DetId>::const_iterator it = vid.begin(),
568 unsigned int id =
insert_id( it->rawId(), fwRecoGeometry);
570 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
574 for( std::vector<DetId>::const_iterator it = vid.begin(),
577 unsigned int id =
insert_id( it->rawId(), fwRecoGeometry);
579 fillPoints(
id, cor.begin(), cor.end(), fwRecoGeometry);
589 fwRecoGeometry.
idToName.back().id = rawid;
596 std::vector<GlobalPoint>::const_iterator
begin,
597 std::vector<GlobalPoint>::const_iterator
end,
600 unsigned int index( 0 );
601 for( std::vector<GlobalPoint>::const_iterator
i = begin;
i !=
end; ++
i )
621 std::array< const float, 4 >
const & par = b2->parameters ();
625 fwRecoGeometry.
idToName[
id].shape[1] = par [0];
626 fwRecoGeometry.
idToName[
id].shape[2] = par [1];
627 fwRecoGeometry.
idToName[
id].shape[3] = par [2];
628 fwRecoGeometry.
idToName[
id].shape[4] = par [3];
634 fwRecoGeometry.
idToName[
id].shape[1] = b2->width() * 0.5;
635 fwRecoGeometry.
idToName[
id].shape[2] = b2->length() * 0.5;
636 fwRecoGeometry.
idToName[
id].shape[3] = b2->thickness() * 0.5;
641 fwRecoGeometry.
idToName[
id].translation[0] = pos.
x();
642 fwRecoGeometry.
idToName[
id].translation[1] = pos.
y();
643 fwRecoGeometry.
idToName[
id].translation[2] = pos.
z();
671 path +=
"trackerParameters.xml";
673 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
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
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
CornersVec get8Corners(const DetId &id) const
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
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 &)
bool get(HolderT &iHolder) const
void addME0Geometry(FWRecoGeometry &)
const DetContainer & detsTID() const
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.