CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
HcalHardcodeCalibrations Class Reference

#include <HcalHardcodeCalibrations.h>

Inheritance diagram for HcalHardcodeCalibrations:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 HcalHardcodeCalibrations (const edm::ParameterSet &)
 
void produce ()
 
 ~HcalHardcodeCalibrations () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Protected Member Functions

std::unique_ptr< HcalChannelQualityproduceChannelQuality (const HcalChannelQualityRcd &rcd)
 
std::unique_ptr< HcalDcsMapproduceDcsMap (const HcalDcsMapRcd &rcd)
 
std::unique_ptr< HcalDcsValuesproduceDcsValues (const HcalDcsRcd &rcd)
 
std::unique_ptr< HcalPedestalsproduceEffectivePedestals (const HcalPedestalsRcd &rcd)
 
std::unique_ptr< HcalPedestalWidthsproduceEffectivePedestalWidths (const HcalPedestalWidthsRcd &rcd)
 
std::unique_ptr< HcalElectronicsMapproduceElectronicsMap (const HcalElectronicsMapRcd &rcd)
 
std::unique_ptr< HcalFlagHFDigiTimeParamsproduceFlagHFDigiTimeParams (const HcalFlagHFDigiTimeParamsRcd &rcd)
 
std::unique_ptr< HcalFrontEndMapproduceFrontEndMap (const HcalFrontEndMapRcd &rcd)
 
std::unique_ptr< HcalGainsproduceGains (const HcalGainsRcd &rcd)
 
std::unique_ptr< HcalGainWidthsproduceGainWidths (const HcalGainWidthsRcd &rcd)
 
std::unique_ptr< HcalL1TriggerObjectsproduceL1TriggerObjects (const HcalL1TriggerObjectsRcd &rcd)
 
std::unique_ptr< HcalLongRecoParamsproduceLongRecoParams (const HcalLongRecoParamsRcd &rcd)
 
std::unique_ptr< HcalLUTCorrsproduceLUTCorrs (const HcalLUTCorrsRcd &rcd)
 
std::unique_ptr< HcalLutMetadataproduceLutMetadata (const HcalLutMetadataRcd &rcd)
 
std::unique_ptr< HcalMCParamsproduceMCParams (const HcalMCParamsRcd &rcd)
 
std::unique_ptr< HcalPedestalsproducePedestals (const HcalPedestalsRcd &rcd)
 
std::unique_ptr< HcalPedestalsproducePedestals_ (const HcalPedestalsRcd &rcd, bool eff)
 
std::unique_ptr< HcalPedestalWidthsproducePedestalWidths (const HcalPedestalWidthsRcd &rcd)
 
std::unique_ptr< HcalPedestalWidthsproducePedestalWidths_ (const HcalPedestalWidthsRcd &rcd, bool eff)
 
std::unique_ptr< HcalPFCorrsproducePFCorrs (const HcalPFCorrsRcd &rcd)
 
std::unique_ptr< HcalQIEDataproduceQIEData (const HcalQIEDataRcd &rcd)
 
std::unique_ptr< HcalQIETypesproduceQIETypes (const HcalQIETypesRcd &rcd)
 
std::unique_ptr< HcalRecoParamsproduceRecoParams (const HcalRecoParamsRcd &rcd)
 
std::unique_ptr< HcalRespCorrsproduceRespCorrs (const HcalRespCorrsRcd &rcd)
 
std::unique_ptr< HcalSiPMCharacteristicsproduceSiPMCharacteristics (const HcalSiPMCharacteristicsRcd &rcd)
 
std::unique_ptr< HcalSiPMParametersproduceSiPMParameters (const HcalSiPMParametersRcd &rcd)
 
std::unique_ptr< HcalTimeCorrsproduceTimeCorrs (const HcalTimeCorrsRcd &rcd)
 
std::unique_ptr< HcalTimingParamsproduceTimingParams (const HcalTimingParamsRcd &rcd)
 
std::unique_ptr< HcalTPChannelParametersproduceTPChannelParameters (const HcalTPChannelParametersRcd &rcd)
 
std::unique_ptr< HcalTPParametersproduceTPParameters (const HcalTPParametersRcd &rcd)
 
std::unique_ptr< HcalValidationCorrsproduceValidationCorrs (const HcalValidationCorrsRcd &rcd)
 
std::unique_ptr< HcalZDCLowGainFractionsproduceZDCLowGainFractions (const HcalZDCLowGainFractionsRcd &rcd)
 
std::unique_ptr< HcalZSThresholdsproduceZSThresholds (const HcalZSThresholdsRcd &rcd)
 
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Attributes

HcalDbHardcode dbHardcode
 
std::unique_ptr< HBHERecalibrationhb_recalibration
 
std::unique_ptr< HBHERecalibrationhe_recalibration
 
std::unique_ptr< HFRecalibrationhf_recalibration
 
double iLumi
 
bool setHBdsegm
 
bool setHEdsegm
 
bool switchGainWidthsForTrigPrims
 
bool useLayer0Weight
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 

Detailed Description

Definition at line 52 of file HcalHardcodeCalibrations.h.

Constructor & Destructor Documentation

HcalHardcodeCalibrations::HcalHardcodeCalibrations ( const edm::ParameterSet iConfig)

