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 &)
 
std::unique_ptr< FWRecoGeometryproduce (const FWRecoGeometryRecord &)
 
 ~FWRecoGeometryESProducer (void) override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
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 &)
 
 FWRecoGeometryESProducer (const FWRecoGeometryESProducer &)=delete
 
unsigned int insert_id (unsigned int id, FWRecoGeometry &)
 
const FWRecoGeometryESProduceroperator= (const FWRecoGeometryESProducer &)=delete
 
void writeTrackerParametersXML (FWRecoGeometry &)
 

Private Attributes

bool m_calo
 
const CaloGeometrym_caloGeom
 
unsigned int m_current
 
edm::ESHandle< FastTimeGeometrym_ftlBarrelGeom
 
edm::ESHandle< FastTimeGeometrym_ftlEndcapGeom
 
edm::ESHandle< GlobalTrackingGeometrym_geomRecord
 
std::vector< edm::ESHandle< HGCalGeometry > > m_hgcalGeoms
 
bool m_muon
 
bool m_timing
 
bool m_tracker
 
const TrackerGeometrym_trackerGeom
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
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={})
 
- 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 eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 24 of file FWRecoGeometryESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 111 of file FWRecoGeometryESProducer.cc.

References funct::false, edm::ParameterSet::getUntrackedParameter(), m_calo, m_muon, m_timing, m_tracker, edm::ESProducer::setWhatProduced(), and funct::true.

112  : m_current( -1 )
113 {
114  m_tracker = pset.getUntrackedParameter<bool>( "Tracker", true );
115  m_muon = pset.getUntrackedParameter<bool>( "Muon", true );
116  m_calo = pset.getUntrackedParameter<bool>( "Calo", true );
117  m_timing = pset.getUntrackedParameter<bool>( "Timing", false );
118  setWhatProduced( this );
119 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
T getUntrackedParameter(std::string const &, T const &) const
FWRecoGeometryESProducer::~FWRecoGeometryESProducer ( void  )
override

Definition at line 121 of file FWRecoGeometryESProducer.cc.

122 {}
FWRecoGeometryESProducer::FWRecoGeometryESProducer ( const FWRecoGeometryESProducer )
privatedelete

Member Function Documentation

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

Definition at line 40 of file FWRecoGeometryESProducer.cc.

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

Referenced by addPixelBarrelGeometry(), and addPixelForwardGeometry().

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

Definition at line 554 of file FWRecoGeometryESProducer.cc.

References EZArrayFL< T >::begin(), end, EZArrayFL< T >::end(), fillPoints(), DetId::Forward, ForwardEmpty, relativeConstraints::geom, CaloGeometry::getGeometry(), HGCalGeometry::getNewCorners(), HGCalGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), CaloGeometry::getValidDetIds(), DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, mps_fire::i, triggerObjects_cff::id, FWRecoGeometry::idToName, insert_id(), m_caloGeom, and parallelization::uint().

Referenced by produce().

555 {
556  std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo
557  for( std::vector<DetId>::const_iterator it = vid.begin(),
558  end = vid.end();
559  it != end; ++it ) {
560  unsigned int id = insert_id( it->rawId(), fwRecoGeometry);
561  if( !((DetId::Forward == it->det()) || (DetId::HGCalEE == it->det()) ||
562  (DetId::HGCalHSi == it->det()) || (DetId::HGCalHSc == it->det())) ) {
563  const CaloCellGeometry::CornersVec& cor = m_caloGeom->getGeometry( *it )->getCorners();
564  fillPoints( id, cor.begin(), cor.end(), fwRecoGeometry);
565  } else {
566  DetId::Detector det = it->det();
567  int subdet = (((DetId::HGCalEE == det) ||
568  (DetId::HGCalHSi == det) ||
569  (DetId::HGCalHSc == det)) ? ForwardEmpty :
570  it->subdetId());
571  const HGCalGeometry* geom = dynamic_cast<const HGCalGeometry*>(m_caloGeom->getSubdetectorGeometry(det,subdet));
572  const auto cor = geom->getNewCorners( *it );
573 
574  // roll = yaw = pitch = 0
575  fwRecoGeometry.idToName[id].matrix[0] = 1.0;
576  fwRecoGeometry.idToName[id].matrix[4] = 1.0;
577  fwRecoGeometry.idToName[id].matrix[8] = 1.0;
578 
579  // corners of the front face
580  for(uint i = 0; i < (cor.size()-1); ++i){
581  fwRecoGeometry.idToName[id].points[i*3+0] = cor[i].x();
582  fwRecoGeometry.idToName[id].points[i*3+1] = cor[i].y();
583  fwRecoGeometry.idToName[id].points[i*3+2] = cor[i].z();
584  }
585 
586  // center
587  auto center = geom->getPosition(*it);
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();
591 
592  // thickness
593  fwRecoGeometry.idToName[id].shape[3] = cor[cor.size()-1].z();
594 
595  // total points
596  fwRecoGeometry.idToName[id].topology[0] = cor.size() - 1;
597  }
598  }
599 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
const_iterator begin() const
Definition: EZArrayFL.h:63
GlobalPoint getPosition(const DetId &id) const
void fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end, FWRecoGeometry &)
FWRecoGeom::InfoMap idToName
#define end
Definition: vmac.h:39
size_type size() const
Definition: EZArrayFL.h:81
Detector
Definition: DetId.h:26
CornersVec getNewCorners(const DetId &id) const
def uint(string)
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
const_iterator end() const
Definition: EZArrayFL.h:64
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:85
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addCSCGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 177 of file FWRecoGeometryESProducer.cc.

