CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/Alignment/TrackerAlignment/interface/TOBNameSpace.h

Go to the documentation of this file.
00001 #ifndef Alignment_CommonAlignment_TOBNameSpace_H
00002 #define Alignment_CommonAlignment_TOBNameSpace_H
00003 
00015 #include "CondFormats/Alignment/interface/Definitions.h"
00016 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00017 
00018 namespace align
00019 {
00020   namespace tob
00021   {
00023     inline unsigned int moduleNumber( align::ID );
00024 
00026     inline unsigned int rodNumber( align::ID );
00027 
00029     inline unsigned int layerNumber( align::ID );
00030 
00032     inline unsigned int halfBarrelNumber( align::ID );
00033   }
00034 }
00035 
00036 unsigned int align::tob::moduleNumber(align::ID id)
00037 {
00038   return TOBDetId(id).module();
00039 }
00040 
00041 unsigned int align::tob::rodNumber(align::ID id)
00042 {
00043   return TOBDetId(id).rod()[1];
00044 }
00045 
00046 unsigned int align::tob::layerNumber(align::ID id)
00047 {
00048   return TOBDetId(id).layer();
00049 }
00050 
00051 unsigned int align::tob::halfBarrelNumber(align::ID id)
00052 {
00053   return TOBDetId(id).rod()[0];
00054 }
00055 
00056 #endif