CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 

Detailed Description

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

Revision:
1.10
Date:
2007/06/11 07:20:29

(last update by

Author:
flucke

)

Definition at line 21 of file TrackerAlignableId.h.

Constructor & Destructor Documentation

TrackerAlignableId::TrackerAlignableId ( )
inline

Definition at line 26 of file TrackerAlignableId.h.

26 {}

Member Function Documentation

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(), PXBDetId::layer(), TOBDetId::layer(), TIBDetId::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().

22 {
23 
24  int layerNumber = 0;
25 
26  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
27 
28  if ( subdetId == StripSubdetector::TIB)
29  {
30  TIBDetId tibid(detId.rawId());
31  layerNumber = tibid.layer();
32  }
33  else if ( subdetId == StripSubdetector::TOB )
34  {
35  TOBDetId tobid(detId.rawId());
36  layerNumber = tobid.layer();
37  }
38  else if ( subdetId == StripSubdetector::TID)
39  {
40  TIDDetId tidid(detId.rawId());
41  layerNumber = tidid.wheel();
42  }
43  else if ( subdetId == StripSubdetector::TEC )
44  {
45  TECDetId tecid(detId.rawId());
46  layerNumber = tecid.wheel();
47  }
48  else if ( subdetId == PixelSubdetector::PixelBarrel )
49  {
50  PXBDetId pxbid(detId.rawId());
51  layerNumber = pxbid.layer();
52  }
53  else if ( subdetId == PixelSubdetector::PixelEndcap )
54  {
55  PXFDetId pxfid(detId.rawId());
56  layerNumber = pxfid.disk();
57  }
58  else
59  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
60 
61 
62  return std::make_pair( subdetId, layerNumber );
63 
64 }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int layerNumber(align::ID)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:85
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50