CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPhiLUT.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class: L1MuGMTPhiLUT
00004 //
00005 //   Description: Look-up table for GMT Phi 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/L1MuGMTPhiLUT.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 L1MuGMTPhiLUT
00041 //---------------------------------
00042 
00043 //----------------
00044 // Constructors --
00045 //----------------
00046 L1MuGMTPhiLUT::L1MuGMTPhiLUT() {
00047 }
00048 
00049 //--------------
00050 // Destructor --
00051 //--------------
00052 L1MuGMTPhiLUT::~L1MuGMTPhiLUT() { 
00053   
00054 }
00055 
00056 //--------------
00057 // Operations --
00058 //--------------
00059  
00060 int L1MuGMTPhiLUT::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") << "L1MuGMTPhiLUT::etabin(): could not assign eta bin ";
00065   return i;
00066 }
00067 
00068 
00069 //
00070 // project muon phi to calo/vertex
00071 //
00072 float L1MuGMTPhiLUT::dphi(int isys, int isISO, int icharge, int ieta, float pt) {
00073 
00074   if ( (isys==DT || isys==bRPC) && pt < 4.) pt = 4.; // cut off
00075   if ( (isys==CSC || isys==fRPC) && pt < 3.) pt = 3.;
00076 
00077   float a=fitparams_phi[isISO][isys][ieta][icharge][0];
00078   float b=fitparams_phi[isISO][isys][ieta][icharge][1];
00079   float c=fitparams_phi[isISO][isys][ieta][icharge][2];
00080 
00081   float dphi = a + b / pt + c / (pt*pt);
00082 
00083   // dphi is difference between low edge of muon phi bin and real phi in calo/vtx
00084 
00085   // correct for RPC LUTs which were calculated with center of bin phi
00086   if (isys==bRPC || isys==fRPC) dphi -= 1.25 / 180. * M_PI;
00087   
00088   return dphi;
00089 }
00090 
00091 
00092 //
00093 // static parameters of LUTs
00094 //
00095 float L1MuGMTPhiLUT::etabins[L1MuGMTPhiLUT::NSYS][L1MuGMTPhiLUT::NETA+1] = {
00096   { 0.00, 0.22, 0.27, 0.58, 0.77, 0.87, 0.92, 1.24, 1.24 }, // DT
00097   { 0.00, 1.06, 1.26, 1.46, 1.66, 1.86, 2.06, 2.26, 2.46 }, // CSC
00098   { 0.00, 0.06, 0.25, 0.41, 0.54, 0.70, 0.83, 0.93, 1.04 }, // bRPC
00099   { 1.04, 1.24, 1.36, 1.48, 1.61, 1.73, 1.85, 1.97, 2.10}   // fRPC
00100 };
00101 
00102 
00103 float L1MuGMTPhiLUT::fitparams_phi[L1MuGMTPhiLUT::NRP][L1MuGMTPhiLUT::NSYS][L1MuGMTPhiLUT::NETA][2][3]= {
00104   {
00105     // projection to HCAL derived from HCAL positions retrieved in ORCA
00106     // calo phi projection parametrization for DT, projection to HCAL in (for MIP)
00107     {
00108       { { -0.001290,  0.504308,  4.549529  }, { -0.023984, -0.970760, -2.263805  }  },
00109       { { -0.001920,  0.489318,  4.356311  }, { -0.022833, -1.012401, -2.018399  }  },
00110       { { -0.000194,  0.552174,  4.758974  }, { -0.023465, -1.057848, -2.331967  }  },
00111       { { -0.002269,  0.604601,  4.030573  }, { -0.023426, -1.007778, -2.420637  }  },
00112       { { -0.000271,  0.533090,  4.488132  }, { -0.025969, -0.981604, -2.149771  }  },
00113       { {  0.004051,  0.374228,  4.799831  }, { -0.031902, -0.732712, -2.896422  }  },
00114       { { -0.004666,  0.583151,  3.559875  }, { -0.011293, -1.095987, -1.514169  }  },
00115       { {  0.000000,  0.000000,  0.000000  }, {  0.000000,  0.000000,  0.000000  }  }
00116     },
00117     // calo phi projection parametrization for CSC, projection to HCAL in (for MIP)
00118     {
00119       { { -0.001691,  0.581263,  3.408109  }, { -0.019783, -1.150412, -0.622612  }  },
00120       { { -0.002138,  0.554844,  2.839203  }, { -0.018853, -0.986130, -1.098399  }  },
00121       { {  0.002930,  0.300343,  2.637024  }, { -0.021499, -0.705878, -1.024004  }  },
00122       { {  0.002278,  0.217012,  1.529797  }, { -0.019729, -0.581867, -0.343904  }  },
00123       { {  0.017130,  0.166188,  0.849492  }, { -0.035404, -0.321889, -0.612119  }  },
00124       { {  0.024403,  0.133149,  0.520598  }, { -0.043978, -0.156961, -0.719900  }  },
00125       { {  0.026036,  0.161303,  0.114142  }, { -0.045904, -0.096463, -0.652872  }  },
00126       { {  0.024208,  0.146788,  0.016299  }, { -0.043546, -0.023951, -0.683871  }  }
00127     },
00128     // calo phi projection parametrization for bRPC, projection to HCAL in (for MIP)
00129     {
00130       { {  0.015837,  0.665802,  3.613197  }, { -0.015709, -0.464655, -4.528647  }  },
00131       { {  0.017926,  0.613610,  3.745701  }, { -0.016081, -0.448283, -4.606902  }  },
00132       { {  0.014551,  0.797055,  3.479120  }, { -0.014036, -0.612790, -4.167947  }  },
00133       { {  0.018614,  0.637761,  4.156929  }, { -0.017071, -0.504211, -4.651026  }  },
00134       { {  0.017844,  0.685002,  3.569384  }, { -0.017014, -0.487703, -4.822967  }  },
00135       { {  0.016250,  0.753998,  3.303425  }, { -0.017553, -0.538919, -4.559156  }  },
00136       { {  0.019015,  0.653392,  3.993684  }, { -0.018937, -0.525990, -4.335586  }  },
00137       { {  0.017044,  0.659718,  3.461996  }, { -0.018881, -0.479496, -4.242701  }  }
00138     },
00139     // calo phi projection parametrization for fRPC, projection to HCAL in (for MIP)
00140     {
00141       { {  0.015301,  0.681718,  2.707917  }, { -0.015104, -0.555634, -3.052359  }  },
00142       { {  0.018868,  0.511874,  2.826352  }, { -0.015763, -0.549633, -2.301781  }  },
00143       { {  0.022818,  0.267658,  2.445503  }, { -0.018882, -0.216642, -2.313509  }  },
00144       { {  0.021048,  0.269100,  1.373464  }, { -0.018502, -0.228849, -1.458785  }  },
00145       { {  0.019976,  0.269698,  0.896744  }, { -0.021801, -0.227103, -1.032946  }  },
00146       { {  0.039155,  0.112461,  0.965459  }, { -0.043126, -0.065388, -1.062142  }  },
00147       { {  0.040538,  0.146610,  0.512473  }, { -0.045719, -0.079835, -0.681237  }  },
00148       { {  0.040019,  0.120561,  0.511092  }, { -0.044669, -0.031321, -0.745264  }  }
00149     }
00150   },
00151   {
00152     // calo phi projection parametrization for DT, projection to vertex (for ISO)
00153     {
00154       { { -0.019085,  2.530752,  3.112250  }, { -0.023016, -2.590798, -2.725504  }  },
00155       { { -0.018956,  2.533785,  2.969394  }, { -0.023637, -2.568775, -2.964180  }  },
00156       { { -0.018869,  2.533260,  2.940186  }, { -0.022805, -2.598547, -2.607942  }  },
00157       { { -0.019732,  2.527371,  2.611957  }, { -0.023624, -2.510180, -2.870058  }  },
00158       { { -0.019042,  2.477538,  2.628565  }, { -0.022541, -2.560252, -1.989453  }  },
00159       { { -0.018623,  2.408255,  2.631045  }, { -0.022602, -2.486282, -2.123144  }  },
00160       { { -0.019051,  2.424498,  2.422834  }, { -0.015844, -2.610096, -2.047908  }  },
00161       { {  0.000000,  0.000000,  0.000000  }, {  0.000000,  0.000000,  0.000000  }  }
00162     },
00163     // calo phi projection parametrization for CSC, projection to vertex (for ISO)
00164     {
00165       { { -0.017973,  2.508663,  1.548810  }, { -0.020354, -2.641325, -0.938284  }  },
00166       { { -0.018821,  2.346581,  1.584596  }, { -0.018082, -2.470272, -1.086931  }  },
00167       { { -0.016044,  1.919469,  1.765014  }, { -0.021392, -2.039066, -1.013819  }  },
00168       { { -0.013416,  1.526508,  1.576988  }, { -0.020571, -1.715829, -0.641736  }  },
00169       { { -0.011872,  1.200872,  1.248002  }, { -0.019462, -1.444363, -0.276027  }  },
00170       { { -0.009545,  0.882696,  1.369971  }, { -0.019899, -1.152519, -0.299660  }  },
00171       { { -0.007845,  0.657952,  1.103447  }, { -0.019512, -0.927346, -0.260993  }  },
00172       { { -0.006395,  0.478389,  1.283519  }, { -0.018998, -0.796310, -0.126124  }  }
00173     },
00174     // calo phi projection parametrization for bRPC, projection to vertex (for ISO)
00175     {
00176       { {  0.002479,  2.626429,  2.457669  }, {  0.000336, -2.438207, -3.453805  }  },
00177       { {  0.002440,  2.639809,  2.115057  }, {  0.000804, -2.486881, -3.044556  }  },
00178       { {  0.002161,  2.641236,  2.264882  }, {  0.001000, -2.491077, -2.856622  }  },
00179       { {  0.001901,  2.637712,  2.031976  }, { -0.001031, -2.410168, -3.299684  }  },
00180       { {  0.002487,  2.595609,  2.105496  }, {  0.000474, -2.422474, -3.296519  }  },
00181       { {  0.001624,  2.614643,  2.065672  }, { -0.000492, -2.468336, -2.884312  }  },
00182       { {  0.002451,  2.566535,  2.097821  }, { -0.002069, -2.451065, -2.481968  }  },
00183       { {  0.002541,  2.517676,  2.129723  }, {  0.000255, -2.467283, -2.342318  }  }
00184     },
00185     // calo phi projection parametrization for fRPC, projection to vertex (for ISO)
00186     {
00187       { {  0.000191,  2.586133,  1.009632  }, {  0.002492, -2.417437, -1.790964  }  },
00188       { {  0.000549,  2.282987,  0.992959  }, {  0.003267, -2.192674, -1.343063  }  },
00189       { {  0.000117,  2.081965,  0.577031  }, {  0.003213, -1.933657, -1.071969  }  },
00190       { { -0.001817,  1.899919,  0.061467  }, {  0.003783, -1.746777, -0.644316  }  },
00191       { { -0.001978,  1.613175,  0.304733  }, { -0.000203, -1.567548, -0.433546  }  },
00192       { { -0.003000,  1.437795,  0.192639  }, { -0.001441, -1.342958, -0.556960  }  },
00193       { { -0.003725,  1.309459, -0.159897  }, { -0.002232, -1.182838, -0.440219  }  },
00194       { { -0.005232,  1.179625, -0.153718  }, {  0.000748, -1.088718, -0.151436  }  }
00195     }
00196   }
00197 };
00198