CMS 3D CMS Logo

Public Member Functions

TrackerAlignableId Class Reference

#include <TrackerAlignableId.h>

List of all members.

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.11
Date:
2007/10/08 13:49:05

(last update by

Author:
cklae

)

Definition at line 21 of file TrackerAlignableId.h.


Constructor & Destructor Documentation

TrackerAlignableId::TrackerAlignableId ( ) [inline]

Definition at line 26 of file TrackerAlignableId.h.

{}

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(), 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 );

}