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 ()
 
 ~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 >
ESConsumesCollector 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 93 of file FWRecoGeometryESProducer.cc.

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

94  : m_current( -1 )
95 {
96  m_tracker = pset.getUntrackedParameter<bool>( "Tracker", true );
97  m_muon = pset.getUntrackedParameter<bool>( "Muon", true );
98  m_calo = pset.getUntrackedParameter<bool>( "Calo", true );
99  m_timing = pset.getUntrackedParameter<bool>( "Timing", false );
100  setWhatProduced( this );
101 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
T getUntrackedParameter(std::string const &, T const &) const
FWRecoGeometryESProducer::~FWRecoGeometryESProducer ( void  )
override

Definition at line 103 of file FWRecoGeometryESProducer.cc.

104 {}
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 39 of file FWRecoGeometryESProducer.cc.

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

Referenced by addPixelBarrelGeometry(), and addPixelForwardGeometry().

41  {
42  const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>( detUnit );
43  if( det )
44  {
45  const PixelTopology* topo = &det->specificTopology();
46 
47  std::pair<float,float> pitch = topo->pitch();
48  fwRecoGeometry.idToName[rawid].topology[0] = pitch.first;
49  fwRecoGeometry.idToName[rawid].topology[1] = pitch.second;
50 
51  fwRecoGeometry.idToName[rawid].topology[2] = topo->localX(0.f); // offsetX
52  fwRecoGeometry.idToName[rawid].topology[3] = topo->localY(0.f); // offsetY
53 
54  // big pixels layout
55  fwRecoGeometry.idToName[rawid].topology[4] = topo->isItBigPixelInX(80) ? 0 : 1;
56  }
57 }
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 536 of file FWRecoGeometryESProducer.cc.

References EZArrayFL< T >::begin(), end, EZArrayFL< T >::end(), fillPoints(), DetId::Forward, ForwardEmpty, relativeConstraints::geom, CaloGeometry::getGeometry(), HGCalGeometry::getNewCorners(), 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().

537 {
538  std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo
539  for( std::vector<DetId>::const_iterator it = vid.begin(),
540  end = vid.end();
541  it != end; ++it ) {
542  unsigned int id = insert_id( it->rawId(), fwRecoGeometry);
543  if( !((DetId::Forward == it->det()) || (DetId::HGCalEE == it->det()) ||
544  (DetId::HGCalHSi == it->det()) || (DetId::HGCalHSc == it->det())) ) {
545  const CaloCellGeometry::CornersVec& cor = m_caloGeom->getGeometry( *it )->getCorners();
546  fillPoints( id, cor.begin(), cor.end(), fwRecoGeometry);
547  } else {
548  DetId::Detector det = it->det();
549  int subdet = (((DetId::HGCalEE == det) ||
550  (DetId::HGCalHSi == det) ||
551  (DetId::HGCalHSc == det)) ? ForwardEmpty :
552  it->subdetId());
553  const HGCalGeometry* geom = dynamic_cast<const HGCalGeometry*>(m_caloGeom->getSubdetectorGeometry(det,subdet));
554  const auto cor = geom->getNewCorners( *it );
555 
556  // roll = yaw = pitch = 0
557  fwRecoGeometry.idToName[id].matrix[0] = 1.0;
558  fwRecoGeometry.idToName[id].matrix[4] = 1.0;
559  fwRecoGeometry.idToName[id].matrix[8] = 1.0;
560 
561  // corners of the front face
562  for(uint i = 0; i < (cor.size()-1); ++i){
563  fwRecoGeometry.idToName[id].points[i*3+0] = cor[i].x();
564  fwRecoGeometry.idToName[id].points[i*3+1] = cor[i].y();
565  fwRecoGeometry.idToName[id].points[i*3+2] = cor[i].z();
566  }
567 
568  // thickness
569  fwRecoGeometry.idToName[id].shape[3] = cor[cor.size()-1].z();
570 
571  // total points
572  fwRecoGeometry.idToName[id].topology[0] = cor.size() - 1;
573  }
574  }
575 }
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
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 159 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().

160 {
161  DetId detId( DetId::Muon, 2 );
162  const CSCGeometry* cscGeometry = (const CSCGeometry*) m_geomRecord->slaveGeometry( detId );
163  for( auto it = cscGeometry->chambers().begin(),
164  end = cscGeometry->chambers().end();
165  it != end; ++it )
166  {
167  const CSCChamber *chamber = *it;
168 
169  if( chamber )
170  {
171  unsigned int rawid = chamber->geographicalId();
172  unsigned int current = insert_id( rawid, fwRecoGeometry );
173  fillShapeAndPlacement( current, chamber, fwRecoGeometry );
174  //
175  // CSC layers geometry
176  //
177  for( std::vector< const CSCLayer* >::const_iterator lit = chamber->layers().begin(),
178  lend = chamber->layers().end();
179  lit != lend; ++lit )
180  {
181  const CSCLayer* layer = *lit;
182 
183  if( layer )
184  {
185  unsigned int rawid = layer->geographicalId();
186  unsigned int current = insert_id( rawid, fwRecoGeometry );
187  fillShapeAndPlacement( current, layer, fwRecoGeometry );
188 
189  const CSCStripTopology* stripTopology = layer->geometry()->topology();
190  fwRecoGeometry.idToName[current].topology[0] = stripTopology->yAxisOrientation();
191  fwRecoGeometry.idToName[current].topology[1] = stripTopology->centreToIntersection();
192  fwRecoGeometry.idToName[current].topology[2] = stripTopology->yCentreOfStripPlane();
193  fwRecoGeometry.idToName[current].topology[3] = stripTopology->phiOfOneEdge();
194  fwRecoGeometry.idToName[current].topology[4] = stripTopology->stripOffset();
195  fwRecoGeometry.idToName[current].topology[5] = stripTopology->angularWidth();
196 
197  const CSCWireTopology* wireTopology = layer->geometry()->wireTopology();
198  fwRecoGeometry.idToName[current].topology[6] = wireTopology->wireSpacing();
199  fwRecoGeometry.idToName[current].topology[7] = wireTopology->wireAngle();
200  }
201  }
202  }
203  }
204 }
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 207 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().

208 {
209  DetId detId( DetId::Muon, 1 );
210  const DTGeometry* dtGeometry = (const DTGeometry*) m_geomRecord->slaveGeometry( detId );
211 
212  //
213  // DT chambers geometry
214  //
215  for( auto it = dtGeometry->chambers().begin(),
216  end = dtGeometry->chambers().end();
217  it != end; ++it )
218  {
219  const DTChamber *chamber = *it;
220 
221  if( chamber )
222  {
223  unsigned int rawid = chamber->geographicalId().rawId();
224  unsigned int current = insert_id( rawid, fwRecoGeometry );
225  fillShapeAndPlacement( current, chamber, fwRecoGeometry );
226  }
227  }
228 
229  // Fill in DT layer parameters
230  for( auto it = dtGeometry->layers().begin(),
231  end = dtGeometry->layers().end();
232  it != end; ++it )
233  {
234  const DTLayer* layer = *it;
235 
236  if( layer )
237  {
238  unsigned int rawid = layer->id().rawId();
239  unsigned int current = insert_id( rawid, fwRecoGeometry );
240  fillShapeAndPlacement( current, layer, fwRecoGeometry );
241 
242  const DTTopology& topo = layer->specificTopology();
243  const BoundPlane& surf = layer->surface();
244  // Topology W/H/L:
245  fwRecoGeometry.idToName[current].topology[0] = topo.cellWidth();
246  fwRecoGeometry.idToName[current].topology[1] = topo.cellHeight();
247  fwRecoGeometry.idToName[current].topology[2] = topo.cellLenght();
248  fwRecoGeometry.idToName[current].topology[3] = topo.firstChannel();
249  fwRecoGeometry.idToName[current].topology[4] = topo.lastChannel();
250  fwRecoGeometry.idToName[current].topology[5] = topo.channels();
251 
252  // Bounds W/H/L:
253  fwRecoGeometry.idToName[current].topology[6] = surf.bounds().width();
254  fwRecoGeometry.idToName[current].topology[7] = surf.bounds().thickness();
255  fwRecoGeometry.idToName[current].topology[8] = surf.bounds().length();
256  }
257  }
258 }
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 578 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

579 {
580  // do the barrel
581  std::vector<DetId> vid = std::move(m_ftlBarrelGeom->getValidDetIds());
582  for( std::vector<DetId>::const_iterator it = vid.begin(),
583  end = vid.end();
584  it != end; ++it ) {
585  unsigned int id = insert_id( it->rawId(), fwRecoGeometry);
586  const auto& cor = m_ftlBarrelGeom->getCorners( *it );
587  fillPoints( id, cor.begin(), cor.end(), fwRecoGeometry);
588  }
589  // do the endcap
591  for( std::vector<DetId>::const_iterator it = vid.begin(),
592  end = vid.end();
593  it != end; ++it ) {
594  unsigned int id = insert_id( it->rawId(), fwRecoGeometry);
595  const auto& cor = m_ftlEndcapGeom->getCorners( *it );
596  fillPoints( id, cor.begin(), cor.end(), fwRecoGeometry);
597  }
598 }
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 298 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().

299 {
300  //
301  // GEM geometry
302  //
303  DetId detId( DetId::Muon, 4 );
304 
305  try
306  {
307  const GEMGeometry* gemGeom = (const GEMGeometry*) m_geomRecord->slaveGeometry( detId );
308 
309  // add in superChambers - gem Segments are based on superChambers
310  for(auto sc : gemGeom->superChambers())
311  {
312  if( sc )
313  {
314  unsigned int rawid = sc->geographicalId().rawId();
315  unsigned int current = insert_id( rawid, fwRecoGeometry );
316  fillShapeAndPlacement( current, sc, fwRecoGeometry );
317  }
318  }
319  // add in chambers
320  for(auto ch : gemGeom->chambers())
321  {
322  if( ch )
323  {
324  unsigned int rawid = ch->geographicalId().rawId();
325  unsigned int current = insert_id( rawid, fwRecoGeometry );
326  fillShapeAndPlacement( current, ch, fwRecoGeometry );
327  }
328  }
329  // add in etaPartitions - gem rechits are based on etaPartitions
330  for(auto roll : gemGeom->etaPartitions())
331  {
332  if( roll )
333  {
334  unsigned int rawid = roll->geographicalId().rawId();
335  unsigned int current = insert_id( rawid, fwRecoGeometry );
336  fillShapeAndPlacement( current, roll, fwRecoGeometry );
337 
338  const StripTopology& topo = roll->specificTopology();
339  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
340  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
341  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
342 
343  float height = topo.stripLength()/2;
344  LocalPoint lTop( 0., height, 0.);
345  LocalPoint lBottom( 0., -height, 0.);
346  fwRecoGeometry.idToName[current].topology[3] = roll->localPitch(lTop);
347  fwRecoGeometry.idToName[current].topology[4] = roll->localPitch(lBottom);
348  fwRecoGeometry.idToName[current].topology[5] = roll->npads();
349  }
350  }
351 
352  fwRecoGeometry.extraDet.Add(new TNamed("GEM", "GEM muon detector"));
353  try {
354  GEMDetId id(1, 1, 2, 1, 1, 1 );
355  m_geomRecord->slaveGeometry( detId );
356  fwRecoGeometry.extraDet.Add(new TNamed("GE2", "GEM endcap station 2"));
357  }
358  catch (std::runtime_error &e) {
359  std::cerr << e.what() << std::endl;
360  }
361 
362  }
363  catch( cms::Exception &exception )
364  {
365  edm::LogError("FWRecoGeometry") << " GEM geometry not found " << exception.what() << std::endl;
366  }
367 }
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:141
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 370 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().

371 {
372  //
373  // ME0 geometry
374  //
375 
376  DetId detId( DetId::Muon, 5 );
377  try
378  {
379  const ME0Geometry* me0Geom = (const ME0Geometry*) m_geomRecord->slaveGeometry( detId );
380  for(auto roll : me0Geom->etaPartitions())
381  {
382  if( roll )
383  {
384  unsigned int rawid = roll->geographicalId().rawId();
385  unsigned int current = insert_id( rawid, fwRecoGeometry );
386  fillShapeAndPlacement( current, roll, fwRecoGeometry );
387 
388  const StripTopology& topo = roll->specificTopology();
389  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
390  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
391  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
392 
393  float height = topo.stripLength()/2;
394  LocalPoint lTop( 0., height, 0.);
395  LocalPoint lBottom( 0., -height, 0.);
396  fwRecoGeometry.idToName[current].topology[3] = roll->localPitch(lTop);
397  fwRecoGeometry.idToName[current].topology[4] = roll->localPitch(lBottom);
398  fwRecoGeometry.idToName[current].topology[5] = roll->npads();
399  }
400  }
401  fwRecoGeometry.extraDet.Add(new TNamed("ME0", "ME0 muon detector"));
402  }
403  catch( cms::Exception &exception )
404  {
405  edm::LogError("FWRecoGeometry") << " ME0 geometry not found " << exception.what() << std::endl;
406  }
407 }
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:141
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 410 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().

411 {
412  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(),
413  end = m_trackerGeom->detsPXB().end();
414  it != end; ++it)
415  {
416  const GeomDet *det = *it;
417 
418  if( det )
419  {
420  DetId detid = det->geographicalId();
421  unsigned int rawid = detid.rawId();
422  unsigned int current = insert_id( rawid, fwRecoGeometry );
423  fillShapeAndPlacement( current, det, fwRecoGeometry );
424 
425  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ), fwRecoGeometry);
426  }
427  }
428 }
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 431 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().

