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 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 64 of file FWRecoGeometryESProducer.cc.

References edm::ESProducer::setWhatProduced().

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

Definition at line 70 of file FWRecoGeometryESProducer.cc.

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

Member Function Documentation

void FWRecoGeometryESProducer::addCaloGeometry ( void  )
private

Definition at line 361 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

362 {
363  std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo
364  for( std::vector<DetId>::const_iterator it = vid.begin(),
365  end = vid.end();
366  it != end; ++it )
367  {
368  const CaloCellGeometry::CornersVec& cor( m_caloGeom->getGeometry( *it )->getCorners());
369  unsigned int id = insert_id( it->rawId());
370  fillPoints( id, cor.begin(), cor.end());
371  }
372 }
#define end
Definition: vmac.h:38
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 106 of file FWRecoGeometryESProducer.cc.

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

Referenced by produce().

107 {
108  DetId detId( DetId::Muon, 2 );
109  const CSCGeometry* cscGeometry = (const CSCGeometry*) m_geomRecord->slaveGeometry( detId );
110  for( std::vector<CSCChamber*>::const_iterator it = cscGeometry->chambers().begin(),
111  end = cscGeometry->chambers().end();
112  it != end; ++it )
113  {
114  const CSCChamber *chamber = *it;
115 
116  if( chamber )
117  {
118  unsigned int rawid = chamber->geographicalId();
119  unsigned int current = insert_id( rawid );
120  fillShapeAndPlacement( current, chamber );
121  //
122  // CSC layers geometry
123  //
124  for( std::vector< const CSCLayer* >::const_iterator lit = chamber->layers().begin(),
125  lend = chamber->layers().end();
126  lit != lend; ++lit )
127  {
128  const CSCLayer* layer = *lit;
129 
130  if( layer )
131  {
132  unsigned int rawid = layer->geographicalId();
133  unsigned int current = insert_id( rawid );
134  fillShapeAndPlacement( current, layer );
135 
136  const CSCStripTopology* stripTopology = layer->geometry()->topology();
137  m_fwGeometry->idToName[current].topology[0] = stripTopology->yAxisOrientation();
138  m_fwGeometry->idToName[current].topology[1] = stripTopology->centreToIntersection();
139  m_fwGeometry->idToName[current].topology[2] = stripTopology->yCentreOfStripPlane();
140  m_fwGeometry->idToName[current].topology[3] = stripTopology->phiOfOneEdge();
141  m_fwGeometry->idToName[current].topology[4] = stripTopology->stripOffset();
142  m_fwGeometry->idToName[current].topology[5] = stripTopology->angularWidth();
143 
144  const CSCWireTopology* wireTopology = layer->geometry()->wireTopology();
145  m_fwGeometry->idToName[current].topology[6] = wireTopology->wireSpacing();
146  m_fwGeometry->idToName[current].topology[7] = wireTopology->wireAngle();
147  }
148  }
149  }
150  }
151 }
const std::vector< const CSCLayer * > & layers() const
Return all layers.
Definition: CSCChamber.h:57
const CSCWireTopology * wireTopology() const
float centreToIntersection() const
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const ChamberContainer & chambers() const
Return a vector of all chambers.
Definition: CSCGeometry.cc:100
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:72
#define end
Definition: vmac.h:38
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
const CSCStripTopology * topology() const
float yCentreOfStripPlane() const
virtual float stripOffset(void) const
float angularWidth() const
float phiOfOneEdge() const
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:47
void FWRecoGeometryESProducer::addDTGeometry ( void  )
private

Definition at line 154 of file FWRecoGeometryESProducer.cc.

References BoundSurface::bounds(), 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(), Bounds::length(), m_fwGeometry, m_geomRecord, DetId::Muon, DetId::rawId(), DTLayer::specificTopology(), GeomDet::surface(), Bounds::thickness(), and Bounds::width().

Referenced by produce().

