CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/Alignment/TrackerAlignment/interface/TIDNameSpace.h

Go to the documentation of this file.
00001 #ifndef Alignment_CommonAlignment_TIDNameSpace_H
00002 #define Alignment_CommonAlignment_TIDNameSpace_H
00003 
00015 #include "CondFormats/Alignment/interface/Definitions.h"
00016 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00017 
00018 namespace align
00019 {
00020   namespace tid
00021   {
00023     inline unsigned int moduleNumber( align::ID );
00024 
00026     inline unsigned int sideNumber( align::ID );
00027 
00029     inline unsigned int ringNumber( align::ID );
00030 
00032     inline unsigned int diskNumber( align::ID );
00033 
00035     inline unsigned int endcapNumber( align::ID );
00036   }
00037 }
00038 
00039 unsigned int align::tid::moduleNumber(align::ID id)
00040 {
00041   return TIDDetId(id).module()[1];
00042 }
00043 
00044 unsigned int align::tid::sideNumber(align::ID id)
00045 {
00046   return TIDDetId(id).module()[0];
00047 }
00048 
00049 unsigned int align::tid::ringNumber(align::ID id)
00050 {
00051   return TIDDetId(id).ring();
00052 }
00053 
00054 unsigned int align::tid::diskNumber(align::ID id)
00055 {
00056   return TIDDetId(id).wheel();
00057 }
00058 
00059 unsigned int align::tid::endcapNumber(align::ID id)
00060 {
00061   return TIDDetId(id).side();
00062 }
00063 
00064 #endif