CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWRecoGeometryESProducer Class Reference

#include <FWRecoGeometryESProducer.h>

Inheritance diagram for FWRecoGeometryESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 FWRecoGeometryESProducer (const edm::ParameterSet &)
 
 FWRecoGeometryESProducer (const FWRecoGeometryESProducer &)=delete
 
const FWRecoGeometryESProduceroperator= (const FWRecoGeometryESProducer &)=delete
 
std::unique_ptr< FWRecoGeometryproduce (const FWRecoGeometryRecord &)
 
 ~FWRecoGeometryESProducer (void) override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Member Functions

void ADD_PIXEL_TOPOLOGY (unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
 
void addCaloGeometry (FWRecoGeometry &)
 
void addCSCGeometry (FWRecoGeometry &)
 
void addDTGeometry (FWRecoGeometry &)
 
void addFTLGeometry (FWRecoGeometry &)
 
void addGEMGeometry (FWRecoGeometry &)
 
void addME0Geometry (FWRecoGeometry &)
 
void addPixelBarrelGeometry (FWRecoGeometry &)
 
void addPixelForwardGeometry (FWRecoGeometry &)
 
void addRPCGeometry (FWRecoGeometry &)
 
void addTECGeometry (FWRecoGeometry &)
 
void addTIBGeometry (FWRecoGeometry &)
 
void addTIDGeometry (FWRecoGeometry &)
 
void addTOBGeometry (FWRecoGeometry &)
 
void fillPoints (unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end, FWRecoGeometry &)
 
void fillShapeAndPlacement (unsigned int id, const GeomDet *det, FWRecoGeometry &)
 
unsigned int insert_id (unsigned int id, FWRecoGeometry &)
 
void writeTrackerParametersXML (FWRecoGeometry &)
 

Private Attributes

bool m_calo
 
const CaloGeometrym_caloGeom = nullptr
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordm_caloGeomToken
 
unsigned int m_current
 
const FastTimeGeometrym_ftlBarrelGeom = nullptr
 
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecordm_ftlBarrelGeomToken
 
const FastTimeGeometrym_ftlEndcapGeom = nullptr
 
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecordm_ftlEndcapGeomToken
 
bool m_gem
 
bool m_muon
 
bool m_timing
 
bool m_tracker
 
const TrackerGeometrym_trackerGeom = nullptr
 
const GlobalTrackingGeometrym_trackingGeom = nullptr
 
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordm_trackingGeomToken
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 25 of file FWRecoGeometryESProducer.h.

Constructor & Destructor Documentation

◆ FWRecoGeometryESProducer() [1/2]

FWRecoGeometryESProducer::FWRecoGeometryESProducer ( const edm::ParameterSet pset)

Definition at line 104 of file FWRecoGeometryESProducer.cc.

References m_calo, m_caloGeomToken, m_ftlBarrelGeomToken, m_ftlEndcapGeomToken, m_gem, m_muon, m_timing, m_tracker, m_trackingGeomToken, or, muonDTDigis_cfi::pset, and edm::ESProducer::setWhatProduced().

104  : m_current(-1) {
105  m_tracker = pset.getUntrackedParameter<bool>("Tracker", true);
106  m_muon = pset.getUntrackedParameter<bool>("Muon", true);
107  m_gem = pset.getUntrackedParameter<bool>("GEM", false);
108  m_calo = pset.getUntrackedParameter<bool>("Calo", true);
109  m_timing = pset.getUntrackedParameter<bool>("Timing", false);
110  auto cc = setWhatProduced(this);
111 
112  if (m_muon)
113  m_gem = true;
114  if (m_tracker or m_muon or m_gem) {
115  m_trackingGeomToken = cc.consumes();
116  }
117  if (m_timing) {
118  m_ftlBarrelGeomToken = cc.consumes(edm::ESInputTag{"", "FastTimeBarrel"});
119  m_ftlEndcapGeomToken = cc.consumes(edm::ESInputTag{"", "SFBX"});
120  }
121  if (m_calo) {
122  m_caloGeomToken = cc.consumes();
123  }
124 }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_caloGeomToken
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_trackingGeomToken
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
Definition: Activities.doc:12
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlBarrelGeomToken
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlEndcapGeomToken

◆ ~FWRecoGeometryESProducer()

FWRecoGeometryESProducer::~FWRecoGeometryESProducer ( void  )
override

Definition at line 126 of file FWRecoGeometryESProducer.cc.

126 {}

◆ FWRecoGeometryESProducer() [2/2]

FWRecoGeometryESProducer::FWRecoGeometryESProducer ( const FWRecoGeometryESProducer )
delete

Member Function Documentation

◆ ADD_PIXEL_TOPOLOGY()

void FWRecoGeometryESProducer::ADD_PIXEL_TOPOLOGY ( unsigned int  rawid,
const GeomDet detUnit,
FWRecoGeometry fwRecoGeometry 
)
private

Definition at line 42 of file FWRecoGeometryESProducer.cc.

References f, FWRecoGeometry::idToName, PixelTopology::isItBigPixelInX(), PixelTopology::localX(), PixelTopology::localY(), PixelTopology::pitch(), and PixelGeomDetUnit::specificTopology().

Referenced by addPixelBarrelGeometry(), and addPixelForwardGeometry().

44  {
45  const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>(detUnit);
46  if (det) {
47  const PixelTopology* topo = &det->specificTopology();
48 
49  std::pair<float, float> pitch = topo->pitch();
50  fwRecoGeometry.idToName[rawid].topology[0] = pitch.first;
51  fwRecoGeometry.idToName[rawid].topology[1] = pitch.second;
52 
53  fwRecoGeometry.idToName[rawid].topology[2] = topo->localX(0.f); // offsetX
54  fwRecoGeometry.idToName[rawid].topology[3] = topo->localY(0.f); // offsetY
55 
56  // big pixels layout
57  fwRecoGeometry.idToName[rawid].topology[4] = topo->isItBigPixelInX(80) ? 0 : 1;
58  }
59 }
FWRecoGeom::InfoMap idToName
virtual float localX(float mpX) const =0
virtual bool isItBigPixelInX(int ixbin) const =0
double f[11][100]
virtual float localY(float mpY) const =0
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual std::pair< float, float > pitch() const =0

◆ addCaloGeometry()

void FWRecoGeometryESProducer::addCaloGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 489 of file FWRecoGeometryESProducer.cc.

References EZArrayFL< T >::begin(), EZArrayFL< T >::end(), mps_fire::end, fillPoints(), DetId::Forward, ForwardEmpty, relativeConstraints::geom, CaloGeometry::getGeometry(), hgcal::RecHitTools::getLayerWithOffset(), hgcal::RecHitTools::getSiThickIndex(), CaloGeometry::getSubdetectorGeometry(), CaloGeometry::getValidDetIds(), DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, mps_fire::i, triggerObjects_cff::id, FWRecoGeometry::idToName, insert_id(), hgcal::RecHitTools::isSilicon(), hgcal::RecHitTools::lastLayerEE(), m_caloGeom, hgcal::RecHitTools::setGeometry(), parallelization::uint, and hgcal::RecHitTools::zside().

Referenced by produce().

489  {
490  std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo
491  for (std::vector<DetId>::const_iterator it = vid.begin(), end = vid.end(); it != end; ++it) {
492  unsigned int id = insert_id(it->rawId(), fwRecoGeometry);
493  if (!((DetId::Forward == it->det()) || (DetId::HGCalEE == it->det()) || (DetId::HGCalHSi == it->det()) ||
494  (DetId::HGCalHSc == it->det()))) {
495  const CaloCellGeometry::CornersVec& cor = m_caloGeom->getGeometry(*it)->getCorners();
496  fillPoints(id, cor.begin(), cor.end(), fwRecoGeometry);
497  } else {
498  DetId::Detector det = it->det();
499  int subdet = (((DetId::HGCalEE == det) || (DetId::HGCalHSi == det) || (DetId::HGCalHSc == det)) ? ForwardEmpty
500  : it->subdetId());
501  const HGCalGeometry* geom = dynamic_cast<const HGCalGeometry*>(m_caloGeom->getSubdetectorGeometry(det, subdet));
502  hgcal::RecHitTools rhtools;
503  rhtools.setGeometry(*m_caloGeom);
504  const auto cor = geom->getNewCorners(*it);
505 
506  // roll = yaw = pitch = 0
507  fwRecoGeometry.idToName[id].matrix[0] = 1.0;
508  fwRecoGeometry.idToName[id].matrix[4] = 1.0;
509  fwRecoGeometry.idToName[id].matrix[8] = 1.0;
510 
511  // corners of the front face
512  for (uint i = 0; i < (cor.size() - 1); ++i) {
513  fwRecoGeometry.idToName[id].points[i * 3 + 0] = cor[i].x();
514  fwRecoGeometry.idToName[id].points[i * 3 + 1] = cor[i].y();
515  fwRecoGeometry.idToName[id].points[i * 3 + 2] = cor[i].z();
516  }
517 
518  // center
519  auto center = geom->getPosition(*it);
520  fwRecoGeometry.idToName[id].points[(cor.size() - 1) * 3 + 0] = center.x();
521  fwRecoGeometry.idToName[id].points[(cor.size() - 1) * 3 + 1] = center.y();
522  fwRecoGeometry.idToName[id].points[(cor.size() - 1) * 3 + 2] = center.z();
523 
524  // thickness
525  fwRecoGeometry.idToName[id].shape[3] = cor[cor.size() - 1].z();
526 
527  // total points
528  fwRecoGeometry.idToName[id].topology[0] = cor.size() - 1;
529 
530  // Layer with Offset
531  fwRecoGeometry.idToName[id].topology[1] = rhtools.getLayerWithOffset(it->rawId());
532 
533  // Zside, +/- 1
534  fwRecoGeometry.idToName[id].topology[2] = rhtools.zside(it->rawId());
535 
536  // Is Silicon
537  fwRecoGeometry.idToName[id].topology[3] = rhtools.isSilicon(it->rawId());
538 
539  // Silicon index
540  fwRecoGeometry.idToName[id].topology[4] =
541  rhtools.isSilicon(it->rawId()) ? rhtools.getSiThickIndex(it->rawId()) : -1.;
542 
543  // Last EE layer
544  fwRecoGeometry.idToName[id].topology[5] = rhtools.lastLayerEE();
545  }
546  }
547 }
size_type size() const
Definition: EZArrayFL.h:67
int zside(const DetId &id) const
Definition: RecHitTools.cc:163
void fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end, FWRecoGeometry &)
FWRecoGeom::InfoMap idToName
const_iterator end() const
Definition: EZArrayFL.h:53
const_iterator begin() const
Definition: EZArrayFL.h:52
bool isSilicon(const DetId &) const
Definition: RecHitTools.cc:428
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
Detector
Definition: DetId.h:24
void setGeometry(CaloGeometry const &)
Definition: RecHitTools.cc:68
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
int getSiThickIndex(const DetId &) const
Definition: RecHitTools.cc:205
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
unsigned int lastLayerEE(bool nose=false) const
Definition: RecHitTools.h:75
unsigned int getLayerWithOffset(const DetId &) const
Definition: RecHitTools.cc:365

