CMS 3D CMS Logo

Lut Class Reference

#include <L1Trigger/DTTraco/interface/Lut.h>

List of all members.

Public Member Functions

int get_k (int addr)
int get_x (int addr)
 Lut (int station, int board, int traco)
 ~Lut ()

Private Attributes

int ANGRESOL
float CELL_H
float CELL_PITCH
float m_d
float m_distp2
float m_shift
float m_ST
float m_stsize
float m_Xc
float m_Xn
int nBoard
int nStat
int nTraco
int POSRESOL
float SL_DIFF
float * tracoPos


Detailed Description

Definition at line 9 of file Lut.h.


Constructor & Destructor Documentation

Lut::Lut ( int  station,
int  board,
int  traco 
)

Definition at line 13 of file Lut.cc.

References ANGRESOL, CELL_H, CELL_PITCH, m_d, m_distp2, m_shift, m_ST, m_stsize, m_Xc, m_Xn, nBoard, nStat, nTraco, POSRESOL, SL_DIFF, and tracoPos.

00013                                            : nStat( station ), nBoard( board ), nTraco( traco ) {
00014 
00015  switch( nStat ){
00016   case 1:
00017   tracoPos = new float[50];
00018   tracoPos[ 0] = -120.19;
00019   tracoPos[ 1] = -103.39;
00020   tracoPos[ 2] =  -86.59;
00021   tracoPos[ 3] =  -69.80;
00022   tracoPos[10] =  -52.99;
00023   tracoPos[11] =  -36.19;
00024   tracoPos[12] =  -19.39;
00025   tracoPos[13] =   -2.59;
00026   tracoPos[20] =   14.20;
00027   tracoPos[21] =   31.00;
00028   tracoPos[22] =   47.80;
00029   tracoPos[23] =   64.60;
00030   tracoPos[30] =   81.40;
00031 
00032   SL_DIFF = 11.8;
00033   CELL_H     = 1.3;
00034   CELL_PITCH = 4.2;
00035   ANGRESOL = 512;
00036   POSRESOL = 4096;
00037 
00038   m_d  = 431.175;
00039   m_ST = 31.0;
00040   m_Xc = tracoPos[ ( nBoard * 10 ) + nTraco ];
00041   m_Xn = +39.0;
00042   m_shift = 18.0;
00043   m_stsize = CELL_PITCH / m_ST;
00044   m_distp2 = 0.5 + ( 2.0 * CELL_H * m_ST / CELL_PITCH );
00045   
00046   break;
00047 
00048   case 3:
00049   tracoPos = new float[50];
00050   tracoPos[ 0] = -165.45;
00051   tracoPos[ 1] = -148.65;
00052   tracoPos[ 2] = -131.85;
00053   tracoPos[ 3] = -115.05;
00054   tracoPos[10] =  -98.25;
00055   tracoPos[11] =  -81.45;
00056   tracoPos[12] =  -64.65;
00057   tracoPos[13] =  -47.85;
00058   tracoPos[20] =  -31.05;
00059   tracoPos[21] =  -14.25;
00060   tracoPos[22] =    2.54;
00061   tracoPos[23] =   19.34;
00062   tracoPos[30] =   36.14;
00063   tracoPos[31] =   52.94;
00064   tracoPos[32] =   69.74;
00065   tracoPos[33] =   86.54;
00066   tracoPos[40] =  103.34;
00067   tracoPos[41] =  120.14;
00068   tracoPos[42] =  136.94;
00069   tracoPos[43] =  153.74;
00070 
00071   SL_DIFF = 11.8;
00072   CELL_H     = 1.3;
00073   CELL_PITCH = 4.2;
00074   ANGRESOL = 512;
00075   POSRESOL = 4096;
00076 
00077   m_d  = 512.47;
00078   m_ST = 31.0;
00079   m_Xc = tracoPos[ ( nBoard * 10 ) + nTraco ];
00080   m_Xn = -21.0;
00081   m_shift = 18.0;
00082   m_stsize = CELL_PITCH / m_ST;
00083   m_distp2 = 0.5 + ( 2.0 * CELL_H * m_ST / CELL_PITCH );
00084 
00085   break;
00086 
00087  }//end switch
00088 }

Lut::~Lut (  ) 

Definition at line 90 of file Lut.cc.

00090           {
00091 }


Member Function Documentation

int Lut::get_k ( int  addr  ) 

Definition at line 93 of file Lut.cc.

References ANGRESOL, i, m_distp2, m_shift, and x.

00093                          {
00094   int i;
00095   float x;
00096   i = addr - 511;
00097   x = 2.0 * i / ( m_shift * m_distp2 );
00098   x = atanf(x);
00099   x = x * ANGRESOL;
00100   return x;
00101 }

int Lut::get_x ( int  addr  ) 

Definition at line 103 of file Lut.cc.

References d, i, m_d, m_stsize, m_Xc, m_Xn, POSRESOL, SL_DIFF, and x.

00103                          {
00104   int i;
00105   float d,x,Xl;
00106   if ( addr <= 511 ) {
00107     i = addr;
00108     d = m_d + SL_DIFF;
00109   }
00110   else
00111   if ( addr <= 1023 ) {
00112     i = addr - 512;
00113     d = m_d - SL_DIFF;
00114   }
00115   else
00116   {
00117     i = addr - 1024;
00118     d = m_d;
00119   }
00120 
00121   Xl = m_Xc + m_stsize * i;
00122   x = ( m_Xn - Xl ) / d;
00123   x = atanf(x);
00124   x = x * POSRESOL;
00125   return x;
00126 }


Member Data Documentation

int Lut::ANGRESOL [private]

Definition at line 29 of file Lut.h.

Referenced by get_k(), and Lut().

float Lut::CELL_H [private]

Definition at line 27 of file Lut.h.

Referenced by Lut().

float Lut::CELL_PITCH [private]

Definition at line 28 of file Lut.h.

Referenced by Lut().

float Lut::m_d [private]

Definition at line 32 of file Lut.h.

Referenced by get_x(), and Lut().

float Lut::m_distp2 [private]

Definition at line 38 of file Lut.h.

Referenced by get_k(), and Lut().

float Lut::m_shift [private]

Definition at line 36 of file Lut.h.

Referenced by get_k(), and Lut().

float Lut::m_ST [private]

Definition at line 33 of file Lut.h.

Referenced by Lut().

float Lut::m_stsize [private]

Definition at line 37 of file Lut.h.

Referenced by get_x(), and Lut().

float Lut::m_Xc [private]

Definition at line 34 of file Lut.h.

Referenced by get_x(), and Lut().

float Lut::m_Xn [private]

Definition at line 35 of file Lut.h.

Referenced by get_x(), and Lut().

int Lut::nBoard [private]

Definition at line 22 of file Lut.h.

Referenced by Lut().

int Lut::nStat [private]

Definition at line 21 of file Lut.h.

Referenced by Lut().

int Lut::nTraco [private]

Definition at line 23 of file Lut.h.

Referenced by Lut().

int Lut::POSRESOL [private]

Definition at line 30 of file Lut.h.

Referenced by get_x(), and Lut().

float Lut::SL_DIFF [private]

Definition at line 26 of file Lut.h.

Referenced by get_x(), and Lut().

float* Lut::tracoPos [private]

Definition at line 24 of file Lut.h.

Referenced by Lut().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:56 2009 for CMSSW by  doxygen 1.5.4