CMS 3D CMS Logo

Public Member Functions | Private Attributes

DTSuperLayer Class Reference

#include <DTSuperLayer.h>

Inheritance diagram for DTSuperLayer:
GeomDet

List of all members.

Public Member Functions

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

Private Attributes

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

Detailed Description

Model of a superlayer in Muon Drift Tube chambers.

A superlayer is composed by 4 staggered DTLayer s.

$date : 13/01/2006 11:47:03 CET $

Revision:
1.6
Author:
Stefano Lacaprara - INFN Padova <stefano.lacaprara@pd.infn.it>

Definition at line 27 of file DTSuperLayer.h.


Constructor & Destructor Documentation

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

Definition at line 23 of file DTSuperLayer.cc.

References GeomDet::setDetId().

                                                :
  GeomDet(plane), theId(id) , theLayers(4,(const DTLayer*)0), theCh(ch) {
  setDetId(id);
}
DTSuperLayer::~DTSuperLayer ( ) [virtual]

Definition at line 31 of file DTSuperLayer.cc.

References theLayers.

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

Member Function Documentation

void DTSuperLayer::add ( DTLayer l)

Add layer to the SL which owns it.

Definition at line 61 of file DTSuperLayer.cc.

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

Referenced by DTGeometryBuilderFromCondDB::buildLayer(), and DTGeometryBuilderFromDDD::buildLayer().

                                 {
  // theLayers size is preallocated.
  theLayers[l->id().layer()-1] = l;
}
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 66 of file DTSuperLayer.cc.

References theCh.

Referenced by DTLayer::chamber(), and DTSegmentCand::operator DTChamberRecSegment2D *().

                                             {
  return theCh;
}
const GeomDet * DTSuperLayer::component ( DetId  id) const [virtual]

Return the layer with a given id in this SL.

Reimplemented from GeomDet.

Definition at line 52 of file DTSuperLayer.cc.

References DTLayerId, and layer().

                                                     {
  return layer(DTLayerId(id.rawId()));
}
std::vector< const GeomDet * > DTSuperLayer::components ( ) const [virtual]

Return the layers in the SL.

Implements GeomDet.

Definition at line 47 of file DTSuperLayer.cc.

References theLayers.

                                                          {
  return std::vector<const GeomDet*>(theLayers.begin(), theLayers.end());
}
DTSuperLayerId DTSuperLayer::id ( void  ) const
const DTLayer * DTSuperLayer::layer ( int  ilay) const

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

Definition at line 75 of file DTSuperLayer.cc.

References theLayers.

                                                {
  if ((ilay>=1) && (ilay<=4)) {
    return theLayers[ilay-1];
  } else {
    return 0;
  }
}
const DTLayer * DTSuperLayer::layer ( DTLayerId  id) const

Return the layer corresponding to the given id.

Definition at line 70 of file DTSuperLayer.cc.

References theId.

Referenced by component(), DTTMax::InfoLayer::InfoLayer(), DTMeantimerPatternReco::initHits(), DTTrigGeom::localPosition(), DTSegmentCand::operator DTSLRecSegment2D *(), and DTTrigGeom::tubePosInCh().

                                                     {
  if (id.superlayerId()!=theId) return 0; // not in this SL!
  return layer(id.layer());
}
const std::vector< const DTLayer * > & DTSuperLayer::layers ( ) const

Return the layers in the SL.

Definition at line 57 of file DTSuperLayer.cc.

References theLayers.

                                                             {
  return theLayers;
}
bool DTSuperLayer::operator== ( const DTSuperLayer sl) const

True if id are the same.

Definition at line 42 of file DTSuperLayer.cc.

References id().

                                                          {
  return id()==sl.id();
}
virtual SubDetector DTSuperLayer::subDetector ( ) const [inline, virtual]

Which subdetector.

Implements GeomDet.

Definition at line 44 of file DTSuperLayer.h.

References GeomDetEnumerators::DT.


Member Data Documentation

const DTChamber* DTSuperLayer::theCh [private]

Definition at line 77 of file DTSuperLayer.h.

Referenced by chamber().

Definition at line 74 of file DTSuperLayer.h.

Referenced by id(), and layer().

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

Definition at line 76 of file DTSuperLayer.h.

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