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 (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

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.

References GeomDet::setDetId().

22  : GeomDet(plane), theId(id), theLayers(4, (const DTLayer*)nullptr), theCh(ch) {
23  setDetId(id);
24 }
void setDetId(DetId id)
Definition: GeomDet.h:99
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:68
DTSuperLayerId theId
Definition: DTSuperLayer.h:66
const DTChamber * theCh
Definition: DTSuperLayer.h:69
GeomDet(Plane *plane)
Definition: GeomDet.h:31

◆ ~DTSuperLayer()

DTSuperLayer::~DTSuperLayer ( )
override

Definition at line 27 of file DTSuperLayer.cc.

References theLayers.

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

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.

References MainPageGenerator::l, and theLayers.

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

47  {
48  // theLayers size is preallocated.
49  theLayers[l->id().layer() - 1] = l;
50 }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:68

◆ 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.

References theCh.

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

52 { return theCh; }
const DTChamber * theCh
Definition: DTSuperLayer.h:69

◆ 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.

References layer(), and nano_mu_digi_cff::rawId.

43 { return layer(DTLayerId(id.rawId())); }
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54

◆ 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.

References theLayers.

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

◆ 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.

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().

54  {
55  if (id.superlayerId() != theId)
56  return nullptr; // not in this SL!
57  return layer(id.layer());
58 }
DTSuperLayerId theId
Definition: DTSuperLayer.h:66
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54

◆ 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.

References theLayers.

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

60  {
61  if ((ilay >= 1) && (ilay <= 4)) {
62  return theLayers[ilay - 1];
63  } else {
64  return nullptr;
65  }
66 }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:68

◆ layers()

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

Return the layers in the SL.

Definition at line 45 of file DTSuperLayer.cc.

References theLayers.

45 { return theLayers; }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:68

◆ operator==()

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

True if id are the same.

Definition at line 36 of file DTSuperLayer.cc.

References id().

36 { return id() == sl.id(); }
DTSuperLayerId id() const
Return the DetId of this SL.
Definition: DTSuperLayer.cc:34

◆ subDetector()

SubDetector DTSuperLayer::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 37 of file DTSuperLayer.h.

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().