◆ addCSCGeometry()

void FWRecoGeometryESProducer::addCSCGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 175 of file FWRecoGeometryESProducer.cc.

References CSCRadialStripTopology::angularWidth(), CSCRadialStripTopology::centreToIntersection(), relativeConstraints::chamber, CSCGeometry::chambers(), mps_fire::end, fillShapeAndPlacement(), FWRecoGeometry::idToName, insert_id(), phase1PixelTopology::layer, m_trackingGeom, DetId::Muon, CSCRadialStripTopology::phiOfOneEdge(), GlobalTrackingGeometry::slaveGeometry(), OffsetRadialStripTopology::stripOffset(), CSCWireTopology::wireAngle(), CSCWireTopology::wireSpacing(), CSCRadialStripTopology::yAxisOrientation(), and CSCRadialStripTopology::yCentreOfStripPlane().

Referenced by produce().

175  {
176  DetId detId(DetId::Muon, 2);
177  const CSCGeometry* cscGeometry = static_cast<const CSCGeometry*>(m_trackingGeom->slaveGeometry(detId));
178  for (auto it = cscGeometry->chambers().begin(), end = cscGeometry->chambers().end(); it != end; ++it) {
179  const CSCChamber* chamber = *it;
180 
181  if (chamber) {
182  unsigned int rawid = chamber->geographicalId();
183  unsigned int current = insert_id(rawid, fwRecoGeometry);
184  fillShapeAndPlacement(current, chamber, fwRecoGeometry);
185  //
186  // CSC layers geometry
187  //
188  for (std::vector<const CSCLayer*>::const_iterator lit = chamber->layers().begin(), lend = chamber->layers().end();
189  lit != lend;
190  ++lit) {
191  const CSCLayer* layer = *lit;
192 
193  if (layer) {
194  unsigned int rawid = layer->geographicalId();
195  unsigned int current = insert_id(rawid, fwRecoGeometry);
196  fillShapeAndPlacement(current, layer, fwRecoGeometry);
197 
198  const CSCStripTopology* stripTopology = layer->geometry()->topology();
199  fwRecoGeometry.idToName[current].topology[0] = stripTopology->yAxisOrientation();
200  fwRecoGeometry.idToName[current].topology[1] = stripTopology->centreToIntersection();
201  fwRecoGeometry.idToName[current].topology[2] = stripTopology->yCentreOfStripPlane();
202  fwRecoGeometry.idToName[current].topology[3] = stripTopology->phiOfOneEdge();
203  fwRecoGeometry.idToName[current].topology[4] = stripTopology->stripOffset();
204  fwRecoGeometry.idToName[current].topology[5] = stripTopology->angularWidth();
205 
206  const CSCWireTopology* wireTopology = layer->geometry()->wireTopology();
207  fwRecoGeometry.idToName[current].topology[6] = wireTopology->wireSpacing();
208  fwRecoGeometry.idToName[current].topology[7] = wireTopology->wireAngle();
209  }
210  }
211  }
212  }
213 }
float centreToIntersection() const override
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
float phiOfOneEdge() const override
const GlobalTrackingGeometry * m_trackingGeom
constexpr std::array< uint8_t, layerIndexSize > layer
float yAxisOrientation() const override
FWRecoGeom::InfoMap idToName
float wireAngle() const override
virtual float stripOffset(void) const
float angularWidth() const override
double wireSpacing() const
Definition: DetId.h:17
float yCentreOfStripPlane() const override
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
const ChamberContainer & chambers() const
Return a vector of all chambers.
Definition: CSCGeometry.cc:96