References CSCRadialStripTopology::angularWidth(), CSCRadialStripTopology::centreToIntersection(), relativeConstraints::chamber, CSCGeometry::chambers(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), CSCLayer::geometry(), FWRecoGeometry::idToName, insert_id(), CSCChamber::layers(), m_geomRecord, DetId::Muon, CSCRadialStripTopology::phiOfOneEdge(), GlobalTrackingGeometry::slaveGeometry(), OffsetRadialStripTopology::stripOffset(), CSCLayerGeometry::topology(), CSCWireTopology::wireAngle(), CSCWireTopology::wireSpacing(), CSCLayerGeometry::wireTopology(), CSCRadialStripTopology::yAxisOrientation(), and CSCRadialStripTopology::yCentreOfStripPlane().

Referenced by produce().

178 {
179  DetId detId( DetId::Muon, 2 );
180  const CSCGeometry* cscGeometry = (const CSCGeometry*) m_geomRecord->slaveGeometry( detId );
181  for( auto it = cscGeometry->chambers().begin(),
182  end = cscGeometry->chambers().end();
183  it != end; ++it )
184  {
185  const CSCChamber *chamber = *it;
186 
187  if( chamber )
188  {
189  unsigned int rawid = chamber->geographicalId();
190  unsigned int current = insert_id( rawid, fwRecoGeometry );
191  fillShapeAndPlacement( current, chamber, fwRecoGeometry );
192  //
193  // CSC layers geometry
194  //
195  for( std::vector< const CSCLayer* >::const_iterator lit = chamber->layers().begin(),
196  lend = chamber->layers().end();
197  lit != lend; ++lit )
198  {
199  const CSCLayer* layer = *lit;
200 
201  if( layer )
202  {
203  unsigned int rawid = layer->geographicalId();
204  unsigned int current = insert_id( rawid, fwRecoGeometry );
205  fillShapeAndPlacement( current, layer, fwRecoGeometry );
206 
207  const CSCStripTopology* stripTopology = layer->geometry()->topology();
208  fwRecoGeometry.idToName[current].topology[0] = stripTopology->yAxisOrientation();
209  fwRecoGeometry.idToName[current].topology[1] = stripTopology->centreToIntersection();
210  fwRecoGeometry.idToName[current].topology[2] = stripTopology->yCentreOfStripPlane();
211  fwRecoGeometry.idToName[current].topology[3] = stripTopology->phiOfOneEdge();
212  fwRecoGeometry.idToName[current].topology[4] = stripTopology->stripOffset();
213  fwRecoGeometry.idToName[current].topology[5] = stripTopology->angularWidth();
214 
215  const CSCWireTopology* wireTopology = layer->geometry()->wireTopology();
216  fwRecoGeometry.idToName[current].topology[6] = wireTopology->wireSpacing();
217  fwRecoGeometry.idToName[current].topology[7] = wireTopology->wireAngle();
218  }
219  }
220  }
221  }
222 }
const std::vector< const CSCLayer * > & layers() const
Return all layers.
Definition: CSCChamber.h:57
const CSCWireTopology * wireTopology() const
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
float centreToIntersection() const override
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const ChamberContainer & chambers() const
Return a vector of all chambers.
Definition: CSCGeometry.cc:121
double wireSpacing() const
FWRecoGeom::InfoMap idToName
float yCentreOfStripPlane() const override
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
float phiOfOneEdge() const override
#define end
Definition: vmac.h:39
Definition: DetId.h:18
const CSCStripTopology * topology() const
virtual float stripOffset(void) const
float yAxisOrientation() const override
float angularWidth() const override
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
float wireAngle() const override
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:47
void FWRecoGeometryESProducer::addDTGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 225 of file FWRecoGeometryESProducer.cc.

