CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HBHEPhase1Reconstructor Class Reference

#include <RecoLocalCalo/HcalRecProducers/plugins/HBHEPhase1Reconstructor.cc>

Inheritance diagram for HBHEPhase1Reconstructor:
edm::stream::EDProducer<>

Public Member Functions

 HBHEPhase1Reconstructor (const edm::ParameterSet &)
 
 ~HBHEPhase1Reconstructor () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
template<class DataFrame , class Collection >
void processData (const Collection &coll, const HcalDbService &cond, const HcalChannelQuality &qual, const HcalSeverityLevelComputer &severity, const bool isRealData, HBHEChannelInfo *info, HBHEChannelInfoCollection *infoColl, HBHERecHitCollection *rechits, const bool use8ts)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
void runHBHENegativeEFilter (const HBHEChannelInfo &info, HBHERecHit *rh)
 
void setAsicSpecificBits (const HBHEDataFrame &frame, const HcalCoder &coder, const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
 
void setAsicSpecificBits (const QIE11DataFrame &frame, const HcalCoder &coder, const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
 
void setCommonStatusBits (const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
 

Private Attributes

std::string algoConfigClass_
 
bool dropZSmarkedPassed_
 
std::unique_ptr< HBHEStatusBitSetterhbheFlagSetterQIE11_
 
std::unique_ptr< HBHEStatusBitSetterhbheFlagSetterQIE8_
 
std::unique_ptr< HBHEPulseShapeFlagSetterhbhePulseShapeFlagSetterQIE11_
 
std::unique_ptr< HBHEPulseShapeFlagSetterhbhePulseShapeFlagSetterQIE8_
 
bool makeRecHits_
 
const HBHENegativeEFilternegEFilter_
 
std::unique_ptr< HcalRecoParamsparamTS_
 
bool processQIE11_
 
bool processQIE8_
 
std::unique_ptr< AbsHBHEPhase1Algoreco_
 
std::unique_ptr< AbsHcalAlgoDatarecoConfig_
 
bool recoParamsFromDB_
 
bool saveDroppedInfos_
 
bool saveEffectivePedestal_
 
bool saveInfos_
 
bool setNegativeFlagsQIE11_
 
bool setNegativeFlagsQIE8_
 
bool setNoiseFlagsQIE11_
 
bool setNoiseFlagsQIE8_
 
bool setPulseShapeFlagsQIE11_
 
bool setPulseShapeFlagsQIE8_
 
int sipmQNTStoSum_
 
int sipmQTSShift_
 
edm::EDGetTokenT< QIE11DigiCollectiontok_qie11_
 
edm::EDGetTokenT< HBHEDigiCollectiontok_qie8_
 
bool tsFromDB_
 
bool use8ts_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: Phase 1 reconstruction module for HB/HE

Implementation: [Notes on implementation]

Definition at line 250 of file HBHEPhase1Reconstructor.cc.

Constructor & Destructor Documentation

◆ HBHEPhase1Reconstructor()

HBHEPhase1Reconstructor::HBHEPhase1Reconstructor ( const edm::ParameterSet conf)
explicit

Definition at line 331 of file HBHEPhase1Reconstructor.cc.

332  : algoConfigClass_(conf.getParameter<std::string>("algoConfigClass")),
333  processQIE8_(conf.getParameter<bool>("processQIE8")),
334  processQIE11_(conf.getParameter<bool>("processQIE11")),
335  saveInfos_(conf.getParameter<bool>("saveInfos")),
336  saveDroppedInfos_(conf.getParameter<bool>("saveDroppedInfos")),
337  makeRecHits_(conf.getParameter<bool>("makeRecHits")),
338  dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")),
339  tsFromDB_(conf.getParameter<bool>("tsFromDB")),
340  recoParamsFromDB_(conf.getParameter<bool>("recoParamsFromDB")),
341  saveEffectivePedestal_(conf.getParameter<bool>("saveEffectivePedestal")),
342  use8ts_(conf.getParameter<bool>("use8ts")),
343  sipmQTSShift_(conf.getParameter<int>("sipmQTSShift")),
344  sipmQNTStoSum_(conf.getParameter<int>("sipmQNTStoSum")),
345  setNegativeFlagsQIE8_(conf.getParameter<bool>("setNegativeFlagsQIE8")),
346  setNegativeFlagsQIE11_(conf.getParameter<bool>("setNegativeFlagsQIE11")),
347  setNoiseFlagsQIE8_(conf.getParameter<bool>("setNoiseFlagsQIE8")),
348  setNoiseFlagsQIE11_(conf.getParameter<bool>("setNoiseFlagsQIE11")),
349  setPulseShapeFlagsQIE8_(conf.getParameter<bool>("setPulseShapeFlagsQIE8")),
350  setPulseShapeFlagsQIE11_(conf.getParameter<bool>("setPulseShapeFlagsQIE11")),
352  negEFilter_(nullptr) {
353  // Check that the reco algorithm has been successfully configured
354  if (!reco_.get())
355  throw cms::Exception("HBHEPhase1BadConfig") << "Invalid HBHEPhase1Algo algorithm configuration" << std::endl;
356 
357  // Configure the status bit setters that have been turned on
358  if (setNoiseFlagsQIE8_)
359  hbheFlagSetterQIE8_ = parse_HBHEStatusBitSetter(conf.getParameter<edm::ParameterSet>("flagParametersQIE8"));
360 
362  hbheFlagSetterQIE11_ = parse_HBHEStatusBitSetter(conf.getParameter<edm::ParameterSet>("flagParametersQIE11"));
363 
366  parse_HBHEPulseShapeFlagSetter(conf.getParameter<edm::ParameterSet>("pulseShapeParametersQIE8"),
367  conf.getParameter<bool>("setLegacyFlagsQIE8"));
368 
371  parse_HBHEPulseShapeFlagSetter(conf.getParameter<edm::ParameterSet>("pulseShapeParametersQIE11"),
372  conf.getParameter<bool>("setLegacyFlagsQIE11"));
373 
374  // Consumes and produces statements
375  if (processQIE8_)
376  tok_qie8_ = consumes<HBHEDigiCollection>(conf.getParameter<edm::InputTag>("digiLabelQIE8"));
377 
378  if (processQIE11_)
379  tok_qie11_ = consumes<QIE11DigiCollection>(conf.getParameter<edm::InputTag>("digiLabelQIE11"));
380 
381  if (saveInfos_)
382  produces<HBHEChannelInfoCollection>();
383 
384  if (makeRecHits_)
385  produces<HBHERecHitCollection>();
386 }

References edm::ParameterSet::getParameter(), hbheFlagSetterQIE11_, hbheFlagSetterQIE8_, hbhePulseShapeFlagSetterQIE11_, hbhePulseShapeFlagSetterQIE8_, makeRecHits_, processQIE11_, processQIE8_, reco_, saveInfos_, setNoiseFlagsQIE11_, setNoiseFlagsQIE8_, setPulseShapeFlagsQIE11_, setPulseShapeFlagsQIE8_, tok_qie11_, and tok_qie8_.

◆ ~HBHEPhase1Reconstructor()

HBHEPhase1Reconstructor::~HBHEPhase1Reconstructor ( )
override

Definition at line 388 of file HBHEPhase1Reconstructor.cc.

388  {
389  // do anything here that needs to be done at destruction time
390  // (e.g. close files, deallocate resources etc.)
391 }

Member Function Documentation

◆ beginRun()

void HBHEPhase1Reconstructor::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
overrideprivate

Definition at line 688 of file HBHEPhase1Reconstructor.cc.

688  {
690  es.get<HcalRecoParamsRcd>().get(p);
691  paramTS_ = std::make_unique<HcalRecoParams>(*p.product());
692 
693  if (reco_->isConfigurable()) {
695  if (!recoConfig_.get())
696  throw cms::Exception("HBHEPhase1BadConfig")
697  << "Invalid HBHEPhase1Reconstructor \"algoConfigClass\" parameter value \"" << algoConfigClass_ << '"'
698  << std::endl;
699  if (!reco_->configure(recoConfig_.get()))
700  throw cms::Exception("HBHEPhase1BadConfig")
701  << "Failed to configure HBHEPhase1Algo algorithm from EventSetup" << std::endl;
702  }
703 
706  es.get<HcalFrontEndMapRcd>().get(hfemap);
707  if (hfemap.isValid()) {
708  if (setNoiseFlagsQIE8_)
709  hbheFlagSetterQIE8_->SetFrontEndMap(hfemap.product());
711  hbheFlagSetterQIE11_->SetFrontEndMap(hfemap.product());
712  } else
713  edm::LogWarning("EventSetup") << "HBHEPhase1Reconstructor failed to get HcalFrontEndMap!" << std::endl;
714  }
715 
716  reco_->beginRun(r, es);
717 }

References algoConfigClass_, Exception, fetchHcalAlgoData(), edm::EventSetup::get(), get, hbheFlagSetterQIE11_, hbheFlagSetterQIE8_, edm::ESHandleBase::isValid(), AlCaHLTBitMon_ParallelJobs::p, paramTS_, edm::ESHandle< T >::product(), alignCSCRings::r, reco_, recoConfig_, setNoiseFlagsQIE11_, and setNoiseFlagsQIE8_.

◆ endRun()

void HBHEPhase1Reconstructor::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 719 of file HBHEPhase1Reconstructor.cc.

719 { reco_->endRun(); }

References reco_.

◆ fillDescriptions()

void HBHEPhase1Reconstructor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 727 of file HBHEPhase1Reconstructor.cc.

727  {
729 
730  desc.add<edm::InputTag>("digiLabelQIE8");
731  desc.add<edm::InputTag>("digiLabelQIE11");
732  desc.add<std::string>("algoConfigClass");
733  desc.add<bool>("processQIE8");
734  desc.add<bool>("processQIE11");
735  desc.add<bool>("saveInfos");
736  desc.add<bool>("saveDroppedInfos");
737  desc.add<bool>("makeRecHits");
738  desc.add<bool>("dropZSmarkedPassed");
739  desc.add<bool>("tsFromDB");
740  desc.add<bool>("recoParamsFromDB");
741  desc.add<bool>("saveEffectivePedestal", false);
742  desc.add<bool>("use8ts", false);
743  desc.add<int>("sipmQTSShift", 0);
744  desc.add<int>("sipmQNTStoSum", 3);
745  desc.add<bool>("setNegativeFlagsQIE8");
746  desc.add<bool>("setNegativeFlagsQIE11");
747  desc.add<bool>("setNoiseFlagsQIE8");
748  desc.add<bool>("setNoiseFlagsQIE11");
749  desc.add<bool>("setPulseShapeFlagsQIE8");
750  desc.add<bool>("setPulseShapeFlagsQIE11");
751  desc.add<bool>("setLegacyFlagsQIE8");
752  desc.add<bool>("setLegacyFlagsQIE11");
753 
759 
760  descriptions.addDefault(desc);
761 }

References edm::ParameterSetDescription::add(), add_param_set, edm::ConfigurationDescriptions::addDefault(), fillDescriptionForParseHBHEPhase1Algo(), HLT_2018_cff::flagParametersQIE11, HLT_2018_cff::flagParametersQIE8, HLT_2018_cff::pulseShapeParametersQIE11, HLT_2018_cff::pulseShapeParametersQIE8, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ processData()

template<class DFrame , class Collection >
void HBHEPhase1Reconstructor::processData ( const Collection &  coll,
const HcalDbService cond,
const HcalChannelQuality qual,
const HcalSeverityLevelComputer severity,
const bool  isRealData,
HBHEChannelInfo info,
HBHEChannelInfoCollection infoColl,
HBHERecHitCollection rechits,
const bool  use8ts 
)
private

Definition at line 397 of file HBHEPhase1Reconstructor.cc.

405  {
406  // If "saveDroppedInfos_" flag is set, fill the info with something
407  // meaningful even if the database tells us to drop this channel.
408  // Note that this flag affects only "infos", the rechits are still
409  // not going to be constructed from such channels.
410  const bool skipDroppedChannels = !(infos && saveDroppedInfos_);
411 
412  // Iterate over the input collection
413  for (typename Collection::const_iterator it = coll.begin(); it != coll.end(); ++it) {
414  const DFrame& frame(*it);
415  const HcalDetId cell(frame.id());
416 
417  // Protection against calibration channels which are not
418  // in the database but can still come in the QIE11DataFrame
419  // in the laser calibs, etc.
420  const HcalSubdetector subdet = cell.subdet();
421  if (!(subdet == HcalSubdetector::HcalBarrel || subdet == HcalSubdetector::HcalEndcap))
422  continue;
423 
424  // Check if the database tells us to drop this channel
425  const HcalChannelStatus* mydigistatus = qual.getValues(cell.rawId());
426  const bool taggedBadByDb = severity.dropChannel(mydigistatus->getValue());
427  if (taggedBadByDb && skipDroppedChannels)
428  continue;
429 
430  // Check if the channel is zero suppressed
431  bool dropByZS = false;
433  if (frame.zsMarkAndPass())
434  dropByZS = true;
435  if (dropByZS && skipDroppedChannels)
436  continue;
437 
438  // Basic ADC decoding tools
439  const HcalRecoParam* param_ts = paramTS_->getValues(cell.rawId());
440  const HcalCalibrations& calib = cond.getHcalCalibrations(cell);
441  const HcalCalibrationWidths& calibWidth = cond.getHcalCalibrationWidths(cell);
442  const HcalQIECoder* channelCoder = cond.getHcalCoder(cell);
443  const HcalQIEShape* shape = cond.getHcalShape(channelCoder);
444  const HcalCoderDb coder(*channelCoder, *shape);
445 
446  const bool saveEffectivePeds = channelInfo->hasEffectivePedestals();
447  const HcalSiPMParameter& siPMParameter(*cond.getHcalSiPMParameter(cell));
448  const double fcByPE = siPMParameter.getFCByPE();
449  double darkCurrent = 0.;
450  double lambda = 0.;
451  if (!saveEffectivePeds || saveInfos_) {
452  // needed for the dark current in the M2 in alternative of the effectivePed
453  darkCurrent = siPMParameter.getDarkCurrent();
454  lambda = cond.getHcalSiPMCharacteristics()->getCrossTalk(siPMParameter.getType());
455  }
456 
457  // ADC to fC conversion
458  CaloSamples cs;
459  coder.adc2fC(frame, cs);
460 
461  // Prepare to iterate over time slices
462  const int nRead = cs.size();
463  const int maxTS = std::min(nRead, static_cast<int>(HBHEChannelInfo::MAXSAMPLES));
464  const int soi = tsFromDB_ ? param_ts->firstSample() : frame.presamples();
465  const RawChargeFromSample<DFrame> rcfs(sipmQTSShift_, sipmQNTStoSum_, cond, cell, cs, soi, frame, maxTS);
466  int soiCapid = 4;
467 
468  // Typical expected cases:
469  // maxTS = 10, SOI = 4 (typical 10-TS situation, in data or MC)
470  // maxTS = 10, SOI = 5 (new, for better modeling of SiPM noise in MC)
471  // maxTS = 8, SOI = 3 (typical 8-TS situation in data)
472  //
473  // We want to fill the HBHEChannelInfo object with either
474  // 8 or 10 time slices, depending on the maxTS value and
475  // on the "use8ts_" parameter setting. If we want 8 time
476  // slices in the HBHEChannelInfo, we want the SOI to fall
477  // on the time slice number 3. For now, this number is not
478  // expected to change and will be hardwired.
479  //
480  int nTSToCopy = maxTS;
481  int tsShift = 0;
482  if (maxTS > 8 && use8ts_) {
483  const int soiWanted = 3;
484 
485  // We need to chop off the excess time slices
486  // and configure the TS shift for filling
487  // HBHEChannelInfo from the data frame.
488  nTSToCopy = 8;
489  tsShift = soi - soiWanted;
490 
491  // Check that the shift will not result in
492  // accessing time slices out of bounds
493  if (tsShift < 0)
494  tsShift = 0;
495  else {
496  const int nExcessTS = nRead - nTSToCopy;
497  if (tsShift > nExcessTS)
498  tsShift = nExcessTS;
499  }
500  }
501 
502  // Go over time slices and fill the samples
503  for (int copyTS = 0; copyTS < nTSToCopy; ++copyTS) {
504  const int inputTS = copyTS + tsShift;
505  auto s(frame[inputTS]);
506  const uint8_t adc = s.adc();
507  const int capid = s.capid();
508  //optionally store "effective" pedestal (measured with bias voltage on)
509  // = QIE contribution + SiPM contribution (from dark current + crosstalk)
510  const double pedestal = saveEffectivePeds ? calib.effpedestal(capid) : calib.pedestal(capid);
511  const double pedestalWidth = saveEffectivePeds ? calibWidth.effpedestal(capid) : calibWidth.pedestal(capid);
512  const double gain = calib.respcorrgain(capid);
513  const double gainWidth = calibWidth.gain(capid);
514  //always use QIE-only pedestal for this computation
515  const double rawCharge = rcfs.getRawCharge(cs[inputTS], calib.pedestal(capid));
516  const float t = getTDCTimeFromSample(s);
517  const float dfc = getDifferentialChargeGain(*channelCoder, *shape, adc, capid, channelInfo->hasTimeInfo());
518  channelInfo->setSample(copyTS, adc, dfc, rawCharge, pedestal, pedestalWidth, gain, gainWidth, t);
519  if (inputTS == soi)
520  soiCapid = capid;
521  }
522 
523  // Fill the overall channel info items
524  const int fitSoi = soi - tsShift;
525  const int pulseShapeID = param_ts->pulseShapeID();
526  const std::pair<bool, bool> hwerr = findHWErrors(frame, maxTS);
527  channelInfo->setChannelInfo(cell,
528  pulseShapeID,
529  nTSToCopy,
530  fitSoi,
531  soiCapid,
532  darkCurrent,
533  fcByPE,
534  lambda,
535  hwerr.first,
536  hwerr.second,
537  taggedBadByDb || dropByZS);
538 
539  // If needed, add the channel info to the output collection
540  const bool makeThisRechit = !channelInfo->isDropped();
541  if (infos && (saveDroppedInfos_ || makeThisRechit))
542  infos->push_back(*channelInfo);
543 
544  // Reconstruct the rechit
545  if (rechits && makeThisRechit) {
546  const HcalRecoParam* pptr = nullptr;
547  if (recoParamsFromDB_)
548  pptr = param_ts;
549  HBHERecHit rh = reco_->reconstruct(*channelInfo, pptr, calib, isRealData);
550  if (rh.id().rawId()) {
551  setAsicSpecificBits(frame, coder, *channelInfo, calib, &rh);
552  setCommonStatusBits(*channelInfo, calib, &rh);
553  rechits->push_back(rh);
554  }
555  }
556  }
557 }

References ecalMGPA::adc(), HcalCoderDb::adc2fC(), fwrapper::cs, dropZSmarkedPassed_, HcalCalibrationWidths::effpedestal(), HcalRecoParam::firstSample(), amptDefault_cfi::frame, HcalCalibrationWidths::gain(), PedestalClient_cfi::gain, HcalSiPMParameter::getFCByPE(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), HBHEChannelInfo::hasEffectivePedestals(), HBHEChannelInfo::hasTimeInfo(), HcalBarrel, HcalEndcap, HBHERecHit::id(), MessageLogger_cfi::infos, HBHEChannelInfo::isDropped(), HBHEChannelInfo::MAXSAMPLES, hcaldqm::utilities::maxTS(), min(), paramTS_, HcalCalibrationWidths::pedestal(), EcalCondDBWriter_cfi::pedestal, HcalRecoParam::pulseShapeID(), DetId::rawId(), TrackInfoProducer_cfi::rechits, reco_, recoParamsFromDB_, alignCSCRings::s, saveDroppedInfos_, saveInfos_, setAsicSpecificBits(), HBHEChannelInfo::setChannelInfo(), setCommonStatusBits(), HBHEChannelInfo::setSample(), HLT_2018_cff::severity, sipmQNTStoSum_, sipmQTSShift_, HcalDetId::subdet(), OrderedSet::t, tsFromDB_, and use8ts_.

◆ produce()

void HBHEPhase1Reconstructor::produce ( edm::Event e,
const edm::EventSetup eventSetup 
)
overrideprivate

Definition at line 604 of file HBHEPhase1Reconstructor.cc.

604  {
605  using namespace edm;
606 
607  // Get the Hcal topology
609  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
610  paramTS_->setTopo(htopo.product());
611 
612  // Fetch the calibrations
613  ESHandle<HcalDbService> conditions;
614  eventSetup.get<HcalDbRecord>().get(conditions);
615 
617  eventSetup.get<HcalChannelQualityRcd>().get("withTopo", p);
618 
620  eventSetup.get<HcalSeverityLevelComputerRcd>().get(mycomputer);
621 
622  // Configure the negative energy filter
625  eventSetup.get<HBHENegativeEFilterRcd>().get(negEHandle);
626  negEFilter_ = negEHandle.product();
627  }
628 
629  // Find the input data
630  unsigned maxOutputSize = 0;
632  if (processQIE8_) {
633  e.getByToken(tok_qie8_, hbDigis);
634  maxOutputSize += hbDigis->size();
635  }
636 
638  if (processQIE11_) {
639  e.getByToken(tok_qie11_, heDigis);
640  maxOutputSize += heDigis->size();
641  }
642 
643  // Create new output collections
644  std::unique_ptr<HBHEChannelInfoCollection> infos;
645  if (saveInfos_) {
646  infos = std::make_unique<HBHEChannelInfoCollection>();
647  infos->reserve(maxOutputSize);
648  }
649 
650  std::unique_ptr<HBHERecHitCollection> out;
651  if (makeRecHits_) {
652  out = std::make_unique<HBHERecHitCollection>();
653  out->reserve(maxOutputSize);
654  }
655 
656  // Process the input collections, filling the output ones
657  const bool isData = e.isRealData();
658  if (processQIE8_) {
659  if (setNoiseFlagsQIE8_)
660  hbheFlagSetterQIE8_->Clear();
661 
662  HBHEChannelInfo channelInfo(false, false);
663  processData<HBHEDataFrame>(
664  *hbDigis, *conditions, *p, *mycomputer, isData, &channelInfo, infos.get(), out.get(), use8ts_);
665  if (setNoiseFlagsQIE8_)
666  hbheFlagSetterQIE8_->SetFlagsFromRecHits(*out);
667  }
668 
669  if (processQIE11_) {
671  hbheFlagSetterQIE11_->Clear();
672 
673  HBHEChannelInfo channelInfo(true, saveEffectivePedestal_);
674  processData<QIE11DataFrame>(
675  *heDigis, *conditions, *p, *mycomputer, isData, &channelInfo, infos.get(), out.get(), use8ts_);
677  hbheFlagSetterQIE11_->SetFlagsFromRecHits(*out);
678  }
679 
680  // Add the output collections to the event record
681  if (saveInfos_)
682  e.put(std::move(infos));
683  if (makeRecHits_)
684  e.put(std::move(out));
685 }

References MillePedeFileConverter_cfg::e, edm::EventSetup::get(), get, hbheFlagSetterQIE11_, hbheFlagSetterQIE8_, MessageLogger_cfi::infos, HLTBitAnalyser_cfi::isData, makeRecHits_, eostools::move(), negEFilter_, MillePedeFileConverter_cfg::out, AlCaHLTBitMon_ParallelJobs::p, paramTS_, processQIE11_, processQIE8_, edm::ESHandle< T >::product(), saveEffectivePedestal_, saveInfos_, setNegativeFlagsQIE11_, setNegativeFlagsQIE8_, setNoiseFlagsQIE11_, setNoiseFlagsQIE8_, edm::SortedCollection< T, SORT >::size(), edm::DataFrameContainer::size(), tok_qie11_, tok_qie8_, and use8ts_.

◆ runHBHENegativeEFilter()

void HBHEPhase1Reconstructor::runHBHENegativeEFilter ( const HBHEChannelInfo info,
HBHERecHit rh 
)
private

Definition at line 593 of file HBHEPhase1Reconstructor.cc.

593  {
594  double ts[HBHEChannelInfo::MAXSAMPLES];
595  const unsigned nRead = info.nSamples();
596  for (unsigned i = 0; i < nRead; ++i)
597  ts[i] = info.tsCharge(i);
598  const bool passes = negEFilter_->checkPassFilter(info.id(), &ts[0], nRead);
599  if (!passes)
601 }

References HBHENegativeEFilter::checkPassFilter(), HcalPhase1FlagLabels::HBHENegativeNoise, mps_fire::i, info(), HBHEChannelInfo::MAXSAMPLES, negEFilter_, and CaloRecHit::setFlagField().

Referenced by setAsicSpecificBits().

◆ setAsicSpecificBits() [1/2]

void HBHEPhase1Reconstructor::setAsicSpecificBits ( const HBHEDataFrame frame,
const HcalCoder coder,
const HBHEChannelInfo info,
const HcalCalibrations calib,
HBHERecHit rh 
)
private

◆ setAsicSpecificBits() [2/2]

void HBHEPhase1Reconstructor::setAsicSpecificBits ( const QIE11DataFrame frame,
const HcalCoder coder,
const HBHEChannelInfo info,
const HcalCalibrations calib,
HBHERecHit rh 
)
private

◆ setCommonStatusBits()

void HBHEPhase1Reconstructor::setCommonStatusBits ( const HBHEChannelInfo info,
const HcalCalibrations calib,
HBHERecHit rh 
)
private

Definition at line 559 of file HBHEPhase1Reconstructor.cc.

561  {}

Referenced by processData().

Member Data Documentation

◆ algoConfigClass_

std::string HBHEPhase1Reconstructor::algoConfigClass_
private

Definition at line 263 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun().

◆ dropZSmarkedPassed_

bool HBHEPhase1Reconstructor::dropZSmarkedPassed_
private

Definition at line 269 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ hbheFlagSetterQIE11_

std::unique_ptr<HBHEStatusBitSetter> HBHEPhase1Reconstructor::hbheFlagSetterQIE11_
private

◆ hbheFlagSetterQIE8_

std::unique_ptr<HBHEStatusBitSetter> HBHEPhase1Reconstructor::hbheFlagSetterQIE8_
private

◆ hbhePulseShapeFlagSetterQIE11_

std::unique_ptr<HBHEPulseShapeFlagSetter> HBHEPhase1Reconstructor::hbhePulseShapeFlagSetterQIE11_
private

Definition at line 297 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ hbhePulseShapeFlagSetterQIE8_

std::unique_ptr<HBHEPulseShapeFlagSetter> HBHEPhase1Reconstructor::hbhePulseShapeFlagSetterQIE8_
private

Definition at line 296 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ makeRecHits_

bool HBHEPhase1Reconstructor::makeRecHits_
private

Definition at line 268 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ negEFilter_

const HBHENegativeEFilter* HBHEPhase1Reconstructor::negEFilter_
private

Definition at line 293 of file HBHEPhase1Reconstructor.cc.

Referenced by produce(), and runHBHENegativeEFilter().

◆ paramTS_

std::unique_ptr<HcalRecoParams> HBHEPhase1Reconstructor::paramTS_
private

Definition at line 290 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun(), processData(), and produce().

◆ processQIE11_

bool HBHEPhase1Reconstructor::processQIE11_
private

Definition at line 265 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ processQIE8_

bool HBHEPhase1Reconstructor::processQIE8_
private

Definition at line 264 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ reco_

std::unique_ptr<AbsHBHEPhase1Algo> HBHEPhase1Reconstructor::reco_
private

Definition at line 288 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun(), endRun(), HBHEPhase1Reconstructor(), and processData().

◆ recoConfig_

std::unique_ptr<AbsHcalAlgoData> HBHEPhase1Reconstructor::recoConfig_
private

Definition at line 289 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun().

◆ recoParamsFromDB_

bool HBHEPhase1Reconstructor::recoParamsFromDB_
private

Definition at line 271 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ saveDroppedInfos_

bool HBHEPhase1Reconstructor::saveDroppedInfos_
private

Definition at line 267 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ saveEffectivePedestal_

bool HBHEPhase1Reconstructor::saveEffectivePedestal_
private

Definition at line 272 of file HBHEPhase1Reconstructor.cc.

Referenced by produce().

◆ saveInfos_

bool HBHEPhase1Reconstructor::saveInfos_
private

Definition at line 266 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), processData(), and produce().

