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 public:
33  Lut(){};
34  Lut(const DTConfigLUTs *conf, int ntc, float SL_shift);
35  ~Lut();
36 
37  // set lut parameters methods
38  void setForTestBeam(int station, int board, int traco);
39 
40  // get luts
41  int get_x(int addr) const;
42  int get_k(int addr) const;
43 
44  // DSP <-> IEEE32 conversions
45  void IEEE32toDSP(float f, short *DSPmantissa, short *DSPexp);
46  void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f);
47 
48 public:
49  float m_d; // distance vertex - normal
50  float m_Xcn; // Distance correlator - normal
51  int m_ST; // TRACO BTIC parameter
52  int m_wheel; // Wheel sign (+1 or -1)
53 
54 private:
55  float m_pitch_d_ST; //=pitch/ST private:
56 
58 };
59 #endif
void IEEE32toDSP(float f, short *DSPmantissa, short *DSPexp)
int m_ST
Definition: Lut.h:51
float m_Xcn
Definition: Lut.h:50
~Lut()
Definition: Lut.cc:39
float m_pitch_d_ST
Definition: Lut.h:55
double f[11][100]
void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f)
float m_d
Definition: Lut.h:49
void setForTestBeam(int station, int board, int traco)
Definition: Lut.cc:41
int m_wheel
Definition: Lut.h:52
int get_x(int addr) const
Definition: Lut.cc:121
const DTConfigLUTs * _conf_luts
Definition: Lut.h:57
Definition: Lut.h:31
int get_k(int addr) const
Definition: Lut.cc:107
Lut()
Definition: Lut.h:33