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 
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 #include <iostream>
30 #include <string>
31 
32 //-------------------------------
33 // Collaborating Class Headers --
34 //-------------------------------
35 
36 using namespace std;
37 
38 // --------------------------------
39 // class L1MuBMTFConfig
40 //---------------------------------
41 
42 //----------------
43 // Constructors --
44 //----------------
45 
47  m_ps = &ps;
48  //m_es = &c;
49  setDefaults();
50 }
51 
52 //--------------
53 // Destructor --
54 //--------------
56 
57 //--------------
58 // Operations --
59 //--------------
60 
62  m_BMDigiInputTag = m_ps->getParameter<edm::InputTag>("DTDigi_Source");
63  m_BMThetaDigiInputTag = m_ps->getParameter<edm::InputTag>("DTDigi_Theta_Source");
64 
65  m_debug = true;
66  m_dbgLevel = m_ps->getUntrackedParameter<int>("Debug", 0);
67 
68  if (Debug(1))
69  cout << endl;
70  if (Debug(1))
71  cout << "*******************************************" << endl;
72  if (Debug(1))
73  cout << "**** L1 barrel Track Finder settings : ****" << endl;
74  if (Debug(1))
75  cout << "*******************************************" << endl;
76  if (Debug(1))
77  cout << endl;
78 
79  if (Debug(1))
80  cout << "L1 barrel Track Finder : BM Digi Source: " << m_BMDigiInputTag << endl;
81  if (Debug(1))
82  cout << "L1 barrel Track Finder : BM Digi Source: " << m_BMThetaDigiInputTag << endl;
83  if (Debug(1))
84  cout << endl;
85 
86  if (Debug(1))
87  cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
88 }
89 
91  m_es = &c;
92 
93  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = m_es->get<L1TMuonBarrelParamsRcd>();
94  bmtfParamsRcd.get(bmtfParamsHandle);
95  // L1TMuonBarrelParams *bmtfParams = new L1TMuonBarrelParams();
96  // bmtfParams = new L1TMuonBarrelParams(*bmtfParamsHandle.product());
97  L1TMuonBarrelParamsAllPublic* bmtfParams = new L1TMuonBarrelParamsAllPublic(*bmtfParamsHandle.product());
98 
99  // set min and max bunch crossing
100  m_BxMin = bmtfParams->get_BX_min();
101  m_BxMax = bmtfParams->get_BX_max();
102 
103  // set Filter for Extrapolator
104  m_extTSFilter = bmtfParams->get_Extrapolation_Filter();
105 
106  // set switch for open LUTs usage
107  m_openLUTs = bmtfParams->get_Open_LUTs();
108 
109  // set switch for EX21 usage
110  m_useEX21 = bmtfParams->get_Extrapolation_21();
111 
112  // set switch for eta track finder usage
113  m_etaTF = bmtfParams->get_EtaTrackFinder();
114 
115  // set Filter for Out-of-time Track Segments
116  m_TSOutOfTimeFilter = bmtfParams->get_OutOfTime_Filter();
117  m_TSOutOfTimeWindow = bmtfParams->get_OutOfTime_Filter_Window();
118 
119  // set precision for extrapolation
120  m_NbitsExtPhi = bmtfParams->get_Extrapolation_nbits_Phi();
121  m_NbitsExtPhib = bmtfParams->get_Extrapolation_nbits_PhiB();
122 
123  // set precision for pt-assignment
124  m_NbitsPtaPhi = bmtfParams->get_PT_Assignment_nbits_Phi();
125  m_NbitsPtaPhib = bmtfParams->get_PT_Assignment_nbits_PhiB();
126 
127  // set precision for phi-assignment look-up tables
128  m_NbitsPhiPhi = bmtfParams->get_PHI_Assignment_nbits_Phi();
129  m_NbitsExtPhib = bmtfParams->get_PHI_Assignment_nbits_PhiB();
130 
131  if (Debug(1))
132  cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
133  if (Debug(1))
134  cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
135 
136  if (Debug(1))
137  cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
138 
139  if (Debug(1) && m_openLUTs) {
140  cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
141  }
142  if (Debug(1) && !m_openLUTs) {
143  cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
144  }
145 
146  if (Debug(1) && m_useEX21) {
147  cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
148  }
149  if (Debug(1) && !m_useEX21) {
150  cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
151  }
152 
153  if (Debug(1) && m_etaTF) {
154  cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
155  }
156  if (Debug(1) && !m_etaTF) {
157  cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
158  }
159 
160  if (Debug(1) && m_TSOutOfTimeFilter) {
161  cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
162  cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
163  }
164  if (Debug(1) && !m_TSOutOfTimeFilter) {
165  cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
166  }
167 
168  if (Debug(1))
169  cout << "L1 barrel Track Finder : # of bits used for phi (extrapolation) : " << m_NbitsExtPhi << endl;
170  if (Debug(1))
171  cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation) : " << m_NbitsExtPhib << endl;
172  if (Debug(1))
173  cout << "L1 barrel Track Finder : # of bits used for phi (pt-assignment) : " << m_NbitsPtaPhi << endl;
174  if (Debug(1))
175  cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment) : " << m_NbitsPtaPhib << endl;
176  if (Debug(1))
177  cout << "L1 barrel Track Finder : # of bits used for phi (phi-assignment) : " << m_NbitsPhiPhi << endl;
178  if (Debug(1))
179  cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
180 
181  delete bmtfParams;
182 }
183 
184 // static data members
185 
188 
189 bool L1MuBMTFConfig::m_debug = false;
191 int L1MuBMTFConfig::m_BxMin = -9;
194 bool L1MuBMTFConfig::m_openLUTs = false;
195 bool L1MuBMTFConfig::m_useEX21 = false;
196 bool L1MuBMTFConfig::m_etaTF = true;
static int m_NbitsPtaPhib
static edm::InputTag m_BMDigiInputTag
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
static int m_BxMin
static bool m_TSOutOfTimeFilter
static int m_TSOutOfTimeWindow
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
virtual ~L1MuBMTFConfig()
destructor
static bool m_etaTF
static int m_extTSFilter
static int m_NbitsExtPhi
static bool m_openLUTs
void setDefaultsES(const edm::EventSetup &c)
static bool m_useEX21
static int m_NbitsExtPhib
static int m_dbgLevel
static bool m_debug
const bool Debug