◆ setNegativeFlagsQIE11_

bool HBHEPhase1Reconstructor::setNegativeFlagsQIE11_
private

Definition at line 279 of file HBHEPhase1Reconstructor.cc.

Referenced by produce(), and setAsicSpecificBits().

◆ setNegativeFlagsQIE8_

bool HBHEPhase1Reconstructor::setNegativeFlagsQIE8_
private

Definition at line 278 of file HBHEPhase1Reconstructor.cc.

Referenced by produce(), and setAsicSpecificBits().

◆ setNoiseFlagsQIE11_

bool HBHEPhase1Reconstructor::setNoiseFlagsQIE11_
private

◆ setNoiseFlagsQIE8_

bool HBHEPhase1Reconstructor::setNoiseFlagsQIE8_
private

◆ setPulseShapeFlagsQIE11_

bool HBHEPhase1Reconstructor::setPulseShapeFlagsQIE11_
private

Definition at line 283 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ setPulseShapeFlagsQIE8_

bool HBHEPhase1Reconstructor::setPulseShapeFlagsQIE8_
private

Definition at line 282 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ sipmQNTStoSum_

int HBHEPhase1Reconstructor::sipmQNTStoSum_
private

Definition at line 275 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ sipmQTSShift_

int HBHEPhase1Reconstructor::sipmQTSShift_
private