References DTTopology::cellHeight(), DTTopology::cellLenght(), DTTopology::cellWidth(), relativeConstraints::chamber, DTGeometry::chambers(), DTTopology::channels(), end, fillShapeAndPlacement(), DTTopology::firstChannel(), GeomDet::geographicalId(), DTLayer::id(), FWRecoGeometry::idToName, insert_id(), DTTopology::lastChannel(), DTGeometry::layers(), m_geomRecord, DetId::Muon, DetId::rawId(), GlobalTrackingGeometry::slaveGeometry(), DTLayer::specificTopology(), and GeomDet::surface().

Referenced by produce().

226 {
227  DetId detId( DetId::Muon, 1 );
228  const DTGeometry* dtGeometry = (const DTGeometry*) m_geomRecord->slaveGeometry( detId );
229 
230  //
231  // DT chambers geometry
232  //
233  for( auto it = dtGeometry->chambers().begin(),
234  end = dtGeometry->chambers().end();
235  it != end; ++it )
236  {
237  const DTChamber *chamber = *it;
238 
239  if( chamber )
240  {
241  unsigned int rawid = chamber->geographicalId().rawId();
242  unsigned int current = insert_id( rawid, fwRecoGeometry );
243  fillShapeAndPlacement( current, chamber, fwRecoGeometry );
244  }
245  }
246 
247  // Fill in DT layer parameters
248  for( auto it = dtGeometry->layers().begin(),
249  end = dtGeometry->layers().end();
250  it != end; ++it )
251  {
252  const DTLayer* layer = *it;
253 
254  if( layer )
255  {
256  unsigned int rawid = layer->id().rawId();
257  unsigned int current = insert_id( rawid, fwRecoGeometry );
258  fillShapeAndPlacement( current, layer, fwRecoGeometry );
259 
260  const DTTopology& topo = layer->specificTopology();
261  const BoundPlane& surf = layer->surface();
262  // Topology W/H/L:
263  fwRecoGeometry.idToName[current].topology[0] = topo.cellWidth();
264  fwRecoGeometry.idToName[current].topology[1] = topo.cellHeight();
265  fwRecoGeometry.idToName[current].topology[2] = topo.cellLenght();
266  fwRecoGeometry.idToName[current].topology[3] = topo.firstChannel();
267  fwRecoGeometry.idToName[current].topology[4] = topo.lastChannel();
268  fwRecoGeometry.idToName[current].topology[5] = topo.channels();
269 
270  // Bounds W/H/L:
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();
274  }
275  }
276 }
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:102
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
DTLayerId id() const
Return the DetId of this SL.
Definition: DTLayer.cc:46
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
float cellWidth() const
Returns the cell width.
Definition: DTTopology.h:68
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:78
FWRecoGeom::InfoMap idToName
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:80
const DTTopology & specificTopology() const
Definition: DTLayer.cc:42
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:70
Definition: DetId.h:18
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:75
const std::vector< const DTLayer * > & layers() const
Return a vector of all SuperLayer.
Definition: DTGeometry.cc:112
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
float cellLenght() const
Definition: DTTopology.h:73
void FWRecoGeometryESProducer::addFTLGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 602 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

