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 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.

{}

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().

{

  int layerNumber = 0;

  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());

  if ( subdetId == StripSubdetector::TIB) 
        { 
           
          layerNumber = tTopo->tibLayer(detId.rawId());
        }
  else if ( subdetId ==  StripSubdetector::TOB )
        { 
           
          layerNumber = tTopo->tobLayer(detId.rawId());
        }
  else if ( subdetId ==  StripSubdetector::TID) 
        { 
          
          layerNumber = tTopo->tidWheel(detId.rawId());
        }
  else if ( subdetId ==  StripSubdetector::TEC )
        { 
           
          layerNumber = tTopo->tecWheel(detId.rawId()); 
        }
  else if ( subdetId ==  PixelSubdetector::PixelBarrel ) 
        { 
           
          layerNumber = tTopo->pxbLayer(detId.rawId());  
        }
  else if ( subdetId ==  PixelSubdetector::PixelEndcap ) 
        { 
           
          layerNumber = tTopo->pxfDisk(detId.rawId());  
        }
  else
        edm::LogWarning("LogicError") << "Unknown subdetid: " <<  subdetId;


  return std::make_pair( subdetId, layerNumber );

}