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 ( )

Definition at line 17 of file HcalDbHardcode.cc.

17  :
18  //"generic" set of conditions
20  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  ),
33  setHB_(false), setHE_(false), setHF_(false), setHO_(false),
34  setHBUpgrade_(false), setHEUpgrade_(false), setHFUpgrade_(false),
35  useHBUpgrade_(false), useHEUpgrade_(false), useHOUpgrade_(true),
36  useHFUpgrade_(false), testHFQIE10_(false), testHEPlan1_(false)
37 {
38 }
HcalHardcodeParameters theDefaultParameters_
virtual HcalDbHardcode::~HcalDbHardcode ( )
inlinevirtual

Definition at line 51 of file HcalDbHardcode.h.

51 {}

Member Function Documentation

const int HcalDbHardcode::getGainIndex ( HcalGenericDetId  fId) const

Definition at line 71 of file HcalDbHardcode.cc.

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

Referenced by makeGain(), makeGainWidth(), and useHFUpgrade().

71  {
72  int index = 0;
74  HcalDetId hid(fId);
75  if ((hid.ieta() > -5) && (hid.ieta() < 5)) index = 0;
76  else index = 1;
77  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
78  HcalDetId hid(fId);
79  if (hid.depth() % 2 == 1) index = 0; //depths 1,3
80  else if (hid.depth() % 2 == 0) index = 1; //depths 2,4
81  }
82  return index;
83 }
HcalGenericSubdetector genericSubdet() const
int HcalDbHardcode::getLayersInDepth ( int  ieta,
int  depth,
const HcalTopology topo 
)

Definition at line 577 of file HcalDbHardcode.cc.

References egammaForCoreTracking_cff::depth, SoftLeptonByDistance_cfi::distance, HcalTopology::getDepthSegmentation(), MuonTCMETValueMapProducer_cff::nLayers, and theLayersInDepths_.

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

577  {
578  //check for cached value
579  auto eta_depth_pair = std::make_pair(ieta,depth);
580  auto nLayers = theLayersInDepths_.find(eta_depth_pair);
581  if(nLayers != theLayersInDepths_.end()){
582  return nLayers->second;
583  }
584  else {
585  std::vector<int> segmentation;
586  topo->getDepthSegmentation(ieta,segmentation);
587  //assume depth segmentation vector is sorted
588  int nLayersInDepth = std::distance(std::lower_bound(segmentation.begin(),segmentation.end(),depth),
589  std::upper_bound(segmentation.begin(),segmentation.end(),depth));
590  theLayersInDepths_.insert(std::make_pair(eta_depth_pair,nLayersInDepth));
591  return nLayersInDepth;
592  }
593 }
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
std::map< std::pair< int, int >, int > theLayersInDepths_
const HcalHardcodeParameters & HcalDbHardcode::getParameters ( HcalGenericDetId  fId) const

Definition at line 40 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(), makeZSThreshold(), and useHFUpgrade().

40  {
43  else if(!useHBUpgrade_ && setHB_) return theHBParameters_;
44  else return theDefaultParameters_;
45  }
47  bool b_isHEPlan1 = testHEPlan1_ ? isHEPlan1(fId) : false;
48  if((useHEUpgrade_ || b_isHEPlan1) && setHEUpgrade_) return theHEUpgradeParameters_;
49  else if(!useHEUpgrade_ && !b_isHEPlan1 && setHE_) return theHEParameters_;
50  else return theDefaultParameters_;
51  }
54  else if(testHFQIE10_ && fId.isHcalDetId()){
55  HcalDetId hid(fId);
56  //special mixed case for HF 2016
57  if(hid.iphi()==39 && hid.zside()==1 && (hid.depth()>=3 || (hid.depth()==2 && (hid.ieta()==30 || hid.ieta()==34))) && setHFUpgrade_) return theHFUpgradeParameters_;
58  else if(setHF_) return theHFParameters_;
59  else return theDefaultParameters_;
60  }
61  else if(!useHFUpgrade_ && setHF_) return theHFParameters_;
62  else return theDefaultParameters_;
63  }
65  if(setHO_) return theHOParameters_;
66  else return theDefaultParameters_;
67  }
68  else return theDefaultParameters_;
69 }
HcalHardcodeParameters theHOParameters_
bool isHEPlan1(HcalGenericDetId fId) const
HcalHardcodeParameters theDefaultParameters_
HcalHardcodeParameters theHEUpgradeParameters_
HcalHardcodeParameters theHBUpgradeParameters_
HcalHardcodeParameters theHBParameters_
bool isHcalDetId() const
HcalHardcodeParameters theHFParameters_
HcalHardcodeParameters theHEParameters_
HcalGenericSubdetector genericSubdet() const
HcalHardcodeParameters theHFUpgradeParameters_
bool HcalDbHardcode::isHEPlan1 ( HcalGenericDetId  fId) const

