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
RPCChamber Class Reference

#include <RPCChamber.h>

Inheritance diagram for RPCChamber:
GeomDet

Public Member Functions

void add (RPCRoll *rl)
 Add Roll to the chamber which takes ownership. More...
 
virtual const GeomDetcomponent (DetId id) const
 Return the sub-component (roll) with a given id in this chamber. More...
 
virtual std::vector< const
GeomDet * > 
components () const
 Return the rolls in the chamber. More...
 
RPCDetId id () const
 Return the RPCChamberId of this chamber. More...
 
int nrolls () const
 Retunr numbers of rolls. More...
 
bool operator== (const RPCChamber &ch) const
 equal if the id is the same More...
 
const RPCRollroll (RPCDetId id) const
 Return the Roll corresponding to the given id. More...
 
const RPCRollroll (int isl) const
 
const std::vector< const
RPCRoll * > & 
rolls () const
 Return the Rolls. More...
 
 RPCChamber (RPCDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
 Constructor. More...
 
virtual SubDetector subDetector () const
 Which subdetector. More...
 
virtual ~RPCChamber ()
 Destructor. More...
 
- Public Member Functions inherited from GeomDet
AlignmentPositionError const * alignmentPositionError () const
 Return pointer to alignment errors. More...
 
int gdetIndex () const
 
DetId geographicalId () const
 The label of this GeomDet. More...
 
 GeomDet (Plane *plane)
 
 GeomDet (const ReferenceCountingPointer< Plane > &plane)
 
int index () const
 
virtual bool isLeaf () const
 is a Unit More...
 
const Surface::PositionTypeposition () const
 The position (origin of the R.F.) More...
 
const Surface::RotationTyperotation () const
 The rotation defining the local R.F. More...
 
void setGdetIndex (int i)
 
void setIndex (int i)
 
const PlanespecificSurface () const
 Same as surface(), kept for backward compatibility. More...
 
const Planesurface () const
 The nominal surface of the GeomDet. More...
 
virtual const SurfaceDeformationsurfaceDeformation () const
 
GlobalPoint toGlobal (const Local2DPoint &lp) const
 Conversion to the global R.F. from the R.F. of the GeomDet. More...
 
GlobalPoint toGlobal (const Local3DPoint &lp) const
 Conversion to the global R.F. from the R.F. of the GeomDet. More...
 
GlobalVector toGlobal (const LocalVector &lv) const
 Conversion to the global R.F. from the R.F. of the GeomDet. More...
 
LocalPoint toLocal (const GlobalPoint &gp) const
 Conversion to the R.F. of the GeomDet. More...
 
LocalVector toLocal (const GlobalVector &gv) const
 Conversion to the R.F. of the GeomDet. More...
 
virtual const Topologytopology () const
 
virtual const GeomDetTypetype () const
 
virtual ~GeomDet ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from GeomDet
using SubDetector = GeomDetEnumerators::SubDetector
 
- Protected Member Functions inherited from GeomDet
void setDetId (DetId id)
 
- Protected Attributes inherited from GeomDet
AlignmentPositionErrortheAlignmentPositionError = 0
 

Detailed Description

Model of a RPC chamber.

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

Author
R. Trentadue

Definition at line 19 of file RPCChamber.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 20 of file RPCChamber.cc.

References GeomDet::setDetId().

21  :
22  GeomDet(plane), theId(id)
23 {
24  setDetId(id);
25 }
void setDetId(DetId id)
Definition: GeomDet.h:120
RPCDetId theId
Definition: RPCChamber.h:57
GeomDet(Plane *plane)
Definition: GeomDet.h:34
RPCChamber::~RPCChamber ( )
virtual

Destructor.

Definition at line 28 of file RPCChamber.cc.

28  {
29 }

Member Function Documentation

void RPCChamber::add ( RPCRoll rl)

Add Roll to the chamber which takes ownership.

Definition at line 48 of file RPCChamber.cc.

References theRolls.

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

48  {
49  theRolls.push_back(rl);
50 }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:60
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 62 of file RPCChamber.cc.

References roll(), and RPCDetId.

62  {
63  return roll(RPCDetId(id.rawId()));
64 }
const RPCRoll * roll(RPCDetId id) const
Return the Roll corresponding to the given id.
Definition: RPCChamber.cc:80
std::vector< const GeomDet * > RPCChamber::components ( ) const
virtual

Return the rolls in the chamber.

Reimplemented from GeomDet.

Definition at line 55 of file RPCChamber.cc.

References theRolls.

55  {
56  return std::vector<const GeomDet*>(theRolls.begin(), theRolls.end());
57 }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:60
RPCDetId RPCChamber::id ( void  ) const

Return the RPCChamberId of this chamber.

Definition at line 33 of file RPCChamber.cc.

References theId.

Referenced by RPCSeedPattern::checkSegment(), and operator==().

34 {
35  return theId;
36 }
RPCDetId theId
Definition: RPCChamber.h:57
int RPCChamber::nrolls ( ) const

Retunr numbers of rolls.

Definition at line 74 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryServTest::analyze().

75 {
76  return theRolls.size();
77 }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:60
bool RPCChamber::operator== ( const RPCChamber ch) const

equal if the id is the same

Definition at line 41 of file RPCChamber.cc.

References id().

41  {
42  return this->id()==ch.id();
43 }
RPCDetId id() const
Return the RPCChamberId of this chamber.
Definition: RPCChamber.cc:33
const RPCRoll * RPCChamber::roll ( RPCDetId  id) const

Return the Roll corresponding to the given id.

Definition at line 80 of file RPCChamber.cc.

References theId.

Referenced by component().

81 {
82  if (id.chamberId()!=theId) return 0; // not in this Roll!
83  return roll(id.roll());
84 }
const RPCRoll * roll(RPCDetId id) const
Return the Roll corresponding to the given id.
Definition: RPCChamber.cc:80
RPCDetId theId
Definition: RPCChamber.h:57
const RPCRoll * RPCChamber::roll ( int  isl) const

Definition at line 88 of file RPCChamber.cc.

References i, and theRolls.

89 {
90  for (std::vector<const RPCRoll*>::const_iterator i = theRolls.begin();
91  i!= theRolls.end(); ++i) {
92  if ((*i)->id().roll()==isl)
93  return (*i);
94  }
95  return 0;
96 }
int i
Definition: DBlmapReader.cc:9
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:60
const std::vector< const RPCRoll * > & RPCChamber::rolls ( ) const
virtual SubDetector RPCChamber::subDetector ( ) const
inlinevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 30 of file RPCChamber.h.

References GeomDetEnumerators::RPCBarrel.

Member Data Documentation

RPCDetId RPCChamber::theId
private

Definition at line 57 of file RPCChamber.h.

Referenced by id(), and roll().

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

Definition at line 60 of file RPCChamber.h.

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