CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCChamber Class Reference

#include <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.
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 (RPCDetId id) const
 Return the Roll corresponding to the given id.
const RPCRollroll (int isl) const
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:
2010/04/09 12:17:26
Revision:
1.3
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.

References GeomDet::setDetId().

                                                                           :
  GeomDet(plane), theId(id)
{
setDetId(id);
}
RPCChamber::~RPCChamber ( ) [virtual]

Destructor.

Definition at line 30 of file RPCChamber.cc.

                        {
}

Member Function Documentation

void RPCChamber::add ( RPCRoll rl)

Add Roll to the chamber which takes ownership.

Definition at line 50 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryBuilderFromCondDB::build(), and RPCGeometryBuilderFromDDD::buildGeometry().

                           {
  theRolls.push_back(rl);
}
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 64 of file RPCChamber.cc.

References roll(), and RPCDetId.

                                    {
  return roll(RPCDetId(id.rawId()));
}
std::vector< const GeomDet * > RPCChamber::components ( ) const [virtual]

Return the rolls in the chamber.

Implements GeomDet.

Definition at line 57 of file RPCChamber.cc.

References theRolls.

                             {
  return  std::vector<const GeomDet*>(theRolls.begin(), theRolls.end());
}
RPCDetId RPCChamber::id ( void  ) const

Return the RPCChamberId of this chamber.

Definition at line 35 of file RPCChamber.cc.

References theId.

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

{
  return theId;
}
const int RPCChamber::nrolls ( ) const

Retunr numbers of rolls.

Definition at line 75 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryServTest::analyze().

{
  return theRolls.size();
}
bool RPCChamber::operator== ( const RPCChamber ch) const

equal if the id is the same

Definition at line 43 of file RPCChamber.cc.

References id().

                                                 {
  return this->id()==ch.id();
}
const RPCRoll * RPCChamber::roll ( int  isl) const

Definition at line 89 of file RPCChamber.cc.

References i, and theRolls.

{
  for (std::vector<const RPCRoll*>::const_iterator i = theRolls.begin();
       i!= theRolls.end(); ++i) {
    if ((*i)->id().roll()==isl) 
      return (*i);
  }
  return 0;
}
const RPCRoll * RPCChamber::roll ( RPCDetId  id) const

Return the Roll corresponding to the given id.

Definition at line 81 of file RPCChamber.cc.

References theId.

Referenced by component().

{
  if (id.chamberId()!=theId) return 0; // not in this Roll!
  return roll(id.roll());
}
const std::vector< const RPCRoll * > & RPCChamber::rolls ( ) const
virtual SubDetector RPCChamber::subDetector ( ) const [inline, virtual]

Which subdetector.

Implements GeomDet.

Definition at line 32 of file RPCChamber.h.

References GeomDetEnumerators::RPCBarrel.


Member Data Documentation

Definition at line 59 of file RPCChamber.h.

Referenced by id(), and roll().

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

Definition at line 62 of file RPCChamber.h.

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