#include <FWRecoGeometryESProducer.h>
Definition at line 22 of file FWRecoGeometryESProducer.h.
FWRecoGeometryESProducer::FWRecoGeometryESProducer | ( | const edm::ParameterSet & | ) |
Definition at line 64 of file FWRecoGeometryESProducer.cc.
References edm::ESProducer::setWhatProduced().
: m_current( -1 ) { setWhatProduced( this ); }
FWRecoGeometryESProducer::~FWRecoGeometryESProducer | ( | void | ) | [virtual] |
Definition at line 70 of file FWRecoGeometryESProducer.cc.
{}
FWRecoGeometryESProducer::FWRecoGeometryESProducer | ( | const FWRecoGeometryESProducer & | ) | [private] |
void FWRecoGeometryESProducer::addCaloGeometry | ( | void | ) | [private] |
Definition at line 361 of file FWRecoGeometryESProducer.cc.
References end, fillPoints(), insert_id(), and m_caloGeom.
Referenced by produce().
{ std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo for( std::vector<DetId>::const_iterator it = vid.begin(), end = vid.end(); it != end; ++it ) { const CaloCellGeometry::CornersVec& cor( m_caloGeom->getGeometry( *it )->getCorners()); unsigned int id = insert_id( it->rawId()); fillPoints( id, cor.begin(), cor.end()); } }
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().
{ DetId detId( DetId::Muon, 2 ); const CSCGeometry* cscGeometry = (const CSCGeometry*) m_geomRecord->slaveGeometry( detId ); for( std::vector<CSCChamber*>::const_iterator it = cscGeometry->chambers().begin(), end = cscGeometry->chambers().end(); it != end; ++it ) { const CSCChamber *chamber = *it; if( chamber ) { unsigned int rawid = chamber->geographicalId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, chamber ); // // CSC layers geometry // for( std::vector< const CSCLayer* >::const_iterator lit = chamber->layers().begin(), lend = chamber->layers().end(); lit != lend; ++lit ) { const CSCLayer* layer = *lit; if( layer ) { unsigned int rawid = layer->geographicalId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, layer ); const CSCStripTopology* stripTopology = layer->geometry()->topology(); m_fwGeometry->idToName[current].topology[0] = stripTopology->yAxisOrientation(); m_fwGeometry->idToName[current].topology[1] = stripTopology->centreToIntersection(); m_fwGeometry->idToName[current].topology[2] = stripTopology->yCentreOfStripPlane(); m_fwGeometry->idToName[current].topology[3] = stripTopology->phiOfOneEdge(); m_fwGeometry->idToName[current].topology[4] = stripTopology->stripOffset(); m_fwGeometry->idToName[current].topology[5] = stripTopology->angularWidth(); const CSCWireTopology* wireTopology = layer->geometry()->wireTopology(); m_fwGeometry->idToName[current].topology[6] = wireTopology->wireSpacing(); m_fwGeometry->idToName[current].topology[7] = wireTopology->wireAngle(); } } } } }
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().
{ DetId detId( DetId::Muon, 1 ); const DTGeometry* dtGeometry = (const DTGeometry*) m_geomRecord->slaveGeometry( detId ); // // DT chambers geometry // for( std::vector<DTChamber *>::const_iterator it = dtGeometry->chambers().begin(), end = dtGeometry->chambers().end(); it != end; ++it ) { const DTChamber *chamber = *it; if( chamber ) { unsigned int rawid = chamber->geographicalId().rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, chamber ); } } // Fill in DT layer parameters for( std::vector<DTLayer*>::const_iterator it = dtGeometry->layers().begin(), end = dtGeometry->layers().end(); it != end; ++it ) { const DTLayer* layer = *it; if( layer ) { unsigned int rawid = layer->id().rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, layer ); const DTTopology& topo = layer->specificTopology(); const BoundPlane& surf = layer->surface(); // Topology W/H/L: m_fwGeometry->idToName[current].topology[0] = topo.cellWidth(); m_fwGeometry->idToName[current].topology[1] = topo.cellHeight(); m_fwGeometry->idToName[current].topology[2] = topo.cellLenght(); m_fwGeometry->idToName[current].topology[3] = topo.firstChannel(); m_fwGeometry->idToName[current].topology[4] = topo.lastChannel(); m_fwGeometry->idToName[current].topology[5] = topo.channels(); // Bounds W/H/L: m_fwGeometry->idToName[current].topology[6] = surf.bounds().width(); m_fwGeometry->idToName[current].topology[7] = surf.bounds().thickness(); m_fwGeometry->idToName[current].topology[8] = surf.bounds().length(); } } }
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().
{ for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(), end = m_trackerGeom->detsPXB().end(); it != end; ++it) { const GeomDet *det = *it; if( det ) { DetId detid = det->geographicalId(); unsigned int rawid = detid.rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, det ); ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( 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().
{ for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(), end = m_trackerGeom->detsPXF().end(); it != end; ++it ) { const GeomDet *det = *it; if( det ) { DetId detid = det->geographicalId(); unsigned int rawid = detid.rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, det ); ADD_PIXEL_TOPOLOGY( current, m_trackerGeom->idToDetUnit( detid )); } } }
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().
{ // // RPC rolls geometry // DetId detId( DetId::Muon, 3 ); const RPCGeometry* rpcGeom = (const RPCGeometry*) m_geomRecord->slaveGeometry( detId ); for( std::vector<RPCRoll *>::const_iterator it = rpcGeom->rolls().begin(), end = rpcGeom->rolls().end(); it != end; ++it ) { RPCRoll* roll = (*it); if( roll ) { unsigned int rawid = roll->geographicalId().rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, roll ); const StripTopology& topo = roll->specificTopology(); m_fwGeometry->idToName[current].topology[0] = topo.nstrips(); m_fwGeometry->idToName[current].topology[1] = topo.stripLength(); m_fwGeometry->idToName[current].topology[2] = topo.pitch(); } } }
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().
{ for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(), end = m_trackerGeom->detsTEC().end(); it != end; ++it ) { const GeomDet *det = *it; if( det ) { DetId detid = det->geographicalId(); unsigned int rawid = detid.rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, det ); ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid )); } } }
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().
{ for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTIB().begin(), end = m_trackerGeom->detsTIB().end(); it != end; ++it ) { const GeomDet *det = *it; if( det ) { DetId detid = det->geographicalId(); unsigned int rawid = detid.rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, det ); ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid )); } } }
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().
{ for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(), end = m_trackerGeom->detsTID().end(); it != end; ++it) { const GeomDet *det = *it; if( det ) { DetId detid = det->geographicalId(); unsigned int rawid = detid.rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, det ); ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid )); } } }
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().
{ for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(), end = m_trackerGeom->detsTOB().end(); it != end; ++it ) { const GeomDet *det = *it; if( det ) { DetId detid = det->geographicalId(); unsigned int rawid = detid.rawId(); unsigned int current = insert_id( rawid ); fillShapeAndPlacement( current, det ); ADD_SISTRIP_TOPOLOGY( current, m_trackerGeom->idToDet( detid )); } } }
void FWRecoGeometryESProducer::fillPoints | ( | unsigned int | id, |
std::vector< GlobalPoint >::const_iterator | begin, | ||
std::vector< GlobalPoint >::const_iterator | end | ||
) | [private] |
Definition at line 386 of file FWRecoGeometryESProducer.cc.
References end, i, getHLTprescales::index, and m_fwGeometry.
Referenced by addCaloGeometry().
void FWRecoGeometryESProducer::fillShapeAndPlacement | ( | unsigned int | id, |
const GeomDet * | det | ||
) | [private] |
Definition at line 402 of file FWRecoGeometryESProducer.cc.
References b, 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().
{ // Trapezoidal const Bounds *b = &((det->surface ()).bounds ()); if( const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b)) { std::vector< float > par = b2->parameters (); // These parameters are half-lengths, as in CMSIM/GEANT3 m_fwGeometry->idToName[id].shape[0] = 1; m_fwGeometry->idToName[id].shape[1] = par [0]; // hBottomEdge m_fwGeometry->idToName[id].shape[2] = par [1]; // hTopEdge m_fwGeometry->idToName[id].shape[3] = par [2]; // thickness m_fwGeometry->idToName[id].shape[4] = par [3]; // apothem } if( const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *> (b)) { // Rectangular m_fwGeometry->idToName[id].shape[0] = 2; m_fwGeometry->idToName[id].shape[1] = b2->width() * 0.5; // half width m_fwGeometry->idToName[id].shape[2] = b2->length() * 0.5; // half length m_fwGeometry->idToName[id].shape[3] = b2->thickness() * 0.5; // half thickness } // Position of the DetUnit's center GlobalPoint pos = det->surface().position(); m_fwGeometry->idToName[id].translation[0] = pos.x(); m_fwGeometry->idToName[id].translation[1] = pos.y(); m_fwGeometry->idToName[id].translation[2] = pos.z(); // Add the coeff of the rotation matrix // with a projection on the basis vectors TkRotation<float> detRot = det->surface().rotation(); m_fwGeometry->idToName[id].matrix[0] = detRot.xx(); m_fwGeometry->idToName[id].matrix[1] = detRot.yx(); m_fwGeometry->idToName[id].matrix[2] = detRot.zx(); m_fwGeometry->idToName[id].matrix[3] = detRot.xy(); m_fwGeometry->idToName[id].matrix[4] = detRot.yy(); m_fwGeometry->idToName[id].matrix[5] = detRot.zy(); m_fwGeometry->idToName[id].matrix[6] = detRot.xz(); m_fwGeometry->idToName[id].matrix[7] = detRot.yz(); m_fwGeometry->idToName[id].matrix[8] = detRot.zz(); }
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().
{ ++m_current; m_fwGeometry->idToName[m_current].id = rawid; // assert( m_current >= 0 ); m_current >= 0, since m_current is unsigned assert( m_current < 260000 ); return m_current; }
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.
{ using namespace edm; m_fwGeometry = boost::shared_ptr<FWRecoGeometry>( new FWRecoGeometry ); record.getRecord<GlobalTrackingGeometryRecord>().get( m_geomRecord ); DetId detId( DetId::Tracker, 0 ); m_trackerGeom = (const TrackerGeometry*) m_geomRecord->slaveGeometry( detId ); record.getRecord<CaloGeometryRecord>().get( m_caloGeom ); addPixelBarrelGeometry( ); addPixelForwardGeometry(); addTIBGeometry(); addTIDGeometry(); addTOBGeometry(); addTECGeometry(); addDTGeometry(); addCSCGeometry(); addRPCGeometry(); addCaloGeometry(); m_fwGeometry->idToName.resize( m_current + 1 ); std::vector<FWRecoGeom::Info>( m_fwGeometry->idToName ).swap( m_fwGeometry->idToName ); std::sort( m_fwGeometry->idToName.begin(), m_fwGeometry->idToName.end()); return m_fwGeometry; }
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] |
Definition at line 52 of file FWRecoGeometryESProducer.h.
Referenced by addCSCGeometry(), addDTGeometry(), addRPCGeometry(), fillPoints(), fillShapeAndPlacement(), insert_id(), and produce().
Definition at line 49 of file FWRecoGeometryESProducer.h.
Referenced by addCSCGeometry(), addDTGeometry(), addRPCGeometry(), and produce().
const TrackerGeometry* FWRecoGeometryESProducer::m_trackerGeom [private] |
Definition at line 51 of file FWRecoGeometryESProducer.h.
Referenced by addPixelBarrelGeometry(), addPixelForwardGeometry(), addTECGeometry(), addTIBGeometry(), addTIDGeometry(), addTOBGeometry(), and produce().