603 {
604  // do the barrel
605  std::vector<DetId> vid = std::move(m_ftlBarrelGeom->getValidDetIds());
606  for( std::vector<DetId>::const_iterator it = vid.begin(),
607  end = vid.end();
608  it != end; ++it ) {
609  unsigned int id = insert_id( it->rawId(), fwRecoGeometry);
610  const auto& cor = m_ftlBarrelGeom->getCorners( *it );
611  fillPoints( id, cor.begin(), cor.end(), fwRecoGeometry);
612  }
613  // do the endcap
615  for( std::vector<DetId>::const_iterator it = vid.begin(),
616  end = vid.end();
617  it != end; ++it ) {
618  unsigned int id = insert_id( it->rawId(), fwRecoGeometry);
619  const auto& cor = m_ftlEndcapGeom->getCorners( *it );
620  fillPoints( id, cor.begin(), cor.end(), fwRecoGeometry);
621  }
622 }
edm::ESHandle< FastTimeGeometry > m_ftlBarrelGeom
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 fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end, FWRecoGeometry &)
edm::ESHandle< FastTimeGeometry > m_ftlEndcapGeom
#define end
Definition: vmac.h:39
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
def move(src, dest)
Definition: eostools.py:511
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell&#39;s volume.
void FWRecoGeometryESProducer::addGEMGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 316 of file FWRecoGeometryESProducer.cc.

References MessageLogger_cfi::cerr, GEMGeometry::chambers(), MillePedeFileConverter_cfg::e, GEMGeometry::etaPartitions(), cppFunctionSkipper::exception, FWRecoGeometry::extraDet, fillShapeAndPlacement(), triggerObjects_cff::id, FWRecoGeometry::idToName, insert_id(), m_geomRecord, DetId::Muon, StripTopology::nstrips(), StripTopology::pitch(), SimDataFormats::CaloAnalysis::sc, GlobalTrackingGeometry::slaveGeometry(), StripTopology::stripLength(), GEMGeometry::superChambers(), and cms::Exception::what().

Referenced by produce().

317 {
318  //
319  // GEM geometry
320  //
321  DetId detId( DetId::Muon, 4 );
322 
323  try
324  {
325  const GEMGeometry* gemGeom = (const GEMGeometry*) m_geomRecord->slaveGeometry( detId );
326 
327  // add in superChambers - gem Segments are based on superChambers
328  for(auto sc : gemGeom->superChambers())
329  {
330  if( sc )
331  {
332  unsigned int rawid = sc->geographicalId().rawId();
333  unsigned int current = insert_id( rawid, fwRecoGeometry );
334  fillShapeAndPlacement( current, sc, fwRecoGeometry );
335  }
336  }
337  // add in chambers
338  for(auto ch : gemGeom->chambers())
339  {
340  if( ch )
341  {
342  unsigned int rawid = ch->geographicalId().rawId();
343  unsigned int current = insert_id( rawid, fwRecoGeometry );
344  fillShapeAndPlacement( current, ch, fwRecoGeometry );
345  }
346  }
347  // add in etaPartitions - gem rechits are based on etaPartitions
348  for(auto roll : gemGeom->etaPartitions())
349  {
350  if( roll )
351  {
352  unsigned int rawid = roll->geographicalId().rawId();
353  unsigned int current = insert_id( rawid, fwRecoGeometry );
354  fillShapeAndPlacement( current, roll, fwRecoGeometry );
355 
356  const StripTopology& topo = roll->specificTopology();
357  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
358  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
359  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
360 
361  float height = topo.stripLength()/2;
362  LocalPoint lTop( 0., height, 0.);
363  LocalPoint lBottom( 0., -height, 0.);
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();
367  }
368  }
369 
370  fwRecoGeometry.extraDet.Add(new TNamed("GEM", "GEM muon detector"));
371  try {
372  GEMDetId id(1, 1, 2, 1, 1, 1 );
373  m_geomRecord->slaveGeometry( detId );
374  fwRecoGeometry.extraDet.Add(new TNamed("GE2", "GEM endcap station 2"));
375  }
376  catch (std::runtime_error &e) {
377  std::cerr << e.what() << std::endl;
378  }
379 
380  }
381  catch( cms::Exception &exception )
382  {
383  edm::LogError("FWRecoGeometry") << " GEM geometry not found " << exception.what() << std::endl;
384  }
385 }
virtual float stripLength() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
char const * what() const override
Definition: Exception.cc:103
FWRecoGeom::InfoMap idToName
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
Definition: GEMGeometry.cc:63
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
Definition: GEMGeometry.cc:55
Definition: DetId.h:18
virtual int nstrips() const =0
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:59
TObjArray extraDet
virtual float pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addME0Geometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 388 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

