CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
RPCGeometry Class Reference

#include <RPCGeometry.h>

Inheritance diagram for RPCGeometry:
TrackingGeometry

Public Member Functions

void add (RPCRoll *roll)
 Add a RPC roll to the Geometry. More...
 
void add (RPCChamber *ch)
 Add a RPC roll to the Geometry. More...
 
const RPCChamberchamber (RPCDetId id) const
 
const std::vector< const
RPCChamber * > & 
chambers () const
 Return a vector of all RPC chambers. More...
 
const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
const DetContainerdetUnits () const override
 Returm a vector of all GeomDet. More...
 
const GeomDetidToDet (DetId) const override
 
const GeomDetidToDetUnit (DetId) const override
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
const RPCRollroll (RPCDetId id) const
 Return a roll given its id. More...
 
const std::vector< const
RPCRoll * > & 
rolls () const
 Return a vector of all RPC rolls. More...
 
 RPCGeometry ()
 Default constructor. More...
 
 ~RPCGeometry () override
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Attributes

std::vector< const RPCChamber * > allChambers
 
std::vector< const RPCRoll * > allRolls
 
DetIdContainer theDetIds
 
DetContainer theDets
 
mapIdToDet theMap
 
DetIdContainer theRollIds
 
DetContainer theRolls
 
DetTypeContainer theRollTypes
 

Additional Inherited Members

- Public Types inherited from TrackingGeometry
using DetContainer = std::vector< const GeomDet * >
 
using DetIdContainer = std::vector< DetId >
 
using DetTypeContainer = std::vector< const GeomDetType * >
 
using mapIdToDet = std::unordered_map< unsigned int, const GeomDet * >
 
using mapIdToDetUnit = std::unordered_map< unsigned int, const GeomDet * >
 

Detailed Description

The model of the geometry of RPC.

Author
M. Maggi - INFN Bari

Definition at line 20 of file RPCGeometry.h.

Constructor & Destructor Documentation

RPCGeometry::RPCGeometry ( )

Default constructor.

Implementation of the Model for RPC Geometry

Author
M. Maggi - INFN Bari

Definition at line 10 of file RPCGeometry.cc.

10 {}
RPCGeometry::~RPCGeometry ( )
override

Destructor.

Definition at line 12 of file RPCGeometry.cc.

12  {
13  // delete all the chamber associated to the geometry
14  //for (std::vector<RPCChamber*>::const_iterator ich = allChambers.begin();
15  // ich != allChambers.end(); ++ich){
16  // delete (*ich);
17  //}
18 }

Member Function Documentation

void RPCGeometry::add ( RPCRoll roll)

Add a RPC roll to the Geometry.

Definition at line 52 of file RPCGeometry.cc.

References allRolls, GeomDet::geographicalId(), roll(), theDetIds, theDets, theMap, theRollIds, theRolls, theRollTypes, and RPCRoll::type().

Referenced by counter.Counter::register().

52  {
53  theDets.emplace_back(roll);
54  allRolls.emplace_back(roll);
55  theRolls.emplace_back(roll);
56  theRollIds.emplace_back(roll->geographicalId());
57  theDetIds.emplace_back(roll->geographicalId());
58  GeomDetType* _t = const_cast<GeomDetType*>(&roll->type());
59  theRollTypes.emplace_back(_t);
60  theMap.insert(std::pair<DetId, GeomDetUnit*>(roll->geographicalId(), roll));
61 }
mapIdToDet theMap
Definition: RPCGeometry.h:77
DetTypeContainer theRollTypes
Definition: RPCGeometry.h:72
std::vector< const RPCRoll * > allRolls
Definition: RPCGeometry.h:79
DetIdContainer theRollIds
Definition: RPCGeometry.h:73
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
DetContainer theRolls
Definition: RPCGeometry.h:70
const GeomDetType & type() const override
Definition: RPCRoll.cc:20
DetIdContainer theDetIds
Definition: RPCGeometry.h:74
DetContainer theDets
Definition: RPCGeometry.h:71
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:50
void RPCGeometry::add ( RPCChamber ch)

Add a RPC roll to the Geometry.

Definition at line 63 of file RPCGeometry.cc.

References allChambers, chamber(), GeomDet::geographicalId(), theDetIds, theDets, and theMap.

Referenced by counter.Counter::register().

63  {
64  allChambers.emplace_back(chamber);
65  theDets.emplace_back(chamber);
66  theDetIds.emplace_back(chamber->geographicalId());
67  theMap.insert(std::pair<DetId, GeomDet*>(chamber->geographicalId(), chamber));
68 }
mapIdToDet theMap
Definition: RPCGeometry.h:77
const RPCChamber * chamber(RPCDetId id) const
Definition: RPCGeometry.cc:46
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
std::vector< const RPCChamber * > allChambers
Definition: RPCGeometry.h:80
DetIdContainer theDetIds
Definition: RPCGeometry.h:74
DetContainer theDets
Definition: RPCGeometry.h:71
const RPCChamber * RPCGeometry::chamber ( RPCDetId  id) const

Definition at line 46 of file RPCGeometry.cc.

References idToDet().

Referenced by add(), RPCSeedPattern::extropolateStep(), geometryXMLparser.CSCAlignable::index(), MuonSimHitProducer::produce(), and RPCCosmicSeedrecHitFinder::setEdge().

46  {
47  return dynamic_cast<const RPCChamber*>(idToDet(id.chamberId()));
48 }
const GeomDet * idToDet(DetId) const override
Definition: RPCGeometry.cc:32
const std::vector< const RPCChamber * > & RPCGeometry::chambers ( ) const

Return a vector of all RPC chambers.

