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 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< RPCChamber * > & chambers () const
 Return a vector of all RPC chambers. More...
 
virtual const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
virtual const DetTypeContainerdetTypes () const
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit. More...
 
virtual const GeomDetidToDet (DetId) const
 
virtual const GeomDetUnitidToDetUnit (DetId) const
 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< RPCRoll * > & rolls () const
 Return a vector of all RPC rolls. More...
 
 RPCGeometry ()
 Default constructor. More...
 
virtual ~RPCGeometry ()
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from TrackingGeometry
typedef std::vector< GeomDet * > DetContainer
 
typedef std::vector< DetIdDetIdContainer
 
typedef std::vector
< GeomDetType * > 
DetTypeContainer
 
typedef std::vector
< GeomDetUnit * > 
DetUnitContainer
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDet * > 
mapIdToDet
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDetUnit * > 
mapIdToDetUnit
 

Detailed Description

The model of the geometry of RPC.

Author
M. Maggi - INFN Bari

Definition at line 22 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 9 of file RPCGeometry.cc.

9 {}
RPCGeometry::~RPCGeometry ( )
virtual

Destructor.

Definition at line 12 of file RPCGeometry.cc.

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

Member Function Documentation

void RPCGeometry::add ( RPCRoll roll)

Add a RPC roll to the Geometry.

Definition at line 76 of file RPCGeometry.cc.

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

Referenced by RPCGeometryBuilderFromDDD::buildGeometry().

76  {
77  theDets.push_back(roll);
78  allRolls.push_back(roll);
79  theRolls.push_back(roll);
80  theRollIds.push_back(roll->geographicalId());
81  theDetIds.push_back(roll->geographicalId());
82  GeomDetType* _t = const_cast<GeomDetType*>(&roll->type());
83  theRollTypes.push_back(_t);
84  theMap.insert(std::pair<DetId,GeomDetUnit*>
85  (roll->geographicalId(),roll));
86 }
mapIdToDet theMap
Definition: RPCGeometry.h:81
DetTypeContainer theRollTypes
Definition: RPCGeometry.h:76
std::vector< RPCRoll * > allRolls
Definition: RPCGeometry.h:83
const GeomDetType & type() const
Definition: RPCRoll.cc:36
DetIdContainer theRollIds
Definition: RPCGeometry.h:77
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
DetUnitContainer theRolls
Definition: RPCGeometry.h:74
DetIdContainer theDetIds
Definition: RPCGeometry.h:78
DetContainer theDets
Definition: RPCGeometry.h:75
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:70
void RPCGeometry::add ( RPCChamber ch)

Add a RPC roll to the Geometry.

Definition at line 89 of file RPCGeometry.cc.

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

