CMS 3D CMS Logo

L1MuBMTFConfig.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuBMTFConfig
4 //
5 // Description: L1TMuonBarrelTrackProducer parameters for L1MuBMTrackFinder
6 //
7 //
8 //
9 // Author :
10 // N. Neumeister CERN EP
11 // J. Troconiz UAM Madrid
12 //
13 //--------------------------------------------------
14 
15 //-----------------------
16 // This Class's Header --
17 //-----------------------
18 
20 
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 #include <iostream>
28 #include <string>
29 
30 //-------------------------------
31 // Collaborating Class Headers --
32 //-------------------------------
33 
34 using namespace std;
35 
36 // --------------------------------
37 // class L1MuBMTFConfig
38 //---------------------------------
39 
40 //----------------
41 // Constructors --
42 //----------------
43 
44 L1MuBMTFConfig::L1MuBMTFConfig(const edm::ParameterSet& ps) { setDefaults(ps); }
45 
46 //--------------
47 // Destructor --
48 //--------------
50 
51 //--------------
52 // Operations --
53 //--------------
54 
56  m_BMDigiInputTag = ps.getParameter<edm::InputTag>("DTDigi_Source");
57  m_BMThetaDigiInputTag = ps.getParameter<edm::InputTag>("DTDigi_Theta_Source");
58 
59  m_debug = true;
60  m_dbgLevel = ps.getUntrackedParameter<int>("Debug", 0);
61 
62  if (Debug(1))
63  cout << endl;
64  if (Debug(1))
65  cout << "*******************************************" << endl;
66  if (Debug(1))
67  cout << "**** L1 barrel Track Finder settings : ****" << endl;
68  if (Debug(1))
69  cout << "*******************************************" << endl;
70  if (Debug(1))
71  cout << endl;
72 
73  if (Debug(1))
74  cout << "L1 barrel Track Finder : BM Digi Source: " << m_BMDigiInputTag << endl;
75  if (Debug(1))
76  cout << "L1 barrel Track Finder : BM Digi Source: " << m_BMThetaDigiInputTag << endl;
77  if (Debug(1))
78  cout << endl;
79 
80  if (Debug(1))
81  cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
82 }
83 
85  // L1TMuonBarrelParams *bmtfParams = new L1TMuonBarrelParams();
86  // bmtfParams = new L1TMuonBarrelParams(*bmtfParamsHandle.product());
88 
89  // set min and max bunch crossing
90  m_BxMin = bmtfParams->get_BX_min();
91  m_BxMax = bmtfParams->get_BX_max();
92 
93  // set Filter for Extrapolator
94  m_extTSFilter = bmtfParams->get_Extrapolation_Filter();
95 
96  // set switch for open LUTs usage
97  m_openLUTs = bmtfParams->get_Open_LUTs();
98 
99  // set switch for EX21 usage
100  m_useEX21 = bmtfParams->get_Extrapolation_21();
101 
102  // set switch for eta track finder usage
103  m_etaTF = bmtfParams->get_EtaTrackFinder();
104 
105  // set Filter for Out-of-time Track Segments
106  m_TSOutOfTimeFilter = bmtfParams->get_OutOfTime_Filter();
107  m_TSOutOfTimeWindow = bmtfParams->get_OutOfTime_Filter_Window();
108 
109  // set precision for extrapolation
110  m_NbitsExtPhi = bmtfParams->get_Extrapolation_nbits_Phi();
111  m_NbitsExtPhib = bmtfParams->get_Extrapolation_nbits_PhiB();
112 
113  // set precision for pt-assignment
114  m_NbitsPtaPhi = bmtfParams->get_PT_Assignment_nbits_Phi();
115  m_NbitsPtaPhib = bmtfParams->get_PT_Assignment_nbits_PhiB();
116 
117  // set precision for phi-assignment look-up tables
118  m_NbitsPhiPhi = bmtfParams->get_PHI_Assignment_nbits_Phi();
119  m_NbitsExtPhib = bmtfParams->get_PHI_Assignment_nbits_PhiB();
120 
121  if (Debug(1))
122  cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
123  if (Debug(1))
124  cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
125 
126  if (Debug(1))
127  cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
128 
129  if (Debug(1) && m_openLUTs) {
130  cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
131  }
132  if (Debug(1) && !m_openLUTs) {
133  cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
134  }
135 
136  if (Debug(1) && m_useEX21) {
137  cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
138  }
139  if (Debug(1) && !m_useEX21) {
140  cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
141  }
142 
143  if (Debug(1) && m_etaTF) {
144  cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
145  }
146  if (Debug(1) && !m_etaTF) {
147  cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
148  }
149 
150  if (Debug(1) && m_TSOutOfTimeFilter) {
151  cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
152  cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
153  }
154  if (Debug(1) && !m_TSOutOfTimeFilter) {
155  cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
156  }
157 
158  if (Debug(1))
159  cout << "L1 barrel Track Finder : # of bits used for phi (extrapolation) : " << m_NbitsExtPhi << endl;
160  if (Debug(1))
161  cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation) : " << m_NbitsExtPhib << endl;
162  if (Debug(1))
163  cout << "L1 barrel Track Finder : # of bits used for phi (pt-assignment) : " << m_NbitsPtaPhi << endl;
164  if (Debug(1))
165  cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment) : " << m_NbitsPtaPhib << endl;
166  if (Debug(1))
167  cout << "L1 barrel Track Finder : # of bits used for phi (phi-assignment) : " << m_NbitsPhiPhi << endl;
168  if (Debug(1))
169  cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
170 
171  delete bmtfParams;
172 }
173 
174 // static data members
175 
178 
179 bool L1MuBMTFConfig::m_debug = false;
181 int L1MuBMTFConfig::m_BxMin = -9;
184 bool L1MuBMTFConfig::m_openLUTs = false;
185 bool L1MuBMTFConfig::m_useEX21 = false;
186 bool L1MuBMTFConfig::m_etaTF = true;
static int m_NbitsPtaPhib
static edm::InputTag m_BMDigiInputTag
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static int m_NbitsPhiPhi
static int m_NbitsPtaPhi
static int m_BxMax
static int m_NbitsPhiPhib
L1MuBMTFConfig(const edm::ParameterSet &ps)
constructor
static edm::InputTag m_BMThetaDigiInputTag
void setDefaults(edm::ParameterSet const &)
static int m_BxMin
static bool m_TSOutOfTimeFilter
static int m_TSOutOfTimeWindow
virtual ~L1MuBMTFConfig()
destructor
T getUntrackedParameter(std::string const &, T const &) const
void setDefaultsES(const L1TMuonBarrelParams &)
static bool m_etaTF
static int m_extTSFilter
static int m_NbitsExtPhi
static bool m_openLUTs
static bool m_useEX21
static int m_NbitsExtPhib
static int m_dbgLevel
static bool m_debug
const bool Debug