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);
91 if(zdctopology.
valid(zcell)) result.push_back(zcell);
93 if(zdctopology.
valid(zcell)) result.push_back(zcell);
107 if (hcaltopology.
validHT(cell)) {
108 result.push_back (cell);
110 std::cout <<
" HcalHardcodedCalibrations: eta|phi|depth|vers = "
111 <<
eta <<
"|" <<
phi <<
"|" <<
depth <<
"|" << vers
126 he_recalibration(0), hf_recalibration(0), setHEdsegm(
false), setHBdsegm(
false), SipmLumi(0.0), testHFQIE10(iConfig.getParameter<bool>(
"testHFQIE10"))
128 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
130 if ( iConfig.
exists(
"GainWidthsForTrigPrims") )
137 if ( iConfig.
exists(
"iLumi") )
141 bool he_recalib = iConfig.
getParameter<
bool>(
"HERecalibration");
142 bool hf_recalib = iConfig.
getParameter<
bool>(
"HFRecalibration");
144 double cutoff = iConfig.
getParameter<
double>(
"HEreCalibCutoff");
150 std::cout <<
" HcalHardcodeCalibrations: iLumi = " <<
iLumi << std::endl;
162 findingRecord <HcalPedestalsRcd> ();
166 findingRecord <HcalPedestalWidthsRcd> ();
170 findingRecord <HcalGainsRcd> ();
174 findingRecord <HcalGainWidthsRcd> ();
178 findingRecord <HcalQIEDataRcd> ();
182 findingRecord <HcalQIETypesRcd> ();
186 findingRecord <HcalChannelQualityRcd> ();
190 findingRecord <HcalElectronicsMapRcd> ();
194 findingRecord <HcalZSThresholdsRcd> ();
198 findingRecord <HcalRespCorrsRcd> ();
202 findingRecord <HcalLUTCorrsRcd> ();
206 findingRecord <HcalPFCorrsRcd> ();
210 findingRecord <HcalTimeCorrsRcd> ();
214 findingRecord <HcalL1TriggerObjectsRcd> ();
218 findingRecord <HcalValidationCorrsRcd> ();
222 findingRecord <HcalLutMetadataRcd> ();
226 findingRecord <HcalDcsRcd> ();
230 findingRecord <HcalDcsMapRcd> ();
234 findingRecord <HcalRecoParamsRcd> ();
238 findingRecord <HcalLongRecoParamsRcd> ();
242 findingRecord <HcalZDCLowGainFractionsRcd> ();
246 findingRecord <HcalMCParamsRcd> ();
250 findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
254 findingRecord <HcalCholeskyMatricesRcd> ();
258 findingRecord <HcalCovarianceMatricesRcd> ();
276 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::setIntervalFor-> key: " << record <<
" time: " << iTime.
eventID() <<
'/' << iTime.
time ().
value ();
281 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestals-> ...";
287 std::vector <HcalGenericDetId> cells = allCells(*topo);
288 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
290 result->addValues(item);
296 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::producePedestalWidths-> ...";
302 std::vector <HcalGenericDetId> cells = allCells(*htopo);
303 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
305 result->addValues(item);
311 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGains-> ...";
317 std::vector <HcalGenericDetId> cells = allCells(*topo);
318 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
320 result->addValues(item);
326 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceGainWidths-> ...";
332 std::vector <HcalGenericDetId> cells = allCells(*topo);
333 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
338 result->addValues(item);
339 }
else if (!cell->isHcalTrigTowerDetId()) {
341 result->addValues(item);
348 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIEData-> ...";
360 std::vector <HcalGenericDetId> cells = allCells(*topo);
361 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
363 result->addCoder (coder);
369 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceQIETypes-> ...";
375 std::vector <HcalGenericDetId> cells = allCells(*topo);
376 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
378 result->addValues(item);
384 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceChannelQuality-> ...";
390 std::vector <HcalGenericDetId> cells = allCells(*topo);
391 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
393 result->addValues(item);
400 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRespCorrs-> ...";
408 std::vector<std::vector<int>> m_segmentation;
410 m_segmentation.resize(maxEta);
427 std::vector <HcalGenericDetId> cells = allCells(*topo);
428 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
459 result->addValues(item);
465 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLUTCorrs-> ...";
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::producePFCorrs-> ...";
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);
495 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimeCorrs-> ...";
501 std::vector <HcalGenericDetId> cells = allCells(*topo);
502 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
504 result->addValues(item);
510 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZSThresholds-> ...";
516 std::vector <HcalGenericDetId> cells = allCells(*topo);
517 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
519 result->addValues(item);
526 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
532 std::vector <HcalGenericDetId> cells = allCells(*topo);
533 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
535 result->addValues(item);
538 result->setTagString(
"hardcoded");
539 result->setAlgoString(
"hardcoded");
547 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceElectronicsMap-> ...";
555 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceValidationCorrs-> ...";
561 std::vector <HcalGenericDetId> cells = allCells(*topo);
562 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
564 result->addValues(item);
570 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLutMetadata-> ...";
577 result->setRctLsb( 0.5 );
578 result->setNominalGain(0.003333);
580 std::vector <HcalGenericDetId> cells = allCells(*topo);
581 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
594 result->addValues(item);
600 std::auto_ptr<HcalDcsValues>
602 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsValues-> ...";
608 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceDcsMap-> ...";
616 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceRecoParams-> ...";
622 std::vector <HcalGenericDetId> cells = allCells(*topo);
623 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
625 result->addValues(item);
630 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceTimingParams-> ...";
636 std::vector <HcalGenericDetId> cells = allCells(*topo);
637 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
639 result->addValues(item);
644 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceLongRecoParams-> ...";
650 std::vector <HcalGenericDetId> cells = allCells(*topo);
651 std::vector <unsigned int> mSignal;
652 mSignal.push_back(4);
653 mSignal.push_back(5);
654 mSignal.push_back(6);
655 std::vector <unsigned int> mNoise;
659 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
660 if (cell->isHcalZDCDetId())
663 result->addValues(item);
670 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceZDCLowGainFractions-> ...";
676 std::vector <HcalGenericDetId> cells = allCells(*topo);
677 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
679 result->addValues(item);
689 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceMCParams-> ...";
694 std::vector <HcalGenericDetId> cells = allCells(*topo);
695 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
699 result->addValues(item);
706 edm::LogInfo(
"HCAL") <<
"HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
712 std::vector <HcalGenericDetId> cells = allCells(*topo);
714 std::vector<double> coef;
715 coef.push_back(0.93);
716 coef.push_back(-0.38275);
717 coef.push_back(-0.012667);
719 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
727 result->addValues(item);
740 std::vector <HcalGenericDetId> cells = allCells(*topo);
741 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
743 int sub = cell->genericSubdet();
750 result->addValues(item);
762 std::vector <HcalGenericDetId> cells = allCells(*topo);
763 for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); ++cell) {
766 result->addValues(item);
773 desc.
add<
double>(
"iLumi",-1.);
774 desc.
add<
bool>(
"HERecalibration",
false);
775 desc.
add<
double>(
"HEreCalibCutoff",20.);
776 desc.
add<
bool>(
"HFRecalibration",
false);
777 desc.
add<
bool>(
"GainWidthsForTrigPrims",
false);
778 desc.
add<
bool>(
"testHFQIE10",
false);
779 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