33 std::vector<HcalGenericDetId> allCells (
const HcalTopology& hcaltopology) {
34 static std::vector<HcalGenericDetId>
result;
43 if (result.size () <= 0) {
46 for (
int depth = 1; depth < maxDepthHB + maxDepthHE; depth++) {
47 for (
int det = 1; det < 5; det++) {
49 if (hcaltopology.
valid(cell)) result.push_back (cell);
64 for(
int depth= 1; depth < 6; depth++){
66 if(zdctopology.
valid(zcell)) result.push_back(zcell);
68 if(zdctopology.
valid(zcell)) result.push_back(zcell);
71 for(
int depth= 1; depth < 5; depth++){
73 if(zdctopology.
valid(zcell)) result.push_back(zcell);
75 if(zdctopology.
valid(zcell)) result.push_back(zcell);
78 for(
int depth= 1; depth < 3; depth++){
80 if(zdctopology.
valid(zcell)) result.push_back(zcell);
82 if(zdctopology.
valid(zcell)) result.push_back(zcell);
94 result.push_back (cell);
98 for (
int phi = 1;
phi <= 69;) {
100 result.push_back (cell);
113 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
115 if ( iConfig.
exists(
"GainWidthsForTrigPrims") )
122 if ( iConfig.
exists(
"iLumi") )
126 bool he_recalib = iConfig.
getParameter<
bool>(
"HERecalibration");
127 bool hf_recalib = iConfig.
getParameter<
bool>(
"HFRecalibration");
136 if ( iConfig.
exists(
"HcalReLabel") ) {
142 std::vector<std::vector<int>> m_segmentation;
143 m_segmentation.resize(29);
145 for (
int i = 0;
i < 29;
i++) {
147 snprintf(name,10,
"Eta%d",
i+1);
174 findingRecord <HcalPedestalsRcd> ();
178 findingRecord <HcalPedestalWidthsRcd> ();
182 findingRecord <HcalGainsRcd> ();
186 findingRecord <HcalGainWidthsRcd> ();
190 findingRecord <HcalQIEDataRcd> ();
194 findingRecord <HcalChannelQualityRcd> ();
198 findingRecord <HcalElectronicsMapRcd> ();
202 findingRecord <HcalZSThresholdsRcd> ();
206 findingRecord <HcalRespCorrsRcd> ();
210 findingRecord <HcalLUTCorrsRcd> ();
214 findingRecord <HcalPFCorrsRcd> ();
218 findingRecord <HcalTimeCorrsRcd> ();
222 findingRecord <HcalL1TriggerObjectsRcd> ();
226 findingRecord <HcalValidationCorrsRcd> ();
230 findingRecord <HcalLutMetadataRcd> ();
234 findingRecord <HcalDcsRcd> ();
238 findingRecord <HcalDcsMapRcd> ();
242 findingRecord <HcalRecoParamsRcd> ();
246 findingRecord <HcalLongRecoParamsRcd> ();
250 findingRecord <HcalMCParamsRcd> ();
254 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
258 findingRecord <HcalCholeskyMatricesRcd> ();
262 findingRecord <HcalCovarianceMatricesRcd> ();
280 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
285 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
291 std::vector <HcalGenericDetId> cells = allCells(*topo);
292 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
294 result->addValues(item);
300 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
306 std::vector <HcalGenericDetId> cells = allCells(*htopo);
307 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
309 result->addValues(item);
315 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
321 std::vector <HcalGenericDetId> cells = allCells(*topo);
322 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
324 result->addValues(item);
330 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGainWidths-> ...";
336 std::vector <HcalGenericDetId> cells = allCells(*topo);
337 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
342 result->addValues(item);
343 }
else if (!cell->isHcalTrigTowerDetId()) {
345 result->addValues(item);
352 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
364 std::vector <HcalGenericDetId> cells = allCells(*topo);
365 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
367 result->addCoder (coder);
373 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceChannelQuality-> ...";
379 std::vector <HcalGenericDetId> cells = allCells(*topo);
380 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
382 result->addValues(item);
389 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRespCorrs-> ...";
395 std::vector <HcalGenericDetId> cells = allCells(*topo);
396 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
427 result->addValues(item);
433 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
439 std::vector <HcalGenericDetId> cells = allCells(*topo);
440 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
442 result->addValues(item);
448 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePFCorrs-> ...";
454 std::vector <HcalGenericDetId> cells = allCells(*topo);
455 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
457 result->addValues(item);
463 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimeCorrs-> ...";
469 std::vector <HcalGenericDetId> cells = allCells(*topo);
470 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
472 result->addValues(item);
478 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZSThresholds-> ...";
484 std::vector <HcalGenericDetId> cells = allCells(*topo);
485 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
487 result->addValues(item);
494 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
500 std::vector <HcalGenericDetId> cells = allCells(*topo);
501 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
503 result->addValues(item);
506 result->setTagString(
"hardcoded");
507 result->setAlgoString(
"hardcoded");
515 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
523 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
529 std::vector <HcalGenericDetId> cells = allCells(*topo);
530 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
532 result->addValues(item);
538 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
545 result->setRctLsb( 0.5 );
546 result->setNominalGain(0.003333);
548 std::vector <HcalGenericDetId> cells = allCells(*topo);
549 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
562 result->addValues(item);
568 std::auto_ptr<HcalDcsValues>
570 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
576 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
584 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
590 std::vector <HcalGenericDetId> cells = allCells(*topo);
591 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
593 result->addValues(item);
598 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
604 std::vector <HcalGenericDetId> cells = allCells(*topo);
605 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
607 result->addValues(item);
612 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
618 std::vector <HcalGenericDetId> cells = allCells(*topo);
619 std::vector <unsigned int> mSignal;
620 mSignal.push_back(4);
621 mSignal.push_back(5);
622 mSignal.push_back(6);
623 std::vector <unsigned int> mNoise;
627 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
628 if (cell->isHcalZDCDetId())
631 result->addValues(item);
642 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
647 std::vector <HcalGenericDetId> cells = allCells(*topo);
648 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
652 result->addValues(item);
659 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
665 std::vector <HcalGenericDetId> cells = allCells(*topo);
667 std::vector<double> coef;
668 coef.push_back(0.93);
669 coef.push_back(-0.38275);
670 coef.push_back(-0.012667);
672 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
680 result->addValues(item);
693 std::vector <HcalGenericDetId> cells = allCells(*topo);
694 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
696 int sub = cell->genericSubdet();
703 result->addValues(item);
715 std::vector <HcalGenericDetId> cells = allCells(*topo);
716 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
719 result->addValues(item);
std::auto_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
HcalHardcodeCalibrations(const edm::ParameterSet &)
std::auto_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::auto_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
const EventID & eventID() const
HcalTimingParam makeTimingParam(HcalGenericDetId fId)
std::auto_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
static const IOVSyncValue & endOfTime()
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::pair< Time_t, Time_t > ValidityInterval
std::auto_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::auto_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
double getCorr(int ieta, int idepth)
void makeHardcodeMap(HcalElectronicsMap &emap)
std::auto_ptr< HcalDcsValues > produceDcsValues(const HcalDcsRcd &rcd)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
void setDsegm(std::vector< std::vector< int > > m_segmentation)
const DepRecordT & getRecord() const
HcalQIECoder makeQIECoder(HcalGenericDetId fId)
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId)
std::auto_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
std::auto_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
void makeHardcodeDcsMap(HcalDcsMap &dcs_map)
int depth() const
get the tower depth
std::auto_ptr< HcalTimingParams > produceTimingParams(const HcalTimingParamsRcd &rcd)
std::auto_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
virtual bool valid(const HcalZDCDetId &id) const
HcalGain makeGain(HcalGenericDetId fId, bool fSmear=false)
double getCorr(int ieta, int idepth, double lumi)
std::auto_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
static const IOVSyncValue & beginOfTime()
int ieta() const
get the cell ieta
const char * name() const
HERecalibration * he_recalibration
~HcalHardcodeCalibrations()
HcalRecoParam makeRecoParam(HcalGenericDetId fId)
std::auto_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::auto_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
TimeValue_t value() const
std::auto_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
HFRecalibration * hf_recalibration
std::auto_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
bool switchGainWidthsForTrigPrims
virtual bool valid(const DetId &id) const
std::auto_ptr< HcalCovarianceMatrices > produceCovarianceMatrices(const HcalCovarianceMatricesRcd &rcd)
HcalGainWidth makeGainWidth(HcalGenericDetId fId)
std::auto_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
const Timestamp & time() const
std::auto_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::auto_ptr< HcalCholeskyMatrices > produceCholeskyMatrices(const HcalCholeskyMatricesRcd &rcd)
std::auto_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
std::auto_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
HcalMCParam makeMCParam(HcalGenericDetId fId)
HcalPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
std::auto_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::auto_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)