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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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 HcalTopology &htopo, const HcalDbService &cond, const HcalChannelPropertiesVec &prop, const bool isRealData, HBHEChannelInfo *info, HBHEChannelInfoCollection *infoColl, HBHERecHitCollection *rechits)
 
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, int soi, HBHERecHit *rh)
 
void setAsicSpecificBits (const QIE11DataFrame &frame, const HcalCoder &coder, const HBHEChannelInfo &info, const HcalCalibrations &calib, int soi, HBHERecHit *rh)
 
void setCommonStatusBits (const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
 

Private Attributes

std::string algoConfigClass_
 
edm::ESGetToken< HcalDbService, HcalDbRecordconditionsToken_
 
bool dropZSmarkedPassed_
 
edm::ESGetToken< HcalFrontEndMap, HcalFrontEndMapRcdfeMapToken_
 
std::unique_ptr< HBHEStatusBitSetterhbheFlagSetterQIE11_
 
std::unique_ptr< HBHEStatusBitSetterhbheFlagSetterQIE8_
 
std::unique_ptr< HBHEPulseShapeFlagSetterhbhePulseShapeFlagSetterQIE11_
 
std::unique_ptr< HBHEPulseShapeFlagSetterhbhePulseShapeFlagSetterQIE8_
 
edm::ESGetToken< HcalTopology, HcalRecNumberingRecordhtopoToken_
 
bool makeRecHits_
 
const HBHENegativeEFilternegEFilter_
 
edm::ESGetToken< HBHENegativeEFilter, HBHENegativeEFilterRcdnegToken_
 
bool processQIE11_
 
bool processQIE8_
 
edm::ESGetToken< HcalChannelPropertiesVec, HcalChannelPropertiesRecordpropertiesToken_
 
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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Description: Phase 1 reconstruction module for HB/HE

Implementation: [Notes on implementation]

Definition at line 285 of file HBHEPhase1Reconstructor.cc.

Constructor & Destructor Documentation

◆ HBHEPhase1Reconstructor()

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

Definition at line 373 of file HBHEPhase1Reconstructor.cc.

374  : algoConfigClass_(conf.getParameter<std::string>("algoConfigClass")),
375  processQIE8_(conf.getParameter<bool>("processQIE8")),
376  processQIE11_(conf.getParameter<bool>("processQIE11")),
377  saveInfos_(conf.getParameter<bool>("saveInfos")),
378  saveDroppedInfos_(conf.getParameter<bool>("saveDroppedInfos")),
379  makeRecHits_(conf.getParameter<bool>("makeRecHits")),
380  dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")),
381  tsFromDB_(conf.getParameter<bool>("tsFromDB")),
382  recoParamsFromDB_(conf.getParameter<bool>("recoParamsFromDB")),
383  saveEffectivePedestal_(conf.getParameter<bool>("saveEffectivePedestal")),
384  use8ts_(conf.getParameter<bool>("use8ts")),
385  sipmQTSShift_(conf.getParameter<int>("sipmQTSShift")),
386  sipmQNTStoSum_(conf.getParameter<int>("sipmQNTStoSum")),
387  setNegativeFlagsQIE8_(conf.getParameter<bool>("setNegativeFlagsQIE8")),
388  setNegativeFlagsQIE11_(conf.getParameter<bool>("setNegativeFlagsQIE11")),
389  setNoiseFlagsQIE8_(conf.getParameter<bool>("setNoiseFlagsQIE8")),
390  setNoiseFlagsQIE11_(conf.getParameter<bool>("setNoiseFlagsQIE11")),
391  setPulseShapeFlagsQIE8_(conf.getParameter<bool>("setPulseShapeFlagsQIE8")),
392  setPulseShapeFlagsQIE11_(conf.getParameter<bool>("setPulseShapeFlagsQIE11")),
393  reco_(parseHBHEPhase1AlgoDescription(conf.getParameter<edm::ParameterSet>("algorithm"), consumesCollector())),
394  negEFilter_(nullptr) {
395  // Check that the reco algorithm has been successfully configured
396  if (!reco_.get())
397  throw cms::Exception("HBHEPhase1BadConfig") << "Invalid HBHEPhase1Algo algorithm configuration" << std::endl;
398 
399  // Configure the status bit setters that have been turned on
400  if (setNoiseFlagsQIE8_)
401  hbheFlagSetterQIE8_ = parse_HBHEStatusBitSetter(conf.getParameter<edm::ParameterSet>("flagParametersQIE8"));
402 
404  hbheFlagSetterQIE11_ = parse_HBHEStatusBitSetter(conf.getParameter<edm::ParameterSet>("flagParametersQIE11"));
405 
408  parse_HBHEPulseShapeFlagSetter(conf.getParameter<edm::ParameterSet>("pulseShapeParametersQIE8"),
409  conf.getParameter<bool>("setLegacyFlagsQIE8"));
410 
413  parse_HBHEPulseShapeFlagSetter(conf.getParameter<edm::ParameterSet>("pulseShapeParametersQIE11"),
414  conf.getParameter<bool>("setLegacyFlagsQIE11"));
415 
416  // Consumes and produces statements
417  if (processQIE8_)
418  tok_qie8_ = consumes<HBHEDigiCollection>(conf.getParameter<edm::InputTag>("digiLabelQIE8"));
419 
420  if (processQIE11_)
421  tok_qie11_ = consumes<QIE11DigiCollection>(conf.getParameter<edm::InputTag>("digiLabelQIE11"));
422 
423  if (saveInfos_)
424  produces<HBHEChannelInfoCollection>();
425 
426  if (makeRecHits_)
427  produces<HBHERecHitCollection>();
428 
429  // ES tokens
430  htopoToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
431  conditionsToken_ = esConsumes<HcalDbService, HcalDbRecord>();
432  propertiesToken_ = esConsumes<HcalChannelPropertiesVec, HcalChannelPropertiesRecord>();
434  negToken_ = esConsumes<HBHENegativeEFilter, HBHENegativeEFilterRcd>();
436  feMapToken_ = esConsumes<HcalFrontEndMap, HcalFrontEndMapRcd, edm::Transition::BeginRun>();
437 }

References conditionsToken_, feMapToken_, edm::ParameterSet::getParameter(), hbheFlagSetterQIE11_, hbheFlagSetterQIE8_, hbhePulseShapeFlagSetterQIE11_, hbhePulseShapeFlagSetterQIE8_, htopoToken_, makeRecHits_, negToken_, processQIE11_, processQIE8_, propertiesToken_, reco_, saveInfos_, setNegativeFlagsQIE11_, setNegativeFlagsQIE8_, setNoiseFlagsQIE11_, setNoiseFlagsQIE8_, setPulseShapeFlagsQIE11_, setPulseShapeFlagsQIE8_, tok_qie11_, and tok_qie8_.

◆ ~HBHEPhase1Reconstructor()

HBHEPhase1Reconstructor::~HBHEPhase1Reconstructor ( )
override

Definition at line 439 of file HBHEPhase1Reconstructor.cc.

439  {
440  // do anything here that needs to be done at destruction time
441  // (e.g. close files, deallocate resources etc.)
442 }

Member Function Documentation

◆ beginRun()

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

Definition at line 724 of file HBHEPhase1Reconstructor.cc.

724  {
725  if (reco_->isConfigurable()) {
727  if (!recoConfig_.get())
728  throw cms::Exception("HBHEPhase1BadConfig")
729  << "Invalid HBHEPhase1Reconstructor \"algoConfigClass\" parameter value \"" << algoConfigClass_ << '"'
730  << std::endl;
731  if (!reco_->configure(recoConfig_.get()))
732  throw cms::Exception("HBHEPhase1BadConfig")
733  << "Failed to configure HBHEPhase1Algo algorithm from EventSetup" << std::endl;
734  }
735 
737  if (auto handle = es.getHandle(feMapToken_)) {
738  const HcalFrontEndMap& hfemap = *handle;
739  if (setNoiseFlagsQIE8_)
740  hbheFlagSetterQIE8_->SetFrontEndMap(&hfemap);
742  hbheFlagSetterQIE11_->SetFrontEndMap(&hfemap);
743  } else {
744  edm::LogWarning("EventSetup") << "HBHEPhase1Reconstructor failed to get HcalFrontEndMap!" << std::endl;
745  }
746  }
747 
748  reco_->beginRun(r, es);
749 }

