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;
L1TMuonBarrelParamsAllPublic::get_PHI_Assignment_nbits_PhiB
int get_PHI_Assignment_nbits_PhiB() const
Definition: L1TMuonBarrelParamsAllPublic.h:61
L1MuBMTFConfig::~L1MuBMTFConfig
virtual ~L1MuBMTFConfig()
destructor
Definition: L1MuBMTFConfig.cc:55
L1TMuonBarrelParamsAllPublic::get_PHI_Assignment_nbits_Phi
int get_PHI_Assignment_nbits_Phi() const
Definition: L1TMuonBarrelParamsAllPublic.h:60
L1MuBMTFConfig::m_BMThetaDigiInputTag
static edm::InputTag m_BMThetaDigiInputTag
Definition: L1MuBMTFConfig.h:85
L1MuBMTFConfig::m_NbitsPtaPhi
static int m_NbitsPtaPhi
Definition: L1MuBMTFConfig.h:106
L1MuBMTFConfig::m_NbitsPhiPhi
static int m_NbitsPhiPhi
Definition: L1MuBMTFConfig.h:108
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1TMuonBarrelParams.h
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
L1MuBMTFConfig::m_TSOutOfTimeFilter
static bool m_TSOutOfTimeFilter
Definition: L1MuBMTFConfig.h:101
L1MuBMTFConfig::m_NbitsPhiPhib
static int m_NbitsPhiPhib
Definition: L1MuBMTFConfig.h:109
L1MuBMTFConfig::m_BxMin
static int m_BxMin
Definition: L1MuBMTFConfig.h:90
L1TMuonBarrelParamsAllPublic::get_Open_LUTs
bool get_Open_LUTs() const
Definition: L1TMuonBarrelParamsAllPublic.h:70
L1MuBMTFConfig::L1MuBMTFConfig
L1MuBMTFConfig(const edm::ParameterSet &ps)
constructor
Definition: L1MuBMTFConfig.cc:46
L1MuBMTFConfig::m_extTSFilter
static int m_extTSFilter
Definition: L1MuBMTFConfig.h:93
L1TMuonBarrelParamsAllPublic::get_Extrapolation_nbits_Phi
int get_Extrapolation_nbits_Phi() const
Definition: L1TMuonBarrelParamsAllPublic.h:62
L1MuBMTFConfig::m_NbitsPtaPhib
static int m_NbitsPtaPhib
Definition: L1MuBMTFConfig.h:107
L1MuBMTFConfig::m_NbitsExtPhib
static int m_NbitsExtPhib
Definition: L1MuBMTFConfig.h:105
L1TMuonBarrelParamsAllPublic::get_BX_max
int get_BX_max() const
Definition: L1TMuonBarrelParamsAllPublic.h:65
L1MuBMTFConfig::m_useEX21
static bool m_useEX21
Definition: L1MuBMTFConfig.h:97
Debug
const bool Debug
Definition: CosmicMuonParameters.h:12
L1TMuonBarrelParamsAllPublic::get_Extrapolation_21
bool get_Extrapolation_21() const
Definition: L1TMuonBarrelParamsAllPublic.h:72
L1MuBMTFConfig::setDefaultsES
void setDefaultsES(const edm::EventSetup &c)
Definition: L1MuBMTFConfig.cc:90
L1TMuonBarrelParamsAllPublic::get_OutOfTime_Filter
bool get_OutOfTime_Filter() const
Definition: L1TMuonBarrelParamsAllPublic.h:69
L1TMuonBarrelParamsAllPublic::get_EtaTrackFinder
bool get_EtaTrackFinder() const
Definition: L1TMuonBarrelParamsAllPublic.h:71
L1MuBMTFConfig::m_BxMax
static int m_BxMax
Definition: L1MuBMTFConfig.h:91
L1TMuonBarrelParamsAllPublic::get_Extrapolation_Filter
int get_Extrapolation_Filter() const
Definition: L1TMuonBarrelParamsAllPublic.h:66
L1MuBMTFConfig::m_dbgLevel
static int m_dbgLevel
Definition: L1MuBMTFConfig.h:88
L1TMuonBarrelParamsRcd.h
L1MuBMTFConfig::m_NbitsExtPhi
static int m_NbitsExtPhi
Definition: L1MuBMTFConfig.h:104
L1TMuonBarrelParamsAllPublic::get_PT_Assignment_nbits_PhiB
int get_PT_Assignment_nbits_PhiB() const
Definition: L1TMuonBarrelParamsAllPublic.h:59
edm::ParameterSet
Definition: ParameterSet.h:47
L1MuBMTFConfig.h
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1TMuonBarrelParamsAllPublic::get_PT_Assignment_nbits_Phi
int get_PT_Assignment_nbits_Phi() const
Definition: L1TMuonBarrelParamsAllPublic.h:58
L1MuBMTFConfig::m_etaTF
static bool m_etaTF
Definition: L1MuBMTFConfig.h:99
L1MuBMTFConfig::m_openLUTs
static bool m_openLUTs
Definition: L1MuBMTFConfig.h:95
std
Definition: JetResolutionObject.h:76
L1MuBMTFConfig::m_TSOutOfTimeWindow
static int m_TSOutOfTimeWindow
Definition: L1MuBMTFConfig.h:102
L1TMuonBarrelParamsAllPublic
Definition: L1TMuonBarrelParamsAllPublic.h:8
L1TMuonBarrelParamsAllPublic::get_BX_min
int get_BX_min() const
Definition: L1TMuonBarrelParamsAllPublic.h:64
L1TMuonBarrelParamsAllPublic::get_Extrapolation_nbits_PhiB
int get_Extrapolation_nbits_PhiB() const
Definition: L1TMuonBarrelParamsAllPublic.h:63
EventSetup.h
L1MuBMTFConfig::m_debug
static bool m_debug
Definition: L1MuBMTFConfig.h:87
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
edm::InputTag
Definition: InputTag.h:15
L1MuBMTFConfig::setDefaults
void setDefaults()
Definition: L1MuBMTFConfig.cc:61
L1TMuonBarrelParamsAllPublic::get_OutOfTime_Filter_Window
int get_OutOfTime_Filter_Window() const
Definition: L1TMuonBarrelParamsAllPublic.h:67
L1TMuonBarrelParamsRcd
Definition: L1TMuonBarrelParamsRcd.h:13
L1MuBMTFConfig::m_BMDigiInputTag
static edm::InputTag m_BMDigiInputTag
Definition: L1MuBMTFConfig.h:84