/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
RecoTracker/TkTrackingRegions/interface/HitEtaCheck.h
38 строк
1 KB
Cms Build
Clang-Format
31 май 2019, 13:15
31 май 2019, 13:15
eb1cff4
Код
Авторство
О чём код?
#ifndef HitEtaCheck_H #define HitEtaCheck_H /** Fast Implementation of HitRZCompatibility. The RZConstraint is defined by two lines and their crossing point. The r-z compatibility is tested by comparistion of cotangent given by r-z and lines crossing point with cotangents of two lines. */ #include "RecoTracker/TkTrackingRegions/interface/HitRZCompatibility.h" #include "RecoTracker/TkTrackingRegions/interface/HitRZConstraint.h" #include "RecoTracker/TkTrackingRegions/interface/HitRCheck.h" #include "RecoTracker/TkTrackingRegions/interface/HitZCheck.h" class HitEtaCheck final : public HitRZCompatibility { public: static constexpr Algo me = etaAlgo; HitEtaCheck(bool inbarrel, const HitRZConstraint::Point& point, float cotLeftLine, float cotRightLine) : HitRZCompatibility(me), isBarrel(inbarrel), theRZ(HitRZConstraint(point, cotLeftLine, point, cotRightLine)) {} bool operator()(const float& r, const float& z) const override { const auto& lineLeft = theRZ.lineLeft(); const auto& lineRight = theRZ.lineRight(); float cotHit = (lineLeft.origin().z() - z) / (lineLeft.origin().r() - r); return lineRight.cotLine() < cotHit && cotHit < lineLeft.cotLine(); } Range range(const float& rORz) const override { return (isBarrel) ? HitZCheck(theRZ).range(rORz) : HitRCheck(theRZ).range(rORz); } HitEtaCheck* clone() const override { return new HitEtaCheck(*this); } private: bool isBarrel; HitRZConstraint theRZ; }; #endif