Definition at line 128 of file HcalHardcodeCalibrations.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), gather_cfg::cout, dbHardcode, edm::ParameterSet::empty(), edm::ParameterSet::exists(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hb_recalibration, he_recalibration, hf_recalibration, iLumi, summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceDcsMap(), produceDcsValues(), produceEffectivePedestals(), produceEffectivePedestalWidths(), produceElectronicsMap(), produceFlagHFDigiTimeParams(), produceFrontEndMap(), produceGains(), produceGainWidths(), produceL1TriggerObjects(), produceLongRecoParams(), produceLUTCorrs(), produceLutMetadata(), produceMCParams(), producePedestals(), producePedestalWidths(), producePFCorrs(), produceQIEData(), produceQIETypes(), produceRecoParams(), produceRespCorrs(), produceSiPMCharacteristics(), produceSiPMParameters(), produceTimeCorrs(), produceTPChannelParameters(), produceTPParameters(), produceValidationCorrs(), produceZDCLowGainFractions(), produceZSThresholds(), HcalDbHardcode::setHB(), HcalDbHardcode::setHBUpgrade(), HcalDbHardcode::setHE(), HcalDbHardcode::setHEUpgrade(), HcalDbHardcode::setHF(), HcalDbHardcode::setHFUpgrade(), HcalDbHardcode::setHO(), HcalDbHardcode::setKillHE(), HcalDbHardcode::setSiPMCharacteristics(), edm::ESProducer::setWhatProduced(), switchGainWidthsForTrigPrims, HcalDbHardcode::testHEPlan1(), HcalDbHardcode::testHFQIE10(), DBConfiguration_cff::toGet, HcalDbHardcode::useHBUpgrade(), HcalDbHardcode::useHEUpgrade(), HcalDbHardcode::useHFUpgrade(), HcalDbHardcode::useHOUpgrade(), and useLayer0Weight.

128  :
129  hb_recalibration(nullptr), he_recalibration(nullptr), hf_recalibration(nullptr), setHEdsegm(false), setHBdsegm(false)
130 {
131  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
132 
133  if ( iConfig.exists("GainWidthsForTrigPrims") )
134  switchGainWidthsForTrigPrims = iConfig.getParameter<bool>("GainWidthsForTrigPrims");
135  else switchGainWidthsForTrigPrims = false;
136 
137  //DB helper preparation
145  dbHardcode.useHBUpgrade(iConfig.getParameter<bool>("useHBUpgrade"));
146  dbHardcode.useHEUpgrade(iConfig.getParameter<bool>("useHEUpgrade"));
147  dbHardcode.useHFUpgrade(iConfig.getParameter<bool>("useHFUpgrade"));
148  dbHardcode.useHOUpgrade(iConfig.getParameter<bool>("useHOUpgrade"));
149  dbHardcode.testHFQIE10(iConfig.getParameter<bool>("testHFQIE10"));
150  dbHardcode.testHEPlan1(iConfig.getParameter<bool>("testHEPlan1"));
151  dbHardcode.setKillHE(iConfig.getParameter<bool>("killHE"));
152  dbHardcode.setSiPMCharacteristics(iConfig.getParameter<std::vector<edm::ParameterSet>>("SiPMCharacteristics"));
153 
154  useLayer0Weight = iConfig.getParameter<bool>("useLayer0Weight");
155  // HB, HE, HF recalibration preparation
156  iLumi=iConfig.getParameter<double>("iLumi");
157 
158  if( iLumi > 0.0 ) {
159  bool hb_recalib = iConfig.getParameter<bool>("HBRecalibration");
160  bool he_recalib = iConfig.getParameter<bool>("HERecalibration");
161  bool hf_recalib = iConfig.getParameter<bool>("HFRecalibration");
162  if(hb_recalib) {
163  hb_recalibration.reset(
164  new HBHERecalibration(
165  iLumi,
166  iConfig.getParameter<double>("HBreCalibCutoff"),
167  iConfig.getParameter<edm::FileInPath>("HBmeanenergies").fullPath()
168  )
169  );
170  }
171  if(he_recalib) {
172  he_recalibration.reset(
173  new HBHERecalibration(
174  iLumi,
175  iConfig.getParameter<double>("HEreCalibCutoff"),
176  iConfig.getParameter<edm::FileInPath>("HEmeanenergies").fullPath()
177  )
178  );
179  }
180  if(hf_recalib && !iConfig.getParameter<edm::ParameterSet>("HFRecalParameterBlock").empty()) hf_recalibration.reset(new HFRecalibration(iConfig.getParameter<edm::ParameterSet>("HFRecalParameterBlock")));
181 
182 #ifdef DebugLog
183  std::cout << " HcalHardcodeCalibrations: iLumi = " << iLumi << std::endl;
184 #endif
185  }
186 
187  std::vector <std::string> toGet = iConfig.getUntrackedParameter <std::vector <std::string> > ("toGet");
188  for(auto& objectName : toGet){
189  bool all = objectName == "all";
190 #ifdef DebugLog
191  std::cout << "Load parameters for " << objectName << std::endl;
192 #endif
193  if ((objectName == "Pedestals") || all) {
195  findingRecord <HcalPedestalsRcd> ();
196  }
197  if ((objectName == "PedestalWidths") || all) {
199  findingRecord <HcalPedestalWidthsRcd> ();
200  }
201  if ((objectName == "EffectivePedestals") || all) {
203  findingRecord <HcalPedestalsRcd> ();
204  }
205  if ((objectName == "EffectivePedestalWidths") || all) {
207  findingRecord <HcalPedestalWidthsRcd> ();
208  }
209  if ((objectName == "Gains") || all) {
211  findingRecord <HcalGainsRcd> ();
212  }
213  if ((objectName == "GainWidths") || all) {
215  findingRecord <HcalGainWidthsRcd> ();
216  }
217  if ((objectName == "QIEData") || all) {
219  findingRecord <HcalQIEDataRcd> ();
220  }
221  if ((objectName == "QIETypes") || all) {
223  findingRecord <HcalQIETypesRcd> ();
224  }
225  if ((objectName == "ChannelQuality") || (objectName == "channelQuality") || all) {
227  findingRecord <HcalChannelQualityRcd> ();
228  }
229  if ((objectName == "ElectronicsMap") || (objectName == "electronicsMap") || all) {
231  findingRecord <HcalElectronicsMapRcd> ();
232  }
233  if ((objectName == "ZSThresholds") || (objectName == "zsThresholds") || all) {
235  findingRecord <HcalZSThresholdsRcd> ();
236  }
237  if ((objectName == "RespCorrs") || (objectName == "ResponseCorrection") || all) {
239  findingRecord <HcalRespCorrsRcd> ();
240  }
241  if ((objectName == "LUTCorrs") || (objectName == "LUTCorrection") || all) {
243  findingRecord <HcalLUTCorrsRcd> ();
244  }
245  if ((objectName == "PFCorrs") || (objectName == "PFCorrection") || all) {
247  findingRecord <HcalPFCorrsRcd> ();
248  }
249  if ((objectName == "TimeCorrs") || (objectName == "TimeCorrection") || all) {
251  findingRecord <HcalTimeCorrsRcd> ();
252  }
253  if ((objectName == "L1TriggerObjects") || (objectName == "L1Trigger") || all) {
255  findingRecord <HcalL1TriggerObjectsRcd> ();
256  }
257  if ((objectName == "ValidationCorrs") || (objectName == "ValidationCorrection") || all) {
259  findingRecord <HcalValidationCorrsRcd> ();
260  }
261  if ((objectName == "LutMetadata") || (objectName == "lutMetadata") || all) {
263  findingRecord <HcalLutMetadataRcd> ();
264  }
265  if ((objectName == "DcsValues") || all) {
267  findingRecord <HcalDcsRcd> ();
268  }
269  if ((objectName == "DcsMap") || (objectName == "dcsMap") || all) {
271  findingRecord <HcalDcsMapRcd> ();
272  }
273  if ((objectName == "RecoParams") || all) {
275  findingRecord <HcalRecoParamsRcd> ();
276  }
277  if ((objectName == "LongRecoParams") || all) {
279  findingRecord <HcalLongRecoParamsRcd> ();
280  }
281  if ((objectName == "ZDCLowGainFractions") || all) {
283  findingRecord <HcalZDCLowGainFractionsRcd> ();
284  }
285  if ((objectName == "MCParams") || all) {
287  findingRecord <HcalMCParamsRcd> ();
288  }
289  if ((objectName == "FlagHFDigiTimeParams") || all) {
291  findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
292  }
293  if ((objectName == "FrontEndMap") || (objectName == "frontEndMap") || all) {
295  findingRecord <HcalFrontEndMapRcd> ();
296  }
297  if ((objectName == "SiPMParameters") || all) {
299  findingRecord <HcalSiPMParametersRcd> ();
300  }
301  if ((objectName == "SiPMCharacteristics") || all) {
303  findingRecord <HcalSiPMCharacteristicsRcd> ();
304  }
305  if ((objectName == "TPChannelParameters") || all) {
307  findingRecord <HcalTPChannelParametersRcd> ();
308  }
309  if ((objectName == "TPParameters") || all) {
311  findingRecord <HcalTPParametersRcd> ();
312  }
313  }
314 }
std::unique_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
T getParameter(std::string const &) const
bool empty() const
Definition: ParameterSet.h:218
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
void useHBUpgrade(bool b)
std::unique_ptr< HcalPedestalWidths > produceEffectivePedestalWidths(const HcalPedestalWidthsRcd &rcd)
std::unique_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::unique_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
void setHBUpgrade(HcalHardcodeParameters p)
void testHEPlan1(bool b)
std::unique_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
void useHFUpgrade(bool b)
std::unique_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
std::unique_ptr< HcalPedestals > produceEffectivePedestals(const HcalPedestalsRcd &rcd)
std::unique_ptr< HcalSiPMCharacteristics > produceSiPMCharacteristics(const HcalSiPMCharacteristicsRcd &rcd)
std::unique_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
void setHF(HcalHardcodeParameters p)
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::unique_ptr< HcalDcsValues > produceDcsValues(const HcalDcsRcd &rcd)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::unique_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
std::unique_ptr< HFRecalibration > hf_recalibration
std::unique_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::unique_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
void setHO(HcalHardcodeParameters p)
void setHFUpgrade(HcalHardcodeParameters p)
void setHE(HcalHardcodeParameters p)
void setKillHE(bool b)
std::unique_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::unique_ptr< HcalFrontEndMap > produceFrontEndMap(const HcalFrontEndMapRcd &rcd)
std::unique_ptr< HBHERecalibration > hb_recalibration
void useHOUpgrade(bool b)
std::unique_ptr< HcalSiPMParameters > produceSiPMParameters(const HcalSiPMParametersRcd &rcd)
std::unique_ptr< HBHERecalibration > he_recalibration
std::unique_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
void setHB(HcalHardcodeParameters p)
std::unique_ptr< HcalTPParameters > produceTPParameters(const HcalTPParametersRcd &rcd)
std::unique_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
std::unique_ptr< HcalTPChannelParameters > produceTPChannelParameters(const HcalTPChannelParametersRcd &rcd)
std::unique_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
std::unique_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::unique_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
void setSiPMCharacteristics(std::vector< edm::ParameterSet > vps)
std::unique_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
void useHEUpgrade(bool b)
std::unique_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
std::unique_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
std::string fullPath() const
Definition: FileInPath.cc:184
void setHEUpgrade(HcalHardcodeParameters p)
std::unique_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
std::unique_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
void testHFQIE10(bool b)
std::unique_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
HcalHardcodeCalibrations::~HcalHardcodeCalibrations ( )
override

Definition at line 317 of file HcalHardcodeCalibrations.cc.

318 {
319 }

Member Function Documentation

void HcalHardcodeCalibrations::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 908 of file HcalHardcodeCalibrations.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), edm::ParameterSetDescription::addUntracked(), and edm::ParameterSetDescription::addVPSet().