◆ addDTGeometry()

void FWRecoGeometryESProducer::addDTGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 215 of file FWRecoGeometryESProducer.cc.

References DTTopology::cellHeight(), DTTopology::cellLenght(), DTTopology::cellWidth(), relativeConstraints::chamber, DTGeometry::chambers(), DTTopology::channels(), mps_fire::end, fillShapeAndPlacement(), DTTopology::firstChannel(), FWRecoGeometry::idToName, insert_id(), DTTopology::lastChannel(), phase1PixelTopology::layer, DTGeometry::layers(), m_trackingGeom, DetId::Muon, and GlobalTrackingGeometry::slaveGeometry().

Referenced by produce().

215  {
216  DetId detId(DetId::Muon, 1);
217  const DTGeometry* dtGeometry = static_cast<const DTGeometry*>(m_trackingGeom->slaveGeometry(detId));
218 
219  //
220  // DT chambers geometry
221  //
222  for (auto it = dtGeometry->chambers().begin(), end = dtGeometry->chambers().end(); it != end; ++it) {
223  const DTChamber* chamber = *it;
224 
225  if (chamber) {
226  unsigned int rawid = chamber->geographicalId().rawId();
227  unsigned int current = insert_id(rawid, fwRecoGeometry);
228  fillShapeAndPlacement(current, chamber, fwRecoGeometry);
229  }
230  }
231 
232  // Fill in DT layer parameters
233  for (auto it = dtGeometry->layers().begin(), end = dtGeometry->layers().end(); it != end; ++it) {
234  const DTLayer* layer = *it;
235 
236  if (layer) {
237  unsigned int rawid = layer->id().rawId();
238  unsigned int current = insert_id(rawid, fwRecoGeometry);
239  fillShapeAndPlacement(current, layer, fwRecoGeometry);
240 
241  const DTTopology& topo = layer->specificTopology();
242  const BoundPlane& surf = layer->surface();
243  // Topology W/H/L:
244  fwRecoGeometry.idToName[current].topology[0] = topo.cellWidth();
245  fwRecoGeometry.idToName[current].topology[1] = topo.cellHeight();
246  fwRecoGeometry.idToName[current].topology[2] = topo.cellLenght();
247  fwRecoGeometry.idToName[current].topology[3] = topo.firstChannel();
248  fwRecoGeometry.idToName[current].topology[4] = topo.lastChannel();
249  fwRecoGeometry.idToName[current].topology[5] = topo.channels();
250 
251  // Bounds W/H/L:
252  fwRecoGeometry.idToName[current].topology[6] = surf.bounds().width();
253  fwRecoGeometry.idToName[current].topology[7] = surf.bounds().thickness();
254  fwRecoGeometry.idToName[current].topology[8] = surf.bounds().length();
255  }
256  }
257 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
float cellLenght() const
Definition: DTTopology.h:74
const GlobalTrackingGeometry * m_trackingGeom
constexpr std::array< uint8_t, layerIndexSize > layer
FWRecoGeom::InfoMap idToName
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
float cellWidth() const
Returns the cell width.
Definition: DTTopology.h:69
Definition: DetId.h:17
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
Definition: DTGeometry.cc:88
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:76
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:71

◆ addFTLGeometry()

void FWRecoGeometryESProducer::addFTLGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 549 of file FWRecoGeometryESProducer.cc.

References fillPoints(), FastTimeGeometry::getCorners(), FastTimeGeometry::getValidDetIds(), insert_id(), m_ftlBarrelGeom, and m_ftlEndcapGeom.

Referenced by produce().

549  {
550  // do the barrel
551  for (const auto& detid : m_ftlBarrelGeom->getValidDetIds()) {
552  unsigned int id = insert_id(detid.rawId(), fwRecoGeometry);
553  const auto& cor = m_ftlBarrelGeom->getCorners(detid);
554  fillPoints(id, cor.begin(), cor.end(), fwRecoGeometry);
555  }
556  // do the endcap
557  for (const auto& detid : m_ftlEndcapGeom->getValidDetIds()) {
558  unsigned int id = insert_id(detid.rawId(), fwRecoGeometry);
559  const auto& cor = m_ftlEndcapGeom->getCorners(detid);
560  fillPoints(id, cor.begin(), cor.end(), fwRecoGeometry);
561  }
562 }
const FastTimeGeometry * m_ftlBarrelGeom
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell&#39;s volume.
void fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end, FWRecoGeometry &)
const FastTimeGeometry * m_ftlEndcapGeom
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)
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ addGEMGeometry()

