CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
boost::shared_ptr< FWRecoGeometryproduce (const FWRecoGeometryRecord &)
 
virtual ~FWRecoGeometryESProducer (void)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

Private Member Functions

void addCaloGeometry (void)
 
void addCSCGeometry (void)
 
void addDTGeometry (void)
 
void addGEMGeometry (void)
 
void addPixelBarrelGeometry (void)
 
void addPixelForwardGeometry (void)
 
void addRPCGeometry (void)
 
void addTECGeometry (void)
 
void addTIBGeometry (void)
 
void addTIDGeometry (void)
 
void addTOBGeometry (void)
 
void fillPoints (unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end)
 
void fillShapeAndPlacement (unsigned int id, const GeomDet *det)
 
 FWRecoGeometryESProducer (const FWRecoGeometryESProducer &)
 
unsigned int insert_id (unsigned int id)
 
const FWRecoGeometryESProduceroperator= (const FWRecoGeometryESProducer &)
 

Private Attributes

edm::ESHandle< CaloGeometrym_caloGeom
 
unsigned int m_current
 
boost::shared_ptr< FWRecoGeometrym_fwGeometry
 
edm::ESHandle
< GlobalTrackingGeometry
m_geomRecord
 
const TrackerGeometrym_trackerGeom
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 22 of file FWRecoGeometryESProducer.h.

Constructor & Destructor Documentation

FWRecoGeometryESProducer::FWRecoGeometryESProducer ( const edm::ParameterSet )

Definition at line 66 of file FWRecoGeometryESProducer.cc.

References edm::ESProducer::setWhatProduced().

67  : m_current( -1 )
68 {
69  setWhatProduced( this );
70 }
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
FWRecoGeometryESProducer::~FWRecoGeometryESProducer ( void  )
virtual

Definition at line 72 of file FWRecoGeometryESProducer.cc.

73 {}
FWRecoGeometryESProducer::FWRecoGeometryESProducer ( const FWRecoGeometryESProducer )
private

Member Function Documentation

void FWRecoGeometryESProducer::addCaloGeometry ( void  )
private

Definition at line 420 of file FWRecoGeometryESProducer.cc.

References end, fillPoints(), insert_id(), and m_caloGeom.

Referenced by produce().

421 {
422  std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo
423  for( std::vector<DetId>::const_iterator it = vid.begin(),
424  end = vid.end();
425  it != end; ++it )
426  {
427  const CaloCellGeometry::CornersVec& cor( m_caloGeom->getGeometry( *it )->getCorners());
428  unsigned int id = insert_id( it->rawId());
429  fillPoints( id, cor.begin(), cor.end());
430  }
431 }
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
void fillPoints(unsigned int id, std::vector< GlobalPoint >::const_iterator begin, std::vector< GlobalPoint >::const_iterator end)
edm::ESHandle< CaloGeometry > m_caloGeom
void FWRecoGeometryESProducer::addCSCGeometry ( void  )
private

Definition at line 120 of file FWRecoGeometryESProducer.cc.

References CSCRadialStripTopology::angularWidth(), CSCRadialStripTopology::centreToIntersection(), CSCGeometry::chambers(), cond::rpcobimon::current, end, fillShapeAndPlacement(), GeomDet::geographicalId(), CSCLayer::geometry(), insert_id(), CSCChamber::layers(), m_fwGeometry, m_geomRecord, DetId::Muon, CSCRadialStripTopology::phiOfOneEdge(), OffsetRadialStripTopology::stripOffset(), CSCLayerGeometry::topology(), CSCWireTopology::wireAngle(), CSCWireTopology::wireSpacing(), CSCLayerGeometry::wireTopology(), CSCRadialStripTopology::yAxisOrientation(), and CSCRadialStripTopology::yCentreOfStripPlane().

Referenced by produce().

