Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:51

0001 //-------------------------------------------------
0002 //
0003 //   Class: L1MuBMTFConfig
0004 //
0005 //   Description: L1TMuonBarrelTrackProducer parameters for L1MuBMTrackFinder
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/L1TMuonBarrel/src/L1MuBMTFConfig.h"
0020 
0021 #include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
0022 
0023 //---------------
0024 // C++ Headers --
0025 //---------------
0026 
0027 #include <iostream>
0028 #include <string>
0029 
0030 //-------------------------------
0031 // Collaborating Class Headers --
0032 //-------------------------------
0033 
0034 using namespace std;
0035 
0036 // --------------------------------
0037 //       class L1MuBMTFConfig
0038 //---------------------------------
0039 
0040 //----------------
0041 // Constructors --
0042 //----------------
0043 
0044 L1MuBMTFConfig::L1MuBMTFConfig(const edm::ParameterSet& ps) { setDefaults(ps); }
0045 
0046 //--------------
0047 // Destructor --
0048 //--------------
0049 L1MuBMTFConfig::~L1MuBMTFConfig() {}
0050 
0051 //--------------
0052 // Operations --
0053 //--------------
0054 
0055 void L1MuBMTFConfig::setDefaults(const edm::ParameterSet& ps) {
0056   m_BMDigiInputTag = ps.getParameter<edm::InputTag>("DTDigi_Source");
0057   m_BMThetaDigiInputTag = ps.getParameter<edm::InputTag>("DTDigi_Theta_Source");
0058 
0059   m_debug = true;
0060   m_dbgLevel = ps.getUntrackedParameter<int>("Debug", 0);
0061 
0062   if (Debug(1))
0063     cout << endl;
0064   if (Debug(1))
0065     cout << "*******************************************" << endl;
0066   if (Debug(1))
0067     cout << "**** L1 barrel Track Finder settings : ****" << endl;
0068   if (Debug(1))
0069     cout << "*******************************************" << endl;
0070   if (Debug(1))
0071     cout << endl;
0072 
0073   if (Debug(1))
0074     cout << "L1 barrel Track Finder : BM Digi Source:  " << m_BMDigiInputTag << endl;
0075   if (Debug(1))
0076     cout << "L1 barrel Track Finder : BM Digi Source:  " << m_BMThetaDigiInputTag << endl;
0077   if (Debug(1))
0078     cout << endl;
0079 
0080   if (Debug(1))
0081     cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
0082 }
0083 
0084 void L1MuBMTFConfig::setDefaultsES(const L1TMuonBarrelParams& bmParams) {
0085   // L1TMuonBarrelParams *bmtfParams = new L1TMuonBarrelParams();
0086   // bmtfParams = new L1TMuonBarrelParams(*bmtfParamsHandle.product());
0087   L1TMuonBarrelParamsAllPublic* bmtfParams = new L1TMuonBarrelParamsAllPublic(bmParams);
0088 
0089   // set min and max bunch crossing
0090   m_BxMin = bmtfParams->get_BX_min();
0091   m_BxMax = bmtfParams->get_BX_max();
0092 
0093   // set Filter for Extrapolator
0094   m_extTSFilter = bmtfParams->get_Extrapolation_Filter();
0095 
0096   // set switch for open LUTs usage
0097   m_openLUTs = bmtfParams->get_Open_LUTs();
0098 
0099   // set switch for EX21 usage
0100   m_useEX21 = bmtfParams->get_Extrapolation_21();
0101 
0102   // set switch for eta track finder usage
0103   m_etaTF = bmtfParams->get_EtaTrackFinder();
0104 
0105   // set Filter for Out-of-time Track Segments
0106   m_TSOutOfTimeFilter = bmtfParams->get_OutOfTime_Filter();
0107   m_TSOutOfTimeWindow = bmtfParams->get_OutOfTime_Filter_Window();
0108 
0109   // set precision for extrapolation
0110   m_NbitsExtPhi = bmtfParams->get_Extrapolation_nbits_Phi();
0111   m_NbitsExtPhib = bmtfParams->get_Extrapolation_nbits_PhiB();
0112 
0113   // set precision for pt-assignment
0114   m_NbitsPtaPhi = bmtfParams->get_PT_Assignment_nbits_Phi();
0115   m_NbitsPtaPhib = bmtfParams->get_PT_Assignment_nbits_PhiB();
0116 
0117   // set precision for phi-assignment look-up tables
0118   m_NbitsPhiPhi = bmtfParams->get_PHI_Assignment_nbits_Phi();
0119   m_NbitsExtPhib = bmtfParams->get_PHI_Assignment_nbits_PhiB();
0120 
0121   if (Debug(1))
0122     cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
0123   if (Debug(1))
0124     cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
0125 
0126   if (Debug(1))
0127     cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
0128 
0129   if (Debug(1) && m_openLUTs) {
0130     cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
0131   }
0132   if (Debug(1) && !m_openLUTs) {
0133     cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
0134   }
0135 
0136   if (Debug(1) && m_useEX21) {
0137     cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
0138   }
0139   if (Debug(1) && !m_useEX21) {
0140     cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
0141   }
0142 
0143   if (Debug(1) && m_etaTF) {
0144     cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
0145   }
0146   if (Debug(1) && !m_etaTF) {
0147     cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
0148   }
0149 
0150   if (Debug(1) && m_TSOutOfTimeFilter) {
0151     cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
0152     cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
0153   }
0154   if (Debug(1) && !m_TSOutOfTimeFilter) {
0155     cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
0156   }
0157 
0158   if (Debug(1))
0159     cout << "L1 barrel Track Finder : # of bits used for phi  (extrapolation)  : " << m_NbitsExtPhi << endl;
0160   if (Debug(1))
0161     cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation)  : " << m_NbitsExtPhib << endl;
0162   if (Debug(1))
0163     cout << "L1 barrel Track Finder : # of bits used for phi  (pt-assignment)  : " << m_NbitsPtaPhi << endl;
0164   if (Debug(1))
0165     cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment)  : " << m_NbitsPtaPhib << endl;
0166   if (Debug(1))
0167     cout << "L1 barrel Track Finder : # of bits used for phi  (phi-assignment) : " << m_NbitsPhiPhi << endl;
0168   if (Debug(1))
0169     cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
0170 
0171   delete bmtfParams;
0172 }
0173 
0174 // static data members
0175 
0176 edm::InputTag L1MuBMTFConfig::m_BMDigiInputTag = edm::InputTag();
0177 edm::InputTag L1MuBMTFConfig::m_BMThetaDigiInputTag = edm::InputTag();
0178 
0179 bool L1MuBMTFConfig::m_debug = false;
0180 int L1MuBMTFConfig::m_dbgLevel = -1;
0181 int L1MuBMTFConfig::m_BxMin = -9;
0182 int L1MuBMTFConfig::m_BxMax = 7;
0183 int L1MuBMTFConfig::m_extTSFilter = 1;
0184 bool L1MuBMTFConfig::m_openLUTs = false;
0185 bool L1MuBMTFConfig::m_useEX21 = false;
0186 bool L1MuBMTFConfig::m_etaTF = true;
0187 bool L1MuBMTFConfig::m_TSOutOfTimeFilter = false;
0188 int L1MuBMTFConfig::m_TSOutOfTimeWindow = 1;
0189 int L1MuBMTFConfig::m_NbitsExtPhi = 8;
0190 int L1MuBMTFConfig::m_NbitsExtPhib = 8;
0191 int L1MuBMTFConfig::m_NbitsPtaPhi = 12;
0192 int L1MuBMTFConfig::m_NbitsPtaPhib = 10;
0193 int L1MuBMTFConfig::m_NbitsPhiPhi = 10;
0194 int L1MuBMTFConfig::m_NbitsPhiPhib = 10;