#include <EcalSelectiveReadoutProducer.h>
Public Member Functions | |
EcalSelectiveReadoutProducer (const edm::ParameterSet ¶ms) | |
virtual void | produce (edm::Event &event, const edm::EventSetup &eventSetup) |
virtual | ~EcalSelectiveReadoutProducer () |
Public Member Functions inherited from edm::one::EDProducer<> | |
EDProducer ()=default | |
Public Member Functions inherited from edm::one::EDProducerBase | |
EDProducerBase () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducerBase () |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel) |
virtual | ~ProducerBase () noexcept(false) |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
Static Public Member Functions | |
static void | printSrFlags (std::ostream &os, const EBSrFlagCollection &ebSrFlags, const EESrFlagCollection &eeSrFlags, int iEvent=-1, bool withHeader=true) |
Static Public Member Functions inherited from edm::one::EDProducerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Private Member Functions | |
void | checkWeights (const edm::Event &evt, const edm::ProductID &noZSDigiId) const |
bool | getBinOfMax (const edm::Event &evt, const edm::ProductID &noZsDigiId, int &binOfMax) const |
const EBDigiCollection * | getEBDigis (edm::Event &event) |
const EEDigiCollection * | getEEDigis (edm::Event &event) |
const EcalTrigPrimDigiCollection * | getTrigPrims (edm::Event &event) const |
void | printTTFlags (const EcalTrigPrimDigiCollection &tp, std::ostream &os) const |
void | checkGeometry (const edm::EventSetup &eventSetup) |
void | checkTriggerMap (const edm::EventSetup &eventSetup) |
void | checkElecMap (const edm::EventSetup &eventSetup) |
Static Private Member Functions | |
static void | checkValidity (const EcalSRSettings &settings) |
Private Attributes | |
std::string | digiProducer_ |
int | dumpFlags_ |
edm::EDGetTokenT< EBDigiCollection > | EB_token |
std::string | ebdigiCollection_ |
std::string | ebSrFlagCollection_ |
std::string | ebSRPdigiCollection_ |
edm::EDGetTokenT< EcalTrigPrimDigiCollection > | EcTP_token |
edm::EDGetTokenT< EEDigiCollection > | EE_token |
std::string | eedigiCollection_ |
std::string | eeSrFlagCollection_ |
std::string | eeSRPdigiCollection_ |
bool | firstCallEB_ |
bool | firstCallEE_ |
int | iEvent_ |
edm::ParameterSet | params_ |
bool | produceDigis_ |
const EcalSRSettings * | settings_ |
std::unique_ptr< EcalSRSettings > | settingsFromFile_ |
std::unique_ptr< EcalSelectiveReadoutSuppressor > | suppressor_ |
const EcalElectronicsMapping * | theElecMap |
const CaloGeometry * | theGeometry |
const EcalTrigTowerConstituentsMap * | theTriggerTowerMap |
bool | trigPrimBypass_ |
int | trigPrimBypassMode_ |
std::string | trigPrimCollection_ |
std::string | trigPrimProducer_ |
bool | useCondDb_ |
bool | useFullReadout_ |
bool | writeSrFlags_ |
Additional Inherited Members | |
Public Types inherited from edm::one::EDProducerBase | |
typedef EDProducerBase | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
Definition at line 14 of file EcalSelectiveReadoutProducer.h.
|
explicit |
Constructor
params | seletive readout parameters |
Definition at line 21 of file EcalSelectiveReadoutProducer.cc.
References digiProducer_, dumpFlags_, EB_token, ebdigiCollection_, ebSrFlagCollection_, ebSRPdigiCollection_, EcTP_token, EE_token, eedigiCollection_, eeSrFlagCollection_, eeSRPdigiCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), EcalSRCondTools::importParameterSet(), produceDigis_, settings_, settingsFromFile_, AlCaHLTBitMon_QueryRunRegistry::string, theElecMap, theGeometry, theTriggerTowerMap, trigPrimBypass_, trigPrimBypassMode_, trigPrimCollection_, trigPrimProducer_, useCondDb_, useFullReadout_, and writeSrFlags_.
|
virtual |
|
private |
Definition at line 254 of file EcalSelectiveReadoutProducer.cc.
References edm::EventSetup::get(), suppressor_, and theElecMap.
Referenced by produce().
|
private |
call these once an event, to make sure everything is up-to-date
Definition at line 223 of file EcalSelectiveReadoutProducer.cc.
References edm::EventSetup::get(), suppressor_, and theGeometry.
Referenced by produce().
|
private |
Definition at line 238 of file EcalSelectiveReadoutProducer.cc.
References edm::EventSetup::get(), suppressor_, and theTriggerTowerMap.
Referenced by produce().
|
staticprivate |
Checks validity of selective setting object is valid to be used for MC, especially checks the number of elements in the vectors
forEmulator | if true check the restriction that applies for EcalSelectiveReadoutProducer |
cms::Exception | if the setting is not valid. |
Definition at line 507 of file EcalSelectiveReadoutProducer.cc.
References EcalSRSettings::dccNormalizedWeights_, EcalSRSettings::ecalDccZs1stSample_, and Exception.
Referenced by produce().
|
private |
Sanity check on the DCC FIR filter weights. Log warning or error message if an unexpected weight set is found. In principle it is checked that the maximum weight is applied to the expected maximum sample.
Definition at line 306 of file EcalSelectiveReadoutProducer.cc.
References EcalSRSettings::dccNormalizedWeights_, EcalSRSettings::ecalDccZs1stSample_, getBinOfMax(), EcalSelectiveReadoutSuppressor::getFIRTapCount(), mps_fire::i, settings_, and create_public_lumi_plots::weights.
Referenced by getEBDigis(), and getEEDigis().
|
private |
Gets the value of the digitizer binOfMaximum parameter.
noZsDigiId | product ID of the non-suppressed digis |
binOfMax | [out] set the parameter value if found |
Definition at line 350 of file EcalSelectiveReadoutProducer.cc.
References spr::find(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::Event::getProvenance(), AlCaHLTBitMon_ParallelJobs::p, edm::parameterSet(), and mps_fire::result.
Referenced by checkWeights().
|
private |
Definition at line 185 of file EcalSelectiveReadoutProducer.cc.
References checkWeights(), EB_token, firstCallEB_, edm::HandleBase::id(), edm::Handle< T >::product(), and mps_fire::result.
Referenced by produce().
|
private |
Definition at line 200 of file EcalSelectiveReadoutProducer.cc.
References checkWeights(), EE_token, firstCallEE_, edm::HandleBase::id(), edm::Handle< T >::product(), and mps_fire::result.
Referenced by produce().
|
private |
Definition at line 215 of file EcalSelectiveReadoutProducer.cc.
References EcTP_token, and edm::Handle< T >::product().
Referenced by produce().
|
static |
Help function to print SR flags.
ebSrFlags | the action flags of EB |
eeSrFlag | the action flags of EE |
iEvent | event number. Ignored if <0. |
withHeader,if | true an output description is written out as header. |
Definition at line 369 of file EcalSelectiveReadoutProducer.cc.
References edm::SortedCollection< T, SORT >::begin(), indexGen::date, edm::SortedCollection< T, SORT >::end(), RemoveAddSevLevel::flag, mps_fire::i, EBSrFlag::id(), EESrFlag::id(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), EcalScDetId::ix(), EcalScDetId::iy(), nEndcaps, srpFlagMarker, lumiQTWidget::t, ntuplemaker::time, EcalSrFlag::value(), and EcalScDetId::zside().
Referenced by produce().
|
private |
Definition at line 270 of file EcalSelectiveReadoutProducer.cc.
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), EcalTriggerPrimitiveDigi::id(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), DetIdAssociatorESProducer_cff::nEta, DetIdAssociatorESProducer_cff::nPhi, EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, EcalTriggerPrimitiveDigi::size(), tccFlagMarker, and EcalTriggerPrimitiveDigi::ttFlag().
|
virtual |
Produces the EDM products
CMS | event |
eventSetup | event conditions |
Definition at line 88 of file EcalSelectiveReadoutProducer.cc.
References checkElecMap(), checkGeometry(), checkTriggerMap(), checkValidity(), dumpFlags_, ebSrFlagCollection_, ebSRPdigiCollection_, eeSrFlagCollection_, eeSRPdigiCollection_, edm::EventSetup::get(), getEBDigis(), getEEDigis(), getTrigPrims(), iEvent_, eostools::move(), params_, printSrFlags(), produceDigis_, edm::ESHandle< T >::product(), settings_, suppressor_, trigPrimBypass_, trigPrimBypassMode_, estimatePileup_makeJSON::trunc, useCondDb_, useFullReadout_, and writeSrFlags_.
|
private |
Definition at line 102 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer().
|
private |
Number of event whose TT and SR flags must be dumped into a file.
Definition at line 124 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Definition at line 162 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and getEBDigis().
|
private |
Definition at line 103 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer().
|
private |
Definition at line 107 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Definition at line 105 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Definition at line 164 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and getTrigPrims().
|
private |
Definition at line 163 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and getEEDigis().
|
private |
Definition at line 104 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer().
|
private |
Definition at line 108 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Definition at line 106 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
|
private |
Definition at line 152 of file EcalSelectiveReadoutProducer.h.
Referenced by getEEDigis().
|
private |
Definition at line 153 of file EcalSelectiveReadoutProducer.h.
Referenced by produce().
|
private |
Definition at line 116 of file EcalSelectiveReadoutProducer.h.
Referenced by produce().
|
private |
Switch for suppressed digi production If false SR flags are produced but selective readout is not applied on the crystal channel digis.
Definition at line 133 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
SR settings
Definition at line 137 of file EcalSelectiveReadoutProducer.h.
Referenced by checkWeights(), EcalSelectiveReadoutProducer(), and produce().
|
private |
Used when settings_ is imported from configuration file. Just used for memory management. Used settings_ to access to the object
Definition at line 158 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer().
|
private |
Definition at line 101 of file EcalSelectiveReadoutProducer.h.
Referenced by checkElecMap(), checkGeometry(), checkTriggerMap(), and produce().
|
private |
Definition at line 115 of file EcalSelectiveReadoutProducer.h.
Referenced by checkElecMap(), and EcalSelectiveReadoutProducer().
|
private |
Definition at line 113 of file EcalSelectiveReadoutProducer.h.
Referenced by checkGeometry(), and EcalSelectiveReadoutProducer().
|
private |
Definition at line 114 of file EcalSelectiveReadoutProducer.h.
Referenced by checkTriggerMap(), and EcalSelectiveReadoutProducer().
|
private |
Definition at line 118 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Definition at line 120 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Definition at line 110 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer().
|
private |
Definition at line 109 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer().
|
private |
Switch for retrieving SR settings from condition database instead of CMSSW python configuration file.
Definition at line 142 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
Special switch to turn off SR entirely using special DB entries
Definition at line 147 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().
|
private |
switch to write out the SrFlags collections in the event
Definition at line 128 of file EcalSelectiveReadoutProducer.h.
Referenced by EcalSelectiveReadoutProducer(), and produce().