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
DTChamber Class Reference

#include <DTChamber.h>

Inheritance diagram for DTChamber:
GeomDet

Public Member Functions

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

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

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

21  :
22  GeomDet(plane),
23  theId(id) {
24  setDetId(id);
25 }
void setDetId(DetId id)
Definition: GeomDet.h:97
DTChamberId theId
Definition: DTChamber.h:68
GeomDet(Plane *plane)
Definition: GeomDet.cc:5
DTChamber::~DTChamber ( )
virtual

Destructor.

Definition at line 28 of file DTChamber.cc.

References theSLs.

28  {
29  for (std::vector<const DTSuperLayer*>::const_iterator isl=theSLs.begin();
30  isl!=theSLs.end(); ++isl) delete (*isl);
31 }
std::vector< const DTSuperLayer * > theSLs
Definition: DTChamber.h:71

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

43  {
44  theSLs.push_back(sl);
45 }
std::vector< const DTSuperLayer * > theSLs
Definition: DTChamber.h:71
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().

52  {
53  DTLayerId lId(id.rawId());
54  if (lId.layer()==0) { // is a SL id
55  return superLayer(lId);
56  } else { // is a layer id
57  return layer(lId);
58  }
59 }
const DTLayer * layer(DTLayerId id) const
Return the layer corresponding to the given id.
Definition: DTChamber.cc:82
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:67
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.

47  {
48  return std::vector<const GeomDet*>(theSLs.begin(), theSLs.end());
49 }
std::vector< const DTSuperLayer * > theSLs
Definition: DTChamber.h:71
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(), component(), geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

82  {
83  return (superLayer(id.superlayer()))->layer(id.layer());
84 }
const DTLayer * layer(DTLayerId id) const
Return the layer corresponding to the given id.
Definition: DTChamber.cc:82
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:67
bool DTChamber::operator== ( const DTChamber ch) const

equal if the id is the same

Definition at line 39 of file DTChamber.cc.

References id().

39  {
40  return id()==ch.id();
41 }
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:35
virtual SubDetector DTChamber::subDetector ( ) const
inlinevirtual

Which subdetector.

Implements GeomDet.

Definition at line 39 of file DTChamber.h.

References GeomDetEnumerators::DT.

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

Return the superlayer corresponding to the given id.

Definition at line 67 of file DTChamber.cc.

References theId.

Referenced by DTVDriftCalibration::analyze(), DTResolutionAnalysisTask::analyze(), component(), DTTrigGeomUtils::DTTrigGeomUtils(), DTSegmentUpdator::fit(), DTTrigGeom::getGeom(), layer(), DTTrigGeom::localPosition(), DTMeantimerPatternReco4D::reconstruct(), DTCombinatorialPatternReco4D::reconstruct(), DTRefitAndCombineReco4D::reconstruct(), and DTTrigGeom::tubePosInCh().

67  {
68  if (id.chamberId()!=theId) return 0; // not in this SL!
69  return superLayer(id.superLayer());
70 }
DTChamberId theId
Definition: DTChamber.h:68
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:67
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.

73  {
74  for (std::vector<const DTSuperLayer*>::const_iterator i = theSLs.begin();
75  i!= theSLs.end(); ++i) {
76  if ((*i)->id().superLayer()==isl) return (*i);
77  }
78  return 0;
79 }
int i
Definition: DBlmapReader.cc:9
std::vector< const DTSuperLayer * > theSLs
Definition: DTChamber.h:71
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().

62  {
63  return theSLs;
64 }
std::vector< const DTSuperLayer * > theSLs
Definition: DTChamber.h:71

Member Data Documentation

DTChamberId DTChamber::theId
private

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