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)
 
HcalPFCut makePFCut (HcalGenericDetId fId) const
 
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 46 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  0.0, //PF noise threshold
34  0.1 //PF seed threshold
35  ),
36  setHB_(false),
37  setHE_(false),
38  setHF_(false),
39  setHO_(false),
40  setHBUpgrade_(false),
41  setHEUpgrade_(false),
42  setHFUpgrade_(false),
43  useHBUpgrade_(false),
44  useHEUpgrade_(false),
45  useHOUpgrade_(true),
46  useHFUpgrade_(false),
47  testHFQIE10_(false),
48  testHEPlan1_(false) {}
HcalHardcodeParameters theDefaultParameters_

◆ ~HcalDbHardcode()

virtual HcalDbHardcode::~HcalDbHardcode ( )
inlinevirtual

Definition at line 52 of file HcalDbHardcode.h.

52 {}

Member Function Documentation

◆ getGainIndex()

const int HcalDbHardcode::getGainIndex ( HcalGenericDetId  fId) const

Definition at line 92 of file HcalDbHardcode.cc.

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

Referenced by makeGain(), and makeGainWidth().

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

◆ getLayersInDepth()

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

Definition at line 625 of file HcalDbHardcode.cc.

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

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

625  {
626  //check for cached value
627  auto eta_depth_pair = std::make_pair(ieta, depth);
628  auto nLayers = theLayersInDepths_.find(eta_depth_pair);
629  if (nLayers != theLayersInDepths_.end()) {
630  return nLayers->second;
631  } else {
632  std::vector<int> segmentation;
633  topo->getDepthSegmentation(ieta, segmentation);
634  //assume depth segmentation vector is sorted
635  int nLayersInDepth = std::distance(std::lower_bound(segmentation.begin(), segmentation.end(), depth),
636  std::upper_bound(segmentation.begin(), segmentation.end(), depth));
637  theLayersInDepths_.insert(std::make_pair(eta_depth_pair, nLayersInDepth));
638  return nLayersInDepth;
639  }
640 }
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 50 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(), makePFCut(), makeQIECoder(), makeQIEType(), makeRecoParam(), and makeZSThreshold().

50  {
54  else if (!useHBUpgrade_ && setHB_)
55  return theHBParameters_;
56  else
57  return theDefaultParameters_;
58  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
59  bool b_isHEPlan1 = testHEPlan1_ ? isHEPlan1(fId) : false;
60  if ((useHEUpgrade_ || b_isHEPlan1) && setHEUpgrade_)
62  else if (!useHEUpgrade_ && !b_isHEPlan1 && setHE_)
63  return theHEParameters_;
64  else
65  return theDefaultParameters_;
66  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
69  else if (testHFQIE10_ && fId.isHcalDetId()) {
70  HcalDetId hid(fId);
71  //special mixed case for HF 2016
72  if (hid.iphi() == 39 && hid.zside() == 1 &&
73  (hid.depth() >= 3 || (hid.depth() == 2 && (hid.ieta() == 30 || hid.ieta() == 34))) && setHFUpgrade_)
75  else if (setHF_)
76  return theHFParameters_;
77  else
78  return theDefaultParameters_;
79  } else if (!useHFUpgrade_ && setHF_)
80  return theHFParameters_;
81  else
82  return theDefaultParameters_;
83  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
84  if (setHO_)
85  return theHOParameters_;
86  else
87  return theDefaultParameters_;
88  } else
89  return theDefaultParameters_;
90 }
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 642 of file HcalDbHardcode.cc.

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

Referenced by getParameters(), and makeHardcodeSiPMParameter().

642  {
643  if (fId.isHcalDetId()) {
644  HcalDetId hid(fId);
645  //special mixed case for HE 2017
646  if (hid.zside() == 1 && (hid.iphi() == 63 || hid.iphi() == 64 || hid.iphi() == 65 || hid.iphi() == 66))
647  return true;
648  }
649  return false;
650 }
bool isHcalDetId() const

◆ killHE()

const bool HcalDbHardcode::killHE ( ) const
inline

◆ makeCalibrationQIECoder()

