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 TrackerTopology *tTopo) const
 

Detailed Description

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

Revision:
1.12
Date:
2013/01/07 19:44:30

(last update by

Author:
wmtan

)

Definition at line 22 of file TrackerAlignableId.h.

Constructor & Destructor Documentation

TrackerAlignableId::TrackerAlignableId ( )
inline

Definition at line 27 of file TrackerAlignableId.h.

27 {}

Member Function Documentation

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 19 of file TrackerAlignableId.cc.

References align::tib::layerNumber(), 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(), KalmanAlignmentUserVariables::KalmanAlignmentUserVariables(), AlignmentParameterSelector::layerDeselected(), and AlignmentParameterStore::typeAndLayer().

20 {
21 
22  int layerNumber = 0;
23 
24  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
25 
26  if ( subdetId == StripSubdetector::TIB)
27  {
28 
29  layerNumber = tTopo->tibLayer(detId.rawId());
30  }
31  else if ( subdetId == StripSubdetector::TOB )
32  {
33 
34  layerNumber = tTopo->tobLayer(detId.rawId());
35  }
36  else if ( subdetId == StripSubdetector::TID)
37  {
38 
39  layerNumber = tTopo->tidWheel(detId.rawId());
40  }
41  else if ( subdetId == StripSubdetector::TEC )
42  {
43 
44  layerNumber = tTopo->tecWheel(detId.rawId());
45  }
46  else if ( subdetId == PixelSubdetector::PixelBarrel )
47  {
48 
49  layerNumber = tTopo->pxbLayer(detId.rawId());
50  }
51  else if ( subdetId == PixelSubdetector::PixelEndcap )
52  {
53 
54  layerNumber = tTopo->pxfDisk(detId.rawId());
55  }
56  else
57  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
58 
59 
60  return std::make_pair( subdetId, layerNumber );
61 
62 }
unsigned int tibLayer(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
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 pxbLayer(const DetId &id) const
unsigned int layerNumber(align::ID, const TrackerTopology *)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:86
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const