References algoConfigClass_, Exception, feMapToken_, fetchHcalAlgoData(), edm::EventSetup::getHandle(), patZpeak::handle, hbheFlagSetterQIE11_, hbheFlagSetterQIE8_, alignCSCRings::r, reco_, recoConfig_, setNoiseFlagsQIE11_, and setNoiseFlagsQIE8_.

◆ endRun()

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

Definition at line 751 of file HBHEPhase1Reconstructor.cc.

751 { reco_->endRun(); }

References reco_.

◆ fillDescriptions()

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

Definition at line 759 of file HBHEPhase1Reconstructor.cc.

759  {
761 
762  desc.add<edm::InputTag>("digiLabelQIE8");
763  desc.add<edm::InputTag>("digiLabelQIE11");
764  desc.add<std::string>("algoConfigClass");
765  desc.add<bool>("processQIE8");
766  desc.add<bool>("processQIE11");
767  desc.add<bool>("saveInfos");
768  desc.add<bool>("saveDroppedInfos");
769  desc.add<bool>("makeRecHits");
770  desc.add<bool>("dropZSmarkedPassed");
771  desc.add<bool>("tsFromDB");
772  desc.add<bool>("recoParamsFromDB");
773  desc.add<bool>("saveEffectivePedestal", false);
774  desc.add<bool>("use8ts", false);
775  desc.add<int>("sipmQTSShift", 0);
776  desc.add<int>("sipmQNTStoSum", 3);
777  desc.add<bool>("setNegativeFlagsQIE8");
778  desc.add<bool>("setNegativeFlagsQIE11");
779  desc.add<bool>("setNoiseFlagsQIE8");
780  desc.add<bool>("setNoiseFlagsQIE11");
781  desc.add<bool>("setPulseShapeFlagsQIE8");
782  desc.add<bool>("setPulseShapeFlagsQIE11");
783  desc.add<bool>("setLegacyFlagsQIE8");
784  desc.add<bool>("setLegacyFlagsQIE11");
785 
791 
792  descriptions.addDefault(desc);
793 }