Definition at line 595 of file HcalDbHardcode.cc.

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

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

595  {
596  if(fId.isHcalDetId()){
597  HcalDetId hid(fId);
598  //special mixed case for HE 2017
599  if(hid.zside()==1 && (hid.iphi()==63 || hid.iphi()==64 || hid.iphi()==65 || hid.iphi()==66)) return true;
600  }
601  return false;
602 }
bool isHcalDetId() const
const bool HcalDbHardcode::killHE ( ) const
inline

Definition at line 77 of file HcalDbHardcode.h.

References egammaForCoreTracking_cff::depth, getLayersInDepth(), isHEPlan1(), killHE_, makeCalibrationQIECoder(), makeGain(), makeGainWidth(), makeHardcodeDcsMap(), makeHardcodeFrontEndMap(), makeHardcodeMap(), makeHardcodeSiPMCharacteristics(), makeHardcodeSiPMParameter(), makeHardcodeTPChannelParameter(), makeHardcodeTPParameters(), makeMCParam(), makePedestal(), makePedestalWidth(), makeQIECoder(), makeQIEShape(), makeQIEType(), makeRecoParam(), makeTimingParam(), and makeZSThreshold().

Referenced by HcalHardcodeCalibrations::produceChannelQuality(), HcalHardcodeCalibrations::produceElectronicsMap(), HcalHardcodeCalibrations::produceFlagHFDigiTimeParams(), HcalHardcodeCalibrations::produceFrontEndMap(), HcalHardcodeCalibrations::produceGains(), HcalHardcodeCalibrations::produceGainWidths(), HcalHardcodeCalibrations::produceL1TriggerObjects(), HcalHardcodeCalibrations::produceLongRecoParams(), HcalHardcodeCalibrations::produceLUTCorrs(), HcalHardcodeCalibrations::produceLutMetadata(), HcalHardcodeCalibrations::produceMCParams(), HcalHardcodeCalibrations::producePedestals_(), HcalHardcodeCalibrations::producePedestalWidths_(), HcalHardcodeCalibrations::producePFCorrs(), HcalHardcodeCalibrations::produceQIEData(), HcalHardcodeCalibrations::produceQIETypes(), HcalHardcodeCalibrations::produceRecoParams(), HcalHardcodeCalibrations::produceRespCorrs(), HcalHardcodeCalibrations::produceSiPMParameters(), HcalHardcodeCalibrations::produceTimeCorrs(), HcalHardcodeCalibrations::produceTimingParams(), HcalHardcodeCalibrations::produceTPChannelParameters(), HcalHardcodeCalibrations::produceValidationCorrs(), HcalHardcodeCalibrations::produceZDCLowGainFractions(), and HcalHardcodeCalibrations::produceZSThresholds().

77 { return killHE_; }
HcalCalibrationQIECoder HcalDbHardcode::makeCalibrationQIECoder ( HcalGenericDetId  fId) const

Definition at line 178 of file HcalDbHardcode.cc.

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

Referenced by killHE().

178  {
180  float lowEdges [64];
181  for (int i = 0; i < 64; i++) { lowEdges[i] = -1.5 + i; }
182  result.setMinCharges (lowEdges);
183  return result;
184 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
HcalGain HcalDbHardcode::makeGain ( HcalGenericDetId  fId,
bool  fSmear = false 
) const

Definition at line 132 of file HcalDbHardcode.cc.

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

Referenced by killHE(), and HcalHardcodeCalibrations::produceGains().

132  { // GeV/fC
134  float value0 = getParameters(fId).gain(getGainIndex(fId));
135  float value [4] = {value0, value0, value0, value0};
136  if (fSmear) {
137  for (int i = 0; i < 4; i++) {
138  value[i] = 0.0f;
139  while (value [i] <= 0.0f) value [i] = value0 + (float)CLHEP::RandGauss::shoot (0.0, width.getValue (i));
140  }
141  }
142  HcalGain result (fId.rawId (), value[0], value[1], value[2], value[3]);
143  return result;
144 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalGainWidth.h:21
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
double f[11][100]
const int getGainIndex(HcalGenericDetId fId) const
Definition: value.py:1
HcalGainWidth makeGainWidth(HcalGenericDetId fId) const
const double gain(unsigned index) const
HcalGainWidth HcalDbHardcode::makeGainWidth ( HcalGenericDetId  fId) const

Definition at line 146 of file HcalDbHardcode.cc.

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

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

146  { // GeV/fC
147  float value = getParameters(fId).gainWidth(getGainIndex(fId));
149  return result;
150 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
const double gainWidth(unsigned index) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
const int getGainIndex(HcalGenericDetId fId) const
Definition: value.py:1
std::unique_ptr< HcalDcsMap > HcalDbHardcode::makeHardcodeDcsMap ( ) const

Definition at line 458 of file HcalDbHardcode.cc.

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

Referenced by killHE(), and HcalHardcodeCalibrations::produceDcsMap().

458  {
459  HcalDcsMapAddons::Helper dcs_map_helper;
460  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalBarrel, -16, 1, 1),
462  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, -41, 3, 1),
464  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, -26, 25, 2),
466  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalBarrel, -15, 68, 1),
468  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalOuter, -14, 1, 4),
470  dcs_map_helper.mapGeomId2DcsId(HcalDetId(HcalForward, 41, 71, 2),
472  return std::make_unique<HcalDcsMap>(dcs_map_helper);
473 }
bool mapGeomId2DcsId(HcalDetId fId, HcalDcsDetId fDcsId)
Definition: HcalDcsMap.cc:160
void HcalDbHardcode::makeHardcodeFrontEndMap ( HcalFrontEndMap emap,
const std::vector< HcalGenericDetId > &  cells 
) const
std::unique_ptr< HcalFrontEndMap > HcalDbHardcode::makeHardcodeFrontEndMap ( const std::vector< HcalGenericDetId > &  cells) const