389 {
390  //
391  // ME0 geometry
392  //
393 
394  DetId detId( DetId::Muon, 5 );
395  try
396  {
397  const ME0Geometry* me0Geom = (const ME0Geometry*) m_geomRecord->slaveGeometry( detId );
398  for(auto roll : me0Geom->etaPartitions())
399  {
400  if( roll )
401  {
402  unsigned int rawid = roll->geographicalId().rawId();
403  unsigned int current = insert_id( rawid, fwRecoGeometry );
404  fillShapeAndPlacement( current, roll, fwRecoGeometry );
405 
406  const StripTopology& topo = roll->specificTopology();
407  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
408  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
409  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
410 
411  float height = topo.stripLength()/2;
412  LocalPoint lTop( 0., height, 0.);
413  LocalPoint lBottom( 0., -height, 0.);
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();
417  }
418  }
419  fwRecoGeometry.extraDet.Add(new TNamed("ME0", "ME0 muon detector"));
420  }
421  catch( cms::Exception &exception )
422  {
423  edm::LogError("FWRecoGeometry") << " ME0 geometry not found " << exception.what() << std::endl;
424  }
425 }
virtual float stripLength() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
char const * what() const override
Definition: Exception.cc:103
FWRecoGeom::InfoMap idToName
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
Definition: ME0Geometry.cc:59
Definition: DetId.h:18
virtual int nstrips() const =0
TObjArray extraDet
virtual float pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addPixelBarrelGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 428 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

429 {
430  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(),
431  end = m_trackerGeom->detsPXB().end();
432  it != end; ++it)
433  {
434  const GeomDet *det = *it;
435 
436  if( det )
437  {
438  DetId detid = det->geographicalId();
439  unsigned int rawid = detid.rawId();
440  unsigned int current = insert_id( rawid, fwRecoGeometry );
441  fillShapeAndPlacement( current, det, fwRecoGeometry );
442 
443  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ), fwRecoGeometry);
444  }
445  }
446 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const TrackerGeometry * m_trackerGeom
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const DetContainer & detsPXB() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
Definition: DetId.h:18
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addPixelForwardGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 449 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

450 {
451  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(),
452  end = m_trackerGeom->detsPXF().end();
453  it != end; ++it )
454  {
455  const GeomDet *det = *it;
456 
457  if( det )
458  {
459  DetId detid = det->geographicalId();
460  unsigned int rawid = detid.rawId();
461  unsigned int current = insert_id( rawid, fwRecoGeometry );
462  fillShapeAndPlacement( current, det, fwRecoGeometry );
463 
464  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ), fwRecoGeometry);
465  }
466  }
467 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const TrackerGeometry * m_trackerGeom
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet *detUnit, FWRecoGeometry &)
Definition: DetId.h:18
const DetContainer & detsPXF() const
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addRPCGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 279 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

280 {
281  //
282  // RPC rolls geometry
283  //
284  DetId detId( DetId::Muon, 3 );
285  const RPCGeometry* rpcGeom = (const RPCGeometry*) m_geomRecord->slaveGeometry( detId );
286  for( auto it = rpcGeom->rolls().begin(),
287  end = rpcGeom->rolls().end();
288  it != end; ++it )
289  {
290  const RPCRoll* roll = (*it);
291  if( roll )
292  {
293  unsigned int rawid = roll->geographicalId().rawId();
294  unsigned int current = insert_id( rawid, fwRecoGeometry );
295  fillShapeAndPlacement( current, roll, fwRecoGeometry );
296 
297  const StripTopology& topo = roll->specificTopology();
298  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
299  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
300  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
301  }
302  }
303 
304 
305  try {
306  RPCDetId id(1, 1, 4, 1, 1, 1, 1 );
307  m_geomRecord->slaveGeometry( detId );
308  fwRecoGeometry.extraDet.Add(new TNamed("RE4", "RPC endcap station 4"));
309  }
310  catch (std::runtime_error &e) {
311  std::cerr << e.what() << std::endl;
312  }
313 }
virtual float stripLength() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition: RPCGeometry.cc:67
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
FWRecoGeom::InfoMap idToName
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
Definition: DetId.h:18
virtual int nstrips() const =0
TObjArray extraDet
virtual float pitch() const =0
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addTECGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 533 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