Referenced by produce().

908  {
910  desc.add<double>("iLumi",-1.);
911  desc.add<bool>("HBRecalibration",false);
912  desc.add<double>("HBreCalibCutoff",20.);
913  desc.add<edm::FileInPath>("HBmeanenergies",edm::FileInPath("CalibCalorimetry/HcalPlugins/data/meanenergiesHB.txt"));
914  desc.add<bool>("HERecalibration",false);
915  desc.add<double>("HEreCalibCutoff",20.);
916  desc.add<edm::FileInPath>("HEmeanenergies",edm::FileInPath("CalibCalorimetry/HcalPlugins/data/meanenergiesHE.txt"));
917  desc.add<bool>("HFRecalibration",false);
918  desc.add<bool>("GainWidthsForTrigPrims",false);
919  desc.add<bool>("useHBUpgrade",false);
920  desc.add<bool>("useHEUpgrade",false);
921  desc.add<bool>("useHFUpgrade",false);
922  desc.add<bool>("useHOUpgrade",true);
923  desc.add<bool>("testHFQIE10",false);
924  desc.add<bool>("testHEPlan1",false);
925  desc.add<bool>("killHE",false);
926  desc.add<bool>("useLayer0Weight",false);
927  desc.addUntracked<std::vector<std::string> >("toGet",std::vector<std::string>());
928  desc.addUntracked<bool>("fromDDD",false);
929 
931  desc_hb.add<std::vector<double>>("gain", std::vector<double>({0.19}));
932  desc_hb.add<std::vector<double>>("gainWidth", std::vector<double>({0.0}));
933  desc_hb.add<double>("pedestal", 3.0);
934  desc_hb.add<double>("pedestalWidth", 0.55);
935  desc_hb.add<int>("zsThreshold", 8);
936  desc_hb.add<std::vector<double>>("qieOffset", std::vector<double>({-0.49, 1.8, 7.2, 37.9}));
937  desc_hb.add<std::vector<double>>("qieSlope", std::vector<double>({0.912, 0.917, 0.922, 0.923}));
938  desc_hb.add<int>("qieType", 0);
939  desc_hb.add<int>("mcShape",125);
940  desc_hb.add<int>("recoShape",105);
941  desc_hb.add<double>("photoelectronsToAnalog",0.0);
942  desc_hb.add<std::vector<double>>("darkCurrent",std::vector<double>({0.0}));
943  desc_hb.add<bool>("doRadiationDamage", false);
944  desc.add<edm::ParameterSetDescription>("hb", desc_hb);
945 
946  edm::ParameterSetDescription desc_hbRaddam;
947  desc_hbRaddam.add<double>("temperatureBase",20.0);
948  desc_hbRaddam.add<double>("temperatureNew",-5.0);
949  desc_hbRaddam.add<double>("intlumiOffset",150);
950  desc_hbRaddam.add<double>("depVsTemp",0.0631);
951  desc_hbRaddam.add<double>("intlumiToNeutrons",3.67e8);
952  desc_hbRaddam.add<std::vector<double>>("depVsNeutrons",{5.69e-11,7.90e-11});
953 
954  edm::ParameterSetDescription desc_hbUpgrade;
955  desc_hbUpgrade.add<std::vector<double>>("gain", std::vector<double>({0.00111111111111}));
956  desc_hbUpgrade.add<std::vector<double>>("gainWidth", std::vector<double>({0}));
957  desc_hbUpgrade.add<double>("pedestal", 18.0);
958  desc_hbUpgrade.add<double>("pedestalWidth", 5.0);
959  desc_hbUpgrade.add<int>("zsThreshold", 3);
960  desc_hbUpgrade.add<std::vector<double>>("qieOffset", std::vector<double>({0.0, 0.0, 0.0, 0.0}));
961  desc_hbUpgrade.add<std::vector<double>>("qieSlope", std::vector<double>({0.333, 0.333, 0.333, 0.333}));
962  desc_hbUpgrade.add<int>("qieType", 2);
963  desc_hbUpgrade.add<int>("mcShape",206);
964  desc_hbUpgrade.add<int>("recoShape",206);
965  desc_hbUpgrade.add<double>("photoelectronsToAnalog",57.5);
966  desc_hbUpgrade.add<std::vector<double>>("darkCurrent", std::vector<double>({0.055}));
967  desc_hbUpgrade.add<bool>("doRadiationDamage", true);
968  desc_hbUpgrade.add<edm::ParameterSetDescription>("radiationDamage", desc_hbRaddam);
969  desc.add<edm::ParameterSetDescription>("hbUpgrade", desc_hbUpgrade);
970 
972  desc_he.add<std::vector<double>>("gain", std::vector<double>({0.23}));
973  desc_he.add<std::vector<double>>("gainWidth", std::vector<double>({0}));
974  desc_he.add<double>("pedestal", 3.0);
975  desc_he.add<double>("pedestalWidth", 0.79);
976  desc_he.add<int>("zsThreshold", 9);
977  desc_he.add<std::vector<double>>("qieOffset", std::vector<double>({-0.38, 2.0, 7.6, 39.6}));
978  desc_he.add<std::vector<double>>("qieSlope", std::vector<double>({0.912, 0.916, 0.92, 0.922}));
979  desc_he.add<int>("qieType", 0);
980  desc_he.add<int>("mcShape",125);
981  desc_he.add<int>("recoShape",105);
982  desc_he.add<double>("photoelectronsToAnalog",0.0);
983  desc_he.add<std::vector<double>>("darkCurrent",std::vector<double>({0.0}));
984  desc_he.add<bool>("doRadiationDamage", false);
985  desc.add<edm::ParameterSetDescription>("he", desc_he);
986 
987  edm::ParameterSetDescription desc_heRaddam;
988  desc_heRaddam.add<double>("temperatureBase",20.0);
989  desc_heRaddam.add<double>("temperatureNew",5.0);
990  desc_heRaddam.add<double>("intlumiOffset",75);
991  desc_heRaddam.add<double>("depVsTemp",0.0631);
992  desc_heRaddam.add<double>("intlumiToNeutrons",2.92e8);
993  desc_heRaddam.add<std::vector<double>>("depVsNeutrons",{5.69e-11,7.90e-11});
994 
995  edm::ParameterSetDescription desc_heUpgrade;
996  desc_heUpgrade.add<std::vector<double>>("gain", std::vector<double>({0.00111111111111}));
997  desc_heUpgrade.add<std::vector<double>>("gainWidth", std::vector<double>({0}));
998  desc_heUpgrade.add<double>("pedestal", 18.0);
999  desc_heUpgrade.add<double>("pedestalWidth", 5.0);
1000  desc_heUpgrade.add<int>("zsThreshold", 3);
1001  desc_heUpgrade.add<std::vector<double>>("qieOffset", std::vector<double>({0.0, 0.0, 0.0, 0.0}));
1002  desc_heUpgrade.add<std::vector<double>>("qieSlope", std::vector<double>({0.333, 0.333, 0.333, 0.333}));
1003  desc_heUpgrade.add<int>("qieType", 2);
1004  desc_heUpgrade.add<int>("mcShape",206);
1005  desc_heUpgrade.add<int>("recoShape",206);
1006  desc_heUpgrade.add<double>("photoelectronsToAnalog",57.5);
1007  desc_heUpgrade.add<std::vector<double>>("darkCurrent", std::vector<double>({0.055}));
1008  desc_heUpgrade.add<bool>("doRadiationDamage", true);
1009  desc_heUpgrade.add<edm::ParameterSetDescription>("radiationDamage", desc_heRaddam);
1010  desc.add<edm::ParameterSetDescription>("heUpgrade", desc_heUpgrade);
1011 
1013  desc_hf.add<std::vector<double>>("gain", std::vector<double>({0.14, 0.135}));
1014  desc_hf.add<std::vector<double>>("gainWidth", std::vector<double>({0.0, 0.0}));
1015  desc_hf.add<double>("pedestal", 3.0);
1016  desc_hf.add<double>("pedestalWidth", 0.84);
1017  desc_hf.add<int>("zsThreshold", -9999);
1018  desc_hf.add<std::vector<double>>("qieOffset", std::vector<double>({-0.87, 1.4, 7.8, -29.6}));
1019  desc_hf.add<std::vector<double>>("qieSlope", std::vector<double>({0.359, 0.358, 0.36, 0.367}));
1020  desc_hf.add<int>("qieType", 0);
1021  desc_hf.add<int>("mcShape",301);
1022  desc_hf.add<int>("recoShape",301);
1023  desc_hf.add<double>("photoelectronsToAnalog",0.0);
1024  desc_hf.add<std::vector<double>>("darkCurrent",std::vector<double>({0.0}));
1025  desc_hf.add<bool>("doRadiationDamage", false);
1026  desc.add<edm::ParameterSetDescription>("hf", desc_hf);
1027 
1028  edm::ParameterSetDescription desc_hfUpgrade;
1029  desc_hfUpgrade.add<std::vector<double>>("gain", std::vector<double>({0.14, 0.135}));
1030  desc_hfUpgrade.add<std::vector<double>>("gainWidth", std::vector<double>({0.0, 0.0}));
1031  desc_hfUpgrade.add<double>("pedestal", 13.33);
1032  desc_hfUpgrade.add<double>("pedestalWidth", 3.33);
1033  desc_hfUpgrade.add<int>("zsThreshold", -9999);
1034  desc_hfUpgrade.add<std::vector<double>>("qieOffset", std::vector<double>({0.0697, -0.7405, 12.38, -671.9}));
1035  desc_hfUpgrade.add<std::vector<double>>("qieSlope", std::vector<double>({0.297, 0.298, 0.298, 0.313}));
1036  desc_hfUpgrade.add<int>("qieType", 1);
1037  desc_hfUpgrade.add<int>("mcShape",301);
1038  desc_hfUpgrade.add<int>("recoShape",301);
1039  desc_hfUpgrade.add<double>("photoelectronsToAnalog",0.0);
1040  desc_hfUpgrade.add<std::vector<double>>("darkCurrent",std::vector<double>({0.0}));
1041  desc_hfUpgrade.add<bool>("doRadiationDamage", false);
1042  desc.add<edm::ParameterSetDescription>("hfUpgrade", desc_hfUpgrade);
1043 
1044  edm::ParameterSetDescription desc_hfrecal;
1045  desc_hfrecal.add<std::vector<double>>("HFdepthOneParameterA", std::vector<double>());
1046  desc_hfrecal.add<std::vector<double>>("HFdepthOneParameterB", std::vector<double>());
1047  desc_hfrecal.add<std::vector<double>>("HFdepthTwoParameterA", std::vector<double>());
1048  desc_hfrecal.add<std::vector<double>>("HFdepthTwoParameterB", std::vector<double>());
1049  desc.add<edm::ParameterSetDescription>("HFRecalParameterBlock", desc_hfrecal);
1050 
1052  desc_ho.add<std::vector<double>>("gain", std::vector<double>({0.006, 0.0087}));
1053  desc_ho.add<std::vector<double>>("gainWidth", std::vector<double>({0.0, 0.0}));
1054  desc_ho.add<double>("pedestal", 11.0);
1055  desc_ho.add<double>("pedestalWidth", 0.57);
1056  desc_ho.add<int>("zsThreshold", 24);
1057  desc_ho.add<std::vector<double>>("qieOffset", std::vector<double>({-0.44, 1.4, 7.1, 38.5}));
1058  desc_ho.add<std::vector<double>>("qieSlope", std::vector<double>({0.907, 0.915, 0.92, 0.921}));
1059  desc_ho.add<int>("qieType", 0);
1060  desc_ho.add<int>("mcShape",201);
1061  desc_ho.add<int>("recoShape",201);
1062  desc_ho.add<double>("photoelectronsToAnalog",4.0);
1063  desc_ho.add<std::vector<double>>("darkCurrent",std::vector<double>({0.0}));
1064  desc_ho.add<bool>("doRadiationDamage", false);
1065  desc.add<edm::ParameterSetDescription>("ho", desc_ho);
1066 
1067  edm::ParameterSetDescription validator_sipm;
1068  validator_sipm.add<int>("pixels",1);
1069  validator_sipm.add<double>("crosstalk",0);
1070  validator_sipm.add<double>("nonlin1",1);
1071  validator_sipm.add<double>("nonlin2",0);
1072  validator_sipm.add<double>("nonlin3",0);
1073  std::vector<edm::ParameterSet> default_sipm(1);
1074  desc.addVPSet("SiPMCharacteristics",validator_sipm,default_sipm);
1075 
1076  descriptions.addDefault(desc);
1077 }
void addDefault(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void HcalHardcodeCalibrations::produce ( )
inline
std::unique_ptr< HcalChannelQuality > HcalHardcodeCalibrations::produceChannelQuality ( const HcalChannelQualityRcd rcd)
protected

Definition at line 452 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

452  {
453  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceChannelQuality-> ...";
455  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
456  const HcalTopology* topo=&(*htopo);
457 
458  auto result = std::make_unique<HcalChannelQuality>(topo);
459  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
460  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
461  HcalChannelStatus item(cell->rawId(),0);
462  result->addValues(item);
463  }
464  return result;
465 }
const bool killHE() const
std::unique_ptr< HcalDcsMap > HcalHardcodeCalibrations::produceDcsMap ( const HcalDcsMapRcd rcd)
protected

