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=0)
 
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
void setDetId (DetId id)
 
- Protected Attributes inherited from GeomDet
AlignmentPositionErrortheAlignmentPositionError = 0
 

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 25 of file DTSuperLayer.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file DTSuperLayer.cc.

References GeomDet::setDetId().

23  :
24  GeomDet(plane), theId(id) , theLayers(4,(const DTLayer*)nullptr), theCh(ch) {
25  setDetId(id);
26 }
void setDetId(DetId id)
Definition: GeomDet.h:120
DTSuperLayerId theId
Definition: DTSuperLayer.h:72
const DTChamber * theCh
Definition: DTSuperLayer.h:75
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:74
GeomDet(Plane *plane)
Definition: GeomDet.h:34
DTSuperLayer::~DTSuperLayer ( )
override

Definition at line 29 of file DTSuperLayer.cc.

References theLayers.

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

Member Function Documentation

void DTSuperLayer::add ( DTLayer l)

Add layer to the SL which owns it.

Definition at line 59 of file DTSuperLayer.cc.

References DTLayer::id(), checklumidiff::l, DTLayerId::layer(), and theLayers.

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

59  {
60  // theLayers size is preallocated.
61  theLayers[l->id().layer()-1] = l;
62 }
DTLayerId id() const
Return the DetId of this SL.
Definition: DTLayer.cc:46
int layer() const
Return the layer number.
Definition: DTLayerId.h:53
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:74
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 64 of file DTSuperLayer.cc.

References theCh.

Referenced by DTLayer::chamber(), geometryXMLparser.CSCAlignable::index(), DTSegmentCand::operator DTChamberRecSegment2D *(), and subDetector().

64  {
65  return theCh;
66 }
const DTChamber * theCh
Definition: DTSuperLayer.h:75
const GeomDet * DTSuperLayer::component ( DetId  id) const
overridevirtual

Return the layer with a given id in this SL.

Reimplemented from GeomDet.

Definition at line 50 of file DTSuperLayer.cc.

References layer().

Referenced by subDetector().

50  {
51  return layer(DTLayerId(id.rawId()));
52 }
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:68
std::vector< const GeomDet * > DTSuperLayer::components ( ) const
overridevirtual

Return the layers in the SL.

Reimplemented from GeomDet.

Definition at line 45 of file DTSuperLayer.cc.

References theLayers.

Referenced by subDetector().

45  {
46  return std::vector<const GeomDet*>(theLayers.begin(), theLayers.end());
47 }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:74
DTSuperLayerId DTSuperLayer::id ( void  ) const
const DTLayer * DTSuperLayer::layer ( const DTLayerId id) const

Return the layer corresponding to the given id.

Definition at line 68 of file DTSuperLayer.cc.

References theId.

Referenced by component(), DTTrigGeom::getGeom(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DTTMax::InfoLayer::InfoLayer(), DTClusterer::initHits(), DTTrigGeom::localPosition(), DTSegmentCand::operator DTSLRecSegment2D *(), subDetector(), and DTTrigGeom::tubePosInCh().

68  {
69  if (id.superlayerId()!=theId) return nullptr; // not in this SL!
70  return layer(id.layer());
71 }
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:68
DTSuperLayerId theId
Definition: DTSuperLayer.h:72
const DTLayer * DTSuperLayer::layer ( int  ilay) const

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

Definition at line 73 of file DTSuperLayer.cc.

References theLayers.

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

73  {
74  if ((ilay>=1) && (ilay<=4)) {
75  return theLayers[ilay-1];
76  } else {
77  return nullptr;
78  }
79 }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:74
const std::vector< const DTLayer * > & DTSuperLayer::layers ( ) const

Return the layers in the SL.

Definition at line 55 of file DTSuperLayer.cc.

References theLayers.

Referenced by subDetector().

55  {
56  return theLayers;
57 }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:74
bool DTSuperLayer::operator== ( const DTSuperLayer sl) const

True if id are the same.

Definition at line 40 of file DTSuperLayer.cc.

References id().

Referenced by subDetector().

40  {
41  return id()==sl.id();
42 }
DTSuperLayerId id() const
Return the DetId of this SL.
Definition: DTSuperLayer.cc:36
SubDetector DTSuperLayer::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 42 of file DTSuperLayer.h.

References add(), chamber(), component(), components(), GeomDetEnumerators::DT, checklumidiff::l, layer(), layers(), and operator==().

Member Data Documentation

const DTChamber* DTSuperLayer::theCh
private

Definition at line 75 of file DTSuperLayer.h.

Referenced by chamber().

DTSuperLayerId DTSuperLayer::theId
private

Definition at line 72 of file DTSuperLayer.h.

Referenced by id(), and layer().

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

Definition at line 74 of file DTSuperLayer.h.

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