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
SiPixelFrameReverter
Definition: SiPixelFrameReverter.h:17
SiPixelFrameReverter::SiPixelFrameReverter
SiPixelFrameReverter(const SiPixelFedCabling *map)
Definition: SiPixelFrameReverter.cc:20
GlobalPixel.h
ElectronicIndex.h
SiPixelFedCabling
Definition: SiPixelFedCabling.h:10
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
DetectorIndex.h
SiPixelFrameReverter::DetToFedMap
std::map< uint32_t, std::vector< sipixelobjects::CablingPathToDetUnit > > DetToFedMap
Definition: SiPixelFrameReverter.h:50
sipixelobjects::GlobalPixel
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
SiPixelFedCabling.h
sipixelobjects::ElectronicIndex
Definition: ElectronicIndex.h:5
SiPixelFrameReverter::toCabling
int toCabling(sipixelobjects::ElectronicIndex &cabling, const sipixelobjects::DetectorIndex &detector) const
Definition: SiPixelFrameReverter.cc:34
CablingPathToDetUnit.h
LocalPixel.h
SiPixelFrameReverter::findFedId
int findFedId(uint32_t detId)
Definition: SiPixelFrameReverter.cc:59
SiPixelFrameReverter::hasDetUnit
bool hasDetUnit(uint32_t detId) const
Definition: SiPixelFrameReverter.h:24
SiPixelFrameReverter::findRocInDet
short findRocInDet(uint32_t detId, sipixelobjects::GlobalPixel global)
Definition: SiPixelFrameReverter.cc:107
SiPixelFrameReverter::findLinkInFed
short findLinkInFed(uint32_t detId, sipixelobjects::GlobalPixel global)
Definition: SiPixelFrameReverter.cc:67
SiPixelFrameReverter::findRocInLink
short findRocInLink(uint32_t detId, sipixelobjects::GlobalPixel global)
Definition: SiPixelFrameReverter.cc:87
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
SiPixelFrameReverter::findPixelInRoc
sipixelobjects::LocalPixel findPixelInRoc(uint32_t detId, sipixelobjects::GlobalPixel global)
Definition: SiPixelFrameReverter.cc:127
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SiPixelFrameReverter::map_
const SiPixelFedCabling * map_
Definition: SiPixelFrameReverter.h:48
SiPixelFrameReverter::buildStructure
void buildStructure(const TrackerGeometry *)
Definition: SiPixelFrameReverter.cc:22
sipixelobjects::DetectorIndex
Definition: DetectorIndex.h:6
TrackerGeometry
Definition: TrackerGeometry.h:14