Definition at line 726 of file HcalHardcodeCalibrations.cc.

References dbHardcode, and HcalDbHardcode::makeHardcodeDcsMap().

Referenced by HcalHardcodeCalibrations(), and produce().

726  {
727  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsMap-> ...";
728 
730 }
std::unique_ptr< HcalDcsMap > makeHardcodeDcsMap() const
std::unique_ptr< HcalDcsValues > HcalHardcodeCalibrations::produceDcsValues ( const HcalDcsRcd rcd)
protected

Definition at line 720 of file HcalHardcodeCalibrations.cc.

References mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

720  {
721  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsValues-> ...";
722  auto result = std::make_unique<HcalDcsValues>();
723  return result;
724 }
std::unique_ptr< HcalPedestals > HcalHardcodeCalibrations::produceEffectivePedestals ( const HcalPedestalsRcd rcd)
protected

Definition at line 367 of file HcalHardcodeCalibrations.cc.

References producePedestals_().

Referenced by HcalHardcodeCalibrations(), and produce().

367  {
368  return producePedestals_(rec,true);
369 }
std::unique_ptr< HcalPedestals > producePedestals_(const HcalPedestalsRcd &rcd, bool eff)
std::unique_ptr< HcalPedestalWidths > HcalHardcodeCalibrations::produceEffectivePedestalWidths ( const HcalPedestalWidthsRcd rcd)
protected

