CMS 3D CMS Logo

Public Member Functions | Private Attributes

DTChamber Class Reference

#include <DTChamber.h>

Inheritance diagram for DTChamber:
GeomDet

List of all members.

Public Member Functions

void add (DTSuperLayer *sl)
 Add SL to the chamber which takes ownership.
virtual const GeomDetcomponent (DetId id) const
 Return the sub-component (SL or layer) with a given id in this chamber.
virtual std::vector< const
GeomDet * > 
components () const
 Return the superlayers in the chamber.
 DTChamber (DTChamberId id, const ReferenceCountingPointer< BoundPlane > &plane)
 Constructor.
DTChamberId id () const
 Return the DTChamberId of this chamber.
const DTLayerlayer (DTLayerId id) const
 Return the layer corresponding to the given id.
bool operator== (const DTChamber &ch) const
 equal if the id is the same
virtual SubDetector subDetector () const
 Which subdetector.
const DTSuperLayersuperLayer (int isl) const
const DTSuperLayersuperLayer (DTSuperLayerId id) const
 Return the superlayer corresponding to the given id.
const std::vector< const
DTSuperLayer * > & 
superLayers () const
 Return the superlayers in the chamber.
virtual ~DTChamber ()
 Destructor.

Private Attributes

DTChamberId theId
std::vector< const DTSuperLayer * > theSLs

Detailed Description

Model of a Muon Drift Tube chamber.

A chamber is a GeomDet; the associated reconstructed objects are 4D segments built in the chamber local reference frame. The chamber is composed by 2 or three DTSuperLayer, which in turn are composed by four DTLayer each.

Date:
2010/04/09 12:17:26
Revision:
1.7
Author:
S. Lacaprara, N. Amapane

Definition at line 26 of file DTChamber.h.


Constructor & Destructor Documentation

DTChamber::DTChamber ( DTChamberId  id,
const ReferenceCountingPointer< BoundPlane > &  plane 
)

Constructor.

Definition at line 21 of file DTChamber.cc.

References GeomDet::setDetId().

                                                                                      :
  GeomDet(plane), 
  theId(id) {
  setDetId(id);
}
DTChamber::~DTChamber ( ) [virtual]

Destructor.

Definition at line 28 of file DTChamber.cc.

References theSLs.

                      {
  for (std::vector<const DTSuperLayer*>::const_iterator isl=theSLs.begin();
       isl!=theSLs.end(); ++isl) delete (*isl);
}

Member Function Documentation

void DTChamber::add ( DTSuperLayer sl)

Add SL to the chamber which takes ownership.

Definition at line 43 of file DTChamber.cc.

References theSLs.

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

                                    {
  theSLs.push_back(sl);
}
const GeomDet * DTChamber::component ( DetId  id) const [virtual]

Return the sub-component (SL or layer) with a given id in this chamber.

Reimplemented from GeomDet.

Definition at line 52 of file DTChamber.cc.

References DTLayerId::layer(), layer(), and superLayer().

                                                  {
  DTLayerId lId(id.rawId());
  if (lId.layer()==0) { // is a SL id
    return superLayer(lId);
  } else { // is a layer id
    return layer(lId);
  }
}
std::vector< const GeomDet * > DTChamber::components ( ) const [virtual]

Return the superlayers in the chamber.

Implements GeomDet.

Definition at line 47 of file DTChamber.cc.

References theSLs.

                                                      {
  return  std::vector<const GeomDet*>(theSLs.begin(), theSLs.end());
}
DTChamberId DTChamber::id ( void  ) const
const DTLayer * DTChamber::layer ( DTLayerId  id) const

Return the layer corresponding to the given id.

Definition at line 82 of file DTChamber.cc.

References superLayer().

Referenced by DTEfficiencyTask::analyze(), and component().

                                                  {
  return (superLayer(id.superlayer()))->layer(id.layer());
}
bool DTChamber::operator== ( const DTChamber ch) const

equal if the id is the same

Definition at line 39 of file DTChamber.cc.

References id().

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

Which subdetector.

Implements GeomDet.

Definition at line 39 of file DTChamber.h.

References GeomDetEnumerators::DT.

const DTSuperLayer * DTChamber::superLayer ( DTSuperLayerId  id) const
const DTSuperLayer * DTChamber::superLayer ( int  isl) const

Return the given superlayer. Superlayers are numbered 1 (phi), 2 (Z), 3 (phi)

Definition at line 73 of file DTChamber.cc.

References i, and theSLs.

                                                       {
  for (std::vector<const DTSuperLayer*>::const_iterator i = theSLs.begin();
       i!= theSLs.end(); ++i) {
    if ((*i)->id().superLayer()==isl) return (*i);
  }
  return 0;
}
const std::vector< const DTSuperLayer * > & DTChamber::superLayers ( ) const

Return the superlayers in the chamber.

Definition at line 62 of file DTChamber.cc.

References theSLs.

Referenced by DTEfficiencyTask::analyze(), DTnoiseDBValidation::bookHisto(), DTNoiseTask::bookHistos(), and MuonSimHitProducer::produce().

                                                                   {
  return theSLs;
}

Member Data Documentation

Definition at line 68 of file DTChamber.h.

Referenced by id(), and superLayer().

std::vector<const DTSuperLayer*> DTChamber::theSLs [private]

Definition at line 71 of file DTChamber.h.

Referenced by add(), components(), superLayer(), superLayers(), and ~DTChamber().