121 {
122  DetId detId( DetId::Muon, 2 );
123  const CSCGeometry* cscGeometry = (const CSCGeometry*) m_geomRecord->slaveGeometry( detId );
124  for( auto it = cscGeometry->chambers().begin(),
125  end = cscGeometry->chambers().end();
126  it != end; ++it )
127  {
128  const CSCChamber *chamber = *it;
129 
130  if( chamber )
131  {
132  unsigned int rawid = chamber->geographicalId();
133  unsigned int current = insert_id( rawid );
134  fillShapeAndPlacement( current, chamber );
135  //
136  // CSC layers geometry
137  //
138  for( std::vector< const CSCLayer* >::const_iterator lit = chamber->layers().begin(),
139  lend = chamber->layers().end();
140  lit != lend; ++lit )
141  {
142  const CSCLayer* layer = *lit;
143 
144  if( layer )
145  {
146  unsigned int rawid = layer->geographicalId();
147  unsigned int current = insert_id( rawid );
148  fillShapeAndPlacement( current, layer );
149 
150  const CSCStripTopology* stripTopology = layer->geometry()->topology();
151  m_fwGeometry->idToName[current].topology[0] = stripTopology->yAxisOrientation();
152  m_fwGeometry->idToName[current].topology[1] = stripTopology->centreToIntersection();
153  m_fwGeometry->idToName[current].topology[2] = stripTopology->yCentreOfStripPlane();
154  m_fwGeometry->idToName[current].topology[3] = stripTopology->phiOfOneEdge();
155  m_fwGeometry->idToName[current].topology[4] = stripTopology->stripOffset();
156  m_fwGeometry->idToName[current].topology[5] = stripTopology->angularWidth();
157 
158  const CSCWireTopology* wireTopology = layer->geometry()->wireTopology();
159  m_fwGeometry->idToName[current].topology[6] = wireTopology->wireSpacing();
160  m_fwGeometry->idToName[current].topology[7] = wireTopology->wireAngle();
161  }
162  }
163  }
164  }
165 }
const std::vector< const CSCLayer * > & layers() const
Return all layers.
Definition: CSCChamber.h:57
const CSCWireTopology * wireTopology() const
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const ChamberContainer & chambers() const
Return a vector of all chambers.
Definition: CSCGeometry.cc:106
double wireSpacing() const
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
float wireAngle() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
const CSCStripTopology * topology() const
virtual float stripOffset(void) const
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:47
void FWRecoGeometryESProducer::addDTGeometry ( void  )
private

Definition at line 168 of file FWRecoGeometryESProducer.cc.

References DTTopology::cellHeight(), DTTopology::cellLenght(), DTTopology::cellWidth(), DTGeometry::chambers(), DTTopology::channels(), cond::rpcobimon::current, end, fillShapeAndPlacement(), DTTopology::firstChannel(), GeomDet::geographicalId(), DTLayer::id(), insert_id(), DTTopology::lastChannel(), DTGeometry::layers(), m_fwGeometry, m_geomRecord, DetId::Muon, DetId::rawId(), DTLayer::specificTopology(), and GeomDet::surface().

Referenced by produce().

169 {
170  DetId detId( DetId::Muon, 1 );
171  const DTGeometry* dtGeometry = (const DTGeometry*) m_geomRecord->slaveGeometry( detId );
172 
173  //
174  // DT chambers geometry
175  //
176  for( auto it = dtGeometry->chambers().begin(),
177  end = dtGeometry->chambers().end();
178  it != end; ++it )
179  {
180  const DTChamber *chamber = *it;
181 
182  if( chamber )
183  {
184  unsigned int rawid = chamber->geographicalId().rawId();
185  unsigned int current = insert_id( rawid );
186  fillShapeAndPlacement( current, chamber );
187  }
188  }
189 
190  // Fill in DT layer parameters
191  for( auto it = dtGeometry->layers().begin(),
192  end = dtGeometry->layers().end();
193  it != end; ++it )
194  {
195  const DTLayer* layer = *it;
196 
197  if( layer )
198  {
199  unsigned int rawid = layer->id().rawId();
200  unsigned int current = insert_id( rawid );
201  fillShapeAndPlacement( current, layer );
202 
203  const DTTopology& topo = layer->specificTopology();
204  const BoundPlane& surf = layer->surface();
205  // Topology W/H/L:
206  m_fwGeometry->idToName[current].topology[0] = topo.cellWidth();
207  m_fwGeometry->idToName[current].topology[1] = topo.cellHeight();
208  m_fwGeometry->idToName[current].topology[2] = topo.cellLenght();
209  m_fwGeometry->idToName[current].topology[3] = topo.firstChannel();
210  m_fwGeometry->idToName[current].topology[4] = topo.lastChannel();
211  m_fwGeometry->idToName[current].topology[5] = topo.channels();
212 
213  // Bounds W/H/L:
214  m_fwGeometry->idToName[current].topology[6] = surf.bounds().width();
215  m_fwGeometry->idToName[current].topology[7] = surf.bounds().thickness();
216  m_fwGeometry->idToName[current].topology[8] = surf.bounds().length();
217  }
218  }
219 }
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:85
DTLayerId id() const
Return the DetId of this SL.
Definition: DTLayer.cc:46
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:40
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:78
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:80
const DTTopology & specificTopology() const
Definition: DTLayer.cc:42
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:70
unsigned int insert_id(unsigned int id)
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:95
float cellLenght() const
Definition: DTTopology.h:73
void FWRecoGeometryESProducer::addGEMGeometry ( void  )
private

