CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/L1Trigger/DTTrackFinder/src/L1MuDTTFConfig.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class: L1MuDTTFConfig
00004 //
00005 //   Description: DTTrackFinder parameters for L1MuDTTrackFinder
00006 //
00007 //
00008 //   $Date: 2012/07/05 11:06:57 $
00009 //   $Revision: 1.9 $
00010 //
00011 //   Author :
00012 //   N. Neumeister            CERN EP
00013 //   J. Troconiz              UAM Madrid
00014 //
00015 //--------------------------------------------------
00016 
00017 //-----------------------
00018 // This Class's Header --
00019 //-----------------------
00020 
00021 #include "L1Trigger/DTTrackFinder/src/L1MuDTTFConfig.h"
00022 
00023 //---------------
00024 // C++ Headers --
00025 //---------------
00026 
00027 #include <iostream>
00028 #include <string>
00029 
00030 //-------------------------------
00031 // Collaborating Class Headers --
00032 //-------------------------------
00033 
00034 using namespace std;
00035 
00036 // --------------------------------
00037 //       class L1MuDTTFConfig
00038 //---------------------------------
00039 
00040 //----------------
00041 // Constructors --
00042 //----------------
00043 
00044 L1MuDTTFConfig::L1MuDTTFConfig(const edm::ParameterSet & ps) { 
00045     
00046     m_ps = &ps;
00047     setDefaults(); 
00048 
00049 }
00050   
00051 
00052 //--------------
00053 // Destructor --
00054 //--------------
00055 L1MuDTTFConfig::~L1MuDTTFConfig() {}
00056 
00057 
00058 //--------------
00059 // Operations --
00060 //--------------
00061 
00062 void L1MuDTTFConfig::setDefaults() {
00063 
00064   m_DTDigiInputTag = m_ps->getParameter<edm::InputTag>("DTDigi_Source");
00065   m_CSCTrSInputTag = m_ps->getParameter<edm::InputTag>("CSCStub_Source");
00066 
00067   m_debug = true;
00068   m_dbgLevel = m_ps->getUntrackedParameter<int>("Debug",0);
00069 
00070   m_overlap = m_ps->getUntrackedParameter<bool>("Overlap",true);
00071 
00072   // set min and max bunch crossing
00073   m_BxMin = m_ps->getUntrackedParameter<int>("BX_min",-9);
00074   m_BxMax = m_ps->getUntrackedParameter<int>("BX_max", 7);
00075 
00076   // set Filter for Extrapolator
00077   m_extTSFilter = m_ps->getUntrackedParameter<int>("Extrapolation_Filter",1);
00078 
00079   // set switch for open LUTs usage
00080   m_openLUTs = m_ps->getUntrackedParameter<bool>("Open_LUTs",false);
00081 
00082   // set switch for EX21 usage
00083   m_useEX21 = m_ps->getUntrackedParameter<bool>("Extrapolation_21",false);
00084 
00085   // set switch for eta track finder usage
00086   m_etaTF = m_ps->getUntrackedParameter<bool>("EtaTrackFinder",true);
00087 
00088   // set switch for etaFlag cancellation of CSC segments
00089   m_etacanc = m_ps->getUntrackedParameter<bool>("CSC_Eta_Cancellation",false);
00090 
00091   // set Filter for Out-of-time Track Segments
00092   m_TSOutOfTimeFilter = m_ps->getUntrackedParameter<bool>("OutOfTime_Filter",false);
00093   m_TSOutOfTimeWindow = m_ps->getUntrackedParameter<int>("OutOfTime_Filter_Window",1);
00094 
00095   // set precision for extrapolation
00096   m_NbitsExtPhi  = m_ps->getUntrackedParameter<int>("Extrapolation_nbits_Phi", 8);
00097   m_NbitsExtPhib = m_ps->getUntrackedParameter<int>("Extrapolation_nbits_PhiB",8);
00098 
00099   // set precision for pt-assignment
00100   m_NbitsPtaPhi  = m_ps->getUntrackedParameter<int>("PT_Assignment_nbits_Phi", 12);
00101   m_NbitsPtaPhib = m_ps->getUntrackedParameter<int>("PT_Assignment_nbits_PhiB",10);
00102 
00103   // set precision for phi-assignment look-up tables
00104   m_NbitsPhiPhi  = m_ps->getUntrackedParameter<int>("PHI_Assignment_nbits_Phi", 10);
00105   m_NbitsPhiPhib = m_ps->getUntrackedParameter<int>("PHI_Assignment_nbits_PhiB",10);
00106 
00107   if ( Debug(1) ) cout << endl;
00108   if ( Debug(1) ) cout << "*******************************************" << endl;  
00109   if ( Debug(1) ) cout << "**** L1 barrel Track Finder settings : ****" << endl;
00110   if ( Debug(1) ) cout << "*******************************************" << endl;
00111   if ( Debug(1) ) cout << endl;
00112   
00113   if ( Debug(1) ) cout << "L1 barrel Track Finder : DT Digi Source:  " <<  m_DTDigiInputTag << endl;
00114   if ( Debug(1) ) cout << "L1 barrel Track Finder : CSC Stub Source: " <<  m_CSCTrSInputTag << endl;
00115   if ( Debug(1) ) cout << endl;
00116 
00117   if ( Debug(1) ) cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
00118 
00119   if ( Debug(1) && m_overlap ) {
00120     cout << "L1 barrel Track Finder : barrel-endcap overlap region : on" << endl;
00121   }
00122   if ( Debug(1) && !m_overlap ) { 
00123     cout << "L1 barrel Track Finder : barrel-endcap overlap region : off" << endl;
00124   }
00125 
00126   if ( Debug(1) ) cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
00127   if ( Debug(1) ) cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
00128 
00129   if ( Debug(1) ) cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
00130 
00131   if ( Debug(1) && m_openLUTs) {
00132     cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
00133   }
00134   if ( Debug(1) && !m_openLUTs) {
00135     cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
00136   }
00137 
00138   if ( Debug(1) && m_useEX21 ) {
00139     cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
00140   }
00141   if ( Debug(1) && !m_useEX21 ) {
00142     cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
00143   }
00144 
00145   if ( Debug(1) && m_etaTF ) {
00146     cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
00147   }
00148   if ( Debug(1) && !m_etaTF ) {
00149     cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
00150   }
00151 
00152   if ( Debug(1) && m_etacanc ) {
00153     cout << "L1 barrel Track Finder : CSC etaFlag cancellation : on" << endl;
00154   }
00155   if ( Debug(1) && !m_etacanc ) {
00156     cout << "L1 barrel Track Finder : CSC etaFlag cancellation : off" << endl;
00157   }
00158 
00159   if ( Debug(1) && m_TSOutOfTimeFilter ) {
00160     cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
00161     cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
00162   }
00163   if ( Debug(1) && !m_TSOutOfTimeFilter ) {
00164     cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
00165   }
00166 
00167   if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phi  (extrapolation)  : " << m_NbitsExtPhi << endl;
00168   if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation)  : " << m_NbitsExtPhib << endl;
00169   if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phi  (pt-assignment)  : " << m_NbitsPtaPhi << endl;
00170   if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment)  : " << m_NbitsPtaPhib << endl;
00171   if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phi  (phi-assignment) : " << m_NbitsPhiPhi << endl;
00172   if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
00173 
00174 }
00175 
00176 
00177 // static data members
00178 
00179 edm::InputTag L1MuDTTFConfig::m_DTDigiInputTag = edm::InputTag();
00180 edm::InputTag L1MuDTTFConfig::m_CSCTrSInputTag = edm::InputTag();
00181 
00182 bool L1MuDTTFConfig::m_debug = false;
00183 int  L1MuDTTFConfig::m_dbgLevel = -1;
00184 bool L1MuDTTFConfig::m_overlap = true;
00185 int  L1MuDTTFConfig::m_BxMin = -9;
00186 int  L1MuDTTFConfig::m_BxMax =  7;
00187 int  L1MuDTTFConfig::m_extTSFilter  = 1;
00188 bool L1MuDTTFConfig::m_openLUTs  = false;
00189 bool L1MuDTTFConfig::m_useEX21 = false;
00190 bool L1MuDTTFConfig::m_etaTF = true;
00191 bool L1MuDTTFConfig::m_etacanc = false;
00192 bool L1MuDTTFConfig::m_TSOutOfTimeFilter = false;
00193 int  L1MuDTTFConfig::m_TSOutOfTimeWindow = 1;
00194 int  L1MuDTTFConfig::m_NbitsExtPhi  = 8; 
00195 int  L1MuDTTFConfig::m_NbitsExtPhib = 8;
00196 int  L1MuDTTFConfig::m_NbitsPtaPhi  = 12; 
00197 int  L1MuDTTFConfig::m_NbitsPtaPhib = 10;
00198 int  L1MuDTTFConfig::m_NbitsPhiPhi  = 10; 
00199 int  L1MuDTTFConfig::m_NbitsPhiPhib = 10;