155 {
156  DetId detId( DetId::Muon, 1 );
157  const DTGeometry* dtGeometry = (const DTGeometry*) m_geomRecord->slaveGeometry( detId );
158 
159  //
160  // DT chambers geometry
161  //
162  for( std::vector<DTChamber *>::const_iterator it = dtGeometry->chambers().begin(),
163  end = dtGeometry->chambers().end();
164  it != end; ++it )
165  {
166  const DTChamber *chamber = *it;
167 
168  if( chamber )
169  {
170  unsigned int rawid = chamber->geographicalId().rawId();
171  unsigned int current = insert_id( rawid );
172  fillShapeAndPlacement( current, chamber );
173  }
174  }
175 
176  // Fill in DT layer parameters
177  for( std::vector<DTLayer*>::const_iterator it = dtGeometry->layers().begin(),
178  end = dtGeometry->layers().end();
179  it != end; ++it )
180  {
181  const DTLayer* layer = *it;
182 
183  if( layer )
184  {
185  unsigned int rawid = layer->id().rawId();
186  unsigned int current = insert_id( rawid );
187  fillShapeAndPlacement( current, layer );
188 
189  const DTTopology& topo = layer->specificTopology();
190  const BoundPlane& surf = layer->surface();
191  // Topology W/H/L:
192  m_fwGeometry->idToName[current].topology[0] = topo.cellWidth();
193  m_fwGeometry->idToName[current].topology[1] = topo.cellHeight();
194  m_fwGeometry->idToName[current].topology[2] = topo.cellLenght();
195  m_fwGeometry->idToName[current].topology[3] = topo.firstChannel();
196  m_fwGeometry->idToName[current].topology[4] = topo.lastChannel();
197  m_fwGeometry->idToName[current].topology[5] = topo.channels();
198 
199  // Bounds W/H/L:
200  m_fwGeometry->idToName[current].topology[6] = surf.bounds().width();
201  m_fwGeometry->idToName[current].topology[7] = surf.bounds().thickness();
202  m_fwGeometry->idToName[current].topology[8] = surf.bounds().length();
203  }
204  }
205 }
virtual float length() const =0
DTLayerId id() const
Return the DetId of this SL.
Definition: DTLayer.cc:48
float cellWidth() const
Returns the cell width.
Definition: DTTopology.h:70
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
const std::vector< DTLayer * > & layers() const
Return a vector of all SuperLayer.
Definition: DTGeometry.cc:100
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:80
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
virtual float thickness() const =0
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:82
const DTTopology & specificTopology() const
Definition: DTLayer.cc:44
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:72
unsigned int insert_id(unsigned int id)
const std::vector< DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:90
Definition: DetId.h:20
const Bounds & bounds() const
Definition: BoundSurface.h:89
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:77
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
float cellLenght() const
Definition: DTTopology.h:75
virtual float width() const =0
void FWRecoGeometryESProducer::addPixelBarrelGeometry ( void  )
private

Definition at line 235 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().

236 {
237  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(),
238  end = m_trackerGeom->detsPXB().end();
239  it != end; ++it)
240  {
241  const GeomDet *det = *it;
242 
243  if( det )
244  {
245  DetId detid = det->geographicalId();
246  unsigned int rawid = detid.rawId();
247  unsigned int current = insert_id( rawid );
248  fillShapeAndPlacement( current, det );
249 
250  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ));
251  }
252  }
253 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
const DetContainer & detsPXB() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
#define ADD_PIXEL_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void FWRecoGeometryESProducer::addPixelForwardGeometry ( void  )
private

Definition at line 256 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().

257 {
258  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(),
259  end = m_trackerGeom->detsPXF().end();
260  it != end; ++it )
261  {
262  const GeomDet *det = *it;
263 
264  if( det )
265  {
266  DetId detid = det->geographicalId();
267  unsigned int rawid = detid.rawId();
268  unsigned int current = insert_id( rawid );
269  fillShapeAndPlacement( current, det );
270 
271  ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid ));
272  }
273  }
274 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
#define ADD_PIXEL_TOPOLOGY(rawid, detUnit)
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const DetContainer & detsPXF() const
void FWRecoGeometryESProducer::addRPCGeometry ( void  )
private

Definition at line 208 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().

209 {
210  //
211  // RPC rolls geometry
212  //
213  DetId detId( DetId::Muon, 3 );
214  const RPCGeometry* rpcGeom = (const RPCGeometry*) m_geomRecord->slaveGeometry( detId );
215  for( std::vector<RPCRoll *>::const_iterator it = rpcGeom->rolls().begin(),
216  end = rpcGeom->rolls().end();
217  it != end; ++it )
218  {
219  RPCRoll* roll = (*it);
220  if( roll )
221  {
222  unsigned int rawid = roll->geographicalId().rawId();
223  unsigned int current = insert_id( rawid );
224  fillShapeAndPlacement( current, roll );
225 
226  const StripTopology& topo = roll->specificTopology();
227  m_fwGeometry->idToName[current].topology[0] = topo.nstrips();
228  m_fwGeometry->idToName[current].topology[1] = topo.stripLength();
229  m_fwGeometry->idToName[current].topology[2] = topo.pitch();
230  }
231  }
232 }
virtual int nstrips() const =0
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:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
virtual float stripLength() const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
virtual float pitch() const =0
const std::vector< RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition: RPCGeometry.cc:62
void FWRecoGeometryESProducer::addTECGeometry ( void  )
private