Definition at line 508 of file HcalDbHardcode.cc.

References gamEcalExtractorBlocks_cff::detector, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, HcalFrontEndMapAddons::Helper::loadObject(), relativeConstraints::ring, AlCaHLTBitMon_QueryRunRegistry::string, and HcalDetId::subdet().

508  {
510  std::stringstream mystream;
511  std::string detector[5] = {"XX","HB","HE","HO","HF"};
512  for (const auto& fId : cells) {
513  if (fId.isHcalDetId()) {
514  HcalDetId id = HcalDetId(fId.rawId());
515  HcalSubdetector subdet = id.subdet();
516  int ieta = id.ietaAbs();
517  int iside = id.zside();
518  int iphi = id.iphi();
519  std::string det, rbx;
520  int irm(0);
521  char tempbuff[30];
522  char sidesign = (iside == -1) ? 'M' : 'P';
523  if (subdet == HcalBarrel || subdet == HcalEndcap) {
524  det = detector[subdet];
525  irm = (iphi+1)%4 + 1;
526  int iwedge(0);
527  if (ieta >= 21 && (irm == 1 || irm == 3))
528  iwedge = (iphi + 1 + irm + 1) / 4;
529  else
530  iwedge = (iphi + irm + 1) / 4;
531  if (iwedge > 18) iwedge -= 18;
532  sprintf (tempbuff,"%s%c%2.2i%c",det.c_str(),sidesign,iwedge,'\0');
533  mystream << tempbuff;
534  rbx = mystream.str();
535  mystream.str("");
536  emapHelper.loadObject(id,irm,rbx);
537  } else if (subdet == HcalForward) {
538  det = detector[subdet];
539  int hfphi(0);
540  if ((iside == 1 && ieta == 40) || (iside == -1 && ieta == 41)) {
541  irm = ((iphi + 1) / 2) % 36 + 1;
542  hfphi = ((iphi + 1) / 6) % 12 + 1;
543  } else {
544  irm = ( iphi + 1) / 2;
545  hfphi = (iphi - 1) / 6 + 1;
546  }
547  irm = (irm - 1) % 3 + 1;
548  sprintf (tempbuff,"%s%c%2.2i%c",det.c_str(),sidesign,hfphi,'\0');
549  mystream << tempbuff;
550  rbx = mystream.str();
551  mystream.str("");
552  emapHelper.loadObject(id,irm,rbx);
553  } else if (subdet == HcalOuter) {
554  det = detector[subdet];
555  int ring(0), sector(0);
556  if (ieta <= 4) ring = 0;
557  else if (ieta >= 5 && ieta <= 10) ring = 1;
558  else ring = 2;
559  for (int i = -2; i < iphi; i+=6) sector++;
560  if (sector > 12) sector = 1;
561  irm = ((iphi+1)/2)%6 + 1;
562  if (ring != 0 && sector % 2 != 0) sector++;
563  if (ring == 0)
564  sprintf (tempbuff,"%s%i%2.2d",det.c_str(),ring,sector);
565  else
566  sprintf (tempbuff,"%s%i%c%2.2d",det.c_str(),ring,sidesign,sector);
567  mystream << tempbuff;
568  rbx = mystream.str();
569  mystream.str("");
570  emapHelper.loadObject(id,irm,rbx);
571  }
572  }
573  }
574  return std::make_unique<HcalFrontEndMap>(emapHelper);
575 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
bool loadObject(DetId fId, int rm, std::string rbx)
load a new entry
HcalSubdetector
Definition: HcalAssistant.h:31
std::unique_ptr< HcalElectronicsMap > HcalDbHardcode::makeHardcodeMap ( const std::vector< HcalGenericDetId > &  cells) const

Definition at line 475 of file HcalDbHardcode.cc.

References counter, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalGenericDetId::HcalGenTriggerTower, HcalGenericDetId::HcalGenZDC, HcalElectronicsMapAddons::Helper::mapEId2chId(), and HcalElectronicsMapAddons::Helper::mapEId2tId().

Referenced by killHE(), and HcalHardcodeCalibrations::produceElectronicsMap().

475  {
476  static const int kUTCAMask = 0x4000000; //set bit 26 for uTCA version
477  static const int kLinearIndexMax = 0x7FFFF; //19 bits
478  static const int kTriggerBitMask = 0x02000000; //2^25
479  uint32_t counter = 0;
480  uint32_t counterTrig = 0;
482  for(const auto& fId : cells){
483  if(fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel ||
484  fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap ||
485  fId.genericSubdet() == HcalGenericDetId::HcalGenForward ||
486  fId.genericSubdet() == HcalGenericDetId::HcalGenOuter ||
487  fId.genericSubdet() == HcalGenericDetId::HcalGenZDC)
488  {
489  ++counter;
490  assert(counter < kLinearIndexMax);
491  uint32_t raw = counter;
492  raw |= kUTCAMask;
493  HcalElectronicsId elId(raw);
494  emapHelper.mapEId2chId(elId,fId);
495  }
496  else if(fId.genericSubdet() == HcalGenericDetId::HcalGenTriggerTower){
497  ++counterTrig;
498  assert(counterTrig < kLinearIndexMax);
499  uint32_t raw = counterTrig;
500  raw |= kUTCAMask | kTriggerBitMask;
501  HcalElectronicsId elId(raw);
502  emapHelper.mapEId2tId(elId,fId);
503  }
504  }
505  return std::make_unique<HcalElectronicsMap>(emapHelper);
506 }
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
static std::atomic< unsigned int > counter
Readout chain identification for Hcal.
std::unique_ptr< HcalSiPMCharacteristics > HcalDbHardcode::makeHardcodeSiPMCharacteristics ( ) const

Definition at line 648 of file HcalDbHardcode.cc.

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

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

648  {
649  // SiPMCharacteristics are constants for each type of SiPM:
650  // Type, # of pixels, 3 parameters for non-linearity, cross talk parameter, ..
651  // Obtained from data sheet and measurements
652  // types (in order): HcalHOZecotek=1, HcalHOHamamatsu, HcalHEHamamatsu1, HcalHEHamamatsu2, HcalHBHamamatsu1, HcalHBHamamatsu2, HcalHPD
654  for(unsigned ip = 0; ip < theSiPMCharacteristics_.size(); ++ip){
655  auto& ps = theSiPMCharacteristics_[ip];
656  sipmHelper.loadObject(ip+1,
657  ps.getParameter<int>("pixels"),
658  ps.getParameter<double>("nonlin1"),
659  ps.getParameter<double>("nonlin2"),
660  ps.getParameter<double>("nonlin3"),
661  ps.getParameter<double>("crosstalk"),
662  0,0
663  );
664  }
665  return std::make_unique<HcalSiPMCharacteristics>(sipmHelper);
666 }
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)
HcalSiPMParameter HcalDbHardcode::makeHardcodeSiPMParameter ( HcalGenericDetId  fId,
const HcalTopology topo,
double  intlumi 
)