HcalCalibrationQIECoder HcalDbHardcode::makeCalibrationQIECoder ( HcalGenericDetId  fId) const

Definition at line 214 of file HcalDbHardcode.cc.

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

214  {
216  float lowEdges[64];
217  for (int i = 0; i < 64; i++) {
218  lowEdges[i] = -1.5 + i;
219  }
220  result.setMinCharges(lowEdges);
221  return result;
222 }
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 160 of file HcalDbHardcode.cc.

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

Referenced by HcalHardcodeCalibrations::produceGains().

160  { // GeV/fC
162  float value0 = getParameters(fId).gain(getGainIndex(fId));
163  float value[4] = {value0, value0, value0, value0};
164  if (fSmear) {
165  for (int i = 0; i < 4; i++) {
166  value[i] = 0.0f;
167  while (value[i] <= 0.0f)
168  value[i] = value0 + (float)CLHEP::RandGauss::shoot(0.0, width.getValue(i));
169  }
170  }
171  HcalGain result(fId.rawId(), value[0], value[1], value[2], value[3]);
172  return result;
173 }
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
double gain(unsigned index) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeGainWidth()

HcalGainWidth HcalDbHardcode::makeGainWidth ( HcalGenericDetId  fId) const

Definition at line 175 of file HcalDbHardcode.cc.

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

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

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

◆ makeHardcodeDcsMap()

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

Definition at line 501 of file HcalDbHardcode.cc.

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

Referenced by HcalHardcodeCalibrations::produceDcsMap().

501  {
502  HcalDcsMapAddons::Helper dcs_map_helper;
503  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalBarrel, -16, 1, 1),
505  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, -41, 3, 1),
507  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, -26, 25, 2),
509  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalBarrel, -15, 68, 1),
511  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalOuter, -14, 1, 4),
513  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, 41, 71, 2),
515  return std::make_unique<HcalDcsMap>(dcs_map_helper);
516 }
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 548 of file HcalDbHardcode.cc.

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

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

518  {
519  static const int kUTCAMask = 0x4000000; //set bit 26 for uTCA version
520  static const int kLinearIndexMax = 0x7FFFF; //19 bits
521  static const int kTriggerBitMask = 0x02000000; //2^25
522  uint32_t counter = 0;
523  uint32_t counterTrig = 0;
525  for (const auto& fId : cells) {
526  if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel ||
527  fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap ||
528  fId.genericSubdet() == HcalGenericDetId::HcalGenForward ||
529  fId.genericSubdet() == HcalGenericDetId::HcalGenOuter || fId.genericSubdet() == HcalGenericDetId::HcalGenZDC) {
530  ++counter;
531  assert(counter < kLinearIndexMax);
532  uint32_t raw = counter;
533  raw |= kUTCAMask;
534  HcalElectronicsId elId(raw);
535  emapHelper.mapEId2chId(elId, fId);
536  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenTriggerTower) {
537  ++counterTrig;
538  assert(counterTrig < kLinearIndexMax);
539  uint32_t raw = counterTrig;
540  raw |= kUTCAMask | kTriggerBitMask;
541  HcalElectronicsId elId(raw);
542  emapHelper.mapEId2tId(elId, fId);
543  }
544  }
545  return std::make_unique<HcalElectronicsMap>(emapHelper);
546 }
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 704 of file HcalDbHardcode.cc.

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

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

704  {
705  // SiPMCharacteristics are constants for each type of SiPM:
706  // Type, # of pixels, 3 parameters for non-linearity, cross talk parameter, ..
707  // Obtained from data sheet and measurements
708  // types (in order): HcalHOZecotek=1, HcalHOHamamatsu, HcalHEHamamatsu1, HcalHEHamamatsu2, HcalHBHamamatsu1, HcalHBHamamatsu2, HcalHPD
710  for (unsigned ip = 0; ip < theSiPMCharacteristics_.size(); ++ip) {
711  auto& ps = theSiPMCharacteristics_[ip];
712  sipmHelper.loadObject(ip + 1,
713  ps.getParameter<int>("pixels"),
714  ps.getParameter<double>("nonlin1"),
715  ps.getParameter<double>("nonlin2"),
716  ps.getParameter<double>("nonlin3"),
717  ps.getParameter<double>("crosstalk"),
718  0,
719  0);
720  }
721  return std::make_unique<HcalSiPMCharacteristics>(sipmHelper);
722 }
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 652 of file HcalDbHardcode.cc.

