CMS 3D CMS Logo

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...
 
const GeomDetcomponent (DetId id) const override
 Return the sub-component (roll) with a given id in this chamber. More...
 
std::vector< const GeomDet * > components () const override
 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 (int isl) const
 
const RPCRollroll (RPCDetId id) const
 Return the Roll corresponding to the given id. More...
 
const std::vector< const RPCRoll * > & rolls () const
 Return the Rolls. More...
 
 RPCChamber (RPCDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
 Constructor. More...
 
SubDetector subDetector () const override
 Which subdetector. More...
 
 ~RPCChamber () override
 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 (const ReferenceCountingPointer< Plane > &plane)
 
 GeomDet (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
virtual bool setAlignmentPositionError (const AlignmentPositionError &ape)
 
void setDetId (DetId id)
 

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::RPCChamber ( RPCDetId  id,
const ReferenceCountingPointer< BoundPlane > &  plane 
)

Constructor.

Definition at line 19 of file RPCChamber.cc.

19  : GeomDet(plane), theId(id) {
20  setDetId(id);
21 }

References GeomDet::setDetId().

◆ ~RPCChamber()

RPCChamber::~RPCChamber ( )
override

Destructor.

Definition at line 24 of file RPCChamber.cc.

24 {}

Member Function Documentation

◆ add()

void RPCChamber::add ( RPCRoll rl)

Add Roll to the chamber which takes ownership.

Definition at line 32 of file RPCChamber.cc.

32 { theRolls.emplace_back(rl); }

References theRolls.

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

◆ component()

const GeomDet * RPCChamber::component ( DetId  id) const
overridevirtual

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

Reimplemented from GeomDet.

Definition at line 38 of file RPCChamber.cc.

38 { return roll(RPCDetId(id.rawId())); }

References roll().

◆ components()

std::vector< const GeomDet * > RPCChamber::components ( ) const
overridevirtual

Return the rolls in the chamber.

Reimplemented from GeomDet.

Definition at line 34 of file RPCChamber.cc.

34  {
35  return std::vector<const GeomDet*>(theRolls.begin(), theRolls.end());
36 }

References theRolls.

◆ id()

RPCDetId RPCChamber::id ( void  ) const

Return the RPCChamberId of this chamber.

Definition at line 26 of file RPCChamber.cc.

26 { return theId; }

References theId.

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

◆ nrolls()

int RPCChamber::nrolls ( ) const

Retunr numbers of rolls.

Definition at line 42 of file RPCChamber.cc.

42 { return theRolls.size(); }

References theRolls.

Referenced by RPCGeometryServTest::analyze().

◆ operator==()

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

equal if the id is the same

Definition at line 30 of file RPCChamber.cc.

30 { return this->id() == ch.id(); }

References id().

◆ roll() [1/2]

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

Definition at line 50 of file RPCChamber.cc.

50  {
51  for (auto theRoll : theRolls) {
52  if (theRoll->id().roll() == isl)
53  return theRoll;
54  }
55  return nullptr;
56 }

References theRolls.

◆ roll() [2/2]

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

Return the Roll corresponding to the given id.

Definition at line 44 of file RPCChamber.cc.

44  {
45  if (id.chamberId() != theId)
46  return nullptr; // not in this Roll!
47  return roll(id.roll());
48 }

References theId.

Referenced by component().

◆ rolls()

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

Return the Rolls.

Definition at line 40 of file RPCChamber.cc.

40 { return theRolls; }

References theRolls.

Referenced by RPCGeometryServTest::analyze(), RPCMonitorDigi::bookHistograms(), and RPCDqmClient::getRPCdetId().

◆ subDetector()

SubDetector RPCChamber::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 30 of file RPCChamber.h.

References GeomDetEnumerators::RPCBarrel.

Member Data Documentation

◆ theId

RPCDetId RPCChamber::theId
private

Definition at line 56 of file RPCChamber.h.

Referenced by id(), and roll().

◆ theRolls

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

Definition at line 59 of file RPCChamber.h.

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

GeomDet::setDetId
void setDetId(DetId id)
Definition: GeomDet.h:99
GeomDet::GeomDet
GeomDet(Plane *plane)
Definition: GeomDet.h:31
RPCDetId
Definition: RPCDetId.h:16
RPCChamber::id
RPCDetId id() const
Return the RPCChamberId of this chamber.
Definition: RPCChamber.cc:26
RPCChamber::theRolls
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:59
RPCChamber::theId
RPCDetId theId
Definition: RPCChamber.h:56
RPCChamber::roll
const RPCRoll * roll(RPCDetId id) const
Return the Roll corresponding to the given id.
Definition: RPCChamber.cc:44
GeomDetEnumerators::RPCBarrel
Definition: GeomDetEnumerators.h:19