CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalHardcodeCalibrations.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // Original Author: Fedor Ratnikov
3 //
4 //
5 
6 #include <memory>
7 #include <iostream>
8 
16 
19 
23 
25 
26 //#define DebugLog
27 
28 // class decleration
29 //
30 
31 using namespace cms;
32 
33 namespace {
34 
35  std::vector<HcalGenericDetId> allCells (const HcalTopology& hcaltopology, bool killHE = false) {
36  static std::vector<HcalGenericDetId> result;
37  int maxDepthHB=hcaltopology.maxDepthHB();
38  int maxDepthHE=hcaltopology.maxDepthHE();
39 
40 #ifdef DebugLog
41  std::cout << std::endl << "HcalHardcodeCalibrations: maxDepthHB, maxDepthHE = "
42  << maxDepthHB << ", " << maxDepthHE << std::endl;
43 #endif
44 
45  if (result.size () <= 0) {
46  for (int eta = -HcalDetId::kHcalEtaMask2;
48  for (int phi = 0; phi <= HcalDetId::kHcalPhiMask2; phi++) {
49  for (int depth = 1; depth < maxDepthHB + maxDepthHE; depth++) {
50  for (int det = 1; det <= HcalForward; det++) {
51  HcalDetId cell ((HcalSubdetector) det, eta, phi, depth);
52  if( killHE && HcalEndcap == cell.subdetId() ) continue;
53  if (hcaltopology.valid(cell)) {
54  result.push_back (cell);
55 #ifdef DebugLog
56  std::cout << " HcalHardcodedCalibrations: det|eta|phi|depth = "
57  << det << "|" << eta << "|" << phi << "|"
58  << depth << std::endl;
59 #endif
60  }
61  }
62  }
63  }
64  }
65  ZdcTopology zdctopology;
66  HcalZDCDetId zcell;
68  for(int depth= 1; depth < 6; depth++){
69  zcell = HcalZDCDetId(section, true, depth);
70  if(zdctopology.valid(zcell)) result.push_back(zcell);
71  zcell = HcalZDCDetId(section, false, depth);
72  if(zdctopology.valid(zcell)) result.push_back(zcell);
73  }
74  section = HcalZDCDetId::HAD;
75  for(int depth= 1; depth < 5; depth++){
76  zcell = HcalZDCDetId(section, true, depth);
77  if(zdctopology.valid(zcell)) result.push_back(zcell);
78  zcell = HcalZDCDetId(section, false, depth);
79  if(zdctopology.valid(zcell)) result.push_back(zcell);
80  }
81  section = HcalZDCDetId::LUM;
82  for(int depth= 1; depth < 3; depth++){
83  zcell = HcalZDCDetId(section, true, depth);
84  if(zdctopology.valid(zcell)) result.push_back(zcell);
85  zcell = HcalZDCDetId(section, false, depth);
86  if(zdctopology.valid(zcell)) result.push_back(zcell);
87  }
88  section = HcalZDCDetId::RPD;
89  for(int depth= 1; depth < 17; depth++){
90  zcell = HcalZDCDetId(section, true, depth);
91  if(zdctopology.valid(zcell)) result.push_back(zcell);
92  zcell = HcalZDCDetId(section, false, depth);
93  if(zdctopology.valid(zcell)) result.push_back(zcell);
94  }
95 
96  // HcalGenTriggerTower (HcalGenericSubdetector = 5)
97  // NASTY HACK !!!
98  // - As no valid(cell) check found for HcalTrigTowerDetId
99  // to create HT cells (ieta=1-28, iphi=1-72)&(ieta=29-32, iphi=1,5,... 69)
100 
101  for (int vers=0; vers<=HcalTrigTowerDetId::kHcalVersMask; ++vers) {
105  for (int phi = 1; phi <= HcalTrigTowerDetId::kHcalPhiMask; phi++) {
106  HcalTrigTowerDetId cell(eta, phi,depth,vers);
107  if (hcaltopology.validHT(cell)) {
108  result.push_back (cell);
109 #ifdef DebugLog
110  std::cout << " HcalHardcodedCalibrations: eta|phi|depth|vers = "
111  << eta << "|" << phi << "|" << depth << "|" << vers
112  << std::endl;
113 #endif
114  }
115  }
116  }
117  }
118  }
119  }
120  return result;
121  }
122 
123 }
124 
126  he_recalibration(0), hf_recalibration(0), setHEdsegm(false), setHBdsegm(false)
127 {
128  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
129 
130  if ( iConfig.exists("GainWidthsForTrigPrims") )
131  switchGainWidthsForTrigPrims = iConfig.getParameter<bool>("GainWidthsForTrigPrims");
132  else switchGainWidthsForTrigPrims = false;
133 
134  //DB helper preparation
142  dbHardcode.useHBUpgrade(iConfig.getParameter<bool>("useHBUpgrade"));
143  dbHardcode.useHEUpgrade(iConfig.getParameter<bool>("useHEUpgrade"));
144  dbHardcode.useHFUpgrade(iConfig.getParameter<bool>("useHFUpgrade"));
145  dbHardcode.useHOUpgrade(iConfig.getParameter<bool>("useHOUpgrade"));
146  dbHardcode.testHFQIE10(iConfig.getParameter<bool>("testHFQIE10"));
147  dbHardcode.setKillHE(iConfig.getParameter<bool>("killHE"));
148  dbHardcode.setSiPMCharacteristics(iConfig.getParameter<std::vector<edm::ParameterSet>>("SiPMCharacteristics"));
149 
150  useLayer0Weight = iConfig.getParameter<bool>("useLayer0Weight");
151  // HE and HF recalibration preparation
152  iLumi=iConfig.getParameter<double>("iLumi");
153 
154  if( iLumi > 0.0 ) {
155  bool he_recalib = iConfig.getParameter<bool>("HERecalibration");
156  bool hf_recalib = iConfig.getParameter<bool>("HFRecalibration");
157  if(he_recalib) {
158  double cutoff = iConfig.getParameter<double>("HEreCalibCutoff");
159  he_recalibration = new HERecalibration(iLumi,cutoff);
160  }
161  if(hf_recalib && !iConfig.getParameter<edm::ParameterSet>("HFRecalParameterBlock").empty()) hf_recalibration = new HFRecalibration(iConfig.getParameter<edm::ParameterSet>("HFRecalParameterBlock"));
162 
163 #ifdef DebugLog
164  std::cout << " HcalHardcodeCalibrations: iLumi = " << iLumi << std::endl;
165 #endif
166  }
167 
168  std::vector <std::string> toGet = iConfig.getUntrackedParameter <std::vector <std::string> > ("toGet");
169  for(std::vector <std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName ) {
170  bool all = *objectName == "all";
171 #ifdef DebugLog
172  std::cout << "Load parameters for " << *objectName << std::endl;
173 #endif
174  if ((*objectName == "Pedestals") || all) {
176  findingRecord <HcalPedestalsRcd> ();
177  }
178  if ((*objectName == "PedestalWidths") || all) {
180  findingRecord <HcalPedestalWidthsRcd> ();
181  }
182  if ((*objectName == "Gains") || all) {
184  findingRecord <HcalGainsRcd> ();
185  }
186  if ((*objectName == "GainWidths") || all) {
188  findingRecord <HcalGainWidthsRcd> ();
189  }
190  if ((*objectName == "QIEData") || all) {
192  findingRecord <HcalQIEDataRcd> ();
193  }
194  if ((*objectName == "QIETypes") || all) {
196  findingRecord <HcalQIETypesRcd> ();
197  }
198  if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
200  findingRecord <HcalChannelQualityRcd> ();
201  }
202  if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
204  findingRecord <HcalElectronicsMapRcd> ();
205  }
206  if ((*objectName == "ZSThresholds") || (*objectName == "zsThresholds") || all) {
208  findingRecord <HcalZSThresholdsRcd> ();
209  }
210  if ((*objectName == "RespCorrs") || (*objectName == "ResponseCorrection") || all) {
212  findingRecord <HcalRespCorrsRcd> ();
213  }
214  if ((*objectName == "LUTCorrs") || (*objectName == "LUTCorrection") || all) {
216  findingRecord <HcalLUTCorrsRcd> ();
217  }
218  if ((*objectName == "PFCorrs") || (*objectName == "PFCorrection") || all) {
220  findingRecord <HcalPFCorrsRcd> ();
221  }
222  if ((*objectName == "TimeCorrs") || (*objectName == "TimeCorrection") || all) {
224  findingRecord <HcalTimeCorrsRcd> ();
225  }
226  if ((*objectName == "L1TriggerObjects") || (*objectName == "L1Trigger") || all) {
228  findingRecord <HcalL1TriggerObjectsRcd> ();
229  }
230  if ((*objectName == "ValidationCorrs") || (*objectName == "ValidationCorrection") || all) {
232  findingRecord <HcalValidationCorrsRcd> ();
233  }
234  if ((*objectName == "LutMetadata") || (*objectName == "lutMetadata") || all) {
236  findingRecord <HcalLutMetadataRcd> ();
237  }
238  if ((*objectName == "DcsValues") || all) {
240  findingRecord <HcalDcsRcd> ();
241  }
242  if ((*objectName == "DcsMap") || (*objectName == "dcsMap") || all) {
244  findingRecord <HcalDcsMapRcd> ();
245  }
246  if ((*objectName == "RecoParams") || all) {
248  findingRecord <HcalRecoParamsRcd> ();
249  }
250  if ((*objectName == "LongRecoParams") || all) {
252  findingRecord <HcalLongRecoParamsRcd> ();
253  }
254  if ((*objectName == "ZDCLowGainFractions") || all) {
256  findingRecord <HcalZDCLowGainFractionsRcd> ();
257  }
258  if ((*objectName == "MCParams") || all) {
260  findingRecord <HcalMCParamsRcd> ();
261  }
262  if ((*objectName == "FlagHFDigiTimeParams") || all) {
264  findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
265  }
266  if ((*objectName == "FrontEndMap") || (*objectName == "frontEndMap") || all) {
268  findingRecord <HcalFrontEndMapRcd> ();
269  }
270  if ((*objectName == "SiPMParameters") || all) {
272  findingRecord <HcalSiPMParametersRcd> ();
273  }
274  if ((*objectName == "SiPMCharacteristics") || all) {
276  findingRecord <HcalSiPMCharacteristicsRcd> ();
277  }
278  if ((*objectName == "TPChannelParameters") || all) {
280  findingRecord <HcalTPChannelParametersRcd> ();
281  }
282  if ((*objectName == "TPParameters") || all) {
284  findingRecord <HcalTPParametersRcd> ();
285  }
286  }
287 }
288 
289 
291 {
292  if (he_recalibration != 0 ) delete he_recalibration;
293  if (hf_recalibration != 0 ) delete hf_recalibration;
294 }
295 
296 //
297 // member functions
298 //
299 void
301  std::string record = iKey.name ();
302  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::setIntervalFor-> key: " << record << " time: " << iTime.eventID() << '/' << iTime.time ().value ();
304 }
305 
306 std::unique_ptr<HcalPedestals> HcalHardcodeCalibrations::producePedestals (const HcalPedestalsRcd& rec) {
307  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePedestals-> ...";
309  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
310  const HcalTopology* topo=&(*htopo);
311 
312  auto result = std::make_unique<HcalPedestals>(topo,false);
313  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
314  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
315  HcalPedestal item = dbHardcode.makePedestal (*cell, false);
316  result->addValues(item);
317  }
318  return result;
319 }
320 
321 std::unique_ptr<HcalPedestalWidths> HcalHardcodeCalibrations::producePedestalWidths (const HcalPedestalWidthsRcd& rec) {
322  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePedestalWidths-> ...";
324  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
325  const HcalTopology* topo=&(*htopo);
326 
327  auto result = std::make_unique<HcalPedestalWidths>(topo,false);
328  std::vector <HcalGenericDetId> cells = allCells(*htopo, dbHardcode.killHE());
329  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
331  result->addValues(item);
332  }
333  return result;
334 }
335 
336 std::unique_ptr<HcalGains> HcalHardcodeCalibrations::produceGains (const HcalGainsRcd& rec) {
337  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGains-> ...";
339  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
340  const HcalTopology* topo=&(*htopo);
341 
342  auto result = std::make_unique<HcalGains>(topo);
343  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
344  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
345  HcalGain item = dbHardcode.makeGain (*cell);
346  result->addValues(item);
347  }
348  return result;
349 }
350 
351 std::unique_ptr<HcalGainWidths> HcalHardcodeCalibrations::produceGainWidths (const HcalGainWidthsRcd& rec) {
352  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGainWidths-> ...";
354  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
355  const HcalTopology* topo=&(*htopo);
356 
357  auto result = std::make_unique<HcalGainWidths>(topo);
358  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
359  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
360 
361  // for Upgrade - include TrigPrims, for regular case - only HcalDetId
363  HcalGainWidth item = dbHardcode.makeGainWidth (*cell);
364  result->addValues(item);
365  } else if (!cell->isHcalTrigTowerDetId()) {
366  HcalGainWidth item = dbHardcode.makeGainWidth (*cell);
367  result->addValues(item);
368  }
369  }
370  return result;
371 }
372 
373 std::unique_ptr<HcalQIEData> HcalHardcodeCalibrations::produceQIEData (const HcalQIEDataRcd& rcd) {
374  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceQIEData-> ...";
375 
376  /*
377  std::cout << std::endl << ">>> HcalHardcodeCalibrations::produceQIEData"
378  << std::endl;
379  */
380 
382  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
383  const HcalTopology* topo=&(*htopo);
384 
385  auto result = std::make_unique<HcalQIEData>(topo);
386  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
387  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
388  HcalQIECoder coder = dbHardcode.makeQIECoder (*cell);
389  result->addCoder (coder);
390  }
391  return result;
392 }
393 
394 std::unique_ptr<HcalQIETypes> HcalHardcodeCalibrations::produceQIETypes (const HcalQIETypesRcd& rcd) {
395  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceQIETypes-> ...";
397  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
398  const HcalTopology* topo=&(*htopo);
399 
400  auto result = std::make_unique<HcalQIETypes>(topo);
401  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
402  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
403  HcalQIEType item = dbHardcode.makeQIEType(*cell);
404  result->addValues(item);
405  }
406  return result;
407 }
408 
409 std::unique_ptr<HcalChannelQuality> HcalHardcodeCalibrations::produceChannelQuality (const HcalChannelQualityRcd& rcd) {
410  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceChannelQuality-> ...";
412  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
413  const HcalTopology* topo=&(*htopo);
414 
415  auto result = std::make_unique<HcalChannelQuality>(topo);
416  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
417  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
418  HcalChannelStatus item(cell->rawId(),0);
419  result->addValues(item);
420  }
421  return result;
422 }
423 
424 
425 std::unique_ptr<HcalRespCorrs> HcalHardcodeCalibrations::produceRespCorrs (const HcalRespCorrsRcd& rcd) {
426  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRespCorrs-> ...";
428  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
429  const HcalTopology* topo=&(*htopo);
430 
431  //set depth segmentation for HB/HE recalib - only happens once
432 // if((he_recalibration && !setHEdsegm) || (hb_recalibration && !setHBdsegm)){
433  if((he_recalibration && !setHEdsegm)) {
434  std::vector<std::vector<int>> m_segmentation;
435  int maxEta = topo->lastHERing();
436  m_segmentation.resize(maxEta);
437  for (int i = 0; i < maxEta; i++) {
438  topo->getDepthSegmentation(i+1,m_segmentation[i]);
439  }
441  he_recalibration->setDsegm(m_segmentation);
442  setHEdsegm = true;
443  }
444  /*
445  if(hb_recalibration && !setHBdsegm){
446  hb_recalibration->setDsegm(m_segmentation);
447  setHBdsegm = true;
448  }
449  */
450  }
451 
452  auto result = std::make_unique<HcalRespCorrs>(topo);
453  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
454  for (const auto& cell : cells) {
455 
456  double corr = 1.0;
457 
458  //check for layer 0 reweighting: when depth 1 has only one layer, it is layer 0
459  if( useLayer0Weight &&
460  ((cell.genericSubdet() == HcalGenericDetId::HcalGenEndcap) || (cell.genericSubdet() == HcalGenericDetId::HcalGenBarrel)) &&
461  (HcalDetId(cell).depth()==1 && dbHardcode.getLayersInDepth(HcalDetId(cell).ietaAbs(),HcalDetId(cell).depth(),topo)==1) )
462  {
463  //layer 0 is thicker than other layers (9mm vs 3.7mm) and brighter (Bicron vs SCSN81)
464  //in Run1/Run2 (pre-2017 for HE), ODU for layer 0 had neutral density filter attached
465  //NDF was simulated as weight of 0.5 applied to Geant energy deposits
466  //for Phase1, NDF is removed - simulated as weight of 1.2 applied to Geant energy deposits
467  //to maintain RECO calibrations, move the layer 0 energy scale back to its previous state using respcorrs
468  corr = 0.5/1.2;
469  }
470 
471  if ((he_recalibration != 0 ) && (cell.genericSubdet() == HcalGenericDetId::HcalGenEndcap)) {
472  int depth_ = HcalDetId(cell).depth();
473  int ieta_ = HcalDetId(cell).ieta();
474  corr *= he_recalibration->getCorr(ieta_, depth_);
475 #ifdef DebugLog
476  std::cout << "HE ieta, depth = " << ieta_ << ", " << depth_ << " corr = " << corr << std::endl;
477 #endif
478  }
479  else if ((hf_recalibration != 0 ) && (cell.genericSubdet() == HcalGenericDetId::HcalGenForward)) {
480  int depth_ = HcalDetId(cell).depth();
481  int ieta_ = HcalDetId(cell).ieta();
482  corr = hf_recalibration->getCorr(ieta_, depth_, iLumi);
483 #ifdef DebugLog
484  std::cout << "HF ieta, depth = " << ieta_ << ", " << depth_ << " corr = " << corr << std::endl;
485 #endif
486  }
487 
488  HcalRespCorr item(cell.rawId(),corr);
489  result->addValues(item);
490  }
491  return result;
492 }
493 
494 std::unique_ptr<HcalLUTCorrs> HcalHardcodeCalibrations::produceLUTCorrs (const HcalLUTCorrsRcd& rcd) {
495  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLUTCorrs-> ...";
497  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
498  const HcalTopology* topo=&(*htopo);
499 
500  auto result = std::make_unique<HcalLUTCorrs>(topo);
501  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
502  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
503  HcalLUTCorr item(cell->rawId(),1.0);
504  result->addValues(item);
505  }
506  return result;
507 }
508 
509 std::unique_ptr<HcalPFCorrs> HcalHardcodeCalibrations::producePFCorrs (const HcalPFCorrsRcd& rcd) {
510  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePFCorrs-> ...";
512  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
513  const HcalTopology* topo=&(*htopo);
514 
515  auto result = std::make_unique<HcalPFCorrs>(topo);
516  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
517  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
518  HcalPFCorr item(cell->rawId(),1.0);
519  result->addValues(item);
520  }
521  return result;
522 }
523 
524 std::unique_ptr<HcalTimeCorrs> HcalHardcodeCalibrations::produceTimeCorrs (const HcalTimeCorrsRcd& rcd) {
525  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimeCorrs-> ...";
527  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
528  const HcalTopology* topo=&(*htopo);
529 
530  auto result = std::make_unique<HcalTimeCorrs>(topo);
531  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
532  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
533  HcalTimeCorr item(cell->rawId(),0.0);
534  result->addValues(item);
535  }
536  return result;
537 }
538 
539 std::unique_ptr<HcalZSThresholds> HcalHardcodeCalibrations::produceZSThresholds (const HcalZSThresholdsRcd& rcd) {
540  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceZSThresholds-> ...";
542  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
543  const HcalTopology* topo=&(*htopo);
544 
545  auto result = std::make_unique<HcalZSThresholds>(topo);
546  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
547  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
548  HcalZSThreshold item(cell->rawId(),0);
549  result->addValues(item);
550  }
551  return result;
552 }
553 
554 
555 std::unique_ptr<HcalL1TriggerObjects> HcalHardcodeCalibrations::produceL1TriggerObjects (const HcalL1TriggerObjectsRcd& rcd) {
556  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
558  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
559  const HcalTopology* topo=&(*htopo);
560 
561  auto result = std::make_unique<HcalL1TriggerObjects>(topo);
562  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
563  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
564  HcalL1TriggerObject item(cell->rawId(),0., 1., 0);
565  result->addValues(item);
566  }
567  // add tag and algo values
568  result->setTagString("hardcoded");
569  result->setAlgoString("hardcoded");
570  return result;
571 }
572 
573 
574 std::unique_ptr<HcalElectronicsMap> HcalHardcodeCalibrations::produceElectronicsMap (const HcalElectronicsMapRcd& rcd) {
575  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceElectronicsMap-> ...";
577  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
578  const HcalTopology* topo=&(*htopo);
579 
580  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
581  auto result = std::make_unique<HcalElectronicsMap>();
582  dbHardcode.makeHardcodeMap(*result,cells);
583  return result;
584 }
585 
586 std::unique_ptr<HcalValidationCorrs> HcalHardcodeCalibrations::produceValidationCorrs (const HcalValidationCorrsRcd& rcd) {
587  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceValidationCorrs-> ...";
589  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
590  const HcalTopology* topo=&(*htopo);
591 
592  auto result = std::make_unique<HcalValidationCorrs>(topo);
593  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
594  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
595  HcalValidationCorr item(cell->rawId(),1.0);
596  result->addValues(item);
597  }
598  return result;
599 }
600 
601 std::unique_ptr<HcalLutMetadata> HcalHardcodeCalibrations::produceLutMetadata (const HcalLutMetadataRcd& rcd) {
602  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLutMetadata-> ...";
604  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
605  const HcalTopology* topo=&(*htopo);
606 
607  auto result = std::make_unique<HcalLutMetadata>(topo);
608 
609  result->setRctLsb( 0.5 );
610  result->setNominalGain(0.177); // for HBHE SiPMs
611 
612  std::vector <HcalGenericDetId> cells = allCells(*topo,dbHardcode.killHE());
613  for (const auto& cell: cells) {
614  float rcalib = 1.;
615  int granularity = 1;
616  int threshold = 1;
617 
619  // Use values from 2016 as starting conditions for 2017+. These are
620  // averaged over the subdetectors, with the last two HE towers split
621  // off due to diverging correction values.
622  switch (cell.genericSubdet()) {
624  rcalib = 1.128;
625  break;
627  {
628  HcalDetId id(cell);
629  if (id.ietaAbs() >= 28)
630  rcalib = 1.188;
631  else
632  rcalib = 1.117;
633  }
634  break;
636  rcalib = 1.02;
637  break;
638  default:
639  break;
640  }
641 
642  if (cell.isHcalTrigTowerDetId()) {
643  rcalib = 0.;
644  }
645  }
646 
647  HcalLutMetadatum item(cell.rawId(), rcalib, granularity, threshold);
648  result->addValues(item);
649  }
650 
651  return result;
652 }
653 
654 std::unique_ptr<HcalDcsValues> HcalHardcodeCalibrations::produceDcsValues (const HcalDcsRcd& rcd) {
655  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsValues-> ...";
656  auto result = std::make_unique<HcalDcsValues>();
657  return result;
658 }
659 
660 std::unique_ptr<HcalDcsMap> HcalHardcodeCalibrations::produceDcsMap (const HcalDcsMapRcd& rcd) {
661  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsMap-> ...";
662 
663  auto result = std::make_unique<HcalDcsMap>();
665  return result;
666 }
667 
668 std::unique_ptr<HcalRecoParams> HcalHardcodeCalibrations::produceRecoParams (const HcalRecoParamsRcd& rec) {
669  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRecoParams-> ...";
671  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
672  const HcalTopology* topo=&(*htopo);
673 
674  auto result = std::make_unique<HcalRecoParams>(topo);
675  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
676  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
677  HcalRecoParam item = dbHardcode.makeRecoParam (*cell);
678  result->addValues(item);
679  }
680  return result;
681 }
682 
683 std::unique_ptr<HcalTimingParams> HcalHardcodeCalibrations::produceTimingParams (const HcalTimingParamsRcd& rec) {
684  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimingParams-> ...";
686  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
687  const HcalTopology* topo=&(*htopo);
688 
689  auto result = std::make_unique<HcalTimingParams>(topo);
690  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
691  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
693  result->addValues(item);
694  }
695  return result;
696 }
697 
698 std::unique_ptr<HcalLongRecoParams> HcalHardcodeCalibrations::produceLongRecoParams (const HcalLongRecoParamsRcd& rec) {
699  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLongRecoParams-> ...";
701  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
702  const HcalTopology* topo=&(*htopo);
703 
704  auto result = std::make_unique<HcalLongRecoParams>(topo);
705  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
706  std::vector <unsigned int> mSignal;
707  mSignal.push_back(4);
708  mSignal.push_back(5);
709  mSignal.push_back(6);
710  std::vector <unsigned int> mNoise;
711  mNoise.push_back(1);
712  mNoise.push_back(2);
713  mNoise.push_back(3);
714  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
715  if (cell->isHcalZDCDetId())
716  {
717  HcalLongRecoParam item(cell->rawId(),mSignal,mNoise);
718  result->addValues(item);
719  }
720  }
721  return result;
722 }
723 
724 std::unique_ptr<HcalZDCLowGainFractions> HcalHardcodeCalibrations::produceZDCLowGainFractions (const HcalZDCLowGainFractionsRcd& rec) {
725  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
727  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
728  const HcalTopology* topo=&(*htopo);
729 
730  auto result = std::make_unique<HcalZDCLowGainFractions>(topo);
731  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
732  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
733  HcalZDCLowGainFraction item(cell->rawId(),0.0);
734  result->addValues(item);
735  }
736  return result;
737 }
738 
739 std::unique_ptr<HcalMCParams> HcalHardcodeCalibrations::produceMCParams (const HcalMCParamsRcd& rec) {
740 
741 
742  // std::cout << std::endl << " .... HcalHardcodeCalibrations::produceMCParams ->"<< std::endl;
743 
744  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceMCParams-> ...";
746  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
747  const HcalTopology* topo=&(*htopo);
748  auto result = std::make_unique<HcalMCParams>(topo);
749  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
750  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
751 
752  // HcalMCParam item(cell->rawId(),0);
753  HcalMCParam item = dbHardcode.makeMCParam (*cell);
754  result->addValues(item);
755  }
756  return result;
757 }
758 
759 
760 std::unique_ptr<HcalFlagHFDigiTimeParams> HcalHardcodeCalibrations::produceFlagHFDigiTimeParams (const HcalFlagHFDigiTimeParamsRcd& rec) {
761  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
763  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
764  const HcalTopology* topo=&(*htopo);
765 
766  auto result = std::make_unique<HcalFlagHFDigiTimeParams>(topo);
767  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
768 
769  std::vector<double> coef;
770  coef.push_back(0.93);
771  coef.push_back(-0.38275);
772  coef.push_back(-0.012667);
773 
774  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
775  HcalFlagHFDigiTimeParam item(cell->rawId(),
776  1, //firstsample
777  3, // samplestoadd
778  2, //expectedpeak
779  40., // min energy threshold
780  coef // coefficients
781  );
782  result->addValues(item);
783  }
784  return result;
785 }
786 
787 
788 std::unique_ptr<HcalFrontEndMap> HcalHardcodeCalibrations::produceFrontEndMap (const HcalFrontEndMapRcd& rec) {
789  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceFrontEndMap-> ...";
791  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
792  const HcalTopology* topo=&(*htopo);
793  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
794 
795  auto result = std::make_unique<HcalFrontEndMap>();
796  dbHardcode.makeHardcodeFrontEndMap(*result, cells);
797  return result;
798 }
799 
800 
801 std::unique_ptr<HcalSiPMParameters> HcalHardcodeCalibrations::produceSiPMParameters (const HcalSiPMParametersRcd& rec) {
802  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceSiPMParameters-> ...";
804  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
805  const HcalTopology* topo=&(*htopo);
806 
807  auto result = std::make_unique<HcalSiPMParameters>(topo);
808  std::vector <HcalGenericDetId> cells = allCells(*htopo, dbHardcode.killHE());
809  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
811  result->addValues(item);
812  }
813  return result;
814 }
815 
816 std::unique_ptr<HcalSiPMCharacteristics> HcalHardcodeCalibrations::produceSiPMCharacteristics (const HcalSiPMCharacteristicsRcd& rcd) {
817  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceSiPMCharacteristics-> ...";
818 
819  auto result = std::make_unique<HcalSiPMCharacteristics>();
821  return result;
822 }
823 
824 
825 std::unique_ptr<HcalTPChannelParameters> HcalHardcodeCalibrations::produceTPChannelParameters (const HcalTPChannelParametersRcd& rec) {
826  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTPChannelParameters-> ...";
828  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
829  const HcalTopology* topo=&(*htopo);
830 
831  auto result = std::make_unique<HcalTPChannelParameters>(topo);
832  std::vector <HcalGenericDetId> cells = allCells(*htopo, dbHardcode.killHE());
833  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
835  result->addValues(item);
836  }
837  return result;
838 }
839 
840 std::unique_ptr<HcalTPParameters> HcalHardcodeCalibrations::produceTPParameters (const HcalTPParametersRcd& rcd) {
841  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTPParameters-> ...";
842 
843  auto result = std::make_unique<HcalTPParameters>();
845  return result;
846 }
847 
850  desc.add<double>("iLumi",-1.);
851  desc.add<bool>("HERecalibration",false);
852  desc.add<double>("HEreCalibCutoff",20.);
853  desc.add<bool>("HFRecalibration",false);
854  desc.add<bool>("GainWidthsForTrigPrims",false);
855  desc.add<bool>("useHBUpgrade",false);
856  desc.add<bool>("useHEUpgrade",false);
857  desc.add<bool>("useHFUpgrade",false);
858  desc.add<bool>("useHOUpgrade",true);
859  desc.add<bool>("testHFQIE10",false);
860  desc.add<bool>("killHE",false);
861  desc.add<bool>("useLayer0Weight",false);
862  desc.addUntracked<std::vector<std::string> >("toGet",std::vector<std::string>());
863  desc.addUntracked<bool>("fromDDD",false);
864 
866  desc_hb.add<std::vector<double>>("gain", std::vector<double>({0.19}));
867  desc_hb.add<std::vector<double>>("gainWidth", std::vector<double>({0.0}));
868  desc_hb.add<double>("pedestal", 3.0);
869  desc_hb.add<double>("pedestalWidth", 0.55);
870  desc_hb.add<std::vector<double>>("qieOffset", std::vector<double>({-0.49, 1.8, 7.2, 37.9}));
871  desc_hb.add<std::vector<double>>("qieSlope", std::vector<double>({0.912, 0.917, 0.922, 0.923}));
872  desc_hb.add<int>("qieType", 0);
873  desc_hb.add<int>("mcShape",125);
874  desc_hb.add<int>("recoShape",105);
875  desc_hb.add<double>("photoelectronsToAnalog",0.0);
876  desc_hb.add<std::vector<double>>("darkCurrent",std::vector<double>(0.0));
877  desc.add<edm::ParameterSetDescription>("hb", desc_hb);
878 
879  edm::ParameterSetDescription desc_hbUpgrade;
880  desc_hbUpgrade.add<std::vector<double>>("gain", std::vector<double>({0.00111111111111}));
881  desc_hbUpgrade.add<std::vector<double>>("gainWidth", std::vector<double>({0}));
882  desc_hbUpgrade.add<double>("pedestal", 18.0);
883  desc_hbUpgrade.add<double>("pedestalWidth", 5.0);
884  desc_hbUpgrade.add<std::vector<double>>("qieOffset", std::vector<double>({0.0, 0.0, 0.0, 0.0}));
885  desc_hbUpgrade.add<std::vector<double>>("qieSlope", std::vector<double>({0.333, 0.333, 0.333, 0.333}));
886  desc_hbUpgrade.add<int>("qieType", 2);
887  desc_hbUpgrade.add<int>("mcShape",203);
888  desc_hbUpgrade.add<int>("recoShape",203);
889  desc_hbUpgrade.add<double>("photoelectronsToAnalog",57.5);
890  desc_hbUpgrade.add<std::vector<double>>("darkCurrent",std::vector<double>(0.055));
891  desc.add<edm::ParameterSetDescription>("hbUpgrade", desc_hbUpgrade);
892 
894  desc_he.add<std::vector<double>>("gain", std::vector<double>({0.23}));
895  desc_he.add<std::vector<double>>("gainWidth", std::vector<double>({0}));
896  desc_he.add<double>("pedestal", 3.0);
897  desc_he.add<double>("pedestalWidth", 0.79);
898  desc_he.add<std::vector<double>>("qieOffset", std::vector<double>({-0.38, 2.0, 7.6, 39.6}));
899  desc_he.add<std::vector<double>>("qieSlope", std::vector<double>({0.912, 0.916, 0.92, 0.922}));
900  desc_he.add<int>("qieType", 0);
901  desc_he.add<int>("mcShape",125);
902  desc_he.add<int>("recoShape",105);
903  desc_he.add<double>("photoelectronsToAnalog",0.0);
904  desc_he.add<std::vector<double>>("darkCurrent",std::vector<double>(0.0));
905  desc.add<edm::ParameterSetDescription>("he", desc_he);
906 
907  edm::ParameterSetDescription desc_heUpgrade;
908  desc_heUpgrade.add<std::vector<double>>("gain", std::vector<double>({0.00111111111111}));
909  desc_heUpgrade.add<std::vector<double>>("gainWidth", std::vector<double>({0}));
910  desc_heUpgrade.add<double>("pedestal", 18.0);
911  desc_heUpgrade.add<double>("pedestalWidth", 5.0);
912  desc_heUpgrade.add<std::vector<double>>("qieOffset", std::vector<double>({0.0, 0.0, 0.0, 0.0}));
913  desc_heUpgrade.add<std::vector<double>>("qieSlope", std::vector<double>({0.333, 0.333, 0.333, 0.333}));
914  desc_heUpgrade.add<int>("qieType", 2);
915  desc_heUpgrade.add<int>("mcShape",203);
916  desc_heUpgrade.add<int>("recoShape",203);
917  desc_heUpgrade.add<double>("photoelectronsToAnalog",57.5);
918  desc_heUpgrade.add<std::vector<double>>("darkCurrent",std::vector<double>(0.055));
919  desc.add<edm::ParameterSetDescription>("heUpgrade", desc_heUpgrade);
920 
922  desc_hf.add<std::vector<double>>("gain", std::vector<double>({0.14, 0.135}));
923  desc_hf.add<std::vector<double>>("gainWidth", std::vector<double>({0.0, 0.0}));
924  desc_hf.add<double>("pedestal", 3.0);
925  desc_hf.add<double>("pedestalWidth", 0.84);
926  desc_hf.add<std::vector<double>>("qieOffset", std::vector<double>({-0.87, 1.4, 7.8, -29.6}));
927  desc_hf.add<std::vector<double>>("qieSlope", std::vector<double>({0.359, 0.358, 0.36, 0.367}));
928  desc_hf.add<int>("qieType", 0);
929  desc_hf.add<int>("mcShape",301);
930  desc_hf.add<int>("recoShape",301);
931  desc_hf.add<double>("photoelectronsToAnalog",0.0);
932  desc_hf.add<std::vector<double>>("darkCurrent",std::vector<double>(0.0));
933  desc.add<edm::ParameterSetDescription>("hf", desc_hf);
934 
935  edm::ParameterSetDescription desc_hfUpgrade;
936  desc_hfUpgrade.add<std::vector<double>>("gain", std::vector<double>({0.14, 0.135}));
937  desc_hfUpgrade.add<std::vector<double>>("gainWidth", std::vector<double>({0.0, 0.0}));
938  desc_hfUpgrade.add<double>("pedestal", 13.33);
939  desc_hfUpgrade.add<double>("pedestalWidth", 3.33);
940  desc_hfUpgrade.add<std::vector<double>>("qieOffset", std::vector<double>({0.0697, -0.7405, 12.38, -671.9}));
941  desc_hfUpgrade.add<std::vector<double>>("qieSlope", std::vector<double>({0.297, 0.298, 0.298, 0.313}));
942  desc_hfUpgrade.add<int>("qieType", 1);
943  desc_hfUpgrade.add<int>("mcShape",301);
944  desc_hfUpgrade.add<int>("recoShape",301);
945  desc_hfUpgrade.add<double>("photoelectronsToAnalog",0.0);
946  desc_hfUpgrade.add<std::vector<double>>("darkCurrent",std::vector<double>(0.0));
947  desc.add<edm::ParameterSetDescription>("hfUpgrade", desc_hfUpgrade);
948 
949  edm::ParameterSetDescription desc_hfrecal;
950  desc_hfrecal.add<std::vector<double>>("HFdepthOneParameterA", std::vector<double>());
951  desc_hfrecal.add<std::vector<double>>("HFdepthOneParameterB", std::vector<double>());
952  desc_hfrecal.add<std::vector<double>>("HFdepthTwoParameterA", std::vector<double>());
953  desc_hfrecal.add<std::vector<double>>("HFdepthTwoParameterB", std::vector<double>());
954  desc.add<edm::ParameterSetDescription>("HFRecalParameterBlock", desc_hfrecal);
955 
957  desc_ho.add<std::vector<double>>("gain", std::vector<double>({0.006, 0.0087}));
958  desc_ho.add<std::vector<double>>("gainWidth", std::vector<double>({0.0, 0.0}));
959  desc_ho.add<double>("pedestal", 11.0);
960  desc_ho.add<double>("pedestalWidth", 0.57);
961  desc_ho.add<std::vector<double>>("qieOffset", std::vector<double>({-0.44, 1.4, 7.1, 38.5}));
962  desc_ho.add<std::vector<double>>("qieSlope", std::vector<double>({0.907, 0.915, 0.92, 0.921}));
963  desc_ho.add<int>("qieType", 0);
964  desc_ho.add<int>("mcShape",201);
965  desc_ho.add<int>("recoShape",201);
966  desc_ho.add<double>("photoelectronsToAnalog",4.0);
967  desc_ho.add<std::vector<double>>("darkCurrent",std::vector<double>(0.0));
968  desc.add<edm::ParameterSetDescription>("ho", desc_ho);
969 
970  edm::ParameterSetDescription validator_sipm;
971  validator_sipm.add<int>("pixels",1);
972  validator_sipm.add<double>("crosstalk",0);
973  validator_sipm.add<double>("nonlin1",1);
974  validator_sipm.add<double>("nonlin2",0);
975  validator_sipm.add<double>("nonlin3",0);
976  std::vector<edm::ParameterSet> default_sipm(1);
977  desc.addVPSet("SiPMCharacteristics",validator_sipm,default_sipm);
978 
979  descriptions.addDefault(desc);
980 }
std::unique_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
static const int kHcalVersMask
T getParameter(std::string const &) const
bool empty() const
Definition: ParameterSet.h:218
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
HcalGainWidth makeGainWidth(HcalGenericDetId fId)
std::unique_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
void useHBUpgrade(bool b)
HcalHardcodeCalibrations(const edm::ParameterSet &)
const bool killHE() const
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
std::unique_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::unique_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setHBUpgrade(HcalHardcodeParameters p)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const EventID & eventID() const
Definition: IOVSyncValue.h:42
std::unique_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
void useHFUpgrade(bool b)
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo)
std::unique_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
JetCorrectorParameters::Record record
Definition: classes.h:7
int maxDepthHE() const
Definition: HcalTopology.h:129
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &rcd)
void setDsegm(const std::vector< std::vector< int > > &m_segmentation)
std::unique_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
void setHF(HcalHardcodeParameters p)
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
HcalRecoParam makeRecoParam(HcalGenericDetId fId)
bool exists(std::string const &parameterName) const
checks if a parameter exists
HcalQIECoder makeQIECoder(HcalGenericDetId fId)
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
double maxEta
std::unique_ptr< HcalDcsValues > produceDcsValues(const HcalDcsRcd &rcd)
double getCorr(int ieta, int idepth)
static const int kHcalEtaMask
HcalMCParam makeMCParam(HcalGenericDetId fId)
void makeHardcodeSiPMCharacteristics(HcalSiPMCharacteristics &sipm)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
tuple result
Definition: mps_fire.py:84
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId)
std::unique_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
void makeHardcodeFrontEndMap(HcalFrontEndMap &emap, const std::vector< HcalGenericDetId > &cells)
HcalTPChannelParameter makeHardcodeTPChannelParameter(HcalGenericDetId fId)
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
void makeHardcodeMap(HcalElectronicsMap &emap, const std::vector< HcalGenericDetId > &cells)
HcalPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
virtual bool valid(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:29
void addDefault(ParameterSetDescription const &psetDescription)
std::unique_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::unique_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
void setHO(HcalHardcodeParameters p)
double getCorr(int ieta, int idepth, double lumi)
static const IOVSyncValue & beginOfTime()
HcalTimingParam makeTimingParam(HcalGenericDetId fId)
void setHFUpgrade(HcalHardcodeParameters p)
void setHE(HcalHardcodeParameters p)
void setKillHE(bool b)
HcalQIEType makeQIEType(HcalGenericDetId fId)
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
std::unique_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::unique_ptr< HcalFrontEndMap > produceFrontEndMap(const HcalFrontEndMapRcd &rcd)
HcalSubdetector
Definition: HcalAssistant.h:31
void makeHardcodeDcsMap(HcalDcsMap &dcs_map)
static const int kHcalDepthMask
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void useHOUpgrade(bool b)
std::unique_ptr< HcalSiPMParameters > produceSiPMParameters(const HcalSiPMParametersRcd &rcd)
JetCorrectorParameters corr
Definition: classes.h:5
static const int kHcalPhiMask
std::unique_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
void setHB(HcalHardcodeParameters p)
static const int kHcalPhiMask2
Definition: HcalDetId.h:16
std::unique_ptr< HcalTPParameters > produceTPParameters(const HcalTPParametersRcd &rcd)
void getDepthSegmentation(unsigned ring, std::vector< int > &readoutDepths) const
std::unique_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParameters(const HcalTPChannelParametersRcd &rcd)
void makeHardcodeTPParameters(HcalTPParameters &tppar)
std::unique_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
std::unique_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
virtual bool valid(const DetId &id) const
string section
Definition: vertexPlots.py:305
std::unique_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
Geom::Phi< T > phi() const
void setSiPMCharacteristics(std::vector< edm::ParameterSet > vps)
std::unique_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
int maxDepthHB() const
Definition: HcalTopology.h:128
void useHEUpgrade(bool b)
std::unique_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
std::unique_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
int getLayersInDepth(int ieta, int depth, const HcalTopology *topo)
std::unique_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
HcalGain makeGain(HcalGenericDetId fId, bool fSmear=false)
static const int kHcalEtaMask2
Definition: HcalDetId.h:20
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
const Timestamp & time() const
Definition: IOVSyncValue.h:44
tuple cout
Definition: gather_cfg.py:145
volatile std::atomic< bool > shutdown_flag false
void setHEUpgrade(HcalHardcodeParameters p)
std::unique_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
TimeValue_t value() const
Definition: Timestamp.h:56
std::unique_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
int lastHERing() const
Definition: HcalTopology.h:86
void testHFQIE10(bool b)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unique_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
bool validHT(const HcalTrigTowerDetId &id) const