References HcalHardcodeParameters::darkCurrent(), HcalDetId::depth(), nano_mu_digi_cff::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().

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

◆ makeHardcodeTPChannelParameter()

HcalTPChannelParameter HcalDbHardcode::makeHardcodeTPChannelParameter ( HcalGenericDetId  fId) const

Definition at line 724 of file HcalDbHardcode.cc.

References DetId::rawId().

Referenced by HcalHardcodeCalibrations::produceTPChannelParameters().

724  {
725  // For each detId parameters for trigger primitive
726  // mask for channel validity and self trigger information, fine grain
727  // bit information and auxiliary words
728  uint32_t bitInfo = ((44 << 16) | 30);
729  return HcalTPChannelParameter(fId.rawId(), 0, bitInfo, 0, 0);
730 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeHardcodeTPParameters()

void HcalDbHardcode::makeHardcodeTPParameters ( HcalTPParameters tppar) const

Definition at line 732 of file HcalDbHardcode.cc.

References HcalTPParameters::loadObject().

Referenced by HcalHardcodeCalibrations::produceTPParameters().

732  {
733  // Parameters for a given TP algorithm:
734  // FineGrain Algorithm Version for HBHE, ADC threshold fof TDC mask of HF,
735  // TDC mask for HF, Self Trigger bits, auxiliary words
736  tppar.loadObject(0, 0, 0xFFFFFFFFFFFFFFFF, 0, 0, 0);
737 }
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 226 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().

226  {
227  int r1bit[5];
228  r1bit[0] = 9; // [0,9]
229  int syncPhase = 0;
230  r1bit[1] = 1;
231  int binOfMaximum = 0;
232  r1bit[2] = 4;
233  float phase = -25.0f; // [-25.0,25.0]
234  float Xphase = (phase + 32.0f) * 4.0f; // never change this line
235  // (offset 50nsec, 0.25ns step)
236  int Iphase = Xphase;
237  r1bit[3] = 8; // [0,256] offset 50ns, .25ns step
238  int timeSmearing = 0;
239  r1bit[4] = 1; // bool
240 
241  const HcalHardcodeParameters& hparam(getParameters(fId));
242  int pulseShapeID = hparam.mcShape(); // a0
243 
245  syncPhase = 1; // a1 bool
246  binOfMaximum = 5; // a2
247  phase = 5.0f; // a3 [-25.0,25.0]
248  Xphase = (phase + 32.0f) * 4.0f; // never change this line
249  // (offset 50nsec, 0.25ns step)
250  Iphase = Xphase;
251  timeSmearing = 1; // a4
252 
253  }
254 
256  syncPhase = 1; // a1 bool
257  binOfMaximum = 5; // a2
258  phase = 5.0f; // a3 [-25.0,25.0]
259  Xphase = (phase + 32.0f) * 4.0f; // never change this line
260  // (offset 50nsec, 0.25ns step)
261  Iphase = Xphase;
262  timeSmearing = 1; // a4
263 
264  }
265 
266  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
267  syncPhase = 1; // a1 bool
268  binOfMaximum = 5; // a2
269  phase = 5.0f; // a3 [-25.0,25.0]
270  Xphase = (phase + 32.0f) * 4.0f; // never change this line
271  // (offset 50nsec, 0.25ns step)
272  Iphase = Xphase;
273  timeSmearing = 0; // a4
274 
275  HcalDetId cell = HcalDetId(fId);
276  if (cell.ieta() == 1 && cell.iphi() == 1)
277  pulseShapeID = 125;
278 
279  }
280 
282  syncPhase = 1; // a1 bool
283  binOfMaximum = 3; // a2
284  phase = 14.0f; // a3 [-25.0,25.0]
285  Xphase = (phase + 32.0f) * 4.0f; // never change this line
286  // (offset 50nsec, 0.25ns step)
287  Iphase = Xphase;
288  timeSmearing = 0; // a4
289 
290  }
291 
292  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenZDC) {
293  pulseShapeID = 401; // a0
294  syncPhase = 1; // a1 bool
295  binOfMaximum = 5; // a2
296  phase = -4.0f; // a3 [-25.0,25.0]
297  Xphase = (phase + 32.0f) * 4.0f; // never change this line
298  // (offset 50nsec, 0.25ns step)
299  Iphase = Xphase;
300  timeSmearing = 0; // a4
301  }
302 
303  int rshift[7];
304  rshift[0] = 0;
305  for (int k = 0; k < 5; k++) {
306  rshift[k + 1] = rshift[k] + r1bit[k];
307  }
308 
309  int packingScheme = 1; // a5
310  unsigned int param = pulseShapeID | syncPhase << rshift[1] | (binOfMaximum << rshift[2]) | (Iphase << rshift[3]) |
311  (timeSmearing << rshift[4] | packingScheme << 27);
312 
313  HcalMCParam result(fId.rawId(), param);
314  return result;
315 }
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 110 of file HcalDbHardcode.cc.

