/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
TrackingTools/TrackRefitter/interface/RefitDirection.h
61 строка
2 KB
Cms Build
Clang-Format
03 июн 2019, 06:44
03 июн 2019, 06:44
7622cf3
Код
Авторство
О чём код?
#ifndef TrackingTools_TrackRefitter_RefitDirection_H #define TrackingTools_TrackRefitter_RefitDirection_H /** \class RefitDirection * Help class in order to handle the different refit possibilities * * \author R. Bellan - INFN Torino <riccardo.bellan@cern.ch> */ #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" class RefitDirection { public: enum GeometricalDirection { insideOut, outsideIn, undetermined }; /// Constructor RefitDirection() { thePropagationDirection = anyDirection; theGeoDirection = undetermined; } explicit RefitDirection(std::string const& type) { thePropagationDirection = anyDirection; theGeoDirection = undetermined; if (type == "alongMomentum") thePropagationDirection = alongMomentum; else if (type == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum; else if (type == "insideOut") theGeoDirection = insideOut; else if (type == "outsideIn") theGeoDirection = outsideIn; else throw cms::Exception("RefitDirection") << "Wrong refit direction chosen in TrackTransformer ParameterSet" << "\n" << "Possible choices are:" << "\n" << "RefitDirection = [alongMomentum, oppositeToMomentum, insideOut, outsideIn]"; } // Operations inline GeometricalDirection geometricalDirection() const { if (theGeoDirection == undetermined) LogTrace("Reco|TrackingTools|TrackTransformer") << "Try to use undetermined geometrical direction"; return theGeoDirection; } inline PropagationDirection propagationDirection() const { if (thePropagationDirection == anyDirection) LogTrace("Reco|TrackingTools|TrackTransformer") << "Try to use anyDirection as propagation direction"; return thePropagationDirection; } protected: private: GeometricalDirection theGeoDirection; PropagationDirection thePropagationDirection; }; #endif