Go to the documentation of this file.00001 #ifndef Alignment_TrackerAlignment_TPBNameSpace_H
00002 #define Alignment_TrackerAlignment_TPBNameSpace_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 tpb
00022 {
00024 const unsigned int lpqc[] = {5, 8, 11};
00025
00027 inline unsigned int moduleNumber(align::ID, const TrackerTopology*);
00028
00031 inline unsigned int ladderNumber(align::ID, const TrackerTopology*);
00032
00034 inline unsigned int layerNumber(align::ID, const TrackerTopology*);
00035
00037 inline unsigned int halfBarrelNumber(align::ID, const TrackerTopology*);
00038 }
00039 }
00040
00041 unsigned int align::tpb::moduleNumber(align::ID id, const TrackerTopology* tTopo)
00042 {
00043 return tTopo->pxbModule(id);
00044 }
00045
00046 unsigned int align::tpb::ladderNumber(align::ID id, const TrackerTopology* tTopo)
00047 {
00048
00049
00050 unsigned int l = tTopo->pxbLadder(id);
00051 unsigned int c = tTopo->pxbLayer(id) - 1;
00052
00053
00054
00055
00056
00057
00058 return l > 3 * lpqc[c] ?
00059 5 * lpqc[c] + 1 - l :
00060 (l > lpqc[c] ?
00061 l - lpqc[c] : lpqc[c] + 1 - l);
00062 }
00063
00064 unsigned int align::tpb::layerNumber(align::ID id, const TrackerTopology* tTopo)
00065 {
00066 return tTopo->pxbLayer(id);
00067 }
00068
00069 unsigned int align::tpb::halfBarrelNumber(align::ID id, const TrackerTopology* tTopo)
00070 {
00071
00072
00073 unsigned int l = tTopo->pxbLadder(id);
00074 unsigned int c = tTopo->pxbLayer(id) - 1;
00075
00076 return l > lpqc[c] && l <= 3 * lpqc[c] ? 1 : 2;
00077 }
00078
00079 #endif