CMS 3D CMS Logo

SiPixelFrameReverter.h
Go to the documentation of this file.
1 #ifndef SiPixelTools_SiPixelFrameReverter_H
2 #define SiPixelTools_SiPixelFrameReverter_H
3 
10 
11 #include <cstdint>
12 #include <map>
13 #include <vector>
14 
15 class TrackerGeometry;
16 
18 public:
20 
21  void buildStructure(const TrackerGeometry*);
22 
23  // Function to test if detId exists
24  bool hasDetUnit(uint32_t detId) const { return (DetToFedMap.find(detId) != DetToFedMap.end()); }
25 
26  // Function to convert offline addressing to online
28 
29  // Function to find FedId given detId
30  int findFedId(uint32_t detId);
31 
32  // Function to find Fed link given detId and pixel row and col on plaquette
33  // returns -1 if link can't be found
34  short findLinkInFed(uint32_t detId, sipixelobjects::GlobalPixel global);
35 
36  // Function to find Roc number on a link given detId and pixel row and col on plaquette
37  // returns -1 if Roc can't be found
38  short findRocInLink(uint32_t detId, sipixelobjects::GlobalPixel global);
39 
40  // Function to find the Roc number within a plaquette given detId and pixel row and col on plaquette
41  // returns -1 if Roc can't be found
42  short findRocInDet(uint32_t detId, sipixelobjects::GlobalPixel global);
43 
44  // Function to find local pixel given detId and pixel row and col on plaquette
46 
47 private:
49 
50  std::map<uint32_t, std::vector<sipixelobjects::CablingPathToDetUnit> > DetToFedMap;
51 };
52 #endif
int toCabling(sipixelobjects::ElectronicIndex &cabling, const sipixelobjects::DetectorIndex &detector) const
identify pixel inside single ROC
Definition: LocalPixel.h:7
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
int findFedId(uint32_t detId)
short findRocInLink(uint32_t detId, sipixelobjects::GlobalPixel global)
short findRocInDet(uint32_t detId, sipixelobjects::GlobalPixel global)
std::map< uint32_t, std::vector< sipixelobjects::CablingPathToDetUnit > > DetToFedMap
const SiPixelFedCabling * map_
void buildStructure(const TrackerGeometry *)
SiPixelFrameReverter(const SiPixelFedCabling *map)
bool hasDetUnit(uint32_t detId) const
sipixelobjects::LocalPixel findPixelInRoc(uint32_t detId, sipixelobjects::GlobalPixel global)
short findLinkInFed(uint32_t detId, sipixelobjects::GlobalPixel global)