CMS 3D CMS Logo

L1TCaloParamsESProducer.cc
Go to the documentation of this file.
1 
12 //
13 //
14 
15 // system include files
16 #include <memory>
17 #include <iostream>
18 #include <fstream>
19 
20 // user include files
26 
28 
32 
33 using namespace std;
34 
35 //
36 // class declaration
37 //
38 
39 using namespace l1t;
40 
42 public:
44  ~L1TCaloParamsESProducer() override;
45 
46  using ReturnType = std::unique_ptr<CaloParams>;
47 
48  ReturnType produce(const L1TCaloParamsRcd&);
49 
50 private:
53 };
54 
55 //
56 // constants, enums and typedefs
57 //
58 
59 //
60 // static data member definitions
61 //
62 
63 //
64 // constructors and destructor
65 //
67  //the following line is needed to tell the framework what
68  // data is being produced
69  setWhatProduced(this);
70  //setWhatProduced(this, conf.getParameter<std::string>("label"));
71 
72  CaloParamsHelper m_params_helper;
73 
74  // towers
75  m_params_helper.setTowerLsbH(conf.getParameter<double>("towerLsbH"));
76  m_params_helper.setTowerLsbE(conf.getParameter<double>("towerLsbE"));
77  m_params_helper.setTowerLsbSum(conf.getParameter<double>("towerLsbSum"));
78  m_params_helper.setTowerNBitsH(conf.getParameter<int>("towerNBitsH"));
79  m_params_helper.setTowerNBitsE(conf.getParameter<int>("towerNBitsE"));
80  m_params_helper.setTowerNBitsSum(conf.getParameter<int>("towerNBitsSum"));
81  m_params_helper.setTowerNBitsRatio(conf.getParameter<int>("towerNBitsRatio"));
82  m_params_helper.setTowerEncoding(conf.getParameter<bool>("towerEncoding"));
83 
84  // regions
85  m_params_helper.setRegionLsb(conf.getParameter<double>("regionLsb"));
86  m_params_helper.setRegionPUSType(conf.getParameter<std::string>("regionPUSType"));
87  m_params_helper.setRegionPUSParams(conf.getParameter<std::vector<double>>("regionPUSParams"));
88 
89  // EG
90  m_params_helper.setEgEtaCut(conf.getParameter<int>("egEtaCut"));
91 
92  m_params_helper.setEgLsb(conf.getParameter<double>("egLsb"));
93  m_params_helper.setEgSeedThreshold(conf.getParameter<double>("egSeedThreshold"));
94  m_params_helper.setEgNeighbourThreshold(conf.getParameter<double>("egNeighbourThreshold"));
95  m_params_helper.setEgHcalThreshold(conf.getParameter<double>("egHcalThreshold"));
96 
98  std::ifstream egTrimmingLUTStream(egTrimmingLUTFile.fullPath());
99  auto egTrimmingLUT = std::make_shared<LUT>(egTrimmingLUTStream);
100  m_params_helper.setEgTrimmingLUT(*egTrimmingLUT);
101 
102  m_params_helper.setEgMaxHcalEt(conf.getParameter<double>("egMaxHcalEt"));
103  m_params_helper.setEgMaxPtHOverE(conf.getParameter<double>("egMaxPtHOverE"));
104  m_params_helper.setEgHOverEcutBarrel(conf.getParameter<int>("egHOverEcutBarrel"));
105  m_params_helper.setEgHOverEcutEndcap(conf.getParameter<int>("egHOverEcutEndcap"));
106  m_params_helper.setEgMinPtJetIsolation(conf.getParameter<int>("egMinPtJetIsolation"));
107  m_params_helper.setEgMaxPtJetIsolation(conf.getParameter<int>("egMaxPtJetIsolation"));
108  m_params_helper.setEgMinPtHOverEIsolation(conf.getParameter<int>("egMinPtHOverEIsolation"));
109  m_params_helper.setEgMaxPtHOverEIsolation(conf.getParameter<int>("egMaxPtHOverEIsolation"));
110  m_params_helper.setEgBypassEGVetos(conf.getParameter<unsigned>("egBypassEGVetos"));
111  m_params_helper.setEgBypassExtHOverE(conf.getParameter<unsigned>("egBypassExtHOverE"));
112  m_params_helper.setEgBypassShape(conf.getParameter<unsigned>("egBypassShape"));
113  m_params_helper.setEgBypassECALFG(conf.getParameter<unsigned>("egBypassECALFG"));
114  m_params_helper.setEgBypassHoE(conf.getParameter<unsigned>("egBypassHoE"));
115 
116  edm::FileInPath egMaxHOverELUTFile = conf.getParameter<edm::FileInPath>("egMaxHOverELUTFile");
117  std::ifstream egMaxHOverELUTStream(egMaxHOverELUTFile.fullPath());
118  auto egMaxHOverELUT = std::make_shared<LUT>(egMaxHOverELUTStream);
119  m_params_helper.setEgMaxHOverELUT(*egMaxHOverELUT);
120 
121  edm::FileInPath egCompressShapesLUTFile = conf.getParameter<edm::FileInPath>("egCompressShapesLUTFile");
122  std::ifstream egCompressShapesLUTStream(egCompressShapesLUTFile.fullPath());
123  auto egCompressShapesLUT = std::make_shared<LUT>(egCompressShapesLUTStream);
124  m_params_helper.setEgCompressShapesLUT(*egCompressShapesLUT);
125 
126  m_params_helper.setEgShapeIdType(conf.getParameter<std::string>("egShapeIdType"));
127  m_params_helper.setEgShapeIdVersion(conf.getParameter<unsigned>("egShapeIdVersion"));
128  edm::FileInPath egShapeIdLUTFile = conf.getParameter<edm::FileInPath>("egShapeIdLUTFile");
129  std::ifstream egShapeIdLUTStream(egShapeIdLUTFile.fullPath());
130  auto egShapeIdLUT = std::make_shared<LUT>(egShapeIdLUTStream);
131  m_params_helper.setEgShapeIdLUT(*egShapeIdLUT);
132 
133  m_params_helper.setEgPUSType(conf.getParameter<std::string>("egPUSType"));
134 
135  m_params_helper.setEgIsolationType(conf.getParameter<std::string>("egIsolationType"));
137  std::ifstream egIsoLUTStream(egIsoLUTFile.fullPath());
138  auto egIsoLUT = std::make_shared<LUT>(egIsoLUTStream);
139  m_params_helper.setEgIsolationLUT(*egIsoLUT);
141  std::ifstream egIsoLUTStream2(egIsoLUTFile2.fullPath());
142  auto egIsoLUT2 = std::make_shared<LUT>(egIsoLUTStream2);
143  m_params_helper.setEgIsolationLUT2(*egIsoLUT2);
144 
145  //edm::FileInPath egIsoLUTFileBarrel = conf.getParameter<edm::FileInPath>("egIsoLUTFileBarrel");
146  //std::ifstream egIsoLUTBarrelStream(egIsoLUTFileBarrel.fullPath());
147  //auto egIsoLUTBarrel = std::make_shared<LUT>(egIsoLUTBarrelStream);
148  //m_params_helper.setEgIsolationLUTBarrel(egIsoLUTBarrel);
149 
150  //edm::FileInPath egIsoLUTFileEndcaps = conf.getParameter<edm::FileInPath>("egIsoLUTFileEndcaps");
151  //std::ifstream egIsoLUTEndcapsStream(egIsoLUTFileEndcaps.fullPath());
152  //auto egIsoLUTEndcaps = std::make_shared<LUT>(egIsoLUTEndcapsStream);
153  //m_params_helper.setEgIsolationLUTEndcaps(egIsoLUTEndcaps);
154 
155  m_params_helper.setEgIsoAreaNrTowersEta(conf.getParameter<unsigned int>("egIsoAreaNrTowersEta"));
156  m_params_helper.setEgIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("egIsoAreaNrTowersPhi"));
157  m_params_helper.setEgIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("egIsoVetoNrTowersPhi"));
158  //m_params_helper.setEgIsoPUEstTowerGranularity(conf.getParameter<unsigned int>("egIsoPUEstTowerGranularity"));
159  //m_params_helper.setEgIsoMaxEtaAbsForTowerSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForTowerSum"));
160  //m_params_helper.setEgIsoMaxEtaAbsForIsoSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForIsoSum"));
161  m_params_helper.setEgPUSParams(conf.getParameter<std::vector<double>>("egPUSParams"));
162 
163  m_params_helper.setEgCalibrationType(conf.getParameter<std::string>("egCalibrationType"));
164  m_params_helper.setEgCalibrationVersion(conf.getParameter<unsigned>("egCalibrationVersion"));
165  edm::FileInPath egCalibrationLUTFile = conf.getParameter<edm::FileInPath>("egCalibrationLUTFile");
166  std::ifstream egCalibrationLUTStream(egCalibrationLUTFile.fullPath());
167  auto egCalibrationLUT = std::make_shared<LUT>(egCalibrationLUTStream);
168  m_params_helper.setEgCalibrationLUT(*egCalibrationLUT);
169 
170  // tau
171  m_params_helper.setTauRegionMask(conf.getParameter<int>("tauRegionMask"));
172  m_params_helper.setTauLsb(conf.getParameter<double>("tauLsb"));
173  m_params_helper.setTauSeedThreshold(conf.getParameter<double>("tauSeedThreshold"));
174  m_params_helper.setTauNeighbourThreshold(conf.getParameter<double>("tauNeighbourThreshold"));
175  m_params_helper.setTauMaxPtTauVeto(conf.getParameter<double>("tauMaxPtTauVeto"));
176  m_params_helper.setTauMinPtJetIsolationB(conf.getParameter<double>("tauMinPtJetIsolationB"));
177  m_params_helper.setTauPUSType(conf.getParameter<std::string>("tauPUSType"));
178  m_params_helper.setTauMaxJetIsolationB(conf.getParameter<double>("tauMaxJetIsolationB"));
179  m_params_helper.setTauMaxJetIsolationA(conf.getParameter<double>("tauMaxJetIsolationA"));
180  m_params_helper.setTauIsoAreaNrTowersEta(conf.getParameter<unsigned int>("tauIsoAreaNrTowersEta"));
181  m_params_helper.setTauIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("tauIsoAreaNrTowersPhi"));
182  m_params_helper.setTauIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("tauIsoVetoNrTowersPhi"));
183 
185  std::ifstream tauIsoLUTStream(tauIsoLUTFile.fullPath());
186  auto tauIsoLUT = std::make_shared<LUT>(tauIsoLUTStream);
187  m_params_helper.setTauIsolationLUT(*tauIsoLUT);
188 
190  std::ifstream tauIsoLUTStream2(tauIsoLUTFile2.fullPath());
191  std::shared_ptr<LUT> tauIsoLUT2(new LUT(tauIsoLUTStream2));
192  m_params_helper.setTauIsolationLUT2(*tauIsoLUT2);
193 
194  edm::FileInPath tauTrimmingShapeVetoLUTFile = conf.getParameter<edm::FileInPath>("tauTrimmingShapeVetoLUTFile");
195  std::ifstream tauTrimmingShapeVetoLUTStream(tauTrimmingShapeVetoLUTFile.fullPath());
196  std::shared_ptr<LUT> tauTrimmingShapeVetoLUT(new LUT(tauTrimmingShapeVetoLUTStream));
197  m_params_helper.setTauTrimmingShapeVetoLUT(*tauTrimmingShapeVetoLUT);
198 
199  edm::FileInPath tauCalibrationLUTFile = conf.getParameter<edm::FileInPath>("tauCalibrationLUTFile");
200  std::ifstream tauCalibrationLUTStream(tauCalibrationLUTFile.fullPath());
201  auto tauCalibrationLUT = std::make_shared<LUT>(tauCalibrationLUTStream);
202  m_params_helper.setTauCalibrationLUT(*tauCalibrationLUT);
203 
204  edm::FileInPath tauCompressLUTFile = conf.getParameter<edm::FileInPath>("tauCompressLUTFile");
205  std::ifstream tauCompressLUTStream(tauCompressLUTFile.fullPath());
206  auto tauCompressLUT = std::make_shared<LUT>(tauCompressLUTStream);
207  m_params_helper.setTauCompressLUT(*tauCompressLUT);
208 
209  edm::FileInPath tauEtToHFRingEtLUTFile = conf.getParameter<edm::FileInPath>("tauEtToHFRingEtLUTFile");
210  std::ifstream tauEtToHFRingEtLUTStream(tauEtToHFRingEtLUTFile.fullPath());
211  auto tauEtToHFRingEtLUT = std::make_shared<LUT>(tauEtToHFRingEtLUTStream);
212  m_params_helper.setTauEtToHFRingEtLUT(*tauEtToHFRingEtLUT);
213 
214  m_params_helper.setIsoTauEtaMin(conf.getParameter<int>("isoTauEtaMin"));
215  m_params_helper.setIsoTauEtaMax(conf.getParameter<int>("isoTauEtaMax"));
216 
217  m_params_helper.setTauPUSParams(conf.getParameter<std::vector<double>>("tauPUSParams"));
218 
219  // jets
220  m_params_helper.setJetLsb(conf.getParameter<double>("jetLsb"));
221  m_params_helper.setJetSeedThreshold(conf.getParameter<double>("jetSeedThreshold"));
222  m_params_helper.setJetNeighbourThreshold(conf.getParameter<double>("jetNeighbourThreshold"));
223  m_params_helper.setJetRegionMask(conf.getParameter<int>("jetRegionMask"));
224  m_params_helper.setJetPUSType(conf.getParameter<std::string>("jetPUSType"));
225  m_params_helper.setJetBypassPUS(conf.getParameter<unsigned>("jetBypassPUS"));
226  m_params_helper.setJetPUSUsePhiRing(conf.getParameter<unsigned>("jetPUSUsePhiRing"));
227  m_params_helper.setJetCalibrationType(conf.getParameter<std::string>("jetCalibrationType"));
228  m_params_helper.setJetCalibrationParams(conf.getParameter<std::vector<double>>("jetCalibrationParams"));
229  edm::FileInPath jetCalibrationLUTFile = conf.getParameter<edm::FileInPath>("jetCalibrationLUTFile");
230  std::ifstream jetCalibrationLUTStream(jetCalibrationLUTFile.fullPath());
231  auto jetCalibrationLUT = std::make_shared<LUT>(jetCalibrationLUTStream);
232  m_params_helper.setJetCalibrationLUT(*jetCalibrationLUT);
233  edm::FileInPath jetCompressEtaLUTFile = conf.getParameter<edm::FileInPath>("jetCompressEtaLUTFile");
234  std::ifstream jetCompressEtaLUTStream(jetCompressEtaLUTFile.fullPath());
235  std::shared_ptr<LUT> jetCompressEtaLUT(new LUT(jetCompressEtaLUTStream));
236  m_params_helper.setJetCompressEtaLUT(*jetCompressEtaLUT);
237  edm::FileInPath jetCompressPtLUTFile = conf.getParameter<edm::FileInPath>("jetCompressPtLUTFile");
238  std::ifstream jetCompressPtLUTStream(jetCompressPtLUTFile.fullPath());
239  std::shared_ptr<LUT> jetCompressPtLUT(new LUT(jetCompressPtLUTStream));
240  m_params_helper.setJetCompressPtLUT(*jetCompressPtLUT);
241 
242  // sums
243  m_params_helper.setEtSumLsb(conf.getParameter<double>("etSumLsb"));
244 
245  std::vector<int> etSumEtaMin = conf.getParameter<std::vector<int>>("etSumEtaMin");
246  std::vector<int> etSumEtaMax = conf.getParameter<std::vector<int>>("etSumEtaMax");
247  std::vector<double> etSumEtThreshold = conf.getParameter<std::vector<double>>("etSumEtThreshold");
248  m_params_helper.setEtSumBypassMetPUS(conf.getParameter<unsigned>("etSumBypassMetPUS"));
249  m_params_helper.setEtSumBypassEttPUS(conf.getParameter<unsigned>("etSumBypassEttPUS"));
250  m_params_helper.setEtSumBypassEcalSumPUS(conf.getParameter<unsigned>("etSumBypassEcalSumPUS"));
251  m_params_helper.setEtSumMetPUSType(conf.getParameter<std::string>("etSumMetPUSType"));
252  m_params_helper.setEtSumEttPUSType(conf.getParameter<std::string>("etSumEttPUSType"));
253  m_params_helper.setEtSumEcalSumPUSType(conf.getParameter<std::string>("etSumEcalSumPUSType"));
254  m_params_helper.setMetCalibrationType(conf.getParameter<std::string>("metCalibrationType"));
255  m_params_helper.setMetHFCalibrationType(conf.getParameter<std::string>("metHFCalibrationType"));
256  m_params_helper.setEtSumEttCalibrationType(conf.getParameter<std::string>("etSumEttCalibrationType"));
257  m_params_helper.setEtSumEcalSumCalibrationType(conf.getParameter<std::string>("etSumEcalSumCalibrationType"));
258 
259  if ((etSumEtaMin.size() == etSumEtaMax.size()) && (etSumEtaMin.size() == etSumEtThreshold.size())) {
260  for (unsigned i = 0; i < etSumEtaMin.size(); ++i) {
261  m_params_helper.setEtSumEtaMin(i, etSumEtaMin.at(i));
262  m_params_helper.setEtSumEtaMax(i, etSumEtaMax.at(i));
263  m_params_helper.setEtSumEtThreshold(i, etSumEtThreshold.at(i));
264  }
265  } else {
266  edm::LogError("l1t|calo") << "Inconsistent number of EtSum parameters" << std::endl;
267  }
268 
269  edm::FileInPath etSumMetPUSLUTFile = conf.getParameter<edm::FileInPath>("etSumMetPUSLUTFile");
270  std::ifstream etSumMetPUSLUTStream(etSumMetPUSLUTFile.fullPath());
271  std::shared_ptr<LUT> etSumMetPUSLUT(new LUT(etSumMetPUSLUTStream));
272  m_params_helper.setEtSumMetPUSLUT(*etSumMetPUSLUT);
273 
274  edm::FileInPath etSumEttPUSLUTFile = conf.getParameter<edm::FileInPath>("etSumEttPUSLUTFile");
275  std::ifstream etSumEttPUSLUTStream(etSumEttPUSLUTFile.fullPath());
276  std::shared_ptr<LUT> etSumEttPUSLUT(new LUT(etSumEttPUSLUTStream));
277  m_params_helper.setEtSumEttPUSLUT(*etSumEttPUSLUT);
278 
279  edm::FileInPath etSumEcalSumPUSLUTFile = conf.getParameter<edm::FileInPath>("etSumEcalSumPUSLUTFile");
280  std::ifstream etSumEcalSumPUSLUTStream(etSumEcalSumPUSLUTFile.fullPath());
281  std::shared_ptr<LUT> etSumEcalSumPUSLUT(new LUT(etSumEcalSumPUSLUTStream));
282  m_params_helper.setEtSumEcalSumPUSLUT(*etSumEcalSumPUSLUT);
283 
284  edm::FileInPath metCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metCalibrationLUTFile");
285  std::ifstream metCalibrationLUTStream(metCalibrationLUTFile.fullPath());
286  std::shared_ptr<LUT> metCalibrationLUT(new LUT(metCalibrationLUTStream));
287  m_params_helper.setMetCalibrationLUT(*metCalibrationLUT);
288 
289  edm::FileInPath metHFCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metHFCalibrationLUTFile");
290  std::ifstream metHFCalibrationLUTStream(metHFCalibrationLUTFile.fullPath());
291  std::shared_ptr<LUT> metHFCalibrationLUT(new LUT(metHFCalibrationLUTStream));
292  m_params_helper.setMetHFCalibrationLUT(*metHFCalibrationLUT);
293 
294  edm::FileInPath etSumEttCalibrationLUTFile = conf.getParameter<edm::FileInPath>("etSumEttCalibrationLUTFile");
295  std::ifstream etSumEttCalibrationLUTStream(etSumEttCalibrationLUTFile.fullPath());
296  std::shared_ptr<LUT> etSumEttCalibrationLUT(new LUT(etSumEttCalibrationLUTStream));
297  m_params_helper.setEtSumEttCalibrationLUT(*etSumEttCalibrationLUT);
298 
299  edm::FileInPath etSumEcalSumCalibrationLUTFile = conf.getParameter<edm::FileInPath>("etSumEcalSumCalibrationLUTFile");
300  std::ifstream etSumEcalSumCalibrationLUTStream(etSumEcalSumCalibrationLUTFile.fullPath());
301  std::shared_ptr<LUT> etSumEcalSumCalibrationLUT(new LUT(etSumEcalSumCalibrationLUTStream));
302  m_params_helper.setEtSumEcalSumCalibrationLUT(*etSumEcalSumCalibrationLUT);
303 
304  edm::FileInPath metPhiCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metPhiCalibrationLUTFile");
305  std::ifstream metPhiCalibrationLUTStream(metPhiCalibrationLUTFile.fullPath());
306  std::shared_ptr<LUT> metPhiCalibrationLUT(new LUT(metPhiCalibrationLUTStream));
307  m_params_helper.setMetPhiCalibrationLUT(*metPhiCalibrationLUT);
308 
309  edm::FileInPath metHFPhiCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metHFPhiCalibrationLUTFile");
310  std::ifstream metHFPhiCalibrationLUTStream(metHFPhiCalibrationLUTFile.fullPath());
311  std::shared_ptr<LUT> metHFPhiCalibrationLUT(new LUT(metHFPhiCalibrationLUTStream));
312  m_params_helper.setMetHFPhiCalibrationLUT(*metHFPhiCalibrationLUT);
313 
314  // HI centrality trigger
315  std::vector<double> etSumCentLower = conf.getParameter<std::vector<double>>("etSumCentralityLower");
316  std::vector<double> etSumCentUpper = conf.getParameter<std::vector<double>>("etSumCentralityUpper");
317  if (etSumCentLower.size() == etSumCentUpper.size()) {
318  for (unsigned i = 0; i < etSumCentLower.size(); ++i) {
319  m_params_helper.setEtSumCentLower(i, etSumCentLower.at(i));
320  m_params_helper.setEtSumCentUpper(i, etSumCentUpper.at(i));
321  }
322  } else {
323  edm::LogError("l1t|calo") << "Inconsistent number of Centrality boundaries" << std::endl;
324  }
325 
326  edm::FileInPath centralityLUTFile = conf.getParameter<edm::FileInPath>("centralityLUTFile");
327  std::ifstream centralityLUTStream(centralityLUTFile.fullPath());
328  auto centralityLUT = std::make_shared<LUT>(centralityLUTStream);
329  m_params_helper.setCentralityLUT(*centralityLUT);
330  m_params_helper.setCentralityRegionMask(conf.getParameter<int>("centralityRegionMask"));
331  std::vector<int> minbiasThresholds = conf.getParameter<std::vector<int>>("minimumBiasThresholds");
332  if (minbiasThresholds.size() == 4) {
333  m_params_helper.setMinimumBiasThresholds(minbiasThresholds);
334  } else {
335  edm::LogError("l1t|calo") << "Incorrect number of minimum bias thresholds set.";
336  }
337 
338  // HI Q2 trigger
340  std::ifstream q2LUTStream(q2LUTFile.fullPath());
341  auto q2LUT = std::make_shared<LUT>(q2LUTStream);
342  m_params_helper.setQ2LUT(*q2LUT);
343 
344  // Layer 1 LUT specification
345  m_params_helper.setLayer1ECalScaleFactors(conf.getParameter<std::vector<double>>("layer1ECalScaleFactors"));
346  m_params_helper.setLayer1HCalScaleFactors(conf.getParameter<std::vector<double>>("layer1HCalScaleFactors"));
347  m_params_helper.setLayer1HFScaleFactors(conf.getParameter<std::vector<double>>("layer1HFScaleFactors"));
348  m_params_helper.setLayer1HCalFBLUTUpper(conf.getParameter<std::vector<unsigned>>("layer1HCalFBLUTUpper"));
349  m_params_helper.setLayer1HCalFBLUTLower(conf.getParameter<std::vector<unsigned>>("layer1HCalFBLUTLower"));
350 
351  m_params_helper.setLayer1ECalScaleETBins(conf.getParameter<std::vector<int>>("layer1ECalScaleETBins"));
352  m_params_helper.setLayer1HCalScaleETBins(conf.getParameter<std::vector<int>>("layer1HCalScaleETBins"));
353  m_params_helper.setLayer1HFScaleETBins(conf.getParameter<std::vector<int>>("layer1HFScaleETBins"));
354 
355  m_params_helper.setLayer1ECalScalePhiBins(conf.getParameter<std::vector<unsigned>>("layer1ECalScalePhiBins"));
356  m_params_helper.setLayer1HCalScalePhiBins(conf.getParameter<std::vector<unsigned>>("layer1HCalScalePhiBins"));
357  m_params_helper.setLayer1HFScalePhiBins(conf.getParameter<std::vector<unsigned>>("layer1HFScalePhiBins"));
358 
359  if (conf.existsAs<std::vector<unsigned>>("layer1SecondStageLUT")) {
360  m_params_helper.setLayer1SecondStageLUT(conf.getParameter<std::vector<unsigned>>("layer1SecondStageLUT"));
361  }
362 
363  m_params = (CaloParams)m_params_helper;
364 }
365 
367  // do anything here that needs to be done at desctruction time
368  // (e.g. close files, deallocate resources etc.)
369 }
370 
371 //
372 // member functions
373 //
374 
375 // ------------ method called to produce the data ------------
377  return std::make_unique<CaloParams>(m_params);
378 }
379 
380 //define this as a plug-in
void setEtSumEtaMax(unsigned isum, int eta)
void setEtSumEcalSumCalibrationLUT(const l1t::LUT &lut)
void setEtSumEcalSumPUSType(std::string type)
void setMetPhiCalibrationLUT(const l1t::LUT &lut)
void setTauMaxJetIsolationA(double cutValue)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void setEgCalibrationVersion(unsigned version)
void setCentralityLUT(const l1t::LUT &lut)
void setLayer1HFScaleFactors(std::vector< double > params)
void setIsoTauEtaMax(int value)
void setTauMinPtJetIsolationB(double limit)
void setRegionPUSType(std::string type)
void setEtSumBypassMetPUS(unsigned flag)
void setEgNeighbourThreshold(double thresh)
void setEgMinPtHOverEIsolation(int cutValue)
void setEgLsb(double lsb)
void setJetCalibrationParams(std::vector< double > params)
void setTauEtToHFRingEtLUT(const l1t::LUT &lut)
void setTauCalibrationLUT(const l1t::LUT &lut)
void setTauLsb(double lsb)
void setTauIsolationLUT(const l1t::LUT &lut)
void setJetCalibrationLUT(const l1t::LUT &lut)
void setEtSumBypassEcalSumPUS(unsigned flag)
void setTauNeighbourThreshold(double thresh)
void setEgMaxPtJetIsolation(int cutValue)
void setEtSumMetPUSLUT(const l1t::LUT &lut)
void setEgHOverEcutEndcap(int cut)
void setEgHcalThreshold(double thresh)
void setTauIsoAreaNrTowersPhi(unsigned iTauIsoAreaNrTowersPhi)
void setEgBypassExtHOverE(unsigned flag)
void setLayer1HCalFBLUTLower(std::vector< unsigned > params)
void setEtSumEttCalibrationLUT(const l1t::LUT &lut)
void setLayer1ECalScalePhiBins(std::vector< unsigned > params)
void setCentralityRegionMask(int mask)
delete x;
Definition: CaloConfig.h:22
L1TCaloParamsESProducer(const edm::ParameterSet &)
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:172
void setJetCompressEtaLUT(const l1t::LUT &lut)
Log< level::Error, false > LogError
void setTauIsoAreaNrTowersEta(unsigned iTauIsoAreaNrTowersEta)
void setEgCalibrationLUT(const l1t::LUT &lut)
void setLayer1HCalScalePhiBins(std::vector< unsigned > params)
void setEgShapeIdLUT(const l1t::LUT &lut)
void setEtSumEttPUSLUT(const l1t::LUT &lut)
void setJetCompressPtLUT(const l1t::LUT &lut)
void setEgHOverEcutBarrel(int cut)
void setEtSumEcalSumCalibrationType(std::string type)
void setEgBypassECALFG(unsigned flag)
ReturnType produce(const L1TCaloParamsRcd &)
void setEtSumEtaMin(unsigned isum, int eta)
void setEtSumCentLower(unsigned centClass, double loBound)
void setTauMaxPtTauVeto(double limit)
void setRegionLsb(double lsb)
void setJetCalibrationType(std::string type)
void setEtSumMetPUSType(std::string type)
void setJetPUSUsePhiRing(unsigned flag)
void setTowerLsbH(double lsb)
void setLayer1HCalScaleFactors(std::vector< double > params)
void setLayer1HCalFBLUTUpper(std::vector< unsigned > params)
void setEgMinPtJetIsolation(int cutValue)
void setEgBypassEGVetos(unsigned flag)
void setEtSumCentUpper(unsigned centClass, double upBound)
void setEgIsolationLUT2(const l1t::LUT &lut)
void setTauCompressLUT(const l1t::LUT &lut)
void setLayer1HCalScaleETBins(std::vector< int > params)
void setEtSumEtThreshold(unsigned isum, double thresh)
void setTauPUSType(std::string type)
void setEgPUSType(std::string type)
void setLayer1ECalScaleETBins(std::vector< int > params)
void setTauSeedThreshold(double thresh)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
void setTowerEncoding(bool doit)
void setTauMaxJetIsolationB(double limit)
void setEgIsoAreaNrTowersPhi(unsigned iEgIsoAreaNrTowersPhi)
void setEgBypassShape(unsigned flag)
void setJetNeighbourThreshold(double thresh)
void setEgShapeIdVersion(unsigned version)
void setTauRegionMask(int mask)
void setJetRegionMask(int mask)
void setEgEtaCut(int mask)
void setEgMaxHcalEt(double cut)
void setLayer1SecondStageLUT(const std::vector< unsigned > &lut)
void setLayer1HFScalePhiBins(std::vector< unsigned > params)
void setJetLsb(double lsb)
void setTauPUSParams(const std::vector< double > &params)
void setLayer1HFScaleETBins(std::vector< int > params)
void setEtSumEttCalibrationType(std::string type)
void setQ2LUT(const l1t::LUT &lut)
void setEtSumBypassEttPUS(unsigned flag)
std::unique_ptr< CaloParams > ReturnType
void setEgMaxHOverELUT(const l1t::LUT &lut)
void setMinimumBiasThresholds(std::vector< int > thresholds)
void setMetCalibrationType(std::string type)
void setJetSeedThreshold(double thresh)
void setMetHFCalibrationType(std::string type)
void setEgMaxPtHOverE(double thresh)
void setLayer1ECalScaleFactors(std::vector< double > params)
void setEgTrimmingLUT(const l1t::LUT &lut)
void setRegionPUSParams(const std::vector< double > &params)
void setEgIsolationLUT(const l1t::LUT &lut)
void setEgMaxPtHOverEIsolation(int cutValue)
void setTauIsolationLUT2(const l1t::LUT &lut)
void setJetBypassPUS(unsigned flag)
void setTauTrimmingShapeVetoLUT(const l1t::LUT &lut)
void setMetHFPhiCalibrationLUT(const l1t::LUT &lut)
void setEgBypassHoE(unsigned flag)
void setMetHFCalibrationLUT(const l1t::LUT &lut)
void setEtSumEttPUSType(std::string type)
void setEgSeedThreshold(double thresh)
void setTauIsoVetoNrTowersPhi(unsigned iTauIsoVetoNrTowersPhi)
void setMetCalibrationLUT(const l1t::LUT &lut)
void setJetPUSType(std::string type)
void setEgIsoVetoNrTowersPhi(unsigned iEgIsoVetoNrTowersPhi)
void setEtSumLsb(double lsb)
void setEgIsoAreaNrTowersEta(unsigned iEgIsoAreaNrTowersEta)
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:31
void setEgShapeIdType(std::string type)
void setIsoTauEtaMin(int value)
void setTowerLsbSum(double lsb)
void setEgPUSParams(const std::vector< double > &params)
void setTowerLsbE(double lsb)
void setEgCalibrationType(std::string type)
void setEtSumEcalSumPUSLUT(const l1t::LUT &lut)
void setEgCompressShapesLUT(const l1t::LUT &lut)
void setTowerNBitsRatio(int n)
void setEgIsolationType(std::string type)