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 (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...
 
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 (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 19 of file RPCChamber.cc.

References GeomDet::setDetId().

19  : GeomDet(plane), theId(id) {
20  setDetId(id);
21 }
void setDetId(DetId id)
Definition: GeomDet.h:99
RPCDetId theId
Definition: RPCChamber.h:56
GeomDet(Plane *plane)
Definition: GeomDet.h:31
RPCChamber::~RPCChamber ( )
override

Destructor.

Definition at line 24 of file RPCChamber.cc.

24 {}

Member Function Documentation

void RPCChamber::add ( RPCRoll rl)

Add Roll to the chamber which takes ownership.

Definition at line 32 of file RPCChamber.cc.

References theRolls.

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

32 { theRolls.emplace_back(rl); }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:59
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.

References roll().

Referenced by subDetector().

38 { return roll(RPCDetId(id.rawId())); }
const RPCRoll * roll(RPCDetId id) const
Return the Roll corresponding to the given id.
Definition: RPCChamber.cc:44
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.

References theRolls.

Referenced by subDetector().

34  {
35  return std::vector<const GeomDet*>(theRolls.begin(), theRolls.end());
36 }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:59
RPCDetId RPCChamber::id ( void  ) const

Return the RPCChamberId of this chamber.

Definition at line 26 of file RPCChamber.cc.

References theId.

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

26 { return theId; }
RPCDetId theId
Definition: RPCChamber.h:56
int RPCChamber::nrolls ( ) const

Retunr numbers of rolls.

Definition at line 42 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryServTest::analyze(), and subDetector().

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

equal if the id is the same

Definition at line 30 of file RPCChamber.cc.

References id().

Referenced by subDetector().

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

Return the Roll corresponding to the given id.

Definition at line 44 of file RPCChamber.cc.

References theId.

Referenced by component(), and subDetector().

44  {
45  if (id.chamberId() != theId)
46  return nullptr; // not in this Roll!
47  return roll(id.roll());
48 }
const RPCRoll * roll(RPCDetId id) const
Return the Roll corresponding to the given id.
Definition: RPCChamber.cc:44
RPCDetId theId
Definition: RPCChamber.h:56
const RPCRoll * RPCChamber::roll ( int  isl) const

Definition at line 50 of file RPCChamber.cc.

References theRolls.

50  {
51  for (auto theRoll : theRolls) {
52  if (theRoll->id().roll() == isl)
53  return theRoll;
54  }
55  return nullptr;
56 }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:59
const std::vector< const RPCRoll * > & RPCChamber::rolls ( ) const

Return the Rolls.

Definition at line 40 of file RPCChamber.cc.

References theRolls.

Referenced by RPCGeometryServTest::analyze(), RPCMonitorDigi::bookHistograms(), RPCRecHitValid::bookHistograms(), RPCDqmClient::getRPCdetId(), MuonSimHitProducer::produce(), and subDetector().

40 { return theRolls; }
std::vector< const RPCRoll * > theRolls
Definition: RPCChamber.h:59
SubDetector RPCChamber::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 30 of file RPCChamber.h.

References add(), component(), components(), nrolls(), operator==(), roll(), rolls(), and GeomDetEnumerators::RPCBarrel.

Member Data Documentation

RPCDetId RPCChamber::theId
private

Definition at line 56 of file RPCChamber.h.

Referenced by id(), and roll().

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

Definition at line 59 of file RPCChamber.h.

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