Definition at line 257 of file FWRecoGeometryESProducer.cc.

References cond::rpcobimon::current, end, GEMGeometry::etaPartitions(), fillShapeAndPlacement(), GeomDet::geographicalId(), insert_id(), GEMEtaPartition::localPitch(), m_fwGeometry, m_geomRecord, DetId::Muon, GEMEtaPartition::npads(), StripTopology::nstrips(), StripTopology::pitch(), DetId::rawId(), GEMEtaPartition::specificTopology(), and StripTopology::stripLength().

Referenced by produce().

258 {
259  //
260  // GEM geometry
261  //
262  DetId detId( DetId::Muon, 4 );
263  const GEMGeometry* gemGeom = (const GEMGeometry*) m_geomRecord->slaveGeometry( detId );
264  for( auto it = gemGeom->etaPartitions().begin(),
265  end = gemGeom->etaPartitions().end();
266  it != end; ++it )
267  {
268  const GEMEtaPartition* roll = (*it);
269  if( roll )
270  {
271  unsigned int rawid = (*it)->geographicalId().rawId();
272  unsigned int current = insert_id( rawid );
273  fillShapeAndPlacement( current, roll );
274 
275  const StripTopology& topo = roll->specificTopology();
276  m_fwGeometry->idToName[current].topology[0] = topo.nstrips();
277  m_fwGeometry->idToName[current].topology[1] = topo.stripLength();
278  m_fwGeometry->idToName[current].topology[2] = topo.pitch();
279 
280  float height = topo.stripLength()/2;
281  LocalPoint lTop( 0., height, 0.);
282  LocalPoint lBottom( 0., -height, 0.);
283  m_fwGeometry->idToName[current].topology[3] = roll->localPitch(lTop);
284  m_fwGeometry->idToName[current].topology[4] = roll->localPitch(lBottom);
285  m_fwGeometry->idToName[current].topology[5] = roll->npads();
286  }
287  }
288 
289  m_fwGeometry->extraDet.Add(new TNamed("GEM", "GEM muon detector"));
290 }
virtual int nstrips() const =0
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
float localPitch(const LocalPoint &lp) const
virtual float stripLength() const =0
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
Definition: GEMGeometry.cc:63
int npads() const
number of GEM-CSC trigger readout pads in partition
const StripTopology & specificTopology() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
virtual float pitch() const =0
void FWRecoGeometryESProducer::addPixelBarrelGeometry ( void  )
private

Definition at line 294 of file FWRecoGeometryESProducer.cc.

References ADD_PIXEL_TOPOLOGY, cond::rpcobimon::current, cond::rpcobgas::detid, TrackerGeometry::detsPXB(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDetUnit(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

295 {
296  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(),
297  end = m_trackerGeom->detsPXB().end();
298  it != end; ++it)
299  {
300  const GeomDet *det = *it;
301 
302  if( det )
303  {
304  DetId detid = det->geographicalId();
305  unsigned int rawid = detid.rawId();
306  unsigned int current = insert_id( rawid );
307  fillShapeAndPlacement( current, det );
308 
309  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ));
310  }
311  }
312 }
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
const DetContainer & detsPXB() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
#define ADD_PIXEL_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
void FWRecoGeometryESProducer::addPixelForwardGeometry ( void  )
private

Definition at line 315 of file FWRecoGeometryESProducer.cc.

