#include "DataFormats/SiPixelDetId/interface/PXBDetId.h"
#include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
#include "DataFormats/SiStripDetId/interface/TIBDetId.h"
#include "DataFormats/SiStripDetId/interface/TIDDetId.h"
#include "DataFormats/SiStripDetId/interface/TOBDetId.h"
#include "DataFormats/SiStripDetId/interface/TECDetId.h"
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
std::string | trackerHierarchy (unsigned int rawid) |
std::string trackerHierarchy | ( | unsigned int | rawid | ) |
Definition at line 11 of file trackerHierarchy.cc.
References PXFDetId::blade(), PXFDetId::disk(), SiStripDetId::glued(), combine::key, PXBDetId::ladder(), TIBDetId::layer(), TOBDetId::layer(), PXBDetId::layer(), PXFDetId::module(), TOBDetId::module(), TIDDetId::module(), PXBDetId::module(), python::rootplot::argparse::module, TECDetId::module(), TIBDetId::module(), PXFDetId::panel(), TECDetId::petal(), TIDDetId::ring(), TECDetId::ring(), TOBDetId::rod(), PXFDetId::side(), TIDDetId::side(), TECDetId::side(), SiStripDetId::stereo(), AlCaHLTBitMon_QueryRunRegistry::string, TIBDetId::string(), TIDDetId::wheel(), and TECDetId::wheel().
Referenced by GeometricSearchTrackerBuilder::build().
{ DetId id(rawid); int subdetid = id.subdetId(); switch (subdetid) { // PXB case 1: { PXBDetId module(rawid); char theLayer = module.layer(); char theLadder = module.ladder(); char theModule = module.module(); char key[] = { 1, theLayer , theLadder, theModule}; return std::string(key,4); } // P1XF case 2: { PXFDetId module(rawid); char thePanel = module.panel(); char theDisk = module.disk(); char theBlade = module.blade(); char theModule = module.module(); char key[] = { 2, char(module.side()), thePanel , theDisk, theBlade, theModule}; return std::string(key,6); } // TIB case 3: { TIBDetId module(rawid); char theLayer = module.layer(); std::vector<unsigned int> theString = module.string(); char theModule = module.module(); //side = (theString[0] == 1 ) ? "-" : "+"; //part = (theString[1] == 1 ) ? "int" : "ext"; char key[] = { 3, theLayer, char(theString[0]), char(theString[1]), char(theString[2]), theModule, char(module.glued() ? module.stereo()+1 : 0) }; return std::string(key, module.glued() ? 7 : 6); } // TID case 4: { TIDDetId module(rawid); unsigned int theDisk = module.wheel(); unsigned int theRing = module.ring(); std::vector<unsigned int> theModule = module.module(); // side = (module.side() == 1 ) ? "-" : "+"; // part = (theModule[0] == 1 ) ? "back" : "front"; char key[] = { 4, char(module.side()), char(theDisk) , char(theRing), char(theModule[0]), char(theModule[1]), char(module.glued() ? module.stereo()+1 : 0) }; return std::string(key,module.glued() ? 7 : 6); } // TOB case 5: { TOBDetId module(rawid); unsigned int theLayer = module.layer(); std::vector<unsigned int> theRod = module.rod(); unsigned int theModule = module.module(); // side = (theRod[0] == 1 ) ? "-" : "+"; char key[] = { 5, char(theLayer) , char(theRod[0]), char(theRod[1]), char(theModule), char(module.glued() ? module.stereo()+1 : 0) }; return std::string(key, module.glued() ? 6 : 5); } // TEC case 6: { TECDetId module(rawid); unsigned int theWheel = module.wheel(); unsigned int theModule = module.module(); std::vector<unsigned int> thePetal = module.petal(); unsigned int theRing = module.ring(); // side = (module.side() == 1 ) ? "-" : "+"; // petal = (thePetal[0] == 1 ) ? "back" : "front"; // int out_side = (module.side() == 1 ) ? -1 : 1; char key[] = { 6, char(module.side()), char(theWheel), char(thePetal[0]), char(thePetal[1]), char(theRing), char(theModule), char(module.glued() ? module.stereo()+1 : 0) }; return std::string(key, module.glued() ? 8 : 7); } default: return std::string(); } }