Definition at line 604 of file HcalDbHardcode.cc.

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

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

604  {
605  // SiPMParameter defined for each DetId the following quantities:
606  // SiPM type, PhotoElectronToAnalog, Dark Current, two auxiliary words
607  // These numbers come from some measurements done with SiPMs
608  // rule for type: cells with >4 layers use larger device (3.3mm diameter), otherwise 2.8mm
609  HcalSiPMType theType = HcalNoSiPM;
610  double thePe2fC = getParameters(fId).photoelectronsToAnalog();
611  double theDC = getParameters(fId).darkCurrent(0,intlumi);
613  if(useHBUpgrade_) {
614  HcalDetId hid(fId);
615  int nLayersInDepth = getLayersInDepth(hid.ietaAbs(),hid.depth(),topo);
616  if(nLayersInDepth > 4) {
617  theType = HcalHBHamamatsu2;
618  theDC = getParameters(fId).darkCurrent(1,intlumi);
619  }
620  else {
621  theType = HcalHBHamamatsu1;
622  theDC = getParameters(fId).darkCurrent(0,intlumi);
623  }
624  }
625  else theType = HcalHPD;
626  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
627  if(useHEUpgrade_ || (testHEPlan1_ && isHEPlan1(fId))) {
628  HcalDetId hid(fId);
629  int nLayersInDepth = getLayersInDepth(hid.ietaAbs(),hid.depth(),topo);
630  if(nLayersInDepth > 4) {
631  theType = HcalHEHamamatsu2;
632  theDC = getParameters(fId).darkCurrent(1,intlumi);
633  }
634  else {
635  theType = HcalHEHamamatsu1;
636  theDC = getParameters(fId).darkCurrent(0,intlumi);
637  }
638  }
639  else theType = HcalHPD;
640  } else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
641  if(useHOUpgrade_) theType = HcalHOHamamatsu;
642  else theType = HcalHPD;
643  }
644 
645  return HcalSiPMParameter(fId.rawId(), theType, thePe2fC, theDC, 0, 0);
646 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
bool isHEPlan1(HcalGenericDetId fId) const
const double photoelectronsToAnalog() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
HcalSiPMType
Definition: HcalSiPMType.h:4
const double darkCurrent(unsigned index, double intlumi) const
int getLayersInDepth(int ieta, int depth, const HcalTopology *topo)
HcalGenericSubdetector genericSubdet() const
HcalTPChannelParameter HcalDbHardcode::makeHardcodeTPChannelParameter ( HcalGenericDetId  fId) const