Definition at line 375 of file HcalHardcodeCalibrations.cc.

References producePedestalWidths_().

Referenced by HcalHardcodeCalibrations(), and produce().

375  {
376  return producePedestalWidths_(rec,true);
377 }
std::unique_ptr< HcalPedestalWidths > producePedestalWidths_(const HcalPedestalWidthsRcd &rcd, bool eff)
std::unique_ptr< HcalElectronicsMap > HcalHardcodeCalibrations::produceElectronicsMap ( const HcalElectronicsMapRcd rcd)
protected

Definition at line 626 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and HcalDbHardcode::makeHardcodeMap().

Referenced by HcalHardcodeCalibrations(), and produce().

626  {
627  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceElectronicsMap-> ...";
629  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
630  const HcalTopology* topo=&(*htopo);
631 
632  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
633  return dbHardcode.makeHardcodeMap(cells);
634 }
const bool killHE() const
std::unique_ptr< HcalElectronicsMap > makeHardcodeMap(const std::vector< HcalGenericDetId > &cells) const
std::unique_ptr< HcalFlagHFDigiTimeParams > HcalHardcodeCalibrations::produceFlagHFDigiTimeParams ( const HcalFlagHFDigiTimeParamsRcd rcd)
protected

Definition at line 824 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

824  {
825  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
827  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
828  const HcalTopology* topo=&(*htopo);
829 
830  auto result = std::make_unique<HcalFlagHFDigiTimeParams>(topo);
831  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
832 
833  std::vector<double> coef;
834  coef.push_back(0.93);
835  coef.push_back(-0.38275);
836  coef.push_back(-0.012667);
837 
838  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
839  HcalFlagHFDigiTimeParam item(cell->rawId(),
840  1, //firstsample
841  3, // samplestoadd
842  2, //expectedpeak
843  40., // min energy threshold
844  coef // coefficients
845  );
846  result->addValues(item);
847  }
848  return result;
849 }
const bool killHE() const
std::unique_ptr< HcalFrontEndMap > HcalHardcodeCalibrations::produceFrontEndMap ( const HcalFrontEndMapRcd rcd)
protected

Definition at line 852 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and HcalDbHardcode::makeHardcodeFrontEndMap().

Referenced by HcalHardcodeCalibrations(), and produce().

852  {
853  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceFrontEndMap-> ...";
855  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
856  const HcalTopology* topo=&(*htopo);
857  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
858 
859  return dbHardcode.makeHardcodeFrontEndMap(cells);
860 }
const bool killHE() const
void makeHardcodeFrontEndMap(HcalFrontEndMap &emap, const std::vector< HcalGenericDetId > &cells) const
std::unique_ptr< HcalGains > HcalHardcodeCalibrations::produceGains ( const HcalGainsRcd rcd)
protected

Definition at line 379 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeGain(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

379  {
380  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGains-> ...";
382  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
383  const HcalTopology* topo=&(*htopo);
384 
385  auto result = std::make_unique<HcalGains>(topo);
386  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
387  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
388  HcalGain item = dbHardcode.makeGain (*cell);
389  result->addValues(item);
390  }
391  return result;
392 }
const bool killHE() const
HcalGain makeGain(HcalGenericDetId fId, bool fSmear=false) const
std::unique_ptr< HcalGainWidths > HcalHardcodeCalibrations::produceGainWidths ( const HcalGainWidthsRcd rcd)
protected

Definition at line 394 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeGainWidth(), mps_fire::result, and switchGainWidthsForTrigPrims.

Referenced by HcalHardcodeCalibrations(), and produce().

394  {
395  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGainWidths-> ...";
397  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
398  const HcalTopology* topo=&(*htopo);
399 
400  auto result = std::make_unique<HcalGainWidths>(topo);
401  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
402  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
403 
404  // for Upgrade - include TrigPrims, for regular case - only HcalDetId
406  HcalGainWidth item = dbHardcode.makeGainWidth (*cell);
407  result->addValues(item);
408  } else if (!cell->isHcalTrigTowerDetId()) {
409  HcalGainWidth item = dbHardcode.makeGainWidth (*cell);
410  result->addValues(item);
411  }
412  }
413  return result;
414 }
const bool killHE() const
HcalGainWidth makeGainWidth(HcalGenericDetId fId) const
std::unique_ptr< HcalL1TriggerObjects > HcalHardcodeCalibrations::produceL1TriggerObjects ( const HcalL1TriggerObjectsRcd rcd)
protected

Definition at line 607 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

607  {
608  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
610  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
611  const HcalTopology* topo=&(*htopo);
612 
613  auto result = std::make_unique<HcalL1TriggerObjects>(topo);
614  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
615  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
616  HcalL1TriggerObject item(cell->rawId(),0., 1., 0);
617  result->addValues(item);
618  }
619  // add tag and algo values
620  result->setTagString("hardcoded");
621  result->setAlgoString("hardcoded");
622  return result;
623 }
const bool killHE() const
std::unique_ptr< HcalLongRecoParams > HcalHardcodeCalibrations::produceLongRecoParams ( const HcalLongRecoParamsRcd rcd)
protected

Definition at line 762 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

762  {
763  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLongRecoParams-> ...";
765  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
766  const HcalTopology* topo=&(*htopo);
767 
768  auto result = std::make_unique<HcalLongRecoParams>(topo);
769  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
770  std::vector <unsigned int> mSignal;
771  mSignal.push_back(4);
772  mSignal.push_back(5);
773  mSignal.push_back(6);
774  std::vector <unsigned int> mNoise;
775  mNoise.push_back(1);
776  mNoise.push_back(2);
777  mNoise.push_back(3);
778  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
779  if (cell->isHcalZDCDetId())
780  {
781  HcalLongRecoParam item(cell->rawId(),mSignal,mNoise);
782  result->addValues(item);
783  }
784  }
785  return result;
786 }
const bool killHE() const
std::unique_ptr< HcalLUTCorrs > HcalHardcodeCalibrations::produceLUTCorrs ( const HcalLUTCorrsRcd rcd)
protected

