00001 #ifndef Alignment_CommonAlignment_TECNameSpace_H 00002 #define Alignment_CommonAlignment_TECNameSpace_H 00003 00015 #include "CondFormats/Alignment/interface/Definitions.h" 00016 #include "DataFormats/SiStripDetId/interface/TECDetId.h" 00017 00018 namespace align 00019 { 00020 namespace tec 00021 { 00023 inline unsigned int moduleNumber( align::ID ); 00024 00026 inline unsigned int ringNumber( align::ID ); 00027 00029 inline unsigned int petalNumber( align::ID ); 00030 00032 inline unsigned int sideNumber( align::ID ); 00033 00035 inline unsigned int diskNumber( align::ID ); 00036 00038 inline unsigned int endcapNumber( align::ID ); 00039 } 00040 } 00041 00042 unsigned int align::tec::moduleNumber(align::ID id) 00043 { 00044 return TECDetId(id).module(); 00045 } 00046 00047 unsigned int align::tec::ringNumber(align::ID id) 00048 { 00049 return TECDetId(id).ring(); 00050 } 00051 00052 unsigned int align::tec::petalNumber(align::ID id) 00053 { 00054 return TECDetId(id).petal()[1]; 00055 } 00056 00057 unsigned int align::tec::sideNumber(align::ID id) 00058 { 00059 return TECDetId(id).petal()[0]; 00060 } 00061 00062 unsigned int align::tec::diskNumber(align::ID id) 00063 { 00064 return TECDetId(id).wheel(); 00065 } 00066 00067 unsigned int align::tec::endcapNumber(align::ID id) 00068 { 00069 return TECDetId(id).side(); 00070 } 00071 00072 #endif