References add_param_set, edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, fillDescriptionForParseHBHEPhase1Algo(), HLT_FULL_cff::flagParametersQIE11, HLT_FULL_cff::flagParametersQIE8, HLT_FULL_cff::pulseShapeParametersQIE11, HLT_FULL_cff::pulseShapeParametersQIE8, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ processData()

template<class DFrame , class Collection >
void HBHEPhase1Reconstructor::processData ( const Collection &  coll,
const HcalTopology htopo,
const HcalDbService cond,
const HcalChannelPropertiesVec prop,
const bool  isRealData,
HBHEChannelInfo info,
HBHEChannelInfoCollection infoColl,
HBHERecHitCollection rechits 
)
private

Definition at line 448 of file HBHEPhase1Reconstructor.cc.

455  {
456  // If "saveDroppedInfos_" flag is set, fill the info with something
457  // meaningful even if the database tells us to drop this channel.
458  // Note that this flag affects only "infos", the rechits are still
459  // not going to be constructed from such channels.
460  const bool skipDroppedChannels = !(infos && saveDroppedInfos_);
461 
462  // Iterate over the input collection
463  for (typename Collection::const_iterator it = coll.begin(); it != coll.end(); ++it) {
464  const DFrame& frame(*it);
465  const HcalDetId cell(frame.id());
466 
467  // Protection against calibration channels which are not
468  // in the database but can still come in the QIE11DataFrame
469  // in the laser calibs, etc.
470  const HcalSubdetector subdet = cell.subdet();
471  if (!(subdet == HcalSubdetector::HcalBarrel || subdet == HcalSubdetector::HcalEndcap))
472  continue;
473 
474  // Look up the channel properties. This lookup is O(1).
475  const HcalChannelProperties& properties(prop.at(htopo.detId2denseId(cell)));
476 
477  // Check if the database tells us to drop this channel
478  if (properties.taggedBadByDb && skipDroppedChannels)
479  continue;
480 
481  // Check if the channel is zero suppressed
482  bool dropByZS = false;
484  if (frame.zsMarkAndPass())
485  dropByZS = true;
486  if (dropByZS && skipDroppedChannels)
487  continue;
488 
489  // ADC decoding tool
490  const HcalCoderDb coder(*properties.channelCoder, *properties.shape);
491 
492  const bool saveEffectivePeds = channelInfo->hasEffectivePedestals();
493  const double fcByPE = properties.siPMParameter->getFCByPE();
494  double darkCurrent = 0.;
495  double lambda = 0.;
496  const double noisecorr = properties.siPMParameter->getauxi2();
497  if (!saveEffectivePeds || saveInfos_) {
498  // needed for the dark current in the M2 in alternative of the effectivePed
499  darkCurrent = properties.siPMParameter->getDarkCurrent();
500  lambda = cond.getHcalSiPMCharacteristics()->getCrossTalk(properties.siPMParameter->getType());
501  }
502 
503  // ADC to fC conversion
504  CaloSamples cs;
505  coder.adc2fC(frame, cs);
506 
507  // Prepare to iterate over time slices
508  const int nRead = cs.size();
509  const int maxTS = std::min(nRead, static_cast<int>(HBHEChannelInfo::MAXSAMPLES));
510  const int soi = tsFromDB_ ? properties.paramTs->firstSample() : frame.presamples();
511  const RawChargeFromSample<DFrame> rcfs(sipmQTSShift_, sipmQNTStoSum_, cond, properties, cs, soi, frame, maxTS);
512  int soiCapid = 4;
513 
514  // Typical expected cases:
515  // maxTS = 10, SOI = 4 (typical 10-TS situation, in data or MC)
516  // maxTS = 10, SOI = 5 (new, for better modeling of SiPM noise in MC)
517  // maxTS = 8, SOI = 3 (typical 8-TS situation in data)
518  //
519  // We want to fill the HBHEChannelInfo object with either
520  // 8 or 10 time slices, depending on the maxTS value and
521  // on the "use8ts_" parameter setting. If we want 8 time
522  // slices in the HBHEChannelInfo, we want the SOI to fall
523  // on the time slice number 3. For now, this number is not
524  // expected to change and will be hardwired.
525  //
526  int nTSToCopy = maxTS;
527  int tsShift = 0;
528  if (maxTS > 8 && use8ts_) {
529  const int soiWanted = 3;
530 
531  // We need to chop off the excess time slices
532  // and configure the TS shift for filling
533  // HBHEChannelInfo from the data frame.
534  nTSToCopy = 8;
535  tsShift = determineIndexShift(soi, nRead, soiWanted, nTSToCopy);
536  }
537 
538  // Go over time slices and fill the samples
539  for (int copyTS = 0; copyTS < nTSToCopy; ++copyTS) {
540  const int inputTS = copyTS + tsShift;
541  auto s(frame[inputTS]);
542  const uint8_t adc = s.adc();
543  const int capid = s.capid();
544  const HcalPipelinePedestalAndGain& pAndGain(properties.pedsAndGains.at(capid));
545 
546  // Always use QIE-only pedestal for this computation
547  const double rawCharge = rcfs.getRawCharge(cs[inputTS], pAndGain.pedestal(false));
548  const float t = getTDCTimeFromSample(s);
549  const float dfc = getDifferentialChargeGain(
550  *properties.channelCoder, *properties.shape, adc, capid, channelInfo->hasTimeInfo());
551  channelInfo->setSample(copyTS,
552  adc,
553  dfc,
554  rawCharge,
555  pAndGain.pedestal(saveEffectivePeds),
556  pAndGain.pedestalWidth(saveEffectivePeds),
557  pAndGain.gain(),
558  pAndGain.gainWidth(),
559  t);
560  if (inputTS == soi)
561  soiCapid = capid;
562  }
563 
564  // Fill the overall channel info items
565  const int fitSoi = soi - tsShift;
566  const int pulseShapeID = properties.paramTs->pulseShapeID();
567  const std::pair<bool, bool> hwerr = findHWErrors(frame, maxTS);
568  channelInfo->setChannelInfo(cell,
569  pulseShapeID,
570  nTSToCopy,
571  fitSoi,
572  soiCapid,
573  darkCurrent,
574  fcByPE,
575  lambda,
576  noisecorr,
577  hwerr.first,
578  hwerr.second,
579  properties.taggedBadByDb || dropByZS);
580 
581  // If needed, add the channel info to the output collection
582  const bool makeThisRechit = !channelInfo->isDropped();
583  if (infos && (saveDroppedInfos_ || makeThisRechit))
584  infos->push_back(*channelInfo);
585 
586  // Reconstruct the rechit
587  if (rechits && makeThisRechit) {
588  const HcalRecoParam* pptr = nullptr;
589  if (recoParamsFromDB_)
590  pptr = properties.paramTs;
591  HBHERecHit rh = reco_->reconstruct(*channelInfo, pptr, *properties.calib, isRealData);
592  if (rh.id().rawId()) {
593  setAsicSpecificBits(frame, coder, *channelInfo, *properties.calib, soi, &rh);
594  setCommonStatusBits(*channelInfo, *properties.calib, &rh);
595  rechits->push_back(rh);
596  }
597  }
598  }
599 }

