32 std::vector<HcalGenericDetId> allCells (
const HcalTopology& hcaltopology) {
33 static std::vector<HcalGenericDetId>
result;
42 if (result.size () <= 0) {
45 for (
int depth = 1; depth < maxDepthHB + maxDepthHE; depth++) {
46 for (
int det = 1; det < 5; det++) {
48 if (hcaltopology.
valid(cell)) result.push_back (cell);
63 for(
int depth= 1; depth < 6; depth++){
65 if(zdctopology.
valid(zcell)) result.push_back(zcell);
67 if(zdctopology.
valid(zcell)) result.push_back(zcell);
70 for(
int depth= 1; depth < 5; depth++){
72 if(zdctopology.
valid(zcell)) result.push_back(zcell);
74 if(zdctopology.
valid(zcell)) result.push_back(zcell);
77 for(
int depth= 1; depth < 3; depth++){
79 if(zdctopology.
valid(zcell)) result.push_back(zcell);
81 if(zdctopology.
valid(zcell)) result.push_back(zcell);
93 result.push_back (cell);
97 for (
int phi = 1;
phi <= 69;) {
99 result.push_back (cell);
112 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
114 if ( iConfig.
exists(
"GainWidthsForTrigPrims") )
121 if ( iConfig.
exists(
"iLumi") )
125 bool he_recalib = iConfig.
getParameter<
bool>(
"HERecalibration");
126 bool hf_recalib = iConfig.
getParameter<
bool>(
"HFRecalibration");
138 if ( iConfig.
exists(
"HcalReLabel") ) {
144 std::vector<std::vector<int>> m_segmentation;
145 m_segmentation.resize(29);
147 for (
int i = 0;
i < 29;
i++) {
149 snprintf(name,10,
"Eta%d",
i+1);
176 findingRecord <HcalPedestalsRcd> ();
180 findingRecord <HcalPedestalWidthsRcd> ();
184 findingRecord <HcalGainsRcd> ();
188 findingRecord <HcalGainWidthsRcd> ();
192 findingRecord <HcalQIEDataRcd> ();
196 findingRecord <HcalChannelQualityRcd> ();
200 findingRecord <HcalElectronicsMapRcd> ();
204 findingRecord <HcalZSThresholdsRcd> ();
208 findingRecord <HcalRespCorrsRcd> ();
212 findingRecord <HcalLUTCorrsRcd> ();
216 findingRecord <HcalPFCorrsRcd> ();
220 findingRecord <HcalTimeCorrsRcd> ();
224 findingRecord <HcalL1TriggerObjectsRcd> ();
228 findingRecord <HcalValidationCorrsRcd> ();
232 findingRecord <HcalLutMetadataRcd> ();
236 findingRecord <HcalDcsRcd> ();
240 findingRecord <HcalDcsMapRcd> ();
244 findingRecord <HcalRecoParamsRcd> ();
248 findingRecord <HcalLongRecoParamsRcd> ();
252 findingRecord <HcalMCParamsRcd> ();
256 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
260 findingRecord <HcalCholeskyMatricesRcd> ();
264 findingRecord <HcalCovarianceMatricesRcd> ();
282 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
287 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
293 std::vector <HcalGenericDetId> cells = allCells(*topo);
294 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
296 result->addValues(item);
302 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
308 std::vector <HcalGenericDetId> cells = allCells(*htopo);
309 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
311 result->addValues(item);
317 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
323 std::vector <HcalGenericDetId> cells = allCells(*topo);
324 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
326 result->addValues(item);
332 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGainWidths-> ...";
338 std::vector <HcalGenericDetId> cells = allCells(*topo);
339 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
344 result->addValues(item);
345 }
else if (!cell->isHcalTrigTowerDetId()) {
347 result->addValues(item);
354 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
366 std::vector <HcalGenericDetId> cells = allCells(*topo);
367 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
369 result->addCoder (coder);
375 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceChannelQuality-> ...";
381 std::vector <HcalGenericDetId> cells = allCells(*topo);
382 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
384 result->addValues(item);
391 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRespCorrs-> ...";
397 std::vector <HcalGenericDetId> cells = allCells(*topo);
398 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
429 result->addValues(item);
435 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
441 std::vector <HcalGenericDetId> cells = allCells(*topo);
442 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
444 result->addValues(item);
450 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePFCorrs-> ...";
456 std::vector <HcalGenericDetId> cells = allCells(*topo);
457 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
459 result->addValues(item);
465 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimeCorrs-> ...";
471 std::vector <HcalGenericDetId> cells = allCells(*topo);
472 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
474 result->addValues(item);
480 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZSThresholds-> ...";
486 std::vector <HcalGenericDetId> cells = allCells(*topo);
487 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
489 result->addValues(item);
496 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
502 std::vector <HcalGenericDetId> cells = allCells(*topo);
503 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
505 result->addValues(item);
508 result->setTagString(
"hardcoded");
509 result->setAlgoString(
"hardcoded");
517 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
525 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
531 std::vector <HcalGenericDetId> cells = allCells(*topo);
532 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
534 result->addValues(item);
540 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
547 result->setRctLsb( 0.5 );
548 result->setNominalGain(0.003333);
550 std::vector <HcalGenericDetId> cells = allCells(*topo);
551 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
564 result->addValues(item);
570 std::auto_ptr<HcalDcsValues>
572 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
578 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
586 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
592 std::vector <HcalGenericDetId> cells = allCells(*topo);
593 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
595 result->addValues(item);
600 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
606 std::vector <HcalGenericDetId> cells = allCells(*topo);
607 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
609 result->addValues(item);
614 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
620 std::vector <HcalGenericDetId> cells = allCells(*topo);
621 std::vector <unsigned int> mSignal;
622 mSignal.push_back(4);
623 mSignal.push_back(5);
624 mSignal.push_back(6);
625 std::vector <unsigned int> mNoise;
629 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
630 if (cell->isHcalZDCDetId())
633 result->addValues(item);
644 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
649 std::vector <HcalGenericDetId> cells = allCells(*topo);
650 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
654 result->addValues(item);
661 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
667 std::vector <HcalGenericDetId> cells = allCells(*topo);
669 std::vector<double> coef;
670 coef.push_back(0.93);
671 coef.push_back(-0.38275);
672 coef.push_back(-0.012667);
674 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
682 result->addValues(item);
695 std::vector <HcalGenericDetId> cells = allCells(*topo);
696 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
698 int sub = cell->genericSubdet();
705 result->addValues(item);
717 std::vector <HcalGenericDetId> cells = allCells(*topo);
718 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
721 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)
void setDsegm(const std::vector< std::vector< int > > &m_segmentation)
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())
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
Abs< T >::type abs(const T &t)
~HcalHardcodeCalibrations()
HcalRecoParam makeRecoParam(HcalGenericDetId fId)
std::auto_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::auto_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
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)
TimeValue_t value() const
HcalPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
std::auto_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::auto_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)