CMS 3D CMS Logo

List of all members | Public Member Functions
TrackerAlignableId Class Reference

#include <TrackerAlignableId.h>

Public Member Functions

 TrackerAlignableId ()
 
std::pair< int, int > typeAndLayerFromDetId (const DetId &detId, const TrackerTopology *tTopo) const
 

Detailed Description

Helper class to provide unique numerical ID's for Alignables. The unique ID is formed from:

Revision
1.11
Date
2007/10/08 13:49:05

(last update by

Author
cklae

)

Definition at line 22 of file TrackerAlignableId.h.

Constructor & Destructor Documentation

◆ TrackerAlignableId()

TrackerAlignableId::TrackerAlignableId ( )
inline

Definition at line 24 of file TrackerAlignableId.h.

24 {}

Member Function Documentation

◆ typeAndLayerFromDetId()

std::pair< int, int > TrackerAlignableId::typeAndLayerFromDetId ( const DetId detId,
const TrackerTopology tTopo 
) 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 17 of file TrackerAlignableId.cc.

17  {
18  int layerNumber = 0;
19 
20  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
21 
22  if (subdetId == StripSubdetector::TIB) {
23  layerNumber = tTopo->tibLayer(detId.rawId());
24  } else if (subdetId == StripSubdetector::TOB) {
25  layerNumber = tTopo->tobLayer(detId.rawId());
26  } else if (subdetId == StripSubdetector::TID) {
27  layerNumber = tTopo->tidWheel(detId.rawId());
28  } else if (subdetId == StripSubdetector::TEC) {
29  layerNumber = tTopo->tecWheel(detId.rawId());
30  } else if (subdetId == PixelSubdetector::PixelBarrel) {
31  layerNumber = tTopo->pxbLayer(detId.rawId());
32  } else if (subdetId == PixelSubdetector::PixelEndcap) {
33  layerNumber = tTopo->pxfDisk(detId.rawId());
34  } else
35  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
36 
37  return std::make_pair(subdetId, layerNumber);
38 }

References PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), DetId::rawId(), DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidWheel(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

Referenced by TrackerOfflineValidation::bookHists(), AlignmentParameterSelector::layerDeselected(), OverlapValidation::layerFromId(), and AlignmentParameterStore::typeAndLayer().

PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150