References gpuClustering::adc, HcalCoderDb::adc2fC(), HcalChannelProperties::calib, HcalChannelProperties::channelCoder, fwrapper::cs, HcalTopology::detId2denseId(), dropZSmarkedPassed_, HcalRecoParam::firstSample(), amptDefault_cfi::frame, HcalSiPMParameter::getauxi2(), HcalSiPMParameter::getDarkCurrent(), HcalSiPMParameter::getFCByPE(), HcalSiPMParameter::getType(), HBHEChannelInfo::hasEffectivePedestals(), HBHEChannelInfo::hasTimeInfo(), HcalBarrel, HcalEndcap, HBHERecHit::id(), submitPVValidationJobs::infos, HBHEChannelInfo::isDropped(), HBHEChannelInfo::MAXSAMPLES, hcaldqm::utilities::maxTS(), min(), HcalChannelProperties::paramTs, HcalChannelProperties::pedsAndGains, HcalRecoParam::pulseShapeID(), DetId::rawId(), HI_PhotonSkim_cff::rechits, reco_, recoParamsFromDB_, alignCSCRings::s, saveDroppedInfos_, saveInfos_, setAsicSpecificBits(), HBHEChannelInfo::setChannelInfo(), setCommonStatusBits(), HBHEChannelInfo::setSample(), HcalChannelProperties::shape, HcalChannelProperties::siPMParameter, sipmQNTStoSum_, sipmQTSShift_, HcalDetId::subdet(), submitPVValidationJobs::t, HcalChannelProperties::taggedBadByDb, tsFromDB_, and use8ts_.

