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 
35 public:
36  // typedef static std::vector<unsigned short int> LUT;
37 
40 
42  virtual ~DTTracoLUTs();
43 
45  void reset();
46 
48  int load();
49 
51  void print() const;
52 
54  unsigned short int getPhiRad(int pos, int qualflag) const;
55 
57  unsigned short int getPsi(int ang) const;
58 
60  unsigned short int getBendAng(int pos, int ang, int qualflag) const;
61 
63  inline int size_psiLUT() const { return psi_lut.size(); }
64  inline int size_phiLUT(int i) const { return phi_lut[i].size(); }
65 
66 private:
67  LUT phi_lut[3]; // phi rad: elem.0: inner; elem.1: outer; elem.2: corr.
68  LUT psi_lut; // psi
70 };
71 
72 #endif
unsigned short int getBendAng(int pos, int ang, int qualflag) const
return bending angle from pos and ang
Definition: DTTracoLUTs.cc:180
LUT phi_lut[3]
Definition: DTTracoLUTs.h:67
DTTracoLUTs(std::string filename)
constructor
Definition: DTTracoLUTs.cc:45
void reset()
reset look-up tables
Definition: DTTracoLUTs.cc:65
int size_psiLUT() const
return number of entries in the LUT
Definition: DTTracoLUTs.h:63
virtual ~DTTracoLUTs()
destructor
Definition: DTTracoLUTs.cc:51
int load()
load look-up tables
Definition: DTTracoLUTs.cc:75
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:147
std::string _testfile
Definition: DTTracoLUTs.h:69
void print() const
print look-up tables
Definition: DTTracoLUTs.cc:128
unsigned short int getPsi(int ang) const
get psi angle from traco k parameter
Definition: DTTracoLUTs.cc:159
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:31
int size_phiLUT(int i) const
Definition: DTTracoLUTs.h:64