Definition at line 274 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ tok_qie11_

edm::EDGetTokenT<QIE11DigiCollection> HBHEPhase1Reconstructor::tok_qie11_
private

Definition at line 287 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ tok_qie8_

edm::EDGetTokenT<HBHEDigiCollection> HBHEPhase1Reconstructor::tok_qie8_
private

Definition at line 286 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ tsFromDB_

bool HBHEPhase1Reconstructor::tsFromDB_
private

Definition at line 270 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ use8ts_

bool HBHEPhase1Reconstructor::use8ts_
private

Definition at line 273 of file HBHEPhase1Reconstructor.cc.

Referenced by processData(), and produce().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HBHEPhase1Reconstructor::recoConfig_
std::unique_ptr< AbsHcalAlgoData > recoConfig_
Definition: HBHEPhase1Reconstructor.cc:289
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
HcalPhase1FlagLabels::HBHENegativeNoise
Definition: HcalPhase1FlagLabels.h:13
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HBHEPhase1Reconstructor::hbheFlagSetterQIE11_
std::unique_ptr< HBHEStatusBitSetter > hbheFlagSetterQIE11_
Definition: HBHEPhase1Reconstructor.cc:295
HBHENegativeEFilter::checkPassFilter
bool checkPassFilter(const HcalDetId &id, const double *ts, unsigned lenTS) const
Definition: HBHENegativeEFilter.cc:76
HBHEPhase1Reconstructor::saveDroppedInfos_
bool saveDroppedInfos_
Definition: HBHEPhase1Reconstructor.cc:267
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
HcalChannelQualityRcd
Definition: HcalChannelQualityRcd.h:8
min
T min(T a, T b)
Definition: MathUtil.h:58
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HBHERecHit
Definition: HBHERecHit.h:13
HcalCalibrationWidths::effpedestal
double effpedestal(int fCapId) const
get effective pedestal width for capid=0..3
Definition: HcalCalibrationWidths.h:18
HBHEPhase1Reconstructor::setCommonStatusBits
void setCommonStatusBits(const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
Definition: HBHEPhase1Reconstructor.cc:559
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HcalSiPMParameter::getFCByPE
float getFCByPE() const
get fcByPE
Definition: HcalSiPMParameter.h:12
HLT_2018_cff.flagParametersQIE11
flagParametersQIE11
Definition: HLT_2018_cff.py:7031
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
HBHEPhase1Reconstructor::dropZSmarkedPassed_
bool dropZSmarkedPassed_
Definition: HBHEPhase1Reconstructor.cc:269
hcaldqm::utilities::maxTS
int maxTS(DIGI const &digi, double ped=0)
Definition: Utilities.h:102
HcalBarrel
Definition: HcalAssistant.h:33
HBHEPhase1Reconstructor::algoConfigClass_
std::string algoConfigClass_
Definition: HBHEPhase1Reconstructor.cc:263
edm::Handle
Definition: AssociativeIterator.h:50
HBHEPhase1Reconstructor::setNegativeFlagsQIE11_
bool setNegativeFlagsQIE11_
Definition: HBHEPhase1Reconstructor.cc:279
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
HBHEPhase1Reconstructor::sipmQTSShift_
int sipmQTSShift_
Definition: HBHEPhase1Reconstructor.cc:274
HBHEPhase1Reconstructor::setPulseShapeFlagsQIE11_
bool setPulseShapeFlagsQIE11_
Definition: HBHEPhase1Reconstructor.cc:283
HLT_2018_cff.flagParametersQIE8
flagParametersQIE8
Definition: HLT_2018_cff.py:7061
add_param_set
#define add_param_set(name)
Definition: HBHEPhase1Reconstructor.cc:721
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HBHEPhase1Reconstructor::tok_qie8_
edm::EDGetTokenT< HBHEDigiCollection > tok_qie8_
Definition: HBHEPhase1Reconstructor.cc:286
HBHEPhase1Reconstructor::makeRecHits_
bool makeRecHits_
Definition: HBHEPhase1Reconstructor.cc:268
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
HcalRecoParam
Definition: HcalRecoParam.h:16
HBHENegativeEFilterRcd
Definition: HBHENegativeEFilterRcd.h:23
HcalChannelStatus
Definition: HcalChannelStatus.h:13
HBHEPhase1Reconstructor::runHBHENegativeEFilter
void runHBHENegativeEFilter(const HBHEChannelInfo &info, HBHERecHit *rh)
Definition: HBHEPhase1Reconstructor.cc:593
HLTBitAnalyser_cfi.isData
isData
Definition: HLTBitAnalyser_cfi.py:29
edm::ESHandle
Definition: DTSurvey.h:22
HBHEPhase1Reconstructor::tok_qie11_
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_
Definition: HBHEPhase1Reconstructor.cc:287
HBHEPhase1Reconstructor::paramTS_
std::unique_ptr< HcalRecoParams > paramTS_
Definition: HBHEPhase1Reconstructor.cc:290
HBHEPhase1Reconstructor::setNoiseFlagsQIE8_
bool setNoiseFlagsQIE8_
Definition: HBHEPhase1Reconstructor.cc:280
HcalCalibrations
Definition: HcalCalibrations.h:9
OrderedSet.t
t
Definition: OrderedSet.py:90
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
HBHEPhase1Reconstructor::reco_
std::unique_ptr< AbsHBHEPhase1Algo > reco_
Definition: HBHEPhase1Reconstructor.cc:288
HBHEPhase1Reconstructor::setPulseShapeFlagsQIE8_
bool setPulseShapeFlagsQIE8_
Definition: HBHEPhase1Reconstructor.cc:282
HBHEPhase1Reconstructor::hbhePulseShapeFlagSetterQIE11_
std::unique_ptr< HBHEPulseShapeFlagSetter > hbhePulseShapeFlagSetterQIE11_
Definition: HBHEPhase1Reconstructor.cc:297
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
calib
Definition: CalibElectron.h:12
HBHEPhase1Reconstructor::saveEffectivePedestal_
bool saveEffectivePedestal_
Definition: HBHEPhase1Reconstructor.cc:272
edm::LogWarning
Definition: MessageLogger.h:141
cond
Definition: plugin.cc:23
HBHEPhase1Reconstructor::tsFromDB_
bool tsFromDB_
Definition: HBHEPhase1Reconstructor.cc:270
HcalChannelStatus::getValue
uint32_t getValue() const
Definition: HcalChannelStatus.h:60
HBHEPhase1Reconstructor::processQIE11_
bool processQIE11_
Definition: HBHEPhase1Reconstructor.cc:265
edm::ParameterSet
Definition: ParameterSet.h:36
HcalRecoParam::pulseShapeID
constexpr unsigned int pulseShapeID() const
Definition: HcalRecoParam.h:33
fetchHcalAlgoData
std::unique_ptr< AbsHcalAlgoData > fetchHcalAlgoData(const std::string &className, const edm::EventSetup &es)
Definition: fetchHcalAlgoData.cc:21
MessageLogger_cfi.infos
infos
Definition: MessageLogger_cfi.py:67
HBHEPhase1Reconstructor::setNoiseFlagsQIE11_
bool setNoiseFlagsQIE11_
Definition: HBHEPhase1Reconstructor.cc:281
TrackInfoProducer_cfi.rechits
rechits
Definition: TrackInfoProducer_cfi.py:9
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
HLT_2018_cff.severity
severity
Definition: HLT_2018_cff.py:48631
HcalFrontEndMapRcd
Definition: HcalFrontEndMapRcd.h:7
fillDescriptionForParseHBHEPhase1Algo
edm::ParameterSetDescription fillDescriptionForParseHBHEPhase1Algo()
Definition: parseHBHEPhase1AlgoDescription.cc:144
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
CaloSamples
Definition: CaloSamples.h:14
HBHEPhase1Reconstructor::sipmQNTStoSum_
int sipmQNTStoSum_
Definition: HBHEPhase1Reconstructor.cc:275
get
#define get
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
HcalQIECoder
Definition: HcalQIECoder.h:20
alignCSCRings.r
r
Definition: alignCSCRings.py:93
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HLT_2018_cff.pulseShapeParametersQIE8
pulseShapeParametersQIE8
Definition: HLT_2018_cff.py:7033
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HcalRecoParam::firstSample
constexpr unsigned int firstSample() const
Definition: HcalRecoParam.h:31
HBHEChannelInfo::MAXSAMPLES
static const unsigned MAXSAMPLES
Definition: HBHEChannelInfo.h:19
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalCalibrationWidths::pedestal
double pedestal(int fCapId) const
get pedestal width for capid=0..3
Definition: HcalCalibrationWidths.h:16
HcalEndcap
Definition: HcalAssistant.h:34
HcalCalibrationWidths::gain
double gain(int fCapId) const
get gain width for capid=0..3
Definition: HcalCalibrationWidths.h:14
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
Exception
Definition: hltDiff.cc:246
HBHEPhase1Reconstructor::processQIE8_
bool processQIE8_
Definition: HBHEPhase1Reconstructor.cc:264
HcalRecoParamsRcd
Definition: HcalRecoParamsRcd.h:6
HLT_2018_cff.pulseShapeParametersQIE11
pulseShapeParametersQIE11
Definition: HLT_2018_cff.py:7028
HcalQIEShape
Definition: HcalQIEShape.h:17
HcalCoderDb
Definition: HcalCoderDb.h:15
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HBHEPhase1Reconstructor::use8ts_
bool use8ts_
Definition: HBHEPhase1Reconstructor.cc:273
CaloRecHit::setFlagField
constexpr void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.h:36
parseHBHEPhase1AlgoDescription
std::unique_ptr< AbsHBHEPhase1Algo > parseHBHEPhase1AlgoDescription(const edm::ParameterSet &ps)
Definition: parseHBHEPhase1AlgoDescription.cc:107
cms::Exception
Definition: Exception.h:70
HBHEPhase1Reconstructor::setAsicSpecificBits
void setAsicSpecificBits(const HBHEDataFrame &frame, const HcalCoder &coder, const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
Definition: HBHEPhase1Reconstructor.cc:563
HBHEPhase1Reconstructor::setNegativeFlagsQIE8_
bool setNegativeFlagsQIE8_
Definition: HBHEPhase1Reconstructor.cc:278
HcalDbRecord
Definition: HcalDbRecord.h:30
HBHERecHit::id
constexpr HcalDetId id() const
get the id
Definition: HBHERecHit.h:39
HcalCalibrationWidths
Definition: HcalCalibrationWidths.h:9
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
HBHEPhase1Reconstructor::recoParamsFromDB_
bool recoParamsFromDB_
Definition: HBHEPhase1Reconstructor.cc:271
HBHEPhase1Reconstructor::saveInfos_
bool saveInfos_
Definition: HBHEPhase1Reconstructor.cc:266
HcalSiPMParameter
Definition: HcalSiPMParameter.h:7
edm::InputTag
Definition: InputTag.h:15
HcalSeverityLevelComputerRcd
Definition: HcalSeverityLevelComputerRcd.h:23
HBHEPhase1Reconstructor::hbhePulseShapeFlagSetterQIE8_
std::unique_ptr< HBHEPulseShapeFlagSetter > hbhePulseShapeFlagSetterQIE8_
Definition: HBHEPhase1Reconstructor.cc:296
HBHEChannelInfo
Definition: HBHEChannelInfo.h:15
HBHEPhase1Reconstructor::negEFilter_
const HBHENegativeEFilter * negEFilter_
Definition: HBHEPhase1Reconstructor.cc:293
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HBHEPhase1Reconstructor::hbheFlagSetterQIE8_
std::unique_ptr< HBHEStatusBitSetter > hbheFlagSetterQIE8_
Definition: HBHEPhase1Reconstructor.cc:294