◆ produce()

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

Definition at line 652 of file HBHEPhase1Reconstructor.cc.

652  {
653  using namespace edm;
654 
655  // Get the Hcal topology
656  const HcalTopology* htopo = &eventSetup.getData(htopoToken_);
657 
658  // Fetch the calibrations
659  const HcalDbService* conditions = &eventSetup.getData(conditionsToken_);
660  const HcalChannelPropertiesVec* prop = &eventSetup.getData(propertiesToken_);
661 
662  // Configure the negative energy filter
664  negEFilter_ = &eventSetup.getData(negToken_);
665  }
666 
667  // Find the input data
668  unsigned maxOutputSize = 0;
670  if (processQIE8_) {
671  e.getByToken(tok_qie8_, hbDigis);
672  maxOutputSize += hbDigis->size();
673  }
674 
676  if (processQIE11_) {
677  e.getByToken(tok_qie11_, heDigis);
678  maxOutputSize += heDigis->size();
679  }
680 
681  // Create new output collections
682  std::unique_ptr<HBHEChannelInfoCollection> infos;
683  if (saveInfos_) {
684  infos = std::make_unique<HBHEChannelInfoCollection>();
685  infos->reserve(maxOutputSize);
686  }
687 
688  std::unique_ptr<HBHERecHitCollection> out;
689  if (makeRecHits_) {
690  out = std::make_unique<HBHERecHitCollection>();
691  out->reserve(maxOutputSize);
692  }
693 
694  // Process the input collections, filling the output ones
695  const bool isData = e.isRealData();
696  if (processQIE8_) {
697  if (setNoiseFlagsQIE8_)
698  hbheFlagSetterQIE8_->Clear();
699 
700  HBHEChannelInfo channelInfo(false, false);
701  processData<HBHEDataFrame>(*hbDigis, *htopo, *conditions, *prop, isData, &channelInfo, infos.get(), out.get());
702  if (setNoiseFlagsQIE8_)
703  hbheFlagSetterQIE8_->SetFlagsFromRecHits(*out);
704  }
705 
706  if (processQIE11_) {
708  hbheFlagSetterQIE11_->Clear();
709 
710  HBHEChannelInfo channelInfo(true, saveEffectivePedestal_);
711  processData<QIE11DataFrame>(*heDigis, *htopo, *conditions, *prop, isData, &channelInfo, infos.get(), out.get());
713  hbheFlagSetterQIE11_->SetFlagsFromRecHits(*out);
714  }
715 
716  // Add the output collections to the event record
717  if (saveInfos_)
718  e.put(std::move(infos));
719  if (makeRecHits_)
720  e.put(std::move(out));
721 }

References submitPVValidationJobs::conditions, conditionsToken_, MillePedeFileConverter_cfg::e, edm::EventSetup::getData(), hbheFlagSetterQIE11_, hbheFlagSetterQIE8_, htopoToken_, submitPVValidationJobs::infos, HLTBitAnalyser_cfi::isData, makeRecHits_, eostools::move(), negEFilter_, negToken_, MillePedeFileConverter_cfg::out, processQIE11_, processQIE8_, propertiesToken_, saveEffectivePedestal_, saveInfos_, setNegativeFlagsQIE11_, setNegativeFlagsQIE8_, setNoiseFlagsQIE11_, setNoiseFlagsQIE8_, edm::SortedCollection< T, SORT >::size(), edm::DataFrameContainer::size(), tok_qie11_, and tok_qie8_.

◆ runHBHENegativeEFilter()

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

Definition at line 641 of file HBHEPhase1Reconstructor.cc.

641  {
642  double ts[HBHEChannelInfo::MAXSAMPLES];
643  const unsigned nRead = info.nSamples();
644  for (unsigned i = 0; i < nRead; ++i)
645  ts[i] = info.tsCharge(i);
646  const bool passes = negEFilter_->checkPassFilter(info.id(), &ts[0], nRead);
647  if (!passes)
649 }

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,
int  soi,
HBHERecHit rh 
)
private

◆ setAsicSpecificBits() [2/2]

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

◆ setCommonStatusBits()

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

Definition at line 601 of file HBHEPhase1Reconstructor.cc.

603  {}

Referenced by processData().

Member Data Documentation

◆ algoConfigClass_

std::string HBHEPhase1Reconstructor::algoConfigClass_
private

Definition at line 298 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun().

◆ conditionsToken_

edm::ESGetToken<HcalDbService, HcalDbRecord> HBHEPhase1Reconstructor::conditionsToken_
private

Definition at line 335 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ dropZSmarkedPassed_

bool HBHEPhase1Reconstructor::dropZSmarkedPassed_
private

Definition at line 304 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ feMapToken_

edm::ESGetToken<HcalFrontEndMap, HcalFrontEndMapRcd> HBHEPhase1Reconstructor::feMapToken_
private

