#include <string>
Go to the source code of this file.
Functions | |
std::string | trackerHierarchy (unsigned int id) |
std::string trackerHierarchy | ( | unsigned int | id | ) |
Definition at line 11 of file trackerHierarchy.cc.
References PXFDetId::blade(), PXFDetId::disk(), SiStripDetId::glued(), id, getDQMSummary::key, PXBDetId::ladder(), TIBDetId::layer(), TOBDetId::layer(), PXBDetId::layer(), PXFDetId::module(), TOBDetId::module(), module(), TIDDetId::module(), PXBDetId::module(), TECDetId::module(), TIBDetId::module(), PXFDetId::panel(), TECDetId::petal(), TIDDetId::ring(), TECDetId::ring(), TOBDetId::rod(), PXFDetId::side(), TIDDetId::side(), TECDetId::side(), SiStripDetId::stereo(), TIBDetId::string(), theLayer, TIDDetId::wheel(), and TECDetId::wheel().
Referenced by GeometricSearchTrackerBuilder::build().
00011 { 00012 DetId id(rawid); 00013 int subdetid = id.subdetId(); 00014 switch (subdetid) { 00015 00016 // PXB 00017 case 1: 00018 { 00019 PXBDetId module(rawid); 00020 char theLayer = module.layer(); 00021 char theLadder = module.ladder(); 00022 char theModule = module.module(); 00023 char key[] = { 1, theLayer , theLadder, theModule}; 00024 return std::string(key,4); 00025 } 00026 00027 // P1XF 00028 case 2: 00029 { 00030 PXFDetId module(rawid); 00031 char thePanel = module.panel(); 00032 char theDisk = module.disk(); 00033 char theBlade = module.blade(); 00034 char theModule = module.module(); 00035 char key[] = { 2, 00036 char(module.side()), 00037 thePanel , theDisk, 00038 theBlade, theModule}; 00039 return std::string(key,6); 00040 } 00041 00042 // TIB 00043 case 3: 00044 { 00045 TIBDetId module(rawid); 00046 char theLayer = module.layer(); 00047 std::vector<unsigned int> theString = module.string(); 00048 char theModule = module.module(); 00049 //side = (theString[0] == 1 ) ? "-" : "+"; 00050 //part = (theString[1] == 1 ) ? "int" : "ext"; 00051 char key[] = { 3, 00052 theLayer, 00053 char(theString[0]), 00054 char(theString[1]), 00055 char(theString[2]), 00056 theModule, 00057 char(module.glued() ? module.stereo()+1 : 0) 00058 }; 00059 return std::string(key, module.glued() ? 7 : 6); 00060 } 00061 00062 // TID 00063 case 4: 00064 { 00065 TIDDetId module(rawid); 00066 unsigned int theDisk = module.wheel(); 00067 unsigned int theRing = module.ring(); 00068 std::vector<unsigned int> theModule = module.module(); 00069 // side = (module.side() == 1 ) ? "-" : "+"; 00070 // part = (theModule[0] == 1 ) ? "back" : "front"; 00071 char key[] = { 4, 00072 char(module.side()), 00073 theDisk , 00074 theRing, 00075 char(theModule[0]), 00076 char(theModule[1]), 00077 char(module.glued() ? module.stereo()+1 : 0) 00078 }; 00079 return std::string(key,module.glued() ? 7 : 6); 00080 } 00081 00082 // TOB 00083 case 5: 00084 { 00085 TOBDetId module(rawid); 00086 unsigned int theLayer = module.layer(); 00087 std::vector<unsigned int> theRod = module.rod(); 00088 unsigned int theModule = module.module(); 00089 // side = (theRod[0] == 1 ) ? "-" : "+"; 00090 char key[] = { 5, theLayer , 00091 char(theRod[0]), 00092 char(theRod[1]), 00093 theModule, 00094 char(module.glued() ? module.stereo()+1 : 0) 00095 }; 00096 return std::string(key, module.glued() ? 6 : 5); 00097 } 00098 00099 // TEC 00100 case 6: 00101 { 00102 TECDetId module(rawid); 00103 unsigned int theWheel = module.wheel(); 00104 unsigned int theModule = module.module(); 00105 std::vector<unsigned int> thePetal = module.petal(); 00106 unsigned int theRing = module.ring(); 00107 // side = (module.side() == 1 ) ? "-" : "+"; 00108 // petal = (thePetal[0] == 1 ) ? "back" : "front"; 00109 // int out_side = (module.side() == 1 ) ? -1 : 1; 00110 00111 char key[] = { 6, 00112 char(module.side()), 00113 theWheel, 00114 char(thePetal[0]), 00115 char(thePetal[1]), 00116 theRing, 00117 theModule, 00118 char(module.glued() ? module.stereo()+1 : 0) 00119 }; 00120 return std::string(key, module.glued() ? 8 : 7); 00121 } 00122 default: 00123 return std::string(); 00124 } 00125 }