/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
TrackingTools/TrackFitters/interface/RecHitLessByDet.h
34 строки
1 KB
Christopher Jones
Applied code formatting
29 май 2019, 22:00
29 май 2019, 22:00
c4ef96f
Код
Авторство
О чём код?
#ifndef CD_RecHitLessByDet_H_ #define CD_RecHitLessByDet_H_ /** \class RecHitLessByDet * A comparison operator for RecHits. * Returns true if the hits are in the order in which they * would be seen by an outgoing (or an incoming) track. * Only meaningful for RecHits from the same trajectory. Ported from ORCA * * \author todorov, cerati */ #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h" class RecHitLessByDet { typedef TransientTrackingRecHit::ConstRecHitPointer RecHitPointer; public: RecHitLessByDet(const PropagationDirection& dir) : theDirection(dir) {} ~RecHitLessByDet() {} bool operator()(const RecHitPointer& aHit, const RecHitPointer& bHit) const { return (theDirection == alongMomentum ? (aHit->surface()->toGlobal(aHit->localPosition()).mag() < bHit->surface()->toGlobal(bHit->localPosition()).mag()) : (aHit->surface()->toGlobal(aHit->localPosition()).mag() > bHit->surface()->toGlobal(bHit->localPosition()).mag())); } private: PropagationDirection theDirection; }; #endif //CD_RecHitLessByDet_H_