References f, nano_mu_digi_cff::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_().

111  {
113  float value0 = getParameters(fId).pedestal();
114  if (eff) {
115  //account for dark current + crosstalk
116  auto sipmpar = makeHardcodeSiPMParameter(fId, topo, intlumi);
117  auto sipmchar = makeHardcodeSiPMCharacteristics();
118  value0 += sipmpar.getDarkCurrent() * 25. / (1. - sipmchar->getCrossTalk(sipmpar.getType()));
119  }
120  float value[4] = {value0, value0, value0, value0};
121  if (fSmear) {
122  for (int i = 0; i < 4; i++) {
123  value[i] = 0.0f;
124  while (value[i] <= 0.0f)
125  // ignore correlations, assume 10K pedestal run
126  value[i] = value0 + (float)CLHEP::RandGauss::shoot(0.0, width.getWidth(i) / 100.);
127  }
128  }
129  HcalPedestal result(fId.rawId(), value[0], value[1], value[2], value[3]);
130  return result;
131 }
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)

◆ makePedestalWidth()

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

Definition at line 133 of file HcalDbHardcode.cc.

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

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

136  {
137  float value = getParameters(fId).pedestalWidth();
138  float width2 = value * value;
139  // everything in fC
140 
141  if (eff) {
142  //account for dark current + crosstalk
143  auto sipmpar = makeHardcodeSiPMParameter(fId, topo, intlumi);
144  auto sipmchar = makeHardcodeSiPMCharacteristics();
145  //add in quadrature
146  width2 += sipmpar.getDarkCurrent() * 25. / std::pow(1 - sipmchar->getCrossTalk(sipmpar.getType()), 3) *
147  sipmpar.getFCByPE();
148  }
149 
151  for (int i = 0; i < 4; i++) {
152  for (int j = 0; j < 4; j++) {
153  result.setSigma(i, j, 0.0);
154  }
155  result.setSigma(i, i, width2);
156  }
157  return result;
158 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
constexpr int pow(int x)
Definition: conifer.h:24
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)

◆ makePFCut()

HcalPFCut HcalDbHardcode::makePFCut ( HcalGenericDetId  fId) const

Definition at line 181 of file HcalDbHardcode.cc.

References getParameters(), HcalHardcodeParameters::noiseThreshold(), DetId::rawId(), mps_fire::result, HcalHardcodeParameters::seedThreshold(), and HLT_2023v12_cff::value1.

Referenced by HcalHardcodeCalibrations::producePFCuts().

