CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalDbHardcode Class Reference

Hardcode implementation of some conditions data. More...

#include <HcalDbHardcode.h>

Public Member Functions

const int getGainIndex (HcalGenericDetId fId) const
 
int getLayersInDepth (int ieta, int depth, const HcalTopology *topo)
 
const HcalHardcodeParametersgetParameters (HcalGenericDetId fId) const
 
 HcalDbHardcode ()
 
bool isHEPlan1 (HcalGenericDetId fId) const
 
const bool killHE () const
 
HcalCalibrationQIECoder makeCalibrationQIECoder (HcalGenericDetId fId) const
 
HcalGain makeGain (HcalGenericDetId fId, bool fSmear=false) const
 
HcalGainWidth makeGainWidth (HcalGenericDetId fId) const
 
std::unique_ptr< HcalDcsMapmakeHardcodeDcsMap () const
 
void makeHardcodeFrontEndMap (HcalFrontEndMap &emap, const std::vector< HcalGenericDetId > &cells) const
 
std::unique_ptr< HcalFrontEndMapmakeHardcodeFrontEndMap (const std::vector< HcalGenericDetId > &cells) const
 
std::unique_ptr< HcalElectronicsMapmakeHardcodeMap (const std::vector< HcalGenericDetId > &cells) const
 
std::unique_ptr< HcalSiPMCharacteristicsmakeHardcodeSiPMCharacteristics () const
 
HcalSiPMParameter makeHardcodeSiPMParameter (HcalGenericDetId fId, const HcalTopology *topo, double intlumi)
 
HcalTPChannelParameter makeHardcodeTPChannelParameter (HcalGenericDetId fId) const
 
void makeHardcodeTPParameters (HcalTPParameters &tppar) const
 
HcalMCParam makeMCParam (HcalGenericDetId fId) const
 
HcalPedestal makePedestal (HcalGenericDetId fId, bool fSmear, bool eff, const HcalTopology *topo, double intlumi)
 
HcalPedestalWidth makePedestalWidth (HcalGenericDetId fId, bool eff, const HcalTopology *topo, double intlumi)
 
HcalQIECoder makeQIECoder (HcalGenericDetId fId) const
 
HcalQIEShape makeQIEShape () const
 
HcalQIEType makeQIEType (HcalGenericDetId fId) const
 
HcalRecoParam makeRecoParam (HcalGenericDetId fId) const
 
HcalTimingParam makeTimingParam (HcalGenericDetId fId) const
 
HcalZSThreshold makeZSThreshold (HcalGenericDetId fId) const
 
void setHB (HcalHardcodeParameters p)
 
void setHBUpgrade (HcalHardcodeParameters p)
 
void setHE (HcalHardcodeParameters p)
 
void setHEUpgrade (HcalHardcodeParameters p)
 
void setHF (HcalHardcodeParameters p)
 
void setHFUpgrade (HcalHardcodeParameters p)
 
void setHO (HcalHardcodeParameters p)
 
void setKillHE (bool b)
 
void setSiPMCharacteristics (std::vector< edm::ParameterSet > vps)
 
void testHEPlan1 (bool b)
 
void testHFQIE10 (bool b)
 
void useHBUpgrade (bool b)
 
const bool useHBUpgrade () const
 
void useHEUpgrade (bool b)
 
const bool useHEUpgrade () const
 
void useHFUpgrade (bool b)
 
const bool useHFUpgrade () const
 
void useHOUpgrade (bool b)
 
const bool useHOUpgrade () const
 
virtual ~HcalDbHardcode ()
 

Private Attributes

bool killHE_
 
bool setHB_
 
bool setHBUpgrade_
 
bool setHE_
 
bool setHEUpgrade_
 
bool setHF_
 
bool setHFUpgrade_
 
bool setHO_
 
bool testHEPlan1_
 
bool testHFQIE10_
 
HcalHardcodeParameters theDefaultParameters_
 
HcalHardcodeParameters theHBParameters_
 
HcalHardcodeParameters theHBUpgradeParameters_
 
HcalHardcodeParameters theHEParameters_
 
HcalHardcodeParameters theHEUpgradeParameters_
 
HcalHardcodeParameters theHFParameters_
 
HcalHardcodeParameters theHFUpgradeParameters_
 
HcalHardcodeParameters theHOParameters_
 
std::map< std::pair< int, int >, int > theLayersInDepths_
 
std::vector< edm::ParameterSettheSiPMCharacteristics_
 
bool useHBUpgrade_
 
bool useHEUpgrade_
 
bool useHFUpgrade_
 
bool useHOUpgrade_
 

Detailed Description

Hardcode implementation of some conditions data.

Author
Fedor Ratnikov

Definition at line 45 of file HcalDbHardcode.h.

Constructor & Destructor Documentation

◆ HcalDbHardcode()

HcalDbHardcode::HcalDbHardcode ( )

Definition at line 18 of file HcalDbHardcode.cc.

19  : //"generic" set of conditions
20  theDefaultParameters_(3.0, //pedestal
21  0.5, //pedestal width
22  {0.2, 0.2}, //gains
23  {0.0, 0.0}, //gain widths
24  0, //ZS threshold
25  0, //QIE type
26  {0.0, 0.0, 0.0, 0.0}, //QIE offsets
27  {0.9, 0.9, 0.9, 0.9}, //QIE slopes
28  125, //MC shape
29  105, //Reco shape
30  0.0, //photoelectronsToAnalog
31  {0.0}, //dark current
32  {0.0} //noise correlation
33  ),
34  setHB_(false),
35  setHE_(false),
36  setHF_(false),
37  setHO_(false),
38  setHBUpgrade_(false),
39  setHEUpgrade_(false),
40  setHFUpgrade_(false),
41  useHBUpgrade_(false),
42  useHEUpgrade_(false),
43  useHOUpgrade_(true),
44  useHFUpgrade_(false),
45  testHFQIE10_(false),
46  testHEPlan1_(false) {}
HcalHardcodeParameters theDefaultParameters_

◆ ~HcalDbHardcode()

virtual HcalDbHardcode::~HcalDbHardcode ( )
inlinevirtual

Definition at line 51 of file HcalDbHardcode.h.

51 {}

Member Function Documentation

◆ getGainIndex()

const int HcalDbHardcode::getGainIndex ( HcalGenericDetId  fId) const

Definition at line 90 of file HcalDbHardcode.cc.

References HcalDetId::depth(), HcalGenericDetId::genericSubdet(), HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, and HcalDetId::ieta().

Referenced by makeGain(), and makeGainWidth().

