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/TrackerCommon/interface/TrackerTopology.h"
00017 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00018
00019 namespace align
00020 {
00021 namespace tid
00022 {
00024 inline unsigned int moduleNumber(align::ID, const TrackerTopology*);
00025
00027 inline unsigned int sideNumber(align::ID, const TrackerTopology*);
00028
00030 inline unsigned int ringNumber(align::ID, const TrackerTopology*);
00031
00033 inline unsigned int diskNumber(align::ID, const TrackerTopology*);
00034
00036 inline unsigned int endcapNumber(align::ID, const TrackerTopology*);
00037 }
00038 }
00039
00040 unsigned int align::tid::moduleNumber(align::ID id, const TrackerTopology* tTopo)
00041 {
00042 return tTopo->tidModuleInfo(id)[1];
00043 }
00044
00045 unsigned int align::tid::sideNumber(align::ID id, const TrackerTopology* tTopo)
00046 {
00047 return tTopo->tidModuleInfo(id)[0];
00048 }
00049
00050 unsigned int align::tid::ringNumber(align::ID id, const TrackerTopology* tTopo)
00051 {
00052 return tTopo->tidRing(id);
00053 }
00054
00055 unsigned int align::tid::diskNumber(align::ID id, const TrackerTopology* tTopo)
00056 {
00057 return tTopo->tidWheel(id);
00058 }
00059
00060 unsigned int align::tid::endcapNumber(align::ID id, const TrackerTopology* tTopo)
00061 {
00062 return tTopo->tidSide(id);
00063 }
00064
00065 #endif