CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ME0Layer Class Reference

#include <ME0Layer.h>

Inheritance diagram for ME0Layer:
GeomDet

Public Member Functions

void add (const ME0EtaPartition *roll)
 Add EtaPartition to the layer which takes ownership. More...
 
const GeomDetcomponent (DetId id) const override
 Return the sub-component (roll) with a given id in this layer. More...
 
std::vector< const GeomDet * > components () const override
 Return the rolls in the layer. More...
 
const ME0EtaPartitionetaPartition (ME0DetId id) const
 Return the eta partition corresponding to the given id. More...
 
const ME0EtaPartitionetaPartition (int isl) const
 
const std::vector< const ME0EtaPartition * > & etaPartitions () const
 Return the eta partitions. More...
 
ME0DetId id () const
 Return the ME0DetId of this layer. More...
 
 ME0Layer (ME0DetId id, const ReferenceCountingPointer< BoundPlane > &plane)
 Constructor. More...
 
int nEtaPartitions () const
 Retunr numbers of eta partitions. More...
 
bool operator== (const ME0Layer &ch) const
 equal if the id is the same More...
 
SubDetector subDetector () const override
 Which subdetector. More...
 
 ~ME0Layer () 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

ME0DetId detId_
 
std::vector< const ME0EtaPartition * > etaPartitions_
 

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

Definition at line 9 of file ME0Layer.h.

Constructor & Destructor Documentation

ME0Layer::ME0Layer ( ME0DetId  id,
const ReferenceCountingPointer< BoundPlane > &  plane 
)

Constructor.

Definition at line 5 of file ME0Layer.cc.

References GeomDet::setDetId().

5  : GeomDet(plane), detId_(id) {
6  setDetId(id);
7 }
void setDetId(DetId id)
Definition: GeomDet.h:99
ME0DetId detId_
Definition: ME0Layer.h:47
GeomDet(Plane *plane)
Definition: GeomDet.h:31
ME0Layer::~ME0Layer ( )
override

Destructor.

Definition at line 9 of file ME0Layer.cc.

9 {}

Member Function Documentation

void ME0Layer::add ( const ME0EtaPartition roll)

Add EtaPartition to the layer which takes ownership.

Definition at line 15 of file ME0Layer.cc.

References etaPartitions_.

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

15 { etaPartitions_.emplace_back(rl); }
std::vector< const ME0EtaPartition * > etaPartitions_
Definition: ME0Layer.h:50
const GeomDet * ME0Layer::component ( DetId  id) const
overridevirtual

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

Reimplemented from GeomDet.

Definition at line 21 of file ME0Layer.cc.

References etaPartition().

Referenced by subDetector().

21 { return etaPartition(ME0DetId(id.rawId())); }
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return the eta partition corresponding to the given id.
Definition: ME0Layer.cc:27
std::vector< const GeomDet * > ME0Layer::components ( ) const
overridevirtual

Return the rolls in the layer.

Reimplemented from GeomDet.

Definition at line 17 of file ME0Layer.cc.

References etaPartitions_.

Referenced by subDetector().

17  {
18  return std::vector<const GeomDet*>(etaPartitions_.begin(), etaPartitions_.end());
19 }
std::vector< const ME0EtaPartition * > etaPartitions_
Definition: ME0Layer.h:50
const ME0EtaPartition * ME0Layer::etaPartition ( ME0DetId  id) const

Return the eta partition corresponding to the given id.

Definition at line 27 of file ME0Layer.cc.

References detId_.

Referenced by component(), ME0TriggerPseudoBuilder::segmentConversion(), and subDetector().

27  {
28  if (id.layerId() != detId_)
29  return nullptr; // not in this eta partition!
30  return etaPartition(id.roll());
31 }
ME0DetId detId_
Definition: ME0Layer.h:47
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return the eta partition corresponding to the given id.
Definition: ME0Layer.cc:27
const ME0EtaPartition * ME0Layer::etaPartition ( int  isl) const

Definition at line 33 of file ME0Layer.cc.

References etaPartitions_.

33  {
34  for (auto roll : etaPartitions_) {
35  if (roll->id().roll() == isl)
36  return roll;
37  }
38  return nullptr;
39 }
std::vector< const ME0EtaPartition * > etaPartitions_
Definition: ME0Layer.h:50
const std::vector< const ME0EtaPartition * > & ME0Layer::etaPartitions ( ) const

Return the eta partitions.

Definition at line 23 of file ME0Layer.cc.

References etaPartitions_.

Referenced by subDetector().

23 { return etaPartitions_; }
std::vector< const ME0EtaPartition * > etaPartitions_
Definition: ME0Layer.h:50
ME0DetId ME0Layer::id ( void  ) const

Return the ME0DetId of this layer.

Definition at line 11 of file ME0Layer.cc.

References detId_.

Referenced by ME0Chamber::layer(), and operator==().

11 { return detId_; }
ME0DetId detId_
Definition: ME0Layer.h:47
int ME0Layer::nEtaPartitions ( ) const

Retunr numbers of eta partitions.

Definition at line 25 of file ME0Layer.cc.

References etaPartitions_.

Referenced by ME0TriggerPseudoBuilder::segmentConversion(), and subDetector().

25 { return etaPartitions_.size(); }
std::vector< const ME0EtaPartition * > etaPartitions_
Definition: ME0Layer.h:50
bool ME0Layer::operator== ( const ME0Layer ch) const

equal if the id is the same

Definition at line 13 of file ME0Layer.cc.

References id().

Referenced by subDetector().

13 { return this->id() == ch.id(); }
ME0DetId id() const
Return the ME0DetId of this layer.
Definition: ME0Layer.cc:11
SubDetector ME0Layer::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 21 of file ME0Layer.h.

References add(), component(), components(), etaPartition(), etaPartitions(), GeomDetEnumerators::ME0, nEtaPartitions(), and operator==().

Member Data Documentation

ME0DetId ME0Layer::detId_
private

Definition at line 47 of file ME0Layer.h.

Referenced by etaPartition(), and id().

std::vector<const ME0EtaPartition*> ME0Layer::etaPartitions_
private

Definition at line 50 of file ME0Layer.h.

Referenced by add(), components(), etaPartition(), etaPartitions(), and nEtaPartitions().