90  {
91  int index = 0;
93  HcalDetId hid(fId);
94  if ((hid.ieta() > -5) && (hid.ieta() < 5))
95  index = 0;
96  else
97  index = 1;
98  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
99  HcalDetId hid(fId);
100  if (hid.depth() % 2 == 1)
101  index = 0; //depths 1,3
102  else if (hid.depth() % 2 == 0)
103  index = 1; //depths 2,4
104  }
105  return index;
106 }
HcalGenericSubdetector genericSubdet() const

◆ getLayersInDepth()

int HcalDbHardcode::getLayersInDepth ( int  ieta,
int  depth,
const HcalTopology topo 
)

Definition at line 616 of file HcalDbHardcode.cc.

References LEDCalibrationChannels::depth, HLT_2023v12_cff::distance, HcalTopology::getDepthSegmentation(), LEDCalibrationChannels::ieta, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, MuonTCMETValueMapProducer_cff::nLayers, theLayersInDepths_, and pfDeepBoostedJetPreprocessParams_cfi::upper_bound.

Referenced by makeHardcodeSiPMParameter(), and HcalHardcodeCalibrations::produceRespCorrs().

616  {
617  //check for cached value
618  auto eta_depth_pair = std::make_pair(ieta, depth);
619  auto nLayers = theLayersInDepths_.find(eta_depth_pair);
620  if (nLayers != theLayersInDepths_.end()) {
621  return nLayers->second;
622  } else {
623  std::vector<int> segmentation;
624  topo->getDepthSegmentation(ieta, segmentation);
625  //assume depth segmentation vector is sorted
626  int nLayersInDepth = std::distance(std::lower_bound(segmentation.begin(), segmentation.end(), depth),
627  std::upper_bound(segmentation.begin(), segmentation.end(), depth));
628  theLayersInDepths_.insert(std::make_pair(eta_depth_pair, nLayersInDepth));
629  return nLayersInDepth;
630  }
631 }
std::map< std::pair< int, int >, int > theLayersInDepths_
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const

◆ getParameters()

const HcalHardcodeParameters & HcalDbHardcode::getParameters ( HcalGenericDetId  fId) const

Definition at line 48 of file HcalDbHardcode.cc.

References HcalDetId::depth(), HcalGenericDetId::genericSubdet(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalDetId::ieta(), HcalDetId::iphi(), HcalGenericDetId::isHcalDetId(), isHEPlan1(), setHB_, setHBUpgrade_, setHE_, setHEUpgrade_, setHF_, setHFUpgrade_, setHO_, testHEPlan1_, testHFQIE10_, theDefaultParameters_, theHBParameters_, theHBUpgradeParameters_, theHEParameters_, theHEUpgradeParameters_, theHFParameters_, theHFUpgradeParameters_, theHOParameters_, useHBUpgrade_, useHEUpgrade_, useHFUpgrade_, and HcalDetId::zside().

Referenced by makeGain(), makeGainWidth(), makeHardcodeSiPMParameter(), makeMCParam(), makePedestal(), makePedestalWidth(), makeQIECoder(), makeQIEType(), makeRecoParam(), and makeZSThreshold().

48  {
52  else if (!useHBUpgrade_ && setHB_)
53  return theHBParameters_;
54  else
55  return theDefaultParameters_;
56  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
57  bool b_isHEPlan1 = testHEPlan1_ ? isHEPlan1(fId) : false;
58  if ((useHEUpgrade_ || b_isHEPlan1) && setHEUpgrade_)
60  else if (!useHEUpgrade_ && !b_isHEPlan1 && setHE_)
61  return theHEParameters_;
62  else
63  return theDefaultParameters_;
64  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
67  else if (testHFQIE10_ && fId.isHcalDetId()) {
68  HcalDetId hid(fId);
69  //special mixed case for HF 2016
70  if (hid.iphi() == 39 && hid.zside() == 1 &&
71  (hid.depth() >= 3 || (hid.depth() == 2 && (hid.ieta() == 30 || hid.ieta() == 34))) && setHFUpgrade_)
73  else if (setHF_)
74  return theHFParameters_;
75  else
76  return theDefaultParameters_;
77  } else if (!useHFUpgrade_ && setHF_)
78  return theHFParameters_;
79  else
80  return theDefaultParameters_;
81  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
82  if (setHO_)
83  return theHOParameters_;
84  else
85  return theDefaultParameters_;
86  } else
87  return theDefaultParameters_;
88 }
HcalHardcodeParameters theHOParameters_
HcalHardcodeParameters theDefaultParameters_
HcalHardcodeParameters theHEUpgradeParameters_
bool isHcalDetId() const
HcalHardcodeParameters theHBUpgradeParameters_
bool isHEPlan1(HcalGenericDetId fId) const
HcalHardcodeParameters theHBParameters_
HcalGenericSubdetector genericSubdet() const
HcalHardcodeParameters theHFParameters_
HcalHardcodeParameters theHEParameters_
HcalHardcodeParameters theHFUpgradeParameters_

◆ isHEPlan1()

bool HcalDbHardcode::isHEPlan1 ( HcalGenericDetId  fId) const

Definition at line 633 of file HcalDbHardcode.cc.

References HcalDetId::iphi(), HcalGenericDetId::isHcalDetId(), and HcalDetId::zside().

Referenced by getParameters(), and makeHardcodeSiPMParameter().

633  {
634  if (fId.isHcalDetId()) {
635  HcalDetId hid(fId);
636  //special mixed case for HE 2017
637  if (hid.zside() == 1 && (hid.iphi() == 63 || hid.iphi() == 64 || hid.iphi() == 65 || hid.iphi() == 66))
638  return true;
639  }
640  return false;
641 }
bool isHcalDetId() const

◆ killHE()

const bool HcalDbHardcode::killHE ( ) const
inline

◆ makeCalibrationQIECoder()

HcalCalibrationQIECoder HcalDbHardcode::makeCalibrationQIECoder ( HcalGenericDetId  fId) const

Definition at line 205 of file HcalDbHardcode.cc.

References mps_fire::i, DetId::rawId(), and mps_fire::result.

