CMS 3D CMS Logo

Lut.h
Go to the documentation of this file.
1 //---------------------------------------------------------
2 //
10 //
11 //---------------------------------------------------------
12 #ifndef LUT_H
13 #define LUT_H
14 
16 
17 //---------------
18 // C++ Headers --
19 //---------------
20 #include <cmath>
21 #include <fstream>
22 #include <iostream>
23 #include <string>
24 
25 #define ANGRESOL 512.0
26 #define POSRESOL 4096.0
27 #define SL_D 23.5 //(cm)SL Distance
28 #define CELL_PITCH 4.2 //(cm)Wire Distance
29 #define SL_DIFF 11.75 // (cm )Distance of SL from station center
30 
31 class Lut {
32 
33 public:
34  Lut(){};
35  Lut(const DTConfigLUTs *conf, int ntc, float SL_shift);
36  ~Lut();
37 
38  // set lut parameters methods
39  void setForTestBeam(int station, int board, int traco);
40 
41  // get luts
42  int get_x(int addr) const;
43  int get_k(int addr) const;
44 
45  // DSP <-> IEEE32 conversions
46  void IEEE32toDSP(float f, short *DSPmantissa, short *DSPexp);
47  void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f);
48 
49 public:
50  float m_d; // distance vertex - normal
51  float m_Xcn; // Distance correlator - normal
52  int m_ST; // TRACO BTIC parameter
53  int m_wheel; // Wheel sign (+1 or -1)
54 
55 private:
56  float m_pitch_d_ST; //=pitch/ST private:
57 
59 };
60 #endif
void IEEE32toDSP(float f, short *DSPmantissa, short *DSPexp)
int m_ST
Definition: Lut.h:52
int get_k(int addr) const
Definition: Lut.cc:109
float m_Xcn
Definition: Lut.h:51
int get_x(int addr) const
Definition: Lut.cc:123
~Lut()
Definition: Lut.cc:40
float m_pitch_d_ST
Definition: Lut.h:56
double f[11][100]
void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f)
float m_d
Definition: Lut.h:50
void setForTestBeam(int station, int board, int traco)
Definition: Lut.cc:42
int m_wheel
Definition: Lut.h:53
const DTConfigLUTs * _conf_luts
Definition: Lut.h:58
Definition: Lut.h:31
Lut()
Definition: Lut.h:34