CMS 3D CMS Logo

DTTracoLUTs.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
11 //
12 //--------------------------------------------------
13 #ifndef DT_TRACO_LUTS_H
14 #define DT_TRACO_LUTS_H
15 
16 //---------------
17 // C++ Headers --
18 //---------------
19 
20 #include <string>
21 #include <vector>
22 
23 //------------------------------------
24 // Collaborating Class Declarations --
25 //------------------------------------
26 
27 // ---------------------
28 // -- Class Interface --
29 // ---------------------
30 
31 typedef std::vector<unsigned short int> LUT;
32 
33 class DTTracoLUTs {
34 public:
35  // typedef static std::vector<unsigned short int> LUT;
36 
39 
41  virtual ~DTTracoLUTs();
42 
44  void reset();
45 
47  int load();
48 
50  void print() const;
51 
53  unsigned short int getPhiRad(int pos, int qualflag) const;
54 
56  unsigned short int getPsi(int ang) const;
57 
59  unsigned short int getBendAng(int pos, int ang, int qualflag) const;
60 
62  inline int size_psiLUT() const { return psi_lut.size(); }
63  inline int size_phiLUT(int i) const { return phi_lut[i].size(); }
64 
65 private:
66  LUT phi_lut[3]; // phi rad: elem.0: inner; elem.1: outer; elem.2: corr.
67  LUT psi_lut; // psi
69 };
70 
71 #endif
int size_psiLUT() const
return number of entries in the LUT
Definition: DTTracoLUTs.h:62
int size_phiLUT(int i) const
Definition: DTTracoLUTs.h:63
LUT phi_lut[3]
Definition: DTTracoLUTs.h:66
DTTracoLUTs(std::string filename)
constructor
Definition: DTTracoLUTs.cc:45
void reset()
reset look-up tables
Definition: DTTracoLUTs.cc:64
void print() const
print look-up tables
Definition: DTTracoLUTs.cc:124
unsigned short int getPhiRad(int pos, int qualflag) const
get radial angle from traco position and flag: 0=outer, 1=inner, 2=correl.
Definition: DTTracoLUTs.cc:142
virtual ~DTTracoLUTs()
destructor
Definition: DTTracoLUTs.cc:51
int load()
load look-up tables
Definition: DTTracoLUTs.cc:73
unsigned short int getPsi(int ang) const
get psi angle from traco k parameter
Definition: DTTracoLUTs.cc:154
std::string _testfile
Definition: DTTracoLUTs.h:68
unsigned short int getBendAng(int pos, int ang, int qualflag) const
return bending angle from pos and ang
Definition: DTTracoLUTs.cc:174
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:31