#include <TrackerAlignableId.h>
Public Member Functions | |
TrackerAlignableId () | |
std::pair< int, int > | typeAndLayerFromDetId (const DetId &detId) const |
Helper class to provide unique numerical ID's for Alignables. The unique ID is formed from:
(last update by
)
Definition at line 21 of file TrackerAlignableId.h.
TrackerAlignableId::TrackerAlignableId | ( | ) | [inline] |
Definition at line 26 of file TrackerAlignableId.h.
{}
std::pair< int, int > TrackerAlignableId::typeAndLayerFromDetId | ( | const DetId & | detId | ) | const |
Return type and layer of DetId Keep this for now. Concept of a "layer" in Alignment is obsolete. Will be replaced by a more generic function.
Definition at line 21 of file TrackerAlignableId.cc.
References PXFDetId::disk(), TIBDetId::layer(), TOBDetId::layer(), PXBDetId::layer(), align::tib::layerNumber(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, TIDDetId::wheel(), and TECDetId::wheel().
Referenced by TrackerOfflineValidation::bookHists(), KalmanAlignmentUserVariables::KalmanAlignmentUserVariables(), AlignmentParameterSelector::layerDeselected(), TrackHitFilter::produce(), and AlignmentParameterStore::typeAndLayer().
{ int layerNumber = 0; unsigned int subdetId = static_cast<unsigned int>(detId.subdetId()); if ( subdetId == StripSubdetector::TIB) { TIBDetId tibid(detId.rawId()); layerNumber = tibid.layer(); } else if ( subdetId == StripSubdetector::TOB ) { TOBDetId tobid(detId.rawId()); layerNumber = tobid.layer(); } else if ( subdetId == StripSubdetector::TID) { TIDDetId tidid(detId.rawId()); layerNumber = tidid.wheel(); } else if ( subdetId == StripSubdetector::TEC ) { TECDetId tecid(detId.rawId()); layerNumber = tecid.wheel(); } else if ( subdetId == PixelSubdetector::PixelBarrel ) { PXBDetId pxbid(detId.rawId()); layerNumber = pxbid.layer(); } else if ( subdetId == PixelSubdetector::PixelEndcap ) { PXFDetId pxfid(detId.rawId()); layerNumber = pxfid.disk(); } else edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId; return std::make_pair( subdetId, layerNumber ); }