Definition at line 340 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().

341 {
342  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(),
343  end = m_trackerGeom->detsTEC().end();
344  it != end; ++it )
345  {
346  const GeomDet *det = *it;
347 
348  if( det )
349  {
350  DetId detid = det->geographicalId();
351  unsigned int rawid = detid.rawId();
352  unsigned int current = insert_id( rawid );
353  fillShapeAndPlacement( current, det );
354 
355  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
356  }
357  }
358 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
const DetContainer & detsTEC() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
virtual const GeomDet * idToDet(DetId) const
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
void FWRecoGeometryESProducer::addTIBGeometry ( void  )
private

Definition at line 277 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().

278 {
279  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTIB().begin(),
280  end = m_trackerGeom->detsTIB().end();
281  it != end; ++it )
282  {
283  const GeomDet *det = *it;
284 
285  if( det )
286  {
287  DetId detid = det->geographicalId();
288  unsigned int rawid = detid.rawId();
289  unsigned int current = insert_id( rawid );
290  fillShapeAndPlacement( current, det );
291 
292  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
293  }
294  }
295 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
virtual const GeomDet * idToDet(DetId) const
unsigned int insert_id(unsigned int id)
const DetContainer & detsTIB() const
Definition: DetId.h:20
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
void FWRecoGeometryESProducer::addTIDGeometry ( void  )
private

Definition at line 319 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().

320 {
321  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(),
322  end = m_trackerGeom->detsTID().end();
323  it != end; ++it)
324  {
325  const GeomDet *det = *it;
326 
327  if( det )
328  {
329  DetId detid = det->geographicalId();
330  unsigned int rawid = detid.rawId();
331  unsigned int current = insert_id( rawid );
332  fillShapeAndPlacement( current, det );
333 
334  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
335  }
336  }
337 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
virtual const GeomDet * idToDet(DetId) const
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const DetContainer & detsTID() const
void FWRecoGeometryESProducer::addTOBGeometry ( void  )
private

Definition at line 298 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().

299 {
300  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(),
301  end = m_trackerGeom->detsTOB().end();
302  it != end; ++it )
303  {
304  const GeomDet *det = *it;
305 
306  if( det )
307  {
308  DetId detid = det->geographicalId();
309  unsigned int rawid = detid.rawId();
310  unsigned int current = insert_id( rawid );
311  fillShapeAndPlacement( current, det );
312 
313  ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid ));
314  }
315  }
316 }
const TrackerGeometry * m_trackerGeom
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void fillShapeAndPlacement(unsigned int id, const GeomDet *det)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:38
virtual const GeomDet * idToDet(DetId) const
unsigned int insert_id(unsigned int id)
Definition: DetId.h:20
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
const DetContainer & detsTOB() const
void FWRecoGeometryESProducer::fillPoints ( unsigned int  id,
std::vector< GlobalPoint >::const_iterator  begin,
std::vector< GlobalPoint >::const_iterator  end 
)
private

Definition at line 385 of file FWRecoGeometryESProducer.cc.

References end, i, errorMatrix2Lands_multiChannel::id, getHLTprescales::index, and m_fwGeometry.

Referenced by addCaloGeometry().

386 {
387  unsigned int index( 0 );
388  for( std::vector<GlobalPoint>::const_iterator i = begin; i != end; ++i )
389  {
390  assert( index < 23 );
391  m_fwGeometry->idToName[id].points[index] = i->x();
392  m_fwGeometry->idToName[id].points[++index] = i->y();
393  m_fwGeometry->idToName[id].points[++index] = i->z();
394  ++index;
395  }
396 }
int i
Definition: DBlmapReader.cc:9
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
void FWRecoGeometryESProducer::fillShapeAndPlacement ( unsigned int  id,
const GeomDet det 
)
private

Shape of GeomDet

Definition at line 401 of file FWRecoGeometryESProducer.cc.

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