void FWRecoGeometryESProducer::addGEMGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 288 of file FWRecoGeometryESProducer.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, GEMGeometry::chambers(), MillePedeFileConverter_cfg::e, GEMGeometry::etaPartitions(), cppFunctionSkipper::exception, FWRecoGeometry::extraDet, fillShapeAndPlacement(), triggerObjects_cff::id, FWRecoGeometry::idToName, insert_id(), m_trackingGeom, DetId::Muon, StripTopology::nstrips(), StripTopology::pitch(), GlobalTrackingGeometry::slaveGeometry(), StripTopology::stripLength(), and GEMGeometry::superChambers().

Referenced by produce().

288  {
289  //
290  // GEM geometry
291  //
292 
293  try {
294  DetId detId(DetId::Muon, 4);
295  const GEMGeometry* gemGeom = static_cast<const GEMGeometry*>(m_trackingGeom->slaveGeometry(detId));
296 
297  // add in superChambers - gem Segments are based on superChambers
298  for (auto sc : gemGeom->superChambers()) {
299  if (sc) {
300  unsigned int rawid = sc->geographicalId().rawId();
301  unsigned int current = insert_id(rawid, fwRecoGeometry);
302  fillShapeAndPlacement(current, sc, fwRecoGeometry);
303  }
304  }
305  // add in chambers
306  for (auto ch : gemGeom->chambers()) {
307  if (ch) {
308  unsigned int rawid = ch->geographicalId().rawId();
309  unsigned int current = insert_id(rawid, fwRecoGeometry);
310  fillShapeAndPlacement(current, ch, fwRecoGeometry);
311  }
312  }
313  // add in etaPartitions - gem rechits are based on etaPartitions
314  for (auto roll : gemGeom->etaPartitions()) {
315  if (roll) {
316  unsigned int rawid = roll->geographicalId().rawId();
317  unsigned int current = insert_id(rawid, fwRecoGeometry);
318  fillShapeAndPlacement(current, roll, fwRecoGeometry);
319 
320  const StripTopology& topo = roll->specificTopology();
321  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
322  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
323  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
324 
325  float height = topo.stripLength() / 2;
326  LocalPoint lTop(0., height, 0.);
327  LocalPoint lBottom(0., -height, 0.);
328  fwRecoGeometry.idToName[current].topology[3] = roll->localPitch(lTop);
329  fwRecoGeometry.idToName[current].topology[4] = roll->localPitch(lBottom);
330  fwRecoGeometry.idToName[current].topology[5] = roll->npads();
331  }
332  }
333 
334  fwRecoGeometry.extraDet.Add(new TNamed("GEM", "GEM muon detector"));
335  try {
336  GEMDetId id(1, 1, 2, 1, 1, 1);
338  fwRecoGeometry.extraDet.Add(new TNamed("GE2", "GEM endcap station 2"));
339  } catch (std::runtime_error& e) {
340  std::cerr << e.what() << std::endl;
341  }
342 
343  } catch (cms::Exception& exception) {
344  edm::LogError("FWRecoGeometry") << " GEM geometry not found " << exception.what() << std::endl;
345  }
346 }
virtual int nstrips() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
const GlobalTrackingGeometry * m_trackingGeom
Log< level::Error, false > LogError
FWRecoGeom::InfoMap idToName
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:38
virtual float stripLength() const =0
Definition: DetId.h:17
TObjArray extraDet
virtual float pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
Definition: GEMGeometry.cc:36
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
Definition: GEMGeometry.cc:40

