test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
48  m_ps = &ps;
49  //m_es = &c;
50  setDefaults();
51 
52 }
53 
54 
55 //--------------
56 // Destructor --
57 //--------------
59 
60 
61 //--------------
62 // Operations --
63 //--------------
64 
66 
67  m_BMDigiInputTag = m_ps->getParameter<edm::InputTag>("DTDigi_Source");
68  m_BMThetaDigiInputTag = m_ps->getParameter<edm::InputTag>("DTDigi_Theta_Source");
69 
70  m_debug = true;
71  m_dbgLevel = m_ps->getUntrackedParameter<int>("Debug",0);
72 
73  if ( Debug(1) ) cout << endl;
74  if ( Debug(1) ) cout << "*******************************************" << endl;
75  if ( Debug(1) ) cout << "**** L1 barrel Track Finder settings : ****" << endl;
76  if ( Debug(1) ) cout << "*******************************************" << endl;
77  if ( Debug(1) ) cout << endl;
78 
79  if ( Debug(1) ) cout << "L1 barrel Track Finder : BM Digi Source: " << m_BMDigiInputTag << endl;
80  if ( Debug(1) ) cout << "L1 barrel Track Finder : BM Digi Source: " << m_BMThetaDigiInputTag << endl;
81  if ( Debug(1) ) cout << endl;
82 
83  if ( Debug(1) ) cout << "L1 barrel Track Finder : debug level: " << m_dbgLevel << endl;
84 
85 }
86 
87 
89  m_es = &c;
90 
91 
92  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = m_es->get<L1TMuonBarrelParamsRcd>();
93  bmtfParamsRcd.get(bmtfParamsHandle);
94  L1TMuonBarrelParams *bmtfParams = new L1TMuonBarrelParams();
95  bmtfParams = new L1TMuonBarrelParams(*bmtfParamsHandle.product());
96 
97 
98  // set min and max bunch crossing
99  m_BxMin = bmtfParams->get_BX_min();
100  m_BxMax = bmtfParams->get_BX_max();
101 
102  // set Filter for Extrapolator
103  m_extTSFilter = bmtfParams->get_Extrapolation_Filter();
104 
105  // set switch for open LUTs usage
106  m_openLUTs = bmtfParams->get_Open_LUTs();
107 
108  // set switch for EX21 usage
109  m_useEX21 = bmtfParams->get_Extrapolation_21();
110 
111  // set switch for eta track finder usage
112  m_etaTF = bmtfParams->get_EtaTrackFinder();
113 
114  // set Filter for Out-of-time Track Segments
115  m_TSOutOfTimeFilter = bmtfParams->get_OutOfTime_Filter();
116  m_TSOutOfTimeWindow = bmtfParams->get_OutOfTime_Filter_Window();
117 
118  // set precision for extrapolation
119  m_NbitsExtPhi = bmtfParams->get_Extrapolation_nbits_Phi();
120  m_NbitsExtPhib = bmtfParams->get_Extrapolation_nbits_PhiB();
121 
122  // set precision for pt-assignment
123  m_NbitsPtaPhi = bmtfParams->get_PT_Assignment_nbits_Phi();
124  m_NbitsPtaPhib = bmtfParams->get_PT_Assignment_nbits_PhiB();
125 
126  // set precision for phi-assignment look-up tables
127  m_NbitsPhiPhi = bmtfParams->get_PHI_Assignment_nbits_Phi();
128  m_NbitsExtPhib = bmtfParams->get_PHI_Assignment_nbits_PhiB();
129 
130  if ( Debug(1) ) cout << "L1 barrel Track Finder : minimal bunch-crossing : " << m_BxMin << endl;
131  if ( Debug(1) ) cout << "L1 barrel Track Finder : maximal bunch-crossing : " << m_BxMax << endl;
132 
133  if ( Debug(1) ) cout << "L1 barrel Track Finder : Extrapolation Filter : " << m_extTSFilter << endl;
134 
135  if ( Debug(1) && m_openLUTs) {
136  cout << "L1 barrel Track Finder : use open LUTs : on" << endl;
137  }
138  if ( Debug(1) && !m_openLUTs) {
139  cout << "L1 barrel Track Finder : use open LUTs : off" << endl;
140  }
141 
142  if ( Debug(1) && m_useEX21 ) {
143  cout << "L1 barrel Track Finder : use EX21 extrapolations : on" << endl;
144  }
145  if ( Debug(1) && !m_useEX21 ) {
146  cout << "L1 barrel Track Finder : use EX21 extrapolations : off" << endl;
147  }
148 
149  if ( Debug(1) && m_etaTF ) {
150  cout << "L1 barrel Track Finder : Eta Track Finder : on" << endl;
151  }
152  if ( Debug(1) && !m_etaTF ) {
153  cout << "L1 barrel Track Finder : Eta Track Finder : off" << endl;
154  }
155 
156 
157  if ( Debug(1) && m_TSOutOfTimeFilter ) {
158  cout << "L1 barrel Track Finder : out-of-time TS filter : on" << endl;
159  cout << "L1 barrel Track Finder : out-of-time TS filter window : " << m_TSOutOfTimeWindow << endl;
160  }
161  if ( Debug(1) && !m_TSOutOfTimeFilter ) {
162  cout << "L1 barrel Track Finder : out-of-time TS filter : off" << endl;
163  }
164 
165  if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phi (extrapolation) : " << m_NbitsExtPhi << endl;
166  if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phib (extrapolation) : " << m_NbitsExtPhib << endl;
167  if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phi (pt-assignment) : " << m_NbitsPtaPhi << endl;
168  if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phib (pt-assignment) : " << m_NbitsPtaPhib << endl;
169  if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phi (phi-assignment) : " << m_NbitsPhiPhi << endl;
170  if ( Debug(1) ) cout << "L1 barrel Track Finder : # of bits used for phib (phi-assignment) : " << m_NbitsPhiPhib << endl;
171 
172  delete bmtfParams;
173 
174 }
175 
176 
177 // static data members
178 
181 
182 bool L1MuBMTFConfig::m_debug = false;
184 int L1MuBMTFConfig::m_BxMin = -9;
187 bool L1MuBMTFConfig::m_openLUTs = false;
188 bool L1MuBMTFConfig::m_useEX21 = false;
189 bool L1MuBMTFConfig::m_etaTF = true;
static int m_NbitsPtaPhib
static edm::InputTag m_BMDigiInputTag
int get_PT_Assignment_nbits_PhiB() const
static int m_NbitsPhiPhi
static int m_NbitsPtaPhi
static int m_BxMax
int get_Extrapolation_nbits_Phi() const
bool get_OutOfTime_Filter() const
static int m_NbitsPhiPhib
L1MuBMTFConfig(const edm::ParameterSet &ps)
constructor
static edm::InputTag m_BMThetaDigiInputTag
static int m_BxMin
static bool m_TSOutOfTimeFilter
int get_PT_Assignment_nbits_Phi() const
static int m_TSOutOfTimeWindow
virtual ~L1MuBMTFConfig()
destructor
bool get_EtaTrackFinder() const
static bool m_etaTF
static int m_extTSFilter
int get_Extrapolation_Filter() const
void get(HolderT &iHolder) const
bool get_Extrapolation_21() const
static int m_NbitsExtPhi
static bool m_openLUTs
int get_PHI_Assignment_nbits_PhiB() const
int get_OutOfTime_Filter_Window() const
int get_Extrapolation_nbits_PhiB() const
int get_PHI_Assignment_nbits_Phi() const
void setDefaultsES(const edm::EventSetup &c)
static bool m_useEX21
def setDefaults
Definition: setDefaults.py:6
static int m_NbitsExtPhib
tuple cout
Definition: gather_cfg.py:145
static int m_dbgLevel
static bool m_debug
const bool Debug