Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:43

0001 //---------------------------------------------------------
0002 //
0003 /**  \class Lut
0004  *
0005  *   Class for computing single Traco LUT from given parameters
0006  *
0007  *
0008  *   \author S. Vanini
0009  */
0010 //
0011 //---------------------------------------------------------
0012 #ifndef LUT_H
0013 #define LUT_H
0014 
0015 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h"
0016 
0017 //---------------
0018 // C++ Headers --
0019 //---------------
0020 #include <cmath>
0021 #include <fstream>
0022 #include <iostream>
0023 #include <string>
0024 
0025 #define ANGRESOL 512.0
0026 #define POSRESOL 4096.0
0027 #define SL_D 23.5       //(cm)SL Distance
0028 #define CELL_PITCH 4.2  //(cm)Wire Distance
0029 #define SL_DIFF 11.75   // (cm )Distance of SL from station center
0030 
0031 class Lut {
0032 public:
0033   Lut(){};
0034   Lut(const DTConfigLUTs *conf, int ntc, float SL_shift);
0035   ~Lut();
0036 
0037   // set lut parameters methods
0038   void setForTestBeam(int station, int board, int traco);
0039 
0040   // get luts
0041   int get_x(int addr) const;
0042   int get_k(int addr) const;
0043 
0044   // DSP <-> IEEE32 conversions
0045   void IEEE32toDSP(float f, short *DSPmantissa, short *DSPexp);
0046   void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f);
0047 
0048 public:
0049   float m_d;    // distance vertex - normal
0050   float m_Xcn;  // Distance correlator - normal
0051   int m_ST;     // TRACO BTIC parameter
0052   int m_wheel;  // Wheel sign (+1 or -1)
0053 
0054 private:
0055   float m_pitch_d_ST;  //=pitch/ST private:
0056 
0057   const DTConfigLUTs *_conf_luts;
0058 };
0059 #endif