◆ addME0Geometry()

void FWRecoGeometryESProducer::addME0Geometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 348 of file FWRecoGeometryESProducer.cc.

References ME0Geometry::etaPartitions(), cppFunctionSkipper::exception, FWRecoGeometry::extraDet, fillShapeAndPlacement(), FWRecoGeometry::idToName, insert_id(), m_trackingGeom, DetId::Muon, StripTopology::nstrips(), StripTopology::pitch(), GlobalTrackingGeometry::slaveGeometry(), and StripTopology::stripLength().

Referenced by produce().

348  {
349  //
350  // ME0 geometry
351  //
352 
353  DetId detId(DetId::Muon, 5);
354  try {
355  const ME0Geometry* me0Geom = static_cast<const ME0Geometry*>(m_trackingGeom->slaveGeometry(detId));
356  for (auto roll : me0Geom->etaPartitions()) {
357  if (roll) {
358  unsigned int rawid = roll->geographicalId().rawId();
359  unsigned int current = insert_id(rawid, fwRecoGeometry);
360  fillShapeAndPlacement(current, roll, fwRecoGeometry);
361 
362  const StripTopology& topo = roll->specificTopology();
363  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
364  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
365  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
366 
367  float height = topo.stripLength() / 2;
368  LocalPoint lTop(0., height, 0.);
369  LocalPoint lBottom(0., -height, 0.);
370  fwRecoGeometry.idToName[current].topology[3] = roll->localPitch(lTop);
371  fwRecoGeometry.idToName[current].topology[4] = roll->localPitch(lBottom);
372  fwRecoGeometry.idToName[current].topology[5] = roll->npads();
373  }
374  }
375  fwRecoGeometry.extraDet.Add(new TNamed("ME0", "ME0 muon detector"));
376  } catch (cms::Exception& exception) {
377  edm::LogError("FWRecoGeometry") << " ME0 geometry not found " << exception.what() << std::endl;
378  }
379 }
virtual int nstrips() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
const GlobalTrackingGeometry * m_trackingGeom
Log< level::Error, false > LogError
FWRecoGeom::InfoMap idToName
virtual float stripLength() const =0
Definition: DetId.h:17
TObjArray extraDet
virtual float pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
Definition: ME0Geometry.cc:33

◆ addPixelBarrelGeometry()

void FWRecoGeometryESProducer::addPixelBarrelGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 381 of file FWRecoGeometryESProducer.cc.

References ADD_PIXEL_TOPOLOGY(), TrackerGeometry::detsPXB(), mps_fire::end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDetUnit(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

381  {
382  for (TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(),
383  end = m_trackerGeom->detsPXB().end();
384  it != end;
385  ++it) {
386  const GeomDet* det = *it;
387 
388  if (det) {
389  DetId detid = det->geographicalId();
390  unsigned int rawid = detid.rawId();
391  unsigned int current = insert_id(rawid, fwRecoGeometry);
392  fillShapeAndPlacement(current, det, fwRecoGeometry);
393 
394  ADD_PIXEL_TOPOLOGY(current, m_trackerGeom->idToDetUnit(detid), fwRecoGeometry);
395  }
396  }
397 }
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 &)
const DetContainer & detsPXB() const
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ addPixelForwardGeometry()

void FWRecoGeometryESProducer::addPixelForwardGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 399 of file FWRecoGeometryESProducer.cc.

References ADD_PIXEL_TOPOLOGY(), TrackerGeometry::detsPXF(), mps_fire::end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDetUnit(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

399  {
400  for (TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(),
401  end = m_trackerGeom->detsPXF().end();
402  it != end;
403  ++it) {
404  const GeomDet* det = *it;
405 
406  if (det) {
407  DetId detid = det->geographicalId();
408  unsigned int rawid = detid.rawId();
409  unsigned int current = insert_id(rawid, fwRecoGeometry);
410  fillShapeAndPlacement(current, det, fwRecoGeometry);
411 
412  ADD_PIXEL_TOPOLOGY(current, m_trackerGeom->idToDetUnit(detid), fwRecoGeometry);
413  }
414  }
415 }
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 &)
const DetContainer & detsPXF() const
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ addRPCGeometry()

void FWRecoGeometryESProducer::addRPCGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 259 of file FWRecoGeometryESProducer.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, MillePedeFileConverter_cfg::e, mps_fire::end, FWRecoGeometry::extraDet, fillShapeAndPlacement(), GeomDet::geographicalId(), triggerObjects_cff::id, FWRecoGeometry::idToName, insert_id(), m_trackingGeom, DetId::Muon, StripTopology::nstrips(), StripTopology::pitch(), DetId::rawId(), RPCGeometry::rolls(), GlobalTrackingGeometry::slaveGeometry(), RPCRoll::specificTopology(), and StripTopology::stripLength().

Referenced by produce().