Definition at line 338 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun(), and HBHEPhase1Reconstructor().

◆ 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 331 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ hbhePulseShapeFlagSetterQIE8_

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

Definition at line 330 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ htopoToken_

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> HBHEPhase1Reconstructor::htopoToken_
private

Definition at line 334 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ makeRecHits_

bool HBHEPhase1Reconstructor::makeRecHits_
private

Definition at line 303 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ negEFilter_

const HBHENegativeEFilter* HBHEPhase1Reconstructor::negEFilter_
private

Definition at line 327 of file HBHEPhase1Reconstructor.cc.

Referenced by produce(), and runHBHENegativeEFilter().

◆ negToken_

edm::ESGetToken<HBHENegativeEFilter, HBHENegativeEFilterRcd> HBHEPhase1Reconstructor::negToken_
private

Definition at line 337 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ processQIE11_

bool HBHEPhase1Reconstructor::processQIE11_
private

Definition at line 300 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ processQIE8_

bool HBHEPhase1Reconstructor::processQIE8_
private

Definition at line 299 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ propertiesToken_

edm::ESGetToken<HcalChannelPropertiesVec, HcalChannelPropertiesRecord> HBHEPhase1Reconstructor::propertiesToken_
private

Definition at line 336 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ reco_

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

Definition at line 323 of file HBHEPhase1Reconstructor.cc.

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

◆ recoConfig_

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

Definition at line 324 of file HBHEPhase1Reconstructor.cc.

Referenced by beginRun().

◆ recoParamsFromDB_

bool HBHEPhase1Reconstructor::recoParamsFromDB_
private

Definition at line 306 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ saveDroppedInfos_

bool HBHEPhase1Reconstructor::saveDroppedInfos_
private

Definition at line 302 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ saveEffectivePedestal_

bool HBHEPhase1Reconstructor::saveEffectivePedestal_
private

Definition at line 307 of file HBHEPhase1Reconstructor.cc.

Referenced by produce().

◆ saveInfos_

bool HBHEPhase1Reconstructor::saveInfos_
private

Definition at line 301 of file HBHEPhase1Reconstructor.cc.

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

◆ setNegativeFlagsQIE11_

bool HBHEPhase1Reconstructor::setNegativeFlagsQIE11_
private

◆ setNegativeFlagsQIE8_

bool HBHEPhase1Reconstructor::setNegativeFlagsQIE8_
private

◆ setNoiseFlagsQIE11_

bool HBHEPhase1Reconstructor::setNoiseFlagsQIE11_
private

◆ setNoiseFlagsQIE8_

bool HBHEPhase1Reconstructor::setNoiseFlagsQIE8_
private

◆ setPulseShapeFlagsQIE11_

bool HBHEPhase1Reconstructor::setPulseShapeFlagsQIE11_
private

Definition at line 318 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ setPulseShapeFlagsQIE8_

bool HBHEPhase1Reconstructor::setPulseShapeFlagsQIE8_
private

Definition at line 317 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and setAsicSpecificBits().

◆ sipmQNTStoSum_

int HBHEPhase1Reconstructor::sipmQNTStoSum_
private

Definition at line 310 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ sipmQTSShift_

int HBHEPhase1Reconstructor::sipmQTSShift_
private

Definition at line 309 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ tok_qie11_

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

Definition at line 322 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ tok_qie8_

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

Definition at line 321 of file HBHEPhase1Reconstructor.cc.

Referenced by HBHEPhase1Reconstructor(), and produce().

◆ tsFromDB_

bool HBHEPhase1Reconstructor::tsFromDB_
private

Definition at line 305 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

◆ use8ts_

bool HBHEPhase1Reconstructor::use8ts_
private

Definition at line 308 of file HBHEPhase1Reconstructor.cc.

Referenced by processData().