References ADD_PIXEL_TOPOLOGY, cond::rpcobimon::current, cond::rpcobgas::detid, TrackerGeometry::detsPXF(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDetUnit(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

316 {
317  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(),
318  end = m_trackerGeom->detsPXF().end();
319  it != end; ++it )
320  {
321  const GeomDet *det = *it;
322 
323  if( det )
324  {
325  DetId detid = det->geographicalId();
326  unsigned int rawid = detid.rawId();
327  unsigned int current = insert_id( rawid );
328  fillShapeAndPlacement( current, det );
329 
330  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ));
331  }
332  }
333 }
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
#define ADD_PIXEL_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
const DetContainer & detsPXF() const
void FWRecoGeometryESProducer::addRPCGeometry ( void  )
private

Definition at line 222 of file FWRecoGeometryESProducer.cc.

References cond::rpcobimon::current, end, fillShapeAndPlacement(), GeomDet::geographicalId(), insert_id(), m_fwGeometry, m_geomRecord, DetId::Muon, StripTopology::nstrips(), StripTopology::pitch(), DetId::rawId(), RPCGeometry::rolls(), RPCRoll::specificTopology(), and StripTopology::stripLength().

Referenced by produce().

223 {
224  //
225  // RPC rolls geometry
226  //
227  DetId detId( DetId::Muon, 3 );
228  const RPCGeometry* rpcGeom = (const RPCGeometry*) m_geomRecord->slaveGeometry( detId );
229  for( auto it = rpcGeom->rolls().begin(),
230  end = rpcGeom->rolls().end();
231  it != end; ++it )
232  {
233  const RPCRoll* roll = (*it);
234  if( roll )
235  {
236  unsigned int rawid = roll->geographicalId().rawId();
237  unsigned int current = insert_id( rawid );
238  fillShapeAndPlacement( current, roll );
239 
240  const StripTopology& topo = roll->specificTopology();
241  m_fwGeometry->idToName[current].topology[0] = topo.nstrips();
242  m_fwGeometry->idToName[current].topology[1] = topo.stripLength();
243  m_fwGeometry->idToName[current].topology[2] = topo.pitch();
244  }
245  }
246 
247 
248  try {
249  RPCDetId id(1, 1, 4, 1, 1, 1, 1 );
250  m_geomRecord->slaveGeometry( detId );
251  m_fwGeometry->extraDet.Add(new TNamed("RE4", "RPC endcap station 4"));
252  }
253  catch (...) {}
254 }
virtual int nstrips() const =0
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition: RPCGeometry.cc:67
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
virtual float stripLength() const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
virtual float pitch() const =0
void FWRecoGeometryESProducer::addTECGeometry ( void  )
private

