CMS 3D CMS Logo

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...
 
const GeomDetcomponent (DetId id) const override
 Return the sub-component (SL or layer) with a given id in this chamber. More...
 
std::vector< const GeomDet * > components () const override
 Return the superlayers in the chamber. More...
 
 DTChamber (const DTChamberId &id, const ReferenceCountingPointer< BoundPlane > &plane)
 Constructor. More...
 
DTChamberId id () const
 Return the DTChamberId of this chamber. More...
 
const DTLayerlayer (const 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...
 
SubDetector subDetector () const override
 Which subdetector. More...
 
const DTSuperLayersuperLayer (const 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...
 
 ~DTChamber () override
 Destructor. More...
 
- 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 (const ReferenceCountingPointer< Plane > &plane)
 
 GeomDet (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

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

Additional Inherited Members

- Public Types inherited from GeomDet
using SubDetector = GeomDetEnumerators::SubDetector
 
- Protected Member Functions inherited from GeomDet
virtual bool setAlignmentPositionError (const AlignmentPositionError &ape)
 
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.

Author
S. Lacaprara, N. Amapane

Definition at line 24 of file DTChamber.h.

Constructor & Destructor Documentation

◆ DTChamber()

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

Constructor.

Definition at line 19 of file DTChamber.cc.

20  : GeomDet(plane), theId(id) {
21  setDetId(id);
22 }

References GeomDet::setDetId().

◆ ~DTChamber()

DTChamber::~DTChamber ( )
override

Destructor.

Definition at line 25 of file DTChamber.cc.

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

References theSLs.

Member Function Documentation

◆ add()

void DTChamber::add ( DTSuperLayer sl)

Add SL to the chamber which takes ownership.

Definition at line 36 of file DTChamber.cc.

36 { theSLs.emplace_back(sl); }

References theSLs.

Referenced by counter.Counter::register().

◆ component()

const GeomDet * DTChamber::component ( DetId  id) const
overridevirtual

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

Reimplemented from GeomDet.

Definition at line 42 of file DTChamber.cc.

42  {
43  DTLayerId lId(id.rawId());
44  if (lId.layer() == 0) { // is a SL id
45  return superLayer(lId);
46  } else { // is a layer id
47  return layer(lId);
48  }
49 }

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

◆ components()

std::vector< const GeomDet * > DTChamber::components ( ) const
overridevirtual

Return the superlayers in the chamber.

Reimplemented from GeomDet.

Definition at line 38 of file DTChamber.cc.

38  {
39  return std::vector<const GeomDet*>(theSLs.begin(), theSLs.end());
40 }

References theSLs.

◆ id()

DTChamberId DTChamber::id ( void  ) const

◆ layer()

const DTLayer * DTChamber::layer ( const DTLayerId id) const

Return the layer corresponding to the given id.

Definition at line 67 of file DTChamber.cc.

67 { return (superLayer(id.superlayer()))->layer(id.layer()); }

References superLayer().

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

◆ operator==()

bool DTChamber::operator== ( const DTChamber ch) const

equal if the id is the same

Definition at line 34 of file DTChamber.cc.

34 { return id() == ch.id(); }

References id().

◆ subDetector()

SubDetector DTChamber::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 36 of file DTChamber.h.

36 { return GeomDetEnumerators::DT; }

References GeomDetEnumerators::DT.

◆ superLayer() [1/2]

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

Return the superlayer corresponding to the given id.

Definition at line 53 of file DTChamber.cc.

53  {
54  if (id.chamberId() != theId)
55  return nullptr; // not in this SL!
56  return superLayer(id.superLayer());
57 }

References theId.

Referenced by HoughGrouping::associateHits(), component(), DTTrigGeomUtils::DTTrigGeomUtils(), DTTrigGeom::getGeom(), layer(), DTTrigGeom::localPosition(), HoughGrouping::obtainGeometricalBorders(), DTRefitAndCombineReco4D::reconstruct(), DTCombinatorialPatternReco4D::reconstruct(), DTMeantimerPatternReco4D::reconstruct(), and DTTrigGeom::tubePosInCh().

◆ superLayer() [2/2]

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

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

Definition at line 59 of file DTChamber.cc.

59  {
60  for (auto theSL : theSLs) {
61  if (theSL->id().superLayer() == isl)
62  return theSL;
63  }
64  return nullptr;
65 }

References theSLs.

◆ superLayers()

const std::vector< const DTSuperLayer * > & DTChamber::superLayers ( ) const

Return the superlayers in the chamber.

Definition at line 51 of file DTChamber.cc.

51 { return theSLs; }

References theSLs.

Referenced by DTnoiseDBValidation::bookHisto(), and DTNoiseTask::bookHistos().

Member Data Documentation

◆ theId

DTChamberId DTChamber::theId
private

Definition at line 64 of file DTChamber.h.

Referenced by id(), and superLayer().

◆ theSLs

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

Definition at line 67 of file DTChamber.h.

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

DTChamber::id
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:32
GeomDet::setDetId
void setDetId(DetId id)
Definition: GeomDet.h:99
DTChamber::layer
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTChamber.cc:67
GeomDet::GeomDet
GeomDet(Plane *plane)
Definition: GeomDet.h:31
DTChamber::theId
DTChamberId theId
Definition: DTChamber.h:64
DTLayerId
Definition: DTLayerId.h:12
GeomDetEnumerators::DT
Definition: GeomDetEnumerators.h:18
DTChamber::theSLs
std::vector< const DTSuperLayer * > theSLs
Definition: DTChamber.h:67
DTChamber::superLayer
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:53