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< const
RPCChamber * > & 
chambers () const
 Return a vector of all RPC chambers. More...
 
virtual const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
virtual const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const override
 Returm a vector of all GeomDetUnit. More...
 
virtual const GeomDetidToDet (DetId) const override
 
virtual const GeomDetUnitidToDetUnit (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...
 
virtual ~RPCGeometry ()
 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
 
DetUnitContainer theRolls
 
DetTypeContainer theRollTypes
 

Additional Inherited Members

- Public Types inherited from TrackingGeometry
typedef std::vector< GeomDet
const * > 
DetContainer
 
typedef std::vector< DetIdDetIdContainer
 
typedef std::vector
< GeomDetType const * > 
DetTypeContainer
 
typedef std::vector
< GeomDetUnit const * > 
DetUnitContainer
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDet const * > 
mapIdToDet
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDetUnit
const * > 
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 10 of file RPCGeometry.cc.

10 {}
RPCGeometry::~RPCGeometry ( )
virtual

Destructor.

Definition at line 13 of file RPCGeometry.cc.

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

Member Function Documentation

void RPCGeometry::add ( RPCRoll roll)

Add a RPC roll to the Geometry.

Definition at line 81 of file RPCGeometry.cc.

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

Referenced by RPCGeometryBuilderFromDDD::buildGeometry().

81  {
82  theDets.push_back(roll);
83  allRolls.push_back(roll);
84  theRolls.push_back(roll);
85  theRollIds.push_back(roll->geographicalId());
86  theDetIds.push_back(roll->geographicalId());
87  GeomDetType* _t = const_cast<GeomDetType*>(&roll->type());
88  theRollTypes.push_back(_t);
89  theMap.insert(std::pair<DetId,GeomDetUnit*>
90  (roll->geographicalId(),roll));
91 }
mapIdToDet theMap
Definition: RPCGeometry.h:81
DetTypeContainer theRollTypes
Definition: RPCGeometry.h:76
std::vector< const 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:72
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:75
void RPCGeometry::add ( RPCChamber ch)

Add a RPC roll to the Geometry.

Definition at line 94 of file RPCGeometry.cc.

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

94  {
95  allChambers.push_back(chamber);
96  theDets.push_back(chamber);
97  theDetIds.push_back(chamber->geographicalId());
98  theMap.insert(std::pair<DetId,GeomDet*>
100 }
mapIdToDet theMap
Definition: RPCGeometry.h:81
const RPCChamber * chamber(RPCDetId id) const
Definition: RPCGeometry.cc:71
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
std::vector< const RPCChamber * > allChambers
Definition: RPCGeometry.h:84
DetIdContainer theDetIds
Definition: RPCGeometry.h:78
DetContainer theDets
Definition: RPCGeometry.h:75
const RPCChamber * RPCGeometry::chamber ( RPCDetId  id) const

Definition at line 71 of file RPCGeometry.cc.

References idToDet().

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

71  {
72  return dynamic_cast<const RPCChamber*>(idToDet(id.chamberId()));
73 }
virtual const GeomDet * idToDet(DetId) const override
Definition: RPCGeometry.cc:53
const std::vector< const RPCChamber * > & RPCGeometry::chambers ( ) const

Return a vector of all RPC chambers.

Definition at line 63 of file RPCGeometry.cc.

References allChambers.

63  {
64  return allChambers;
65 }
std::vector< const RPCChamber * > allChambers
Definition: RPCGeometry.h:84
const RPCGeometry::DetIdContainer & RPCGeometry::detIds ( ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 43 of file RPCGeometry.cc.

References theDetIds.

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

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 33 of file RPCGeometry.cc.

References theDets.

Referenced by RPCSynchronizer::getSimHitBx().

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

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 23 of file RPCGeometry.cc.

References theRollTypes.

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

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 38 of file RPCGeometry.cc.

References theRollIds.

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

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 28 of file RPCGeometry.cc.

References theRolls.

28  {
29  return theRolls;
30 }
DetUnitContainer theRolls
Definition: RPCGeometry.h:74
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 53 of file RPCGeometry.cc.

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

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

53  {
54  mapIdToDet::const_iterator i = theMap.find(id);
55  if (i != theMap.end())
56  return i->second;
57 
58  LogDebug("RPCGeometry")<<"Invalid DetID: no GeomDet associated "<< RPCDetId(id);
59  GeomDet* geom = 0;
60  return geom;
61 }
#define LogDebug(id)
mapIdToDet theMap
Definition: RPCGeometry.h:81
int i
Definition: DBlmapReader.cc:9
const GeomDetUnit * RPCGeometry::idToDetUnit ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 48 of file RPCGeometry.cc.

References idToDet().

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

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

Return a roll given its id.

Definition at line 75 of file RPCGeometry.cc.

References idToDetUnit().

Referenced by add().

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

Return a vector of all RPC rolls.

Definition at line 67 of file RPCGeometry.cc.

References allRolls.

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

67  {
68  return allRolls;
69 }
std::vector< const RPCRoll * > allRolls
Definition: RPCGeometry.h:83

Member Data Documentation

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

Definition at line 84 of file RPCGeometry.h.

Referenced by add(), and chambers().

std::vector<const 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().