Definition at line 399 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, cond::rpcobimon::current, cond::rpcobgas::detid, TrackerGeometry::detsTEC(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

400 {
401  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(),
402  end = m_trackerGeom->detsTEC().end();
403  it != end; ++it )
404  {
405  const GeomDet *det = *it;
406 
407  if( det )
408  {
409  DetId detid = det->geographicalId();
410  unsigned int rawid = detid.rawId();
411  unsigned int current = insert_id( rawid );
412  fillShapeAndPlacement( current, det );
413 
414  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
415  }
416  }
417 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
const DetContainer & detsTEC() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
virtual const TrackerGeomDet * idToDet(DetId) const
void FWRecoGeometryESProducer::addTIBGeometry ( void  )
private

Definition at line 336 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, cond::rpcobimon::current, cond::rpcobgas::detid, TrackerGeometry::detsTIB(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

337 {
338  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTIB().begin(),
339  end = m_trackerGeom->detsTIB().end();
340  it != end; ++it )
341  {
342  const GeomDet *det = *it;
343 
344  if( det )
345  {
346  DetId detid = det->geographicalId();
347  unsigned int rawid = detid.rawId();
348  unsigned int current = insert_id( rawid );
349  fillShapeAndPlacement( current, det );
350 
351  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
352  }
353  }
354 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
const DetContainer & detsTIB() const
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
virtual const TrackerGeomDet * idToDet(DetId) const
void FWRecoGeometryESProducer::addTIDGeometry ( void  )
private

Definition at line 378 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, cond::rpcobimon::current, cond::rpcobgas::detid, TrackerGeometry::detsTID(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

379 {
380  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(),
381  end = m_trackerGeom->detsTID().end();
382  it != end; ++it)
383  {
384  const GeomDet *det = *it;
385 
386  if( det )
387  {
388  DetId detid = det->geographicalId();
389  unsigned int rawid = detid.rawId();
390  unsigned int current = insert_id( rawid );
391  fillShapeAndPlacement( current, det );
392 
393  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
394  }
395  }
396 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const DetContainer & detsTID() const
virtual const TrackerGeomDet * idToDet(DetId) const
void FWRecoGeometryESProducer::addTOBGeometry ( void  )
private

Definition at line 357 of file FWRecoGeometryESProducer.cc.

References ADD_SISTRIP_TOPOLOGY, cond::rpcobimon::current, cond::rpcobgas::detid, TrackerGeometry::detsTOB(), end, fillShapeAndPlacement(), GeomDet::geographicalId(), TrackerGeometry::idToDet(), insert_id(), m_trackerGeom, and DetId::rawId().

Referenced by produce().

358 {
359  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(),
360  end = m_trackerGeom->detsTOB().end();
361  it != end; ++it )
362  {
363  const GeomDet *det = *it;
364 
365  if( det )
366  {
367  DetId detid = det->geographicalId();
368  unsigned int rawid = detid.rawId();
369  unsigned int current = insert_id( rawid );
370  fillShapeAndPlacement( current, det );
371 
372  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
373  }
374  }
375 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
#define end
Definition: vmac.h:37
unsigned int insert_id(unsigned int id)
Definition: DetId.h:18
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const DetContainer & detsTOB() const
virtual const TrackerGeomDet * idToDet(DetId) const
void FWRecoGeometryESProducer::fillPoints ( unsigned int  id,
std::vector< GlobalPoint >::const_iterator  begin,
std::vector< GlobalPoint >::const_iterator  end 
)
private

Definition at line 444 of file FWRecoGeometryESProducer.cc.

References assert(), end, i, cmsHarvester::index, and m_fwGeometry.

Referenced by addCaloGeometry().

445 {
446  unsigned int index( 0 );
447  for( std::vector<GlobalPoint>::const_iterator i = begin; i != end; ++i )
448  {
449  assert( index < 23 );
450  m_fwGeometry->idToName[id].points[index] = i->x();
451  m_fwGeometry->idToName[id].points[++index] = i->y();
452  m_fwGeometry->idToName[id].points[++index] = i->z();
453  ++index;
454  }
455 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
void FWRecoGeometryESProducer::fillShapeAndPlacement ( unsigned int  id,
const GeomDet det 
)
private

Shape of GeomDet

Definition at line 460 of file FWRecoGeometryESProducer.cc.

References b, m_fwGeometry, 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(), addPixelBarrelGeometry(), addPixelForwardGeometry(), addRPCGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), and addTOBGeometry().

461 {
462  // Trapezoidal
463  const Bounds *b = &((det->surface ()).bounds ());
464  if( const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b))
465  {
466  std::array< const float, 4 > const & par = b2->parameters ();
467 
468  // These parameters are half-lengths, as in CMSIM/GEANT3
469  m_fwGeometry->idToName[id].shape[0] = 1;
470  m_fwGeometry->idToName[id].shape[1] = par [0]; // hBottomEdge
471  m_fwGeometry->idToName[id].shape[2] = par [1]; // hTopEdge
472  m_fwGeometry->idToName[id].shape[3] = par [2]; // thickness
473  m_fwGeometry->idToName[id].shape[4] = par [3]; // apothem
474  }
475  if( const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *> (b))
476  {
477  // Rectangular
478  m_fwGeometry->idToName[id].shape[0] = 2;
479  m_fwGeometry->idToName[id].shape[1] = b2->width() * 0.5; // half width
480  m_fwGeometry->idToName[id].shape[2] = b2->length() * 0.5; // half length
481  m_fwGeometry->idToName[id].shape[3] = b2->thickness() * 0.5; // half thickness
482  }
483 
484  // Position of the DetUnit's center
485  GlobalPoint pos = det->surface().position();
486  m_fwGeometry->idToName[id].translation[0] = pos.x();
487  m_fwGeometry->idToName[id].translation[1] = pos.y();
488  m_fwGeometry->idToName[id].translation[2] = pos.z();
489 
490  // Add the coeff of the rotation matrix
491  // with a projection on the basis vectors
492  TkRotation<float> detRot = det->surface().rotation();
493  m_fwGeometry->idToName[id].matrix[0] = detRot.xx();
494  m_fwGeometry->idToName[id].matrix[1] = detRot.yx();
495  m_fwGeometry->idToName[id].matrix[2] = detRot.zx();
496  m_fwGeometry->idToName[id].matrix[3] = detRot.xy();
497  m_fwGeometry->idToName[id].matrix[4] = detRot.yy();
498  m_fwGeometry->idToName[id].matrix[5] = detRot.zy();
499  m_fwGeometry->idToName[id].matrix[6] = detRot.xz();
500  m_fwGeometry->idToName[id].matrix[7] = detRot.yz();
501  m_fwGeometry->idToName[id].matrix[8] = detRot.zz();
502 }
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:40
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
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)
private

Definition at line 434 of file FWRecoGeometryESProducer.cc.

References m_current, and m_fwGeometry.

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

435 {
436  ++m_current;
437  m_fwGeometry->idToName.push_back(FWRecoGeom::Info());
438  m_fwGeometry->idToName.back().id = rawid;
439 
440  return m_current;
441 }
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
const FWRecoGeometryESProducer& FWRecoGeometryESProducer::operator= ( const FWRecoGeometryESProducer )
private
boost::shared_ptr< FWRecoGeometry > FWRecoGeometryESProducer::produce ( const FWRecoGeometryRecord record)

Definition at line 76 of file FWRecoGeometryESProducer.cc.

References addCaloGeometry(), addCSCGeometry(), addDTGeometry(), addGEMGeometry(), addPixelBarrelGeometry(), addPixelForwardGeometry(), addRPCGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), addTOBGeometry(), cppFunctionSkipper::exception, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), m_caloGeom, m_current, m_fwGeometry, m_geomRecord, m_trackerGeom, python.multivaluedict::sort(), swap(), DetId::Tracker, and cms::Exception::what().

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