534 {
535  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(),
536  end = m_trackerGeom->detsTEC().end();
537  it != end; ++it )
538  {
539  const GeomDet *det = *it;
540 
541  if( det )
542  {
543  DetId detid = det->geographicalId();
544  unsigned int rawid = detid.rawId();
545  unsigned int current = insert_id( rawid, fwRecoGeometry );
546  fillShapeAndPlacement( current, det, fwRecoGeometry );
547 
548  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
549  }
550  }
551 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const TrackerGeometry * m_trackerGeom
const DetContainer & detsTEC() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const TrackerGeomDet * idToDet(DetId) const override
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addTIBGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 470 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, TrackerGeometry::detsTIB(), 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->detsTIB().begin(),
473  end = m_trackerGeom->detsTIB().end();
474  it != end; ++it )
475  {
476  const GeomDet *det = *it;
477 
478  if( det )
479  {
480  DetId detid = det->geographicalId();
481  unsigned int rawid = detid.rawId();
482  unsigned int current = insert_id( rawid, fwRecoGeometry );
483  fillShapeAndPlacement( current, det, fwRecoGeometry );
484 
485  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
486  }
487  }
488 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
const DetContainer & detsTIB() const
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const TrackerGeomDet * idToDet(DetId) const override
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::addTIDGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 512 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

513 {
514  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(),
515  end = m_trackerGeom->detsTID().end();
516  it != end; ++it)
517  {
518  const GeomDet *det = *it;
519 
520  if( det )
521  {
522  DetId detid = det->geographicalId();
523  unsigned int rawid = detid.rawId();
524  unsigned int current = insert_id( rawid, fwRecoGeometry );
525  fillShapeAndPlacement( current, det, fwRecoGeometry );
526 
527  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
528  }
529  }
530 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const TrackerGeomDet * idToDet(DetId) const override
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
const DetContainer & detsTID() const
void FWRecoGeometryESProducer::addTOBGeometry ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 491 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

492 {
493  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(),
494  end = m_trackerGeom->detsTOB().end();
495  it != end; ++it )
496  {
497  const GeomDet *det = *it;
498 
499  if( det )
500  {
501  DetId detid = det->geographicalId();
502  unsigned int rawid = detid.rawId();
503  unsigned int current = insert_id( rawid, fwRecoGeometry );
504  fillShapeAndPlacement( current, det, fwRecoGeometry );
505 
506  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
507  }
508  }
509 }
void fillShapeAndPlacement(unsigned int id, const GeomDet *det, FWRecoGeometry &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const TrackerGeometry * m_trackerGeom
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
#define end
Definition: vmac.h:39
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const TrackerGeomDet * idToDet(DetId) const override
const DetContainer & detsTOB() const
unsigned int insert_id(unsigned int id, FWRecoGeometry &)
void FWRecoGeometryESProducer::fillPoints ( unsigned int  id,
std::vector< GlobalPoint >::const_iterator  begin,
std::vector< GlobalPoint >::const_iterator  end,
FWRecoGeometry fwRecoGeometry 
)
private

Definition at line 636 of file FWRecoGeometryESProducer.cc.

References end, mps_fire::i, triggerObjects_cff::id, FWRecoGeometry::idToName, and FWTGeoRecoGeometry::maxPoints_.

Referenced by addCaloGeometry(), and addFTLGeometry().

640 {
641  unsigned int index( 0 );
642  for( std::vector<GlobalPoint>::const_iterator i = begin; i != end; ++i )
643  {
645  fwRecoGeometry.idToName[id].points[index] = i->x();
646  fwRecoGeometry.idToName[id].points[++index] = i->y();
647  fwRecoGeometry.idToName[id].points[++index] = i->z();
648  ++index;
649  }
650 }
static const int maxPoints_
FWRecoGeom::InfoMap idToName
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
void FWRecoGeometryESProducer::fillShapeAndPlacement ( unsigned int  id,
const GeomDet det,
FWRecoGeometry fwRecoGeometry 
)
private

Shape of GeomDet

Definition at line 655 of file FWRecoGeometryESProducer.cc.

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

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

657 {
658  // Trapezoidal
659  const Bounds *b = &((det->surface ()).bounds ());
660  if( const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b))
661  {
662  std::array< const float, 4 > const & par = b2->parameters ();
663 
664  // These parameters are half-lengths, as in CMSIM/GEANT3
665  fwRecoGeometry.idToName[id].shape[0] = 1;
666  fwRecoGeometry.idToName[id].shape[1] = par [0]; // hBottomEdge
667  fwRecoGeometry.idToName[id].shape[2] = par [1]; // hTopEdge
668  fwRecoGeometry.idToName[id].shape[3] = par [2]; // thickness
669  fwRecoGeometry.idToName[id].shape[4] = par [3]; // apothem
670  }
671  if( const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *> (b))
672  {
673  // Rectangular
674  fwRecoGeometry.idToName[id].shape[0] = 2;
675  fwRecoGeometry.idToName[id].shape[1] = b2->width() * 0.5; // half width
676  fwRecoGeometry.idToName[id].shape[2] = b2->length() * 0.5; // half length
677  fwRecoGeometry.idToName[id].shape[3] = b2->thickness() * 0.5; // half thickness
678  }
679 
680  // Position of the DetUnit's center
681  GlobalPoint pos = det->surface().position();
682  fwRecoGeometry.idToName[id].translation[0] = pos.x();
683  fwRecoGeometry.idToName[id].translation[1] = pos.y();
684  fwRecoGeometry.idToName[id].translation[2] = pos.z();
685 
686  // Add the coeff of the rotation matrix
687  // with a projection on the basis vectors
688  TkRotation<float> detRot = det->surface().rotation();
689  fwRecoGeometry.idToName[id].matrix[0] = detRot.xx();
690  fwRecoGeometry.idToName[id].matrix[1] = detRot.yx();
691  fwRecoGeometry.idToName[id].matrix[2] = detRot.zx();
692  fwRecoGeometry.idToName[id].matrix[3] = detRot.xy();
693  fwRecoGeometry.idToName[id].matrix[4] = detRot.yy();
694  fwRecoGeometry.idToName[id].matrix[5] = detRot.zy();
695  fwRecoGeometry.idToName[id].matrix[6] = detRot.xz();
696  fwRecoGeometry.idToName[id].matrix[7] = detRot.yz();
697  fwRecoGeometry.idToName[id].matrix[8] = detRot.zz();
698 }
T xx() const
T y() const
Definition: PV3DBase.h:63
T yx() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
FWRecoGeom::InfoMap idToName
T zx() const
T xy() const
T zz() const
T z() const
Definition: PV3DBase.h:64
T zy() const
T yy() const
double b
Definition: hdecay.h:120
T xz() const
const RotationType & rotation() const
Definition: Bounds.h:22
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
T yz() const
unsigned int FWRecoGeometryESProducer::insert_id ( unsigned int  id,
FWRecoGeometry fwRecoGeometry 
)
private
const FWRecoGeometryESProducer& FWRecoGeometryESProducer::operator= ( const FWRecoGeometryESProducer )
privatedelete
std::unique_ptr< FWRecoGeometry > FWRecoGeometryESProducer::produce ( const FWRecoGeometryRecord record)