402 {
403  // Trapezoidal
404  const Bounds *b = &((det->surface ()).bounds ());
405  if( const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b))
406  {
407  std::vector< float > par = b2->parameters ();
408 
409  // These parameters are half-lengths, as in CMSIM/GEANT3
410  m_fwGeometry->idToName[id].shape[0] = 1;
411  m_fwGeometry->idToName[id].shape[1] = par [0]; // hBottomEdge
412  m_fwGeometry->idToName[id].shape[2] = par [1]; // hTopEdge
413  m_fwGeometry->idToName[id].shape[3] = par [2]; // thickness
414  m_fwGeometry->idToName[id].shape[4] = par [3]; // apothem
415  }
416  if( const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *> (b))
417  {
418  // Rectangular
419  m_fwGeometry->idToName[id].shape[0] = 2;
420  m_fwGeometry->idToName[id].shape[1] = b2->width() * 0.5; // half width
421  m_fwGeometry->idToName[id].shape[2] = b2->length() * 0.5; // half length
422  m_fwGeometry->idToName[id].shape[3] = b2->thickness() * 0.5; // half thickness
423  }
424 
425  // Position of the DetUnit's center
426  GlobalPoint pos = det->surface().position();
427  m_fwGeometry->idToName[id].translation[0] = pos.x();
428  m_fwGeometry->idToName[id].translation[1] = pos.y();
429  m_fwGeometry->idToName[id].translation[2] = pos.z();
430 
431  // Add the coeff of the rotation matrix
432  // with a projection on the basis vectors
433  TkRotation<float> detRot = det->surface().rotation();
434  m_fwGeometry->idToName[id].matrix[0] = detRot.xx();
435  m_fwGeometry->idToName[id].matrix[1] = detRot.yx();
436  m_fwGeometry->idToName[id].matrix[2] = detRot.zx();
437  m_fwGeometry->idToName[id].matrix[3] = detRot.xy();
438  m_fwGeometry->idToName[id].matrix[4] = detRot.yy();
439  m_fwGeometry->idToName[id].matrix[5] = detRot.zy();
440  m_fwGeometry->idToName[id].matrix[6] = detRot.xz();
441  m_fwGeometry->idToName[id].matrix[7] = detRot.yz();
442  m_fwGeometry->idToName[id].matrix[8] = detRot.zz();
443 }
T xx() const
T y() const
Definition: PV3DBase.h:62
T yx() const
boost::shared_ptr< FWRecoGeometry > m_fwGeometry
T zx() const
T xy() const
T zz() const
T z() const
Definition: PV3DBase.h:63
T zy() const
T yy() const
double b
Definition: hdecay.h:120
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
T xz() const
const RotationType & rotation() const
Definition: Bounds.h:18
T x() const
Definition: PV3DBase.h:61
const PositionType & position() const
T yz() const
unsigned int FWRecoGeometryESProducer::insert_id ( unsigned int  id)
private

Definition at line 375 of file FWRecoGeometryESProducer.cc.

References m_current, and m_fwGeometry.

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

376 {
377  ++m_current;
378  m_fwGeometry->idToName.push_back(FWRecoGeom::Info());
379  m_fwGeometry->idToName.back().id = rawid;
380 
381  return m_current;
382 }
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 74 of file FWRecoGeometryESProducer.cc.

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

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

75 {
76  using namespace edm;
77 
78  m_fwGeometry = boost::shared_ptr<FWRecoGeometry>( new FWRecoGeometry );
79 
81 
82  DetId detId( DetId::Tracker, 0 );
83  m_trackerGeom = (const TrackerGeometry*) m_geomRecord->slaveGeometry( detId );
84 
85  record.getRecord<CaloGeometryRecord>().get( m_caloGeom );
86 
93  addDTGeometry();
97 
98  m_fwGeometry->idToName.resize( m_current + 1 );
99  std::vector<FWRecoGeom::Info>( m_fwGeometry->idToName ).swap( m_fwGeometry->idToName );
100  std::sort( m_fwGeometry->idToName.begin(), m_fwGeometry->idToName.end());
101 
102  return m_fwGeometry;
103 }
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:20
edm::ESHandle< CaloGeometry > m_caloGeom

Member Data Documentation

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

Definition at line 50 of file FWRecoGeometryESProducer.h.

Referenced by addCaloGeometry(), and produce().

unsigned int FWRecoGeometryESProducer::m_current
private

Definition at line 54 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

Definition at line 49 of file FWRecoGeometryESProducer.h.

Referenced by addCSCGeometry(), addDTGeometry(), addRPCGeometry(), and produce().

const TrackerGeometry* FWRecoGeometryESProducer::m_trackerGeom
private