259  {
260  //
261  // RPC rolls geometry
262  //
263  DetId detId(DetId::Muon, 3);
264  const RPCGeometry* rpcGeom = static_cast<const RPCGeometry*>(m_trackingGeom->slaveGeometry(detId));
265  for (auto it = rpcGeom->rolls().begin(), end = rpcGeom->rolls().end(); it != end; ++it) {
266  const RPCRoll* roll = (*it);
267  if (roll) {
268  unsigned int rawid = roll->geographicalId().rawId();
269  unsigned int current = insert_id(rawid, fwRecoGeometry);
270  fillShapeAndPlacement(current, roll, fwRecoGeometry);
271 
272  const StripTopology& topo = roll->specificTopology();
273  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
274  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
275  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
276  }
277  }
278 
279  try {
280  RPCDetId id(1, 1, 4, 1, 1, 1, 1);
282  fwRecoGeometry.extraDet.Add(new TNamed("RE4", "RPC endcap station 4"));
283  } catch (std::runtime_error& e) {
284  std::cerr << e.what() << std::endl;
285  }
286 }
virtual int nstrips() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
const GlobalTrackingGeometry * m_trackingGeom
FWRecoGeom::InfoMap idToName
virtual float stripLength() const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:49
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
TObjArray extraDet
virtual float pitch() const =0
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition: RPCGeometry.cc:44
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ addTECGeometry()

void FWRecoGeometryESProducer::addTECGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 471 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, TrackerGeometry::detsTEC(), mps_fire::end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

471  {
472  for (TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(),
473  end = m_trackerGeom->detsTEC().end();
474  it != end;
475  ++it) {
476  const GeomDet* det = *it;
477 
478  if (det) {
479  DetId detid = det->geographicalId();
480  unsigned int rawid = detid.rawId();
481  unsigned int current = insert_id(rawid, fwRecoGeometry);
482  fillShapeAndPlacement(current, det, fwRecoGeometry);
483 
484  ADD_SISTRIP_TOPOLOGY(current, m_trackerGeom->idToDet(detid));
485  }
486  }
487 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const DetContainer & detsTEC() const
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ addTIBGeometry()

void FWRecoGeometryESProducer::addTIBGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 417 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, TrackerGeometry::detsTIB(), mps_fire::end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

417  {
418  for (TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTIB().begin(),
419  end = m_trackerGeom->detsTIB().end();
420  it != end;
421  ++it) {
422  const GeomDet* det = *it;
423 
424  if (det) {
425  DetId detid = det->geographicalId();
426  unsigned int rawid = detid.rawId();
427  unsigned int current = insert_id(rawid, fwRecoGeometry);
428  fillShapeAndPlacement(current, det, fwRecoGeometry);
429 
430  ADD_SISTRIP_TOPOLOGY(current, m_trackerGeom->idToDet(detid));
431  }
432  }
433 }
const DetContainer & detsTIB() const
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ addTIDGeometry()

void FWRecoGeometryESProducer::addTIDGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 453 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, TrackerGeometry::detsTID(), mps_fire::end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

453  {
454  for (TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(),
455  end = m_trackerGeom->detsTID().end();
456  it != end;
457  ++it) {
458  const GeomDet* det = *it;
459 
460  if (det) {
461  DetId detid = det->geographicalId();
462  unsigned int rawid = detid.rawId();
463  unsigned int current = insert_id(rawid, fwRecoGeometry);
464  fillShapeAndPlacement(current, det, fwRecoGeometry);
465 
466  ADD_SISTRIP_TOPOLOGY(current, m_trackerGeom->idToDet(detid));
467  }
468  }
469 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
const DetContainer & detsTID() const

◆ addTOBGeometry()

void FWRecoGeometryESProducer::addTOBGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 435 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, TrackerGeometry::detsTOB(), mps_fire::end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

435  {
436  for (TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(),
437  end = m_trackerGeom->detsTOB().end();
438  it != end;
439  ++it) {
440  const GeomDet* det = *it;
441 
442  if (det) {
443  DetId detid = det->geographicalId();
444  unsigned int rawid = detid.rawId();
445  unsigned int current = insert_id(rawid, fwRecoGeometry);
446  fillShapeAndPlacement(current, det, fwRecoGeometry);
447 
448  ADD_SISTRIP_TOPOLOGY(current, m_trackerGeom->idToDet(detid));
449  }
450  }
451 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
const DetContainer & detsTOB() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id, FWRecoGeometry &)

◆ fillPoints()

void FWRecoGeometryESProducer::fillPoints ( unsigned int  id,
std::vector< GlobalPoint >::const_iterator  begin,
std::vector< GlobalPoint >::const_iterator  end,
FWRecoGeometry fwRecoGeometry 
)
private

Definition at line 572 of file FWRecoGeometryESProducer.cc.

References cms::cuda::assert(), mps_fire::end, mps_fire::i, triggerObjects_cff::id, FWRecoGeometry::idToName, and FWTGeoRecoGeometry::maxPoints_.

Referenced by addCaloGeometry(), and addFTLGeometry().

575  {
576  unsigned int index(0);
577  for (std::vector<GlobalPoint>::const_iterator i = begin; i != end; ++i) {
579  fwRecoGeometry.idToName[id].points[index] = i->x();
580  fwRecoGeometry.idToName[id].points[++index] = i->y();
581  fwRecoGeometry.idToName[id].points[++index] = i->z();
582  ++index;
583  }
584 }
static const int maxPoints_
assert(be >=bs)
FWRecoGeom::InfoMap idToName

◆ fillShapeAndPlacement()

void FWRecoGeometryESProducer::fillShapeAndPlacement ( unsigned int  id,
const GeomDet det,
FWRecoGeometry fwRecoGeometry 
)
private

Shape of GeomDet

Definition at line 587 of file FWRecoGeometryESProducer.cc.

References b, b2, triggerObjects_cff::id, FWRecoGeometry::idToName, GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), GeomDet::surface(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), TkRotation< T >::yx(), TkRotation< T >::yy(), TkRotation< T >::yz(), TkRotation< T >::zx(), TkRotation< T >::zy(), and TkRotation< T >::zz().

Referenced by addCSCGeometry(), addDTGeometry(), addGEMGeometry(), addME0Geometry(), addPixelBarrelGeometry(), addPixelForwardGeometry(), addRPCGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), and addTOBGeometry().