Definition at line 546 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

546  {
547  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLUTCorrs-> ...";
549  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
550  const HcalTopology* topo=&(*htopo);
551 
552  auto result = std::make_unique<HcalLUTCorrs>(topo);
553  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
554  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
555  HcalLUTCorr item(cell->rawId(),1.0);
556  result->addValues(item);
557  }
558  return result;
559 }
const bool killHE() const
std::unique_ptr< HcalLutMetadata > HcalHardcodeCalibrations::produceLutMetadata ( const HcalLutMetadataRcd rcd)
protected

Definition at line 651 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, triggerObjects_cff::id, HcalDbHardcode::killHE(), or, mps_fire::result, electronIdCutBased_cfi::threshold, HcalDbHardcode::useHEUpgrade(), and HcalDbHardcode::useHFUpgrade().

Referenced by HcalHardcodeCalibrations(), and produce().

651  {
652  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLutMetadata-> ...";
654  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
655  const HcalTopology* topo=&(*htopo);
656 
657  auto result = std::make_unique<HcalLutMetadata>(topo);
658 
659  result->setRctLsb( 0.5 );
660  result->setNominalGain(0.177); // for HBHE SiPMs
661 
662  std::vector <HcalGenericDetId> cells = allCells(*topo,dbHardcode.killHE());
663  for (const auto& cell: cells) {
664  float rcalib = 1.;
665  int granularity = 1;
666  int threshold = 0;
667 
669  // Use values from 2016 as starting conditions for 2017+. These are
670  // averaged over the subdetectors, with the last two HE towers split
671  // off due to diverging correction values.
672  switch (cell.genericSubdet()) {
674  rcalib = 1.128;
675  break;
677  {
678  HcalDetId id(cell);
679  if (id.ietaAbs() >= 28)
680  rcalib = 1.188;
681  else
682  rcalib = 1.117;
683  // granularity is equal to 1 only for |ieta| == 17
684  if(id.ietaAbs() >= 18 && id.ietaAbs() <= 26) granularity = 2;
685  else if(id.ietaAbs() >=27 && id.ietaAbs() <= 29) granularity = 5;
686  }
687  break;
689  rcalib = 1.02;
690  break;
691  default:
692  break;
693  }
694 
695  if (cell.isHcalTrigTowerDetId()) {
696  rcalib = 0.;
697  HcalTrigTowerDetId id(cell);
698  if(id.ietaAbs() <= 17) {
699  granularity = 1;
700  }
701  else if(id.ietaAbs() >= 18 && id.ietaAbs() <= 26) {
702  granularity = 2;
703  }
704  else if(id.ietaAbs() >= 27 && id.ietaAbs() <= 28) {
705  granularity = 5;
706  }
707  else {
708  granularity = 0;
709  }
710  }
711  }
712 
713  HcalLutMetadatum item(cell.rawId(), rcalib, granularity, threshold);
714  result->addValues(item);
715  }
716 
717  return result;
718 }
const bool killHE() const
void useHFUpgrade(bool b)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
void useHEUpgrade(bool b)
std::unique_ptr< HcalMCParams > HcalHardcodeCalibrations::produceMCParams ( const HcalMCParamsRcd rcd)
protected

Definition at line 803 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeMCParam(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

803  {
804 
805 
806  // std::cout << std::endl << " .... HcalHardcodeCalibrations::produceMCParams ->"<< std::endl;
807 
808  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceMCParams-> ...";
810  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
811  const HcalTopology* topo=&(*htopo);
812  auto result = std::make_unique<HcalMCParams>(topo);
813  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
814  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
815 
816  // HcalMCParam item(cell->rawId(),0);
817  HcalMCParam item = dbHardcode.makeMCParam (*cell);
818  result->addValues(item);
819  }
820  return result;
821 }
HcalMCParam makeMCParam(HcalGenericDetId fId) const
const bool killHE() const
std::unique_ptr< HcalPedestals > HcalHardcodeCalibrations::producePedestals ( const HcalPedestalsRcd rcd)
protected

Definition at line 363 of file HcalHardcodeCalibrations.cc.

References producePedestals_().

Referenced by HcalHardcodeCalibrations(), and produce().

363  {
364  return producePedestals_(rec,false);
365 }
std::unique_ptr< HcalPedestals > producePedestals_(const HcalPedestalsRcd &rcd, bool eff)
std::unique_ptr< HcalPedestals > HcalHardcodeCalibrations::producePedestals_ ( const HcalPedestalsRcd rcd,
bool  eff 
)
protected

Definition at line 331 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), iLumi, HcalDbHardcode::killHE(), HcalDbHardcode::makePedestal(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce(), produceEffectivePedestals(), and producePedestals().

331  {
332  std::string seff = eff ? "Effective" : "";
333  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produce" << seff << "Pedestals-> ...";
335  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
336  const HcalTopology* topo=&(*htopo);
337 
338  auto result = std::make_unique<HcalPedestals>(topo,false);
339  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
340  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
341  HcalPedestal item = dbHardcode.makePedestal (*cell, false, eff, topo, iLumi);
342  result->addValues(item);
343  }
344  return result;
345 }
const bool killHE() const
HcalPedestal makePedestal(HcalGenericDetId fId, bool fSmear, bool eff, const HcalTopology *topo, double intlumi)
std::unique_ptr< HcalPedestalWidths > HcalHardcodeCalibrations::producePedestalWidths ( const HcalPedestalWidthsRcd rcd)
protected

Definition at line 371 of file HcalHardcodeCalibrations.cc.

References producePedestalWidths_().

Referenced by HcalHardcodeCalibrations(), and produce().

371  {
372  return producePedestalWidths_(rec,false);
373 }
std::unique_ptr< HcalPedestalWidths > producePedestalWidths_(const HcalPedestalWidthsRcd &rcd, bool eff)
std::unique_ptr< HcalPedestalWidths > HcalHardcodeCalibrations::producePedestalWidths_ ( const HcalPedestalWidthsRcd rcd,
bool  eff 
)
protected

Definition at line 347 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), iLumi, HcalDbHardcode::killHE(), HcalDbHardcode::makePedestalWidth(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce(), produceEffectivePedestalWidths(), and producePedestalWidths().

347  {
348  std::string seff = eff ? "Effective" : "";
349  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produce" << seff << "PedestalWidths-> ...";
351  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
352  const HcalTopology* topo=&(*htopo);
353 
354  auto result = std::make_unique<HcalPedestalWidths>(topo,false);
355  std::vector <HcalGenericDetId> cells = allCells(*htopo, dbHardcode.killHE());
356  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
357  HcalPedestalWidth item = dbHardcode.makePedestalWidth (*cell, eff, topo, iLumi);
358  result->addValues(item);
359  }
360  return result;
361 }
const bool killHE() const
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId, bool eff, const HcalTopology *topo, double intlumi)
std::unique_ptr< HcalPFCorrs > HcalHardcodeCalibrations::producePFCorrs ( const HcalPFCorrsRcd rcd)
protected

Definition at line 561 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

561  {
562  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePFCorrs-> ...";
564  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
565  const HcalTopology* topo=&(*htopo);
566 
567  auto result = std::make_unique<HcalPFCorrs>(topo);
568  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
569  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
570  HcalPFCorr item(cell->rawId(),1.0);
571  result->addValues(item);
572  }
573  return result;
574 }
const bool killHE() const
std::unique_ptr< HcalQIEData > HcalHardcodeCalibrations::produceQIEData ( const HcalQIEDataRcd rcd)
protected