Definition at line 668 of file HcalDbHardcode.cc.

References DetId::rawId().

Referenced by killHE(), and HcalHardcodeCalibrations::produceTPChannelParameters().

668  {
669  // For each detId parameters for trigger primitive
670  // mask for channel validity and self trigger information, fine grain
671  // bit information and auxiliary words
672  uint32_t bitInfo = ((44 << 16) | 30);
673  return HcalTPChannelParameter(fId.rawId(), 0, bitInfo, 0, 0);
674 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
void HcalDbHardcode::makeHardcodeTPParameters ( HcalTPParameters tppar) const

Definition at line 676 of file HcalDbHardcode.cc.

References HcalTPParameters::loadObject().

Referenced by killHE(), and HcalHardcodeCalibrations::produceTPParameters().

676  {
677  // Parameters for a given TP algorithm:
678  // FineGrain Algorithm Version for HBHE, ADC threshold fof TDC mask of HF,
679  // TDC mask for HF, Self Trigger bits, auxiliary words
680  tppar.loadObject(0,0,0xFFFFFFFFFFFFFFFF,0,0,0);
681 }
void loadObject(int version, int adcCut, uint64_t tdcMask, uint32_t tbits, int auxi1, int auxi2)
HcalMCParam HcalDbHardcode::makeMCParam ( HcalGenericDetId  fId) const

Definition at line 191 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(), gen::k, HcalHardcodeParameters::mcShape(), hcalRecAlgoESProd_cfi::phase, DetId::rawId(), mps_fire::result, ecalSimParameterMap_cff::syncPhase, and hcalSimParameters_cfi::timeSmearing.

Referenced by killHE(), and HcalHardcodeCalibrations::produceMCParams().

191  {
192 
193  int r1bit[5];
194  r1bit[0] = 9; // [0,9]
195  int syncPhase = 0; r1bit[1] = 1;
196  int binOfMaximum = 0; r1bit[2] = 4;
197  float phase = -25.0f; // [-25.0,25.0]
198  float Xphase = (phase + 32.0f) * 4.0f; // never change this line
199  // (offset 50nsec, 0.25ns step)
200  int Iphase = Xphase; r1bit[3] = 8; // [0,256] offset 50ns, .25ns step
201  int timeSmearing = 0; r1bit[4] = 1; // bool
202 
203  const HcalHardcodeParameters& hparam(getParameters(fId));
204  int pulseShapeID = hparam.mcShape(); // a0
205 
207 
208  syncPhase = 1; // a1 bool
209  binOfMaximum = 5; // a2
210  phase = 5.0f; // a3 [-25.0,25.0]
211  Xphase = (phase + 32.0f) * 4.0f; // never change this line
212  // (offset 50nsec, 0.25ns step)
213  Iphase = Xphase;
214  timeSmearing = 1; // a4
215 
216  }
217 
218  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {
219 
220  syncPhase = 1; // a1 bool
221  binOfMaximum = 5; // a2
222  phase = 5.0f; // a3 [-25.0,25.0]
223  Xphase = (phase + 32.0f) * 4.0f; // never change this line
224  // (offset 50nsec, 0.25ns step)
225  Iphase = Xphase;
226  timeSmearing = 1; // a4
227 
228  }
229 
230  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {
231 
232  syncPhase = 1; // a1 bool
233  binOfMaximum = 5; // a2
234  phase = 5.0f; // a3 [-25.0,25.0]
235  Xphase = (phase + 32.0f) * 4.0f; // never change this line
236  // (offset 50nsec, 0.25ns step)
237  Iphase = Xphase;
238  timeSmearing = 0; // a4
239 
240  HcalDetId cell = HcalDetId(fId);
241  if (cell.ieta() == 1 && cell.iphi() == 1) pulseShapeID = 125;
242 
243  }
244 
245  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {
246 
247  syncPhase = 1; // a1 bool
248  binOfMaximum = 3; // a2
249  phase = 14.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 = 0; // a4
254 
255  }
256 
257  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenZDC) {
258 
259  pulseShapeID = 401; // a0
260  syncPhase = 1; // a1 bool
261  binOfMaximum = 5; // a2
262  phase = -4.0f; // a3 [-25.0,25.0]
263  Xphase = (phase + 32.0f) * 4.0f; // never change this line
264  // (offset 50nsec, 0.25ns step)
265  Iphase = Xphase;
266  timeSmearing = 0; // a4
267 
268  }
269 
270 
271  int rshift[7];
272  rshift[0]=0;
273  for(int k=0; k<5; k++) {
274  rshift[k+1]=rshift[k]+r1bit[k];
275  }
276 
277  int packingScheme = 1; // a5
278  unsigned int param = pulseShapeID |
279  syncPhase<<rshift[1] |
280  (binOfMaximum << rshift[2]) |
281  (Iphase << rshift[3]) |
282  (timeSmearing << rshift[4] | packingScheme << 27);
283 
284  HcalMCParam result(fId.rawId(), param);
285  return result;
286 
287 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
double f[11][100]
int k[5][pyjets_maxn]
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
HcalGenericSubdetector genericSubdet() const
HcalPedestal HcalDbHardcode::makePedestal ( HcalGenericDetId  fId,
bool  fSmear,
bool  eff,
const HcalTopology topo,
double  intlumi 
)