589  {
590  // Trapezoidal
591  const Bounds* b = &((det->surface()).bounds());
592  if (const TrapezoidalPlaneBounds* b2 = dynamic_cast<const TrapezoidalPlaneBounds*>(b)) {
593  std::array<const float, 4> const& par = b2->parameters();
594 
595  // These parameters are half-lengths, as in CMSIM/GEANT3
596  fwRecoGeometry.idToName[id].shape[0] = 1;
597  fwRecoGeometry.idToName[id].shape[1] = par[0]; // hBottomEdge
598  fwRecoGeometry.idToName[id].shape[2] = par[1]; // hTopEdge
599  fwRecoGeometry.idToName[id].shape[3] = par[2]; // thickness
600  fwRecoGeometry.idToName[id].shape[4] = par[3]; // apothem
601  }
602  if (const RectangularPlaneBounds* b2 = dynamic_cast<const RectangularPlaneBounds*>(b)) {
603  // Rectangular
604  fwRecoGeometry.idToName[id].shape[0] = 2;
605  fwRecoGeometry.idToName[id].shape[1] = b2->width() * 0.5; // half width
606  fwRecoGeometry.idToName[id].shape[2] = b2->length() * 0.5; // half length
607  fwRecoGeometry.idToName[id].shape[3] = b2->thickness() * 0.5; // half thickness
608  }
609 
610  // Position of the DetUnit's center
611  GlobalPoint pos = det->surface().position();
612  fwRecoGeometry.idToName[id].translation[0] = pos.x();
613  fwRecoGeometry.idToName[id].translation[1] = pos.y();
614  fwRecoGeometry.idToName[id].translation[2] = pos.z();
615 
616  // Add the coeff of the rotation matrix
617  // with a projection on the basis vectors
618  TkRotation<float> detRot = det->surface().rotation();
619  fwRecoGeometry.idToName[id].matrix[0] = detRot.xx();
620  fwRecoGeometry.idToName[id].matrix[1] = detRot.yx();
621  fwRecoGeometry.idToName[id].matrix[2] = detRot.zx();
622  fwRecoGeometry.idToName[id].matrix[3] = detRot.xy();
623  fwRecoGeometry.idToName[id].matrix[4] = detRot.yy();
624  fwRecoGeometry.idToName[id].matrix[5] = detRot.zy();
625  fwRecoGeometry.idToName[id].matrix[6] = detRot.xz();
626  fwRecoGeometry.idToName[id].matrix[7] = detRot.yz();
627  fwRecoGeometry.idToName[id].matrix[8] = detRot.zz();
628 }
T xx() const
T xy() const
T zz() const
T yy() const
T yz() const
FWRecoGeom::InfoMap idToName
T zx() const
T zy() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const PositionType & position() const
double b
Definition: hdecay.h:118
const RotationType & rotation() const
Definition: Bounds.h:18
static constexpr float b2
T xz() const
T yx() const

◆ insert_id()

unsigned int FWRecoGeometryESProducer::insert_id ( unsigned int  id,
FWRecoGeometry fwRecoGeometry 
)
private

◆ operator=()

const FWRecoGeometryESProducer& FWRecoGeometryESProducer::operator= ( const FWRecoGeometryESProducer )
delete

◆ produce()

std::unique_ptr< FWRecoGeometry > FWRecoGeometryESProducer::produce ( const FWRecoGeometryRecord record)

Definition at line 128 of file FWRecoGeometryESProducer.cc.

References addCaloGeometry(), addCSCGeometry(), addDTGeometry(), addFTLGeometry(), addGEMGeometry(), addME0Geometry(), addPixelBarrelGeometry(), addPixelForwardGeometry(), addRPCGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), addTOBGeometry(), m_calo, m_caloGeom, m_caloGeomToken, m_current, m_ftlBarrelGeom, m_ftlBarrelGeomToken, m_ftlEndcapGeom, m_ftlEndcapGeomToken, m_gem, m_muon, m_timing, m_tracker, m_trackerGeom, m_trackingGeom, m_trackingGeomToken, AlCaHarvesting_cff::record, GlobalTrackingGeometry::slaveGeometry(), jetUpdater_cfi::sort, edm::swap(), DetId::Tracker, and writeTrackerParametersXML().