432 {
433  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(),
434  end = m_trackerGeom->detsPXF().end();
435  it != end; ++it )
436  {
437  const GeomDet *det = *it;
438 
439  if( det )
440  {
441  DetId detid = det->geographicalId();
442  unsigned int rawid = detid.rawId();
443  unsigned int current = insert_id( rawid, fwRecoGeometry );
444  fillShapeAndPlacement( current, det, fwRecoGeometry );
445 
446  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ), fwRecoGeometry);
447  }
448  }
449 }
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 261 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().

262 {
263  //
264  // RPC rolls geometry
265  //
266  DetId detId( DetId::Muon, 3 );
267  const RPCGeometry* rpcGeom = (const RPCGeometry*) m_geomRecord->slaveGeometry( detId );
268  for( auto it = rpcGeom->rolls().begin(),
269  end = rpcGeom->rolls().end();
270  it != end; ++it )
271  {
272  const RPCRoll* roll = (*it);
273  if( roll )
274  {
275  unsigned int rawid = roll->geographicalId().rawId();
276  unsigned int current = insert_id( rawid, fwRecoGeometry );
277  fillShapeAndPlacement( current, roll, fwRecoGeometry );
278 
279  const StripTopology& topo = roll->specificTopology();
280  fwRecoGeometry.idToName[current].topology[0] = topo.nstrips();
281  fwRecoGeometry.idToName[current].topology[1] = topo.stripLength();
282  fwRecoGeometry.idToName[current].topology[2] = topo.pitch();
283  }
284  }
285 
286 
287  try {
288  RPCDetId id(1, 1, 4, 1, 1, 1, 1 );
289  m_geomRecord->slaveGeometry( detId );
290  fwRecoGeometry.extraDet.Add(new TNamed("RE4", "RPC endcap station 4"));
291  }
292  catch (std::runtime_error &e) {
293  std::cerr << e.what() << std::endl;
294  }
295 }
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 515 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().

