CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/L1Trigger/DTTraco/interface/Lut.h

Go to the documentation of this file.
00001 //---------------------------------------------------------
00002 //
00011 //
00012 //---------------------------------------------------------
00013 #ifndef LUT_H
00014 #define LUT_H
00015 
00016 
00017 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h"
00018 
00019 //---------------
00020 // C++ Headers --
00021 //---------------
00022 #include <iostream>
00023 #include <fstream>
00024 #include <string>
00025 #include <math.h>
00026 
00027 #define ANGRESOL        512.0   
00028 #define POSRESOL        4096.0
00029 #define SL_D            23.5    //(cm)SL Distance 
00030 #define CELL_PITCH      4.2     //(cm)Wire Distance 
00031 #define SL_DIFF         11.75   // (cm )Distance of SL from station center
00032 
00033 class Lut {
00034 
00035  public:
00036   Lut() {}; 
00037   Lut(DTConfigLUTs* conf, int ntc, float SL_shift);
00038   ~Lut();
00039 
00040   // set lut parameters methods
00041   void setForTestBeam( int station, int board, int traco );
00042 
00043   // get luts
00044   int get_x( int addr );
00045   int get_k( int addr );
00046 
00047   // DSP <-> IEEE32 conversions
00048   void IEEE32toDSP(float f, short *DSPmantissa, short *DSPexp);
00049   void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f);
00050 
00051 public:
00052   float m_d;            //distance vertex - normal
00053   float m_Xcn;          //Distance correlator - normal
00054   int m_ST;             //TRACO BTIC parameter
00055   int m_wheel;          //Wheel sign (+1 or -1)
00056 
00057 private:
00058   float m_pitch_d_ST;   //=pitch/ST private:
00059 
00060   DTConfigLUTs* _conf_luts;
00061 
00062 };
00063 #endif