CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/CondFormats/L1TObjects/interface/L1MuTriggerScales.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   \class L1MuTriggerScales
00004 //
00010 //                
00011 //   $Date: 2009/05/22 12:19:03 $
00012 //   $Revision: 1.6 $ 
00013 //
00014 //   Original Author :
00015 //   Hannes Sakulin      HEPHY / Vienna
00016 //
00017 //   Migrated to CMSSW:
00018 //   I. Mikulec
00019 //
00020 //--------------------------------------------------
00021 #ifndef CondFormatsL1TObjects_L1MuTriggerScales_h
00022 #define CondFormatsL1TObjects_L1MuTriggerScales_h
00023 
00024 #include <cmath>
00025 #include <iostream>
00026 #include <vector>
00027 
00028 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00029 #include "CondFormats/L1TObjects/interface/L1MuScale.h"
00030 
00031 class L1MuTriggerScales {
00032  public:
00033 
00035    L1MuTriggerScales() {}
00036 
00037    L1MuTriggerScales( int nbitPackingDTEta,
00038                       bool signedPackingDTEta,
00039                       int nbinsDTEta,
00040                       float minDTEta,
00041                       float maxDTEta,
00042                       int offsetDTEta,
00043 
00044                       int nbitPackingCSCEta,
00045                       int nbinsCSCEta,
00046                       float minCSCEta,
00047                       float maxCSCEta,
00048 
00049                       const std::vector<double>& scaleRPCEta,
00050                       int nbitPackingBrlRPCEta,
00051                       bool signedPackingBrlRPCEta,
00052                       int nbinsBrlRPCEta,
00053                       int offsetBrlRPCEta,
00054                       int nbitPackingFwdRPCEta,
00055                       bool signedPackingFwdRPCEta,
00056                       int nbinsFwdRPCEta,
00057                       int offsetFwdRPCEta,
00058 
00059                       int nbitPackingGMTEta,
00060                       int nbinsGMTEta,
00061                       const std::vector<double>& scaleGMTEta,
00062 
00063                       int nbitPackingPhi,
00064                       bool signedPackingPhi,
00065                       int nbinsPhi,
00066                       float minPhi,
00067                       float maxPhi
00068 
00069 /*                    int nbitPackingPt, */
00070 /*                    bool signedPackingPt, */
00071 /*                    int nbinsPt, */
00072 /*                    const std::vector<double>& scalePt */
00073 
00074                       ) {
00075 
00076     //
00077     // Regional Muon Trigger Eta Scales
00078     //
00079 /*     const float rpcetabins[34]= { */
00080 /*       -2.10, -1.97, -1.85, -1.73, -1.61, -1.48, */
00081 /*       -1.36, -1.24, -1.14, -1.04, -0.93, -0.83,  */
00082 /*       -0.72, -0.58, -0.44, -0.27, -0.07,      */
00083 /*               0.07,  0.27,  0.44,  0.58,  0.72, */
00084 /*        0.83,  0.93,  1.04,  1.14,  1.24,  1.36, */
00085 /*        1.48,  1.61,  1.73,  1.85,  1.97,  2.10}; */
00086 
00087     // DT
00088     //m_RegionalEtaScale[0] = L1MuBinnedScale( 6, true, 64, -1.2, 1.2, 32);
00089     m_RegionalEtaScale[0] = L1MuBinnedScale( nbitPackingDTEta,
00090                                              signedPackingDTEta,
00091                                              nbinsDTEta,
00092                                              minDTEta,
00093                                              maxDTEta,
00094                                              offsetDTEta );
00095 
00096     // RPC index -16 .. 16, brl RPC
00097     // m_RegionalEtaScale[1] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
00098     m_RegionalEtaScale[1] = L1MuBinnedScale (nbitPackingBrlRPCEta,
00099                                              signedPackingBrlRPCEta,
00100                                              nbinsBrlRPCEta,
00101                                              scaleRPCEta,
00102                                              offsetBrlRPCEta ) ;
00103 
00104     // CSC
00105     m_RegionalEtaScale[2] = L1MuBinnedScale() ;
00106     // // m_RegionalEtaScale[2] = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
00107     //    m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
00108     m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( nbitPackingCSCEta,
00109                                                        nbinsCSCEta,
00110                                                        minCSCEta,
00111                                                        maxCSCEta );
00112 
00113     // RPC index -16 .. 16, fwd RPC
00114     // m_RegionalEtaScale[3] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
00115     m_RegionalEtaScale[3] = L1MuBinnedScale (nbitPackingFwdRPCEta,
00116                                              signedPackingFwdRPCEta,
00117                                              nbinsFwdRPCEta,
00118                                              scaleRPCEta,
00119                                              offsetFwdRPCEta );
00120 
00121     //
00122     // Eta scale at GMT output
00123     //
00124 
00125 /*     const float gmt_outputetascale[32] = {  0.00, */
00126 /*             0.10,  0.20,  0.30,  0.40,  0.50,  0.60,  0.70,  0.80,  */
00127 /*             0.90,  1.00,  1.10,  1.20,  1.30,  1.40,  1.50,  1.60, */
00128 /*             1.70,  1.75,  1.80,  1.85,  1.90,  1.95,  2.00,  2.05, */
00129 /*             2.10,  2.15,  2.20,  2.25,  2.30,  2.35,  2.40 }; */
00130 
00131     // m_GMTEtaScale = L1MuSymmetricBinnedScale (6, 31, gmt_outputetascale);
00132     m_GMTEtaScale = L1MuSymmetricBinnedScale (nbitPackingGMTEta,
00133                                               nbinsGMTEta,
00134                                               scaleGMTEta );
00135 
00136     //
00137     // Phi Scale. Common to all Regioanl Muon Triggers and GMT
00138     // 
00139 
00140     // m_PhiScale = L1MuBinnedScale (8, false, 144, 0., 2. * M_PI);
00141     m_PhiScale = L1MuBinnedScale (nbitPackingPhi,
00142                                   signedPackingPhi,
00143                                   nbinsPhi,
00144                                   minPhi,
00145                                   maxPhi );
00146 
00147     //
00148     // Pt Scale. Common to all Regioanl Muon Triggers and GMT
00149     // 
00150 
00151     // pt scale in GeV
00152     // low edges of pt bins
00153 /*     const float ptscale[33] = {  */
00154 /*       -1.,   0.0,   1.5,   2.0,   2.5,   3.0,   3.5,   4.0, */
00155 /*       4.5,   5.0,   6.0,   7.0,   8.0,  10.0,  12.0,  14.0,   */
00156 /*       16.0,  18.0,  20.0,  25.0,  30.0,  35.0,  40.0,  45.0,  */
00157 /*       50.0,  60.0,  70.0,  80.0,  90.0, 100.0, 120.0, 140.0, 1.E6 }; */
00158 
00159     // m_PtScale = L1MuBinnedScale ( 5, false, 32, ptscale) ;
00160 /*     m_PtScale = L1MuBinnedScale ( nbitPackingPt, */
00161 /*                                signedPackingPt, */
00162 /*                                nbinsPt, */
00163 /*                                scalePt ) ; */
00164 
00165   };
00166 
00167 
00169   virtual ~L1MuTriggerScales() {
00170 //     for (int i=0; i<4; i++) 
00171 //       delete m_RegionalEtaScale[i];
00172 
00173 //     delete m_GMTEtaScale;
00174 //     delete m_PhiScale;
00175 //     delete m_PtScale; 
00176   };
00177   
00179   const L1MuScale* getRegionalEtaScale(int isys) const { 
00180     if (isys<0 || isys>3) edm::LogWarning("ScaleRangeViolation") << "Error in L1MuTriggerScales:: isys out of range: " << isys;
00181     if( isys == 2 )
00182     {
00183        return &m_RegionalEtaScaleCSC ;
00184     }
00185     else
00186     {
00187        return &( m_RegionalEtaScale[isys] ); 
00188     }
00189   };
00190 
00192   const L1MuScale* getGMTEtaScale() const { return &m_GMTEtaScale ; };
00193 
00195   void setGMTEtaScale(const L1MuSymmetricBinnedScale& scale)  { m_GMTEtaScale = scale ; };
00196 
00197 
00199   const L1MuScale* getPhiScale() const { return &m_PhiScale;};
00200 
00202   void setPhiScale(const L1MuBinnedScale& scale)  { m_PhiScale = scale ; };
00203   
00204 /*   /// get the Pt scale */
00205 /*   const L1MuScale* getPtScale() const { return &m_PtScale;}; */
00206   
00207 
00208  private:
00209   L1MuBinnedScale m_RegionalEtaScale[4]; // 2=csc will be empty
00210   L1MuSymmetricBinnedScale m_RegionalEtaScaleCSC ;
00211   L1MuSymmetricBinnedScale m_GMTEtaScale;
00212   L1MuBinnedScale m_PhiScale;
00213   //  L1MuBinnedScale m_PtScale;
00214 };
00215 
00216 
00217 #endif