36 std::vector<HcalGenericDetId> allCells (
const HcalTopology& hcaltopology) {
37 static std::vector<HcalGenericDetId>
result;
42 std::cout << std::endl <<
"HcalHardcodeCalibrations: maxDepthHB, maxDepthHE = "
43 << maxDepthHB <<
", " << maxDepthHE << std::endl;
46 if (result.size () <= 0) {
53 if (hcaltopology.
valid(cell)) {
54 result.push_back (cell);
56 std::cout <<
" HcalHardcodedCalibrations: det|eta|phi|depth = "
57 << det <<
"|" <<
eta <<
"|" <<
phi <<
"|"
58 <<
depth << std::endl;
70 if(zdctopology.
valid(zcell)) result.push_back(zcell);
72 if(zdctopology.
valid(zcell)) result.push_back(zcell);
77 if(zdctopology.
valid(zcell)) result.push_back(zcell);
79 if(zdctopology.
valid(zcell)) result.push_back(zcell);
84 if(zdctopology.
valid(zcell)) result.push_back(zcell);
86 if(zdctopology.
valid(zcell)) result.push_back(zcell);
100 if (hcaltopology.
validHT(cell)) {
101 result.push_back (cell);
103 std::cout <<
" HcalHardcodedCalibrations: eta|phi|depth|vers = "
104 <<
eta <<
"|" <<
phi <<
"|" <<
depth <<
"|" << vers
119 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
121 if ( iConfig.
exists(
"GainWidthsForTrigPrims") )
128 if ( iConfig.
exists(
"iLumi") )
132 bool he_recalib = iConfig.
getParameter<
bool>(
"HERecalibration");
133 bool hf_recalib = iConfig.
getParameter<
bool>(
"HFRecalibration");
135 double cutoff = iConfig.
getParameter<
double>(
"HEreCalibCutoff");
141 std::cout <<
" HcalHardcodeCalibrations: iLumi = " <<
iLumi << std::endl;
153 findingRecord <HcalPedestalsRcd> ();
157 findingRecord <HcalPedestalWidthsRcd> ();
161 findingRecord <HcalGainsRcd> ();
165 findingRecord <HcalGainWidthsRcd> ();
169 findingRecord <HcalQIEDataRcd> ();
173 findingRecord <HcalQIETypesRcd> ();
177 findingRecord <HcalChannelQualityRcd> ();
181 findingRecord <HcalElectronicsMapRcd> ();
185 findingRecord <HcalZSThresholdsRcd> ();
189 findingRecord <HcalRespCorrsRcd> ();
193 findingRecord <HcalLUTCorrsRcd> ();
197 findingRecord <HcalPFCorrsRcd> ();
201 findingRecord <HcalTimeCorrsRcd> ();
205 findingRecord <HcalL1TriggerObjectsRcd> ();
209 findingRecord <HcalValidationCorrsRcd> ();
213 findingRecord <HcalLutMetadataRcd> ();
217 findingRecord <HcalDcsRcd> ();
221 findingRecord <HcalDcsMapRcd> ();
225 findingRecord <HcalRecoParamsRcd> ();
229 findingRecord <HcalLongRecoParamsRcd> ();
233 findingRecord <HcalZDCLowGainFractionsRcd> ();
237 findingRecord <HcalMCParamsRcd> ();
241 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
245 findingRecord <HcalCholeskyMatricesRcd> ();
249 findingRecord <HcalCovarianceMatricesRcd> ();
267 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
272 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
278 std::vector <HcalGenericDetId> cells = allCells(*topo);
279 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
281 result->addValues(item);
287 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
293 std::vector <HcalGenericDetId> cells = allCells(*htopo);
294 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
296 result->addValues(item);
302 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
308 std::vector <HcalGenericDetId> cells = allCells(*topo);
309 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
311 result->addValues(item);
317 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGainWidths-> ...";
323 std::vector <HcalGenericDetId> cells = allCells(*topo);
324 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
329 result->addValues(item);
330 }
else if (!cell->isHcalTrigTowerDetId()) {
332 result->addValues(item);
339 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
351 std::vector <HcalGenericDetId> cells = allCells(*topo);
352 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
354 result->addCoder (coder);
360 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIETypes-> ...";
366 std::vector <HcalGenericDetId> cells = allCells(*topo);
367 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
369 result->addValues(item);
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-> ...";
399 std::vector<std::vector<int>> m_segmentation;
401 m_segmentation.resize(maxEta);
418 std::vector <HcalGenericDetId> cells = allCells(*topo);
419 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
450 result->addValues(item);
456 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
462 std::vector <HcalGenericDetId> cells = allCells(*topo);
463 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
465 result->addValues(item);
471 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePFCorrs-> ...";
477 std::vector <HcalGenericDetId> cells = allCells(*topo);
478 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
480 result->addValues(item);
486 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimeCorrs-> ...";
492 std::vector <HcalGenericDetId> cells = allCells(*topo);
493 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
495 result->addValues(item);
501 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZSThresholds-> ...";
507 std::vector <HcalGenericDetId> cells = allCells(*topo);
508 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
510 result->addValues(item);
517 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
523 std::vector <HcalGenericDetId> cells = allCells(*topo);
524 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
526 result->addValues(item);
529 result->setTagString(
"hardcoded");
530 result->setAlgoString(
"hardcoded");
538 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
546 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
552 std::vector <HcalGenericDetId> cells = allCells(*topo);
553 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
555 result->addValues(item);
561 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
568 result->setRctLsb( 0.5 );
569 result->setNominalGain(0.003333);
571 std::vector <HcalGenericDetId> cells = allCells(*topo);
572 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
585 result->addValues(item);
591 std::auto_ptr<HcalDcsValues>
593 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
599 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
607 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
613 std::vector <HcalGenericDetId> cells = allCells(*topo);
614 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
616 result->addValues(item);
621 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
627 std::vector <HcalGenericDetId> cells = allCells(*topo);
628 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
630 result->addValues(item);
635 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
641 std::vector <HcalGenericDetId> cells = allCells(*topo);
642 std::vector <unsigned int> mSignal;
643 mSignal.push_back(4);
644 mSignal.push_back(5);
645 mSignal.push_back(6);
646 std::vector <unsigned int> mNoise;
650 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
651 if (cell->isHcalZDCDetId())
654 result->addValues(item);
661 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
667 std::vector <HcalGenericDetId> cells = allCells(*topo);
668 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
670 result->addValues(item);
680 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
685 std::vector <HcalGenericDetId> cells = allCells(*topo);
686 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
690 result->addValues(item);
697 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
703 std::vector <HcalGenericDetId> cells = allCells(*topo);
705 std::vector<double> coef;
706 coef.push_back(0.93);
707 coef.push_back(-0.38275);
708 coef.push_back(-0.012667);
710 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
718 result->addValues(item);
731 std::vector <HcalGenericDetId> cells = allCells(*topo);
732 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
734 int sub = cell->genericSubdet();
741 result->addValues(item);
753 std::vector <HcalGenericDetId> cells = allCells(*topo);
754 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
757 result->addValues(item);
std::auto_ptr< HcalZDCLowGainFractions > produceZDCLowGainFractions(const HcalZDCLowGainFractionsRcd &rcd)
std::auto_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
static const int kHcalVersMask
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)
static const int kHcalEtaMask
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
static const int kHcalDepthMask
~HcalHardcodeCalibrations()
HcalRecoParam makeRecoParam(HcalGenericDetId fId)
std::auto_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::auto_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
static const int kHcalPhiMask
static const int kHcalPhiMask2
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
std::auto_ptr< HcalQIETypes > produceQIETypes(const HcalQIETypesRcd &rcd)
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)
static const int kHcalEtaMask2
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)
bool validHT(const HcalTrigTowerDetId &id) const