CMS 3D CMS Logo

L1MuTriggerScales.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   \class L1MuTriggerScales
00004 //
00010 //                
00011 //   $Date: 2008/04/16 23:25:10 $
00012 //   $Revision: 1.4 $ 
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] = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
00106     //    m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
00107     m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( nbitPackingCSCEta,
00108                                                        nbinsCSCEta,
00109                                                        minCSCEta,
00110                                                        maxCSCEta );
00111 
00112     // RPC index -16 .. 16, fwd RPC
00113     // m_RegionalEtaScale[3] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
00114     m_RegionalEtaScale[3] = L1MuBinnedScale (nbitPackingFwdRPCEta,
00115                                              signedPackingFwdRPCEta,
00116                                              nbinsFwdRPCEta,
00117                                              scaleRPCEta,
00118                                              offsetFwdRPCEta );
00119 
00120     //
00121     // Eta scale at GMT output
00122     //
00123 
00124 /*     const float gmt_outputetascale[32] = {  0.00, */
00125 /*             0.10,  0.20,  0.30,  0.40,  0.50,  0.60,  0.70,  0.80,  */
00126 /*             0.90,  1.00,  1.10,  1.20,  1.30,  1.40,  1.50,  1.60, */
00127 /*             1.70,  1.75,  1.80,  1.85,  1.90,  1.95,  2.00,  2.05, */
00128 /*             2.10,  2.15,  2.20,  2.25,  2.30,  2.35,  2.40 }; */
00129 
00130     // m_GMTEtaScale = L1MuSymmetricBinnedScale (6, 31, gmt_outputetascale);
00131     m_GMTEtaScale = L1MuSymmetricBinnedScale (nbitPackingGMTEta,
00132                                               nbinsGMTEta,
00133                                               scaleGMTEta );
00134 
00135     //
00136     // Phi Scale. Common to all Regioanl Muon Triggers and GMT
00137     // 
00138 
00139     // m_PhiScale = L1MuBinnedScale (8, false, 144, 0., 2. * M_PI);
00140     m_PhiScale = L1MuBinnedScale (nbitPackingPhi,
00141                                   signedPackingPhi,
00142                                   nbinsPhi,
00143                                   minPhi,
00144                                   maxPhi );
00145 
00146     //
00147     // Pt Scale. Common to all Regioanl Muon Triggers and GMT
00148     // 
00149 
00150     // pt scale in GeV
00151     // low edges of pt bins
00152 /*     const float ptscale[33] = {  */
00153 /*       -1.,   0.0,   1.5,   2.0,   2.5,   3.0,   3.5,   4.0, */
00154 /*       4.5,   5.0,   6.0,   7.0,   8.0,  10.0,  12.0,  14.0,   */
00155 /*       16.0,  18.0,  20.0,  25.0,  30.0,  35.0,  40.0,  45.0,  */
00156 /*       50.0,  60.0,  70.0,  80.0,  90.0, 100.0, 120.0, 140.0, 1.E6 }; */
00157 
00158     // m_PtScale = L1MuBinnedScale ( 5, false, 32, ptscale) ;
00159 /*     m_PtScale = L1MuBinnedScale ( nbitPackingPt, */
00160 /*                                signedPackingPt, */
00161 /*                                nbinsPt, */
00162 /*                                scalePt ) ; */
00163 
00164   };
00165 
00166 
00168   virtual ~L1MuTriggerScales() {
00169 //     for (int i=0; i<4; i++) 
00170 //       delete m_RegionalEtaScale[i];
00171 
00172 //     delete m_GMTEtaScale;
00173 //     delete m_PhiScale;
00174 //     delete m_PtScale; 
00175   };
00176   
00178   const L1MuScale* getRegionalEtaScale(int isys) const { 
00179     if (isys<0 || isys>3) edm::LogWarning("ScaleRangeViolation") << "Error in L1MuTriggerScales:: isys out of range: " << isys;
00180     if( isys == 2 )
00181     {
00182        return &m_RegionalEtaScaleCSC ;
00183     }
00184     else
00185     {
00186        return &( m_RegionalEtaScale[isys] ); 
00187     }
00188   };
00189 
00191   const L1MuScale* getGMTEtaScale() const { return &m_GMTEtaScale ; };
00192 
00194   const L1MuScale* getPhiScale() const { return &m_PhiScale;};
00195   
00196 /*   /// get the Pt scale */
00197 /*   const L1MuScale* getPtScale() const { return &m_PtScale;}; */
00198   
00199 
00200  private:
00201   L1MuBinnedScale m_RegionalEtaScale[4]; // 2=csc will be empty
00202   L1MuSymmetricBinnedScale m_RegionalEtaScaleCSC ;
00203   L1MuSymmetricBinnedScale m_GMTEtaScale;
00204   L1MuBinnedScale m_PhiScale;
00205   //  L1MuBinnedScale m_PtScale;
00206 };
00207 
00208 
00209 #endif

Generated on Tue Jun 9 17:26:38 2009 for CMSSW by  doxygen 1.5.4