181  { // GeV
182  float value0 = getParameters(fId).noiseThreshold();
183  float value1 = getParameters(fId).seedThreshold();
184  HcalPFCut result(fId.rawId(), value0, value1);
185  return result;
186 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ makeQIECoder()

HcalQIECoder HcalDbHardcode::makeQIECoder ( HcalGenericDetId  fId) const

Definition at line 194 of file HcalDbHardcode.cc.

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

Referenced by HcalHardcodeCalibrations::produceQIEData().

194  {
195  HcalQIECoder result(fId.rawId());
196  // slope in ADC/fC
197  const HcalHardcodeParameters& param(getParameters(fId));
198  for (unsigned range = 0; range < 4; range++) {
199  for (unsigned capid = 0; capid < 4; capid++) {
200  result.setOffset(capid, range, param.qieOffset(range));
201  result.setSlope(capid, range, param.qieSlope(range));
202  }
203  }
204 
205  return result;
206 }
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 224 of file HcalDbHardcode.cc.

224 { return HcalQIEShape(); }

◆ makeQIEType()

HcalQIEType HcalDbHardcode::makeQIEType ( HcalGenericDetId  fId) const

Definition at line 208 of file HcalDbHardcode.cc.

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

Referenced by HcalHardcodeCalibrations::produceQIETypes().

208  {
209  HcalQIENum qieType = (HcalQIENum)(getParameters(fId).qieType());
210  HcalQIEType result(fId.rawId(), qieType);
211  return result;
212 }
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 317 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().

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

464  {
465  int nhits = 0;
466  float phase = 0.0;
467  float rms = 0.0;
469  nhits = 4;
470  phase = 4.5;
471  rms = 6.5;
472  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
473  nhits = 4;
474  phase = 9.3;
475  rms = 7.8;
476  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
477  nhits = 4;
478  phase = 8.6;
479  rms = 2.3;
480  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
481  nhits = 4;
482  phase = 12.4;
483  rms = 12.29;
484  }
486 
487  return result;
488 }
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 188 of file HcalDbHardcode.cc.

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

Referenced by HcalHardcodeCalibrations::produceZSThresholds().

188  {
189  int value = getParameters(fId).zsThreshold();
191  return result;
192 }
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 90 of file HcalDbHardcode.h.

References b, and killHE_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

90 { killHE_ = b; }
double b
Definition: hdecay.h:120

◆ setSiPMCharacteristics()

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

Definition at line 89 of file HcalDbHardcode.h.

References theSiPMCharacteristics_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

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

◆ testHEPlan1()

void HcalDbHardcode::testHEPlan1 ( bool  b)
inline

Definition at line 88 of file HcalDbHardcode.h.

References b, and testHEPlan1_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

88 { testHEPlan1_ = b; }
double b
Definition: hdecay.h:120

◆ testHFQIE10()

void HcalDbHardcode::testHFQIE10 ( bool  b)
inline

Definition at line 87 of file HcalDbHardcode.h.

References b, and testHFQIE10_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

87 { testHFQIE10_ = b; }
double b
Definition: hdecay.h:120

◆ useHBUpgrade() [1/2]

void HcalDbHardcode::useHBUpgrade ( bool  b)
inline

Definition at line 83 of file HcalDbHardcode.h.

References b, and useHBUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

83 { useHBUpgrade_ = b; }
double b
Definition: hdecay.h:120

◆ useHBUpgrade() [2/2]

const bool HcalDbHardcode::useHBUpgrade ( ) const
inline

Definition at line 93 of file HcalDbHardcode.h.

References useHBUpgrade_.

93 { return useHBUpgrade_; }

◆ useHEUpgrade() [1/2]

void HcalDbHardcode::useHEUpgrade ( bool  b)
inline

Definition at line 84 of file HcalDbHardcode.h.

References b, and useHEUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

84 { useHEUpgrade_ = b; }
double b
Definition: hdecay.h:120

◆ useHEUpgrade() [2/2]

const bool HcalDbHardcode::useHEUpgrade ( ) const
inline

Definition at line 94 of file HcalDbHardcode.h.

References useHEUpgrade_.

94 { return useHEUpgrade_; }

◆ useHFUpgrade() [1/2]

void HcalDbHardcode::useHFUpgrade ( bool  b)
inline

Definition at line 86 of file HcalDbHardcode.h.

References b, and useHFUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

86 { useHFUpgrade_ = b; }
double b
Definition: hdecay.h:120

◆ useHFUpgrade() [2/2]