205  {
207  float lowEdges[64];
208  for (int i = 0; i < 64; i++) {
209  lowEdges[i] = -1.5 + i;
210  }
211  result.setMinCharges(lowEdges);
212  return result;
213 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeGain()

HcalGain HcalDbHardcode::makeGain ( HcalGenericDetId  fId,
bool  fSmear = false 
) const

Definition at line 158 of file HcalDbHardcode.cc.

References f, dqmMemoryStats::float, HcalHardcodeParameters::gain(), getGainIndex(), getParameters(), mps_fire::i, makeGainWidth(), DetId::rawId(), mps_fire::result, and ApeEstimator_cff::width.

Referenced by HcalHardcodeCalibrations::produceGains().

158  { // GeV/fC
160  float value0 = getParameters(fId).gain(getGainIndex(fId));
161  float value[4] = {value0, value0, value0, value0};
162  if (fSmear) {
163  for (int i = 0; i < 4; i++) {
164  value[i] = 0.0f;
165  while (value[i] <= 0.0f)
166  value[i] = value0 + (float)CLHEP::RandGauss::shoot(0.0, width.getValue(i));
167  }
168  }
169  HcalGain result(fId.rawId(), value[0], value[1], value[2], value[3]);
170  return result;
171 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
const int getGainIndex(HcalGenericDetId fId) const
HcalGainWidth makeGainWidth(HcalGenericDetId fId) const
double f[11][100]
Definition: value.py:1
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const double gain(unsigned index) const

◆ makeGainWidth()

HcalGainWidth HcalDbHardcode::makeGainWidth ( HcalGenericDetId  fId) const

Definition at line 173 of file HcalDbHardcode.cc.

References HcalHardcodeParameters::gainWidth(), getGainIndex(), getParameters(), DetId::rawId(), mps_fire::result, and relativeConstraints::value.

Referenced by makeGain(), and HcalHardcodeCalibrations::produceGainWidths().

173  { // GeV/fC
174  float value = getParameters(fId).gainWidth(getGainIndex(fId));
176  return result;
177 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
const int getGainIndex(HcalGenericDetId fId) const
const double gainWidth(unsigned index) const
Definition: value.py:1
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeHardcodeDcsMap()

std::unique_ptr< HcalDcsMap > HcalDbHardcode::makeHardcodeDcsMap ( ) const

Definition at line 492 of file HcalDbHardcode.cc.

References HcalDcsDetId::DYN8, HcalBarrel, HcalDcsBarrel, HcalDcsForward, HcalDcsOuter, HcalForward, HcalOuter, HcalDcsDetId::HV, and HcalDcsMapAddons::Helper::mapGeomId2DcsId().

Referenced by HcalHardcodeCalibrations::produceDcsMap().

492  {
493  HcalDcsMapAddons::Helper dcs_map_helper;
494  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalBarrel, -16, 1, 1),
496  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, -41, 3, 1),
498  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, -26, 25, 2),
500  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalBarrel, -15, 68, 1),
502  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalOuter, -14, 1, 4),
504  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, 41, 71, 2),
506  return std::make_unique<HcalDcsMap>(dcs_map_helper);
507 }
bool mapGeomId2DcsId(HcalDetId fId, HcalDcsDetId fDcsId)
Definition: HcalDcsMap.cc:143

◆ makeHardcodeFrontEndMap() [1/2]

void HcalDbHardcode::makeHardcodeFrontEndMap ( HcalFrontEndMap emap,
const std::vector< HcalGenericDetId > &  cells 
) const

◆ makeHardcodeFrontEndMap() [2/2]

std::unique_ptr< HcalFrontEndMap > HcalDbHardcode::makeHardcodeFrontEndMap ( const std::vector< HcalGenericDetId > &  cells) const

Definition at line 539 of file HcalDbHardcode.cc.

References hgcalTBTopologyTester_cfi::cells, hgcalTestNeighbor_cfi::detector, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, HcalFrontEndMapAddons::Helper::loadObject(), relativeConstraints::ring, hgcalTBTopologyTester_cfi::sector, AlCaHLTBitMon_QueryRunRegistry::string, and HcalDetId::subdet().

540  {
542  std::stringstream mystream;
543  std::string detector[5] = {"XX", "HB", "HE", "HO", "HF"};
544  for (const auto& fId : cells) {
545  if (fId.isHcalDetId()) {
546  HcalDetId id = HcalDetId(fId.rawId());
547  HcalSubdetector subdet = id.subdet();
548  int ieta = id.ietaAbs();
549  int iside = id.zside();
550  int iphi = id.iphi();
551  std::string det, rbx;
552  int irm(0);
553  char tempbuff[30];
554  char sidesign = (iside == -1) ? 'M' : 'P';
555  if (subdet == HcalBarrel || subdet == HcalEndcap) {
556  det = detector[subdet];
557  irm = (iphi + 1) % 4 + 1;
558  int iwedge(0);
559  if (ieta >= 21 && (irm == 1 || irm == 3))
560  iwedge = (iphi + 1 + irm + 1) / 4;
561  else
562  iwedge = (iphi + irm + 1) / 4;
563  if (iwedge > 18)
564  iwedge -= 18;
565  sprintf(tempbuff, "%s%c%2.2i%c", det.c_str(), sidesign, iwedge, '\0');
566  mystream << tempbuff;
567  rbx = mystream.str();
568  mystream.str("");
569  emapHelper.loadObject(id, irm, rbx);
570  } else if (subdet == HcalForward) {
571  det = detector[subdet];
572  int hfphi(0);
573  if ((iside == 1 && ieta == 40) || (iside == -1 && ieta == 41)) {
574  irm = ((iphi + 1) / 2) % 36 + 1;
575  hfphi = ((iphi + 1) / 6) % 12 + 1;
576  } else {
577  irm = (iphi + 1) / 2;
578  hfphi = (iphi - 1) / 6 + 1;
579  }
580  irm = (irm - 1) % 3 + 1;
581  sprintf(tempbuff, "%s%c%2.2i%c", det.c_str(), sidesign, hfphi, '\0');
582  mystream << tempbuff;
583  rbx = mystream.str();
584  mystream.str("");
585  emapHelper.loadObject(id, irm, rbx);
586  } else if (subdet == HcalOuter) {
587  det = detector[subdet];
588  int ring(0), sector(0);
589  if (ieta <= 4)
590  ring = 0;
591  else if (ieta >= 5 && ieta <= 10)
592  ring = 1;
593  else
594  ring = 2;
595  for (int i = -2; i < iphi; i += 6)
596  sector++;
597  if (sector > 12)
598  sector = 1;
599  irm = ((iphi + 1) / 2) % 6 + 1;
600  if (ring != 0 && sector % 2 != 0)
601  sector++;
602  if (ring == 0)
603  sprintf(tempbuff, "%s%i%2.2d", det.c_str(), ring, sector);
604  else
605  sprintf(tempbuff, "%s%i%c%2.2d", det.c_str(), ring, sidesign, sector);
606  mystream << tempbuff;
607  rbx = mystream.str();
608  mystream.str("");
609  emapHelper.loadObject(id, irm, rbx);
610  }
611  }
612  }
613  return std::make_unique<HcalFrontEndMap>(emapHelper);
614 }
bool loadObject(DetId fId, int rm, std::string rbx)
load a new entry
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalSubdetector
Definition: HcalAssistant.h:31

◆ makeHardcodeMap()

std::unique_ptr< HcalElectronicsMap > HcalDbHardcode::makeHardcodeMap ( const std::vector< HcalGenericDetId > &  cells) const

Definition at line 509 of file HcalDbHardcode.cc.

