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