Definition at line 85 of file HcalDbHardcode.cc.

References f, objects.autophobj::float, getParameters(), HcalPedestalWidth::getWidth(), mps_fire::i, makeHardcodeSiPMCharacteristics(), makeHardcodeSiPMParameter(), makePedestalWidth(), HcalHardcodeParameters::pedestal(), DetId::rawId(), mps_fire::result, and ApeEstimator_cff::width.

Referenced by killHE(), and HcalHardcodeCalibrations::producePedestals_().

85  {
86  HcalPedestalWidth width = makePedestalWidth (fId,eff,topo,intlumi);
87  float value0 = getParameters(fId).pedestal();
88  if(eff){
89  //account for dark current + crosstalk
90  auto sipmpar = makeHardcodeSiPMParameter(fId,topo,intlumi);
91  auto sipmchar = makeHardcodeSiPMCharacteristics();
92  value0 += sipmpar.getDarkCurrent() * 25. / (1. - sipmchar->getCrossTalk(sipmpar.getType()));
93  }
94  float value [4] = {value0,value0,value0,value0};
95  if (fSmear) {
96  for (int i = 0; i < 4; i++) {
97  value[i] = 0.0f;
98  while (value [i] <= 0.0f)
99  // ignore correlations, assume 10K pedestal run
100  value [i] = value0 + (float)CLHEP::RandGauss::shoot (0.0, width.getWidth (i) / 100.);
101  }
102  }
103  HcalPedestal result (fId.rawId (),
104  value[0], value[1], value[2], value[3]
105  );
106  return result;
107 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
double f[11][100]
Definition: value.py:1
const double pedestal() const
std::unique_ptr< HcalSiPMCharacteristics > makeHardcodeSiPMCharacteristics() const
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo, double intlumi)
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId, bool eff, const HcalTopology *topo, double intlumi)
HcalPedestalWidth HcalDbHardcode::makePedestalWidth ( HcalGenericDetId  fId,
bool  eff,
const HcalTopology topo,
double  intlumi 
)

Definition at line 109 of file HcalDbHardcode.cc.

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

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

109  {
110  float value = getParameters(fId).pedestalWidth();
111  float width2 = value*value;
112  // everything in fC
113 
114  if(eff){
115  //account for dark current + crosstalk
116  auto sipmpar = makeHardcodeSiPMParameter(fId,topo,intlumi);
117  auto sipmchar = makeHardcodeSiPMCharacteristics();
118  //add in quadrature
119  width2 += sipmpar.getDarkCurrent() * 25. / std::pow(1 - sipmchar->getCrossTalk(sipmpar.getType()), 3) * sipmpar.getFCByPE();
120  }
121 
122  HcalPedestalWidth result (fId.rawId ());
123  for (int i = 0; i < 4; i++) {
124  for (int j = 0; j < 4; j++) {
125  result.setSigma (i, j, 0.0);
126  }
127  result.setSigma (i, i, width2);
128  }
129  return result;
130 }
const double pedestalWidth() const
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
Definition: value.py:1
std::unique_ptr< HcalSiPMCharacteristics > makeHardcodeSiPMCharacteristics() const
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo, double intlumi)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
HcalQIECoder HcalDbHardcode::makeQIECoder ( HcalGenericDetId  fId) const