References cms::cuda::assert(), hgcalTBTopologyTester_cfi::cells, counter, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalGenericDetId::HcalGenTriggerTower, HcalGenericDetId::HcalGenZDC, HcalElectronicsMapAddons::Helper::mapEId2chId(), and HcalElectronicsMapAddons::Helper::mapEId2tId().

Referenced by HcalHardcodeCalibrations::produceElectronicsMap().

509  {
510  static const int kUTCAMask = 0x4000000; //set bit 26 for uTCA version
511  static const int kLinearIndexMax = 0x7FFFF; //19 bits
512  static const int kTriggerBitMask = 0x02000000; //2^25
513  uint32_t counter = 0;
514  uint32_t counterTrig = 0;
516  for (const auto& fId : cells) {
517  if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel ||
518  fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap ||
519  fId.genericSubdet() == HcalGenericDetId::HcalGenForward ||
520  fId.genericSubdet() == HcalGenericDetId::HcalGenOuter || fId.genericSubdet() == HcalGenericDetId::HcalGenZDC) {
521  ++counter;
522  assert(counter < kLinearIndexMax);
523  uint32_t raw = counter;
524  raw |= kUTCAMask;
525  HcalElectronicsId elId(raw);
526  emapHelper.mapEId2chId(elId, fId);
527  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenTriggerTower) {
528  ++counterTrig;
529  assert(counterTrig < kLinearIndexMax);
530  uint32_t raw = counterTrig;
531  raw |= kUTCAMask | kTriggerBitMask;
532  HcalElectronicsId elId(raw);
533  emapHelper.mapEId2tId(elId, fId);
534  }
535  }
536  return std::make_unique<HcalElectronicsMap>(emapHelper);
537 }
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
assert(be >=bs)
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
static std::atomic< unsigned int > counter
Readout chain identification for Hcal.

◆ makeHardcodeSiPMCharacteristics()

std::unique_ptr< HcalSiPMCharacteristics > HcalDbHardcode::makeHardcodeSiPMCharacteristics ( ) const

Definition at line 695 of file HcalDbHardcode.cc.

References HcalSiPMCharacteristicsAddons::Helper::loadObject(), and theSiPMCharacteristics_.

Referenced by makePedestal(), makePedestalWidth(), and HcalHardcodeCalibrations::produceSiPMCharacteristics().

695  {
696  // SiPMCharacteristics are constants for each type of SiPM:
697  // Type, # of pixels, 3 parameters for non-linearity, cross talk parameter, ..
698  // Obtained from data sheet and measurements
699  // types (in order): HcalHOZecotek=1, HcalHOHamamatsu, HcalHEHamamatsu1, HcalHEHamamatsu2, HcalHBHamamatsu1, HcalHBHamamatsu2, HcalHPD
701  for (unsigned ip = 0; ip < theSiPMCharacteristics_.size(); ++ip) {
702  auto& ps = theSiPMCharacteristics_[ip];
703  sipmHelper.loadObject(ip + 1,
704  ps.getParameter<int>("pixels"),
705  ps.getParameter<double>("nonlin1"),
706  ps.getParameter<double>("nonlin2"),
707  ps.getParameter<double>("nonlin3"),
708  ps.getParameter<double>("crosstalk"),
709  0,
710  0);
711  }
712  return std::make_unique<HcalSiPMCharacteristics>(sipmHelper);
713 }
std::vector< edm::ParameterSet > theSiPMCharacteristics_
bool loadObject(int type, int pixels, float parLin1, float parLin2, float parLin3, float crossTalk, int auxi1=0, float auxi2=0)

◆ makeHardcodeSiPMParameter()

HcalSiPMParameter HcalDbHardcode::makeHardcodeSiPMParameter ( HcalGenericDetId  fId,
const HcalTopology topo,
double  intlumi 
)

Definition at line 643 of file HcalDbHardcode.cc.

