CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCGeometry Class Reference

#include <RPCGeometry.h>

Inheritance diagram for RPCGeometry:
TrackingGeometry

List of all members.

Public Member Functions

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

Private Attributes

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

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.

{}
RPCGeometry::~RPCGeometry ( ) [virtual]

Destructor.

Definition at line 12 of file RPCGeometry.cc.

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

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().

                             {
  theDets.push_back(roll);
  allRolls.push_back(roll);
  theRolls.push_back(roll);
  theRollIds.push_back(roll->geographicalId());
  theDetIds.push_back(roll->geographicalId());
  GeomDetType* _t = const_cast<GeomDetType*>(&roll->type());
  theRollTypes.push_back(_t);
  theMap.insert(std::pair<DetId,GeomDetUnit*>
                (roll->geographicalId(),roll));
}
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.

                                   {
  allChambers.push_back(chamber);
  theDets.push_back(chamber);
  theDetIds.push_back(chamber->geographicalId());
  theMap.insert(std::pair<DetId,GeomDet*>
                (chamber->geographicalId(),chamber));
}
const RPCChamber * RPCGeometry::chamber ( RPCDetId  id) const

Definition at line 66 of file RPCGeometry.cc.

References idToDet().

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

                                                       {
  return dynamic_cast<const RPCChamber*>(idToDet(id.chamberId()));
}
const std::vector< RPCChamber * > & RPCGeometry::chambers ( ) const

Return a vector of all RPC chambers.

Definition at line 58 of file RPCGeometry.cc.

References allChambers.

                                                          {
  return allChambers;
}
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.

                                                          {
  return theDetIds;
}
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().

                                                      {
  return theDets;
}
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.

                                                               {
  return theRollTypes;
}
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.

                                                              {
  return theRollIds;
}
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.

                                                              {
  return theRolls;
}
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(), chamber(), and idToDetUnit().

                                                 {
  mapIdToDet::const_iterator i = theMap.find(id);
  return (i != theMap.end()) ?
    i->second : 0 ;
}
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 GlobalHitsProdHist::fillMuon(), GlobalHitsAnalyzer::fillMuon(), GlobalHitsProducer::fillMuon(), MuonSimHitsValidAnalyzer::fillRPC(), RPCDigitizer::findDet(), MuonSimHitProducer::produce(), and roll().

                                                         {
  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
}
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().

                                                 {
  return dynamic_cast<const RPCRoll*>(idToDetUnit(id));
}
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().

                                                   {
  return allRolls;
}

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().

Definition at line 78 of file RPCGeometry.h.

Referenced by add(), and detIds().

Definition at line 75 of file RPCGeometry.h.

Referenced by add(), and dets().

Definition at line 81 of file RPCGeometry.h.

Referenced by add(), and idToDet().

Definition at line 77 of file RPCGeometry.h.

Referenced by add(), and detUnitIds().

Definition at line 74 of file RPCGeometry.h.

Referenced by add(), and detUnits().

Definition at line 76 of file RPCGeometry.h.

Referenced by add(), and detTypes().