/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
RecoTracker/PixelSeeding/interface/CAGraph.h
64 строки
2 KB
mmusich
fix RecoTracker/Pixel* subsystems inclusions guards to comply withc cmssw rule 4.1
11 апр 2023, 10:15
11 апр 2023, 10:15
e88c626
Код
Авторство
О чём код?
#ifndef RecoTracker_PixelSeeding_CAGraph_h #define RecoTracker_PixelSeeding_CAGraph_h #include <array> #include <string> #include <vector> struct CALayer { CALayer(const std::string &layerName, const int seqNum, std::size_t numberOfHits) : theName(layerName), theSeqNum(seqNum) { isOuterHitOfCell.resize(numberOfHits); } bool operator==(const std::string &otherString) const { return otherString == theName; } bool operator==(const int otherSeqNum) const { return otherSeqNum == theSeqNum; } const std::string &name() const { return theName; } const int seqNum() const { return theSeqNum; } std::vector<int> theOuterLayerPairs; std::vector<int> theInnerLayerPairs; std::vector<int> theOuterLayers; std::vector<int> theInnerLayers; std::vector<std::vector<unsigned int>> isOuterHitOfCell; private: std::string theName; int theSeqNum; }; struct CALayerPair { CALayerPair(int a, int b) { theLayers[0] = a; theLayers[1] = b; } bool operator==(const CALayerPair &otherLayerPair) { return (theLayers[0] == otherLayerPair.theLayers[0]) && (theLayers[1] == otherLayerPair.theLayers[1]); } std::array<int, 2> theLayers; std::array<unsigned int, 2> theFoundCells = {{0, 0}}; }; struct CAGraph { int getLayerId(const std::string &layerName) { for (const auto &thisLayer : theLayers) { if (thisLayer == layerName) return thisLayer.seqNum(); } return -1; } std::vector<CALayer> theLayers; std::vector<CALayerPair> theLayerPairs; std::vector<int> theRootLayers; }; #endif // RecoTracker_PixelSeeding_CAGraph_h