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

#include <GEMSuperChamber.h>

Inheritance diagram for GEMSuperChamber:
GeomDet

Public Member Functions

void add (GEMChamber *ch)
 Add chamber to the super chamber which takes ownership. More...
 
const GEMChamberchamber (GEMDetId id) const
 Return the chamber corresponding to the given id. More...
 
const GEMChamberchamber (int layer) const
 
const std::vector< const
GEMChamber * > & 
chambers () const
 Return the chambers in the super chamber. More...
 
virtual const GeomDetcomponent (DetId id) const
 Return the sub-component (chamber) with a given id in this super chamber. More...
 
virtual std::vector< const
GeomDet * > 
components () const
 Return the chambers in the super chamber. More...
 
 GEMSuperChamber (GEMDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
 constructor More...
 
GEMDetId id () const
 Return the GEMDetId of this super chamber. More...
 
const std::vector< GEMDetId > & ids () const
 Return the vector of GEMDetIds in this super chamber. More...
 
int nChambers () const
 Return numbers of chambers. More...
 
bool operator== (const GEMSuperChamber &sch) const
 equal if the id is the same More...
 
virtual SubDetector subDetector () const
 Which subdetector. More...
 
 ~GEMSuperChamber ()
 destructor More...
 
- Public Member Functions inherited from GeomDet
AlignmentPositionError const * alignmentPositionError () const
 Return pointer to alignment errors. More...
 
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 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

std::vector< const GEMChamber * > chambers_
 
GEMDetId detId_
 

Additional Inherited Members

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

Detailed Description

Model of a GEM super chamber.

The super chamber is composed of 2 chambers. It's detId is the same as ch1 detId

Author
S. Dildick

Definition at line 19 of file GEMSuperChamber.h.

Constructor & Destructor Documentation

GEMSuperChamber::GEMSuperChamber ( GEMDetId  id,
const ReferenceCountingPointer< BoundPlane > &  plane 
)

constructor

Definition at line 4 of file GEMSuperChamber.cc.

References GeomDet::setDetId().

4  :
5  GeomDet(plane), detId_(id)
6 {
7  setDetId(id);
8 }
void setDetId(DetId id)
Definition: GeomDet.h:114
GeomDet(Plane *plane)
Definition: GeomDet.cc:5
GEMSuperChamber::~GEMSuperChamber ( )

destructor

Definition at line 10 of file GEMSuperChamber.cc.

10 {}

Member Function Documentation

void GEMSuperChamber::add ( GEMChamber ch)

Add chamber to the super chamber which takes ownership.

Definition at line 20 of file GEMSuperChamber.cc.

References chambers_.

Referenced by GEMGeometryBuilderFromDDD::buildGeometry(), and counter.Counter::register().

20  {
21  chambers_.push_back(ch);
22 }
std::vector< const GEMChamber * > chambers_
const GEMChamber * GEMSuperChamber::chamber ( GEMDetId  id) const

Return the chamber corresponding to the given id.

Definition at line 40 of file GEMSuperChamber.cc.

References GEMDetId::chamber(), and detId_.

Referenced by component(), and geometryXMLparser.CSCAlignable::index().

40  {
41  if (id.chamber()!=detId_.chamber()) return 0; // not in this super chamber!
42  return chamber(id.layer());
43 }
const GEMChamber * chamber(GEMDetId id) const
Return the chamber corresponding to the given id.
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: GEMDetId.h:74
const GEMChamber * GEMSuperChamber::chamber ( int  layer) const

Definition at line 45 of file GEMSuperChamber.cc.

References chambers_.

Referenced by geometryXMLparser.CSCAlignable::index().

45  {
46  for (auto ch : chambers_){
47  if (ch->id().layer()==isl)
48  return ch;
49  }
50  return 0;
51 }
std::vector< const GEMChamber * > chambers_
const std::vector< const GEMChamber * > & GEMSuperChamber::chambers ( ) const

Return the chambers in the super chamber.

Definition at line 32 of file GEMSuperChamber.cc.

References chambers_.

32  {
33  return chambers_;
34 }
std::vector< const GEMChamber * > chambers_
const GeomDet * GEMSuperChamber::component ( DetId  id) const
virtual

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

Reimplemented from GeomDet.

Definition at line 28 of file GEMSuperChamber.cc.

References chamber().

28  {
29  return chamber(GEMDetId(id.rawId()));
30 }
const GEMChamber * chamber(GEMDetId id) const
Return the chamber corresponding to the given id.
std::vector< const GeomDet * > GEMSuperChamber::components ( ) const
virtual

Return the chambers in the super chamber.

Reimplemented from GeomDet.

Definition at line 24 of file GEMSuperChamber.cc.

References chambers_.

24  {
25  return std::vector<const GeomDet*>(chambers_.begin(), chambers_.end());
26 }
std::vector< const GEMChamber * > chambers_
GEMDetId GEMSuperChamber::id ( void  ) const

Return the GEMDetId of this super chamber.

Definition at line 12 of file GEMSuperChamber.cc.

References detId_.

Referenced by operator==().

12  {
13  return detId_;
14 }
const std::vector<GEMDetId>& GEMSuperChamber::ids ( ) const

Return the vector of GEMDetIds in this super chamber.

int GEMSuperChamber::nChambers ( ) const

Return numbers of chambers.

Definition at line 36 of file GEMSuperChamber.cc.

References chambers_.

36  {
37  return chambers_.size();
38 }
std::vector< const GEMChamber * > chambers_
bool GEMSuperChamber::operator== ( const GEMSuperChamber sch) const

equal if the id is the same

Definition at line 16 of file GEMSuperChamber.cc.

References id().

16  {
17  return this->id()==sch.id();
18 }
GEMDetId id() const
Return the GEMDetId of this super chamber.
virtual SubDetector GEMSuperChamber::subDetector ( ) const
inlinevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 35 of file GEMSuperChamber.h.

References GeomDetEnumerators::GEM.

Member Data Documentation

std::vector<const GEMChamber*> GEMSuperChamber::chambers_
private

Definition at line 65 of file GEMSuperChamber.h.

Referenced by add(), chamber(), chambers(), components(), and nChambers().

GEMDetId GEMSuperChamber::detId_
private

Definition at line 62 of file GEMSuperChamber.h.

Referenced by chamber(), and id().