CMS 3D CMS Logo

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

#include <DTSuperLayer.h>

Inheritance diagram for DTSuperLayer:
GeomDet

Public Member Functions

void add (DTLayer *l)
 Add layer to the SL which owns it. More...
 
const DTChamberchamber () const
 
const GeomDetcomponent (DetId id) const override
 Return the layer with a given id in this SL. More...
 
std::vector< const GeomDet * > components () const override
 Return the layers in the SL. More...
 
 DTSuperLayer (const DTSuperLayerId &id, ReferenceCountingPointer< BoundPlane > &plane, const DTChamber *ch=nullptr)
 
DTSuperLayerId id () const
 Return the DetId of this SL. More...
 
const DTLayerlayer (const DTLayerId &id) const
 Return the layer corresponding to the given id. More...
 
const DTLayerlayer (int ilay) const
 
const std::vector< const DTLayer * > & layers () const
 Return the layers in the SL. More...
 
bool operator== (const DTSuperLayer &sl) const
 True if id are the same. More...
 
SubDetector subDetector () const override
 Which subdetector. More...
 
 ~DTSuperLayer () override
 
- 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

const DTChambertheCh
 
DTSuperLayerId theId
 
std::vector< const DTLayer * > theLayers
 

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 superlayer in Muon Drift Tube chambers.

A superlayer is composed by 4 staggered DTLayer s.

Author
Stefano Lacaprara - INFN Padova stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t

Definition at line 24 of file DTSuperLayer.h.

Constructor & Destructor Documentation

◆ DTSuperLayer()

DTSuperLayer::DTSuperLayer ( const DTSuperLayerId id,
ReferenceCountingPointer< BoundPlane > &  plane,
const DTChamber ch = nullptr 
)

Definition at line 21 of file DTSuperLayer.cc.

22  : GeomDet(plane), theId(id), theLayers(4, (const DTLayer*)nullptr), theCh(ch) {
23  setDetId(id);
24 }

References GeomDet::setDetId().

◆ ~DTSuperLayer()

DTSuperLayer::~DTSuperLayer ( )
override

Definition at line 27 of file DTSuperLayer.cc.

27  {
28  for (std::vector<const DTLayer*>::const_iterator il = theLayers.begin(); il != theLayers.end(); ++il)
29  delete (*il);
30 }

References theLayers.

Member Function Documentation

◆ add()

void DTSuperLayer::add ( DTLayer l)

Add layer to the SL which owns it.

Definition at line 47 of file DTSuperLayer.cc.

47  {
48  // theLayers size is preallocated.
49  theLayers[l->id().layer() - 1] = l;
50 }

References cmsLHEtoEOSManager::l, and theLayers.

Referenced by cms::DTGeometryBuilder::buildLayer(), DTGeometryBuilderFromDDD::buildLayer(), DTGeometryBuilderFromCondDB::buildLayer(), and counter.Counter::register().

◆ chamber()

const DTChamber * DTSuperLayer::chamber ( ) const

Return the chamber this SL belongs to (0 if any, eg if a SL is built on his own)

Definition at line 52 of file DTSuperLayer.cc.

52 { return theCh; }

References theCh.

Referenced by DTLayer::chamber(), and geometryXMLparser.CSCAlignable::index().

◆ component()

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

Return the layer with a given id in this SL.

Reimplemented from GeomDet.

Definition at line 43 of file DTSuperLayer.cc.

43 { return layer(DTLayerId(id.rawId())); }

References layer().

◆ components()

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

Return the layers in the SL.

Reimplemented from GeomDet.

Definition at line 39 of file DTSuperLayer.cc.

39  {
40  return std::vector<const GeomDet*>(theLayers.begin(), theLayers.end());
41 }

References theLayers.

◆ id()

DTSuperLayerId DTSuperLayer::id ( void  ) const

◆ layer() [1/2]

const DTLayer * DTSuperLayer::layer ( const DTLayerId id) const

Return the layer corresponding to the given id.

Definition at line 54 of file DTSuperLayer.cc.

54  {
55  if (id.superlayerId() != theId)
56  return nullptr; // not in this SL!
57  return layer(id.layer());
58 }

References theId.

Referenced by HoughGrouping::associateHits(), component(), DTTrigGeom::getGeom(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DTTMax::InfoLayer::InfoLayer(), DTClusterer::initHits(), DTTrigGeom::localPosition(), HoughGrouping::obtainGeometricalBorders(), and DTTrigGeom::tubePosInCh().

◆ layer() [2/2]

const DTLayer * DTSuperLayer::layer ( int  ilay) const

Return the given layer. Layers are numbered 1-4.

Definition at line 60 of file DTSuperLayer.cc.

60  {
61  if ((ilay >= 1) && (ilay <= 4)) {
62  return theLayers[ilay - 1];
63  } else {
64  return nullptr;
65  }
66 }

References theLayers.

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

◆ layers()

const std::vector< const DTLayer * > & DTSuperLayer::layers ( ) const

Return the layers in the SL.

Definition at line 45 of file DTSuperLayer.cc.

45 { return theLayers; }

References theLayers.

◆ operator==()

bool DTSuperLayer::operator== ( const DTSuperLayer sl) const

True if id are the same.

Definition at line 36 of file DTSuperLayer.cc.

36 { return id() == sl.id(); }

References id().

◆ subDetector()

SubDetector DTSuperLayer::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 37 of file DTSuperLayer.h.

37 { return GeomDetEnumerators::DT; }

References GeomDetEnumerators::DT.

Member Data Documentation

◆ theCh

const DTChamber* DTSuperLayer::theCh
private

Definition at line 69 of file DTSuperLayer.h.

Referenced by chamber().

◆ theId

DTSuperLayerId DTSuperLayer::theId
private

Definition at line 66 of file DTSuperLayer.h.

Referenced by id(), and layer().

◆ theLayers

std::vector<const DTLayer*> DTSuperLayer::theLayers
private

Definition at line 68 of file DTSuperLayer.h.

Referenced by add(), components(), layer(), layers(), and ~DTSuperLayer().

GeomDet::setDetId
void setDetId(DetId id)
Definition: GeomDet.h:99
GeomDet::GeomDet
GeomDet(Plane *plane)
Definition: GeomDet.h:31
DTSuperLayer::id
DTSuperLayerId id() const
Return the DetId of this SL.
Definition: DTSuperLayer.cc:34
DTLayerId
Definition: DTLayerId.h:12
DTSuperLayer::theId
DTSuperLayerId theId
Definition: DTSuperLayer.h:66
GeomDetEnumerators::DT
Definition: GeomDetEnumerators.h:18
DTLayer
Definition: DTLayer.h:25
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
DTSuperLayer::theCh
const DTChamber * theCh
Definition: DTSuperLayer.h:69
DTSuperLayer::layer
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54
DTSuperLayer::theLayers
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:68