128  {
129  using namespace edm;
130 
131  auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
132 
133  if (m_tracker || m_muon || m_gem) {
135  }
136 
137  if (m_tracker) {
138  DetId detId(DetId::Tracker, 0);
139  m_trackerGeom = static_cast<const TrackerGeometry*>(m_trackingGeom->slaveGeometry(detId));
140  addPixelBarrelGeometry(*fwRecoGeometry);
141  addPixelForwardGeometry(*fwRecoGeometry);
142  addTIBGeometry(*fwRecoGeometry);
143  addTIDGeometry(*fwRecoGeometry);
144  addTOBGeometry(*fwRecoGeometry);
145  addTECGeometry(*fwRecoGeometry);
146  writeTrackerParametersXML(*fwRecoGeometry);
147  }
148  if (m_muon) {
149  addDTGeometry(*fwRecoGeometry);
150  addCSCGeometry(*fwRecoGeometry);
151  addRPCGeometry(*fwRecoGeometry);
152  addME0Geometry(*fwRecoGeometry);
153  }
154  if (m_gem) {
155  addGEMGeometry(*fwRecoGeometry);
156  }
157  if (m_calo) {
159  addCaloGeometry(*fwRecoGeometry);
160  }
161 
162  if (m_timing) {
165  addFTLGeometry(*fwRecoGeometry);
166  }
167 
168  fwRecoGeometry->idToName.resize(m_current + 1);
169  std::vector<FWRecoGeom::Info>(fwRecoGeometry->idToName).swap(fwRecoGeometry->idToName);
170  std::sort(fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
171 
172  return fwRecoGeometry;
173 }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_caloGeomToken
const FastTimeGeometry * m_ftlBarrelGeom
void addFTLGeometry(FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
void addTOBGeometry(FWRecoGeometry &)
void addTIBGeometry(FWRecoGeometry &)
const GlobalTrackingGeometry * m_trackingGeom
void addRPCGeometry(FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
void addCaloGeometry(FWRecoGeometry &)
const FastTimeGeometry * m_ftlEndcapGeom
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_trackingGeomToken
void addPixelForwardGeometry(FWRecoGeometry &)
void writeTrackerParametersXML(FWRecoGeometry &)
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(FWRecoGeometry &)
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlBarrelGeomToken
Definition: DetId.h:17
HLT enums.
void addGEMGeometry(FWRecoGeometry &)
void addTIDGeometry(FWRecoGeometry &)
void addPixelBarrelGeometry(FWRecoGeometry &)
edm::ESGetToken< FastTimeGeometry, IdealGeometryRecord > m_ftlEndcapGeomToken
void addDTGeometry(FWRecoGeometry &)
void addME0Geometry(FWRecoGeometry &)

◆ writeTrackerParametersXML()

void FWRecoGeometryESProducer::writeTrackerParametersXML ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 630 of file FWRecoGeometryESProducer.cc.

References edmScanValgrind::buffer, contentValuesFiles::fullPath, edm::FileInPath::fullPath(), TrackerGeometry::isThere(), m_trackerGeom, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2OTB, GeomDetEnumerators::P2OTEC, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, castor_dqm_sourceclient_file_cfg::path, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, and FWRecoGeometry::trackerTopologyXML.

Referenced by produce().

630  {
631  std::string path = "Geometry/TrackerCommonData/data/";
633  path += "PhaseI/";
636  path += "PhaseII/";
637  }
638  path += "trackerParameters.xml";
640  std::ifstream t(fullPath);
641  std::stringstream buffer;
642  buffer << t.rdbuf();
643  fwRecoGeometry.trackerTopologyXML = buffer.str();
644 }
std::string trackerTopologyXML
std::string fullPath() const
Definition: FileInPath.cc:161
const TrackerGeometry * m_trackerGeom
bool isThere(GeomDetEnumerators::SubDetector subdet) const

Member Data Documentation

◆ m_calo

bool FWRecoGeometryESProducer::m_calo
private

Definition at line 75 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_caloGeom

const CaloGeometry* FWRecoGeometryESProducer::m_caloGeom = nullptr
private

Definition at line 66 of file FWRecoGeometryESProducer.h.

Referenced by addCaloGeometry(), and produce().

◆ m_caloGeomToken

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> FWRecoGeometryESProducer::m_caloGeomToken
private

Definition at line 64 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_current

unsigned int FWRecoGeometryESProducer::m_current
private

Definition at line 71 of file FWRecoGeometryESProducer.h.

Referenced by insert_id(), and produce().

◆ m_ftlBarrelGeom

const FastTimeGeometry* FWRecoGeometryESProducer::m_ftlBarrelGeom = nullptr
private

Definition at line 67 of file FWRecoGeometryESProducer.h.

Referenced by addFTLGeometry(), and produce().

◆ m_ftlBarrelGeomToken

edm::ESGetToken<FastTimeGeometry, IdealGeometryRecord> FWRecoGeometryESProducer::m_ftlBarrelGeomToken
private

Definition at line 62 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_ftlEndcapGeom

const FastTimeGeometry* FWRecoGeometryESProducer::m_ftlEndcapGeom = nullptr
private

Definition at line 68 of file FWRecoGeometryESProducer.h.

Referenced by addFTLGeometry(), and produce().

◆ m_ftlEndcapGeomToken

edm::ESGetToken<FastTimeGeometry, IdealGeometryRecord> FWRecoGeometryESProducer::m_ftlEndcapGeomToken
private

Definition at line 63 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_gem

bool FWRecoGeometryESProducer::m_gem
private

Definition at line 74 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_muon

bool FWRecoGeometryESProducer::m_muon
private

Definition at line 73 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_timing

bool FWRecoGeometryESProducer::m_timing
private

Definition at line 76 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_tracker

bool FWRecoGeometryESProducer::m_tracker
private

Definition at line 72 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

◆ m_trackerGeom

const TrackerGeometry* FWRecoGeometryESProducer::m_trackerGeom = nullptr
private

◆ m_trackingGeom

const GlobalTrackingGeometry* FWRecoGeometryESProducer::m_trackingGeom = nullptr
private

◆ m_trackingGeomToken

edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> FWRecoGeometryESProducer::m_trackingGeomToken
private

Definition at line 61 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().