/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/SiPixelObjects/interface/SiPixelFrameConverter.h
52 строки
2 KB
Patrick Gartung
Alca packages: cleanup use of GCC11Compatibility.h
16 мар 2020, 23:12
16 мар 2020, 23:12
ef976ac
Код
Авторство
О чём код?
#ifndef SiPixelObjects_SiPixelFrameConverter_H #define SiPixelObjects_SiPixelFrameConverter_H #include "CondFormats/SiPixelObjects/interface/ElectronicIndex.h" #include "CondFormats/SiPixelObjects/interface/DetectorIndex.h" #include "CondFormats/SiPixelObjects/interface/SiPixelFedCabling.h" #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingTree.h" #include "CondFormats/SiPixelObjects/interface/PixelFEDCabling.h" #include "CondFormats/SiPixelObjects/interface/PixelROC.h" #include "CondFormats/SiPixelObjects/interface/LocalPixel.h" #include "CondFormats/SiPixelObjects/interface/GlobalPixel.h" #include <cstdint> class SiPixelFrameConverter { public: typedef sipixelobjects::PixelFEDCabling PixelFEDCabling; // using PixelFEDCabling = sipixelobjects::PixelFEDCabling; SiPixelFrameConverter(const SiPixelFedCabling* map, int fedId); bool hasDetUnit(uint32_t radId) const; sipixelobjects::PixelROC const* toRoc(int link, int roc) const; int toDetector(const sipixelobjects::ElectronicIndex& cabling, sipixelobjects::DetectorIndex& detector) const { using namespace sipixelobjects; auto roc = toRoc(cabling.link, cabling.roc); if (!roc) return 2; LocalPixel::DcolPxid local = {cabling.dcol, cabling.pxid}; if (!local.valid()) return 3; GlobalPixel global = roc->toGlobal(LocalPixel(local)); detector.rawId = roc->rawId(); detector.row = global.row; detector.col = global.col; return 0; } int toCabling(sipixelobjects::ElectronicIndex& cabling, const sipixelobjects::DetectorIndex& detector) const; private: int theFedId; const SiPixelFedCabling* theMap; SiPixelFedCablingTree const* theTree; const PixelFEDCabling* theFed; }; #endif