32 std::vector<HcalGenericDetId> allCells (
const HcalTopology& hcaltopology) {
33 static std::vector<HcalGenericDetId>
result;
42 if (result.size () <= 0) {
44 for (
int phi = 0;
phi < 100;
phi++) {
46 for (
int det = 1; det < 5; det++) {
48 if (hcaltopology.
valid(cell)) result.push_back (cell);
65 if(zdctopology.
valid(zcell)) result.push_back(zcell);
67 if(zdctopology.
valid(zcell)) result.push_back(zcell);
72 if(zdctopology.
valid(zcell)) result.push_back(zcell);
74 if(zdctopology.
valid(zcell)) result.push_back(zcell);
79 if(zdctopology.
valid(zcell)) result.push_back(zcell);
81 if(zdctopology.
valid(zcell)) result.push_back(zcell);
91 for (
int phi = 1;
phi <= 72;
phi++) {
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 <HcalZDCLowGainFractionsRcd> ();
256 findingRecord <HcalMCParamsRcd> ();
260 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
264 findingRecord <HcalCholeskyMatricesRcd> ();
268 findingRecord <HcalCovarianceMatricesRcd> ();
286 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
291 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
297 std::vector <HcalGenericDetId> cells = allCells(*topo);
298 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
300 result->addValues(item);
306 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
312 std::vector <HcalGenericDetId> cells = allCells(*htopo);
313 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
315 result->addValues(item);
321 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
327 std::vector <HcalGenericDetId> cells = allCells(*topo);
328 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
330 result->addValues(item);
336 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGainWidths-> ...";
342 std::vector <HcalGenericDetId> cells = allCells(*topo);
343 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
348 result->addValues(item);
349 }
else if (!cell->isHcalTrigTowerDetId()) {
351 result->addValues(item);
358 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
370 std::vector <HcalGenericDetId> cells = allCells(*topo);
371 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
373 result->addCoder (coder);
379 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceChannelQuality-> ...";
385 std::vector <HcalGenericDetId> cells = allCells(*topo);
386 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
388 result->addValues(item);
395 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRespCorrs-> ...";
401 std::vector <HcalGenericDetId> cells = allCells(*topo);
402 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
433 result->addValues(item);
439 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
445 std::vector <HcalGenericDetId> cells = allCells(*topo);
446 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
448 result->addValues(item);
454 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePFCorrs-> ...";
460 std::vector <HcalGenericDetId> cells = allCells(*topo);
461 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
463 result->addValues(item);
469 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimeCorrs-> ...";
475 std::vector <HcalGenericDetId> cells = allCells(*topo);
476 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
478 result->addValues(item);
484 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZSThresholds-> ...";
490 std::vector <HcalGenericDetId> cells = allCells(*topo);
491 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
493 result->addValues(item);
500 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
506 std::vector <HcalGenericDetId> cells = allCells(*topo);
507 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
509 result->addValues(item);
512 result->setTagString(
"hardcoded");
513 result->setAlgoString(
"hardcoded");
521 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
529 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
535 std::vector <HcalGenericDetId> cells = allCells(*topo);
536 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
538 result->addValues(item);
544 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
551 result->setRctLsb( 0.5 );
552 result->setNominalGain(0.003333);
554 std::vector <HcalGenericDetId> cells = allCells(*topo);
555 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
568 result->addValues(item);
574 std::auto_ptr<HcalDcsValues>
576 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
582 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
590 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
596 std::vector <HcalGenericDetId> cells = allCells(*topo);
597 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
599 result->addValues(item);
604 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
610 std::vector <HcalGenericDetId> cells = allCells(*topo);
611 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
613 result->addValues(item);
618 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
624 std::vector <HcalGenericDetId> cells = allCells(*topo);
625 std::vector <unsigned int> mSignal;
626 mSignal.push_back(4);
627 mSignal.push_back(5);
628 mSignal.push_back(6);
629 std::vector <unsigned int> mNoise;
633 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
634 if (cell->isHcalZDCDetId())
637 result->addValues(item);
644 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
650 std::vector <HcalGenericDetId> cells = allCells(*topo);
651 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
653 result->addValues(item);
663 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
668 std::vector <HcalGenericDetId> cells = allCells(*topo);
669 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
673 result->addValues(item);
680 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
686 std::vector <HcalGenericDetId> cells = allCells(*topo);
688 std::vector<double> coef;
689 coef.push_back(0.93);
690 coef.push_back(-0.38275);
691 coef.push_back(-0.012667);
693 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
701 result->addValues(item);
714 std::vector <HcalGenericDetId> cells = allCells(*topo);
715 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
717 int sub = cell->genericSubdet();
724 result->addValues(item);
736 std::vector <HcalGenericDetId> cells = allCells(*topo);
737 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
740 result->addValues(item);
std::auto_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
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)
Geom::Phi< T > phi() const
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)