const bool HcalDbHardcode::useHFUpgrade ( ) const
inline

Definition at line 96 of file HcalDbHardcode.h.

References useHFUpgrade_.

96 { return useHFUpgrade_; }

◆ useHOUpgrade() [1/2]

void HcalDbHardcode::useHOUpgrade ( bool  b)
inline

Definition at line 85 of file HcalDbHardcode.h.

References b, and useHOUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

85 { useHOUpgrade_ = b; }
double b
Definition: hdecay.h:120

◆ useHOUpgrade() [2/2]

const bool HcalDbHardcode::useHOUpgrade ( ) const
inline

Definition at line 95 of file HcalDbHardcode.h.

References useHOUpgrade_.

95 { return useHOUpgrade_; }

Member Data Documentation

◆ killHE_

bool HcalDbHardcode::killHE_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by killHE(), and setKillHE().

◆ setHB_

bool HcalDbHardcode::setHB_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHB().

◆ setHBUpgrade_

bool HcalDbHardcode::setHBUpgrade_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHBUpgrade().

◆ setHE_

bool HcalDbHardcode::setHE_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHE().

◆ setHEUpgrade_

bool HcalDbHardcode::setHEUpgrade_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHEUpgrade().

◆ setHF_

bool HcalDbHardcode::setHF_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHF().

◆ setHFUpgrade_

bool HcalDbHardcode::setHFUpgrade_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHFUpgrade().

◆ setHO_

bool HcalDbHardcode::setHO_
private

Definition at line 129 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHO().

◆ testHEPlan1_

bool HcalDbHardcode::testHEPlan1_
private

Definition at line 130 of file HcalDbHardcode.h.

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

◆ testHFQIE10_

bool HcalDbHardcode::testHFQIE10_
private

Definition at line 130 of file HcalDbHardcode.h.

Referenced by getParameters(), and testHFQIE10().

◆ theDefaultParameters_

HcalHardcodeParameters HcalDbHardcode::theDefaultParameters_
private

Definition at line 126 of file HcalDbHardcode.h.

Referenced by getParameters().

◆ theHBParameters_

HcalHardcodeParameters HcalDbHardcode::theHBParameters_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHB().

◆ theHBUpgradeParameters_

HcalHardcodeParameters HcalDbHardcode::theHBUpgradeParameters_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHBUpgrade().

◆ theHEParameters_

HcalHardcodeParameters HcalDbHardcode::theHEParameters_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHE().

◆ theHEUpgradeParameters_

HcalHardcodeParameters HcalDbHardcode::theHEUpgradeParameters_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHEUpgrade().

◆ theHFParameters_

HcalHardcodeParameters HcalDbHardcode::theHFParameters_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHF().

◆ theHFUpgradeParameters_

HcalHardcodeParameters HcalDbHardcode::theHFUpgradeParameters_
private

Definition at line 128 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHFUpgrade().

◆ theHOParameters_

HcalHardcodeParameters HcalDbHardcode::theHOParameters_
private

Definition at line 127 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHO().

◆ theLayersInDepths_

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

Definition at line 132 of file HcalDbHardcode.h.

Referenced by getLayersInDepth().

◆ theSiPMCharacteristics_

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

Definition at line 131 of file HcalDbHardcode.h.

Referenced by makeHardcodeSiPMCharacteristics(), and setSiPMCharacteristics().

◆ useHBUpgrade_

bool HcalDbHardcode::useHBUpgrade_
private

Definition at line 130 of file HcalDbHardcode.h.

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

◆ useHEUpgrade_

bool HcalDbHardcode::useHEUpgrade_
private

Definition at line 130 of file HcalDbHardcode.h.

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

◆ useHFUpgrade_

bool HcalDbHardcode::useHFUpgrade_
private

Definition at line 130 of file HcalDbHardcode.h.

Referenced by getParameters(), and useHFUpgrade().

◆ useHOUpgrade_

bool HcalDbHardcode::useHOUpgrade_
private

Definition at line 130 of file HcalDbHardcode.h.

Referenced by makeHardcodeSiPMParameter(), and useHOUpgrade().