89  {
90  allChambers.push_back(chamber);
91  theDets.push_back(chamber);
92  theDetIds.push_back(chamber->geographicalId());
93  theMap.insert(std::pair<DetId,GeomDet*>
95 }
mapIdToDet theMap
Definition: RPCGeometry.h:81
std::vector< RPCChamber * > allChambers
Definition: RPCGeometry.h:84
const RPCChamber * chamber(RPCDetId id) const
Definition: RPCGeometry.cc:66
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
DetIdContainer theDetIds
Definition: RPCGeometry.h:78
DetContainer theDets
Definition: RPCGeometry.h:75
const RPCChamber * RPCGeometry::chamber ( RPCDetId  id) const

Definition at line 66 of file RPCGeometry.cc.

References idToDet().

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

66  {
67  return dynamic_cast<const RPCChamber*>(idToDet(id.chamberId()));
68 }
virtual const GeomDet * idToDet(DetId) const
Definition: RPCGeometry.cc:52
const std::vector< RPCChamber * > & RPCGeometry::chambers ( ) const

Return a vector of all RPC chambers.

Definition at line 58 of file RPCGeometry.cc.

References allChambers.

58  {
59  return allChambers;
60 }
std::vector< RPCChamber * > allChambers
Definition: RPCGeometry.h:84
const RPCGeometry::DetIdContainer & RPCGeometry::detIds ( ) const
virtual

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

Implements TrackingGeometry.

Definition at line 42 of file RPCGeometry.cc.

References theDetIds.

42  {
43  return theDetIds;
44 }
DetIdContainer theDetIds
Definition: RPCGeometry.h:78
const RPCGeometry::DetContainer & RPCGeometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 32 of file RPCGeometry.cc.

References theDets.

Referenced by RPCSynchronizer::getSimHitBx().

32  {
33  return theDets;
34 }
DetContainer theDets
Definition: RPCGeometry.h:75
const RPCGeometry::DetTypeContainer & RPCGeometry::detTypes ( ) const
virtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 22 of file RPCGeometry.cc.

References theRollTypes.

22  {
23  return theRollTypes;
24 }
DetTypeContainer theRollTypes
Definition: RPCGeometry.h:76
const RPCGeometry::DetIdContainer & RPCGeometry::detUnitIds ( ) const
virtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 37 of file RPCGeometry.cc.

References theRollIds.

37  {
38  return theRollIds;
39 }
DetIdContainer theRollIds
Definition: RPCGeometry.h:77
const RPCGeometry::DetUnitContainer & RPCGeometry::detUnits ( ) const
virtual

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 27 of file RPCGeometry.cc.

References theRolls.

27  {
28  return theRolls;
29 }
DetUnitContainer theRolls
Definition: RPCGeometry.h:74
const GeomDet * RPCGeometry::idToDet ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 52 of file RPCGeometry.cc.

References i, and theMap.

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

52  {
53  mapIdToDet::const_iterator i = theMap.find(id);
54  return (i != theMap.end()) ?
55  i->second : 0 ;
56 }
mapIdToDet theMap
Definition: RPCGeometry.h:81
int i
Definition: DBlmapReader.cc:9
const GeomDetUnit * RPCGeometry::idToDetUnit ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 47 of file RPCGeometry.cc.

References idToDet().

Referenced by GlobalHitsAnalyzer::fillMuon(), GlobalHitsProdHist::fillMuon(), GlobalHitsProducer::fillMuon(), MuonSimHitsValidAnalyzer::fillRPC(), RPCDigitizer::findDet(), MuonSimHitProducer::produce(), and roll().

47  {
48  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
49 }
virtual const GeomDet * idToDet(DetId) const
Definition: RPCGeometry.cc:52
const RPCRoll * RPCGeometry::roll ( RPCDetId  id) const

Return a roll given its id.

Definition at line 70 of file RPCGeometry.cc.

References idToDetUnit().

Referenced by add().

70  {
71  return dynamic_cast<const RPCRoll*>(idToDetUnit(id));
72 }
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: RPCGeometry.cc:47
const std::vector< RPCRoll * > & RPCGeometry::rolls ( ) const

Return a vector of all RPC rolls.

Definition at line 62 of file RPCGeometry.cc.

References allRolls.

Referenced by FWRecoGeometryESProducer::addRPCGeometry(), and RPCDigitizer::doAction().

62  {
63  return allRolls;
64 }
std::vector< RPCRoll * > allRolls
Definition: RPCGeometry.h:83

Member Data Documentation

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

Definition at line 84 of file RPCGeometry.h.

Referenced by add(), and chambers().

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

Definition at line 83 of file RPCGeometry.h.

Referenced by add(), and rolls().

DetIdContainer RPCGeometry::theDetIds
private

Definition at line 78 of file RPCGeometry.h.

Referenced by add(), and detIds().

DetContainer RPCGeometry::theDets
private

Definition at line 75 of file RPCGeometry.h.

Referenced by add(), and dets().

mapIdToDet RPCGeometry::theMap
private

Definition at line 81 of file RPCGeometry.h.

Referenced by add(), and idToDet().

DetIdContainer RPCGeometry::theRollIds
private

Definition at line 77 of file RPCGeometry.h.

Referenced by add(), and detUnitIds().

DetUnitContainer RPCGeometry::theRolls
private

Definition at line 74 of file RPCGeometry.h.

Referenced by add(), and detUnits().

DetTypeContainer RPCGeometry::theRollTypes
private

Definition at line 76 of file RPCGeometry.h.

Referenced by add(), and detTypes().