516 {
517  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(),
518  end = m_trackerGeom->detsTEC().end();
519  it != end; ++it )
520  {
521  const GeomDet *det = *it;
522 
523  if( det )
524  {
525  DetId detid = det->geographicalId();
526  unsigned int rawid = detid.rawId();
527  unsigned int current = insert_id( rawid, fwRecoGeometry );
528  fillShapeAndPlacement( current, det, fwRecoGeometry );
529 
530  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
531  }
532  }
533 }
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 452 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().

453 {
454  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTIB().begin(),
455  end = m_trackerGeom->detsTIB().end();
456  it != end; ++it )
457  {
458  const GeomDet *det = *it;
459 
460  if( det )
461  {
462  DetId detid = det->geographicalId();
463  unsigned int rawid = detid.rawId();
464  unsigned int current = insert_id( rawid, fwRecoGeometry );
465  fillShapeAndPlacement( current, det, fwRecoGeometry );
466 
467  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
468  }
469  }
470 }
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 494 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().

495 {
496  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(),
497  end = m_trackerGeom->detsTID().end();
498  it != end; ++it)
499  {
500  const GeomDet *det = *it;
501 
502  if( det )
503  {
504  DetId detid = det->geographicalId();
505  unsigned int rawid = detid.rawId();
506  unsigned int current = insert_id( rawid, fwRecoGeometry );
507  fillShapeAndPlacement( current, det, fwRecoGeometry );
508 
509  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
510  }
511  }
512 }
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 473 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().

