CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/L1Trigger/DTTraco/interface/DTTracoLUTs.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00013 //
00014 //--------------------------------------------------
00015 #ifndef DT_TRACO_LUTS_H
00016 #define DT_TRACO_LUTS_H
00017 
00018 //---------------
00019 // C++ Headers --
00020 //---------------
00021 
00022 #include <vector>
00023 #include <string> 
00024 
00025 //------------------------------------
00026 // Collaborating Class Declarations --
00027 //------------------------------------
00028 
00029 
00030 //              ---------------------
00031 //              -- Class Interface --
00032 //              ---------------------
00033 
00034 typedef std::vector<unsigned short int> LUT;
00035 
00036 class DTTracoLUTs{
00037 
00038   public:
00039 //    typedef static std::vector<unsigned short int> LUT;
00040  
00042     DTTracoLUTs(std::string filename);
00043 
00045     virtual ~DTTracoLUTs();
00046 
00048     void reset();
00049     
00051     int load();
00052 
00054     void print() const;
00055 
00057     unsigned short int getPhiRad(int pos, int qualflag) const;
00058 
00060     unsigned short int getPsi(int ang) const;
00061 
00063     unsigned short int getBendAng(int pos, int ang, int qualflag) const;
00064 
00066     inline int size_psiLUT() const { return psi_lut.size(); }
00067     inline int size_phiLUT(int i) const { return phi_lut[i].size(); }
00068 
00069   private:
00070 
00071     LUT phi_lut[3];  // phi rad: elem.0: inner; elem.1: outer; elem.2: corr.
00072     LUT psi_lut;     // psi 
00073     std::string _testfile;
00074 
00075 };
00076 
00077 #endif