Definition at line 158 of file HcalDbHardcode.cc.

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

Referenced by killHE(), and HcalHardcodeCalibrations::produceQIEData().

158  {
159  HcalQIECoder result (fId.rawId ());
160  // slope in ADC/fC
161  const HcalHardcodeParameters& param(getParameters(fId));
162  for (unsigned range = 0; range < 4; range++) {
163  for (unsigned capid = 0; capid < 4; capid++) {
164  result.setOffset (capid, range, param.qieOffset(range));
165  result.setSlope (capid, range, param.qieSlope(range));
166  }
167  }
168 
169  return result;
170 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
HcalQIEShape HcalDbHardcode::makeQIEShape ( ) const

Definition at line 186 of file HcalDbHardcode.cc.

Referenced by killHE().

186  {
187  return HcalQIEShape ();
188 }
HcalQIEType HcalDbHardcode::makeQIEType ( HcalGenericDetId  fId) const

Definition at line 172 of file HcalDbHardcode.cc.

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

Referenced by killHE(), and HcalHardcodeCalibrations::produceQIETypes().

172  {
173  HcalQIENum qieType = (HcalQIENum)(getParameters(fId).qieType());
174  HcalQIEType result(fId.rawId(),qieType);
175  return result;
176 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
HcalQIENum
Definition: HcalQIENum.h:4
HcalRecoParam HcalDbHardcode::makeRecoParam ( HcalGenericDetId  fId) const

Definition at line 289 of file HcalDbHardcode.cc.

References CastorSimpleReconstructor_cfi::correctForTimeslew, HcalHitReconstructor_hf_cfi::correctTiming, HcalHitReconstructor_hf_cfi::firstAuxTS, CastorSimpleReconstructor_cfi::firstSample, HcalGenericDetId::genericSubdet(), getParameters(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, gen::k, hcalRecAlgoESProd_cfi::phase, DetId::rawId(), HcalHardcodeParameters::recoShape(), mps_fire::result, CastorSimpleReconstructor_cfi::samplesToAdd, and HcalHitReconstructor_hf_cfi::useLeakCorrection.

Referenced by killHE(), and HcalHardcodeCalibrations::produceRecoParams().

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

Definition at line 434 of file HcalDbHardcode.cc.

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

Referenced by killHE(), and HcalHardcodeCalibrations::produceTimingParams().

434  {
435  int nhits = 0;
436  float phase = 0.0;
437  float rms = 0.0;
438  if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) {nhits=4; phase = 4.5; rms = 6.5;}
439  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) {nhits=4;phase = 9.3; rms = 7.8;}
440  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) {nhits=4;phase = 8.6; rms = 2.3;}
441  else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) {nhits=4;phase = 12.4; rms = 12.29;}
443 
444  return result;
445 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
HcalGenericSubdetector genericSubdet() const
HcalZSThreshold HcalDbHardcode::makeZSThreshold ( HcalGenericDetId  fId) const

Definition at line 152 of file HcalDbHardcode.cc.

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

Referenced by killHE(), and HcalHardcodeCalibrations::produceZSThresholds().

