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 he_recalibration(0), hf_recalibration(0), setHEdsegm(
false), setHBdsegm(
false), SipmLumi(0.0), testHFQIE10(iConfig.getParameter<bool>(
"testHFQIE10"))
121 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
123 if ( iConfig.
exists(
"GainWidthsForTrigPrims") )
130 if ( iConfig.
exists(
"iLumi") )
134 bool he_recalib = iConfig.
getParameter<
bool>(
"HERecalibration");
135 bool hf_recalib = iConfig.
getParameter<
bool>(
"HFRecalibration");
137 double cutoff = iConfig.
getParameter<
double>(
"HEreCalibCutoff");
143 std::cout <<
" HcalHardcodeCalibrations: iLumi = " <<
iLumi << std::endl;
155 findingRecord <HcalPedestalsRcd> ();
159 findingRecord <HcalPedestalWidthsRcd> ();
163 findingRecord <HcalGainsRcd> ();
167 findingRecord <HcalGainWidthsRcd> ();
171 findingRecord <HcalQIEDataRcd> ();
175 findingRecord <HcalQIETypesRcd> ();
179 findingRecord <HcalChannelQualityRcd> ();
183 findingRecord <HcalElectronicsMapRcd> ();
187 findingRecord <HcalZSThresholdsRcd> ();
191 findingRecord <HcalRespCorrsRcd> ();
195 findingRecord <HcalLUTCorrsRcd> ();
199 findingRecord <HcalPFCorrsRcd> ();
203 findingRecord <HcalTimeCorrsRcd> ();
207 findingRecord <HcalL1TriggerObjectsRcd> ();
211 findingRecord <HcalValidationCorrsRcd> ();
215 findingRecord <HcalLutMetadataRcd> ();
219 findingRecord <HcalDcsRcd> ();
223 findingRecord <HcalDcsMapRcd> ();
227 findingRecord <HcalRecoParamsRcd> ();
231 findingRecord <HcalLongRecoParamsRcd> ();
235 findingRecord <HcalZDCLowGainFractionsRcd> ();
239 findingRecord <HcalMCParamsRcd> ();
243 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
247 findingRecord <HcalCholeskyMatricesRcd> ();
251 findingRecord <HcalCovarianceMatricesRcd> ();
269 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
274 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
280 std::vector <HcalGenericDetId> cells = allCells(*topo);
281 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
283 result->addValues(item);
289 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
295 std::vector <HcalGenericDetId> cells = allCells(*htopo);
296 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
298 result->addValues(item);
304 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
310 std::vector <HcalGenericDetId> cells = allCells(*topo);
311 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
313 result->addValues(item);
319 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGainWidths-> ...";
325 std::vector <HcalGenericDetId> cells = allCells(*topo);
326 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
331 result->addValues(item);
332 }
else if (!cell->isHcalTrigTowerDetId()) {
334 result->addValues(item);
341 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
353 std::vector <HcalGenericDetId> cells = allCells(*topo);
354 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
356 result->addCoder (coder);
362 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIETypes-> ...";
368 std::vector <HcalGenericDetId> cells = allCells(*topo);
369 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
371 result->addValues(item);
377 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceChannelQuality-> ...";
383 std::vector <HcalGenericDetId> cells = allCells(*topo);
384 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
386 result->addValues(item);
393 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRespCorrs-> ...";
401 std::vector<std::vector<int>> m_segmentation;
403 m_segmentation.resize(maxEta);
420 std::vector <HcalGenericDetId> cells = allCells(*topo);
421 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
452 result->addValues(item);
458 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
464 std::vector <HcalGenericDetId> cells = allCells(*topo);
465 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
467 result->addValues(item);
473 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePFCorrs-> ...";
479 std::vector <HcalGenericDetId> cells = allCells(*topo);
480 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
482 result->addValues(item);
488 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimeCorrs-> ...";
494 std::vector <HcalGenericDetId> cells = allCells(*topo);
495 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
497 result->addValues(item);
503 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZSThresholds-> ...";
509 std::vector <HcalGenericDetId> cells = allCells(*topo);
510 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
512 result->addValues(item);
519 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
525 std::vector <HcalGenericDetId> cells = allCells(*topo);
526 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
528 result->addValues(item);
531 result->setTagString(
"hardcoded");
532 result->setAlgoString(
"hardcoded");
540 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
548 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
554 std::vector <HcalGenericDetId> cells = allCells(*topo);
555 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
557 result->addValues(item);
563 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
570 result->setRctLsb( 0.5 );
571 result->setNominalGain(0.003333);
573 std::vector <HcalGenericDetId> cells = allCells(*topo);
574 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
587 result->addValues(item);
593 std::auto_ptr<HcalDcsValues>
595 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
601 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
609 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
615 std::vector <HcalGenericDetId> cells = allCells(*topo);
616 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
618 result->addValues(item);
623 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
629 std::vector <HcalGenericDetId> cells = allCells(*topo);
630 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
632 result->addValues(item);
637 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
643 std::vector <HcalGenericDetId> cells = allCells(*topo);
644 std::vector <unsigned int> mSignal;
645 mSignal.push_back(4);
646 mSignal.push_back(5);
647 mSignal.push_back(6);
648 std::vector <unsigned int> mNoise;
652 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
653 if (cell->isHcalZDCDetId())
656 result->addValues(item);
663 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
669 std::vector <HcalGenericDetId> cells = allCells(*topo);
670 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
672 result->addValues(item);
682 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
687 std::vector <HcalGenericDetId> cells = allCells(*topo);
688 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
692 result->addValues(item);
699 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
705 std::vector <HcalGenericDetId> cells = allCells(*topo);
707 std::vector<double> coef;
708 coef.push_back(0.93);
709 coef.push_back(-0.38275);
710 coef.push_back(-0.012667);
712 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
720 result->addValues(item);
733 std::vector <HcalGenericDetId> cells = allCells(*topo);
734 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
736 int sub = cell->genericSubdet();
743 result->addValues(item);
755 std::vector <HcalGenericDetId> cells = allCells(*topo);
756 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
759 result->addValues(item);
766 desc.
add<
double>(
"iLumi",-1.);
767 desc.
add<
bool>(
"HERecalibration",
false);
768 desc.
add<
double>(
"HEreCalibCutoff",20.);
769 desc.
add<
bool>(
"HFRecalibration",
false);
770 desc.
add<
bool>(
"GainWidthsForTrigPrims",
false);
771 desc.
add<
bool>(
"testHFQIE10",
false);
772 desc.
addUntracked<std::vector<std::string>>(
"toGet",std::vector<std::string>());
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 &)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
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()
HcalQIEType makeQIEType(HcalGenericDetId fId, bool testHFQIE10)
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
void addDefault(ParameterSetDescription const &psetDescription)
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()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool validHT(const HcalTrigTowerDetId &id) const