Definition at line 125 of file FWRecoGeometryESProducer.cc.

References addCaloGeometry(), addCSCGeometry(), addDTGeometry(), addFTLGeometry(), addGEMGeometry(), addME0Geometry(), addPixelBarrelGeometry(), addPixelForwardGeometry(), addRPCGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), addTOBGeometry(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), m_calo, m_caloGeom, m_current, m_ftlBarrelGeom, m_ftlEndcapGeom, m_geomRecord, m_muon, m_timing, m_tracker, m_trackerGeom, edm::ESHandle< T >::product(), GlobalTrackingGeometry::slaveGeometry(), jetUpdater_cfi::sort, edm::swap(), DetId::Tracker, and writeTrackerParametersXML().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

126 {
127  using namespace edm;
128 
129  auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
130 
131  if( m_tracker || m_muon ) {
133  DetId detId( DetId::Tracker, 0 );
135  }
136 
137  if( m_tracker )
138  {
139  addPixelBarrelGeometry(*fwRecoGeometry);
140  addPixelForwardGeometry(*fwRecoGeometry);
141  addTIBGeometry(*fwRecoGeometry);
142  addTIDGeometry(*fwRecoGeometry);
143  addTOBGeometry(*fwRecoGeometry);
144  addTECGeometry(*fwRecoGeometry);
145  writeTrackerParametersXML(*fwRecoGeometry);
146  }
147  if( m_muon )
148  {
149  addDTGeometry(*fwRecoGeometry);
150  addCSCGeometry(*fwRecoGeometry);
151  addRPCGeometry(*fwRecoGeometry);
152  addGEMGeometry(*fwRecoGeometry);
153  addME0Geometry(*fwRecoGeometry);
154  }
155  if( m_calo )
156  {
157  edm::ESHandle<CaloGeometry> caloGeomH;
158  record.getRecord<CaloGeometryRecord>().get(caloGeomH);
159  m_caloGeom = caloGeomH.product();
160  addCaloGeometry(*fwRecoGeometry);
161  }
162 
163  if( m_timing ) {
164  record.getRecord<CaloGeometryRecord>().getRecord<IdealGeometryRecord>().get( "FastTimeBarrel", m_ftlBarrelGeom );
165  record.getRecord<CaloGeometryRecord>().getRecord<IdealGeometryRecord>().get( "SFBX", m_ftlEndcapGeom );
166  addFTLGeometry(*fwRecoGeometry);
167  }
168 
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());
172 
173  return fwRecoGeometry;
174 }
edm::ESHandle< FastTimeGeometry > m_ftlBarrelGeom
void addFTLGeometry(FWRecoGeometry &)
void addTOBGeometry(FWRecoGeometry &)
void addTIBGeometry(FWRecoGeometry &)
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
void addRPCGeometry(FWRecoGeometry &)
const TrackerGeometry * m_trackerGeom
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
void addCaloGeometry(FWRecoGeometry &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESHandle< FastTimeGeometry > m_ftlEndcapGeom
void addPixelForwardGeometry(FWRecoGeometry &)
void writeTrackerParametersXML(FWRecoGeometry &)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
void addCSCGeometry(FWRecoGeometry &)
void addTECGeometry(FWRecoGeometry &)
Definition: DetId.h:18
HLT enums.
void addGEMGeometry(FWRecoGeometry &)
void addTIDGeometry(FWRecoGeometry &)
void addPixelBarrelGeometry(FWRecoGeometry &)
T const * product() const
Definition: ESHandle.h:86
void addDTGeometry(FWRecoGeometry &)
void addME0Geometry(FWRecoGeometry &)
void FWRecoGeometryESProducer::writeTrackerParametersXML ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 700 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

701 {
702  std::string path = "Geometry/TrackerCommonData/data/";
705  path += "PhaseI/";
710  path += "PhaseII/";
711  }
712  path += "trackerParameters.xml";
713  std::string fullPath = edm::FileInPath(path).fullPath();
714  std::ifstream t(fullPath);
715  std::stringstream buffer;
716  buffer << t.rdbuf();
717  fwRecoGeometry.trackerTopologyXML = buffer.str();
718 }
std::string trackerTopologyXML
const TrackerGeometry * m_trackerGeom
bool isThere(GeomDetEnumerators::SubDetector subdet) const
std::string fullPath() const
Definition: FileInPath.cc:163