474 {
475  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(),
476  end = m_trackerGeom->detsTOB().end();
477  it != end; ++it )
478  {
479  const GeomDet *det = *it;
480 
481  if( det )
482  {
483  DetId detid = det->geographicalId();
484  unsigned int rawid = detid.rawId();
485  unsigned int current = insert_id( rawid, fwRecoGeometry );
486  fillShapeAndPlacement( current, det, fwRecoGeometry );
487 
488  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
489  }
490  }
491 }
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 612 of file FWRecoGeometryESProducer.cc.

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

Referenced by addCaloGeometry(), and addFTLGeometry().

616 {
617  unsigned int index( 0 );
618  for( std::vector<GlobalPoint>::const_iterator i = begin; i != end; ++i )
619  {
621  fwRecoGeometry.idToName[id].points[index] = i->x();
622  fwRecoGeometry.idToName[id].points[++index] = i->y();
623  fwRecoGeometry.idToName[id].points[++index] = i->z();
624  ++index;
625  }
626 }
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 631 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().

633 {
634  // Trapezoidal
635  const Bounds *b = &((det->surface ()).bounds ());
636  if( const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b))
637  {
638  std::array< const float, 4 > const & par = b2->parameters ();
639 
640  // These parameters are half-lengths, as in CMSIM/GEANT3
641  fwRecoGeometry.idToName[id].shape[0] = 1;
642  fwRecoGeometry.idToName[id].shape[1] = par [0]; // hBottomEdge
643  fwRecoGeometry.idToName[id].shape[2] = par [1]; // hTopEdge
644  fwRecoGeometry.idToName[id].shape[3] = par [2]; // thickness
645  fwRecoGeometry.idToName[id].shape[4] = par [3]; // apothem
646  }
647  if( const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *> (b))
648  {
649  // Rectangular
650  fwRecoGeometry.idToName[id].shape[0] = 2;
651  fwRecoGeometry.idToName[id].shape[1] = b2->width() * 0.5; // half width
652  fwRecoGeometry.idToName[id].shape[2] = b2->length() * 0.5; // half length
653  fwRecoGeometry.idToName[id].shape[3] = b2->thickness() * 0.5; // half thickness
654  }
655 
656  // Position of the DetUnit's center
657  GlobalPoint pos = det->surface().position();
658  fwRecoGeometry.idToName[id].translation[0] = pos.x();
659  fwRecoGeometry.idToName[id].translation[1] = pos.y();
660  fwRecoGeometry.idToName[id].translation[2] = pos.z();
661 
662  // Add the coeff of the rotation matrix
663  // with a projection on the basis vectors
664  TkRotation<float> detRot = det->surface().rotation();
665  fwRecoGeometry.idToName[id].matrix[0] = detRot.xx();
666  fwRecoGeometry.idToName[id].matrix[1] = detRot.yx();
667  fwRecoGeometry.idToName[id].matrix[2] = detRot.zx();
668  fwRecoGeometry.idToName[id].matrix[3] = detRot.xy();
669  fwRecoGeometry.idToName[id].matrix[4] = detRot.yy();
670  fwRecoGeometry.idToName[id].matrix[5] = detRot.zy();
671  fwRecoGeometry.idToName[id].matrix[6] = detRot.xz();
672  fwRecoGeometry.idToName[id].matrix[7] = detRot.yz();
673  fwRecoGeometry.idToName[id].matrix[8] = detRot.zz();
674 }
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 107 of file FWRecoGeometryESProducer.cc.