Definition at line 416 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeQIECoder(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

416  {
417  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceQIEData-> ...";
418 
419  /*
420  std::cout << std::endl << ">>> HcalHardcodeCalibrations::produceQIEData"
421  << std::endl;
422  */
423 
425  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
426  const HcalTopology* topo=&(*htopo);
427 
428  auto result = std::make_unique<HcalQIEData>(topo);
429  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
430  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
431  HcalQIECoder coder = dbHardcode.makeQIECoder (*cell);
432  result->addCoder (coder);
433  }
434  return result;
435 }
const bool killHE() const
HcalQIECoder makeQIECoder(HcalGenericDetId fId) const
std::unique_ptr< HcalQIETypes > HcalHardcodeCalibrations::produceQIETypes ( const HcalQIETypesRcd rcd)
protected

Definition at line 437 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeQIEType(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

437  {
438  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceQIETypes-> ...";
440  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
441  const HcalTopology* topo=&(*htopo);
442 
443  auto result = std::make_unique<HcalQIETypes>(topo);
444  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
445  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
446  HcalQIEType item = dbHardcode.makeQIEType(*cell);
447  result->addValues(item);
448  }
449  return result;
450 }
const bool killHE() const
HcalQIEType makeQIEType(HcalGenericDetId fId) const
std::unique_ptr< HcalRecoParams > HcalHardcodeCalibrations::produceRecoParams ( const HcalRecoParamsRcd rcd)
protected

Definition at line 732 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeRecoParam(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

732  {
733  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRecoParams-> ...";
735  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
736  const HcalTopology* topo=&(*htopo);
737 
738  auto result = std::make_unique<HcalRecoParams>(topo);
739  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
740  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
741  HcalRecoParam item = dbHardcode.makeRecoParam (*cell);
742  result->addValues(item);
743  }
744  return result;
745 }
const bool killHE() const
HcalRecoParam makeRecoParam(HcalGenericDetId fId) const
std::unique_ptr< HcalRespCorrs > HcalHardcodeCalibrations::produceRespCorrs ( const HcalRespCorrsRcd rcd)
protected

Definition at line 468 of file HcalHardcodeCalibrations.cc.

References corr, gather_cfg::cout, dbHardcode, particleFlowClusterECALTimeSelected_cfi::depth, HcalDetId::depth(), HcalTopology::getDepthSegmentation(), HcalDbHardcode::getLayersInDepth(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), hb_recalibration, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, he_recalibration, hf_recalibration, mps_fire::i, HcalDetId::ieta(), iLumi, HcalDbHardcode::killHE(), HcalTopology::lastHERing(), maxEta, mps_fire::result, setHBdsegm, setHEdsegm, and useLayer0Weight.

Referenced by HcalHardcodeCalibrations(), and produce().

468  {
469  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRespCorrs-> ...";
471  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
472  const HcalTopology* topo=&(*htopo);
473 
474  //set depth segmentation for HB/HE recalib - only happens once
476  std::vector<std::vector<int>> m_segmentation;
477  int maxEta = topo->lastHERing();
478  m_segmentation.resize(maxEta);
479  for (int i = 0; i < maxEta; i++) {
480  topo->getDepthSegmentation(i+1,m_segmentation[i]);
481  }
484  rcd.getRecord<HBHEDarkeningRecord>().get("HE",hdark);
485  he_recalibration->setup(m_segmentation,&*hdark);
486  setHEdsegm = true;
487  }
490  rcd.getRecord<HBHEDarkeningRecord>().get("HB",hdark);
491  hb_recalibration->setup(m_segmentation,&*hdark);
492  setHBdsegm = true;
493  }
494  }
495 
496  auto result = std::make_unique<HcalRespCorrs>(topo);
497  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
498  for (const auto& cell : cells) {
499 
500  double corr = 1.0;
501 
502  //check for layer 0 reweighting: when depth 1 has only one layer, it is layer 0
503  if( useLayer0Weight &&
504  ((cell.genericSubdet() == HcalGenericDetId::HcalGenEndcap) || (cell.genericSubdet() == HcalGenericDetId::HcalGenBarrel)) &&
505  (HcalDetId(cell).depth()==1 && dbHardcode.getLayersInDepth(HcalDetId(cell).ietaAbs(),HcalDetId(cell).depth(),topo)==1) )
506  {
507  //layer 0 is thicker than other layers (9mm vs 3.7mm) and brighter (Bicron vs SCSN81)
508  //in Run1/Run2 (pre-2017 for HE), ODU for layer 0 had neutral density filter attached
509  //NDF was simulated as weight of 0.5 applied to Geant energy deposits
510  //for Phase1, NDF is removed - simulated as weight of 1.2 applied to Geant energy deposits
511  //to maintain RECO calibrations, move the layer 0 energy scale back to its previous state using respcorrs
512  corr = 0.5/1.2;
513  }
514 
515  if ((hb_recalibration != nullptr ) && (cell.genericSubdet() == HcalGenericDetId::HcalGenBarrel)) {
516  int depth_ = HcalDetId(cell).depth();
517  int ieta_ = HcalDetId(cell).ieta();
518  corr *= hb_recalibration->getCorr(ieta_, depth_);
519 #ifdef DebugLog
520  std::cout << "HB ieta, depth = " << ieta_ << ", " << depth_ << " corr = " << corr << std::endl;
521 #endif
522  }
523  else if ((he_recalibration != nullptr ) && (cell.genericSubdet() == HcalGenericDetId::HcalGenEndcap)) {
524  int depth_ = HcalDetId(cell).depth();
525  int ieta_ = HcalDetId(cell).ieta();
526  corr *= he_recalibration->getCorr(ieta_, depth_);
527 #ifdef DebugLog
528  std::cout << "HE ieta, depth = " << ieta_ << ", " << depth_ << " corr = " << corr << std::endl;
529 #endif
530  }
531  else if ((hf_recalibration != nullptr ) && (cell.genericSubdet() == HcalGenericDetId::HcalGenForward)) {
532  int depth_ = HcalDetId(cell).depth();
533  int ieta_ = HcalDetId(cell).ieta();
534  corr = hf_recalibration->getCorr(ieta_, depth_, iLumi);
535 #ifdef DebugLog
536  std::cout << "HF ieta, depth = " << ieta_ << ", " << depth_ << " corr = " << corr << std::endl;
537 #endif
538  }
539 
540  HcalRespCorr item(cell.rawId(),corr);
541  result->addValues(item);
542  }
543  return result;
544 }
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
const bool killHE() const
double maxEta
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
std::unique_ptr< HFRecalibration > hf_recalibration
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
std::unique_ptr< HBHERecalibration > hb_recalibration
std::unique_ptr< HBHERecalibration > he_recalibration
JetCorrectorParameters corr
Definition: classes.h:5
int getLayersInDepth(int ieta, int depth, const HcalTopology *topo)
int lastHERing() const
Definition: HcalTopology.h:90
std::unique_ptr< HcalSiPMCharacteristics > HcalHardcodeCalibrations::produceSiPMCharacteristics ( const HcalSiPMCharacteristicsRcd rcd)
protected

Definition at line 878 of file HcalHardcodeCalibrations.cc.

References dbHardcode, and HcalDbHardcode::makeHardcodeSiPMCharacteristics().

Referenced by HcalHardcodeCalibrations(), and produce().

878  {
879  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceSiPMCharacteristics-> ...";
880 
882 }
std::unique_ptr< HcalSiPMCharacteristics > makeHardcodeSiPMCharacteristics() const
std::unique_ptr< HcalSiPMParameters > HcalHardcodeCalibrations::produceSiPMParameters ( const HcalSiPMParametersRcd rcd)
protected