References HcalHardcodeParameters::darkCurrent(), HcalDetId::depth(), dqmMemoryStats::float, HcalGenericDetId::genericSubdet(), getLayersInDepth(), getParameters(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenOuter, HcalHBHamamatsu1, HcalHBHamamatsu2, HcalHEHamamatsu1, HcalHEHamamatsu2, HcalHOHamamatsu, HcalHPD, HcalNoSiPM, HcalDetId::ietaAbs(), submitPVValidationJobs::intlumi, isHEPlan1(), HcalHardcodeParameters::noiseCorrelation(), HcalHardcodeParameters::photoelectronsToAnalog(), DetId::rawId(), testHEPlan1_, useHBUpgrade_, useHEUpgrade_, and useHOUpgrade_.

Referenced by makePedestal(), makePedestalWidth(), and HcalHardcodeCalibrations::produceSiPMParameters().

645  {
646  // SiPMParameter defined for each DetId the following quantities:
647  // SiPM type, PhotoElectronToAnalog, Dark Current, two auxiliary words
648  // (the second of those containing float noise correlation coefficient
649  // These numbers come from some measurements done with SiPMs
650  // rule for type: cells with >4 layers use larger device (3.3mm diameter), otherwise 2.8mm
651  HcalSiPMType theType = HcalNoSiPM;
652  double thePe2fC = getParameters(fId).photoelectronsToAnalog();
653  double theDC = getParameters(fId).darkCurrent(0, intlumi);
654  double theNoiseCN = getParameters(fId).noiseCorrelation(0);
656  if (useHBUpgrade_) {
657  HcalDetId hid(fId);
658  int nLayersInDepth = getLayersInDepth(hid.ietaAbs(), hid.depth(), topo);
659  if (nLayersInDepth > 4) {
660  theType = HcalHBHamamatsu2;
661  theDC = getParameters(fId).darkCurrent(1, intlumi);
662  theNoiseCN = getParameters(fId).noiseCorrelation(1);
663  } else {
664  theType = HcalHBHamamatsu1;
665  theDC = getParameters(fId).darkCurrent(0, intlumi);
666  theNoiseCN = getParameters(fId).noiseCorrelation(0);
667  }
668  } else
669  theType = HcalHPD;
670  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
671  if (useHEUpgrade_ || (testHEPlan1_ && isHEPlan1(fId))) {
672  HcalDetId hid(fId);
673  int nLayersInDepth = getLayersInDepth(hid.ietaAbs(), hid.depth(), topo);
674  if (nLayersInDepth > 4) {
675  theType = HcalHEHamamatsu2;
676  theDC = getParameters(fId).darkCurrent(1, intlumi);
677  theNoiseCN = getParameters(fId).noiseCorrelation(1);
678  } else {
679  theType = HcalHEHamamatsu1;
680  theDC = getParameters(fId).darkCurrent(0, intlumi);
681  theNoiseCN = getParameters(fId).noiseCorrelation(0);
682  }
683  } else
684  theType = HcalHPD;
685  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
686  if (useHOUpgrade_)
687  theType = HcalHOHamamatsu;
688  else
689  theType = HcalHPD;
690  }
691 
692  return HcalSiPMParameter(fId.rawId(), theType, thePe2fC, theDC, 0, (float)theNoiseCN);
693 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
const double darkCurrent(unsigned index, double intlumi) const
HcalSiPMType
Definition: HcalSiPMType.h:4
bool isHEPlan1(HcalGenericDetId fId) const
HcalGenericSubdetector genericSubdet() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const double noiseCorrelation(unsigned index) const
const double photoelectronsToAnalog() const
int getLayersInDepth(int ieta, int depth, const HcalTopology *topo)

◆ makeHardcodeTPChannelParameter()

HcalTPChannelParameter HcalDbHardcode::makeHardcodeTPChannelParameter ( HcalGenericDetId  fId) const

Definition at line 715 of file HcalDbHardcode.cc.

References DetId::rawId().

Referenced by HcalHardcodeCalibrations::produceTPChannelParameters().

715  {
716  // For each detId parameters for trigger primitive
717  // mask for channel validity and self trigger information, fine grain
718  // bit information and auxiliary words
719  uint32_t bitInfo = ((44 << 16) | 30);
720  return HcalTPChannelParameter(fId.rawId(), 0, bitInfo, 0, 0);
721 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeHardcodeTPParameters()

void HcalDbHardcode::makeHardcodeTPParameters ( HcalTPParameters tppar) const

Definition at line 723 of file HcalDbHardcode.cc.

References HcalTPParameters::loadObject().

Referenced by HcalHardcodeCalibrations::produceTPParameters().

723  {
724  // Parameters for a given TP algorithm:
725  // FineGrain Algorithm Version for HBHE, ADC threshold fof TDC mask of HF,
726  // TDC mask for HF, Self Trigger bits, auxiliary words
727  tppar.loadObject(0, 0, 0xFFFFFFFFFFFFFFFF, 0, 0, 0);
728 }
void loadObject(int version, int adcCut, uint64_t tdcMask, uint32_t tbits, int auxi1, int auxi2)

◆ makeMCParam()

HcalMCParam HcalDbHardcode::makeMCParam ( HcalGenericDetId  fId) const

Definition at line 217 of file HcalDbHardcode.cc.

References ecalEBTriggerPrimitiveDigis_cfi::binOfMaximum, f, HcalGenericDetId::genericSubdet(), getParameters(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalGenericDetId::HcalGenZDC, HcalDetId::ieta(), HcalDetId::iphi(), dqmdumpme::k, HcalHardcodeParameters::mcShape(), DetId::rawId(), mps_fire::result, ecalSimParameterMap_cff::syncPhase, and hcalSimParameters_cfi::timeSmearing.

Referenced by HcalHardcodeCalibrations::produceMCParams().

217  {
218  int r1bit[5];
219  r1bit[0] = 9; // [0,9]
220  int syncPhase = 0;
221  r1bit[1] = 1;
222  int binOfMaximum = 0;
223  r1bit[2] = 4;
224  float phase = -25.0f; // [-25.0,25.0]
225  float Xphase = (phase + 32.0f) * 4.0f; // never change this line
226  // (offset 50nsec, 0.25ns step)
227  int Iphase = Xphase;
228  r1bit[3] = 8; // [0,256] offset 50ns, .25ns step
229  int timeSmearing = 0;
230  r1bit[4] = 1; // bool
231 
232  const HcalHardcodeParameters& hparam(getParameters(fId));
233  int pulseShapeID = hparam.mcShape(); // a0
234 
236  syncPhase = 1; // a1 bool
237  binOfMaximum = 5; // a2
238  phase = 5.0f; // a3 [-25.0,25.0]
239  Xphase = (phase + 32.0f) * 4.0f; // never change this line
240  // (offset 50nsec, 0.25ns step)
241  Iphase = Xphase;
242  timeSmearing = 1; // a4
243 
244  }
245 
247  syncPhase = 1; // a1 bool
248  binOfMaximum = 5; // a2
249  phase = 5.0f; // a3 [-25.0,25.0]
250  Xphase = (phase + 32.0f) * 4.0f; // never change this line
251  // (offset 50nsec, 0.25ns step)
252  Iphase = Xphase;
253  timeSmearing = 1; // a4
254 
255  }
256 
257  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
258  syncPhase = 1; // a1 bool
259  binOfMaximum = 5; // a2
260  phase = 5.0f; // a3 [-25.0,25.0]
261  Xphase = (phase + 32.0f) * 4.0f; // never change this line
262  // (offset 50nsec, 0.25ns step)
263  Iphase = Xphase;
264  timeSmearing = 0; // a4
265 
266  HcalDetId cell = HcalDetId(fId);
267  if (cell.ieta() == 1 && cell.iphi() == 1)
268  pulseShapeID = 125;
269 
270  }
271 
273  syncPhase = 1; // a1 bool
274  binOfMaximum = 3; // a2
275  phase = 14.0f; // a3 [-25.0,25.0]
276  Xphase = (phase + 32.0f) * 4.0f; // never change this line
277  // (offset 50nsec, 0.25ns step)
278  Iphase = Xphase;
279  timeSmearing = 0; // a4
280 
281  }
282 
283  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenZDC) {
284  pulseShapeID = 401; // a0
285  syncPhase = 1; // a1 bool
286  binOfMaximum = 5; // a2
287  phase = -4.0f; // a3 [-25.0,25.0]
288  Xphase = (phase + 32.0f) * 4.0f; // never change this line
289  // (offset 50nsec, 0.25ns step)
290  Iphase = Xphase;
291  timeSmearing = 0; // a4
292  }
293 
294  int rshift[7];
295  rshift[0] = 0;
296  for (int k = 0; k < 5; k++) {
297  rshift[k + 1] = rshift[k] + r1bit[k];
298  }
299 
300  int packingScheme = 1; // a5
301  unsigned int param = pulseShapeID | syncPhase << rshift[1] | (binOfMaximum << rshift[2]) | (Iphase << rshift[3]) |
302  (timeSmearing << rshift[4] | packingScheme << 27);
303 
304  HcalMCParam result(fId.rawId(), param);
305  return result;
306 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
double f[11][100]
HcalGenericSubdetector genericSubdet() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157

◆ makePedestal()

HcalPedestal HcalDbHardcode::makePedestal ( HcalGenericDetId  fId,
bool  fSmear,
bool  eff,
const HcalTopology topo,
double  intlumi 
)

Definition at line 108 of file HcalDbHardcode.cc.

References f, dqmMemoryStats::float, getParameters(), mps_fire::i, submitPVValidationJobs::intlumi, makeHardcodeSiPMCharacteristics(), makeHardcodeSiPMParameter(), makePedestalWidth(), HcalHardcodeParameters::pedestal(), DetId::rawId(), mps_fire::result, and ApeEstimator_cff::width.

