CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
virtual const GeomDetcomponent (DetId id) const
 Return the layer with a given id in this SL. More...
 
virtual std::vector< const
GeomDet * > 
components () const
 Return the layers in the SL. More...
 
 DTSuperLayer (DTSuperLayerId id, ReferenceCountingPointer< BoundPlane > &plane, const DTChamber *ch=0)
 
DTSuperLayerId id () const
 Return the DetId of this SL. More...
 
const DTLayerlayer (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...
 
virtual SubDetector subDetector () const
 Which subdetector. More...
 
virtual ~DTSuperLayer ()
 
- Public Member Functions inherited from GeomDet
AlignmentPositionErroralignmentPositionError () const
 Return pointer to alignment errors. More...
 
DetId geographicalId () const
 The label of this GeomDet. More...
 
 GeomDet (Plane *plane)
 
 GeomDet (const ReferenceCountingPointer< Plane > &plane)
 
int index () const
 
LocalError const & localAlignmentError () const
 Return local alligment error. 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 setIndex (int i)
 
const PlanespecificSurface () const
 Same as surface(), kept for backward compatibility. More...
 
const Planesurface () const
 The nominal surface of the GeomDet. More...
 
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 ~GeomDet ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from GeomDet
typedef
GeomDetEnumerators::SubDetector 
SubDetector
 
- Protected Member Functions inherited from GeomDet
void setDetId (DetId id)
 

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

25  :
26  GeomDet(plane), theId(id) , theLayers(4,(const DTLayer*)0), theCh(ch) {
27  setDetId(id);
28 }
void setDetId(DetId id)
Definition: GeomDet.h:97
DTSuperLayerId theId
Definition: DTSuperLayer.h:74
const DTChamber * theCh
Definition: DTSuperLayer.h:77
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:76
GeomDet(Plane *plane)
Definition: GeomDet.cc:5
DTSuperLayer::~DTSuperLayer ( )
virtual

Definition at line 31 of file DTSuperLayer.cc.

References theLayers.

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

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 DTGeometryBuilderFromDDD::buildLayer(), and DTGeometryBuilderFromCondDB::buildLayer().

61  {
62  // theLayers size is preallocated.
63  theLayers[l->id().layer()-1] = l;
64 }
DTLayerId id() const
Return the DetId of this SL.
Definition: DTLayer.cc:48
int layer() const
Return the layer number.
Definition: DTLayerId.h:55
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:76
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 geometryXMLparser.CSCAlignable::index().

66  {
67  return theCh;
68 }
const DTChamber * theCh
Definition: DTSuperLayer.h:77
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().

52  {
53  return layer(DTLayerId(id.rawId()));
54 }
const DTLayer * layer(DTLayerId id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:70
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.

47  {
48  return std::vector<const GeomDet*>(theLayers.begin(), theLayers.end());
49 }
std::vector< const DTLayer * > theLayers
Definition: DTSuperLayer.h:76
DTSuperLayerId DTSuperLayer::id ( void  ) const
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(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DTTMax::InfoLayer::InfoLayer(), DTClusterer::initHits(), DTTrigGeom::localPosition(), and DTTrigGeom::tubePosInCh().

70  {
71  if (id.superlayerId()!=theId) return 0; // not in this SL!
72  return layer(id.layer());
73 }
DTSuperLayerId theId
Definition: DTSuperLayer.h:74
const DTLayer * layer(DTLayerId id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:70
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.

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

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

Return the layers in the SL.

Definition at line 57 of file DTSuperLayer.cc.

References theLayers.

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

True if id are the same.

Definition at line 42 of file DTSuperLayer.cc.

References id().

42  {
43  return id()==sl.id();
44 }
DTSuperLayerId id() const
Return the DetId of this SL.
Definition: DTSuperLayer.cc:38
virtual SubDetector DTSuperLayer::subDetector ( ) const
inlinevirtual

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

DTSuperLayerId DTSuperLayer::theId
private

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