Definition at line 863 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), iLumi, HcalDbHardcode::killHE(), HcalDbHardcode::makeHardcodeSiPMParameter(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

863  {
864  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceSiPMParameters-> ...";
866  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
867  const HcalTopology* topo=&(*htopo);
868 
869  auto result = std::make_unique<HcalSiPMParameters>(topo);
870  std::vector <HcalGenericDetId> cells = allCells(*htopo, dbHardcode.killHE());
871  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
873  result->addValues(item);
874  }
875  return result;
876 }
const bool killHE() const
HcalSiPMParameter makeHardcodeSiPMParameter(HcalGenericDetId fId, const HcalTopology *topo, double intlumi)
std::unique_ptr< HcalTimeCorrs > HcalHardcodeCalibrations::produceTimeCorrs ( const HcalTimeCorrsRcd rcd)
protected

Definition at line 576 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

576  {
577  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimeCorrs-> ...";
579  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
580  const HcalTopology* topo=&(*htopo);
581 
582  auto result = std::make_unique<HcalTimeCorrs>(topo);
583  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
584  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
585  HcalTimeCorr item(cell->rawId(),0.0);
586  result->addValues(item);
587  }
588  return result;
589 }
const bool killHE() const
std::unique_ptr< HcalTimingParams > HcalHardcodeCalibrations::produceTimingParams ( const HcalTimingParamsRcd rcd)
protected

Definition at line 747 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeTimingParam(), and mps_fire::result.

Referenced by produce().

747  {
748  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimingParams-> ...";
750  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
751  const HcalTopology* topo=&(*htopo);
752 
753  auto result = std::make_unique<HcalTimingParams>(topo);
754  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
755  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
757  result->addValues(item);
758  }
759  return result;
760 }
const bool killHE() const
HcalTimingParam makeTimingParam(HcalGenericDetId fId) const
std::unique_ptr< HcalTPChannelParameters > HcalHardcodeCalibrations::produceTPChannelParameters ( const HcalTPChannelParametersRcd rcd)
protected

Definition at line 885 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeHardcodeTPChannelParameter(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

885  {
886  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTPChannelParameters-> ...";
888  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
889  const HcalTopology* topo=&(*htopo);
890 
891  auto result = std::make_unique<HcalTPChannelParameters>(topo);
892  std::vector <HcalGenericDetId> cells = allCells(*htopo, dbHardcode.killHE());
893  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
895  result->addValues(item);
896  }
897  return result;
898 }
const bool killHE() const
HcalTPChannelParameter makeHardcodeTPChannelParameter(HcalGenericDetId fId) const
std::unique_ptr< HcalTPParameters > HcalHardcodeCalibrations::produceTPParameters ( const HcalTPParametersRcd rcd)
protected

Definition at line 900 of file HcalHardcodeCalibrations.cc.

References dbHardcode, HcalDbHardcode::makeHardcodeTPParameters(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

900  {
901  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTPParameters-> ...";
902 
903  auto result = std::make_unique<HcalTPParameters>();
905  return result;
906 }
void makeHardcodeTPParameters(HcalTPParameters &tppar) const
std::unique_ptr< HcalValidationCorrs > HcalHardcodeCalibrations::produceValidationCorrs ( const HcalValidationCorrsRcd rcd)
protected

Definition at line 636 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

636  {
637  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceValidationCorrs-> ...";
639  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
640  const HcalTopology* topo=&(*htopo);
641 
642  auto result = std::make_unique<HcalValidationCorrs>(topo);
643  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
644  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
645  HcalValidationCorr item(cell->rawId(),1.0);
646  result->addValues(item);
647  }
648  return result;
649 }
const bool killHE() const
std::unique_ptr< HcalZDCLowGainFractions > HcalHardcodeCalibrations::produceZDCLowGainFractions ( const HcalZDCLowGainFractionsRcd rcd)
protected

Definition at line 788 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

788  {
789  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
791  rec.getRecord<HcalRecNumberingRecord>().get(htopo);
792  const HcalTopology* topo=&(*htopo);
793 
794  auto result = std::make_unique<HcalZDCLowGainFractions>(topo);
795  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
796  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
797  HcalZDCLowGainFraction item(cell->rawId(),0.0);
798  result->addValues(item);
799  }
800  return result;
801 }
const bool killHE() const
std::unique_ptr< HcalZSThresholds > HcalHardcodeCalibrations::produceZSThresholds ( const HcalZSThresholdsRcd rcd)
protected

Definition at line 591 of file HcalHardcodeCalibrations.cc.

References dbHardcode, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::killHE(), HcalDbHardcode::makeZSThreshold(), and mps_fire::result.

Referenced by HcalHardcodeCalibrations(), and produce().

591  {
592  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceZSThresholds-> ...";
594  rcd.getRecord<HcalRecNumberingRecord>().get(htopo);
595  const HcalTopology* topo=&(*htopo);
596 
597  auto result = std::make_unique<HcalZSThresholds>(topo);
598  std::vector <HcalGenericDetId> cells = allCells(*topo, dbHardcode.killHE());
599  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
601  result->addValues(item);
602  }
603  return result;
604 }
const bool killHE() const
HcalZSThreshold makeZSThreshold(HcalGenericDetId fId) const
void HcalHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 325 of file HcalHardcodeCalibrations.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), edm::IOVSyncValue::eventID(), edm::eventsetup::EventSetupRecordKey::name(), record, AlCaHLTBitMon_QueryRunRegistry::string, edm::IOVSyncValue::time(), and edm::Timestamp::value().

Referenced by produce().

325  {
326  std::string record = iKey.name ();
327  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::setIntervalFor-> key: " << record << " time: " << iTime.eventID() << '/' << iTime.time ().value ();
329 }
const EventID & eventID() const
Definition: IOVSyncValue.h:42
JetCorrectorParameters::Record record
Definition: classes.h:7
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()
const Timestamp & time() const
Definition: IOVSyncValue.h:44
TimeValue_t value() const
Definition: Timestamp.h:56

Member Data Documentation

HcalDbHardcode HcalHardcodeCalibrations::dbHardcode
private
std::unique_ptr<HBHERecalibration> HcalHardcodeCalibrations::hb_recalibration
private

Definition at line 109 of file HcalHardcodeCalibrations.h.

Referenced by HcalHardcodeCalibrations(), and produceRespCorrs().

std::unique_ptr<HBHERecalibration> HcalHardcodeCalibrations::he_recalibration
private

Definition at line 110 of file HcalHardcodeCalibrations.h.

Referenced by HcalHardcodeCalibrations(), and produceRespCorrs().

std::unique_ptr<HFRecalibration> HcalHardcodeCalibrations::hf_recalibration
private

Definition at line 111 of file HcalHardcodeCalibrations.h.

Referenced by HcalHardcodeCalibrations(), and produceRespCorrs().

double HcalHardcodeCalibrations::iLumi
private
bool HcalHardcodeCalibrations::setHBdsegm
private

Definition at line 114 of file HcalHardcodeCalibrations.h.

Referenced by produceRespCorrs().

bool HcalHardcodeCalibrations::setHEdsegm
private

Definition at line 113 of file HcalHardcodeCalibrations.h.

Referenced by produceRespCorrs().

bool HcalHardcodeCalibrations::switchGainWidthsForTrigPrims
private

Definition at line 112 of file HcalHardcodeCalibrations.h.

Referenced by HcalHardcodeCalibrations(), and produceGainWidths().

bool HcalHardcodeCalibrations::useLayer0Weight
private

Definition at line 115 of file HcalHardcodeCalibrations.h.

Referenced by HcalHardcodeCalibrations(), and produceRespCorrs().