CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/L1Trigger/GlobalMuonTrigger/src/L1MuGMTEtaLUT.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class: L1MuGMTEtaLUT
00004 //
00005 //   Description: Look-up table for GMT Eta Projection Unit
00006 //
00007 //
00008 //   $Date: 2007/03/23 18:51:35 $
00009 //   $Revision: 1.3 $
00010 //
00011 //   Author :
00012 //   H. Sakulin                CERN EP 
00013 //
00014 //   Migrated to CMSSW:
00015 //   I. Mikulec
00016 //
00017 //--------------------------------------------------
00018 
00019 //-----------------------
00020 // This Class's Header --
00021 //-----------------------
00022 
00023 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTEtaLUT.h"
00024 
00025 //---------------
00026 // C++ Headers --
00027 //---------------
00028 
00029 #include <iostream>
00030 #include <vector>
00031 #include <cmath>
00032 
00033 //-------------------------------
00034 // Collaborating Class Headers --
00035 //-------------------------------
00036 
00037 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00038 
00039 // --------------------------------
00040 //       class L1MuGMTEtaLUT
00041 //---------------------------------
00042 
00043 //----------------
00044 // Constructors --
00045 //----------------
00046 L1MuGMTEtaLUT::L1MuGMTEtaLUT() {
00047 }
00048 
00049 //--------------
00050 // Destructor --
00051 //--------------
00052 L1MuGMTEtaLUT::~L1MuGMTEtaLUT() { 
00053   
00054 }
00055 
00056 //--------------
00057 // Operations --
00058 //--------------
00059  
00060 int L1MuGMTEtaLUT::etabin(float eta, int isys) {
00061   int i;
00062   for (i=0; i<(int)NETA;i++)
00063     if (eta >= etabins[isys][i] && eta < etabins[isys][i+1]) break;
00064   if (i>=(int)NETA) edm::LogWarning("LUTProblem") << "L1MuGMTEtaLUT::etabin(): could not assign eta bin ";
00065   return i;
00066 }
00067 
00068 
00069 //
00070 // project muon eta to calo/vertex
00071 //
00072 float L1MuGMTEtaLUT::eta(int isys, int isISO, int icharge, float eta, float pt) {
00073 
00074   int ieta = etabin ( (float) fabs(eta), isys );
00075   
00076   if ( (isys==DT || isys==bRPC) && pt < 4.) pt = 4.; // cut off
00077   if ( (isys==CSC || isys==fRPC) && pt < 3.) pt = 3.;
00078 
00079   float a=fitparams_eta[isISO][isys][ieta][0];
00080   float b=fitparams_eta[isISO][isys][ieta][1];
00081   float c=fitparams_eta[isISO][isys][ieta][2];
00082 
00083   float deta = a + b / pt + c / (pt*pt);
00084   
00085   float neweta;
00086   if (eta>0) neweta = eta - deta;
00087   else neweta = eta + deta;
00088 
00089   return neweta;
00090  }
00091 
00092 
00093 //
00094 // static parameters of LUTs
00095 //
00096 
00097 // 06/2003 changed a few end-of scale values 
00098 // in order to get less errors when generating LUTs
00099 
00100 float L1MuGMTEtaLUT::etabins[L1MuGMTEtaLUT::NSYS][L1MuGMTEtaLUT::NETA+1] = {
00101   { 0.00, 0.22, 0.27, 0.58, 0.77, 0.87, 0.92, 1.24, 1.35 /*1.24*/ }, // DT
00102   { 0.00, 1.06, 1.26, 1.46, 1.66, 1.86, 2.06, 2.26, 2.46 }, // CSC
00103   { 0.00, 0.06, 0.25, 0.41, 0.54, 0.70, 0.83, 0.93, 2.10 /* 1.04 */ }, // bRPC
00104   { 0.00 /*1.04*/ , 1.24, 1.36, 1.48, 1.61, 1.73, 1.85, 1.97, 2.10}   // fRPC
00105 };
00106 
00107 
00108 float L1MuGMTEtaLUT::fitparams_eta[L1MuGMTEtaLUT::NRP][L1MuGMTEtaLUT::NSYS][L1MuGMTEtaLUT::NETA][3]= {
00109   {
00110     // projection to HCAL derived from HCAL positions retrieved in ORCA
00111     // calo eta projection parametrization for DT, projection to HCAL in (for MIP)
00112     {
00113       {  0.000622, -0.041158,  0.173116  },
00114       {  0.006699,  0.033410,  0.100972  },
00115       { -0.013232,  0.067651, -0.601139  },
00116       { -0.014180,  0.021067,  0.523313  },
00117       {  0.016339, -0.088452,  0.760254  },
00118       { -0.036318, -0.191343,  2.020133  },
00119       {  0.034405, -0.085665,  1.199408  },
00120       {  0.000000,  0.000000,  0.000000  }
00121     },
00122     // calo eta projection parametrization for CSC, projection to HCAL in (for MIP)
00123     {
00124       { -0.015401, -0.058141,  1.558118  },
00125       { -0.004330, -0.070188,  1.284233  },
00126       { -0.006400, -0.087547,  1.504680  },
00127       { -0.012328, -0.017183,  0.740447  },
00128       { -0.008242,  0.065439,  0.103247  },
00129       { -0.007771,  0.064422,  0.032815  },
00130       { -0.013519,  0.061566, -0.012504  },
00131       { -0.019427,  0.058284, -0.137946  }
00132     },
00133     // calo eta projection parametrization for bRPC, projection to HCAL in (for MIP)
00134     {
00135       { -0.007561, -0.042023,  0.352816  },
00136       { -0.009209,  0.040731,  0.302872  },
00137       { -0.009222,  0.187243, -0.778960  },
00138       {  0.005989,  0.166652, -0.389902  },
00139       {  0.002763,  0.015457,  0.659074  },
00140       {  0.003961,  0.024581,  0.356591  },
00141       {  0.007231, -0.006835,  0.780842  },
00142       {  0.009003, -0.096096,  1.400512  }
00143     },
00144     // calo eta projection parametrization for fRPC, projection to HCAL in (for MIP)
00145     {
00146       {  0.001764, -0.005724,  0.996918  },
00147       { -0.001087, -0.006683,  1.025424  },
00148       {  0.006963, -0.070388,  1.071490  },
00149       { -0.010473, -0.009773,  0.757894  },
00150       { -0.003982,  0.044828,  0.188175  },
00151       { -0.004707,  0.090827,  0.075001  },
00152       { -0.008527,  0.093006, -0.030012  },
00153       { -0.002392,  0.070246,  0.021308  }
00154     }
00155   },
00156   {
00157     // calo eta projection parametrization for DT, projection to vertex (for ISO)
00158     {
00159       { -0.000091, -0.017684,  0.055423  },
00160       { -0.001020, -0.043767,  0.895337  },
00161       { -0.012845,  0.042033, -0.260102  },
00162       { -0.013225,  0.023254,  0.711623  },
00163       {  0.019014, -0.106147,  1.048216  },
00164       { -0.037251, -0.186894,  2.284707  },
00165       {  0.032260, -0.064396,  1.457979  },
00166       {  0.000000,  0.000000,  0.000000  }
00167     },
00168     // calo eta projection parametrization for CSC, projection to vertex (for ISO)
00169     {
00170       { -0.005587, -0.055360,  1.573220  },
00171       { -0.005393, -0.048236,  1.591642  },
00172       { -0.006649, -0.091712,  1.716567  },
00173       { -0.007636, -0.061966,  1.065366  },
00174       { -0.000338, -0.020505,  0.578064  },
00175       { -0.001077, -0.015956,  0.384573  },
00176       { -0.001851, -0.029931,  0.310996  },
00177       { -0.001878, -0.012289,  0.168514  }
00178     },
00179     // calo eta projection parametrization for bRPC, projection to vertex (for ISO)
00180     {
00181       { -0.010030,  0.027686, -0.147926  },
00182       { -0.008563,  0.041026,  0.356772  },
00183       { -0.010788,  0.166841, -0.458204  },
00184       {  0.009806,  0.109100,  0.080603  },
00185       {  0.000945,  0.028016,  0.798682  },
00186       {  0.006432,  0.007630,  0.704437  },
00187       {  0.007685, -0.004569,  1.044223  },
00188       {  0.005465, -0.063151,  1.631665  }
00189     },
00190     // calo eta projection parametrization for fRPC, projection to vertex (for ISO)
00191     {
00192       {  0.003319, -0.027350,  1.453144  },
00193       {  0.002237, -0.038884,  1.527818  },
00194       {  0.003157, -0.092544,  1.479619  },
00195       { -0.002126, -0.074455,  1.120056  },
00196       { -0.002724, -0.011819,  0.628300  },
00197       {  0.002581, -0.017028,  0.607589  },
00198       {  0.002323,  0.025784,  0.253405  },
00199       {  0.006582,  0.008247,  0.258189  }
00200     }
00201   }
00202 };
00203