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);
111 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
113 if ( iConfig.
exists(
"GainWidthsForTrigPrims") )
120 if ( iConfig.
exists(
"iLumi") )
124 bool he_recalib = iConfig.
getParameter<
bool>(
"HERecalibration");
125 bool hf_recalib = iConfig.
getParameter<
bool>(
"HFRecalibration");
140 findingRecord <HcalPedestalsRcd> ();
144 findingRecord <HcalPedestalWidthsRcd> ();
148 findingRecord <HcalGainsRcd> ();
152 findingRecord <HcalGainWidthsRcd> ();
156 findingRecord <HcalQIEDataRcd> ();
160 findingRecord <HcalChannelQualityRcd> ();
164 findingRecord <HcalElectronicsMapRcd> ();
168 findingRecord <HcalZSThresholdsRcd> ();
172 findingRecord <HcalRespCorrsRcd> ();
176 findingRecord <HcalLUTCorrsRcd> ();
180 findingRecord <HcalPFCorrsRcd> ();
184 findingRecord <HcalTimeCorrsRcd> ();
188 findingRecord <HcalL1TriggerObjectsRcd> ();
192 findingRecord <HcalValidationCorrsRcd> ();
196 findingRecord <HcalLutMetadataRcd> ();
200 findingRecord <HcalDcsRcd> ();
204 findingRecord <HcalDcsMapRcd> ();
208 findingRecord <HcalRecoParamsRcd> ();
212 findingRecord <HcalLongRecoParamsRcd> ();
216 findingRecord <HcalZDCLowGainFractionsRcd> ();
220 findingRecord <HcalMCParamsRcd> ();
224 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
228 findingRecord <HcalCholeskyMatricesRcd> ();
232 findingRecord <HcalCovarianceMatricesRcd> ();
250 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
255 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
261 std::vector <HcalGenericDetId> cells = allCells(*topo);
262 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
264 result->addValues(item);
270 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
276 std::vector <HcalGenericDetId> cells = allCells(*htopo);
277 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
279 result->addValues(item);
285 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
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::produceGainWidths-> ...";
306 std::vector <HcalGenericDetId> cells = allCells(*topo);
307 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
312 result->addValues(item);
313 }
else if (!cell->isHcalTrigTowerDetId()) {
315 result->addValues(item);
322 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
334 std::vector <HcalGenericDetId> cells = allCells(*topo);
335 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
337 result->addCoder (coder);
343 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceChannelQuality-> ...";
349 std::vector <HcalGenericDetId> cells = allCells(*topo);
350 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
352 result->addValues(item);
359 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRespCorrs-> ...";
367 std::vector<std::vector<int>> m_segmentation;
369 m_segmentation.resize(maxEta);
386 std::vector <HcalGenericDetId> cells = allCells(*topo);
387 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
418 result->addValues(item);
424 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
430 std::vector <HcalGenericDetId> cells = allCells(*topo);
431 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
433 result->addValues(item);
439 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePFCorrs-> ...";
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::produceTimeCorrs-> ...";
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::produceZSThresholds-> ...";
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);
485 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
491 std::vector <HcalGenericDetId> cells = allCells(*topo);
492 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
494 result->addValues(item);
497 result->setTagString(
"hardcoded");
498 result->setAlgoString(
"hardcoded");
506 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
514 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
520 std::vector <HcalGenericDetId> cells = allCells(*topo);
521 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
523 result->addValues(item);
529 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
536 result->setRctLsb( 0.5 );
537 result->setNominalGain(0.003333);
539 std::vector <HcalGenericDetId> cells = allCells(*topo);
540 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
553 result->addValues(item);
559 std::auto_ptr<HcalDcsValues>
561 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
567 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
575 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
581 std::vector <HcalGenericDetId> cells = allCells(*topo);
582 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
584 result->addValues(item);
589 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
595 std::vector <HcalGenericDetId> cells = allCells(*topo);
596 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
598 result->addValues(item);
603 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
609 std::vector <HcalGenericDetId> cells = allCells(*topo);
610 std::vector <unsigned int> mSignal;
611 mSignal.push_back(4);
612 mSignal.push_back(5);
613 mSignal.push_back(6);
614 std::vector <unsigned int> mNoise;
618 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
619 if (cell->isHcalZDCDetId())
622 result->addValues(item);
629 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
635 std::vector <HcalGenericDetId> cells = allCells(*topo);
636 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
638 result->addValues(item);
648 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
653 std::vector <HcalGenericDetId> cells = allCells(*topo);
654 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
658 result->addValues(item);
665 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
671 std::vector <HcalGenericDetId> cells = allCells(*topo);
673 std::vector<double> coef;
674 coef.push_back(0.93);
675 coef.push_back(-0.38275);
676 coef.push_back(-0.012667);
678 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
686 result->addValues(item);
699 std::vector <HcalGenericDetId> cells = allCells(*topo);
700 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
702 int sub = cell->genericSubdet();
709 result->addValues(item);
721 std::vector <HcalGenericDetId> cells = allCells(*topo);
722 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
725 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)
void getDepthSegmentation(unsigned ring, std::vector< int > &readoutDepths) 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)
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)
volatile std::atomic< bool > shutdown_flag false
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)