Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:54:17

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) { setDefaults(ps); }
0043 
0044 //--------------
0045 // Destructor --
0046 //--------------
0047 L1MuDTTFConfig::~L1MuDTTFConfig() {}
0048 
0049 //--------------
0050 // Operations --
0051 //--------------
0052 
0053 void L1MuDTTFConfig::setDefaults(const edm::ParameterSet& ps) {
0054   m_DTDigiInputTag = ps.getParameter<edm::InputTag>("DTDigi_Source");
0055   m_CSCTrSInputTag = ps.getParameter<edm::InputTag>("CSCStub_Source");
0056 
0057   m_debug = true;
0058   m_dbgLevel = ps.getUntrackedParameter<int>("Debug", 0);
0059 
0060   m_overlap = ps.getUntrackedParameter<bool>("Overlap", true);
0061 
0062   // set min and max bunch crossing
0063   m_BxMin = ps.getUntrackedParameter<int>("BX_min", -9);
0064   m_BxMax = ps.getUntrackedParameter<int>("BX_max", 7);
0065   s_BxMin = m_BxMin;
0066   s_BxMax = m_BxMax;
0067 
0068   // set Filter for Extrapolator
0069   m_extTSFilter = ps.getUntrackedParameter<int>("Extrapolation_Filter", 1);
0070 
0071   // set switch for open LUTs usage
0072   m_openLUTs = ps.getUntrackedParameter<bool>("Open_LUTs", false);
0073 
0074   // set switch for EX21 usage
0075   m_useEX21 = ps.getUntrackedParameter<bool>("Extrapolation_21", false);
0076 
0077   // set switch for eta track finder usage
0078   m_etaTF = ps.getUntrackedParameter<bool>("EtaTrackFinder", true);
0079 
0080   // set switch for etaFlag cancellation of CSC segments
0081   m_etacanc = ps.getUntrackedParameter<bool>("CSC_Eta_Cancellation", false);
0082 
0083   // set Filter for Out-of-time Track Segments
0084   m_TSOutOfTimeFilter = ps.getUntrackedParameter<bool>("OutOfTime_Filter", false);
0085   m_TSOutOfTimeWindow = ps.getUntrackedParameter<int>("OutOfTime_Filter_Window", 1);
0086 
0087   // set precision for extrapolation
0088   m_NbitsExtPhi = ps.getUntrackedParameter<int>("Extrapolation_nbits_Phi", 8);
0089   m_NbitsExtPhib = ps.getUntrackedParameter<int>("Extrapolation_nbits_PhiB", 8);
0090 
0091   // set precision for pt-assignment
0092   m_NbitsPtaPhi = ps.getUntrackedParameter<int>("PT_Assignment_nbits_Phi", 12);
0093   m_NbitsPtaPhib = ps.getUntrackedParameter<int>("PT_Assignment_nbits_PhiB", 10);
0094 
0095   // set precision for phi-assignment look-up tables
0096   m_NbitsPhiPhi = ps.getUntrackedParameter<int>("PHI_Assignment_nbits_Phi", 10);
0097   m_NbitsPhiPhib = ps.getUntrackedParameter<int>("PHI_Assignment_nbits_PhiB", 10);
0098 
0099   if (Debug(1))
0100     cout << endl;
0101   if (Debug(1))
0102     cout << "*******************************************" << endl;
0103   if (Debug(1))
0104     cout << "**** L1 barrel Track Finder settings : ****" << endl;
0105   if (Debug(1))
0106     cout << "*******************************************" << endl;
0107   if (Debug(1))
0108     cout << endl;
0109 
0110   if (Debug(1))
0111     cout << "L1 barrel Track Finder : DT Digi Source:  " << m_DTDigiInputTag << endl;
0112   if (Debug(1))
0113     cout << "L1 barrel Track Finder : CSC Stub Source: " << m_CSCTrSInputTag << endl;
0114   if (Debug(1))
0115     cout << endl;
0116 
0117   if (Debug(1))
0118     cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
0119 
0120   if (Debug(1) && m_overlap) {
0121     cout << "L1 barrel Track Finder : barrel-endcap overlap region : on" << endl;
0122   }
0123   if (Debug(1) && !m_overlap) {
0124     cout << "L1 barrel Track Finder : barrel-endcap overlap region : off" << endl;
0125   }
0126 
0127   if (Debug(1))
0128     cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
0129   if (Debug(1))
0130     cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
0131 
0132   if (Debug(1))
0133     cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
0134 
0135   if (Debug(1) && m_openLUTs) {
0136     cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
0137   }
0138   if (Debug(1) && !m_openLUTs) {
0139     cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
0140   }
0141 
0142   if (Debug(1) && m_useEX21) {
0143     cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
0144   }
0145   if (Debug(1) && !m_useEX21) {
0146     cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
0147   }
0148 
0149   if (Debug(1) && m_etaTF) {
0150     cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
0151   }
0152   if (Debug(1) && !m_etaTF) {
0153     cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
0154   }
0155 
0156   if (Debug(1) && m_etacanc) {
0157     cout << "L1 barrel Track Finder : CSC etaFlag cancellation : on" << endl;
0158   }
0159   if (Debug(1) && !m_etacanc) {
0160     cout << "L1 barrel Track Finder : CSC etaFlag cancellation : off" << endl;
0161   }
0162 
0163   if (Debug(1) && m_TSOutOfTimeFilter) {
0164     cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
0165     cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
0166   }
0167   if (Debug(1) && !m_TSOutOfTimeFilter) {
0168     cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
0169   }
0170 
0171   if (Debug(1))
0172     cout << "L1 barrel Track Finder : # of bits used for phi  (extrapolation)  : " << m_NbitsExtPhi << endl;
0173   if (Debug(1))
0174     cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation)  : " << m_NbitsExtPhib << endl;
0175   if (Debug(1))
0176     cout << "L1 barrel Track Finder : # of bits used for phi  (pt-assignment)  : " << m_NbitsPtaPhi << endl;
0177   if (Debug(1))
0178     cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment)  : " << m_NbitsPtaPhib << endl;
0179   if (Debug(1))
0180     cout << "L1 barrel Track Finder : # of bits used for phi  (phi-assignment) : " << m_NbitsPhiPhi << endl;
0181   if (Debug(1))
0182     cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
0183 }
0184 
0185 std::atomic<bool> L1MuDTTFConfig::m_debug{false};
0186 std::atomic<int> L1MuDTTFConfig::m_dbgLevel{-1};
0187 std::atomic<int> L1MuDTTFConfig::s_BxMin{-9};
0188 std::atomic<int> L1MuDTTFConfig::s_BxMax{-7};