References addCaloGeometry(), addCSCGeometry(), addDTGeometry(), addFTLGeometry(), addGEMGeometry(), addME0Geometry(), addPixelBarrelGeometry(), addPixelForwardGeometry(), addRPCGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), addTOBGeometry(), edm::eventsetup::EventSetupRecord::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(), edm::swap(), DetId::Tracker, and writeTrackerParametersXML().

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

108 {
109  using namespace edm;
110 
111  auto fwRecoGeometry = std::make_unique<FWRecoGeometry>();
112 
113  if( m_tracker || m_muon ) {
115  DetId detId( DetId::Tracker, 0 );
117  }
118 
119  if( m_tracker )
120  {
121  addPixelBarrelGeometry(*fwRecoGeometry);
122  addPixelForwardGeometry(*fwRecoGeometry);
123  addTIBGeometry(*fwRecoGeometry);
124  addTIDGeometry(*fwRecoGeometry);
125  addTOBGeometry(*fwRecoGeometry);
126  addTECGeometry(*fwRecoGeometry);
127  writeTrackerParametersXML(*fwRecoGeometry);
128  }
129  if( m_muon )
130  {
131  addDTGeometry(*fwRecoGeometry);
132  addCSCGeometry(*fwRecoGeometry);
133  addRPCGeometry(*fwRecoGeometry);
134  addGEMGeometry(*fwRecoGeometry);
135  addME0Geometry(*fwRecoGeometry);
136  }
137  if( m_calo )
138  {
139  edm::ESHandle<CaloGeometry> caloGeomH;
140  record.getRecord<CaloGeometryRecord>().get(caloGeomH);
141  m_caloGeom = caloGeomH.product();
142  addCaloGeometry(*fwRecoGeometry);
143  }
144 
145  if( m_timing ) {
146  record.getRecord<CaloGeometryRecord>().getRecord<IdealGeometryRecord>().get( "FastTimeBarrel", m_ftlBarrelGeom );
147  record.getRecord<CaloGeometryRecord>().getRecord<IdealGeometryRecord>().get( "SFBX", m_ftlEndcapGeom );
148  addFTLGeometry(*fwRecoGeometry);
149  }
150 
151  fwRecoGeometry->idToName.resize( m_current + 1 );
152  std::vector<FWRecoGeom::Info>( fwRecoGeometry->idToName ).swap( fwRecoGeometry->idToName );
153  std::sort( fwRecoGeometry->idToName.begin(), fwRecoGeometry->idToName.end());
154 
155  return fwRecoGeometry;
156 }
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 &)
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:84
void addDTGeometry(FWRecoGeometry &)
bool get(HolderT &iHolder) const
void addME0Geometry(FWRecoGeometry &)
void FWRecoGeometryESProducer::writeTrackerParametersXML ( FWRecoGeometry fwRecoGeometry)
private

Definition at line 676 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, lumiQTWidget::t, and FWRecoGeometry::trackerTopologyXML.

Referenced by produce().

677 {
678  std::string path = "Geometry/TrackerCommonData/data/";
681  path += "PhaseI/";
686  path += "PhaseII/";
687  }
688  path += "trackerParameters.xml";
689  std::string fullPath = edm::FileInPath(path).fullPath();
690  std::ifstream t(fullPath);
691  std::stringstream buffer;
692  buffer << t.rdbuf();
693  fwRecoGeometry.trackerTopologyXML = buffer.str();
694 }
std::string trackerTopologyXML
const TrackerGeometry * m_trackerGeom
bool isThere(GeomDetEnumerators::SubDetector subdet) const
std::string fullPath() const
Definition: FileInPath.cc:197

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