Referenced by HcalHardcodeCalibrations::producePedestals_().

109  {
111  float value0 = getParameters(fId).pedestal();
112  if (eff) {
113  //account for dark current + crosstalk
114  auto sipmpar = makeHardcodeSiPMParameter(fId, topo, intlumi);
115  auto sipmchar = makeHardcodeSiPMCharacteristics();
116  value0 += sipmpar.getDarkCurrent() * 25. / (1. - sipmchar->getCrossTalk(sipmpar.getType()));
117  }
118  float value[4] = {value0, value0, value0, value0};
119  if (fSmear) {
120  for (int i = 0; i < 4; i++) {
121  value[i] = 0.0f;
122  while (value[i] <= 0.0f)
123  // ignore correlations, assume 10K pedestal run
124  value[i] = value0 + (float)CLHEP::RandGauss::shoot(0.0, width.getWidth(i) / 100.);
125  }
126  }
127  HcalPedestal result(fId.rawId(), value[0], value[1], value[2], value[3]);
128  return result;
129 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
std::unique_ptr< HcalSiPMCharacteristics > makeHardcodeSiPMCharacteristics() const
double f[11][100]
Definition: value.py:1
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo, double intlumi)
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId, bool eff, const HcalTopology *topo, double intlumi)
const double pedestal() const

◆ makePedestalWidth()

HcalPedestalWidth HcalDbHardcode::makePedestalWidth ( HcalGenericDetId  fId,
bool  eff,
const HcalTopology topo,
double  intlumi 
)

Definition at line 131 of file HcalDbHardcode.cc.

References getParameters(), mps_fire::i, submitPVValidationJobs::intlumi, dqmiolumiharvest::j, makeHardcodeSiPMCharacteristics(), makeHardcodeSiPMParameter(), HcalHardcodeParameters::pedestalWidth(), funct::pow(), DetId::rawId(), mps_fire::result, and relativeConstraints::value.

Referenced by makePedestal(), and HcalHardcodeCalibrations::producePedestalWidths_().

134  {
135  float value = getParameters(fId).pedestalWidth();
136  float width2 = value * value;
137  // everything in fC
138 
139  if (eff) {
140  //account for dark current + crosstalk
141  auto sipmpar = makeHardcodeSiPMParameter(fId, topo, intlumi);
142  auto sipmchar = makeHardcodeSiPMCharacteristics();
143  //add in quadrature
144  width2 += sipmpar.getDarkCurrent() * 25. / std::pow(1 - sipmchar->getCrossTalk(sipmpar.getType()), 3) *
145  sipmpar.getFCByPE();
146  }
147 
149  for (int i = 0; i < 4; i++) {
150  for (int j = 0; j < 4; j++) {
151  result.setSigma(i, j, 0.0);
152  }
153  result.setSigma(i, i, width2);
154  }
155  return result;
156 }
const double pedestalWidth() const
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
std::unique_ptr< HcalSiPMCharacteristics > makeHardcodeSiPMCharacteristics() const
Definition: value.py:1
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo, double intlumi)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ makeQIECoder()

HcalQIECoder HcalDbHardcode::makeQIECoder ( HcalGenericDetId  fId) const

Definition at line 185 of file HcalDbHardcode.cc.

