CMS 3D CMS Logo

RPCChamber Class Reference

Model of a RPC chamber. More...

#include <Geometry/RPCGeometry/interface/RPCChamber.h>

Inheritance diagram for RPCChamber:

GeomDet

List of all members.

Public Member Functions

void add (RPCRoll *rl)
 Add Roll to the chamber which takes ownership.
virtual const GeomDetcomponent (DetId id) const
 Return the sub-component (roll) with a given id in this chamber.
virtual std::vector< const
GeomDet * > 
components () const
 Return the rolls in the chamber.
virtual DetId geographicalId () const
 Return the DetId of this chamber.
RPCDetId id () const
 Return the RPCChamberId of this chamber.
const int nrolls () const
 Retunr numbers of rolls.
bool operator== (const RPCChamber &ch) const
 equal if the id is the same
const RPCRollroll (int isl) const
const RPCRollroll (RPCDetId id) const
 Return the Roll corresponding to the given id.
const std::vector< const
RPCRoll * > & 
rolls () const
 Return the Rolls.
 RPCChamber (RPCDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
 Constructor.
virtual SubDetector subDetector () const
 Which subdetector.
virtual ~RPCChamber ()
 Destructor.

Private Attributes

RPCDetId theId
std::vector< const RPCRoll * > theRolls


Detailed Description

Model of a RPC chamber.

A chamber is a GeomDet. The chamber is composed by 2 or 3 Roll (GeomDetUnit).

Date
2006/11/28 10:31:32
Revision
1.2
Author:
R. Trentadue

Definition at line 21 of file RPCChamber.h.


Constructor & Destructor Documentation

RPCChamber::RPCChamber ( RPCDetId  id,
const ReferenceCountingPointer< BoundPlane > &  plane 
)

Constructor.

Definition at line 22 of file RPCChamber.cc.

00023                                                                            :
00024   GeomDet(plane), theId(id)
00025 {}

RPCChamber::~RPCChamber (  )  [virtual]

Destructor.

Definition at line 28 of file RPCChamber.cc.

00028                         {
00029 }


Member Function Documentation

void RPCChamber::add ( RPCRoll rl  ) 

Add Roll to the chamber which takes ownership.

Definition at line 53 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryBuilderFromDDD::buildGeometry().

00053                            {
00054   theRolls.push_back(rl);
00055 }

const GeomDet * RPCChamber::component ( DetId  id  )  const [virtual]

Return the sub-component (roll) with a given id in this chamber.

Reimplemented from GeomDet.

Definition at line 67 of file RPCChamber.cc.

References roll().

00067                                     {
00068   return roll(RPCDetId(id.rawId()));
00069 }

std::vector< const GeomDet * > RPCChamber::components (  )  const [virtual]

Return the rolls in the chamber.

Implements GeomDet.

Definition at line 60 of file RPCChamber.cc.

References theRolls.

00060                              {
00061   return  std::vector<const GeomDet*>(theRolls.begin(), theRolls.end());
00062 }

DetId RPCChamber::geographicalId (  )  const [virtual]

Return the DetId of this chamber.

Implements GeomDet.

Definition at line 32 of file RPCChamber.cc.

References theId.

Referenced by RPCGeometry::add().

00033 {
00034   return theId;
00035 }

RPCDetId RPCChamber::id ( void   )  const

Return the RPCChamberId of this chamber.

Definition at line 38 of file RPCChamber.cc.

References theId.

Referenced by RPCGeometryServTest::analyze(), RPCSynchronizer::getSimHitBx(), and operator==().

00039 {
00040   return theId;
00041 }

const int RPCChamber::nrolls (  )  const

Retunr numbers of rolls.

Definition at line 78 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryServTest::analyze().

00079 {
00080   return theRolls.size();
00081 }

bool RPCChamber::operator== ( const RPCChamber ch  )  const

equal if the id is the same

Definition at line 46 of file RPCChamber.cc.

References id().

00046                                                  {
00047   return this->id()==ch.id();
00048 }

const RPCRoll * RPCChamber::roll ( int  isl  )  const

Definition at line 92 of file RPCChamber.cc.

References i, and theRolls.

00093 {
00094   for (std::vector<const RPCRoll*>::const_iterator i = theRolls.begin();
00095        i!= theRolls.end(); ++i) {
00096     if ((*i)->id().roll()==isl) 
00097       return (*i);
00098   }
00099   return 0;
00100 }

const RPCRoll * RPCChamber::roll ( RPCDetId  id  )  const

Return the Roll corresponding to the given id.

Definition at line 84 of file RPCChamber.cc.

References theId.

Referenced by component().

00085 {
00086   if (id.chamberId()!=theId) return 0; // not in this Roll!
00087   return roll(id.roll());
00088 }

const std::vector< const RPCRoll * > & RPCChamber::rolls (  )  const

Return the Rolls.

Definition at line 73 of file RPCChamber.cc.

References theRolls.

Referenced by RPCEfficiency::analyze(), RPCGeometryServTest::analyze(), RPCEfficiencyFromTrack::analyze(), MuonSegmentEff::beginJob(), RPCEfficiency::beginRun(), RPCEventSummary::endLuminosityBlock(), RPCDeadChannelTest::endLuminosityBlock(), RPCEfficiencySecond::endRun(), RPCSynchronizer::getSimHitBx(), and MuonSimHitProducer::produce().

00074 {
00075   return theRolls;
00076 }

virtual SubDetector RPCChamber::subDetector (  )  const [inline, virtual]

Which subdetector.

Implements GeomDet.

Definition at line 35 of file RPCChamber.h.

References GeomDetEnumerators::RPCBarrel.


Member Data Documentation

RPCDetId RPCChamber::theId [private]

Definition at line 62 of file RPCChamber.h.

Referenced by geographicalId(), id(), and roll().

std::vector<const RPCRoll*> RPCChamber::theRolls [private]

Definition at line 65 of file RPCChamber.h.

Referenced by add(), components(), nrolls(), roll(), and rolls().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:54 2009 for CMSSW by  doxygen 1.5.4