152  {
153  int value = getParameters(fId).zsThreshold();
155  return result;
156 }
const HcalHardcodeParameters & getParameters(HcalGenericDetId fId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
Definition: value.py:1
const int zsThreshold() const
void HcalDbHardcode::setHB ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setHBUpgrade ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setHE ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setHEUpgrade ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setHF ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setHFUpgrade ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setHO ( HcalHardcodeParameters  p)
inline
void HcalDbHardcode::setKillHE ( bool  b)
inline

Definition at line 68 of file HcalDbHardcode.h.

References b, and killHE_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

68 { killHE_ = b; }
double b
Definition: hdecay.h:120
void HcalDbHardcode::setSiPMCharacteristics ( std::vector< edm::ParameterSet vps)
inline

Definition at line 67 of file HcalDbHardcode.h.

References theSiPMCharacteristics_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

67 { theSiPMCharacteristics_ = vps; }
std::vector< edm::ParameterSet > theSiPMCharacteristics_
void HcalDbHardcode::testHEPlan1 ( bool  b)
inline

Definition at line 66 of file HcalDbHardcode.h.

References b, and testHEPlan1_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

66 { testHEPlan1_ = b; }
double b
Definition: hdecay.h:120
void HcalDbHardcode::testHFQIE10 ( bool  b)
inline

Definition at line 65 of file HcalDbHardcode.h.

References b, and testHFQIE10_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

65 { testHFQIE10_ = b; }
double b
Definition: hdecay.h:120
void HcalDbHardcode::useHBUpgrade ( bool  b)
inline

Definition at line 61 of file HcalDbHardcode.h.

References b, and useHBUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

61 { useHBUpgrade_ = b; }
double b
Definition: hdecay.h:120
const bool HcalDbHardcode::useHBUpgrade ( ) const
inline

Definition at line 71 of file HcalDbHardcode.h.

References useHBUpgrade_.

71 { return useHBUpgrade_; }
void HcalDbHardcode::useHEUpgrade ( bool  b)
inline

Definition at line 62 of file HcalDbHardcode.h.

References b, and useHEUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

62 { useHEUpgrade_ = b; }
double b
Definition: hdecay.h:120
const bool HcalDbHardcode::useHEUpgrade ( ) const
inline

Definition at line 72 of file HcalDbHardcode.h.

References useHEUpgrade_.

72 { return useHEUpgrade_; }
void HcalDbHardcode::useHFUpgrade ( bool  b)
inline

Definition at line 64 of file HcalDbHardcode.h.

References b, and useHFUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

64 { useHFUpgrade_ = b; }
double b
Definition: hdecay.h:120
const bool HcalDbHardcode::useHFUpgrade ( ) const
inline

Definition at line 74 of file HcalDbHardcode.h.

References getGainIndex(), getParameters(), and useHFUpgrade_.

74 { return useHFUpgrade_; }
void HcalDbHardcode::useHOUpgrade ( bool  b)
inline

Definition at line 63 of file HcalDbHardcode.h.

References b, and useHOUpgrade_.

Referenced by HcalHardcodeCalibrations::HcalHardcodeCalibrations().

63 { useHOUpgrade_ = b; }
double b
Definition: hdecay.h:120
const bool HcalDbHardcode::useHOUpgrade ( ) const
inline

Definition at line 73 of file HcalDbHardcode.h.

References useHOUpgrade_.

73 { return useHOUpgrade_; }

Member Data Documentation

bool HcalDbHardcode::killHE_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by killHE(), and setKillHE().

bool HcalDbHardcode::setHB_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHB().

bool HcalDbHardcode::setHBUpgrade_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHBUpgrade().

bool HcalDbHardcode::setHE_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHE().

bool HcalDbHardcode::setHEUpgrade_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHEUpgrade().

bool HcalDbHardcode::setHF_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHF().

bool HcalDbHardcode::setHFUpgrade_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHFUpgrade().

bool HcalDbHardcode::setHO_
private

Definition at line 106 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHO().

bool HcalDbHardcode::testHEPlan1_
private

Definition at line 107 of file HcalDbHardcode.h.

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

bool HcalDbHardcode::testHFQIE10_
private

Definition at line 107 of file HcalDbHardcode.h.

Referenced by getParameters(), and testHFQIE10().

HcalHardcodeParameters HcalDbHardcode::theDefaultParameters_
private

Definition at line 103 of file HcalDbHardcode.h.

Referenced by getParameters().

HcalHardcodeParameters HcalDbHardcode::theHBParameters_
private

Definition at line 104 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHB().

HcalHardcodeParameters HcalDbHardcode::theHBUpgradeParameters_
private

Definition at line 105 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHBUpgrade().

HcalHardcodeParameters HcalDbHardcode::theHEParameters_
private

Definition at line 104 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHE().

HcalHardcodeParameters HcalDbHardcode::theHEUpgradeParameters_
private

Definition at line 105 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHEUpgrade().

HcalHardcodeParameters HcalDbHardcode::theHFParameters_
private

Definition at line 104 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHF().

HcalHardcodeParameters HcalDbHardcode::theHFUpgradeParameters_
private

Definition at line 105 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHFUpgrade().

HcalHardcodeParameters HcalDbHardcode::theHOParameters_
private

Definition at line 104 of file HcalDbHardcode.h.

Referenced by getParameters(), and setHO().

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

Definition at line 109 of file HcalDbHardcode.h.

Referenced by getLayersInDepth().

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

Definition at line 108 of file HcalDbHardcode.h.

Referenced by makeHardcodeSiPMCharacteristics(), and setSiPMCharacteristics().

bool HcalDbHardcode::useHBUpgrade_
private

Definition at line 107 of file HcalDbHardcode.h.

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

bool HcalDbHardcode::useHEUpgrade_
private

Definition at line 107 of file HcalDbHardcode.h.

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

bool HcalDbHardcode::useHFUpgrade_
private

Definition at line 107 of file HcalDbHardcode.h.

Referenced by getParameters(), and useHFUpgrade().

bool HcalDbHardcode::useHOUpgrade_
private

Definition at line 107 of file HcalDbHardcode.h.

Referenced by makeHardcodeSiPMParameter(), and useHOUpgrade().