Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-07 02:12:41

0001 //-------------------------------------------------
0002 //
0003 //   Class: L1MuDTTFConfig
0004 //
0005 //   Description: DTTrackFinder parameters for L1MuDTTrackFinder
0006 //
0007 //
0008 //
0009 //   Author :
0010 //   N. Neumeister            CERN EP
0011 //   J. Troconiz              UAM Madrid
0012 //
0013 //--------------------------------------------------
0014 
0015 //-----------------------
0016 // This Class's Header --
0017 //-----------------------
0018 
0019 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTFConfig.h"
0020 
0021 //---------------
0022 // C++ Headers --
0023 //---------------
0024 
0025 #include <iostream>
0026 #include <string>
0027 
0028 //-------------------------------
0029 // Collaborating Class Headers --
0030 //-------------------------------
0031 
0032 using namespace std;
0033 
0034 // --------------------------------
0035 //       class L1MuDTTFConfig
0036 //---------------------------------
0037 
0038 //----------------
0039 // Constructors --
0040 //----------------
0041 
0042 L1MuDTTFConfig::L1MuDTTFConfig(const edm::ParameterSet& ps) {
0043   m_ps = &ps;
0044   setDefaults();
0045 }
0046 
0047 //--------------
0048 // Destructor --
0049 //--------------
0050 L1MuDTTFConfig::~L1MuDTTFConfig() {}
0051 
0052 //--------------
0053 // Operations --
0054 //--------------
0055 
0056 void L1MuDTTFConfig::setDefaults() {
0057   m_DTDigiInputTag = m_ps->getParameter<edm::InputTag>("DTDigi_Source");
0058   m_CSCTrSInputTag = m_ps->getParameter<edm::InputTag>("CSCStub_Source");
0059 
0060   m_debug = true;
0061   m_dbgLevel = m_ps->getUntrackedParameter<int>("Debug", 0);
0062 
0063   m_overlap = m_ps->getUntrackedParameter<bool>("Overlap", true);
0064 
0065   // set min and max bunch crossing
0066   m_BxMin = m_ps->getUntrackedParameter<int>("BX_min", -9);
0067   m_BxMax = m_ps->getUntrackedParameter<int>("BX_max", 7);
0068   s_BxMin = m_BxMin;
0069   s_BxMax = m_BxMax;
0070 
0071   // set Filter for Extrapolator
0072   m_extTSFilter = m_ps->getUntrackedParameter<int>("Extrapolation_Filter", 1);
0073 
0074   // set switch for open LUTs usage
0075   m_openLUTs = m_ps->getUntrackedParameter<bool>("Open_LUTs", false);
0076 
0077   // set switch for EX21 usage
0078   m_useEX21 = m_ps->getUntrackedParameter<bool>("Extrapolation_21", false);
0079 
0080   // set switch for eta track finder usage
0081   m_etaTF = m_ps->getUntrackedParameter<bool>("EtaTrackFinder", true);
0082 
0083   // set switch for etaFlag cancellation of CSC segments
0084   m_etacanc = m_ps->getUntrackedParameter<bool>("CSC_Eta_Cancellation", false);
0085 
0086   // set Filter for Out-of-time Track Segments
0087   m_TSOutOfTimeFilter = m_ps->getUntrackedParameter<bool>("OutOfTime_Filter", false);
0088   m_TSOutOfTimeWindow = m_ps->getUntrackedParameter<int>("OutOfTime_Filter_Window", 1);
0089 
0090   // set precision for extrapolation
0091   m_NbitsExtPhi = m_ps->getUntrackedParameter<int>("Extrapolation_nbits_Phi", 8);
0092   m_NbitsExtPhib = m_ps->getUntrackedParameter<int>("Extrapolation_nbits_PhiB", 8);
0093 
0094   // set precision for pt-assignment
0095   m_NbitsPtaPhi = m_ps->getUntrackedParameter<int>("PT_Assignment_nbits_Phi", 12);
0096   m_NbitsPtaPhib = m_ps->getUntrackedParameter<int>("PT_Assignment_nbits_PhiB", 10);
0097 
0098   // set precision for phi-assignment look-up tables
0099   m_NbitsPhiPhi = m_ps->getUntrackedParameter<int>("PHI_Assignment_nbits_Phi", 10);
0100   m_NbitsPhiPhib = m_ps->getUntrackedParameter<int>("PHI_Assignment_nbits_PhiB", 10);
0101 
0102   if (Debug(1))
0103     cout << endl;
0104   if (Debug(1))
0105     cout << "*******************************************" << endl;
0106   if (Debug(1))
0107     cout << "**** L1 barrel Track Finder settings : ****" << endl;
0108   if (Debug(1))
0109     cout << "*******************************************" << endl;
0110   if (Debug(1))
0111     cout << endl;
0112 
0113   if (Debug(1))
0114     cout << "L1 barrel Track Finder : DT Digi Source:  " << m_DTDigiInputTag << endl;
0115   if (Debug(1))
0116     cout << "L1 barrel Track Finder : CSC Stub Source: " << m_CSCTrSInputTag << endl;
0117   if (Debug(1))
0118     cout << endl;
0119 
0120   if (Debug(1))
0121     cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
0122 
0123   if (Debug(1) && m_overlap) {
0124     cout << "L1 barrel Track Finder : barrel-endcap overlap region : on" << endl;
0125   }
0126   if (Debug(1) && !m_overlap) {
0127     cout << "L1 barrel Track Finder : barrel-endcap overlap region : off" << endl;
0128   }
0129 
0130   if (Debug(1))
0131     cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
0132   if (Debug(1))
0133     cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
0134 
0135   if (Debug(1))
0136     cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
0137 
0138   if (Debug(1) && m_openLUTs) {
0139     cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
0140   }
0141   if (Debug(1) && !m_openLUTs) {
0142     cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
0143   }
0144 
0145   if (Debug(1) && m_useEX21) {
0146     cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
0147   }
0148   if (Debug(1) && !m_useEX21) {
0149     cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
0150   }
0151 
0152   if (Debug(1) && m_etaTF) {
0153     cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
0154   }
0155   if (Debug(1) && !m_etaTF) {
0156     cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
0157   }
0158 
0159   if (Debug(1) && m_etacanc) {
0160     cout << "L1 barrel Track Finder : CSC etaFlag cancellation : on" << endl;
0161   }
0162   if (Debug(1) && !m_etacanc) {
0163     cout << "L1 barrel Track Finder : CSC etaFlag cancellation : off" << endl;
0164   }
0165 
0166   if (Debug(1) && m_TSOutOfTimeFilter) {
0167     cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
0168     cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
0169   }
0170   if (Debug(1) && !m_TSOutOfTimeFilter) {
0171     cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
0172   }
0173 
0174   if (Debug(1))
0175     cout << "L1 barrel Track Finder : # of bits used for phi  (extrapolation)  : " << m_NbitsExtPhi << endl;
0176   if (Debug(1))
0177     cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation)  : " << m_NbitsExtPhib << endl;
0178   if (Debug(1))
0179     cout << "L1 barrel Track Finder : # of bits used for phi  (pt-assignment)  : " << m_NbitsPtaPhi << endl;
0180   if (Debug(1))
0181     cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment)  : " << m_NbitsPtaPhib << endl;
0182   if (Debug(1))
0183     cout << "L1 barrel Track Finder : # of bits used for phi  (phi-assignment) : " << m_NbitsPhiPhi << endl;
0184   if (Debug(1))
0185     cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
0186 }
0187 
0188 std::atomic<bool> L1MuDTTFConfig::m_debug{false};
0189 std::atomic<int> L1MuDTTFConfig::m_dbgLevel{-1};
0190 std::atomic<int> L1MuDTTFConfig::s_BxMin{-9};
0191 std::atomic<int> L1MuDTTFConfig::s_BxMax{-7};