References getParameters(), FastTimerService_cff::range, DetId::rawId(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations::produceQIEData().

185  {
186  HcalQIECoder result(fId.rawId());
187  // slope in ADC/fC
188  const HcalHardcodeParameters& param(getParameters(fId));
189  for (unsigned range = 0; range < 4; range++) {
190  for (unsigned capid = 0; capid < 4; capid++) {
191  result.setOffset(capid, range, param.qieOffset(range));
192  result.setSlope(capid, range, param.qieSlope(range));
193  }
194  }
195 
196  return result;
197 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeQIEShape()

HcalQIEShape HcalDbHardcode::makeQIEShape ( ) const

Definition at line 215 of file HcalDbHardcode.cc.

215 { return HcalQIEShape(); }

◆ makeQIEType()

HcalQIEType HcalDbHardcode::makeQIEType ( HcalGenericDetId  fId) const

Definition at line 199 of file HcalDbHardcode.cc.

References getParameters(), HcalHardcodeParameters::qieType(), DetId::rawId(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations::produceQIETypes().

199  {
200  HcalQIENum qieType = (HcalQIENum)(getParameters(fId).qieType());
201  HcalQIEType result(fId.rawId(), qieType);
202  return result;
203 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
HcalQIENum
Definition: HcalQIENum.h:4
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeRecoParam()

HcalRecoParam HcalDbHardcode::makeRecoParam ( HcalGenericDetId  fId) const

Definition at line 308 of file HcalDbHardcode.cc.

References castor_dqm_sourceclient-live_cfg::correctForTimeslew, HLT_2023v12_cff::correctTiming, HLT_2023v12_cff::firstAuxTS, castor_dqm_sourceclient-live_cfg::firstSample, HcalGenericDetId::genericSubdet(), getParameters(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, dqmiolumiharvest::j, dqmdumpme::k, DetId::rawId(), HcalHardcodeParameters::recoShape(), mps_fire::result, castor_dqm_sourceclient-live_cfg::samplesToAdd, and HLT_2023v12_cff::useLeakCorrection.

Referenced by HcalHardcodeCalibrations::produceRecoParams().

308  {
309  // Mostly comes from S.Kunori's macro
310  int p1bit[6];
311 
312  // param1
313  int containmentCorrectionFlag = 0;
314  p1bit[0] = 1; // bool
315  int containmentCorrectionPreSample = 0;
316  p1bit[1] = 1; // bool
317  float phase = 13.0; // [-25.0,25.0]
318  float Xphase = (phase + 32.0) * 4.0; //never change this line
319  // (offset 50nsec, 0.25ns step)
320  int Iphase = Xphase;
321  p1bit[2] = 8; // [0,256]
322  // (offset 50ns, 0.25ns step
323  int firstSample = 4;
324  p1bit[3] = 4; // [0,9]
325  int samplesToAdd = 2;
326  p1bit[4] = 4; // [0,9]
327  p1bit[5] = 9; // [0,9]
328 
329  const HcalHardcodeParameters& hparam(getParameters(fId));
330  int pulseShapeID = hparam.recoShape(); // a5
331 
332  int q2bit[10];
333  // param2.
334  int useLeakCorrection = 0;
335  q2bit[0] = 1; // bool
336  int LeakCorrectionID = 0;
337  q2bit[1] = 4; // [0,15]
338  int correctForTimeslew = 0;
339  q2bit[2] = 1; // bool
340  int timeCorrectionID = 0;
341  q2bit[3] = 4; // [0,15]
342  int correctTiming = 0;
343  q2bit[4] = 1; // bool
344  int firstAuxTS = 0;
345  q2bit[5] = 4; // [0,15]
346  int specialCaseID = 0;
347  q2bit[6] = 4; // [0,15]
348  int noiseFlaggingID = 0;
349  q2bit[7] = 4; // [0,15]
350  int pileupCleaningID = 0;
351  q2bit[8] = 4; // [0,15]
352  int packingScheme = 1;
353  q2bit[9] = 4;
354 
357  // param1.
358  containmentCorrectionFlag = 1; // p0
359  containmentCorrectionPreSample = 0; // p1
360  float phase = 6.0;
361  float Xphase = (phase + 32.0) * 4.0; // never change this line
362  //(offset 50nsec, 0.25ns step)
363  Iphase = Xphase; // p2
364  firstSample = 4; // p3
365  samplesToAdd = 2; // p4
366 
367  // param2.
368  useLeakCorrection = 0; // q0
369  LeakCorrectionID = 0; // q1
370  correctForTimeslew = 1; // q2
371  timeCorrectionID = 0; // q3
372  correctTiming = 1; // q4
373  firstAuxTS = 4; // q5
374  specialCaseID = 0; // q6
375  noiseFlaggingID = 1; // q7
376  pileupCleaningID = 0; // q8
377  }
378 
379  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
380  // param1.
381  containmentCorrectionFlag = 1; // p0
382  containmentCorrectionPreSample = 0; // p1
383  float phase = 13.0;
384  float Xphase = (phase + 32.0) * 4.0; // never change this line
385  // (offset 50nsec, 0.25ns step)
386  Iphase = Xphase; // p2
387  firstSample = 4; // p3
388  samplesToAdd = 4; // p4
389 
390  // param2.
391  useLeakCorrection = 0; // q0
392  LeakCorrectionID = 0; // q1
393  correctForTimeslew = 1; // q2
394  timeCorrectionID = 0; // q3
395  correctTiming = 1; // q4
396  firstAuxTS = 4; // q5
397  specialCaseID = 0; // q6
398  noiseFlaggingID = 1; // q7
399  pileupCleaningID = 0; // q8
400 
401  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
402  // param1.
403  containmentCorrectionFlag = 0; // p0
404  containmentCorrectionPreSample = 0; // p1
405  float phase = 13.0;
406  float Xphase = (phase + 32.0) * 4.0; // never change this line
407  // (offset 50nsec, 0.25ns step)
408  Iphase = Xphase; // p2
409  firstSample = 2; // p3
410  samplesToAdd = 1; // p4
411 
412  // param2.
413  useLeakCorrection = 0; // q0
414  LeakCorrectionID = 0; // q1
415  correctForTimeslew = 0; // q2
416  timeCorrectionID = 0; // q3
417  correctTiming = 1; // q4
418  firstAuxTS = 1; // q5
419  specialCaseID = 0; // q6
420  noiseFlaggingID = 1; // q7
421  pileupCleaningID = 0; // q8
422  }
423 
424  // Packing parameters in two words
425 
426  int p1shift[7];
427  p1shift[0] = 0;
428  for (int k = 0; k < 6; k++) {
429  int j = k + 1;
430  p1shift[j] = p1shift[k] + p1bit[k];
431  // cout<<" j= "<<j<<" shift "<< p1shift[j]<<endl;
432  }
433  int param1 = 0;
434  param1 = containmentCorrectionFlag | (containmentCorrectionPreSample << p1shift[1]) | (Iphase << p1shift[2]) |
435  (firstSample << p1shift[3]) | (samplesToAdd << p1shift[4]) | (pulseShapeID << p1shift[5]);
436 
437  int q2shift[10];
438  q2shift[0] = 0;
439  for (int k = 0; k < 9; k++) {
440  int j = k + 1;
441  q2shift[j] = q2shift[k] + q2bit[k];
442  // cout<<" j= "<<j<<" shift "<< q2shift[j]<<endl;
443  }
444  int param2 = 0;
445  param2 = useLeakCorrection | (LeakCorrectionID << q2shift[1]) | (correctForTimeslew << q2shift[2]) |
446  (timeCorrectionID << q2shift[3]) | (correctTiming << q2shift[4]) | (firstAuxTS << q2shift[5]) |
447  (specialCaseID << q2shift[6]) | (noiseFlaggingID << q2shift[7]) | (pileupCleaningID << q2shift[8]) |
448  (packingScheme << q2shift[9]);
449 
450  HcalRecoParam result(fId.rawId(), param1, param2);
451 
452  return result;
453 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
HcalGenericSubdetector genericSubdet() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeTimingParam()

HcalTimingParam HcalDbHardcode::makeTimingParam ( HcalGenericDetId  fId) const

Definition at line 455 of file HcalDbHardcode.cc.

References HcalGenericDetId::genericSubdet(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, nhits, DetId::rawId(), mps_fire::result, and SiStripPI::rms.

Referenced by HcalHardcodeCalibrations::produceTimingParams().

455  {
456  int nhits = 0;
457  float phase = 0.0;
458  float rms = 0.0;
460  nhits = 4;
461  phase = 4.5;
462  rms = 6.5;
463  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
464  nhits = 4;
465  phase = 9.3;
466  rms = 7.8;
467  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
468  nhits = 4;
469  phase = 8.6;
470  rms = 2.3;
471  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
472  nhits = 4;
473  phase = 12.4;
474  rms = 12.29;
475  }
477 
478  return result;
479 }
HcalGenericSubdetector genericSubdet() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeZSThreshold()

HcalZSThreshold HcalDbHardcode::makeZSThreshold ( HcalGenericDetId  fId) const

Definition at line 179 of file HcalDbHardcode.cc.

References getParameters(), DetId::rawId(), mps_fire::result, relativeConstraints::value, and HcalHardcodeParameters::zsThreshold().

Referenced by HcalHardcodeCalibrations::produceZSThresholds().

179  {
180  int value = getParameters(fId).zsThreshold();
182  return result;
183 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
Definition: value.py:1
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ setHB()

void HcalDbHardcode::setHB ( HcalHardcodeParameters  p)
inline

◆ setHBUpgrade()

void HcalDbHardcode::setHBUpgrade ( HcalHardcodeParameters  p)
inline

◆ setHE()

void HcalDbHardcode::setHE ( HcalHardcodeParameters  p)
inline

◆ setHEUpgrade()

void HcalDbHardcode::setHEUpgrade ( HcalHardcodeParameters  p)
inline

◆ setHF()

void HcalDbHardcode::setHF ( HcalHardcodeParameters  p)
inline

◆ setHFUpgrade()

void HcalDbHardcode::setHFUpgrade ( HcalHardcodeParameters  p)
inline

◆ setHO()

void HcalDbHardcode::setHO ( HcalHardcodeParameters  p)
inline

◆ setKillHE()

void HcalDbHardcode::setKillHE ( bool  b)
inline

Definition at line 89 of file HcalDbHardcode.h.

References b, and killHE_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

89 { killHE_ = b; }
double b
Definition: hdecay.h:118

◆ setSiPMCharacteristics()

void HcalDbHardcode::setSiPMCharacteristics ( std::vector< edm::ParameterSet vps)
inline

Definition at line 88 of file HcalDbHardcode.h.

References theSiPMCharacteristics_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

88 { theSiPMCharacteristics_ = vps; }
std::vector< edm::ParameterSet > theSiPMCharacteristics_

◆ testHEPlan1()

void HcalDbHardcode::testHEPlan1 ( bool  b)
inline

Definition at line 87 of file HcalDbHardcode.h.

References b, and testHEPlan1_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

87 { testHEPlan1_ = b; }
double b
Definition: hdecay.h:118

◆ testHFQIE10()

void HcalDbHardcode::testHFQIE10 ( bool  b)
inline

Definition at line 86 of file HcalDbHardcode.h.

References b, and testHFQIE10_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

86 { testHFQIE10_ = b; }
double b
Definition: hdecay.h:118

◆ useHBUpgrade() [1/2]

void HcalDbHardcode::useHBUpgrade ( bool  b)
inline

Definition at line 82 of file HcalDbHardcode.h.

References b, and useHBUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

82 { useHBUpgrade_ = b; }
double b
Definition: hdecay.h:118

◆ useHBUpgrade() [2/2]

const bool HcalDbHardcode::useHBUpgrade ( ) const
inline

Definition at line 92 of file HcalDbHardcode.h.

References useHBUpgrade_.

92 { return useHBUpgrade_; }

◆ useHEUpgrade() [1/2]

void HcalDbHardcode::useHEUpgrade ( bool  b)
inline

Definition at line 83 of file HcalDbHardcode.h.

References b, and useHEUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

83 { useHEUpgrade_ = b; }
double b
Definition: hdecay.h:118

◆ useHEUpgrade() [2/2]

const bool HcalDbHardcode::useHEUpgrade ( ) const
inline

Definition at line 93 of file HcalDbHardcode.h.

References useHEUpgrade_.

93 { return useHEUpgrade_; }

◆ useHFUpgrade() [1/2]

void HcalDbHardcode::useHFUpgrade ( bool  b)
inline

Definition at line 85 of file HcalDbHardcode.h.

References b, and useHFUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

85 { useHFUpgrade_ = b; }
double b
Definition: hdecay.h:118

◆ useHFUpgrade() [2/2]

const bool HcalDbHardcode::useHFUpgrade ( ) const
inline

Definition at line 95 of file HcalDbHardcode.h.

References useHFUpgrade_.

95 { return useHFUpgrade_; }

◆ useHOUpgrade() [1/2]

void HcalDbHardcode::useHOUpgrade ( bool  b)
inline

Definition at line 84 of file HcalDbHardcode.h.

References b, and useHOUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

84 { useHOUpgrade_ = b; }
double b
Definition: hdecay.h:118

◆ useHOUpgrade() [2/2]

const bool HcalDbHardcode::useHOUpgrade ( ) const
inline

Definition at line 94 of file HcalDbHardcode.h.

References useHOUpgrade_.

94 { return useHOUpgrade_; }

Member Data Documentation

◆ killHE_

bool HcalDbHardcode::killHE_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by killHE(), and setKillHE().

◆ setHB_

bool HcalDbHardcode::setHB_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHB().

◆ setHBUpgrade_

bool HcalDbHardcode::setHBUpgrade_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHBUpgrade().

◆ setHE_

bool HcalDbHardcode::setHE_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHE().

◆ setHEUpgrade_

bool HcalDbHardcode::setHEUpgrade_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHEUpgrade().

◆ setHF_

bool HcalDbHardcode::setHF_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHF().

◆ setHFUpgrade_

bool HcalDbHardcode::setHFUpgrade_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHFUpgrade().

◆ setHO_

bool HcalDbHardcode::setHO_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHO().

◆ testHEPlan1_

bool HcalDbHardcode::testHEPlan1_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), makeHardcodeSiPMParameter(), and testHEPlan1().

◆ testHFQIE10_

bool HcalDbHardcode::testHFQIE10_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), and testHFQIE10().

◆ theDefaultParameters_

HcalHardcodeParameters HcalDbHardcode::theDefaultParameters_
private

Definition at line 124 of file HcalDbHardcode.h.

Referenced by getParameters().

◆ theHBParameters_

HcalHardcodeParameters HcalDbHardcode::theHBParameters_
private

Definition at line 125 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHB().

◆ theHBUpgradeParameters_

HcalHardcodeParameters HcalDbHardcode::theHBUpgradeParameters_
private

Definition at line 126 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHBUpgrade().

◆ theHEParameters_

HcalHardcodeParameters HcalDbHardcode::theHEParameters_
private

Definition at line 125 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHE().

◆ theHEUpgradeParameters_

HcalHardcodeParameters HcalDbHardcode::theHEUpgradeParameters_
private

Definition at line 126 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHEUpgrade().

◆ theHFParameters_

HcalHardcodeParameters HcalDbHardcode::theHFParameters_
private

Definition at line 125 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHF().

◆ theHFUpgradeParameters_

HcalHardcodeParameters HcalDbHardcode::theHFUpgradeParameters_
private

Definition at line 126 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHFUpgrade().

◆ theHOParameters_

HcalHardcodeParameters HcalDbHardcode::theHOParameters_
private

Definition at line 125 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHO().

◆ theLayersInDepths_

std::map<std::pair<int, int>, int> HcalDbHardcode::theLayersInDepths_
private

Definition at line 130 of file HcalDbHardcode.h.

Referenced by getLayersInDepth().

◆ theSiPMCharacteristics_

std::vector<edm::ParameterSet> HcalDbHardcode::theSiPMCharacteristics_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by makeHardcodeSiPMCharacteristics(), and setSiPMCharacteristics().

◆ useHBUpgrade_

bool HcalDbHardcode::useHBUpgrade_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), makeHardcodeSiPMParameter(), and useHBUpgrade().

◆ useHEUpgrade_

bool HcalDbHardcode::useHEUpgrade_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), makeHardcodeSiPMParameter(), and useHEUpgrade().

◆ useHFUpgrade_

bool HcalDbHardcode::useHFUpgrade_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), and useHFUpgrade().

◆ useHOUpgrade_

bool HcalDbHardcode::useHOUpgrade_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by makeHardcodeSiPMParameter(), and useHOUpgrade().