HBHEPhase1Reconstructor::recoConfig_
std::unique_ptr< AbsHcalAlgoData > recoConfig_
Definition: HBHEPhase1Reconstructor.cc:324
HcalPhase1FlagLabels::HBHENegativeNoise
Definition: HcalPhase1FlagLabels.h:13
mps_fire.i
i
Definition: mps_fire.py:428
HBHEPhase1Reconstructor::hbheFlagSetterQIE11_
std::unique_ptr< HBHEStatusBitSetter > hbheFlagSetterQIE11_
Definition: HBHEPhase1Reconstructor.cc:329
HBHENegativeEFilter::checkPassFilter
bool checkPassFilter(const HcalDetId &id, const double *ts, unsigned lenTS) const
Definition: HBHENegativeEFilter.cc:76
HBHEPhase1Reconstructor::negToken_
edm::ESGetToken< HBHENegativeEFilter, HBHENegativeEFilterRcd > negToken_
Definition: HBHEPhase1Reconstructor.cc:337
HLT_FULL_cff.flagParametersQIE8
flagParametersQIE8
Definition: HLT_FULL_cff.py:8412
HBHEPhase1Reconstructor::saveDroppedInfos_
bool saveDroppedInfos_
Definition: HBHEPhase1Reconstructor.cc:302
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:47
patZpeak.handle
handle
Definition: patZpeak.py:23
min
T min(T a, T b)
Definition: MathUtil.h:58
edm
HLT enums.
Definition: AlignableModifier.h:19
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
HBHERecHit
Definition: HBHERecHit.h:13
HBHEPhase1Reconstructor::setCommonStatusBits
void setCommonStatusBits(const HBHEChannelInfo &info, const HcalCalibrations &calib, HBHERecHit *rh)
Definition: HBHEPhase1Reconstructor.cc:601
HcalTopology
Definition: HcalTopology.h:26
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
HcalChannelPropertiesVec
std::vector< HcalChannelProperties > HcalChannelPropertiesVec
Definition: HcalChannelProperties.h:57
HBHEPhase1Reconstructor::dropZSmarkedPassed_
bool dropZSmarkedPassed_
Definition: HBHEPhase1Reconstructor.cc:304
hcaldqm::utilities::maxTS
int maxTS(DIGI const &digi, double ped=0)
Definition: Utilities.h:102
HcalBarrel
Definition: HcalAssistant.h:33
HLT_FULL_cff.flagParametersQIE11
flagParametersQIE11
Definition: HLT_FULL_cff.py:8423
HBHEPhase1Reconstructor::algoConfigClass_
std::string algoConfigClass_
Definition: HBHEPhase1Reconstructor.cc:298
edm::Handle
Definition: AssociativeIterator.h:50
HBHEPhase1Reconstructor::setNegativeFlagsQIE11_
bool setNegativeFlagsQIE11_
Definition: HBHEPhase1Reconstructor.cc:314
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HLT_FULL_cff.pulseShapeParametersQIE8
pulseShapeParametersQIE8
Definition: HLT_FULL_cff.py:8424
HBHEPhase1Reconstructor::sipmQTSShift_
int sipmQTSShift_
Definition: HBHEPhase1Reconstructor.cc:309
HcalChannelProperties
Definition: HcalChannelProperties.h:18
HBHEPhase1Reconstructor::setPulseShapeFlagsQIE11_
bool setPulseShapeFlagsQIE11_
Definition: HBHEPhase1Reconstructor.cc:318
add_param_set
#define add_param_set(name)
Definition: HBHEPhase1Reconstructor.cc:753
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HBHEPhase1Reconstructor::tok_qie8_
edm::EDGetTokenT< HBHEDigiCollection > tok_qie8_
Definition: HBHEPhase1Reconstructor.cc:321
HBHEPhase1Reconstructor::makeRecHits_
bool makeRecHits_
Definition: HBHEPhase1Reconstructor.cc:303
HcalRecoParam
Definition: HcalRecoParam.h:16
HBHEPhase1Reconstructor::runHBHENegativeEFilter
void runHBHENegativeEFilter(const HBHEChannelInfo &info, HBHERecHit *rh)
Definition: HBHEPhase1Reconstructor.cc:641
HLTBitAnalyser_cfi.isData
isData
Definition: HLTBitAnalyser_cfi.py:29
HBHEPhase1Reconstructor::tok_qie11_
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_
Definition: HBHEPhase1Reconstructor.cc:322
HBHERecHit::setAuxTDC
constexpr void setAuxTDC(const uint32_t aux)
Definition: HBHERecHit.h:58
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
HBHEPhase1Reconstructor::htopoToken_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > htopoToken_
Definition: HBHEPhase1Reconstructor.cc:334
HBHEPhase1Reconstructor::setNoiseFlagsQIE8_
bool setNoiseFlagsQIE8_
Definition: HBHEPhase1Reconstructor.cc:315
HcalTopology::detId2denseId
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
Definition: HcalTopology.cc:1519
HBHEPhase1Reconstructor::reco_
std::unique_ptr< AbsHBHEPhase1Algo > reco_
Definition: HBHEPhase1Reconstructor.cc:323
HBHEPhase1Reconstructor::setPulseShapeFlagsQIE8_
bool setPulseShapeFlagsQIE8_
Definition: HBHEPhase1Reconstructor.cc:317
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
HBHEPhase1Reconstructor::hbhePulseShapeFlagSetterQIE11_
std::unique_ptr< HBHEPulseShapeFlagSetter > hbhePulseShapeFlagSetterQIE11_
Definition: HBHEPhase1Reconstructor.cc:331
calib
Definition: CalibElectron.h:12
HBHEPhase1Reconstructor::saveEffectivePedestal_
bool saveEffectivePedestal_
Definition: HBHEPhase1Reconstructor.cc:307
cond
Definition: plugin.cc:23
HBHEPhase1Reconstructor::tsFromDB_
bool tsFromDB_
Definition: HBHEPhase1Reconstructor.cc:305
HBHEPhase1Reconstructor::processQIE11_
bool processQIE11_
Definition: HBHEPhase1Reconstructor.cc:300
edm::ParameterSet
Definition: ParameterSet.h:47
fetchHcalAlgoData
std::unique_ptr< AbsHcalAlgoData > fetchHcalAlgoData(const std::string &className, const edm::EventSetup &es)
Definition: fetchHcalAlgoData.cc:21
HBHEPhase1Reconstructor::setNoiseFlagsQIE11_
bool setNoiseFlagsQIE11_
Definition: HBHEPhase1Reconstructor.cc:316
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
fillDescriptionForParseHBHEPhase1Algo
edm::ParameterSetDescription fillDescriptionForParseHBHEPhase1Algo()
Definition: parseHBHEPhase1AlgoDescription.cc:146
CaloSamples
Definition: CaloSamples.h:14
HBHEPhase1Reconstructor::sipmQNTStoSum_
int sipmQNTStoSum_
Definition: HBHEPhase1Reconstructor.cc:310
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HBHEPhase1Reconstructor::conditionsToken_
edm::ESGetToken< HcalDbService, HcalDbRecord > conditionsToken_
Definition: HBHEPhase1Reconstructor.cc:335
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HBHEChannelInfo::MAXSAMPLES
static const unsigned MAXSAMPLES
Definition: HBHEChannelInfo.h:19
HcalDbService
Definition: HcalDbService.h:23
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
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
HcalEndcap
Definition: HcalAssistant.h:34
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
Exception
Definition: hltDiff.cc:245
HBHEPhase1Reconstructor::processQIE8_
bool processQIE8_
Definition: HBHEPhase1Reconstructor.cc:299
HcalFrontEndMap
Definition: HcalFrontEndMap.h:23
HBHEPhase1Reconstructor::feMapToken_
edm::ESGetToken< HcalFrontEndMap, HcalFrontEndMapRcd > feMapToken_
Definition: HBHEPhase1Reconstructor.cc:338
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalPipelinePedestalAndGain
Definition: HcalPipelinePedestalAndGain.h:5
HcalCoderDb
Definition: HcalCoderDb.h:15
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HLT_FULL_cff.pulseShapeParametersQIE11
pulseShapeParametersQIE11
Definition: HLT_FULL_cff.py:8452
HBHEPhase1Reconstructor::use8ts_
bool use8ts_
Definition: HBHEPhase1Reconstructor.cc:308
HBHEPhase1Reconstructor::propertiesToken_
edm::ESGetToken< HcalChannelPropertiesVec, HcalChannelPropertiesRecord > propertiesToken_
Definition: HBHEPhase1Reconstructor.cc:336
CaloRecHit::setFlagField
constexpr void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.h:36
cms::Exception
Definition: Exception.h:70
HBHEPhase1Reconstructor::setNegativeFlagsQIE8_
bool setNegativeFlagsQIE8_
Definition: HBHEPhase1Reconstructor.cc:313
HBHERecHit::id
constexpr HcalDetId id() const
get the id
Definition: HBHERecHit.h:41
HBHEPhase1Reconstructor::setAsicSpecificBits
void setAsicSpecificBits(const HBHEDataFrame &frame, const HcalCoder &coder, const HBHEChannelInfo &info, const HcalCalibrations &calib, int soi, HBHERecHit *rh)
Definition: HBHEPhase1Reconstructor.cc:605
parseHBHEPhase1AlgoDescription
std::unique_ptr< AbsHBHEPhase1Algo > parseHBHEPhase1AlgoDescription(const edm::ParameterSet &ps, edm::ConsumesCollector iC)
Definition: parseHBHEPhase1AlgoDescription.cc:108
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
HBHEPhase1Reconstructor::recoParamsFromDB_
bool recoParamsFromDB_
Definition: HBHEPhase1Reconstructor.cc:306
HBHEPhase1Reconstructor::saveInfos_
bool saveInfos_
Definition: HBHEPhase1Reconstructor.cc:301
edm::InputTag
Definition: InputTag.h:15
submitPVValidationJobs.infos
dictionary infos
Definition: submitPVValidationJobs.py:221
HBHEPhase1Reconstructor::hbhePulseShapeFlagSetterQIE8_
std::unique_ptr< HBHEPulseShapeFlagSetter > hbhePulseShapeFlagSetterQIE8_
Definition: HBHEPhase1Reconstructor.cc:330
HBHEChannelInfo
Definition: HBHEChannelInfo.h:15
HBHEPhase1Reconstructor::negEFilter_
const HBHENegativeEFilter * negEFilter_
Definition: HBHEPhase1Reconstructor.cc:327
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:328