Definition at line 42 of file RPCGeometry.cc.

References allChambers.

42 { return allChambers; }
std::vector< const RPCChamber * > allChambers
Definition: RPCGeometry.h:80
const RPCGeometry::DetIdContainer & RPCGeometry::detIds ( ) const
overridevirtual

Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)

Implements TrackingGeometry.

Definition at line 28 of file RPCGeometry.cc.

References theDetIds.

Referenced by RPCCosmicSeedrecHitFinder::setEdge().

28 { return theDetIds; }
DetIdContainer theDetIds
Definition: RPCGeometry.h:74
const RPCGeometry::DetContainer & RPCGeometry::dets ( ) const
overridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 24 of file RPCGeometry.cc.

References theDets.

Referenced by RPCConeBuilder::buildCones(), CSCObjectMap::CSCObjectMap(), DTObjectMap::DTObjectMap(), RPCSynchronizer::getSimHitBx(), and RPCSynchronizer::getSimHitBxAndTimingForIRPC().

24 { return theDets; }
DetContainer theDets
Definition: RPCGeometry.h:71
const RPCGeometry::DetTypeContainer & RPCGeometry::detTypes ( ) const
overridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 20 of file RPCGeometry.cc.

References theRollTypes.

20 { return theRollTypes; }
DetTypeContainer theRollTypes
Definition: RPCGeometry.h:72
const RPCGeometry::DetIdContainer & RPCGeometry::detUnitIds ( ) const
overridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 26 of file RPCGeometry.cc.

References theRollIds.

26 { return theRollIds; }
DetIdContainer theRollIds
Definition: RPCGeometry.h:73
const RPCGeometry::DetContainer & RPCGeometry::detUnits ( ) const
overridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 22 of file RPCGeometry.cc.

References theRolls.

22 { return theRolls; }
DetContainer theRolls
Definition: RPCGeometry.h:70
const GeomDet * RPCGeometry::idToDet ( DetId  ) const
overridevirtual

Return the pointer to the GeomDet corresponding to a given DetId (valid also for GeomDetUnits)

Implements TrackingGeometry.

Definition at line 32 of file RPCGeometry.cc.

References relativeConstraints::geom, mps_fire::i, LogDebug, RPCDetId, and theMap.

Referenced by MuonRPCDetLayerGeometryBuilder::buildBarrelLayers(), MuonRPCDetLayerGeometryBuilder::buildLayer(), chamber(), idToDetUnit(), TracktoRPC::thePoints(), and TracktoRPC::ValidRPCSurface().

32  {
33  mapIdToDet::const_iterator i = theMap.find(id);
34  if (i != theMap.end())
35  return i->second;
36 
37  LogDebug("RPCGeometry") << "Invalid DetID: no GeomDet associated " << RPCDetId(id);
38  GeomDet* geom = nullptr;
39  return geom;
40 }
mapIdToDet theMap
Definition: RPCGeometry.h:77
#define LogDebug(id)
const GeomDet * RPCGeometry::idToDetUnit ( DetId  ) const
overridevirtual

Return the pointer to the GeomDetUnit corresponding to a given DetId.

Implements TrackingGeometry.

Definition at line 30 of file RPCGeometry.cc.

References idToDet().

Referenced by GlobalHitsProdHist::fillMuon(), GlobalHitsAnalyzer::fillMuon(), GlobalHitsProducer::fillMuon(), RPCDigitizer::findDet(), IRPCDigitizer::findDet(), RPCSeedOverlapper::isShareHit(), MuonSimHitProducer::produce(), and roll().

30 { return dynamic_cast<const GeomDet*>(idToDet(id)); }
const GeomDet * idToDet(DetId) const override
Definition: RPCGeometry.cc:32
const RPCRoll * RPCGeometry::roll ( RPCDetId  id) const

Return a roll given its id.

Definition at line 50 of file RPCGeometry.cc.

References idToDetUnit().

Referenced by add(), PrimitiveConversion::convert_rpc(), EMTFSubsystemCollector::extractPrimitives(), AngleConverter::getGlobalEta(), AngleConverter::getProcessorPhi(), RPCtoDTTranslator::localX(), RPCtoDTTranslator::radialAngle(), RPCMonitorDigi::stripsInRoll(), and TracktoRPC::thePoints().

50 { return dynamic_cast<const RPCRoll*>(idToDetUnit(id)); }
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: RPCGeometry.cc:30
const std::vector< const RPCRoll * > & RPCGeometry::rolls ( ) const

Member Data Documentation

std::vector<const RPCChamber*> RPCGeometry::allChambers
private

Definition at line 80 of file RPCGeometry.h.

Referenced by add(), and chambers().

std::vector<const RPCRoll*> RPCGeometry::allRolls
private

Definition at line 79 of file RPCGeometry.h.

Referenced by add(), and rolls().

DetIdContainer RPCGeometry::theDetIds
private

Definition at line 74 of file RPCGeometry.h.

Referenced by add(), and detIds().

DetContainer RPCGeometry::theDets
private

Definition at line 71 of file RPCGeometry.h.

Referenced by add(), and dets().

mapIdToDet RPCGeometry::theMap
private

Definition at line 77 of file RPCGeometry.h.

Referenced by add(), and idToDet().

DetIdContainer RPCGeometry::theRollIds
private

Definition at line 73 of file RPCGeometry.h.

Referenced by add(), and detUnitIds().

DetContainer RPCGeometry::theRolls
private

Definition at line 70 of file RPCGeometry.h.

Referenced by add(), and detUnits().

DetTypeContainer RPCGeometry::theRollTypes
private

Definition at line 72 of file RPCGeometry.h.

Referenced by add(), and detTypes().