77 {
78  using namespace edm;
79 
80  m_fwGeometry = boost::shared_ptr<FWRecoGeometry>( new FWRecoGeometry );
81 
83 
84  DetId detId( DetId::Tracker, 0 );
85  m_trackerGeom = (const TrackerGeometry*) m_geomRecord->slaveGeometry( detId );
86 
87  record.getRecord<CaloGeometryRecord>().get( m_caloGeom );
88 
95  addDTGeometry();
98 
99  try
100  {
101  addGEMGeometry();
102  }
103  catch( cms::Exception& exception )
104  {
105  edm::LogWarning("FWRecoGeometryProducerException")
106  << "Exception caught while building GEM geometry: " << exception.what()
107  << std::endl;
108  }
109 
110  addCaloGeometry();
111 
112  m_fwGeometry->idToName.resize( m_current + 1 );
113  std::vector<FWRecoGeom::Info>( m_fwGeometry->idToName ).swap( m_fwGeometry->idToName );
114  std::sort( m_fwGeometry->idToName.begin(), m_fwGeometry->idToName.end());
115 
116  return m_fwGeometry;
117 }
virtual char const * what() const
Definition: Exception.cc:141
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const TrackerGeometry * m_trackerGeom
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
Definition: DetId.h:18
edm::ESHandle< CaloGeometry > m_caloGeom

Member Data Documentation

edm::ESHandle<CaloGeometry> FWRecoGeometryESProducer::m_caloGeom
private

Definition at line 51 of file FWRecoGeometryESProducer.h.

Referenced by addCaloGeometry(), and produce().

unsigned int FWRecoGeometryESProducer::m_current
private

Definition at line 55 of file FWRecoGeometryESProducer.h.

Referenced by insert_id(), and produce().

boost::shared_ptr<FWRecoGeometry> FWRecoGeometryESProducer::m_fwGeometry
private
edm::ESHandle<GlobalTrackingGeometry> FWRecoGeometryESProducer::m_geomRecord
private
const TrackerGeometry* FWRecoGeometryESProducer::m_trackerGeom
private