Member Data Documentation

bool FWRecoGeometryESProducer::m_calo
private

Definition at line 73 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

const CaloGeometry* FWRecoGeometryESProducer::m_caloGeom
private

Definition at line 65 of file FWRecoGeometryESProducer.h.

Referenced by addCaloGeometry(), and produce().

unsigned int FWRecoGeometryESProducer::m_current
private

Definition at line 70 of file FWRecoGeometryESProducer.h.

Referenced by insert_id(), and produce().

edm::ESHandle<FastTimeGeometry> FWRecoGeometryESProducer::m_ftlBarrelGeom
private

Definition at line 66 of file FWRecoGeometryESProducer.h.

Referenced by addFTLGeometry(), and produce().

edm::ESHandle<FastTimeGeometry> FWRecoGeometryESProducer::m_ftlEndcapGeom
private

Definition at line 66 of file FWRecoGeometryESProducer.h.

Referenced by addFTLGeometry(), and produce().

edm::ESHandle<GlobalTrackingGeometry> FWRecoGeometryESProducer::m_geomRecord
private
std::vector<edm::ESHandle<HGCalGeometry> > FWRecoGeometryESProducer::m_hgcalGeoms
private

Definition at line 67 of file FWRecoGeometryESProducer.h.

bool FWRecoGeometryESProducer::m_muon
private

Definition at line 72 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

bool FWRecoGeometryESProducer::m_timing
private

Definition at line 74 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

bool FWRecoGeometryESProducer::m_tracker
private

Definition at line 71 of file FWRecoGeometryESProducer.h.

Referenced by FWRecoGeometryESProducer(), and produce().

const TrackerGeometry* FWRecoGeometryESProducer::m_trackerGeom
private