CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCChamber Class Reference

#include <CSCChamber.h>

Inheritance diagram for CSCChamber:
GeomDet

Public Member Functions

void addComponent (int n, const CSCLayer *gd)
 Add a layer. More...
 
const GeomDetcomponent (DetId id) const override
 Return the layer with a given id in this chamber. More...
 
std::vector< const GeomDet * > components () const override
 Return the layers in this chamber. More...
 
 CSCChamber (const BoundPlane::BoundPlanePointer &bp, CSCDetId id, const CSCChamberSpecs *specs)
 
CSCDetId id () const
 Get the (concrete) DetId. More...
 
const CSCLayerlayer (CSCDetId id) const
 Return the layer corresponding to the given id. More...
 
const CSCLayerlayer (int ilay) const
 
const std::vector< const CSCLayer * > & layers () const
 Return all layers. More...
 
const CSCChamberSpecsspecs () const
 
SubDetector subDetector () const override
 Which subdetector. More...
 
const GeomDetTypetype () const override
 
 ~CSCChamber () override
 
- 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 (Plane *plane)
 
 GeomDet (const ReferenceCountingPointer< 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 ~GeomDet ()
 

Private Attributes

const CSCChamberSpecstheChamberSpecs
 
std::vector< const CSCLayer * > theComponents
 

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

Describes the geometry of the second-level detector unit modelled by a C++ object in the endcap muon CSC system. A CSCChamber is composed of 6 CSCLayer's and is, of course, a Cathode Strip Chamber Chamber!

Author
Tim Cox

Definition at line 22 of file CSCChamber.h.

Constructor & Destructor Documentation

◆ CSCChamber()

CSCChamber::CSCChamber ( const BoundPlane::BoundPlanePointer bp,
CSCDetId  id,
const CSCChamberSpecs specs 
)
inline

Definition at line 24 of file CSCChamber.h.

References GeomDet::setDetId().

25  : GeomDet(bp), theChamberSpecs(specs), theComponents(6, (const CSCLayer*)nullptr) {
26  setDetId(id);
27  }
void setDetId(DetId id)
Definition: GeomDet.h:99
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64
const CSCChamberSpecs * theChamberSpecs
Definition: CSCChamber.h:63
GeomDet(Plane *plane)
Definition: GeomDet.h:31
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:39

◆ ~CSCChamber()

CSCChamber::~CSCChamber ( )
override

Definition at line 10 of file CSCChamber.cc.

References mps_fire::i, and theComponents.

10  {
11  // Delete all layers
12  for (std::vector<const CSCLayer*>::const_iterator i = theComponents.begin(); i != theComponents.end(); ++i) {
13  delete (*i);
14  }
15 }
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64

Member Function Documentation

◆ addComponent()

void CSCChamber::addComponent ( int  n,
const CSCLayer gd 
)

Add a layer.

Definition at line 23 of file CSCChamber.cc.

References dqmiodumpmetadata::n, and theComponents.

23  {
24  if ((n > 0) && (n < 7))
25  theComponents[n - 1] = gd;
26  else
27  edm::LogError("CSC") << "Each chamber has only SIX layers.";
28 }
Log< level::Error, false > LogError
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64

◆ component()

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

Return the layer with a given id in this chamber.

Reimplemented from GeomDet.

Definition at line 21 of file CSCChamber.cc.

References layer(), and nano_mu_digi_cff::rawId.

21 { return layer(CSCDetId(id.rawId())); }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30

◆ components()

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

Return the layers in this chamber.

Reimplemented from GeomDet.

Definition at line 17 of file CSCChamber.cc.

References theComponents.

17  {
18  return std::vector<const GeomDet*>(theComponents.begin(), theComponents.end());
19 }
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64

◆ id()

CSCDetId CSCChamber::id ( void  ) const
inline

◆ layer() [1/2]

const CSCLayer * CSCChamber::layer ( CSCDetId  id) const

Return the layer corresponding to the given id.

Definition at line 30 of file CSCChamber.cc.

References CSCDetId::chamberId(), id(), and CSCDetId::layer().

Referenced by CSCSegAlgoSK::areHitsCloseInGlobalPhi(), CSCSegAlgoTC::areHitsCloseInGlobalPhi(), CSCSegAlgoRU::areHitsCloseInGlobalPhi(), CSCSegAlgoRU::areHitsCloseInR(), CSCSegAlgoTC::buildSegments(), CSCSegAlgoDF::buildSegments(), CSCSegAlgoSK::buildSegments(), CSCSegAlgoRU::buildSegments(), CSCSectorReceiverLUT::calcGlobalPhiME(), component(), CSCCondSegFit::correctTheCovX(), CSCSegFit::derivativeMatrix(), CSCOfflineMonitor::doEfficiencies(), CSCSegAlgoSK::dumpHits(), CSCSegAlgoTC::dumpHits(), MuCSCTnPFlatTableProducer::fillTable(), CSCCondSegFit::fit(), CSCSegFit::fit2(), GEMCSCSegFit::fit2(), CSCSegFit::fitlsq(), GEMCSCSegFit::fitlsq(), OmtfAngleConverter::getGlobalEta(), AngleConverterBase::getGlobalEta(), CSCSectorReceiverLUT::getGlobalEtaValue(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), CSCSegAlgoShowering::isHitNearSegment(), CSCSegAlgoSK::isHitNearSegment(), CSCSegAlgoTC::isHitNearSegment(), CSCSegAlgoDF::isHitNearSegment(), CSCSegAlgoRU::isHitNearSegment(), CSCSegAlgoSK::phiAtZ(), CSCSegAlgoTC::phiAtZ(), CSCSegAlgoRU::phiAtZ(), CSCSegAlgoST::prune_bad_hits(), CSCSegAlgoShowering::pruneFromResidual(), CSCSegAlgoDF::pruneFromResidual(), CSCEfficiency::recHitSegment_Efficiencies(), CSCCathodeLCTProcessor::run(), CSCAnodeLCTProcessor::run(), CSCCondSegFit::setChi2(), CSCSegFit::setChi2(), CSCSegAlgoShowering::showerSeg(), CSCSegAlgoSK::tryAddingHitsToSegment(), and CSCSegAlgoTC::tryAddingHitsToSegment().

30  {
31  if (iid.chamberId() != id())
32  return nullptr; // not in this chamber
33  return layer(iid.layer());
34 }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:34

◆ layer() [2/2]

const CSCLayer * CSCChamber::layer ( int  ilay) const

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

Definition at line 36 of file CSCChamber.cc.

References theComponents.

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

36  {
37  if ((ilay > 0) && (ilay < 7))
38  return theComponents[ilay - 1];
39  else {
40  return nullptr;
41  }
42 }
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64

◆ layers()

const std::vector<const CSCLayer*>& CSCChamber::layers ( ) const
inline

Return all layers.

Definition at line 53 of file CSCChamber.h.

References theComponents.

53 { return theComponents; }
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64

◆ specs()

const CSCChamberSpecs* CSCChamber::specs ( ) const
inline

◆ subDetector()

SubDetector CSCChamber::subDetector ( ) const
inlineoverridevirtual

Which subdetector.

Reimplemented from GeomDet.

Definition at line 37 of file CSCChamber.h.

References GeomDetEnumerators::CSC.

◆ type()

const GeomDetType& CSCChamber::type ( ) const
inlineoverridevirtual

Reimplemented from GeomDet.

Definition at line 31 of file CSCChamber.h.

References specs().

Referenced by CSCLayer::type().

31 { return *(specs()); }
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:39

Member Data Documentation

◆ theChamberSpecs

const CSCChamberSpecs* CSCChamber::theChamberSpecs
private

Definition at line 63 of file CSCChamber.h.

Referenced by specs().

◆ theComponents

std::vector<const CSCLayer*> CSCChamber::theComponents
private

Definition at line 64 of file CSCChamber.h.

Referenced by addComponent(), components(), layer(), layers(), and ~CSCChamber().